summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormclay2009-04-12 16:08:17 (EDT)
committer sefftinge2009-04-12 16:08:17 (EDT)
commit2c63149f83842d5692aa9d8cb9d1d7fc998f9ffb (patch)
treec11239bbda9e7ddfe681c59aaa90983e37acc90a
parent4b53b77ef3d951f2c3235b59207b35d23773171d (diff)
downloadorg.eclipse.xtext-2c63149f83842d5692aa9d8cb9d1d7fc998f9ffb.zip
org.eclipse.xtext-2c63149f83842d5692aa9d8cb9d1d7fc998f9ffb.tar.gz
org.eclipse.xtext-2c63149f83842d5692aa9d8cb9d1d7fc998f9ffb.tar.bz2
suggestion for https://bugs.eclipse.org/bugs/show_bug.cgi?id=265168 Problem with Grammar Inheritance
-rw-r--r--plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/contentassist/impl/AbstractJavaProposalProvider.java75
-rw-r--r--plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/contentassist/impl/JavaReflectiveMethodInvoker.java26
-rw-r--r--plugins/org.eclipse.xtext.ui.generator/src/org/eclipse/xtext/ui/generator/contentAssist/ContentAssist.ext2
-rwxr-xr-xplugins/org.eclipse.xtext.ui.generator/src/org/eclipse/xtext/ui/generator/contentAssist/JavaBasedContentAssistFragment.xpt26
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageProposalProvider.java134
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/enumrules/GenEnumRulesTestLanguageProposalProvider.java13
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.ecore2
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.genmodel2
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/parseTreeConstruction/AbstractTestLanguageParsetreeConstructor.java18
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/keywords/GenKeywordsTestLanguageProposalProvider.java14
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenContentAssistTestLanguageProposalProvider.java37
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageProposalProvider.java53
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenTreeTestLanguageProposalProvider.java19
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/ui/common/editor/contentassist/impl/GenTwoContextsTestLanguageProposalProvider.java17
14 files changed, 351 insertions, 87 deletions
diff --git a/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/contentassist/impl/AbstractJavaProposalProvider.java b/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/contentassist/impl/AbstractJavaProposalProvider.java
index 313a766..4fb17b5 100644
--- a/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/contentassist/impl/AbstractJavaProposalProvider.java
+++ b/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/contentassist/impl/AbstractJavaProposalProvider.java
@@ -60,10 +60,8 @@ public abstract class AbstractJavaProposalProvider implements IProposalProvider
// @Inject(optional=true) does not work due to some plugin visibility quirks
protected AdapterFactoryLabelProvider adapterFactoryLabelProvider;
protected JavaReflectiveMethodInvoker methodInvoker;
+ protected List<IProposalProvider> proposalProviders;
- protected AbstractJavaProposalProvider() {
- this.methodInvoker = new JavaReflectiveMethodInvoker(this);
- }
/**
* @see org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider#completeKeyword(Keyword,
* IContentAssistContext)
@@ -93,7 +91,7 @@ public abstract class AbstractJavaProposalProvider implements IProposalProvider
return completeTerminalRuleRuleCall((TerminalRule) calledRule, ruleCall,contentAssistContext);
} else if (calledRule.getType() != null) {
TypeRef typeRef = calledRule.getType();
- return invokeMethod("complete"+ Strings.toFirstUpper(typeRef.getMetamodel().getAlias()) + "_"
+ return invokeMethod("complete"+ ( null!=typeRef.getMetamodel().getAlias() ? Strings.toFirstUpper(typeRef.getMetamodel().getAlias()) + "_" : "" )
+ Strings.toFirstUpper(typeRef.getClassifier().getName()),
Arrays.<Class<?>> asList(EObject.class, RuleCall.class,contentAssistContext.getModel() == null ?
EObject.class : contentAssistContext.getModel().getClass(),
@@ -122,7 +120,7 @@ public abstract class AbstractJavaProposalProvider implements IProposalProvider
*/
protected ICompletionProposal createCompletionProposal(AbstractElement abstractElement, String displayString,
IContentAssistContext contentAssistContext) {
- return createCompletionProposal(abstractElement, displayString,contentAssistContext,getAdapterFactoryLabelProvider().getImage(abstractElement));
+ return createCompletionProposal(abstractElement, displayString,contentAssistContext,getImage(abstractElement));
}
/**
@@ -137,12 +135,7 @@ public abstract class AbstractJavaProposalProvider implements IProposalProvider
return new XtextCompletionProposal(abstractElement, displayString,contentAssistContext,image);
}
- @SuppressWarnings("unchecked")
- protected List<? extends ICompletionProposal> invokeMethod(String methodName, List<Class<?>> parameterTypes,
- List<?> parameterValues) {
- return (List<? extends ICompletionProposal>) methodInvoker.invoke(methodName, parameterTypes, parameterValues);
- }
-
+
/**
* @see org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider#getTemplateContextType(Keyword,
* IContentAssistContext)
@@ -227,7 +220,7 @@ public abstract class AbstractJavaProposalProvider implements IProposalProvider
if (null != candidate.name() && isCandidateMatchingPrefix(contentAssistContext
.getModel(), ref, candidate, trimmedPrefix)) {
completionProposalList.add(createCompletionProposal(crossReference, candidate.name(),
- contentAssistContext,getAdapterFactoryLabelProvider().getImage(candidate.element())));
+ contentAssistContext,getImage(candidate.element())));
}
}
}
@@ -237,6 +230,29 @@ public abstract class AbstractJavaProposalProvider implements IProposalProvider
}
/**
+ * Returns the image for the label of the given element.
+ *
+ * @param element the element for which to provide the label image
+ * @return the image used to label the element, or <code>null</code> if there is no image for the given object
+ */
+ protected Image getImage(EObject eObject) {
+ return getAdapterFactoryLabelProvider().getImage(eObject);
+ }
+
+ /**
+ * @return an instance that wraps the given {@link #getAdapterFactory()} to delegates its JFace provider
+ * interfaces to corresponding adapter-implemented item provider interfaces
+ * @see AdapterFactoryLabelProvider
+ */
+ protected AdapterFactoryLabelProvider getAdapterFactoryLabelProvider() {
+ if (null == this.adapterFactoryLabelProvider) {
+ this.adapterFactoryLabelProvider = new AdapterFactoryLabelProvider(
+ getAdapterFactory());
+ }
+ return this.adapterFactoryLabelProvider;
+ }
+
+ /**
* @return an adapter factory that yield adapters that implement the various item label provider interfaces.
* @see AdapterFactory
*/
@@ -250,20 +266,33 @@ public abstract class AbstractJavaProposalProvider implements IProposalProvider
}
return this.adapterFactory;
}
-
- /**
- * @return an instance that wraps the given {@link #getAdapterFactory()} to delegates its JFace provider
- * interfaces to corresponding adapter-implemented item provider interfaces
- * @see AdapterFactoryLabelProvider
- */
- protected AdapterFactoryLabelProvider getAdapterFactoryLabelProvider() {
- if (null == this.adapterFactoryLabelProvider) {
- this.adapterFactoryLabelProvider = new AdapterFactoryLabelProvider(
- getAdapterFactory());
+
+ @SuppressWarnings("unchecked")
+ protected List<? extends ICompletionProposal> invokeMethod(String methodName, List<Class<?>> parameterTypes,
+ List<?> parameterValues) {
+ return (List<? extends ICompletionProposal>) getMethodInvoker().invoke(methodName, parameterTypes, parameterValues);
+ }
+
+ protected JavaReflectiveMethodInvoker getMethodInvoker() {
+ if (null==this.methodInvoker) {
+ this.methodInvoker = new JavaReflectiveMethodInvoker(getAllProposalProviders());
}
- return this.adapterFactoryLabelProvider;
+ return this.methodInvoker;
}
+ public List<IProposalProvider> getAllProposalProviders() {
+ if (null==this.proposalProviders) {
+ this.proposalProviders = new ArrayList<IProposalProvider>();
+ this.proposalProviders.add(this);
+ this.proposalProviders.addAll(getReferencedProposalProviders());
+ }
+ return this.proposalProviders;
+ }
+
+ protected List<IProposalProvider> getReferencedProposalProviders() {
+ return Collections.emptyList();
+ }
+
protected boolean isCandidateMatchingPrefix(EObject model, EReference ref,
IScopedElement candidate, String prefix) {
if (candidate.name() == null)
diff --git a/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/contentassist/impl/JavaReflectiveMethodInvoker.java b/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/contentassist/impl/JavaReflectiveMethodInvoker.java
index 3d93bbd..2688c75 100644
--- a/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/contentassist/impl/JavaReflectiveMethodInvoker.java
+++ b/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/contentassist/impl/JavaReflectiveMethodInvoker.java
@@ -9,17 +9,19 @@ package org.eclipse.xtext.ui.common.editor.contentassist.impl;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.util.Collection;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.xtext.util.Pair;
+import org.eclipse.xtext.util.Triple;
import org.eclipse.xtext.util.Tuples;
/**
- * Calls methods on a target object reflectively. Caches resolved methods in a map.
+ * Calls methods on a target object or collection reflectively. Caches resolved methods in a map.
*
* @author Jan K&ouml;hnlein - Initial contribution and API
* @author Michael Clay
@@ -27,7 +29,7 @@ import org.eclipse.xtext.util.Tuples;
*/
public class JavaReflectiveMethodInvoker {
- private final Map<Pair<String, ? extends Class<?>>, Method> methodLookupMap = new HashMap<Pair<String, ? extends Class<?>>, Method>();
+ private final Map<Triple<? extends Class<?>,String, ? extends Class<?>>, Method> methodLookupMap = new HashMap<Triple<? extends Class<?>,String, ? extends Class<?>>, Method>();
private final Object target;
@@ -36,17 +38,29 @@ public class JavaReflectiveMethodInvoker {
}
public Object invoke(String methodName, java.util.List<Class<?>> parameterTypes, java.util.List<?> parameterValues) {
- Method method = findMethod(target.getClass(), methodName, parameterTypes.toArray(new Class[] {}));
+ Object invocationResult = null;
+ if (target instanceof Collection<?>) {
+ for (Iterator<?> iterator = ((Collection<?>)target).iterator(); null == invocationResult && iterator.hasNext();) {
+ invocationResult = doInvoke(iterator.next(),methodName, parameterTypes, parameterValues);
+ }
+ } else {
+ invocationResult = doInvoke(target,methodName, parameterTypes, parameterValues);
+ }
+ return invocationResult;
+ }
+
+ private Object doInvoke(Object invocationTarget,String methodName, java.util.List<Class<?>> parameterTypes, java.util.List<?> parameterValues) {
+ Method method = findMethod(invocationTarget.getClass(), methodName, parameterTypes.toArray(new Class[] {}));
if (method == null) {
return null;
}
- return invokeMethod(method, target, parameterValues.toArray(new Object[] {}));
+ return invokeMethod(method, invocationTarget, parameterValues.toArray(new Object[] {}));
}
private final Method findMethod(Class<?> clazz, String name, Class<?>... paramTypes) {
Assert.isNotNull(clazz, "Class must not be null");
Assert.isNotNull(name, "Method name must not be null");
- Pair<String, ? extends Class<?>> methodKey = Tuples.pair(name, (paramTypes == null || paramTypes.length == 0) ? null
+ Triple<? extends Class<?>,String, ? extends Class<?>> methodKey = Tuples.create(clazz,name, (paramTypes == null || paramTypes.length == 0) ? null
: paramTypes[0]);
Method result = methodLookupMap.get(methodKey);
if (result != null)
diff --git a/plugins/org.eclipse.xtext.ui.generator/src/org/eclipse/xtext/ui/generator/contentAssist/ContentAssist.ext b/plugins/org.eclipse.xtext.ui.generator/src/org/eclipse/xtext/ui/generator/contentAssist/ContentAssist.ext
index 197fe04..14829fa 100644
--- a/plugins/org.eclipse.xtext.ui.generator/src/org/eclipse/xtext/ui/generator/contentAssist/ContentAssist.ext
+++ b/plugins/org.eclipse.xtext.ui.generator/src/org/eclipse/xtext/ui/generator/contentAssist/ContentAssist.ext
@@ -21,7 +21,7 @@ String getFqFeatureName(Assignment this):
containingParserRule().name.toFirstUpper()+"_"+feature.toFirstUpper();
String getFqFeatureName(ParserRule this):
- type.metamodel.alias.toFirstUpper()+"_"+type.classifier.name.toFirstUpper();
+ (null!=type.metamodel.alias ? type.metamodel.alias.toFirstUpper()+"_" : "")+type.classifier.name.toFirstUpper();
List[ParserRule] getParserRulesWithType(Grammar grammar) :
grammar.allParserRules().select(parserRule|parserRule.type!=null);
diff --git a/plugins/org.eclipse.xtext.ui.generator/src/org/eclipse/xtext/ui/generator/contentAssist/JavaBasedContentAssistFragment.xpt b/plugins/org.eclipse.xtext.ui.generator/src/org/eclipse/xtext/ui/generator/contentAssist/JavaBasedContentAssistFragment.xpt
index 8d01733..6c16b62 100755
--- a/plugins/org.eclipse.xtext.ui.generator/src/org/eclipse/xtext/ui/generator/contentAssist/JavaBasedContentAssistFragment.xpt
+++ b/plugins/org.eclipse.xtext.ui.generator/src/org/eclipse/xtext/ui/generator/contentAssist/JavaBasedContentAssistFragment.xpt
@@ -22,9 +22,13 @@
*/
package «getGenProposalProvider().toJavaPackage()»;
+«IF !usedGrammars.containedAssignments().isEmpty-»
+import java.util.ArrayList;
+«ENDIF-»
import java.util.Collections;
import java.util.List;
+
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.xtext.Assignment;
@@ -34,6 +38,10 @@ import org.eclipse.xtext.ui.common.editor.contentassist.impl.AbstractJavaProposa
import org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider;
import org.eclipse.xtext.ui.common.editor.contentassist.IContentAssistContext;
+«IF !usedGrammars.containedAssignments().isEmpty-»
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
+«ENDIF-»
/**
* Represents a generated, default implementation of interface {@link IProposalProvider}.
* Mehtods are dynamically dispatched on the first parameter, i.e., you can override them
@@ -42,7 +50,23 @@ import org.eclipse.xtext.ui.common.editor.contentassist.IContentAssistContext;
* @see org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider
*/
public class «getGenProposalProvider().toSimpleName()» extends AbstractJavaProposalProvider {
-
+ «IF !usedGrammars.containedAssignments().isEmpty-»
+ «FOREACH usedGrammars AS usedGrammar-»
+ @Inject(optional=true)
+ @Named("«usedGrammar.name»")
+ protected IProposalProvider «usedGrammar.name.toSimpleName().toFirstLower()»IProposalProvider;
+ «ENDFOREACH-»
+
+ protected List<IProposalProvider> getReferencedProposalProviders() {
+ List<IProposalProvider> referencedProposalProviders = new ArrayList<IProposalProvider>();
+ «FOREACH usedGrammars AS usedGrammar-»
+ if («usedGrammar.name.toSimpleName().toFirstLower()»IProposalProvider instanceof AbstractJavaProposalProvider) {
+ referencedProposalProviders.addAll(((AbstractJavaProposalProvider) this.«usedGrammar.name.toSimpleName().toFirstLower()»IProposalProvider).getAllProposalProviders());
+ }
+ «ENDFOREACH-»
+ return referencedProposalProviders;
+ }
+ «ENDIF-»
«LET {} AS processedFqnFeatureNames-»
«FOREACH containedAssignments() AS assignment-»
«LET getFqFeatureName(assignment) AS fqnFeatureName»
diff --git a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageProposalProvider.java b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageProposalProvider.java
index fe31e53..b7e5692 100644
--- a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageProposalProvider.java
+++ b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageProposalProvider.java
@@ -6,11 +6,15 @@ package org.eclipse.xtext;
import java.util.Collections;
import java.util.List;
+
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.xtext.ui.common.editor.contentassist.IContentAssistContext;
-import org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.CrossReference;
+import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.ui.common.editor.contentassist.impl.AbstractJavaProposalProvider;
+import org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider;
+import org.eclipse.xtext.ui.common.editor.contentassist.IContentAssistContext;
/**
* Represents a generated, default implementation of interface {@link IProposalProvider}.
@@ -402,15 +406,13 @@ public class GenXtextGrammarTestLanguageProposalProvider extends AbstractJavaPro
return Collections.emptyList();
}
-
- public List<? extends ICompletionProposal> complete(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ public List<? extends ICompletionProposal> completeGrammar(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
if (logger.isDebugEnabled()) {
- logger.debug("complete '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ logger.debug("completeGrammar '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
}
return Collections.emptyList();
}
-
public List<? extends ICompletionProposal> completeEcore_EString(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
if (logger.isDebugEnabled()) {
logger.debug("completeEcore_EString '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
@@ -418,5 +420,123 @@ public class GenXtextGrammarTestLanguageProposalProvider extends AbstractJavaPro
}
return Collections.emptyList();
}
-
+ public List<? extends ICompletionProposal> completeAbstractRule(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeAbstractRule '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeAbstractMetamodelDeclaration(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeAbstractMetamodelDeclaration '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeGeneratedMetamodel(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeGeneratedMetamodel '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeReferencedMetamodel(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeReferencedMetamodel '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeParserRule(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeParserRule '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeTypeRef(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeTypeRef '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeAbstractElement(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeAbstractElement '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeAction(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeAction '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeKeyword(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeKeyword '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeRuleCall(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeRuleCall '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeAssignment(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeAssignment '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeCrossReference(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeCrossReference '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeTerminalRule(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeTerminalRule '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeAbstractNegatedToken(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeAbstractNegatedToken '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeNegatedToken(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeNegatedToken '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeUntilToken(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeUntilToken '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeWildcard(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeWildcard '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
}
diff --git a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/enumrules/GenEnumRulesTestLanguageProposalProvider.java b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/enumrules/GenEnumRulesTestLanguageProposalProvider.java
index 0a5a522..8799901 100644
--- a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/enumrules/GenEnumRulesTestLanguageProposalProvider.java
+++ b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/enumrules/GenEnumRulesTestLanguageProposalProvider.java
@@ -6,13 +6,15 @@ package org.eclipse.xtext.enumrules;
import java.util.Collections;
import java.util.List;
+
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.CrossReference;
import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.ui.common.editor.contentassist.IContentAssistContext;
-import org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider;
import org.eclipse.xtext.ui.common.editor.contentassist.impl.AbstractJavaProposalProvider;
+import org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider;
+import org.eclipse.xtext.ui.common.editor.contentassist.IContentAssistContext;
/**
* Represents a generated, default implementation of interface {@link IProposalProvider}.
@@ -42,14 +44,11 @@ public class GenEnumRulesTestLanguageProposalProvider extends AbstractJavaPropos
}
-
- public List<? extends ICompletionProposal> complete(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ public List<? extends ICompletionProposal> completeModel(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
if (logger.isDebugEnabled()) {
- logger.debug("complete '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ logger.debug("completeModel '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
}
return Collections.emptyList();
}
-
-
}
diff --git a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.ecore b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.ecore
deleted file mode 100644
index 8cb3993..0000000
--- a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.ecore
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.genmodel b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.genmodel
deleted file mode 100644
index 4856844..0000000
--- a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.genmodel
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="../org.eclipse.xtext.ui.common.tests/src-gen" forceOverwrite="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" bundleManifest="false" complianceLevel="5.0" copyrightFields="false"/>
diff --git a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/parseTreeConstruction/AbstractTestLanguageParsetreeConstructor.java b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/parseTreeConstruction/AbstractTestLanguageParsetreeConstructor.java
index 5629e2b..0f47a38 100644
--- a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/parseTreeConstruction/AbstractTestLanguageParsetreeConstructor.java
+++ b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/parseTreeConstruction/AbstractTestLanguageParsetreeConstructor.java
@@ -34,11 +34,11 @@ public class AbstractTestLanguageParsetreeConstructor extends AbstractParseTreeC
/************ begin Rule InheritedParserRule ****************
*
- * org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@c9edae (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@ba62a9 (name: ID)
+ * org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@32814 (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@a3bdbc (name: ID)
*
**/
-// org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@c9edae (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@ba62a9 (name: ID)
+// org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@32814 (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@a3bdbc (name: ID)
protected class InheritedParserRule_Group extends GroupToken {
public InheritedParserRule_Group(IInstanceDescription curr, AbstractToken pred) {
@@ -78,7 +78,7 @@ protected class InheritedParserRule_0_Keyword_element extends KeywordToken {
}
}
-// org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@c9edae (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@ba62a9 (name: ID)
+// org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@32814 (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@a3bdbc (name: ID)
protected class InheritedParserRule_1_Assignment_name extends AssignmentToken {
public InheritedParserRule_1_Assignment_name(IInstanceDescription curr, AbstractToken pred) {
@@ -193,11 +193,11 @@ protected class AbstractCallOverridenParserRule_1_Assignment_elements extends As
/************ begin Rule OverridableParserRule ****************
*
- * org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@8171d8 (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@ba62a9 (name: ID)
+ * org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@b62edd (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@a3bdbc (name: ID)
*
**/
-// org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@8171d8 (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@ba62a9 (name: ID)
+// org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@b62edd (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@a3bdbc (name: ID)
protected class OverridableParserRule_Group extends GroupToken {
public OverridableParserRule_Group(IInstanceDescription curr, AbstractToken pred) {
@@ -237,7 +237,7 @@ protected class OverridableParserRule_0_Keyword_element extends KeywordToken {
}
}
-// org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@8171d8 (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@ba62a9 (name: ID)
+// org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@b62edd (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@a3bdbc (name: ID)
protected class OverridableParserRule_1_Assignment_name extends AssignmentToken {
public OverridableParserRule_1_Assignment_name(IInstanceDescription curr, AbstractToken pred) {
@@ -428,11 +428,11 @@ protected class AbstractCallExtendedParserRule_1_Assignment_elements extends Ass
/************ begin Rule ExtendableParserRule ****************
*
- * org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@fb7329 (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@ba62a9 (name: ID)
+ * org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@54d54 (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@a3bdbc (name: ID)
*
**/
-// org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@fb7329 (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@ba62a9 (name: ID)
+// org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@54d54 (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@a3bdbc (name: ID)
protected class ExtendableParserRule_Group extends GroupToken {
public ExtendableParserRule_Group(IInstanceDescription curr, AbstractToken pred) {
@@ -472,7 +472,7 @@ protected class ExtendableParserRule_0_Keyword_element extends KeywordToken {
}
}
-// org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@fb7329 (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@ba62a9 (name: ID)
+// org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Error serializing CrossRefs: Unable to create a string represenation for reference 'AbstractRule' using org.eclipse.xtext.xtext.XtextLinkingService EReference: rule Context:org.eclipse.xtext.impl.RuleCallImpl@54d54 (cardinality: null) Target:org.eclipse.xtext.impl.TerminalRuleImpl@a3bdbc (name: ID)
protected class ExtendableParserRule_1_Assignment_name extends AssignmentToken {
public ExtendableParserRule_1_Assignment_name(IInstanceDescription curr, AbstractToken pred) {
diff --git a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/keywords/GenKeywordsTestLanguageProposalProvider.java b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/keywords/GenKeywordsTestLanguageProposalProvider.java
index 007d46d..4ec0fdf 100644
--- a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/keywords/GenKeywordsTestLanguageProposalProvider.java
+++ b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/keywords/GenKeywordsTestLanguageProposalProvider.java
@@ -6,13 +6,15 @@ package org.eclipse.xtext.parser.keywords;
import java.util.Collections;
import java.util.List;
+
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.CrossReference;
import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.ui.common.editor.contentassist.IContentAssistContext;
-import org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider;
import org.eclipse.xtext.ui.common.editor.contentassist.impl.AbstractJavaProposalProvider;
+import org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider;
+import org.eclipse.xtext.ui.common.editor.contentassist.IContentAssistContext;
/**
* Represents a generated, default implementation of interface {@link IProposalProvider}.
@@ -22,7 +24,7 @@ import org.eclipse.xtext.ui.common.editor.contentassist.impl.AbstractJavaProposa
* @see org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider
*/
public class GenKeywordsTestLanguageProposalProvider extends AbstractJavaProposalProvider {
-
+
public List<? extends ICompletionProposal> completeModel_First(EObject model, Assignment assignment, IContentAssistContext contentAssistContext) {
if (logger.isDebugEnabled()) {
logger.debug("completeModel_First feature '" + assignment.getFeature() + "' terminal '"
@@ -59,13 +61,11 @@ public class GenKeywordsTestLanguageProposalProvider extends AbstractJavaProposa
return Collections.emptyList();
}
-
- public List<? extends ICompletionProposal> complete(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ public List<? extends ICompletionProposal> completeModel(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
if (logger.isDebugEnabled()) {
- logger.debug("complete '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ logger.debug("completeModel '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
}
return Collections.emptyList();
}
-
}
diff --git a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenContentAssistTestLanguageProposalProvider.java b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenContentAssistTestLanguageProposalProvider.java
index 3dd672a..954e6bf 100644
--- a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenContentAssistTestLanguageProposalProvider.java
+++ b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenContentAssistTestLanguageProposalProvider.java
@@ -6,6 +6,7 @@ package org.eclipse.xtext.testlanguages;
import java.util.Collections;
import java.util.List;
+
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.xtext.Assignment;
@@ -23,7 +24,7 @@ import org.eclipse.xtext.ui.common.editor.contentassist.IContentAssistContext;
* @see org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider
*/
public class GenContentAssistTestLanguageProposalProvider extends AbstractJavaProposalProvider {
-
+
public List<? extends ICompletionProposal> completeStart_Rules(EObject model, Assignment assignment, IContentAssistContext contentAssistContext) {
if (logger.isDebugEnabled()) {
logger.debug("completeStart_Rules feature '" + assignment.getFeature() + "' terminal '"
@@ -78,13 +79,39 @@ public class GenContentAssistTestLanguageProposalProvider extends AbstractJavaPr
return lookupCrossReference(((CrossReference)assignment.getTerminal()), contentAssistContext);
}
-
- public List<? extends ICompletionProposal> complete(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ public List<? extends ICompletionProposal> completeStart(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
if (logger.isDebugEnabled()) {
- logger.debug("complete '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ logger.debug("completeStart '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeAbstractRule(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeAbstractRule '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeFirstAbstractRuleChild(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeFirstAbstractRuleChild '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeSecondAbstractRuleChild(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeSecondAbstractRuleChild '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeAbstractRuleCall(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeAbstractRuleCall '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
}
return Collections.emptyList();
}
-
}
diff --git a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageProposalProvider.java b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageProposalProvider.java
index 2546dae..0892f86 100644
--- a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageProposalProvider.java
+++ b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageProposalProvider.java
@@ -6,14 +6,15 @@ package org.eclipse.xtext.testlanguages;
import java.util.Collections;
import java.util.List;
+
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.CrossReference;
import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.ui.common.editor.contentassist.IContentAssistContext;
-import org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider;
import org.eclipse.xtext.ui.common.editor.contentassist.impl.AbstractJavaProposalProvider;
+import org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider;
+import org.eclipse.xtext.ui.common.editor.contentassist.IContentAssistContext;
/**
* Represents a generated, default implementation of interface {@link IProposalProvider}.
@@ -169,13 +170,53 @@ public class GenReferenceGrammarTestLanguageProposalProvider extends AbstractJav
}
-
- public List<? extends ICompletionProposal> complete(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ public List<? extends ICompletionProposal> completeSpielplatz(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
if (logger.isDebugEnabled()) {
- logger.debug("complete '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ logger.debug("completeSpielplatz '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completePerson(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completePerson '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeKind(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeKind '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeErwachsener(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeErwachsener '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeSpielzeug(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeSpielzeug '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeFarbe(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeFarbe '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeFamilie(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeFamilie '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
}
return Collections.emptyList();
}
-
}
diff --git a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenTreeTestLanguageProposalProvider.java b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenTreeTestLanguageProposalProvider.java
index caef14f..e3704d9 100644
--- a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenTreeTestLanguageProposalProvider.java
+++ b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenTreeTestLanguageProposalProvider.java
@@ -6,13 +6,15 @@ package org.eclipse.xtext.testlanguages;
import java.util.Collections;
import java.util.List;
+
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.CrossReference;
import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.ui.common.editor.contentassist.IContentAssistContext;
-import org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider;
import org.eclipse.xtext.ui.common.editor.contentassist.impl.AbstractJavaProposalProvider;
+import org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider;
+import org.eclipse.xtext.ui.common.editor.contentassist.IContentAssistContext;
/**
* Represents a generated, default implementation of interface {@link IProposalProvider}.
@@ -59,13 +61,18 @@ public class GenTreeTestLanguageProposalProvider extends AbstractJavaProposalPro
return Collections.emptyList();
}
-
- public List<? extends ICompletionProposal> complete(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ public List<? extends ICompletionProposal> completeModel(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
if (logger.isDebugEnabled()) {
- logger.debug("complete '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ logger.debug("completeModel '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeNode(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeNode '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
}
return Collections.emptyList();
}
-
}
diff --git a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/ui/common/editor/contentassist/impl/GenTwoContextsTestLanguageProposalProvider.java b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/ui/common/editor/contentassist/impl/GenTwoContextsTestLanguageProposalProvider.java
index 29f467d..cf9ab6e 100644
--- a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/ui/common/editor/contentassist/impl/GenTwoContextsTestLanguageProposalProvider.java
+++ b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/ui/common/editor/contentassist/impl/GenTwoContextsTestLanguageProposalProvider.java
@@ -6,13 +6,15 @@ package org.eclipse.xtext.ui.common.editor.contentassist.impl;
import java.util.Collections;
import java.util.List;
+
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.CrossReference;
import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.ui.common.editor.contentassist.IContentAssistContext;
+import org.eclipse.xtext.ui.common.editor.contentassist.impl.AbstractJavaProposalProvider;
import org.eclipse.xtext.ui.common.editor.contentassist.IProposalProvider;
+import org.eclipse.xtext.ui.common.editor.contentassist.IContentAssistContext;
/**
* Represents a generated, default implementation of interface {@link IProposalProvider}.
@@ -50,13 +52,18 @@ public class GenTwoContextsTestLanguageProposalProvider extends AbstractJavaProp
return lookupCrossReference(((CrossReference)assignment.getTerminal()), contentAssistContext);
}
-
- public List<? extends ICompletionProposal> complete(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ public List<? extends ICompletionProposal> completeMainModel(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
if (logger.isDebugEnabled()) {
- logger.debug("complete '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ logger.debug("completeMainModel '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ + "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
+ }
+ return Collections.emptyList();
+ }
+ public List<? extends ICompletionProposal> completeAnElement(EObject model, RuleCall ruleCall, IContentAssistContext contentAssistContext) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("completeAnElement '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ "' for model '" + contentAssistContext.getModel() + "' and prefix '" + contentAssistContext.getMatchString() + "'");
}
return Collections.emptyList();
}
-
}