Search in sources :

Example 6 with ContentAssistContext

use of org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext in project xtext-xtend by eclipse.

the class XtendJavaDocCompletionProposalComputer method exec.

@Override
public ICompletionProposal[] exec(XtextResource resource) throws Exception {
    List<ContentAssistContext> contexts = Arrays.asList(protocol.getContextFactory().create(viewer, offset, resource));
    if (contexts.size() > 0) {
        ContentAssistContext contentAssistContext = contexts.get(contexts.size() - 1);
        if (isValidPositionForTypeProposal(contentAssistContext)) {
            ITypesProposalProvider typesProposalProvider = protocol.getTypesProposalProvider();
            typesProposalProvider.createTypeProposals(protocol.getProposalFactory(), contentAssistContext, TypesPackage.Literals.JVM_PARAMETERIZED_TYPE_REFERENCE__TYPE, this);
        }
    }
    return proposals.toArray(new ICompletionProposal[proposals.size()]);
}
Also used : ContentAssistContext(org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext) ITypesProposalProvider(org.eclipse.xtext.common.types.xtext.ui.ITypesProposalProvider)

Example 7 with ContentAssistContext

use of org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext in project n4js by eclipse.

the class JSDocCompletionProposalComputer method exec.

@SuppressWarnings("unchecked")
@Override
public ICompletionProposal[] exec(XtextResource xtextResource) throws Exception {
    ContentAssistContext[] contexts = processor.getContextFactory().create(viewer, offset, xtextResource);
    if (contexts.length > 0) {
        ArrayList<ICompletionProposal> proposals = new ArrayList<>();
        ContentAssistContext contentAssistContext = contexts[contexts.length - 1];
        INode currentNode = contentAssistContext.getCurrentNode();
        String content = currentNode.getText();
        int offsetInNode = contentAssistContext.getOffset() - currentNode.getOffset() - contentAssistContext.getPrefix().length();
        // String textInFront = content.substring(0, offsetInNode);
        // System.out.println(textInFront);
        N4JSDocletParser docletParser = processor.getDocletParser();
        Doclet doclet = docletParser.parse(content);
        Optional<String> lineTagPrefix = getLineTagTitlePrefix(content, offsetInNode);
        if (lineTagPrefix.isPresent()) {
            createLineTagProposal(lineTagPrefix.get(), docletParser, proposals);
        }
        Tag tag = JSDocletUtils.getTagAtOffset(doclet, offsetInNode);
        if (tag != null) {
            ITagDefinition tagDef = tag.getTagDefinition();
            JSDocCharScanner scanner = new JSDocCharScanner(content);
            ScannerState state = scanner.saveState();
            scanner.setNextOffset(offsetInNode);
            JSDocCompletionHint completionHint = tagDef.completionHint(scanner);
            scanner.restoreState(state);
            if (completionHint.kind != NOCOMPLETION) {
                int replacementOffset = offset - completionHint.prefix.length();
                if (completionHint.isTypeModelRef()) {
                    // get reference as far as it can be parsed:
                    FullMemberReference ref = completionHint.nodeAsFullMemberReference();
                    IContentAssistScopeProvider scopeProvider = (IContentAssistScopeProvider) processor.getScopeProvider();
                    IScope moduleSpecScope = scopeProvider.getScopeForContentAssist(// context for finding modules
                    xtextResource.getContents().get(0), N4JSPackage.Literals.IMPORT_DECLARATION__MODULE);
                    // complete module or type
                    if (!completionHint.isModuleNameCompleted()) {
                        for (IEObjectDescription moduleDescr : moduleSpecScope.getAllElements()) {
                            String moduleSpec = moduleDescr.getName().toString("/");
                            String moduleSimpleName = moduleDescr.getName().getLastSegment();
                            if (!moduleSpec.startsWith("#")) {
                                if (moduleSpec.startsWith(completionHint.prefix) || moduleSimpleName.startsWith(completionHint.prefix)) {
                                    if (moduleSpec.length() == completionHint.prefix.length()) {
                                        int replacementLength = 0;
                                        int cursorPosition = 1;
                                        ICompletionProposal proposal = new CompletionProposal(".", replacementOffset + completionHint.prefix.length(), replacementLength, cursorPosition);
                                        proposals.add(proposal);
                                    } else {
                                        int replacementLength = completionHint.prefix.length();
                                        int cursorPosition = moduleSpec.length();
                                        ICompletionProposal proposal = new CompletionProposal(moduleSpec, replacementOffset, replacementLength, cursorPosition);
                                        proposals.add(proposal);
                                    }
                                }
                            }
                        }
                    } else {
                        QualifiedName moduleQN = QualifiedName.create(ref.getModuleName().split("/"));
                        IEObjectDescription descr = moduleSpecScope.getSingleElement(moduleQN);
                        if (descr != null && descr.getEObjectOrProxy() instanceof TModule) {
                            TModule module = (TModule) descr.getEObjectOrProxy();
                            if (module.eIsProxy())
                                module = (TModule) EcoreUtil.resolve(module, xtextResource);
                            if (!completionHint.isTypeNameCompleted(false) && completionHint.kind != MODULESPEC) {
                                String typePrefix = ref.getTypeName();
                                for (Type t : module.getTopLevelTypes()) {
                                    String typeName = t.getName();
                                    if (typeName.startsWith(typePrefix)) {
                                        String completion = module.getModuleSpecifier() + "." + typeName;
                                        int replacementLength = completionHint.prefix.length();
                                        int cursorPosition = completion.length();
                                        ICompletionProposal proposal = new CompletionProposal(completion, replacementOffset, replacementLength, cursorPosition);
                                        proposals.add(proposal);
                                    }
                                }
                            } else {
                                // completionHint.kind == MEMBER
                                Optional<Type> optType = module.getTopLevelTypes().stream().filter(t -> t.getName().equals(ref.getTypeName())).findAny();
                                if (optType.isPresent()) {
                                    Type t = optType.get();
                                    if (t instanceof ContainerType) {
                                        String memberPrefix = ref.getMemberName();
                                        for (TMember m : ((ContainerType<? extends TMember>) t).getOwnedMembers()) {
                                            String memberName = m.getName();
                                            if (memberName.startsWith(memberPrefix)) {
                                                String completion = LineTagWithFullElementReference.createReferenceFromType(m).toString();
                                                int replacementLength = completionHint.prefix.length();
                                                int cursorPosition = completion.length();
                                                ICompletionProposal proposal = new CompletionProposal(completion, replacementOffset, replacementLength, cursorPosition);
                                                proposals.add(proposal);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        ICompletionProposal[] result = new ICompletionProposal[proposals.size()];
        proposals.toArray(result);
        return result;
    }
    return null;
}
Also used : JSDocCharScanner(org.eclipse.n4js.jsdoc.JSDocCharScanner) FullMemberReference(org.eclipse.n4js.jsdoc.dom.FullMemberReference) N4JSPackage(org.eclipse.n4js.n4JS.N4JSPackage) CompletionProposal(org.eclipse.jface.text.contentassist.CompletionProposal) ArrayList(java.util.ArrayList) ContainerType(org.eclipse.n4js.ts.types.ContainerType) TModule(org.eclipse.n4js.ts.types.TModule) Doclet(org.eclipse.n4js.jsdoc.dom.Doclet) Type(org.eclipse.n4js.ts.types.Type) ContentAssistContext(org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext) ICompletionProposal(org.eclipse.jface.text.contentassist.ICompletionProposal) ITextViewer(org.eclipse.jface.text.ITextViewer) INode(org.eclipse.xtext.nodemodel.INode) XtextResource(org.eclipse.xtext.resource.XtextResource) JSDocCompletionHint(org.eclipse.n4js.jsdoc.JSDocCompletionHint) ICompletionProposalAcceptor(org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor) QualifiedName(org.eclipse.xtext.naming.QualifiedName) IUnitOfWork(org.eclipse.xtext.util.concurrent.IUnitOfWork) IScope(org.eclipse.xtext.scoping.IScope) EcoreUtil(org.eclipse.emf.ecore.util.EcoreUtil) N4JSDocletParser(org.eclipse.n4js.jsdoc.N4JSDocletParser) TMember(org.eclipse.n4js.ts.types.TMember) LineTagWithFullElementReference(org.eclipse.n4js.jsdoc.tags.LineTagWithFullElementReference) MODULESPEC(org.eclipse.n4js.jsdoc.JSDocCompletionHint.CompletionKind.MODULESPEC) NOCOMPLETION(org.eclipse.n4js.jsdoc.JSDocCompletionHint.CompletionKind.NOCOMPLETION) ScannerState(org.eclipse.n4js.jsdoc.JSDocCharScanner.ScannerState) ITagDefinition(org.eclipse.n4js.jsdoc.ITagDefinition) Tag(org.eclipse.n4js.jsdoc.dom.Tag) JSDocletUtils(org.eclipse.n4js.jsdoc.JSDocletUtils) Optional(java.util.Optional) IEObjectDescription(org.eclipse.xtext.resource.IEObjectDescription) IContentAssistScopeProvider(org.eclipse.n4js.scoping.IContentAssistScopeProvider) INode(org.eclipse.xtext.nodemodel.INode) N4JSDocletParser(org.eclipse.n4js.jsdoc.N4JSDocletParser) ArrayList(java.util.ArrayList) JSDocCompletionHint(org.eclipse.n4js.jsdoc.JSDocCompletionHint) IEObjectDescription(org.eclipse.xtext.resource.IEObjectDescription) ICompletionProposal(org.eclipse.jface.text.contentassist.ICompletionProposal) Doclet(org.eclipse.n4js.jsdoc.dom.Doclet) IScope(org.eclipse.xtext.scoping.IScope) TModule(org.eclipse.n4js.ts.types.TModule) FullMemberReference(org.eclipse.n4js.jsdoc.dom.FullMemberReference) CompletionProposal(org.eclipse.jface.text.contentassist.CompletionProposal) ICompletionProposal(org.eclipse.jface.text.contentassist.ICompletionProposal) JSDocCharScanner(org.eclipse.n4js.jsdoc.JSDocCharScanner) QualifiedName(org.eclipse.xtext.naming.QualifiedName) ContainerType(org.eclipse.n4js.ts.types.ContainerType) JSDocCompletionHint(org.eclipse.n4js.jsdoc.JSDocCompletionHint) ITagDefinition(org.eclipse.n4js.jsdoc.ITagDefinition) ContainerType(org.eclipse.n4js.ts.types.ContainerType) Type(org.eclipse.n4js.ts.types.Type) ContentAssistContext(org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext) IContentAssistScopeProvider(org.eclipse.n4js.scoping.IContentAssistScopeProvider) Tag(org.eclipse.n4js.jsdoc.dom.Tag) TMember(org.eclipse.n4js.ts.types.TMember) ScannerState(org.eclipse.n4js.jsdoc.JSDocCharScanner.ScannerState)

Example 8 with ContentAssistContext

use of org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext in project dsl-devkit by dsldevkit.

the class CheckProposalProvider method completeContextVariable_Type.

/**
 * {@inheritDoc}
 */
@Override
public // CHECKSTYLE:OFF
void completeContextVariable_Type(final EObject model, final Assignment assignment, final ContentAssistContext context, final ICompletionProposalAcceptor acceptor) {
    // CHECKSTYLE:ON
    completeJavaTypes(context, TypesPackage.Literals.JVM_PARAMETERIZED_TYPE_REFERENCE__TYPE, true, qualifiedNameValueConverter, new Filter() {

        // @Format-Off
        private final Set<String> resourceEClassNames = model.eResource().getResourceSet().getResources().stream().map(resource -> resource.getContents()).flatMap(List::stream).filter(obj -> obj instanceof EPackage).map(obj -> ((EPackage) obj).getEClassifiers()).flatMap(List::stream).map(eClass -> eClass.getEPackage().getName() + '.' + eClass.getName()).collect(Collectors.toSet());

        // @Format-On
        @Override
        public int getSearchFor() {
            return IJavaSearchConstants.INTERFACE;
        }

        @Override
        public boolean accept(final int modifiers, final char[] packageName, final char[] simpleTypeName, final char[][] enclosingTypeNames, final String path) {
            String fullPackageName = new String(packageName);
            String simpleClassName = new String(simpleTypeName);
            String ePackageName = fullPackageName.substring(fullPackageName.lastIndexOf('.') + 1);
            return REGISTERED_ECLASS_NAMES.contains(fullPackageName + '.' + simpleClassName) || resourceEClassNames.contains(ePackageName + '.' + simpleClassName);
        }
    }, acceptor);
    shortCircuit();
}
Also used : CheckImages(com.avaloq.tools.ddk.check.ui.labeling.CheckImages) Inject(com.google.inject.Inject) CheckResourceUtil(com.avaloq.tools.ddk.check.ui.util.CheckResourceUtil) XbaseQualifiedNameValueConverter(org.eclipse.xtext.xbase.conversion.XbaseQualifiedNameValueConverter) TypesPackage(org.eclipse.xtext.common.types.TypesPackage) ContentAssistContext(org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext) TerminalsProposalProvider(org.eclipse.xtext.common.ui.contentassist.TerminalsProposalProvider) IJavaSearchConstants(org.eclipse.jdt.core.search.IJavaSearchConstants) ICompletionProposalAcceptor(org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor) Assignment(org.eclipse.xtext.Assignment) ImmutableSet(com.google.common.collect.ImmutableSet) NLS(org.eclipse.osgi.util.NLS) Strings(org.eclipse.xtext.util.Strings) Set(java.util.Set) EObject(org.eclipse.emf.ecore.EObject) Collectors(java.util.stream.Collectors) EPackage(org.eclipse.emf.ecore.EPackage) RuleCall(org.eclipse.xtext.RuleCall) Objects(java.util.Objects) Keyword(org.eclipse.xtext.Keyword) CheckPackage(com.avaloq.tools.ddk.check.check.CheckPackage) List(java.util.List) Stream(java.util.stream.Stream) Filter(org.eclipse.xtext.common.types.xtext.ui.ITypesProposalProvider.Filter) CheckConstants(com.avaloq.tools.ddk.check.CheckConstants) GrammarUtil(org.eclipse.xtext.GrammarUtil) ConcurrentModificationException(java.util.ConcurrentModificationException) Filter(org.eclipse.xtext.common.types.xtext.ui.ITypesProposalProvider.Filter) List(java.util.List) EPackage(org.eclipse.emf.ecore.EPackage)

Example 9 with ContentAssistContext

use of org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext in project xtext-eclipse by eclipse.

the class ContentAssistProcessorTestBuilder method assertMatchString.

public ContentAssistProcessorTestBuilder assertMatchString(String matchString) throws Exception {
    String currentModelToParse = getModel();
    final XtextResource xtextResource = loadHelper.getResourceFor(new StringInputStream(currentModelToParse));
    final IXtextDocument xtextDocument = getDocument(xtextResource, currentModelToParse);
    XtextSourceViewerConfiguration configuration = get(XtextSourceViewerConfiguration.class);
    Shell shell = new Shell();
    try {
        ISourceViewer sourceViewer = getSourceViewer(shell, xtextDocument, configuration);
        IContentAssistant contentAssistant = configuration.getContentAssistant(sourceViewer);
        String contentType = xtextDocument.getContentType(currentModelToParse.length());
        if (contentAssistant.getContentAssistProcessor(contentType) != null) {
            ContentAssistContext.Factory factory = get(ContentAssistContext.Factory.class);
            ContentAssistContext[] contexts = factory.create(sourceViewer, currentModelToParse.length(), xtextResource);
            for (ContentAssistContext context : contexts) {
                Assert.assertTrue("matchString = '" + matchString + "', actual: '" + context.getPrefix() + "'", "".equals(context.getPrefix()) || matchString.equals(context.getPrefix()));
            }
        } else {
            Assert.fail("No content assistant for content type " + contentType);
        }
        return this;
    } finally {
        shell.dispose();
    }
}
Also used : StringInputStream(org.eclipse.xtext.util.StringInputStream) Shell(org.eclipse.swt.widgets.Shell) IContentAssistant(org.eclipse.jface.text.contentassist.IContentAssistant) ContentAssistContext(org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext) XtextResource(org.eclipse.xtext.resource.XtextResource) ISourceViewer(org.eclipse.jface.text.source.ISourceViewer) IXtextDocument(org.eclipse.xtext.ui.editor.model.IXtextDocument) XtextSourceViewerConfiguration(org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration)

Example 10 with ContentAssistContext

use of org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext in project xtext-eclipse by eclipse.

the class CodetemplatesProposalProvider method completeVariable_Name.

@Override
public void completeVariable_Name(EObject model, Assignment assignment, final ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    if ((mode & NORMAL) != 0) {
        {
            String proposalText = "variable";
            StyledString displayText = new StyledString(proposalText).append(" - Create a new template variable", StyledString.QUALIFIER_STYLER);
            ICompletionProposal proposal = createCompletionProposal(proposalText, displayText, null, context);
            if (proposal instanceof ConfigurableCompletionProposal) {
                ConfigurableCompletionProposal configurable = (ConfigurableCompletionProposal) proposal;
                configurable.setSelectionStart(configurable.getReplacementOffset());
                configurable.setSelectionLength(proposalText.length());
                configurable.setAutoInsertable(false);
                configurable.setSimpleLinkedMode(context.getViewer(), '\t', ' ');
            }
            acceptor.accept(proposal);
        }
        TemplateData data = new TemplateData(model);
        if (data.doCreateProposals()) {
            ContextTypeIdHelper helper = languageRegistry.getContextTypeIdHelper(data.language);
            if (helper != null) {
                String contextTypeId = helper.getId(data.rule);
                ContextTypeRegistry contextTypeRegistry = languageRegistry.getContextTypeRegistry(data.language);
                TemplateContextType contextType = contextTypeRegistry.getContextType(contextTypeId);
                if (contextType != null) {
                    Iterator<TemplateVariableResolver> resolvers = Iterators.filter(contextType.resolvers(), TemplateVariableResolver.class);
                    while (resolvers.hasNext()) {
                        final TemplateVariableResolver resolver = resolvers.next();
                        IInspectableTemplateVariableResolver inspectableResolver = templateVariableResolverRegistry.toInspectableResolver(resolver);
                        if (inspectableResolver != null) {
                            if (!inspectableResolver.hasMandatoryParameters()) {
                                String type = resolver.getType();
                                StyledString displayString = new StyledString(type, StyledString.DECORATIONS_STYLER).append(" - " + resolver.getDescription(), StyledString.QUALIFIER_STYLER);
                                acceptor.accept(createCompletionProposal(type, displayString, null, context));
                            }
                            String proposalText = "variable:" + resolver.getType();
                            StyledString displayText = new StyledString("variable").append(":" + resolver.getType(), StyledString.DECORATIONS_STYLER).append(" - " + resolver.getDescription(), StyledString.QUALIFIER_STYLER);
                            if (inspectableResolver.hasMandatoryParameters())
                                proposalText = proposalText + "()";
                            Builder builder = context.copy();
                            PrefixMatcher newMatcher = new PrefixMatcher() {

                                @Override
                                public boolean isCandidateMatchingPrefix(String name, String prefix) {
                                    return context.getMatcher().isCandidateMatchingPrefix(name, prefix) || context.getMatcher().isCandidateMatchingPrefix("variable:" + resolver.getType(), prefix) || context.getMatcher().isCandidateMatchingPrefix(resolver.getType(), prefix);
                                }
                            };
                            builder.setMatcher(newMatcher);
                            ContentAssistContext myContext = builder.toContext();
                            ICompletionProposal proposal = createCompletionProposal(proposalText, displayText, null, myContext);
                            if (proposal instanceof ConfigurableCompletionProposal) {
                                ConfigurableCompletionProposal configurable = (ConfigurableCompletionProposal) proposal;
                                configurable.setSelectionStart(configurable.getReplacementOffset());
                                configurable.setSelectionLength("variable".length());
                                configurable.setAutoInsertable(false);
                                if (inspectableResolver.hasMandatoryParameters()) {
                                    configurable.setCursorPosition(proposalText.length() - 1);
                                }
                                configurable.setSimpleLinkedMode(myContext.getViewer(), '\t');
                            }
                            acceptor.accept(proposal);
                        } else {
                            String type = resolver.getType();
                            StyledString displayString = new StyledString(type, StyledString.DECORATIONS_STYLER).append(" - " + resolver.getDescription(), StyledString.QUALIFIER_STYLER);
                            acceptor.accept(createCompletionProposal(type, displayString, null, context));
                        }
                    }
                }
            }
            if (data.template.getBody() != null) {
                for (Variable variable : Iterables.filter(data.template.getBody().getParts(), Variable.class)) {
                    if (variable != model && variable.getName() != null) {
                        String proposalText = variable.getName();
                        StyledString displayText = new StyledString(proposalText).append(" - existing variable", StyledString.QUALIFIER_STYLER);
                        if (variable.getType() != null)
                            displayText = displayText.append(" of type " + variable.getType(), StyledString.QUALIFIER_STYLER);
                        ICompletionProposal proposal = createCompletionProposal(proposalText, displayText, null, context);
                        acceptor.accept(proposal);
                    }
                }
            }
        }
    }
}
Also used : PrefixMatcher(org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher) Variable(org.eclipse.xtext.ui.codetemplates.templates.Variable) Builder(org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext.Builder) ContextTypeRegistry(org.eclipse.jface.text.templates.ContextTypeRegistry) StyledString(org.eclipse.jface.viewers.StyledString) StyledString(org.eclipse.jface.viewers.StyledString) ContextTypeIdHelper(org.eclipse.xtext.ui.editor.templates.ContextTypeIdHelper) IInspectableTemplateVariableResolver(org.eclipse.xtext.ui.codetemplates.ui.resolvers.IInspectableTemplateVariableResolver) ConfigurableCompletionProposal(org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal) ICompletionProposal(org.eclipse.jface.text.contentassist.ICompletionProposal) ContentAssistContext(org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext) TemplateContextType(org.eclipse.jface.text.templates.TemplateContextType) IInspectableTemplateVariableResolver(org.eclipse.xtext.ui.codetemplates.ui.resolvers.IInspectableTemplateVariableResolver) TemplateVariableResolver(org.eclipse.jface.text.templates.TemplateVariableResolver)

Aggregations

ContentAssistContext (org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext)15 XtextResource (org.eclipse.xtext.resource.XtextResource)6 ICompletionProposal (org.eclipse.jface.text.contentassist.ICompletionProposal)5 EObject (org.eclipse.emf.ecore.EObject)3 ITextViewer (org.eclipse.jface.text.ITextViewer)3 ConfigurableCompletionProposal (org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal)3 ICompletionProposalAcceptor (org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor)3 PrefixMatcher (org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher)3 StringInputStream (org.eclipse.xtext.util.StringInputStream)3 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)2 EClass (org.eclipse.emf.ecore.EClass)2 Region (org.eclipse.jface.text.Region)2 IContentAssistant (org.eclipse.jface.text.contentassist.IContentAssistant)2 ISourceViewer (org.eclipse.jface.text.source.ISourceViewer)2 StyledString (org.eclipse.jface.viewers.StyledString)2 Shell (org.eclipse.swt.widgets.Shell)2 IEObjectDescription (org.eclipse.xtext.resource.IEObjectDescription)2 XtextSourceViewerConfiguration (org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration)2 Builder (org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext.Builder)2 IXtextDocument (org.eclipse.xtext.ui.editor.model.IXtextDocument)2