Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[#22] build against xtext 2.14 / Oxygen 3a
regen against xtext 2.14
fixed tests by moving to xtext.tests

Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
  • Loading branch information
cdietrich committed Oct 9, 2018
1 parent c0bcc31 commit 1857d17
Show file tree
Hide file tree
Showing 25 changed files with 446 additions and 156 deletions.
Expand Up @@ -11,11 +11,14 @@
<unit id="org.eclipse.xpand" version="0.0.0"/>
<unit id="org.eclipse.xtend" version="0.0.0"/>
<unit id="org.eclipse.xtend.typesystem.emf" version="0.0.0"/>
<repository location="http://download.eclipse.org/releases/mars/201506241002/"/>
<repository location="http://download.eclipse.org/releases/2018-09"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="false" type="InstallableUnit">
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
<repository location="http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.9.2/"/>
<unit id="org.eclipse.xtext.testing" version="0.0.0"/>
<unit id="org.eclipse.xtext.ui.testing" version="0.0.0"/>
<unit id="org.eclipse.xtext.junit4" version="0.0.0"/>
<repository location="http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.15.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="false" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="0.0.0"/>
Expand Down
Expand Up @@ -7,7 +7,7 @@
<unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
<unit id="org.eclipse.pde.feature.group" version="0.0.0"/>
<unit id="org.eclipse.draw2d.feature.group" version="0.0.0"/>
<repository location="http://download.eclipse.org/releases/luna/201502271000/"/>
<repository location="http://download.eclipse.org/releases/oxygen/201804111000"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="false" type="InstallableUnit">
<unit id="org.eclipse.emf.sdk.feature.group" version="0.0.0"/>
Expand All @@ -16,7 +16,9 @@
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="false" type="InstallableUnit">
<unit id="org.eclipse.xtext.ui.feature.group" version="0.0.0"/>
<unit id="org.eclipse.xtext.junit4" version="0.0.0"/>
<repository location="http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.10.0/"/>
<unit id="org.eclipse.xtext.testing" version="0.0.0"/>
<unit id="org.eclipse.xtext.ui.testing" version="0.0.0"/>
<repository location="http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.14.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="false" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="0.0.0"/>
Expand All @@ -26,7 +28,7 @@
<unit id="org.eclipse.xpand" version="0.0.0"/>
<unit id="org.eclipse.xtend" version="0.0.0"/>
<unit id="org.eclipse.xtend.typesystem.emf" version="0.0.0"/>
<repository location="http://download.eclipse.org/modeling/m2t/xpand/updates/releases/R201406030414/"/>
<repository location="http://download.eclipse.org/modeling/m2t/xpand/updates/releases/R201605260315"/>
</location>
<location includeAllPlatforms="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.junit" version="0.0.0"/>
Expand Down
Expand Up @@ -167,6 +167,11 @@ public Class<? extends org.eclipse.compare.IViewerCreator> bindIViewerCreator()
return org.eclipse.xtext.ui.compare.DefaultViewerCreator.class;
}

// contributed by org.eclipse.xtext.ui.generator.compare.CompareFragment
public void configureCompareViewerTitle(com.google.inject.Binder binder) {
binder.bind(String.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.UIBindings.COMPARE_VIEWER_TITLE)).toInstance("Mwe2 Compare");
}

