org.eclipse.mtl.ide.ui.wizards.newfile.example
Interface IMTLExampleStrategy

All Known Implementing Classes:
MTLCopyExampleContentStrategy

public interface IMTLExampleStrategy

An internal extension point is defined to specify multiple example strategies. It is used to initialize automatically a template file from an example in the "New>MTL>MTL Templates" wizard. The extension point "org.eclipse.mtl.ide.ui.example" requires a fully qualified name of a Java class implementing this interface.

See Also:
MTLCopyExampleContentStrategy

Method Summary
 java.lang.String getContent(org.eclipse.core.resources.IFile exampleFile, java.lang.String moduleName, java.lang.String metamodelURI, java.lang.String metamodelFileType)
          Gets the new template content, using the example file and the wizard information.
 java.lang.String getDescription()
          Gets the description of the strategy (Displayed in the "New>MTL>MTL Templates" wizard).
 

Method Detail

getDescription

java.lang.String getDescription()
Gets the description of the strategy (Displayed in the "New>MTL>MTL Templates" wizard).

Returns:
the description of the strategy

getContent

java.lang.String getContent(org.eclipse.core.resources.IFile exampleFile,
                            java.lang.String moduleName,
                            java.lang.String metamodelURI,
                            java.lang.String metamodelFileType)
Gets the new template content, using the example file and the wizard information.

Parameters:
exampleFile - is the selected example
moduleName - is the module name
metamodelURI - is the metamodel URI
metamodelFileType - is the main metamodel type
Returns:
the new template content

Copyright 2008 Obeo
All Rights Reserved.