From 38d4d014a8b59ffdcfcd832775a7482410680462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Galland?= Date: Sat, 25 Jun 2016 11:22:58 +0200 Subject: [PATCH] [mwe2] Add GNU src-highlite specification generator. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Galland --- README.adoc | 11 ++ external_tools/gnusrchighlite/sarl.lang | 42 ++++++ external_tools/latex/sarl-beamer-listing.sty | 2 +- .../latex/sarl-colorized-listing.sty | 2 +- external_tools/latex/sarl-listing.sty | 2 +- plugins/io.sarl.lang.mwe2/GenerateSARL2.mwe2 | 81 +++++++--- .../io.sarl.lang.mwe2/META-INF/MANIFEST.MF | 6 +- .../GnuSrcHighliteGenerator2.java | 138 ++++++++++++++++++ .../gtk/GtkSourceViewerGenerator2.java | 2 +- .../latex/LaTeXBeamerGenerator2.java | 2 +- .../latex/LaTeXListingsGenerator2.java | 2 +- .../prettify/GooglePrettifyGenerator2.java | 2 +- .../sarl/lang/AbstractSARLRuntimeModule.java | 20 +-- 13 files changed, 272 insertions(+), 40 deletions(-) create mode 100644 external_tools/gnusrchighlite/sarl.lang create mode 100644 plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/gnusrchighlite/GnuSrcHighliteGenerator2.java rename plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/{ => externalspec}/gtk/GtkSourceViewerGenerator2.java (99%) rename plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/{ => externalspec}/latex/LaTeXBeamerGenerator2.java (97%) rename plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/{ => externalspec}/latex/LaTeXListingsGenerator2.java (99%) rename plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/{ => externalspec}/prettify/GooglePrettifyGenerator2.java (99%) diff --git a/README.adoc b/README.adoc index e5a7086aef..f92b83afb1 100644 --- a/README.adoc +++ b/README.adoc @@ -94,6 +94,17 @@ For using this version, you must add the Maven Repository Server of SARL in your ... ``` +=== 3.4 Syntax highlighting with other tools + +Several style specifications are provided for syntax highlighting in third party tools. +Style specifications are provided for: + +* link:./external_tools/prettify/lang-sarl.js[Google Prettify] +* link:./external_tools/gtk/sarl.lang[Gtk source view] (including gedit) +* link:./external_tools/gnusrchighlite/sarl.lang[GNU src-highlite] +* link:./external_tools/latex/sarl-beamer-listing.sty[LaTeX Beamer] +* LaTeX listing: link:./external_tools/latex/sarl-listing.sty[monochrom], link:./external_tools/latex/sarl-colorized-listing.sty[color] + == 4. P2 Repository A P2 repository is set up and accesible at the address: `http://updates.sarl.io`. diff --git a/external_tools/gnusrchighlite/sarl.lang b/external_tools/gnusrchighlite/sarl.lang new file mode 100644 index 0000000000..798740e1e7 --- /dev/null +++ b/external_tools/gnusrchighlite/sarl.lang @@ -0,0 +1,42 @@ +# +# $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-2016 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. +# +include "c_comment.lang" + +include "number.lang" + +string delim "\"" "\"" escape "\\" +string delim "'" "'" escape "\\" +regexp = '/[^ +]*/' +(symbol,regexp) = `(%r)(\{(?:\\\}|#\{[[:alnum:]]+\}|[^}])*\})` + +keyword = "abstract|agent|annotation|as|behavior|boolean|byte|capacity|case|catch|char|class|def|default|dispatch|do|double|else|enum|event|extends|extension|final|finally|fires|float|for|if|implements|import|instanceof|int|interface|long|native|new|on|override|package|private|protected|public|requires|return|short|skill|static|strictfp|super|switch|synchronized|throw|throws|transient|try|typeof|uses|val|var|void|volatile|while|with" + +keyword = "!|!=|!==|#|%|%=|&|&&|(|)|*|**|*/|*=|+|++|+=|,|-|--|-=|->|.|..|...|..<|/|/*|//|/=|:|::|;|<|<>|=|==|===|=>|>|>=|?|?.|?:|@|[|\\|]|^|{|\||\|\||}" + +keyword = "false|it|null|occurrence|this|true" + +include "symbols.lang" + +cbracket = "{|}" diff --git a/external_tools/latex/sarl-beamer-listing.sty b/external_tools/latex/sarl-beamer-listing.sty index 25064ad1bf..bd6346b76d 100644 --- a/external_tools/latex/sarl-beamer-listing.sty +++ b/external_tools/latex/sarl-beamer-listing.sty @@ -22,7 +22,7 @@ % limitations under the License. % \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{sarl-beamer-listing}[2016/06/23] +\ProvidesPackage{sarl-beamer-listing}[2016/06/25] \RequirePackage{algpseudocode} \RequirePackage{listings} \RequirePackage{xspace} diff --git a/external_tools/latex/sarl-colorized-listing.sty b/external_tools/latex/sarl-colorized-listing.sty index de076795ee..21b2c3a9a5 100644 --- a/external_tools/latex/sarl-colorized-listing.sty +++ b/external_tools/latex/sarl-colorized-listing.sty @@ -22,7 +22,7 @@ % limitations under the License. % \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{sarl-colorized-listing}[2016/06/23] +\ProvidesPackage{sarl-colorized-listing}[2016/06/25] \RequirePackage{algpseudocode} \RequirePackage{listings} \RequirePackage{xspace} diff --git a/external_tools/latex/sarl-listing.sty b/external_tools/latex/sarl-listing.sty index 68091e7e15..049b560692 100644 --- a/external_tools/latex/sarl-listing.sty +++ b/external_tools/latex/sarl-listing.sty @@ -22,7 +22,7 @@ % limitations under the License. % \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{sarl-listing}[2016/06/23] +\ProvidesPackage{sarl-listing}[2016/06/25] \RequirePackage{algpseudocode} \RequirePackage{listings} \RequirePackage{xspace} diff --git a/plugins/io.sarl.lang.mwe2/GenerateSARL2.mwe2 b/plugins/io.sarl.lang.mwe2/GenerateSARL2.mwe2 index 9652032d99..468c81d5c8 100644 --- a/plugins/io.sarl.lang.mwe2/GenerateSARL2.mwe2 +++ b/plugins/io.sarl.lang.mwe2/GenerateSARL2.mwe2 @@ -31,9 +31,10 @@ import org.eclipse.xtext.resource.XtextResourceSet import io.sarl.lang.mwe2.* import io.sarl.lang.mwe2.binding.* import io.sarl.lang.mwe2.externalspec.* -import io.sarl.lang.mwe2.prettify.* -import io.sarl.lang.mwe2.latex.* -import io.sarl.lang.mwe2.gtk.* +import io.sarl.lang.mwe2.externalspec.prettify.* +import io.sarl.lang.mwe2.externalspec.latex.* +import io.sarl.lang.mwe2.externalspec.gtk.* +import io.sarl.lang.mwe2.externalspec.gnusrchighlite.* import io.sarl.lang.mwe2.codebuilder.* var rootRootPath = "../.." @@ -50,10 +51,13 @@ var uiProjectPath = "${rootPath}/${uiProjectName}" var testProjectName = "io.sarl.tests.api" var testProjectPath = "${rootRootPath}/tests/${testProjectName}" -var prettifyToolPath = "${rootRootPath}/external_tools/prettify" -var latexToolPath = "${rootRootPath}/external_tools/latex" -var gtkToolPath = "${rootRootPath}/external_tools/gtk" +var externalToolPath = "${rootRootPath}/external_tools" + +var prettifyToolPath = "${externalToolPath}/prettify" +var latexToolPath = "${externalToolPath}/latex" +var gtkToolPath = "${externalToolPath}/gtk" var webjsPath = "${rootRootPath}/maven/io.sarl.maven.docs.generator/src/main/resources/org/jnario/doc/js" +var srchighliteToolPath = "${externalToolPath}/gnusrchighlite" var file.extensions = "sarl" var fileEncoding = "UTF-8" @@ -104,9 +108,14 @@ Workflow { component = DirectoryCleaner { directory = "${gtkToolPath}" } + component = DirectoryCleaner { + directory = "${srchighliteToolPath}" + } component = XtextGenerator auto-inject { + // Generation and configuration module for SARL configuration = SarlGeneratorModule { + // Project configuration project = StandardProjectConfig auto-inject { runtime = auto-inject { enabled = true @@ -132,12 +141,14 @@ Workflow { createEclipseMetaData = true } + // Code configuration code = auto-inject { lineDelimiter = lineDelimiter encoding = fileEncoding fileHeader = fileHeader preferXtendStubs = false } + // EMF Builder configuration codeBuilder = auto-inject { scriptRuleName = "SarlScript" topElementRuleName = "Type" @@ -182,8 +193,8 @@ Workflow { modifier = "val" } } + // Shared configuration between the generators of syntax highlighting formats highlighting = auto-inject { - // Shared configuration between the generators addNativeTypes = true literal = "true" @@ -245,27 +256,32 @@ Workflow { } } + // Generator for SARL language = auto-inject { + // Set of resources resourceSet = XtextResourceSet : resourceSet {} + // SARL depends on the Xtend model referencedResource = "platform:/resource/org.eclipse.xtend.core/model/Xtend.genmodel" + // ID for SARL name = "io.sarl.lang.SARL" + // Pointer to the SARL grammar grammarUri = "platform:/resource/${runtimeProjectName}/src/io/sarl/lang/SARL.xtext" + // Definition of the file extensions for SARL fileExtensions = file.extensions + // Specification of the injection that is used by MWE2 (not by the SARL compiler) guiceModule = SarlLanguageGeneratorModule {} + // Do not generates the Xtend stubs generateXtendStubs = false // Java API to access grammar elements (required by several other fragments) fragment = grammarAccess.GrammarAccessFragment2 auto-inject { } - fragment = serializer.SerializerFragment2 auto-inject { - generateDebugData = false // If true, generates plenty of ".dot" files for analyzing the grammar. - generateStub = false - } - + // Resource factory fragment = resourceFactory.ResourceFactoryFragment2 auto-inject { } + // Lexer fragment = parser.antlr.XtextAntlrGeneratorFragment2 auto-inject { removeBacktrackingGuards = true lookaheadThreshold = '5' @@ -276,65 +292,84 @@ Workflow { } } + // SARL Validator fragment = validation.ValidatorFragment2 auto-inject { generateStub = true inheritImplementation = true composedCheck = "org.eclipse.xtend.core.validation.AnnotationValidation" } + // SARL serializer + fragment = serializer.SerializerFragment2 auto-inject { + generateDebugData = false // If true, generates plenty of ".dot" files for analyzing the grammar. + generateStub = false + } + + // SARL Formatter fragment = formatting.Formatter2Fragment2 auto-inject { generateStub = true } + // Compiler fragment = generator.GeneratorFragment2 auto-inject { } + // Scoping fragment = scoping.ImportNamespacesScopingFragment2 auto-inject { generateStub = true } + // SARL compiler as an Eclipse builder. fragment = builder.BuilderIntegrationFragment2 auto-inject { } + // Quick fixes fragment = ui.quickfix.QuickfixProviderFragment2 auto-inject { generateStub = true inheritImplementation = true } + // Label and icon providers fragment = ui.labeling.LabelProviderFragment2 auto-inject { generateStub = true } + // Outline view fragment = ui.outline.OutlineTreeProviderFragment2 auto-inject { generateStub = true } - fragment = ui.outline.QuickOutlineFragment2 auto-inject { } + // Code comparator fragment = ui.compare.CompareFragment2 auto-inject { } + // Content assist fragment = ui.contentAssist.ContentAssistFragment2 auto-inject { generateStub = true inheritImplementation = false } + // Refactoring fragment = ui.refactoring.RefactorElementNameFragment2 auto-inject { useJdtRefactoring = true } + // Type resolver fragment = types.TypesGeneratorFragment2 auto-inject { } - // generates the required bindings only if the grammar inherits from Xbase + // Generates the required bindings only if the grammar inherits from Xbase fragment = xbase.XbaseGeneratorFragment2 auto-inject { generateXtendInferrer = false } + // Code templates fragment = ui.templates.CodetemplatesGeneratorFragment2 auto-inject { } + // Testing infrastructure fragment = junit.Junit4Fragment2 auto-inject { generateStub = false } @@ -344,25 +379,25 @@ Workflow { generateStub = false } - // generate the Google Prettify style + // Generate the Google Prettify style fragment = GooglePrettifyGenerator2 auto-inject { output = prettifyToolPath output = webjsPath } - // generate the LaTeX Beamer style + // Generate the LaTeX Beamer style fragment = LaTeXBeamerGenerator2 auto-inject { output = latexToolPath } - // generate the LaTeX algorithmic style with colors + // Generate the LaTeX algorithmic style with colors fragment = LaTeXListingsGenerator2 auto-inject { output = latexToolPath basename = "sarl-colorized-listing.sty" } - // generate the LaTeX algorithmic style without colors - fragment = io.sarl.lang.mwe2.latex.LaTeXListingsGenerator2 auto-inject { + // Generate the LaTeX algorithmic style without colors + fragment = LaTeXListingsGenerator2 auto-inject { output = latexToolPath enableColors = false } @@ -372,6 +407,11 @@ Workflow { output = gtkToolPath } + // Generate the GNU src-hightlite style + fragment = GnuSrcHighliteGenerator2 auto-inject { + output = srchighliteToolPath + } + // SARL specific bindings fragment = InjectionFragment2 auto-inject { comment = "Bindings provided by SARL API" @@ -755,13 +795,14 @@ Workflow { } } - // Injection recommender + // Injection recommender for recommending missed injections in the SARL module fragment = InjectionRecommender2 auto-inject { enable = false } } } + // SARL Ecore generator component = org.eclipse.emf.mwe2.ecore.EcoreGenerator auto-inject { resourceSet = resourceSet genModel = "platform:/resource/${runtimeProjectName}/model/SARL.genmodel" diff --git a/plugins/io.sarl.lang.mwe2/META-INF/MANIFEST.MF b/plugins/io.sarl.lang.mwe2/META-INF/MANIFEST.MF index c61d5f0874..9366368591 100644 --- a/plugins/io.sarl.lang.mwe2/META-INF/MANIFEST.MF +++ b/plugins/io.sarl.lang.mwe2/META-INF/MANIFEST.MF @@ -21,6 +21,6 @@ Export-Package: io.sarl.lang.mwe2, io.sarl.lang.mwe2.codebuilder, io.sarl.lang.mwe2.codebuilder.fragments, io.sarl.lang.mwe2.externalspec, - io.sarl.lang.mwe2.gtk, - io.sarl.lang.mwe2.latex, - io.sarl.lang.mwe2.prettify + io.sarl.lang.mwe2.externalspec.gtk, + io.sarl.lang.mwe2.externalspec.latex, + io.sarl.lang.mwe2.externalspec.prettify diff --git a/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/gnusrchighlite/GnuSrcHighliteGenerator2.java b/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/gnusrchighlite/GnuSrcHighliteGenerator2.java new file mode 100644 index 0000000000..1faf628abf --- /dev/null +++ b/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/gnusrchighlite/GnuSrcHighliteGenerator2.java @@ -0,0 +1,138 @@ +/* + * $Id$ + * + * SARL is an general-purpose agent programming language. + * More details on http://www.sarl.io + * + * Copyright (C) 2014-2016 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 + * + * 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.mwe2.externalspec.gnusrchighlite; + +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import com.google.inject.Injector; +import org.eclipse.xtext.generator.IGeneratorFragment; +import org.eclipse.xtext.util.Strings; + +import io.sarl.lang.mwe2.externalspec.AbstractExternalHighlightingFragment2; + +/** + * A {@link IGeneratorFragment} that create the language specification for + * the GNU src-highlite. + * + * @author $Author: sgalland$ + * @version $FullVersion$ + * @mavengroupid $GroupId$ + * @mavenartifactid $ArtifactId$ + */ +public class GnuSrcHighliteGenerator2 extends AbstractExternalHighlightingFragment2 { + + /** The default basename pattern for {@link MessageFormat}. + */ + public static final String BASENAME_PATTERN = "{0}.lang"; //$NON-NLS-1$ + + @Override + public void initialize(Injector injector) { + super.initialize(injector); + setBasenameTemplate(BASENAME_PATTERN); + } + + @Override + public String toString() { + return "GNU src-highlite"; //$NON-NLS-1$ + } + + private static void append(List buffer, String text, Object... parameters) { + if (parameters.length > 0) { + buffer.add(MessageFormat.format(text, parameters)); + } else { + buffer.add(text); + } + } + + private static void nl(List buffer) { + buffer.add(""); //$NON-NLS-1$ + } + + @Override + @SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity"}) + protected void generate(Set literals, Set keywords, Set punctuation, Set ignored) { + StringBuilder punctuationPattern = new StringBuilder(); + for (String punct : punctuation) { + if (punctuationPattern.length() > 0) { + punctuationPattern.append("|"); //$NON-NLS-1$ + } + punctuationPattern.append(punct.replaceAll(Pattern.quote("\\"), //$NON-NLS-1$ + Matcher.quoteReplacement("\\\\")) //$NON-NLS-1$ + .replaceAll(Pattern.quote("|"), Matcher.quoteReplacement("\\|"))); //$NON-NLS-1$ //$NON-NLS-2$ + } + + StringBuilder keywordPattern = new StringBuilder(); + for (String keyword : keywords) { + if (keywordPattern.length() > 0) { + keywordPattern.append("|"); //$NON-NLS-1$ + } + keywordPattern.append(keyword); + } + + StringBuilder literalPattern = new StringBuilder(); + for (String literal : literals) { + if (literalPattern.length() > 0) { + literalPattern.append("|"); //$NON-NLS-1$ + } + literalPattern.append(literal); + } + + List css = new ArrayList<>(); + + String[] header = Strings.emptyIfNull(getCodeConfig().getFileHeader()).split("[\n\r]+"); //$NON-NLS-1$ + for (String headerLine : header) { + headerLine = headerLine.replaceFirst("^\\s*[/]?[*][/]?", "#"); //$NON-NLS-1$//$NON-NLS-2$ + css.add(headerLine); + } + + append(css, "include \"c_comment.lang\""); //$NON-NLS-1$ + nl(css); + append(css, "include \"number.lang\""); //$NON-NLS-1$ + nl(css); + append(css, "string delim \"\\\"\" \"\\\"\" escape \"\\\\\""); //$NON-NLS-1$ + append(css, "string delim \"'\" \"'\" escape \"\\\\\""); //$NON-NLS-1$ + append(css, "regexp = '/[^\n]*/'"); //$NON-NLS-1$ + append(css, "(symbol,regexp) = `(%r)(\\{(?:\\\\\\}|#\\{[[:alnum:]]+\\}|[^}])*\\})`"); //$NON-NLS-1$ + nl(css); + append(css, "keyword = \"{0}\"", keywordPattern); //$NON-NLS-1$ + nl(css); + append(css, "keyword = \"{0}\"", punctuationPattern); //$NON-NLS-1$ + nl(css); + append(css, "keyword = \"{0}\"", literalPattern); //$NON-NLS-1$ + nl(css); + append(css, "include \"symbols.lang\""); //$NON-NLS-1$ + nl(css); + append(css, "cbracket = \"{|}\""); //$NON-NLS-1$ + + String language = getLanguageSimpleName().toLowerCase(); + String basename = getBasename( + MessageFormat.format(getBasenameTemplate(), language)); + writeFile(basename, css); + } + +} + diff --git a/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/gtk/GtkSourceViewerGenerator2.java b/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/gtk/GtkSourceViewerGenerator2.java similarity index 99% rename from plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/gtk/GtkSourceViewerGenerator2.java rename to plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/gtk/GtkSourceViewerGenerator2.java index 2449f28ee7..787f030446 100644 --- a/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/gtk/GtkSourceViewerGenerator2.java +++ b/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/gtk/GtkSourceViewerGenerator2.java @@ -19,7 +19,7 @@ * limitations under the License. */ -package io.sarl.lang.mwe2.gtk; +package io.sarl.lang.mwe2.externalspec.gtk; import java.text.MessageFormat; import java.util.ArrayList; diff --git a/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/latex/LaTeXBeamerGenerator2.java b/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/latex/LaTeXBeamerGenerator2.java similarity index 97% rename from plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/latex/LaTeXBeamerGenerator2.java rename to plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/latex/LaTeXBeamerGenerator2.java index 8220e0d719..d584c5c267 100644 --- a/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/latex/LaTeXBeamerGenerator2.java +++ b/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/latex/LaTeXBeamerGenerator2.java @@ -19,7 +19,7 @@ * limitations under the License. */ -package io.sarl.lang.mwe2.latex; +package io.sarl.lang.mwe2.externalspec.latex; import java.text.MessageFormat; diff --git a/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/latex/LaTeXListingsGenerator2.java b/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/latex/LaTeXListingsGenerator2.java similarity index 99% rename from plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/latex/LaTeXListingsGenerator2.java rename to plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/latex/LaTeXListingsGenerator2.java index 2f48a81326..dcafe1c580 100644 --- a/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/latex/LaTeXListingsGenerator2.java +++ b/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/latex/LaTeXListingsGenerator2.java @@ -19,7 +19,7 @@ * limitations under the License. */ -package io.sarl.lang.mwe2.latex; +package io.sarl.lang.mwe2.externalspec.latex; import java.text.MessageFormat; import java.util.ArrayList; diff --git a/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/prettify/GooglePrettifyGenerator2.java b/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/prettify/GooglePrettifyGenerator2.java similarity index 99% rename from plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/prettify/GooglePrettifyGenerator2.java rename to plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/prettify/GooglePrettifyGenerator2.java index ecb05ac47f..1d93529129 100644 --- a/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/prettify/GooglePrettifyGenerator2.java +++ b/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/prettify/GooglePrettifyGenerator2.java @@ -19,7 +19,7 @@ * limitations under the License. */ -package io.sarl.lang.mwe2.prettify; +package io.sarl.lang.mwe2.externalspec.prettify; import java.text.MessageFormat; import java.util.ArrayList; diff --git a/plugins/io.sarl.lang/src-gen/io/sarl/lang/AbstractSARLRuntimeModule.java b/plugins/io.sarl.lang/src-gen/io/sarl/lang/AbstractSARLRuntimeModule.java index d9fbffd829..ff397af9e5 100644 --- a/plugins/io.sarl.lang/src-gen/io/sarl/lang/AbstractSARLRuntimeModule.java +++ b/plugins/io.sarl.lang/src-gen/io/sarl/lang/AbstractSARLRuntimeModule.java @@ -246,16 +246,6 @@ public Class bindIGrammarAccess() { return SARLGrammarAccess.class; } - // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 - public Class bindISemanticSequencer() { - return SARLSemanticSequencer.class; - } - - // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 - public Class bindISerializer() { - return Serializer.class; - } - // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 public Class bindIParser() { return SARLParser.class; @@ -304,6 +294,16 @@ public Class bindSARLValidator() { return SARLValidator.class; } + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISemanticSequencer() { + return SARLSemanticSequencer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISerializer() { + return Serializer.class; + } + // contributed by org.eclipse.xtext.xtext.generator.formatting.Formatter2Fragment2 public Class bindIFormatter2() { return SARLFormatter.class;