// contributed by org.eclipse.xtext.ui.generator.templates.CodetemplatesGeneratorFragment
public com.google.inject.Provider<org.eclipse.xtext.ui.codetemplates.ui.preferences.TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
return org.eclipse.xtext.ui.codetemplates.ui.AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
Expand Down
67 changes: 34 additions & 33 deletions plugins/org.eclipse.emf.mwe2.language/META-INF/MANIFEST.MF
@@ -1,33 +1,34 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Modeling Workflow Engine 2 Language
Bundle-Vendor: Eclipse Xtext
Bundle-Version: 2.9.2.qualifier
Bundle-SymbolicName: org.eclipse.emf.mwe2.language;singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.emf.ecore,
org.eclipse.emf.common,
org.eclipse.emf.mwe2.runtime;bundle-version="2.9.2",
org.objectweb.asm;bundle-version="[5.0.1,7.0.0)";resolution:=optional,
org.eclipse.equinox.common;bundle-version="3.6.0",
com.google.inject;bundle-version="3.0.0",
org.eclipse.xtext;bundle-version="2.8.0",
org.eclipse.xtext.common.types;bundle-version="2.8.0";visibility:=reexport
Import-Package: org.apache.log4j;version="1.2.15"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.eclipse.emf.mwe2.language,
org.eclipse.emf.mwe2.language.factory,
org.eclipse.emf.mwe2.language.formatting,
org.eclipse.emf.mwe2.language.mwe2,
org.eclipse.emf.mwe2.language.mwe2.impl,
org.eclipse.emf.mwe2.language.mwe2.util,
org.eclipse.emf.mwe2.language.parser.antlr,
org.eclipse.emf.mwe2.language.parser.antlr.internal,
org.eclipse.emf.mwe2.language.parser.antlr.lexer,
org.eclipse.emf.mwe2.language.resource,
org.eclipse.emf.mwe2.language.scoping,
org.eclipse.emf.mwe2.language.serializer,
org.eclipse.emf.mwe2.language.services,
org.eclipse.emf.mwe2.language.validation
Automatic-Module-Name: org.eclipse.emf.mwe2.language

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Modeling Workflow Engine 2 Language
Bundle-Vendor: Eclipse Xtext
Bundle-Version: 2.9.2.qualifier
Bundle-SymbolicName: org.eclipse.emf.mwe2.language;singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.emf.ecore,
org.eclipse.emf.common,
org.eclipse.emf.mwe2.runtime;bundle-version="2.9.2",
org.objectweb.asm;bundle-version="[5.0.1,7.0.0)";resolution:=optional,
org.eclipse.equinox.common;bundle-version="3.6.0",
com.google.inject;bundle-version="3.0.0",
org.eclipse.xtext;bundle-version="2.14.0",
org.eclipse.xtext.common.types;bundle-version="2.14.0";visibility:=reexport,
org.eclipse.xtext.util,
org.antlr.runtime
Import-Package: org.apache.log4j;version="1.2.15"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.eclipse.emf.mwe2.language,
org.eclipse.emf.mwe2.language.factory,
org.eclipse.emf.mwe2.language.formatting,
org.eclipse.emf.mwe2.language.mwe2,
org.eclipse.emf.mwe2.language.mwe2.impl,
org.eclipse.emf.mwe2.language.mwe2.util,
org.eclipse.emf.mwe2.language.parser.antlr,
org.eclipse.emf.mwe2.language.parser.antlr.internal,
org.eclipse.emf.mwe2.language.parser.antlr.lexer,
org.eclipse.emf.mwe2.language.resource,
org.eclipse.emf.mwe2.language.scoping,
org.eclipse.emf.mwe2.language.serializer,
org.eclipse.emf.mwe2.language.services,
org.eclipse.emf.mwe2.language.validation
Automatic-Module-Name: org.eclipse.emf.mwe2.language
Expand Up @@ -186,7 +186,9 @@ public static void main(String[] args) {

addFragment(new CodetemplatesGeneratorFragment());

addFragment(new Junit4Fragment());
Junit4Fragment junit4Fragment = new Junit4Fragment();
junit4Fragment.setUseDeprecatedClasses(false);
addFragment(junit4Fragment);
}
});
}
Expand Down
Binary file not shown.
Expand Up @@ -12,7 +12,6 @@
import org.eclipse.emf.mwe2.language.mwe2.Component;
import org.eclipse.emf.mwe2.language.mwe2.DeclaredProperty;
import org.eclipse.emf.mwe2.language.mwe2.Import;
import org.eclipse.emf.mwe2.language.mwe2.Module;
import org.eclipse.emf.mwe2.language.mwe2.Mwe2Package;
import org.eclipse.emf.mwe2.language.mwe2.PlainString;
import org.eclipse.emf.mwe2.language.mwe2.PropertyReference;
Expand Down Expand Up @@ -65,7 +64,7 @@ else if (rule == grammarAccess.getRootComponentRule()) {
sequence_Import(context, (Import) semanticObject);
return;
case Mwe2Package.MODULE:
sequence_Module(context, (Module) semanticObject);
sequence_Module(context, (org.eclipse.emf.mwe2.language.mwe2.Module) semanticObject);
return;
case Mwe2Package.PLAIN_STRING:
sequence_PlainString(context, (PlainString) semanticObject);
Expand Down Expand Up @@ -99,7 +98,7 @@ protected void sequence_Assignment(ISerializationContext context, Assignment sem
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Mwe2Package.Literals.ASSIGNMENT__VALUE));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getAssignmentAccess().getFeatureJvmIdentifiableElementFQNParserRuleCall_0_0_1(), semanticObject.getFeature());
feeder.accept(grammarAccess.getAssignmentAccess().getFeatureJvmIdentifiableElementFQNParserRuleCall_0_0_1(), semanticObject.eGet(Mwe2Package.Literals.ASSIGNMENT__FEATURE, false));
feeder.accept(grammarAccess.getAssignmentAccess().getValueValueParserRuleCall_2_0(), semanticObject.getValue());
feeder.finish();
}
Expand Down Expand Up @@ -168,7 +167,7 @@ protected void sequence_Import(ISerializationContext context, Import semanticObj
* Constraint:
* (canonicalName=FQN imports+=Import* declaredProperties+=DeclaredProperty* root=RootComponent)
*/
protected void sequence_Module(ISerializationContext context, Module semanticObject) {
protected void sequence_Module(ISerializationContext context, org.eclipse.emf.mwe2.language.mwe2.Module semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}

Expand Down Expand Up @@ -205,7 +204,7 @@ protected void sequence_PropertyReferenceImpl(ISerializationContext context, Pro
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Mwe2Package.Literals.ABSTRACT_REFERENCE__REFERABLE));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getPropertyReferenceImplAccess().getReferableDeclaredPropertyFQNParserRuleCall_0_1(), semanticObject.getReferable());
feeder.accept(grammarAccess.getPropertyReferenceImplAccess().getReferableDeclaredPropertyFQNParserRuleCall_0_1(), semanticObject.eGet(Mwe2Package.Literals.ABSTRACT_REFERENCE__REFERABLE, false));
feeder.finish();
}

