Class IdeContentProposalCreator


  • public class IdeContentProposalCreator
    extends java.lang.Object
    Factory for content assist entries. Whenever possible, you should use this creator instead of building entries directly, since prefix matching and conflict handling is done here.
    Since:
    2.10
    Noreference:
    • Constructor Detail

      • IdeContentProposalCreator

        public IdeContentProposalCreator()
    • Method Detail

      • createProposal

        public ContentAssistEntry createProposal​(java.lang.String proposal,
                                                 ContentAssistContext context)
        Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid.
      • createSnippet

        public ContentAssistEntry createSnippet​(java.lang.String proposal,
                                                java.lang.String label,
                                                ContentAssistContext context)
        Returns an entry of kind snippet with the given proposal and label and the prefix from the context, or null if the proposal is not valid.
        Since:
        2.16
      • createProposal

        public ContentAssistEntry createProposal​(java.lang.String proposal,
                                                 ContentAssistContext context,
                                                 org.eclipse.xtext.xbase.lib.Procedures.Procedure1<? super ContentAssistEntry> init)
        Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid. If it is valid, the initializer function is applied to it.
      • createProposal

        public ContentAssistEntry createProposal​(java.lang.String proposal,
                                                 ContentAssistContext context,
                                                 java.lang.String kind,
                                                 org.eclipse.xtext.xbase.lib.Procedures.Procedure1<? super ContentAssistEntry> init)
        Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid. If it is valid, the initializer function is applied to it.
      • createProposal

        public ContentAssistEntry createProposal​(java.lang.String proposal,
                                                 java.lang.String prefix,
                                                 ContentAssistContext context,
                                                 java.lang.String kind,
                                                 org.eclipse.xtext.xbase.lib.Procedures.Procedure1<? super ContentAssistEntry> init)
        Returns an entry with the given proposal and prefix, or null if the proposal is not valid. If it is valid, the initializer function is applied to it.
      • isValidProposal

        public boolean isValidProposal​(java.lang.String proposal,
                                       java.lang.String prefix,
                                       ContentAssistContext context)