Class IntegrityConfigurableCompletionProposal

  • All Implemented Interfaces:
    java.lang.Comparable<org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal>, org.eclipse.jface.text.contentassist.ICompletionProposal, org.eclipse.jface.text.contentassist.ICompletionProposalExtension, org.eclipse.jface.text.contentassist.ICompletionProposalExtension2, org.eclipse.jface.text.contentassist.ICompletionProposalExtension3, org.eclipse.jface.text.contentassist.ICompletionProposalExtension4, org.eclipse.jface.text.contentassist.ICompletionProposalExtension5, org.eclipse.jface.text.contentassist.ICompletionProposalExtension6

    public class IntegrityConfigurableCompletionProposal
    extends org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
    implements org.eclipse.jface.text.contentassist.ICompletionProposalExtension3
    A context-aware configurable completion proposal. This proposal knows its content assist context and uses this in order to resolve the EObject proxy if necessary on request of additional proposal info, but only if the fully resolved object is necessary to display certain content assist info later (via IntegrityEObjectDocumentationProvider).
    Author:
    Rene Schneider - initial API and implementation
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal

        org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal.ExitPolicy, org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal.IReplacementTextApplier
    • Constructor Summary

      Constructors 
      Constructor Description
      IntegrityConfigurableCompletionProposal​(java.lang.String aReplacementString, int aReplacementOffset, int aReplacementLength, int aCursorPosition, org.eclipse.swt.graphics.Image anImage, org.eclipse.jface.viewers.StyledString aDisplayString, org.eclipse.jface.text.contentassist.IContextInformation aContextInformation, org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext aContext)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.eclipse.emf.ecore.EObject getAdditionalProposalInfoObject()
      Returns the additional proposal info object, if possible.
      org.eclipse.jface.text.IInformationControlCreator getInformationControlCreator()  
      SuiteDefinition getSuiteDefiningProposedParameter()  
      boolean isReferencingObjectInLocalPackage()
      Checks whether the proposed element is in the "local" package.
      boolean isReferencingObjectInLocalSuite()
      Checks whether the proposed element is in the "local" suite.
      void setAdditionalProposalInfo​(java.lang.Object anAdditionalProposalInfo)  
      void setProposalContextResource​(org.eclipse.emf.ecore.resource.Resource aContextResource)  
      void setUseHtmlAdditionalProposalInfo​(boolean aUseHtmlAdditionalProposalInfoFlag)  
      • Methods inherited from class org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal

        apply, apply, apply, compareTo, equals, getAdditionalData, getAdditionalProposalInfo, getAdditionalProposalInfo, getContextInformation, getContextInformationPosition, getCursorPosition, getDisplayString, getImage, getMatcher, getPrefixCompletionStart, getPrefixCompletionText, getPriority, getReplaceContextLength, getReplacementLength, getReplacementOffset, getReplacementString, getSelection, getSelectionLength, getSelectionStart, getStyledDisplayString, getTextApplier, getTriggerCharacters, hashCode, isAutoInsertable, isLinkedMode, isValidFor, selected, setAdditionalData, setAutoInsertable, setContextInformation, setCursorPosition, setDisplayString, setDisplayString, setHover, setImage, setMatcher, setPriority, setReplaceContextLength, setReplacementLength, setReplacementOffset, setReplacementString, setSelectionLength, setSelectionStart, setSimpleLinkedMode, setTextApplier, setTriggerCharacters, setUpLinkedMode, shiftOffset, toString, unselected, validate
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension3

        getPrefixCompletionStart, getPrefixCompletionText
    • Constructor Detail

      • IntegrityConfigurableCompletionProposal

        public IntegrityConfigurableCompletionProposal​(java.lang.String aReplacementString,
                                                       int aReplacementOffset,
                                                       int aReplacementLength,
                                                       int aCursorPosition,
                                                       org.eclipse.swt.graphics.Image anImage,
                                                       org.eclipse.jface.viewers.StyledString aDisplayString,
                                                       org.eclipse.jface.text.contentassist.IContextInformation aContextInformation,
                                                       org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext aContext)
        Creates a new instance.
        Parameters:
        aReplacementString -
        aReplacementOffset -
        aReplacementLength -
        aCursorPosition -
        anImage -
        aDisplayString -
        aContextInformation -
        anAdditionalProposalInfo -
    • Method Detail

      • setUseHtmlAdditionalProposalInfo

        public void setUseHtmlAdditionalProposalInfo​(boolean aUseHtmlAdditionalProposalInfoFlag)
      • setAdditionalProposalInfo

        public void setAdditionalProposalInfo​(java.lang.Object anAdditionalProposalInfo)
        Overrides:
        setAdditionalProposalInfo in class org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
      • setProposalContextResource

        public void setProposalContextResource​(org.eclipse.emf.ecore.resource.Resource aContextResource)
        Overrides:
        setProposalContextResource in class org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
      • getAdditionalProposalInfoObject

        public org.eclipse.emf.ecore.EObject getAdditionalProposalInfoObject()
        Returns the additional proposal info object, if possible. This only returns the plain object (but attempts to resolve it, if necessary).
        Returns:
        the object or null
      • getSuiteDefiningProposedParameter

        public SuiteDefinition getSuiteDefiningProposedParameter()
      • getInformationControlCreator

        public org.eclipse.jface.text.IInformationControlCreator getInformationControlCreator()
        Specified by:
        getInformationControlCreator in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension3
        Overrides:
        getInformationControlCreator in class org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
      • isReferencingObjectInLocalSuite

        public boolean isReferencingObjectInLocalSuite()
        Checks whether the proposed element is in the "local" suite.
        Returns:
      • isReferencingObjectInLocalPackage

        public boolean isReferencingObjectInLocalPackage()
        Checks whether the proposed element is in the "local" package.
        Returns: