OCL

org.topcased.editors.ocleditor.assistant
Class OCLEditorContentProcessor

java.lang.Object
  extended by org.topcased.editors.ocleditor.assistant.OCLEditorContentProcessor
All Implemented Interfaces:
org.eclipse.jface.text.contentassist.IContentAssistProcessor

public class OCLEditorContentProcessor
extends java.lang.Object
implements org.eclipse.jface.text.contentassist.IContentAssistProcessor


Constructor Summary
OCLEditorContentProcessor()
          Constructor
 
Method Summary
 org.eclipse.jface.text.contentassist.ICompletionProposal[] computeCompletionProposals(org.eclipse.jface.text.ITextViewer viewer, int offset)
           
 EClassifier computeContextClassifier(org.eclipse.jface.text.IDocument document)
          Compute the first context of the given document
 EClassifier computeContextClassifierForPartition(org.eclipse.jface.text.IDocument document, org.eclipse.jface.text.ITypedRegion region)
          Compute the context of a specific partition
 org.eclipse.jface.text.contentassist.IContextInformation[] computeContextInformation(org.eclipse.jface.text.ITextViewer viewer, int offset)
           
 char[] getCompletionProposalAutoActivationCharacters()
           
 char[] getContextInformationAutoActivationCharacters()
           
 org.eclipse.jface.text.contentassist.IContextInformationValidator getContextInformationValidator()
           
 java.lang.String getErrorMessage()
           
 void setBasePackage(EPackage ePackage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OCLEditorContentProcessor

public OCLEditorContentProcessor()
Constructor

Method Detail

setBasePackage

public void setBasePackage(EPackage ePackage)
Parameters:
ePackage -

computeCompletionProposals

public org.eclipse.jface.text.contentassist.ICompletionProposal[] computeCompletionProposals(org.eclipse.jface.text.ITextViewer viewer,
                                                                                             int offset)
Specified by:
computeCompletionProposals in interface org.eclipse.jface.text.contentassist.IContentAssistProcessor
See Also:
IContentAssistProcessor.computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)

computeContextInformation

public org.eclipse.jface.text.contentassist.IContextInformation[] computeContextInformation(org.eclipse.jface.text.ITextViewer viewer,
                                                                                            int offset)
Specified by:
computeContextInformation in interface org.eclipse.jface.text.contentassist.IContentAssistProcessor

getCompletionProposalAutoActivationCharacters

public char[] getCompletionProposalAutoActivationCharacters()
Specified by:
getCompletionProposalAutoActivationCharacters in interface org.eclipse.jface.text.contentassist.IContentAssistProcessor

getContextInformationAutoActivationCharacters

public char[] getContextInformationAutoActivationCharacters()
Specified by:
getContextInformationAutoActivationCharacters in interface org.eclipse.jface.text.contentassist.IContentAssistProcessor

getErrorMessage

public java.lang.String getErrorMessage()
Specified by:
getErrorMessage in interface org.eclipse.jface.text.contentassist.IContentAssistProcessor

getContextInformationValidator

public org.eclipse.jface.text.contentassist.IContextInformationValidator getContextInformationValidator()
Specified by:
getContextInformationValidator in interface org.eclipse.jface.text.contentassist.IContentAssistProcessor

computeContextClassifier

public EClassifier computeContextClassifier(org.eclipse.jface.text.IDocument document)
Compute the first context of the given document

Parameters:
document - the document where the context must be found
Returns:
An EClassifier corresponding to the first context found in the document

computeContextClassifierForPartition

public EClassifier computeContextClassifierForPartition(org.eclipse.jface.text.IDocument document,
                                                        org.eclipse.jface.text.ITypedRegion region)
Compute the context of a specific partition

Parameters:
document - the whole document this function should work on
region - the region where the context should be found
Returns:
An EClassifier corresponding to the ocntext of the region

OCL

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.