|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.mtl.ide.ui.wizards.newfile.example.MTLCopyExampleContentStrategy
public class MTLCopyExampleContentStrategy
Default implementation of the "org.eclipse.mtl.ide.ui.example" extension point. It is used to initialize automatically a template file from an example, by copying the text of the example into the new template.
IMTLExampleStrategy| Field Summary |
|---|
| Fields inherited from interface org.eclipse.mtl.ide.ui.wizards.newfile.example.IMTLExampleStrategy |
|---|
EXAMPLE_STRATEGY_EXTENSION_ID |
| Constructor Summary | |
|---|---|
MTLCopyExampleContentStrategy()
|
|
| Method Summary | |
|---|---|
boolean |
forceMetamodelURI()
Indicates if this strategy defines itself the meta-model URI of the template to create. |
java.lang.String |
getContent(org.eclipse.core.resources.IFile exampleFile,
java.lang.String moduleName,
boolean templateHasFileBlock,
boolean templateIsMain,
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). |
java.lang.String |
getInitialFileNameFilter()
Gets the initial file name filter for this strategy. |
protected java.lang.StringBuffer |
readExampleContent(org.eclipse.core.resources.IFile exampleFile)
Reads the text of the example file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MTLCopyExampleContentStrategy()
| Method Detail |
|---|
public java.lang.String getDescription()
getDescription in interface IMTLExampleStrategyorg.eclipse.mtl.internal.ide.ui.wizards.newfile.example.IMTLExampleStrategy#getDescription()public java.lang.String getInitialFileNameFilter()
getInitialFileNameFilter in interface IMTLExampleStrategyIMTLExampleStrategy.getInitialFileNameFilter()public boolean forceMetamodelURI()
forceMetamodelURI in interface IMTLExampleStrategyIMTLExampleStrategy.forceMetamodelURI()
public java.lang.String getContent(org.eclipse.core.resources.IFile exampleFile,
java.lang.String moduleName,
boolean templateHasFileBlock,
boolean templateIsMain,
java.lang.String metamodelURI,
java.lang.String metamodelFileType)
getContent in interface IMTLExampleStrategyexampleFile - is the selected examplemoduleName - is the module nametemplateHasFileBlock - indicates if a file block must be generatedtemplateIsMain - indicates if a main tag (@main) must be generatedmetamodelURI - is the metamodel URImetamodelFileType - is the main metamodel type
org.eclipse.mtl.internal.ide.ui.wizards.newfile.example.IMTLExampleStrategy#getContent(org.eclipse.core.resources.IFile,
java.lang.String, boolean, boolean, java.lang.String, java.lang.String)protected java.lang.StringBuffer readExampleContent(org.eclipse.core.resources.IFile exampleFile)
exampleFile - is the example file
|
Copyright 2008 Obeo All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||