aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2009-03-23 07:03:47 (EDT)
committersefftinge2009-03-23 07:03:47 (EDT)
commitcad12a921449831cb53eb810235807f86adebc6f (patch)
treecbe8eebe3ffb2fe6723e6206dcf984014a01e484
parent36de3e1374d64ad47451c11c3a75a8628b49a6f8 (diff)
downloadorg.eclipse.xtext-cad12a921449831cb53eb810235807f86adebc6f.zip
org.eclipse.xtext-cad12a921449831cb53eb810235807f86adebc6f.tar.gz
org.eclipse.xtext-cad12a921449831cb53eb810235807f86adebc6f.tar.bz2
Fix: don't register multiple handlers for the very same editor action
Bootstrapping, regenerating all languages
-rw-r--r--devtools/org.eclipse.xtext.reference.ui/plugin.xml24
-rw-r--r--devtools/org.eclipse.xtext.reference.ui/plugin.xml_gen15
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel.ui/plugin.xml31
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel.ui/plugin.xml_gen15
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl.ui/plugin.xml24
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl.ui/plugin.xml_gen15
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl.ui/plugin.xml24
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl.ui/plugin.xml_gen15
-rw-r--r--plugins/org.eclipse.xtext.ui.core/plugin.xml11
-rw-r--r--plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextEditor.java16
-rw-r--r--plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextEditorPropertyTester.java31
-rwxr-xr-xplugins/org.eclipse.xtext.ui.generator/src/org/eclipse/xtext/ui/generator/BasicUiGeneratorFragment.xpt15
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/ConcreteTestLanguageGrammarAccess.java4
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/plugin.xml364
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/plugin.xml_gen105
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext36
-rw-r--r--tests/org.eclipse.xtext.ui.integration.tests/plugin.xml43
-rw-r--r--tests/org.eclipse.xtext.ui.integration.tests/plugin.xml_gen15
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/plugin.xml213
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/plugin.xml_gen75
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext36
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext12
22 files changed, 881 insertions, 258 deletions
diff --git a/devtools/org.eclipse.xtext.reference.ui/plugin.xml b/devtools/org.eclipse.xtext.reference.ui/plugin.xml
index ba4394a..af15ee7 100644
--- a/devtools/org.eclipse.xtext.reference.ui/plugin.xml
+++ b/devtools/org.eclipse.xtext.reference.ui/plugin.xml
@@ -35,6 +35,30 @@
name="ReferenceGrammar Editor">
</editor>
</extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.reference.ReferenceGrammarExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.reference.ReferenceGrammar.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.reference.ReferenceGrammar.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.reference.ReferenceGrammar"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
diff --git a/devtools/org.eclipse.xtext.reference.ui/plugin.xml_gen b/devtools/org.eclipse.xtext.reference.ui/plugin.xml_gen
index 1b9657e..32b80ef 100644
--- a/devtools/org.eclipse.xtext.reference.ui/plugin.xml_gen
+++ b/devtools/org.eclipse.xtext.reference.ui/plugin.xml_gen
@@ -40,12 +40,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.reference.ReferenceGrammar.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.reference.ReferenceGrammar.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.reference.ReferenceGrammar"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
diff --git a/examples/org.eclipse.xtext.example.domainmodel.ui/plugin.xml b/examples/org.eclipse.xtext.example.domainmodel.ui/plugin.xml
index 1b63738..ba584d9 100644
--- a/examples/org.eclipse.xtext.example.domainmodel.ui/plugin.xml
+++ b/examples/org.eclipse.xtext.example.domainmodel.ui/plugin.xml
@@ -3,7 +3,6 @@
<plugin>
-
<!-- adding resource factories -->
<extension
@@ -15,8 +14,7 @@
</extension>
-
- <extension
+ <extension
point="org.eclipse.ui.editors">
<editor
class="org.eclipse.xtext.example.DomainmodelExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.XtextEditor"
@@ -27,7 +25,31 @@
name="Domainmodel Editor">
</editor>
</extension>
- <extension
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.DomainmodelExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.Domainmodel.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.example.Domainmodel.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.example.Domainmodel"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
point="org.eclipse.ui.preferencePages">
<page
class="org.eclipse.xtext.example.DomainmodelExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.LanguageRootPreferencePage"
@@ -58,5 +80,6 @@
label="Task Tags">
</keyword>
</extension>
+
</plugin>
diff --git a/examples/org.eclipse.xtext.example.domainmodel.ui/plugin.xml_gen b/examples/org.eclipse.xtext.example.domainmodel.ui/plugin.xml_gen
index 8810c87..ba584d9 100644
--- a/examples/org.eclipse.xtext.example.domainmodel.ui/plugin.xml_gen
+++ b/examples/org.eclipse.xtext.example.domainmodel.ui/plugin.xml_gen
@@ -32,12 +32,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.example.Domainmodel.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.example.Domainmodel.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.example.Domainmodel"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
diff --git a/examples/org.eclipse.xtext.example.ecoredsl.ui/plugin.xml b/examples/org.eclipse.xtext.example.ecoredsl.ui/plugin.xml
index c5b1b48..4009697 100644
--- a/examples/org.eclipse.xtext.example.ecoredsl.ui/plugin.xml
+++ b/examples/org.eclipse.xtext.example.ecoredsl.ui/plugin.xml
@@ -24,6 +24,30 @@
name="EcoreDsl Editor">
</editor>
</extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.EcoreDslExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.EcoreDsl.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.example.EcoreDsl.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.example.EcoreDsl"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
diff --git a/examples/org.eclipse.xtext.example.ecoredsl.ui/plugin.xml_gen b/examples/org.eclipse.xtext.example.ecoredsl.ui/plugin.xml_gen
index c97873d..efccd2b 100644
--- a/examples/org.eclipse.xtext.example.ecoredsl.ui/plugin.xml_gen
+++ b/examples/org.eclipse.xtext.example.ecoredsl.ui/plugin.xml_gen
@@ -32,12 +32,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.example.EcoreDsl.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.example.EcoreDsl.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.example.EcoreDsl"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
diff --git a/examples/org.eclipse.xtext.example.fowlerdsl.ui/plugin.xml b/examples/org.eclipse.xtext.example.fowlerdsl.ui/plugin.xml
index d828b81..f8f14c8 100644
--- a/examples/org.eclipse.xtext.example.fowlerdsl.ui/plugin.xml
+++ b/examples/org.eclipse.xtext.example.fowlerdsl.ui/plugin.xml
@@ -27,6 +27,30 @@
name="FowlerDsl Editor">
</editor>
</extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.FowlerDslExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.FowlerDsl.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.example.FowlerDsl.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.example.FowlerDsl"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
diff --git a/examples/org.eclipse.xtext.example.fowlerdsl.ui/plugin.xml_gen b/examples/org.eclipse.xtext.example.fowlerdsl.ui/plugin.xml_gen
index 00bef66..7e1b5ca 100644
--- a/examples/org.eclipse.xtext.example.fowlerdsl.ui/plugin.xml_gen
+++ b/examples/org.eclipse.xtext.example.fowlerdsl.ui/plugin.xml_gen
@@ -32,12 +32,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.example.FowlerDsl.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.example.FowlerDsl.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.example.FowlerDsl"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
diff --git a/plugins/org.eclipse.xtext.ui.core/plugin.xml b/plugins/org.eclipse.xtext.ui.core/plugin.xml
index 45be46b..b3b2073 100644
--- a/plugins/org.eclipse.xtext.ui.core/plugin.xml
+++ b/plugins/org.eclipse.xtext.ui.core/plugin.xml
@@ -45,6 +45,7 @@
</with>
</definition>
</extension>
+
<extension
point="org.eclipse.ui.menus">
<menuContribution
@@ -92,6 +93,16 @@
name="Validate">
</command>
</extension>
+ <extension point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ id="org.eclipse.xtext.ui.core.editor.XtextEditorPropertyTester"
+ type="org.eclipse.ui.IEditorPart"
+ namespace="org.eclipse.xtext.ui.core.editor.XtextEditor"
+ properties="languageName"
+ class="org.eclipse.xtext.ui.core.editor.XtextEditorPropertyTester">
+ </propertyTester>
+ </extension>
+
<!--extension
point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors">
<hyperlinkDetector
diff --git a/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextEditor.java b/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextEditor.java
index 2905634..de7bc20 100644
--- a/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextEditor.java
+++ b/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextEditor.java
@@ -30,6 +30,7 @@ import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.ui.texteditor.SelectMarkerRulerAction;
import org.eclipse.ui.texteditor.TextOperationAction;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+import org.eclipse.xtext.Constants;
import org.eclipse.xtext.ui.core.XtextUIMessages;
import org.eclipse.xtext.ui.core.editor.model.IXtextDocument;
import org.eclipse.xtext.ui.core.editor.model.XtextDocumentProvider;
@@ -40,6 +41,7 @@ import org.eclipse.xtext.validator.CheckMode;
import com.google.inject.Inject;
import com.google.inject.Provider;
+import com.google.inject.name.Named;
/**
* @author Dennis Huebner - Initial contribution and API
@@ -60,6 +62,8 @@ public class XtextEditor extends TextEditor {
@Inject
private Provider<XtextDocumentProvider> documentProvider;
+
+ private String languageName;
public XtextEditor() {
if (log.isDebugEnabled())
@@ -69,6 +73,15 @@ public class XtextEditor extends TextEditor {
public IXtextDocument getDocument() {
return XtextDocumentUtil.get(getSourceViewer());
}
+
+ @Inject
+ public void setLanguageName(@Named(Constants.LANGUAGE_NAME) String name) {
+ this.languageName = name;
+ }
+
+ public String getLanguageName() {
+ return languageName;
+ }
@Override
protected void doSetInput(IEditorInput input) throws CoreException {
@@ -229,9 +242,6 @@ public class XtextEditor extends TextEditor {
doExpensiveValidation();
}
- /**
- *
- */
private void doExpensiveValidation() {
new ValidationJob(this, CheckMode.NORMAL_AND_FAST).schedule();
}
diff --git a/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextEditorPropertyTester.java b/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextEditorPropertyTester.java
new file mode 100644
index 0000000..5b06548
--- /dev/null
+++ b/plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/XtextEditorPropertyTester.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.ui.core.editor;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.xtext.Constants;
+
+/**
+ * @author Sebastian Zarnekow - Initial contribution and API
+ */
+public class XtextEditorPropertyTester extends PropertyTester {
+
+ public XtextEditorPropertyTester() {
+ super();
+ }
+
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ if (receiver instanceof XtextEditor) {
+ XtextEditor editor = (XtextEditor) receiver;
+ if (Constants.LANGUAGE_NAME.equals(property))
+ return editor.getLanguageName().equals(expectedValue);
+ }
+ return false;
+ }
+
+}
diff --git a/plugins/org.eclipse.xtext.ui.generator/src/org/eclipse/xtext/ui/generator/BasicUiGeneratorFragment.xpt b/plugins/org.eclipse.xtext.ui.generator/src/org/eclipse/xtext/ui/generator/BasicUiGeneratorFragment.xpt
index 7870a6f..dddc4eb 100755
--- a/plugins/org.eclipse.xtext.ui.generator/src/org/eclipse/xtext/ui/generator/BasicUiGeneratorFragment.xpt
+++ b/plugins/org.eclipse.xtext.ui.generator/src/org/eclipse/xtext/ui/generator/BasicUiGeneratorFragment.xpt
@@ -36,12 +36,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="źname╗.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="źname╗.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="źname╗"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/ConcreteTestLanguageGrammarAccess.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/ConcreteTestLanguageGrammarAccess.java
index 3100c4b..0bbdf88 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/ConcreteTestLanguageGrammarAccess.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/ConcreteTestLanguageGrammarAccess.java
@@ -436,7 +436,7 @@ public class ConcreteTestLanguageGrammarAccess implements IGrammarAccess {
return getInheritedParserRuleAccess().getRule();
}
- //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@a3476b (cardinality: null) Target:org.eclipse.xtext.impl.ParserRuleImpl@169680 (name: OverridableParserRule) (definesHiddenTokens: false)
+ //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@5e1af5 (cardinality: null) Target:org.eclipse.xtext.impl.ParserRuleImpl@2330a6 (name: OverridableParserRule) (definesHiddenTokens: false)
public AbstractTestLanguageGrammarAccess.AbstractCallOverridenParserRuleElements getAbstractCallOverridenParserRuleAccess() {
return gaAbstractTestLanguage.getAbstractCallOverridenParserRuleAccess();
}
@@ -445,7 +445,7 @@ public class ConcreteTestLanguageGrammarAccess implements IGrammarAccess {
return getAbstractCallOverridenParserRuleAccess().getRule();
}
- //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@96cd00 (cardinality: null) Target:org.eclipse.xtext.impl.ParserRuleImpl@80d5d5 (name: ExtendableParserRule) (definesHiddenTokens: false)
+ //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@255931 (cardinality: null) Target:org.eclipse.xtext.impl.ParserRuleImpl@1c28c8 (name: ExtendableParserRule) (definesHiddenTokens: false)
public AbstractTestLanguageGrammarAccess.AbstractCallExtendedParserRuleElements getAbstractCallExtendedParserRuleAccess() {
return gaAbstractTestLanguage.getAbstractCallExtendedParserRuleAccess();
}
diff --git a/tests/org.eclipse.xtext.ui.common.tests/plugin.xml b/tests/org.eclipse.xtext.ui.common.tests/plugin.xml
index 3a79bf0..678b3b4 100644
--- a/tests/org.eclipse.xtext.ui.common.tests/plugin.xml
+++ b/tests/org.eclipse.xtext.ui.common.tests/plugin.xml
@@ -12,19 +12,6 @@
</extension>
- <extension
- point="org.eclipse.xtend.typesystem.emf.checks">
- <metaModel
- nsURI="http://www.eclipse.org/2008/Test/XtextTest">
- <checkFile
- path="org/eclipse/xtext/XtextTestChecks.chk">
- </checkFile>
- </metaModel>
-
- </extension>
-
-
-
<!-- adding resource factories -->
<extension
@@ -36,8 +23,7 @@
</extension>
-
- <extension
+ <extension
point="org.eclipse.ui.editors">
<editor
class="org.eclipse.xtext.XtextGrammarTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.XtextEditor"
@@ -48,7 +34,31 @@
name="XtextGrammarTestLanguage Editor">
</editor>
</extension>
- <extension
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.XtextGrammarTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.XtextGrammarTestLanguage.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.XtextGrammarTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.XtextGrammarTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
point="org.eclipse.ui.preferencePages">
<page
class="org.eclipse.xtext.XtextGrammarTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.LanguageRootPreferencePage"
@@ -79,36 +89,77 @@
label="Task Tags">
</keyword>
</extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http://www.eclipse.org/tmf/tests/2009/twoContexts"
+ class = "org.eclipse.xtext.ui.common.editor.contentassist.impl.twoContexts.TwoContextsPackage"
+ genModel = "org/eclipse/xtext/ui/common/editor/contentassist/impl/TwoContextsTestLanguage.genmodel" />
+
+ </extension>
+<!-- adding resource factories -->
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ class="org.eclipse.xtext.ui.common.editor.contentassist.impl.TwoContextsTestLanguageExecutableExtensionFactory:org.eclipse.xtext.resource.XtextResourceFactory"
+ type="twocontextstestlanguage">
+ </parser>
+ </extension>
- <extension
+ <extension
point="org.eclipse.ui.editors">
<editor
- class="org.eclipse.xtext.grammarinheritance.AbstractTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.XtextEditor"
+ class="org.eclipse.xtext.ui.common.editor.contentassist.impl.TwoContextsTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.XtextEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
- extensions="abstracttestlanguage"
- id="org.eclipse.xtext.grammarinheritance.AbstractTestLanguage"
- name="AbstractTestLanguage Editor">
+ extensions="twocontextstestlanguage"
+ id="org.eclipse.xtext.ui.common.editor.contentassist.impl.TwoContextsTestLanguage"
+ name="TwoContextsTestLanguage Editor">
</editor>
</extension>
- <extension
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.ui.common.editor.contentassist.impl.TwoContextsTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.ui.common.editor.contentassist.impl.TwoContextsTestLanguage.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.ui.common.editor.contentassist.impl.TwoContextsTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.ui.common.editor.contentassist.impl.TwoContextsTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
point="org.eclipse.ui.preferencePages">
<page
- class="org.eclipse.xtext.grammarinheritance.AbstractTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.LanguageRootPreferencePage"
- id="org.eclipse.xtext.grammarinheritance.AbstractTestLanguage"
- name="AbstractTestLanguage">
+ class="org.eclipse.xtext.ui.common.editor.contentassist.impl.TwoContextsTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.xtext.ui.common.editor.contentassist.impl.TwoContextsTestLanguage"
+ name="TwoContextsTestLanguage">
<keywordReference
- id="org.eclipse.xtext.grammarinheritance.ui.keyword_AbstractTestLanguage">
+ id="org.eclipse.xtext.ui.common.editor.contentassist.impl.ui.keyword_TwoContextsTestLanguage">
</keywordReference>
</page>
<page
- category="org.eclipse.xtext.grammarinheritance.AbstractTestLanguage"
- class="org.eclipse.xtext.grammarinheritance.AbstractTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.EditorPreferencePage"
- id="org.eclipse.xtext.grammarinheritance.AbstractTestLanguage.editor"
+ category="org.eclipse.xtext.ui.common.editor.contentassist.impl.TwoContextsTestLanguage"
+ class="org.eclipse.xtext.ui.common.editor.contentassist.impl.TwoContextsTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.EditorPreferencePage"
+ id="org.eclipse.xtext.ui.common.editor.contentassist.impl.TwoContextsTestLanguage.editor"
name="Editor">
<keywordReference
id="org.eclipse.xtext.keyword.editor">
@@ -118,14 +169,16 @@
<extension
point="org.eclipse.ui.keywords">
<keyword
- id="org.eclipse.xtext.grammarinheritance.ui.keyword_AbstractTestLanguage"
- label="AbstractTestLanguage">
+ id="org.eclipse.xtext.ui.common.editor.contentassist.impl.ui.keyword_TwoContextsTestLanguage"
+ label="TwoContextsTestLanguage">
</keyword>
<keyword
- id="org.eclipse.xtext.grammarinheritance.AbstractTestLanguage.tasktags"
+ id="org.eclipse.xtext.ui.common.editor.contentassist.impl.TwoContextsTestLanguage.tasktags"
label="Task Tags">
</keyword>
</extension>
+
+
<extension point="org.eclipse.emf.ecore.generated_package">
<package
@@ -136,19 +189,6 @@
</extension>
- <extension
- point="org.eclipse.xtend.typesystem.emf.checks">
- <metaModel
- nsURI="http://www.eclipse.org/2009/tmf/xtext/KeywordsTestLanguage">
- <checkFile
- path="org/eclipse/xtext/parser/keywords/KeywordsTestLanguageChecks.chk">
- </checkFile>
- </metaModel>
-
- </extension>
-
-
-
<!-- adding resource factories -->
<extension
@@ -160,8 +200,7 @@
</extension>
-
- <extension
+ <extension
point="org.eclipse.ui.editors">
<editor
class="org.eclipse.xtext.parser.keywords.KeywordsTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.XtextEditor"
@@ -172,7 +211,31 @@
name="KeywordsTestLanguage Editor">
</editor>
</extension>
- <extension
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.parser.keywords.KeywordsTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.parser.keywords.KeywordsTestLanguage.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.parser.keywords.KeywordsTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.parser.keywords.KeywordsTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
point="org.eclipse.ui.preferencePages">
<page
class="org.eclipse.xtext.parser.keywords.KeywordsTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.LanguageRootPreferencePage"
@@ -203,6 +266,7 @@
label="Task Tags">
</keyword>
</extension>
+
<extension point="org.eclipse.emf.ecore.generated_package">
<package
@@ -213,19 +277,6 @@
</extension>
- <extension
- point="org.eclipse.xtend.typesystem.emf.checks">
- <metaModel
- nsURI="http://www.eclipse.org/2008/xtext/tests/ContentAssist">
- <checkFile
- path="org/eclipse/xtext/testlanguages/ContentAssistTestLanguageChecks.chk">
- </checkFile>
- </metaModel>
-
- </extension>
-
-
-
<!-- adding resource factories -->
<extension
@@ -237,8 +288,7 @@
</extension>
-
- <extension
+ <extension
point="org.eclipse.ui.editors">
<editor
class="org.eclipse.xtext.testlanguages.ContentAssistTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.XtextEditor"
@@ -249,7 +299,31 @@
name="ContentAssistTestLanguage Editor">
</editor>
</extension>
- <extension
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.testlanguages.ContentAssistTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.testlanguages.ContentAssistTestLanguage.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.testlanguages.ContentAssistTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.testlanguages.ContentAssistTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
point="org.eclipse.ui.preferencePages">
<page
class="org.eclipse.xtext.testlanguages.ContentAssistTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.LanguageRootPreferencePage"
@@ -280,6 +354,7 @@
label="Task Tags">
</keyword>
</extension>
+
<extension point="org.eclipse.emf.ecore.generated_package">
<package
@@ -290,19 +365,6 @@
</extension>
- <extension
- point="org.eclipse.xtend.typesystem.emf.checks">
- <metaModel
- nsURI="http://eclipse.org/xtext/reference/ReferenceGrammar">
- <checkFile
- path="org/eclipse/xtext/testlanguages/ReferenceGrammarChecks.chk">
- </checkFile>
- </metaModel>
-
- </extension>
-
-
-
<!-- adding resource factories -->
<extension
@@ -314,8 +376,7 @@
</extension>
-
- <extension
+ <extension
point="org.eclipse.ui.editors">
<editor
class="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.XtextEditor"
@@ -326,7 +387,31 @@
name="ReferenceGrammarTestLanguage Editor">
</editor>
</extension>
- <extension
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguage.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
point="org.eclipse.ui.preferencePages">
<page
class="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.LanguageRootPreferencePage"
@@ -357,6 +442,7 @@
label="Task Tags">
</keyword>
</extension>
+
<extension point="org.eclipse.emf.ecore.generated_package">
<package
@@ -378,8 +464,7 @@
</extension>
-
- <extension
+ <extension
point="org.eclipse.ui.editors">
<editor
class="org.eclipse.xtext.testlanguages.TreeTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.XtextEditor"
@@ -390,7 +475,31 @@
name="TreeTestLanguage Editor">
</editor>
</extension>
- <extension
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.testlanguages.TreeTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.testlanguages.TreeTestLanguage.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.testlanguages.TreeTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.testlanguages.TreeTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
point="org.eclipse.ui.preferencePages">
<page
class="org.eclipse.xtext.testlanguages.TreeTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.LanguageRootPreferencePage"
@@ -421,5 +530,94 @@
label="Task Tags">
</keyword>
</extension>
+
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http://www.eclipse.org/2009/tmf/xtext/EnumRulesTest"
+ class = "org.eclipse.xtext.enumrules.enumRulesTestLanguage.EnumRulesTestLanguagePackage"
+ genModel = "org/eclipse/xtext/enumrules/EnumRulesTestLanguage.genmodel" />
+
+ </extension>
+
+
+<!-- adding resource factories -->
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ class="org.eclipse.xtext.enumrules.EnumRulesTestLanguageExecutableExtensionFactory:org.eclipse.xtext.resource.XtextResourceFactory"
+ type="enumrulestestlanguage">
+ </parser>
+ </extension>
+
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.xtext.enumrules.EnumRulesTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.XtextEditor"
+ contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
+ default="true"
+ extensions="enumrulestestlanguage"
+ id="org.eclipse.xtext.enumrules.EnumRulesTestLanguage"
+ name="EnumRulesTestLanguage Editor">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.enumrules.EnumRulesTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.enumrules.EnumRulesTestLanguage.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.enumrules.EnumRulesTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.enumrules.EnumRulesTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.eclipse.xtext.enumrules.EnumRulesTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.xtext.enumrules.EnumRulesTestLanguage"
+ name="EnumRulesTestLanguage">
+ <keywordReference
+ id="org.eclipse.xtext.enumrules.ui.keyword_EnumRulesTestLanguage">
+ </keywordReference>
+ </page>
+ <page
+ category="org.eclipse.xtext.enumrules.EnumRulesTestLanguage"
+ class="org.eclipse.xtext.enumrules.EnumRulesTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.EditorPreferencePage"
+ id="org.eclipse.xtext.enumrules.EnumRulesTestLanguage.editor"
+ name="Editor">
+ <keywordReference
+ id="org.eclipse.xtext.keyword.editor">
+ </keywordReference>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.keywords">
+ <keyword
+ id="org.eclipse.xtext.enumrules.ui.keyword_EnumRulesTestLanguage"
+ label="EnumRulesTestLanguage">
+ </keyword>
+ <keyword
+ id="org.eclipse.xtext.enumrules.EnumRulesTestLanguage.tasktags"
+ label="Task Tags">
+ </keyword>
+ </extension>
+
</plugin>
diff --git a/tests/org.eclipse.xtext.ui.common.tests/plugin.xml_gen b/tests/org.eclipse.xtext.ui.common.tests/plugin.xml_gen
index 793ca2b..678b3b4 100644
--- a/tests/org.eclipse.xtext.ui.common.tests/plugin.xml_gen
+++ b/tests/org.eclipse.xtext.ui.common.tests/plugin.xml_gen
@@ -41,12 +41,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.XtextGrammarTestLanguage.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.XtextGrammarTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.XtextGrammarTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
@@ -118,12 +129,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.ui.common.editor.contentassist.impl.TwoContextsTestLanguage.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.ui.common.editor.contentassist.impl.TwoContextsTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.ui.common.editor.contentassist.impl.TwoContextsTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
@@ -196,12 +218,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.parser.keywords.KeywordsTestLanguage.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.parser.keywords.KeywordsTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.parser.keywords.KeywordsTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
@@ -273,12 +306,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.testlanguages.ContentAssistTestLanguage.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.testlanguages.ContentAssistTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.testlanguages.ContentAssistTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
@@ -350,12 +394,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguage.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
@@ -427,12 +482,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.testlanguages.TreeTestLanguage.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.testlanguages.TreeTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.testlanguages.TreeTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
@@ -504,12 +570,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.enumrules.EnumRulesTestLanguage.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.enumrules.EnumRulesTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.enumrules.EnumRulesTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
diff --git a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
index c7588c8..c39f11c 100644
--- a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
+++ b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
@@ -17,34 +17,34 @@ extension org::eclipse::xtend::util::stdlib::io;
*/
-List[IScopedElement] scope_usedGrammars(Grammar this):
- allElements().typeSelect(Grammar).collect(x | createScopedElement(x.referenceName(), x));
-
-List[IScopedElement] scope_usedGrammars(emf::EObject this) :
- allElements().collect(x | createScopedElement(x.referenceName(), x));
-
List[IScopedElement] scope_hiddenTokens(Grammar this):
allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_hiddenTokens(ParserRule this):
- allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_ePackage(AbstractMetamodelDeclaration this):
+ allElements().typeSelect(ecore::EPackage).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
+List[IScopedElement] scope_ePackage(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_rule(RuleCall this):
- allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_classifier(TypeRef this):
+ allElements().typeSelect(ecore::EClassifier).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_rule(emf::EObject this) :
+List[IScopedElement] scope_classifier(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_ePackage(AbstractMetamodelDeclaration this):
- allElements().typeSelect(ecore::EPackage).collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_usedGrammars(Grammar this):
+ allElements().typeSelect(Grammar).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_ePackage(emf::EObject this) :
+List[IScopedElement] scope_usedGrammars(emf::EObject this) :
+ allElements().collect(x | createScopedElement(x.referenceName(), x));
+
+List[IScopedElement] scope_rule(RuleCall this):
+ allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
+
+List[IScopedElement] scope_rule(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
List[IScopedElement] scope_metamodel(TypeRef this):
@@ -53,9 +53,9 @@ List[IScopedElement] scope_metamodel(TypeRef this):
List[IScopedElement] scope_metamodel(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_classifier(TypeRef this):
- allElements().typeSelect(ecore::EClassifier).collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_hiddenTokens(ParserRule this):
+ allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_classifier(emf::EObject this) :
+List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
diff --git a/tests/org.eclipse.xtext.ui.integration.tests/plugin.xml b/tests/org.eclipse.xtext.ui.integration.tests/plugin.xml
index 52eaed6..1a5da00 100644
--- a/tests/org.eclipse.xtext.ui.integration.tests/plugin.xml
+++ b/tests/org.eclipse.xtext.ui.integration.tests/plugin.xml
@@ -12,19 +12,6 @@
</extension>
- <extension
- point="org.eclipse.xtend.typesystem.emf.checks">
- <metaModel
- nsURI="http://foo">
- <checkFile
- path="org/eclipse/xtext/ui/integration/FooChecks.chk">
- </checkFile>
- </metaModel>
-
- </extension>
-
-
-
<!-- adding resource factories -->
<extension
@@ -36,8 +23,7 @@
</extension>
-
- <extension
+ <extension
point="org.eclipse.ui.editors">
<editor
class="org.eclipse.xtext.ui.integration.TestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.XtextEditor"
@@ -48,7 +34,31 @@
name="TestLanguage Editor">
</editor>
</extension>
- <extension
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.ui.integration.TestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.ui.integration.TestLanguage.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.ui.integration.TestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.ui.integration.TestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
point="org.eclipse.ui.preferencePages">
<page
class="org.eclipse.xtext.ui.integration.TestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.LanguageRootPreferencePage"
@@ -79,5 +89,6 @@
label="Task Tags">
</keyword>
</extension>
+
</plugin>
diff --git a/tests/org.eclipse.xtext.ui.integration.tests/plugin.xml_gen b/tests/org.eclipse.xtext.ui.integration.tests/plugin.xml_gen
index a8233f7..1a5da00 100644
--- a/tests/org.eclipse.xtext.ui.integration.tests/plugin.xml_gen
+++ b/tests/org.eclipse.xtext.ui.integration.tests/plugin.xml_gen
@@ -41,12 +41,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.ui.integration.TestLanguage.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.ui.integration.TestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.ui.integration.TestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
diff --git a/tests/org.eclipse.xtext.xtend.tests/plugin.xml b/tests/org.eclipse.xtext.xtend.tests/plugin.xml
index e1df604..f2d19be 100644
--- a/tests/org.eclipse.xtext.xtend.tests/plugin.xml
+++ b/tests/org.eclipse.xtext.xtend.tests/plugin.xml
@@ -12,19 +12,6 @@
</extension>
- <extension
- point="org.eclipse.xtend.typesystem.emf.checks">
- <metaModel
- nsURI="http://www.eclipse.org/2008/Test/XtextTest">
- <checkFile
- path="org/eclipse/xtext/XtextTestChecks.chk">
- </checkFile>
- </metaModel>
-
- </extension>
-
-
-
<!-- adding resource factories -->
<extension
@@ -36,19 +23,42 @@
</extension>
-
- <extension
+ <extension
point="org.eclipse.ui.editors">
<editor
class="org.eclipse.xtext.XtextGrammarTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.XtextEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
- extensions=""
+ extensions="xtextgrammartestlanguage"
id="org.eclipse.xtext.XtextGrammarTestLanguage"
name="XtextGrammarTestLanguage Editor">
</editor>
</extension>
- <extension
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.XtextGrammarTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.XtextGrammarTestLanguage.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.XtextGrammarTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.XtextGrammarTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
point="org.eclipse.ui.preferencePages">
<page
class="org.eclipse.xtext.XtextGrammarTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.LanguageRootPreferencePage"
@@ -79,6 +89,7 @@
label="Task Tags">
</keyword>
</extension>
+
<extension point="org.eclipse.emf.ecore.generated_package">
<package
@@ -89,19 +100,6 @@
</extension>
- <extension
- point="org.eclipse.xtend.typesystem.emf.checks">
- <metaModel
- nsURI="http://www.eclipse.org/2009/tmf/xtext/KeywordsTestLanguage">
- <checkFile
- path="org/eclipse/xtext/parser/keywords/KeywordsTestLanguageChecks.chk">
- </checkFile>
- </metaModel>
-
- </extension>
-
-
-
<!-- adding resource factories -->
<extension
@@ -113,19 +111,42 @@
</extension>
-
- <extension
+ <extension
point="org.eclipse.ui.editors">
<editor
class="org.eclipse.xtext.parser.keywords.KeywordsTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.XtextEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
- extensions=""
+ extensions="keywordstestlanguage"
id="org.eclipse.xtext.parser.keywords.KeywordsTestLanguage"
name="KeywordsTestLanguage Editor">
</editor>
</extension>
- <extension
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.parser.keywords.KeywordsTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.parser.keywords.KeywordsTestLanguage.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.parser.keywords.KeywordsTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.parser.keywords.KeywordsTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
point="org.eclipse.ui.preferencePages">
<page
class="org.eclipse.xtext.parser.keywords.KeywordsTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.LanguageRootPreferencePage"
@@ -156,6 +177,7 @@
label="Task Tags">
</keyword>
</extension>
+
<extension point="org.eclipse.emf.ecore.generated_package">
<package
@@ -166,19 +188,6 @@
</extension>
- <extension
- point="org.eclipse.xtend.typesystem.emf.checks">
- <metaModel
- nsURI="http://www.eclipse.org/2008/xtext/tests/ContentAssist">
- <checkFile
- path="org/eclipse/xtext/testlanguages/ContentAssistTestLanguageChecks.chk">
- </checkFile>
- </metaModel>
-
- </extension>
-
-
-
<!-- adding resource factories -->
<extension
@@ -190,19 +199,42 @@
</extension>
-
- <extension
+ <extension
point="org.eclipse.ui.editors">
<editor
class="org.eclipse.xtext.testlanguages.ContentAssistTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.XtextEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
- extensions=""
+ extensions="contentassisttestlanguage"
id="org.eclipse.xtext.testlanguages.ContentAssistTestLanguage"
name="ContentAssistTestLanguage Editor">
</editor>
</extension>
- <extension
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.testlanguages.ContentAssistTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.testlanguages.ContentAssistTestLanguage.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.testlanguages.ContentAssistTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.testlanguages.ContentAssistTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
point="org.eclipse.ui.preferencePages">
<page
class="org.eclipse.xtext.testlanguages.ContentAssistTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.LanguageRootPreferencePage"
@@ -233,6 +265,7 @@
label="Task Tags">
</keyword>
</extension>
+
<extension point="org.eclipse.emf.ecore.generated_package">
<package
@@ -243,19 +276,6 @@
</extension>
- <extension
- point="org.eclipse.xtend.typesystem.emf.checks">
- <metaModel
- nsURI="http://eclipse.org/xtext/reference/ReferenceGrammar">
- <checkFile
- path="org/eclipse/xtext/testlanguages/ReferenceGrammarChecks.chk">
- </checkFile>
- </metaModel>
-
- </extension>
-
-
-
<!-- adding resource factories -->
<extension
@@ -267,19 +287,42 @@
</extension>
-
- <extension
+ <extension
point="org.eclipse.ui.editors">
<editor
class="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.XtextEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
- extensions=""
+ extensions="referencegrammartestlanguage"
id="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguage"
name="ReferenceGrammarTestLanguage Editor">
</editor>
</extension>
- <extension
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguage.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
point="org.eclipse.ui.preferencePages">
<page
class="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.LanguageRootPreferencePage"
@@ -310,6 +353,7 @@
label="Task Tags">
</keyword>
</extension>
+
<extension point="org.eclipse.emf.ecore.generated_package">
<package
@@ -319,6 +363,7 @@
</extension>
+
<!-- adding resource factories -->
<extension
@@ -330,19 +375,42 @@
</extension>
-
- <extension
+ <extension
point="org.eclipse.ui.editors">
<editor
class="org.eclipse.xtext.testlanguages.TreeTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.XtextEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
- extensions=""
+ extensions="treetestlanguage"
id="org.eclipse.xtext.testlanguages.TreeTestLanguage"
name="TreeTestLanguage Editor">
</editor>
</extension>
- <extension
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.testlanguages.TreeTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.testlanguages.TreeTestLanguage.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.testlanguages.TreeTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.testlanguages.TreeTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
point="org.eclipse.ui.preferencePages">
<page
class="org.eclipse.xtext.testlanguages.TreeTestLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.core.editor.preferences.LanguageRootPreferencePage"
@@ -373,5 +441,6 @@
label="Task Tags">
</keyword>
</extension>
+
</plugin>
diff --git a/tests/org.eclipse.xtext.xtend.tests/plugin.xml_gen b/tests/org.eclipse.xtext.xtend.tests/plugin.xml_gen
index c9cf4a7..f2d19be 100644
--- a/tests/org.eclipse.xtext.xtend.tests/plugin.xml_gen
+++ b/tests/org.eclipse.xtext.xtend.tests/plugin.xml_gen
@@ -41,12 +41,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.XtextGrammarTestLanguage.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.XtextGrammarTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.XtextGrammarTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
@@ -118,12 +129,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.parser.keywords.KeywordsTestLanguage.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.parser.keywords.KeywordsTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.parser.keywords.KeywordsTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
@@ -195,12 +217,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.testlanguages.ContentAssistTestLanguage.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.testlanguages.ContentAssistTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.testlanguages.ContentAssistTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
@@ -272,12 +305,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguage.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
@@ -349,12 +393,23 @@
commandId="org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
- definitionId="isActiveEditorAnInstanceOfXtextEditor">
+ definitionId="org.eclipse.xtext.testlanguages.TreeTestLanguage.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
-
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.testlanguages.TreeTestLanguage.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.core.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.testlanguages.TreeTestLanguage"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
diff --git a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
index ad0a9a1..7dba3db 100644
--- a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
+++ b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
@@ -17,22 +17,10 @@ extension org::eclipse::xtend::util::stdlib::io;
*/
-List[IScopedElement] scope_metamodel(TypeRef this):
- allElements().typeSelect(AbstractMetamodelDeclaration).collect(x | createScopedElement(x.referenceName(), x));
-
-List[IScopedElement] scope_metamodel(emf::EObject this) :
- allElements().collect(x | createScopedElement(x.referenceName(), x));
-
-List[IScopedElement] scope_hiddenTokens(ParserRule this):
- allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
-
-List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
- allElements().collect(x | createScopedElement(x.referenceName(), x));
-
-List[IScopedElement] scope_usedGrammars(Grammar this):
- allElements().typeSelect(Grammar).collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_classifier(TypeRef this):
+ allElements().typeSelect(ecore::EClassifier).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_usedGrammars(emf::EObject this) :
+List[IScopedElement] scope_classifier(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
List[IScopedElement] scope_rule(RuleCall this):
@@ -47,10 +35,16 @@ List[IScopedElement] scope_ePackage(AbstractMetamodelDeclaration this):
List[IScopedElement] scope_ePackage(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_classifier(TypeRef this):
- allElements().typeSelect(ecore::EClassifier).collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_usedGrammars(Grammar this):
+ allElements().typeSelect(Grammar).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_classifier(emf::EObject this) :
+List[IScopedElement] scope_usedGrammars(emf::EObject this) :
+ allElements().collect(x | createScopedElement(x.referenceName(), x));
+
+List[IScopedElement] scope_metamodel(TypeRef this):
+ allElements().typeSelect(AbstractMetamodelDeclaration).collect(x | createScopedElement(x.referenceName(), x));
+
+List[IScopedElement] scope_metamodel(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
List[IScopedElement] scope_hiddenTokens(Grammar this):
@@ -59,3 +53,9 @@ List[IScopedElement] scope_hiddenTokens(Grammar this):
List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_hiddenTokens(ParserRule this):
+ allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
+
+List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
+ allElements().collect(x | createScopedElement(x.referenceName(), x));
+
diff --git a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
index 485886c..e112e8f 100644
--- a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
+++ b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
@@ -16,6 +16,12 @@ extension org::eclipse::xtend::util::stdlib::io;
*/
+List[IScopedElement] scope_kinder(Familie this):
+ allElements().typeSelect(Kind).collect(x | createScopedElement(x.referenceName(), x));
+
+List[IScopedElement] scope_kinder(emf::EObject this) :
+ allElements().collect(x | createScopedElement(x.referenceName(), x));
+
List[IScopedElement] scope_mutter(Familie this):
allElements().typeSelect(Erwachsener).collect(x | createScopedElement(x.referenceName(), x));
@@ -28,9 +34,3 @@ List[IScopedElement] scope_vater(Familie this):
List[IScopedElement] scope_vater(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_kinder(Familie this):
- allElements().typeSelect(Kind).collect(x | createScopedElement(x.referenceName(), x));
-
-List[IScopedElement] scope_kinder(emf::EObject this) :
- allElements().collect(x | createScopedElement(x.referenceName(), x));
-