Expand All @@ -224,7 +223,7 @@ protected void sequence_Reference(ISerializationContext context, Reference seman
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Mwe2Package.Literals.ABSTRACT_REFERENCE__REFERABLE));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getReferenceAccess().getReferableReferrableFQNParserRuleCall_0_1(), semanticObject.getReferable());
feeder.accept(grammarAccess.getReferenceAccess().getReferableReferrableFQNParserRuleCall_0_1(), semanticObject.eGet(Mwe2Package.Literals.ABSTRACT_REFERENCE__REFERABLE, false));
feeder.finish();
}

Expand Down
Expand Up @@ -153,7 +153,7 @@ public class RootComponentElements extends AbstractParserRuleElementFinder {
// {Component} (type=[types::JvmType|FQN] | '@' module=[Module|FQN]) (':' name=FQN)? autoInject?='auto-inject'?
// '{'
// assignment+=Assignment*
// '}'
// '}';
@Override public ParserRule getRule() { return rule; }

//{Component} (type=[types::JvmType|FQN] | '@' module=[Module|FQN]) (':' name=FQN)? autoInject?='auto-inject'? '{'
Expand All @@ -163,7 +163,7 @@ public class RootComponentElements extends AbstractParserRuleElementFinder {
//{Component}
public Action getComponentAction_0() { return cComponentAction_0; }

//(type=[types::JvmType|FQN] | '@' module=[Module|FQN])
//type=[types::JvmType|FQN] | '@' module=[Module|FQN]
public Alternatives getAlternatives_1() { return cAlternatives_1; }

//type=[types::JvmType|FQN]
Expand Down Expand Up @@ -444,7 +444,7 @@ public class BooleanLiteralElements extends AbstractParserRuleElementFinder {
//{BooleanLiteral}
public Action getBooleanLiteralAction_0() { return cBooleanLiteralAction_0; }

//(isTrue?='true' | 'false')
//isTrue?='true' | 'false'
public Alternatives getAlternatives_1() { return cAlternatives_1; }

//isTrue?='true'
Expand Down Expand Up @@ -650,7 +650,7 @@ public class PropertyReferenceImplElements extends AbstractParserRuleElementFind
private final RuleCall cReferableDeclaredPropertyFQNParserRuleCall_0_1 = (RuleCall)cReferableDeclaredPropertyCrossReference_0.eContents().get(1);

//PropertyReferenceImpl PropertyReference hidden(WS, ML_COMMENT, SL_COMMENT):
// referable=[DeclaredProperty|FQN]
// referable=[DeclaredProperty|FQN];
@Override public ParserRule getRule() { return rule; }

//referable=[DeclaredProperty|FQN]
Expand Down Expand Up @@ -829,7 +829,7 @@ public ParserRule getDeclaredPropertyRule() {
// {Component} (type=[types::JvmType|FQN] | '@' module=[Module|FQN]) (':' name=FQN)? autoInject?='auto-inject'?
// '{'
// assignment+=Assignment*
// '}'
// '}';
public RootComponentElements getRootComponentAccess() {
return pRootComponent;
}
Expand Down Expand Up @@ -947,7 +947,7 @@ public ParserRule getPropertyReferenceRule() {
}

//PropertyReferenceImpl PropertyReference hidden(WS, ML_COMMENT, SL_COMMENT):
// referable=[DeclaredProperty|FQN]
// referable=[DeclaredProperty|FQN];
public PropertyReferenceImplElements getPropertyReferenceImplAccess() {
return pPropertyReferenceImpl;
}
Expand Down Expand Up @@ -991,7 +991,7 @@ public TerminalRule getIDRule() {
}

//terminal ML_COMMENT:
// '/ *'->'* /';
// '/*'->'*/';
public TerminalRule getML_COMMENTRule() {
return tML_COMMENT;
}
Expand Down
64 changes: 33 additions & 31 deletions tests/org.eclipse.emf.mwe2.language.tests/META-INF/MANIFEST.MF
@@ -1,31 +1,33 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Modeling Workflow Engine 2 Language Tests
Bundle-SymbolicName: org.eclipse.emf.mwe2.language.tests
Bundle-Version: 2.9.2.qualifier
Bundle-Vendor: Eclipse Modeling
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.emf.mwe2.language,
org.eclipse.emf.mwe2.language.ui,
org.eclipse.xtext.junit4,
com.google.inject;bundle-version="3.0.0",
org.eclipse.xtext,
org.eclipse.xtext.common.types,
org.eclipse.emf.mwe2.runtime,
org.eclipse.xtext.ui.shared,
org.eclipse.xtext.ui,
org.eclipse.jdt.core,
org.eclipse.xtext.common.types.ui,
org.objectweb.asm;bundle-version="[5.0.1,7.0.0)";resolution:=optional,
org.eclipse.core.runtime,
org.eclipse.ui.workbench;resolution:=optional
Bundle-ActivationPolicy: lazy
Import-Package: org.junit;version="4.5.0",
org.junit.runner;version="4.5.0",
org.junit.runner.manipulation;version="4.5.0",
org.junit.runner.notification;version="4.5.0",
org.junit.runners;version="4.5.0",
org.junit.runners.model;version="4.5.0",
org.hamcrest.core
Export-Package: org.eclipse.emf.mwe2.language
Automatic-Module-Name: org.eclipse.emf.mwe2.language.tests
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Modeling Workflow Engine 2 Language Tests
Bundle-SymbolicName: org.eclipse.emf.mwe2.language.tests
Bundle-Version: 2.9.2.qualifier
Bundle-Vendor: Eclipse Modeling
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.emf.mwe2.language,
org.eclipse.emf.mwe2.language.ui,
com.google.inject;bundle-version="3.0.0",
org.eclipse.xtext,
org.eclipse.xtext.common.types,
org.eclipse.emf.mwe2.runtime,
org.eclipse.xtext.ui.shared,
org.eclipse.xtext.ui,
org.eclipse.jdt.core,
org.eclipse.xtext.common.types.ui,
org.objectweb.asm;bundle-version="[5.0.1,7.0.0)";resolution:=optional,
org.eclipse.core.runtime,
org.eclipse.ui.workbench;resolution:=optional,
org.eclipse.xtext.xbase.lib,
org.eclipse.xtext.testing,
org.eclipse.xtext.ui.testing
Bundle-ActivationPolicy: lazy
Import-Package: org.junit;version="4.5.0",
org.junit.runner;version="4.5.0",
org.junit.runner.manipulation;version="4.5.0",
org.junit.runner.notification;version="4.5.0",
org.junit.runners;version="4.5.0",
org.junit.runners.model;version="4.5.0",
org.hamcrest.core
Export-Package: org.eclipse.emf.mwe2.language
Automatic-Module-Name: org.eclipse.emf.mwe2.language.tests
Expand Up @@ -5,10 +5,10 @@

import com.google.inject.Guice;
import com.google.inject.Injector;
import org.eclipse.xtext.junit4.GlobalRegistries;
import org.eclipse.xtext.junit4.GlobalRegistries.GlobalStateMemento;
import org.eclipse.xtext.junit4.IInjectorProvider;
import org.eclipse.xtext.junit4.IRegistryConfigurator;
import org.eclipse.xtext.testing.GlobalRegistries;
import org.eclipse.xtext.testing.GlobalRegistries.GlobalStateMemento;
import org.eclipse.xtext.testing.IInjectorProvider;
import org.eclipse.xtext.testing.IRegistryConfigurator;

public class Mwe2InjectorProvider implements IInjectorProvider, IRegistryConfigurator {

Expand Down
Expand Up @@ -3,7 +3,7 @@
*/
package org.eclipse.emf.mwe2.language;

import org.eclipse.xtext.junit4.IInjectorProvider;
import org.eclipse.xtext.testing.IInjectorProvider;

import com.google.inject.Injector;

Expand Down

0 comments on commit 1857d17

Please sign in to comment.