|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.mtl.ide.ui.editors.template.MTLSourceContent
public class MTLSourceContent
The source content (i.e the semantic content for the template editor). It can create a CST model and it is
able to do an incremental parsing of the text. You have to initialize the content with the method
init.
| Constructor Summary | |
|---|---|
MTLSourceContent()
Constructor. |
|
| Method Summary | |
|---|---|
void |
createCST()
Creates a CST model. |
java.util.List<org.eclipse.emf.common.util.URI> |
getAccessibleOutputFiles()
Gets all the accessible output files (EMTL) of this project. |
Module |
getCST()
Gets the current CST model. |
CSTNode |
getCSTNode(int posBegin,
int posEnd)
Gets the nearest CST node at the given position. |
CSTNode |
getCSTParent(CSTNode node,
java.lang.Class c)
Gets the CST parent of the given type. |
org.eclipse.core.resources.IFile |
getFile()
Gets the MTL file. |
java.util.List<org.eclipse.ocl.helper.Choice> |
getSyntaxHelp(java.lang.String text,
int offset)
Obtains syntax completion choices for the specified fragment of an OCL expression. |
java.lang.String |
getText()
Returns the text of the source. |
java.util.List<org.eclipse.emf.ecore.EClassifier> |
getTypes()
Gets the meta-model types. |
void |
init(java.lang.StringBuffer text)
It initializes the template content with the given text. |
void |
init(java.lang.StringBuffer text,
org.eclipse.core.resources.IFile aFile)
It initializes the template content with the given text and the corresponding file. |
CSTNode |
updateCST(int posBegin,
int posEnd,
java.lang.String newText)
Computes a delta version of the CST model, and returns the modified object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MTLSourceContent()
| Method Detail |
|---|
public Module getCST()
createCST hasn't been called.
public org.eclipse.core.resources.IFile getFile()
public void init(java.lang.StringBuffer text)
text - is the content of the document
public void init(java.lang.StringBuffer text,
org.eclipse.core.resources.IFile aFile)
text - is the content of the documentaFile - is a file, can be nullpublic void createCST()
getCST.
public CSTNode updateCST(int posBegin,
int posEnd,
java.lang.String newText)
posBegin - the beginning index, inclusiveposEnd - the ending index, exclusivenewText - the string that will replace previous contents
public CSTNode getCSTNode(int posBegin,
int posEnd)
posBegin - is the beginning indexposEnd - is the ending index
public CSTNode getCSTParent(CSTNode node,
java.lang.Class c)
node - is the current nodec - is the class which represents the type of the parent to search
public java.util.List<org.eclipse.ocl.helper.Choice> getSyntaxHelp(java.lang.String text,
int offset)
text - a partial OCL expression for which to seek choices that could be appended to itoffset - is the current offset in the text
Choices, possibly empty. The ordering of the list may or may not indicate
relative relevance or frequency of a choicepublic java.util.List<org.eclipse.emf.ecore.EClassifier> getTypes()
public java.util.List<org.eclipse.emf.common.util.URI> getAccessibleOutputFiles()
public java.lang.String getText()
|
Copyright 2008 Obeo All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||