Skip to content

Commit

Permalink
Merge pull request #662 from sailingKieler/aa/contentAssistProvider
Browse files Browse the repository at this point in the history
[xtend generator] Migration of 'ContentAssistFragment'/'JavaBasedContentAssistFragment'
  • Loading branch information
oehme committed Oct 9, 2015
2 parents da4537b + 6b6a60c commit 95c98a7
Show file tree
Hide file tree
Showing 18 changed files with 1,061 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ Workflow {
fileExtensions = file.extensions
}
}
fragment = adapter.FragmentAdapter {
fragment = contentAssist.JavaBasedContentAssistFragment {}
}
fragment = ui.contentAssist.ContentAssistFragment2 {}
fragment = adapter.FragmentAdapter {
fragment = parser.ContentAssistParserGenerator auto-inject {
removeBacktrackingGuards = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public Class<? extends IViewerCreator> bindIViewerCreator() {
return DefaultViewerCreator.class;
}

// contributed by org.eclipse.xtext.ui.generator.contentAssist.JavaBasedContentAssistFragment
// contributed by org.eclipse.xtext.xtext.generator.ui.contentAssist.ContentAssistFragment2
public Class<? extends IContentProposalProvider> bindIContentProposalProvider() {
return XtendProposalProvider.class;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@
package org.eclipse.xtend.ide.contentassist;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.*;
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.CrossReference;
import org.eclipse.xtext.Keyword;
import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
import org.eclipse.xtext.xbase.annotations.ui.contentassist.XbaseWithAnnotationsProposalProvider;

/**
* Represents a generated, default implementation of superclass {@link org.eclipse.xtext.xbase.annotations.ui.contentassist.XbaseWithAnnotationsProposalProvider}.
* Represents a generated, default implementation of superclass {@link XbaseWithAnnotationsProposalProvider}.
* Methods are dynamically dispatched on the first parameter, i.e., you can override them
* with a more concrete subtype.
*/
@SuppressWarnings("all")
public class AbstractXtendProposalProvider extends org.eclipse.xtext.xbase.annotations.ui.contentassist.XbaseWithAnnotationsProposalProvider {
public class AbstractXtendProposalProvider extends XbaseWithAnnotationsProposalProvider {

public void completeFile_Package(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
Expand Down Expand Up @@ -247,7 +251,7 @@ public void completeRichStringElseIf_If(EObject model, Assignment assignment, Co
public void completeRichStringElseIf_Then(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void complete_File(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public Class<? extends IOutlineTreeStructureProvider> bindIOutlineTreeStructureP
return XbaseWithAnnotationsOutlineTreeProvider.class;
}

// contributed by org.eclipse.xtext.ui.generator.contentAssist.JavaBasedContentAssistFragment
// contributed by org.eclipse.xtext.xtext.generator.ui.contentAssist.ContentAssistFragment2
public Class<? extends IContentProposalProvider> bindIContentProposalProvider() {
return XbaseWithAnnotationsProposalProvider.class;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@
package org.eclipse.xtext.xbase.annotations.ui.contentassist;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.*;
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.CrossReference;
import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
import org.eclipse.xtext.xbase.ui.contentassist.XbaseProposalProvider;

/**
* Represents a generated, default implementation of superclass {@link org.eclipse.xtext.xbase.ui.contentassist.XbaseProposalProvider}.
* Represents a generated, default implementation of superclass {@link XbaseProposalProvider}.
* Methods are dynamically dispatched on the first parameter, i.e., you can override them
* with a more concrete subtype.
*/
@SuppressWarnings("all")
public class AbstractXbaseWithAnnotationsProposalProvider extends org.eclipse.xtext.xbase.ui.contentassist.XbaseProposalProvider {
public class AbstractXbaseWithAnnotationsProposalProvider extends XbaseProposalProvider {

public void completeXAnnotation_AnnotationType(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
Expand All @@ -41,7 +44,7 @@ public void completeXAnnotationElementValueOrCommaList_Elements(EObject model, A
public void completeXAnnotationElementValue_Elements(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void complete_XAnnotation(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public Class<? extends IOutlineTreeStructureProvider> bindIOutlineTreeStructureP
return XbaseOutlineTreeProvider.class;
}

// contributed by org.eclipse.xtext.ui.generator.contentAssist.JavaBasedContentAssistFragment
// contributed by org.eclipse.xtext.xtext.generator.ui.contentAssist.ContentAssistFragment2
public Class<? extends IContentProposalProvider> bindIContentProposalProvider() {
return XbaseProposalProvider.class;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public Class<? extends IContentFormatterFactory> bindIContentFormatterFactory()
return ContentFormatterFactory.class;
}

// contributed by org.eclipse.xtext.ui.generator.contentAssist.JavaBasedContentAssistFragment
// contributed by org.eclipse.xtext.xtext.generator.ui.contentAssist.ContentAssistFragment2
public Class<? extends IContentProposalProvider> bindIContentProposalProvider() {
return XtypeProposalProvider.class;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@
package org.eclipse.xtext.xbase.ui.contentassist;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.*;
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.CrossReference;
import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;

/**
* Represents a generated, default implementation of superclass {@link org.eclipse.xtext.xbase.ui.contentassist.XtypeProposalProvider}.
* Represents a generated, default implementation of superclass {@link XtypeProposalProvider}.
* Methods are dynamically dispatched on the first parameter, i.e., you can override them
* with a more concrete subtype.
*/
@SuppressWarnings("all")
public class AbstractXbaseProposalProvider extends org.eclipse.xtext.xbase.ui.contentassist.XtypeProposalProvider {
public class AbstractXbaseProposalProvider extends XtypeProposalProvider {

public void completeXAssignment_Feature(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
Expand Down Expand Up @@ -293,7 +295,7 @@ public void completeXCatchClause_DeclaredParam(EObject model, Assignment assignm
public void completeXCatchClause_Expression(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void complete_XExpression(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@
package org.eclipse.xtext.xbase.ui.contentassist;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.*;
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.CrossReference;
import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.ui.editor.contentassist.AbstractJavaBasedContentProposalProvider;
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;

/**
* Represents a generated, default implementation of superclass {@link org.eclipse.xtext.ui.editor.contentassist.AbstractJavaBasedContentProposalProvider}.
* Represents a generated, default implementation of superclass {@link AbstractJavaBasedContentProposalProvider}.
* Methods are dynamically dispatched on the first parameter, i.e., you can override them
* with a more concrete subtype.
*/
@SuppressWarnings("all")
public class AbstractXtypeProposalProvider extends org.eclipse.xtext.ui.editor.contentassist.AbstractJavaBasedContentProposalProvider {
public class AbstractXtypeProposalProvider extends AbstractJavaBasedContentProposalProvider {

public void completeXFunctionTypeRef_ParamTypes(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
Expand Down Expand Up @@ -74,7 +77,7 @@ public void completeXImportDeclaration_MemberName(EObject model, Assignment assi
public void completeXImportDeclaration_ImportedNamespace(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void complete_JvmTypeReference(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment;
import org.eclipse.xtext.generator.resourceFactory.ResourceFactoryFragment;
import org.eclipse.xtext.generator.serializer.SerializerFragment;
import org.eclipse.xtext.ui.generator.contentAssist.JavaBasedContentAssistFragment;
import org.eclipse.xtext.ui.generator.labeling.LabelProviderFragment;
import org.eclipse.xtext.ui.generator.quickfix.QuickfixProviderFragment;
import org.eclipse.xtext.xtext.generator.CodeConfig;
Expand All @@ -23,6 +22,7 @@
import org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2;
import org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2;
import org.eclipse.xtext.xtext.generator.types.TypesGeneratorFragment2;
import org.eclipse.xtext.xtext.generator.ui.contentAssist.ContentAssistFragment2;
import org.eclipse.xtext.xtext.generator.ui.outline.OutlineTreeProviderFragment2;
import org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2;
import org.eclipse.xtext.xtext.generator.xbase.XbaseGeneratorFragment2;
Expand Down Expand Up @@ -80,7 +80,7 @@ public static void main(String[] args) {
addFragment(new GrammarAccessFragment2());
addFragment(new FragmentAdapter(new SerializerFragment()));
addFragment(new Formatter2Fragment2());
addFragment(new FragmentAdapter(new JavaBasedContentAssistFragment()));
addFragment(new ContentAssistFragment2());
XtextAntlrGeneratorFragment antlr = new XtextAntlrGeneratorFragment();
antlr.setOptions(antlrOptions);
addFragment(new FragmentAdapter(antlr));
Expand Down Expand Up @@ -121,7 +121,7 @@ public static void main(String[] args) {
label.setGenerateStub(false);
addFragment(new FragmentAdapter(label));
addFragment(new OutlineTreeProviderFragment2());
addFragment(new FragmentAdapter(new JavaBasedContentAssistFragment()));
addFragment(new ContentAssistFragment2());
XtextAntlrUiGeneratorFragment antlrUI = new XtextAntlrUiGeneratorFragment();
antlrUI.setOptions(antlrOptions);
antlrUI.addAntlrParam("-Xconversiontimeout");
Expand Down Expand Up @@ -162,7 +162,7 @@ public static void main(String[] args) {
label.setGenerateXtendStub(true);
addFragment(new FragmentAdapter(label));
addFragment(new OutlineTreeProviderFragment2());
addFragment(new FragmentAdapter(new JavaBasedContentAssistFragment()));
addFragment(new ContentAssistFragment2());
XtextAntlrUiGeneratorFragment antlrUI = new XtextAntlrUiGeneratorFragment();
antlrUI.setOptions(antlrOptions);
antlrUI.addAntlrParam("-Xconversiontimeout");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Export-Package: org.eclipse.xtext.xtext.generator,
org.eclipse.xtext.xtext.generator.parser.antlr.splitting.simpleExpressions.util;x-internal:=true,
org.eclipse.xtext.xtext.generator.scoping,
org.eclipse.xtext.xtext.generator.types,
org.eclipse.xtext.xtext.generator.ui.contentAssist,
org.eclipse.xtext.xtext.generator.ui.outline,
org.eclipse.xtext.xtext.generator.util,
org.eclipse.xtext.xtext.generator.validation,
Expand Down
Loading

0 comments on commit 95c98a7

Please sign in to comment.