|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sintef.mofscript.editor.MofScriptContentAssistProcessor
public class MofScriptContentAssistProcessor
Provides content assist for the MOFScript editor
| Nested Class Summary | |
|---|---|
protected static class |
MofScriptContentAssistProcessor.Validator
Simple content assist tip closer. |
| Field Summary | |
|---|---|
protected MofScriptModelChecker |
_checker
|
protected org.eclipse.emf.ecore.EStructuralFeature |
_currentFeature
|
protected ParserUtil |
_parserutil
|
protected org.eclipse.jface.text.contentassist.IContextInformationValidator |
_validator
|
protected org.eclipse.emf.ecore.EClass |
currentContextClass
|
protected java.lang.String |
currentResultType
|
protected static java.lang.String[] |
fgProposals
|
protected static java.lang.String[] |
hashTableProposals
|
protected static java.lang.String[] |
listProposals
|
protected java.util.Hashtable |
metamodelSource
|
protected java.lang.String |
metamodelTarget
|
protected static java.lang.String[] |
oclModelFunctions
|
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] |
previousCompletion
|
protected static java.lang.String[] |
standardOclFunctions
|
protected static java.lang.String[] |
stdCollectionProposals
|
protected static java.lang.String[] |
stdIntegerProposals
|
protected static java.lang.String[] |
stdStringFunctionProposals
|
| Constructor Summary | |
|---|---|
MofScriptContentAssistProcessor()
|
|
| Method Summary | |
|---|---|
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] |
arrayToProposals(java.lang.String[] list,
int documentOffset,
int replacementLength,
int cursorOffset)
Creates a list of proposals based on an array input |
void |
clean()
Cleans the previous competion, current result type and current context class |
org.eclipse.jface.text.contentassist.ICompletionProposal[] |
computeCompletionProposals(org.eclipse.jface.text.ITextViewer viewer,
int documentOffset)
Computes completion for MOFScript |
org.eclipse.jface.text.contentassist.IContextInformation[] |
computeContextInformation(org.eclipse.jface.text.ITextViewer viewer,
int documentOffset)
|
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] |
createCollectionProposals(int documentOffset,
java.lang.String[] proposals)
Retrieves standard Collection Proposals |
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] |
createIntegerProposals(int documentOffset)
Retrieves Integer proposals |
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] |
createOclProposals(int documentOffset)
Retrieves OCL proposals |
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] |
createSingleProposal(java.lang.String cname,
int documentOffset,
int replacementLength)
Creates a single proposal based on String input |
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] |
createStringFunctionProposals(int documentOffset)
Retrieves String proposals |
char[] |
getCompletionProposalAutoActivationCharacters()
|
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] |
getCompletionsForFeature(java.util.List rulesForConcept,
org.eclipse.emf.ecore.EClass contextClass,
java.lang.String[] featureSplit,
int featureIndex,
int documentOffset)
|
char[] |
getContextInformationAutoActivationCharacters()
|
org.eclipse.jface.text.contentassist.IContextInformationValidator |
getContextInformationValidator()
|
java.lang.String |
getErrorMessage()
|
protected java.lang.String[] |
getFilesOnPath()
|
protected java.util.List |
getModelOperations(int documentOffset)
Creates proposals for the model parameters |
protected java.util.List |
getTypeProposalExtensions(int documentOffset)
|
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] |
handleBaseTypeProposals(java.lang.String typeName,
int documentOffset)
Proposals for base types |
protected boolean |
isBaseType(java.lang.String typeName)
Checks if the input is a MOFScript base type |
protected boolean |
isCollectionOperation(java.lang.String operationName)
|
protected boolean |
isSingularCollectionOperation(java.lang.String opName)
|
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] |
listToProposals(java.util.List list,
int documentOffset)
Creates an array of proposals based on a list of NamedElements |
protected java.util.Set |
namedElementsToNameList(java.util.List list)
Creates a set of names based on the named from a list of NamedElements |
void |
setEditor(MofScriptTextEditor editor)
|
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] |
stringListToProposals(java.util.Collection list,
int documentOffset)
Creates proposals from a list of Strings |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String metamodelTarget
protected java.util.Hashtable metamodelSource
protected java.lang.String currentResultType
protected org.eclipse.emf.ecore.EClass currentContextClass
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] previousCompletion
protected static final java.lang.String[] fgProposals
protected static final java.lang.String[] stdStringFunctionProposals
protected static final java.lang.String[] stdCollectionProposals
protected static final java.lang.String[] hashTableProposals
protected static final java.lang.String[] listProposals
protected static final java.lang.String[] stdIntegerProposals
protected static final java.lang.String[] standardOclFunctions
protected static final java.lang.String[] oclModelFunctions
protected org.eclipse.jface.text.contentassist.IContextInformationValidator _validator
protected ParserUtil _parserutil
protected MofScriptModelChecker _checker
protected org.eclipse.emf.ecore.EStructuralFeature _currentFeature
| Constructor Detail |
|---|
public MofScriptContentAssistProcessor()
| Method Detail |
|---|
public void clean()
public void setEditor(MofScriptTextEditor editor)
public org.eclipse.jface.text.contentassist.ICompletionProposal[] computeCompletionProposals(org.eclipse.jface.text.ITextViewer viewer,
int documentOffset)
computeCompletionProposals in interface org.eclipse.jface.text.contentassist.IContentAssistProcessorviewer - documentOffset -
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] getCompletionsForFeature(java.util.List rulesForConcept,
org.eclipse.emf.ecore.EClass contextClass,
java.lang.String[] featureSplit,
int featureIndex,
int documentOffset)
rulesForConcept - contextClass - featureSplit - featureIndex - documentOffset -
protected boolean isBaseType(java.lang.String typeName)
typeName -
protected boolean isCollectionOperation(java.lang.String operationName)
operationName -
protected boolean isSingularCollectionOperation(java.lang.String opName)
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] handleBaseTypeProposals(java.lang.String typeName,
int documentOffset)
typeName - documentOffset -
protected java.util.List getModelOperations(int documentOffset)
documentOffset -
protected java.util.Set namedElementsToNameList(java.util.List list)
list - The list of NamedElements
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] stringListToProposals(java.util.Collection list,
int documentOffset)
list - documentOffset -
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] listToProposals(java.util.List list,
int documentOffset)
list - List of NamedElementsdocumentOffset - the offset used
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] arrayToProposals(java.lang.String[] list,
int documentOffset,
int replacementLength,
int cursorOffset)
list - documentOffset - replacementLength - cursorOffset -
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] createSingleProposal(java.lang.String cname,
int documentOffset,
int replacementLength)
cname - documentOffset - replacementLength -
public org.eclipse.jface.text.contentassist.IContextInformation[] computeContextInformation(org.eclipse.jface.text.ITextViewer viewer,
int documentOffset)
computeContextInformation in interface org.eclipse.jface.text.contentassist.IContentAssistProcessorviewer - documentOffset - protected org.eclipse.jface.text.contentassist.ICompletionProposal[] createStringFunctionProposals(int documentOffset)
documentOffset -
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] createCollectionProposals(int documentOffset,
java.lang.String[] proposals)
documentOffset -
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] createIntegerProposals(int documentOffset)
documentOffset -
protected org.eclipse.jface.text.contentassist.ICompletionProposal[] createOclProposals(int documentOffset)
documentOffset -
public char[] getCompletionProposalAutoActivationCharacters()
getCompletionProposalAutoActivationCharacters in interface org.eclipse.jface.text.contentassist.IContentAssistProcessorpublic char[] getContextInformationAutoActivationCharacters()
getContextInformationAutoActivationCharacters in interface org.eclipse.jface.text.contentassist.IContentAssistProcessorpublic org.eclipse.jface.text.contentassist.IContextInformationValidator getContextInformationValidator()
getContextInformationValidator in interface org.eclipse.jface.text.contentassist.IContentAssistProcessorpublic java.lang.String getErrorMessage()
getErrorMessage in interface org.eclipse.jface.text.contentassist.IContentAssistProcessorprotected java.util.List getTypeProposalExtensions(int documentOffset)
protected java.lang.String[] getFilesOnPath()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||