Skip to content

Commit

Permalink
Upgrade to Xtext 2.11.
Browse files Browse the repository at this point in the history
close #562

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Feb 6, 2017
1 parent d6b98cb commit ccb463c
Show file tree
Hide file tree
Showing 86 changed files with 662 additions and 701 deletions.
18 changes: 8 additions & 10 deletions eclipse-products/io.sarl.lang.updatesite/io.sarl.lang.product
Expand Up @@ -258,33 +258,33 @@
</plugins>

<features>
<feature id="io.sarl.compiler" version="0.5.0.qualifier"/>
<feature id="io.sarl.ide" version="0.5.0.qualifier"/>
<feature id="io.sarl.lib" version="0.5.0.qualifier"/>
<feature id="io.sarl.baseplatform" version="0.5.0.qualifier"/>
<feature id="io.sarl.examples.feature" version="0.5.0.qualifier"/>
<feature id="io.janusproject.feature" version="0.5.0.qualifier"/>
<feature id="io.sarl.examples.feature" version="0.5.0.qualifier"/>
<feature id="org.eclipse.ecf.filetransfer.httpclient4.feature"/>
<feature id="org.jboss.tools.m2e.jdt.feature"/>
<feature id="org.eclipse.help"/>
<feature id="io.sarl.lib"/>
<feature id="org.jboss.tools.m2e.jdt.feature"/>
<feature id="org.eclipse.xtext.redist"/>
<feature id="org.eclipse.ecf.filetransfer.httpclient4.ssl.feature"/>
<feature id="org.eclipse.xtext.xbase.lib"/>
<feature id="org.eclipse.jdt"/>
<feature id="org.eclipse.xtext.xbase.lib"/>
<feature id="org.eclipse.emf.common"/>
<feature id="org.eclipse.equinox.p2.core.feature"/>
<feature id="org.eclipse.wst.xml_core.feature"/>
<feature id="org.eclipse.egit"/>
<feature id="org.eclipse.wst.common_core.feature"/>
<feature id="org.eclipse.xtend.sdk"/>
<feature id="org.eclipse.ecf.core.ssl.feature"/>
<feature id="org.eclipse.xtend.sdk"/>
<feature id="org.eclipse.ecf.filetransfer.ssl.feature"/>
<feature id="org.eclipse.xsd"/>
<feature id="io.sarl.compiler"/>
<feature id="org.eclipse.xtext.runtime"/>
<feature id="org.eclipse.emf.ecore"/>
<feature id="org.eclipse.equinox.p2.user.ui"/>
<feature id="org.eclipse.xtext.xbase"/>
<feature id="org.eclipse.equinox.p2.extras.feature"/>
<feature id="org.eclipse.m2e.feature"/>
<feature id="org.eclipse.xtext.xbase.lib.source"/>
<feature id="org.eclipse.rcp"/>
<feature id="org.eclipse.ecf.core.feature"/>
<feature id="org.eclipse.jgit"/>
Expand All @@ -296,8 +296,6 @@
<feature id="org.eclipse.platform"/>
<feature id="org.eclipse.e4.rcp"/>
<feature id="org.eclipse.wst.common_ui.feature"/>
<feature id="io.sarl.lib.source"/>
<feature id="io.janusproject.feature.source"/>
</features>

<configurations>
Expand Down
51 changes: 51 additions & 0 deletions eclipse-sarl/features/io.sarl.baseplatform/feature.xml
Expand Up @@ -232,6 +232,50 @@
id="org.eclipse.epp.mpc"
version="0.0.0"/>

<includes
id="org.eclipse.platform"
version="0.0.0"/>

<includes
id="org.eclipse.jdt"
version="0.0.0"/>

<includes
id="org.eclipse.xtend.sdk"
version="0.0.0"/>

<includes
id="org.eclipse.xtext.redist"
version="0.0.0"/>

<includes
id="org.eclipse.m2e.feature"
version="0.0.0"/>

<includes
id="org.jboss.tools.m2e.jdt.feature"
version="0.0.0"/>

