com.sap.ide.tools.core.patternfwk
Interface ISourcePattern
- public interface ISourcePattern
This is the interface that an implementation class of a Web Dynpro source
code pattern has to implement.
canContribute
public boolean canContribute(ISourceInformation sourceInformation)
- This method returns wether the pattern can contribute to the currently
edited object (e.g. a controller). The given source information instance
contains information about this object and the state of the editor. Only if
this method returns
true, the pattern will appear in the
selection list containing the available source patterns in the source
pattern wizard.
- Parameters:
sourceInformation - An object containing information about the currently
edited object and the current position in the source code when the source
pattern wizard was startet.- Returns:
- A
boolean indicating if the pattern wants to contribute
to the given containing object.
generate
public ISourcePatternResult generate(ISourcePatternData wizardData)
- This method is called by the source pattern framework when the pattern does
not provide a Velocity template for the source generation. It will be called
when the source pattern wizard is completed, a pattern has been selected
and the information for the pattern has been entered. It has to return the
result data structure for the pattern containing e.g. the source code fragment
and the import statements.
- Parameters:
wizardData - - Returns:
- The source code result structure as a
com.sap.ide.tools.core.patternfwk.ISourcePatternResult.
Copyright © 2005 SAP AG. All Rights Reserved.