<includes
id="org.eclipse.jgit"
version="0.0.0"/>

<includes
id="org.eclipse.wst.common_core.feature"
version="0.0.0"/>

<includes
id="org.eclipse.wst.common_ui.feature"
version="0.0.0"/>

<includes
id="org.eclipse.wst.xml_core.feature"
version="0.0.0"/>

<includes
id="org.eclipse.xsd"
version="0.0.0"/>

<requires>
<import plugin="org.eclipse.xtext.ide"/>
<import plugin="org.eclipse.xtext.xbase"/>
Expand Down Expand Up @@ -508,4 +552,11 @@
version="15.0.0.v201403281430"
unpack="false"/>

<plugin
id="aopalliance"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

</feature>
4 changes: 2 additions & 2 deletions eclipse-sarl/plugins/io.sarl.lang.mwe2/GenerateSARL2.mwe2
Expand Up @@ -74,13 +74,13 @@ var fileHeader = "/*
* SARL is an general-purpose agent programming language.
* More details on http://www.sarl.io
*
* Copyright 2014-\${year} the original authors and authors.
* Copyright (C) 2014-\${year} the original authors or authors.
*
* Licensed under the Apache License, Version 2.0 (the \"License\");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an \"AS IS\" BASIS,
Expand Down
90 changes: 46 additions & 44 deletions eclipse-sarl/plugins/io.sarl.lang.ui/META-INF/MANIFEST.MF
@@ -1,44 +1,46 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-Vendor: %Bundle-Vendor
Bundle-Version: 0.5.0.qualifier
Bundle-SymbolicName: io.sarl.lang.ui; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: io.sarl.lang;bundle-version="0.5.0";visibility:=reexport,
org.eclipse.xtext.ui;bundle-version="2.11.0",
org.eclipse.xtext.ui.shared;bundle-version="2.11.0",
org.eclipse.xtext.ui.codetemplates.ui;bundle-version="2.11.0",
org.eclipse.xtext.xbase.ui;bundle-version="2.11.0",
org.eclipse.xtext.builder;bundle-version="2.11.0",
org.eclipse.xtend.ide;bundle-version="2.11.0",
org.eclipse.xtend.core;bundle-version="2.11.0",
org.eclipse.xtext.common.types.ui;bundle-version="2.11.0",
org.apache.log4j;bundle-version="1.2.15",
org.eclipse.jdt.core;bundle-version="3.12.2",
org.eclipse.jdt.ui;bundle-version="3.12.2",
org.eclipse.compare;bundle-version="3.7.0",
org.eclipse.jdt.debug.ui;bundle-version="3.7.201",
org.eclipse.ui;bundle-version="3.108.1",
org.eclipse.ui.editors;bundle-version="3.10.1",
org.arakhne.afc.core.references;bundle-version="14.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Activator: io.sarl.lang.ui.internal.LangActivator
Export-Package: io.sarl.lang.ide.contentassist.antlr,
io.sarl.lang.ide.contentassist.antlr.internal,
io.sarl.lang.ui;x-friends:="io.sarl.lang.ui.tests",
io.sarl.lang.ui.builder,
io.sarl.lang.ui.contentassist,
io.sarl.lang.ui.editor,
io.sarl.lang.ui.highlighting,
io.sarl.lang.ui.images;x-friends:="io.sarl.lang.ui.tests",
io.sarl.lang.ui.internal,
io.sarl.lang.ui.labeling;x-friends:="io.sarl.lang.ui.tests",
io.sarl.lang.ui.outline;x-friends:="io.sarl.lang.ui.tests",
io.sarl.lang.ui.preferences,
io.sarl.lang.ui.quickfix;x-friends:="io.sarl.lang.ui.tests",
io.sarl.lang.ui.quickfix.acceptors;x-friends:="io.sarl.lang.ui.tests",
io.sarl.lang.ui.refactoring.rename,
io.sarl.lang.ui.tasks;x-friends:="io.sarl.lang.ui.tests",
io.sarl.lang.ui.validation;x-friends:="io.sarl.lang.ui.tests"
Import-Package: org.apache.log4j
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-Vendor: %Bundle-Vendor
Bundle-Version: 0.5.0.qualifier
Bundle-SymbolicName: io.sarl.lang.ui; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: io.sarl.lang;bundle-version="0.5.0";visibility:=reexport,
org.eclipse.xtext.ui;bundle-version="2.11.0",
org.eclipse.xtext.ui.shared;bundle-version="2.11.0",
org.eclipse.xtext.ui.codetemplates.ui;bundle-version="2.11.0",
org.eclipse.xtext.xbase.ui;bundle-version="2.11.0",
org.eclipse.xtext.builder;bundle-version="2.11.0",
org.eclipse.xtend.ide;bundle-version="2.11.0",
org.eclipse.xtend.core;bundle-version="2.11.0",
org.eclipse.xtext.common.types.ui;bundle-version="2.11.0",
org.apache.log4j;bundle-version="1.2.15",
org.eclipse.jdt.core;bundle-version="3.12.2",
org.eclipse.jdt.ui;bundle-version="3.12.2",
org.eclipse.compare;bundle-version="3.7.0",
org.eclipse.jdt.debug.ui;bundle-version="3.7.201",
org.eclipse.ui;bundle-version="3.108.1",
org.eclipse.ui.editors;bundle-version="3.10.1",
org.arakhne.afc.core.references;bundle-version="14.0.0",
org.antlr.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Activator: io.sarl.lang.ui.internal.LangActivator
Export-Package: io.sarl.lang.ide,
io.sarl.lang.ide.contentassist.antlr,
io.sarl.lang.ide.contentassist.antlr.internal,
io.sarl.lang.ui;x-friends:="io.sarl.lang.ui.tests",
io.sarl.lang.ui.builder,
io.sarl.lang.ui.contentassist,
io.sarl.lang.ui.editor,
io.sarl.lang.ui.highlighting,
io.sarl.lang.ui.images;x-friends:="io.sarl.lang.ui.tests",
io.sarl.lang.ui.internal,
io.sarl.lang.ui.labeling;x-friends:="io.sarl.lang.ui.tests",
io.sarl.lang.ui.outline;x-friends:="io.sarl.lang.ui.tests",
io.sarl.lang.ui.preferences,
io.sarl.lang.ui.quickfix;x-friends:="io.sarl.lang.ui.tests",
io.sarl.lang.ui.quickfix.acceptors;x-friends:="io.sarl.lang.ui.tests",
io.sarl.lang.ui.refactoring.rename,
io.sarl.lang.ui.tasks;x-friends:="io.sarl.lang.ui.tests",
io.sarl.lang.ui.validation;x-friends:="io.sarl.lang.ui.tests"
Import-Package: org.apache.log4j
@@ -0,0 +1 @@
io.sarl.lang.ide.SARLIdeSetup
@@ -0,0 +1,67 @@
/*
* $Id$
*
* File is automatically generated by the Xtext language generator.
* Do not change it.
*
* SARL is an general-purpose agent programming language.
* More details on http://www.sarl.io
*
* Copyright 2014-2017 the original authors and authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.sarl.lang.ide;

import com.google.inject.Binder;
import com.google.inject.name.Names;
import io.sarl.lang.ide.contentassist.antlr.SARLParser;
import io.sarl.lang.ide.contentassist.antlr.internal.InternalSARLLexer;
import org.eclipse.xtext.ide.LexerIdeBindings;
import org.eclipse.xtext.ide.editor.contentassist.IProposalConflictHelper;
import org.eclipse.xtext.ide.editor.contentassist.antlr.AntlrProposalConflictHelper;
import org.eclipse.xtext.ide.editor.contentassist.antlr.ContentAssistContextFactory;
import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser;
import org.eclipse.xtext.ide.editor.contentassist.antlr.PartialContentAssistContextFactory;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer;
import org.eclipse.xtext.xbase.ide.DefaultXbaseIdeModule;

/**
* Manual modifications go to {@link SARLIdeModule}.
*/
@SuppressWarnings("all")
public abstract class AbstractSARLIdeModule extends DefaultXbaseIdeModule {

// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureContentAssistLexer(Binder binder) {
binder.bind(Lexer.class)
.annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST))
.to(InternalSARLLexer.class);
}

// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IContentAssistParser> bindIContentAssistParser() {
return SARLParser.class;
}

// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IProposalConflictHelper> bindIProposalConflictHelper() {
return AntlrProposalConflictHelper.class;
}

// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends ContentAssistContextFactory> bindContentAssistContextFactory() {
return PartialContentAssistContextFactory.class;
}

}
Expand Up @@ -26,14 +26,10 @@
import com.google.inject.Inject;
import io.sarl.lang.ide.contentassist.antlr.internal.InternalSARLParser;
import io.sarl.lang.services.SARLGrammarAccess;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.antlr.runtime.RecognitionException;
import org.eclipse.xtext.AbstractElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.AbstractPartialContentAssistParser;
import org.eclipse.xtext.ide.editor.contentassist.antlr.FollowElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;

public class SARLParser extends AbstractPartialContentAssistParser {

Expand Down Expand Up @@ -1061,18 +1057,7 @@ protected String getRuleName(AbstractElement element) {
}
return nameMappings.get(element);
}

@Override
protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
try {
InternalSARLParser typedParser = (InternalSARLParser) parser;
typedParser.entryRuleSarlScript();
return typedParser.getFollowElements();
} catch(RecognitionException ex) {
throw new RuntimeException(ex);
}
}


@Override
protected String[] getInitialHiddenTokens() {
return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" };
Expand Down
Expand Up @@ -113,9 +113,7 @@
import org.eclipse.xtext.generator.IContextualOutputConfigurationProvider;
import org.eclipse.xtext.ide.LexerIdeBindings;
import org.eclipse.xtext.ide.editor.bracketmatching.IBracePairProvider;
import org.eclipse.xtext.ide.editor.contentassist.antlr.ContentAssistContextFactory;
import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser;
import org.eclipse.xtext.ide.editor.contentassist.antlr.PartialContentAssistContextFactory;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer;
import org.eclipse.xtext.ide.editor.partialEditing.IPartialEditingContentAssistParser;
import org.eclipse.xtext.ide.editor.syntaxcoloring.ISemanticHighlightingCalculator;
Expand Down Expand Up @@ -219,7 +217,7 @@ public AbstractSARLUiModule(AbstractUIPlugin plugin) {
}

// contributed by org.eclipse.xtext.xtext.generator.ImplicitFragment
public Provider<IAllContainersState> provideIAllContainersState() {
public Provider<? extends IAllContainersState> provideIAllContainersState() {
return Access.getJavaProjectsState();
}

Expand Down Expand Up @@ -274,11 +272,6 @@ public void configureContentAssistLexerProvider(Binder binder) {
binder.bind(InternalSARLLexer.class).toProvider(LexerProvider.create(InternalSARLLexer.class));
}

// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends ContentAssistContextFactory> bindContentAssistContextFactory() {
return PartialContentAssistContextFactory.class;
}

// contributed by org.eclipse.xtext.xtext.generator.formatting.Formatter2Fragment2
public Class<? extends IContentFormatterFactory> bindIContentFormatterFactory() {
return ContentFormatterFactory.class;
Expand Down Expand Up @@ -435,12 +428,12 @@ public Class<? extends IUnresolvedTypeResolver> bindIUnresolvedTypeResolver() {
}

// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
public Provider<TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}

// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
public Provider<LanguageRegistry> provideLanguageRegistry() {
public Provider<? extends LanguageRegistry> provideLanguageRegistry() {
return AccessibleCodetemplatesActivator.getLanguageRegistry();
}

Expand Down

0 comments on commit ccb463c

Please sign in to comment.