diff options
author | Ralf Mollik | 2018-11-07 08:21:56 +0000 |
---|---|---|
committer | Ralf Mollik | 2018-11-07 08:21:56 +0000 |
commit | 888d3e21bf2265e0039e339e1b74961828b6953d (patch) | |
tree | fb782456d1f52ff53ed594b28814fbc795fd98bb | |
parent | 70beba7e985beef2ca7276e0feefb172966494c1 (diff) | |
download | org.eclipse.osbp.xtext.i18n-master.tar.gz org.eclipse.osbp.xtext.i18n-master.tar.xz org.eclipse.osbp.xtext.i18n-master.zip |
Signed-off-by: Ralf Mollik <ramollik@compex-commerce.com>
11 files changed, 95 insertions, 77 deletions
diff --git a/jenkins.build.config.xml b/jenkins.build.config.xml index b5f0162..f4c0c9d 100644 --- a/jenkins.build.config.xml +++ b/jenkins.build.config.xml @@ -15,7 +15,6 @@ <jenkins> <!-- DO NOT EDIT BELOW THIS LINE --> <jenkins.build.dependencies> - <jenkins.build.dependency>org.eclipse.osbp.dsl</jenkins.build.dependency> <jenkins.build.dependency>org.eclipse.osbp.preferences</jenkins.build.dependency> <jenkins.build.dependency>org.eclipse.osbp.runtime</jenkins.build.dependency> <jenkins.build.dependency>org.eclipse.osbp.xtext.addons</jenkins.build.dependency> diff --git a/org.eclipse.osbp.xtext.i18n.feature/feature.properties b/org.eclipse.osbp.xtext.i18n.feature/feature.properties index 9ea3823..52fe7c4 100644 --- a/org.eclipse.osbp.xtext.i18n.feature/feature.properties +++ b/org.eclipse.osbp.xtext.i18n.feature/feature.properties @@ -25,7 +25,7 @@ featureName = OSBP DSL: i18n # "providerName" property - name of the company that provides the feature -providerName = Loetz GmbH&Co.KG (69115 Heidelberg, Germany) +providerName = Eclipse OSBP # "updateSiteName" property - label for the update site updateSiteName = diff --git a/org.eclipse.osbp.xtext.i18n/META-INF/MANIFEST.MF b/org.eclipse.osbp.xtext.i18n/META-INF/MANIFEST.MF index d560222..0359883 100644 --- a/org.eclipse.osbp.xtext.i18n/META-INF/MANIFEST.MF +++ b/org.eclipse.osbp.xtext.i18n/META-INF/MANIFEST.MF @@ -22,12 +22,10 @@ Require-Bundle: org.antlr.runtime, org.eclipse.xtext.common.types;bundle-version="[2.11.0,2.12.0)", org.eclipse.xtext.generator;bundle-version="[2.11.0,2.12.0)";resolution:=optional, org.eclipse.xtext.xbase;bundle-version="[2.11.0,2.12.0)";resolution:=optional, - org.eclipse.xtext.util;bundle-version="[2.11.0,2.12.0)", org.eclipse.xtext.xbase.lib;bundle-version="[2.11.0,2.12.0)", org.eclipse.osbp.xtext.oxtype;bundle-version="[0.9.0,0.10.0)", org.eclipse.osbp.gitinfo;bundle-version="[0.9.0,0.10.0)", org.eclipse.osbp.xtext.addons;bundle-version="[0.9.0,0.10.0)", - org.eclipse.osbp.dsl.common.xtext;bundle-version="[0.9.0,0.10.0)", org.eclipse.osbp.runtime.common;bundle-version="[0.9.0,0.10.0)" Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy diff --git a/org.eclipse.osbp.xtext.i18n/src/org/eclipse/osbp/xtext/i18n/DSLOutputConfigurationProvider.java b/org.eclipse.osbp.xtext.i18n/src/org/eclipse/osbp/xtext/i18n/DSLOutputConfigurationProvider.java index a5d2da1..a7064da 100644 --- a/org.eclipse.osbp.xtext.i18n/src/org/eclipse/osbp/xtext/i18n/DSLOutputConfigurationProvider.java +++ b/org.eclipse.osbp.xtext.i18n/src/org/eclipse/osbp/xtext/i18n/DSLOutputConfigurationProvider.java @@ -15,14 +15,26 @@ */ package org.eclipse.osbp.xtext.i18n; +import static com.google.common.collect.Sets.newHashSet; + import java.util.Set; +import org.eclipse.xtext.Constants; import org.eclipse.xtext.generator.IFileSystemAccess; import org.eclipse.xtext.generator.IOutputConfigurationProvider; import org.eclipse.xtext.generator.OutputConfiguration; -import static com.google.common.collect.Sets.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.inject.Inject; +import com.google.inject.name.Named; public class DSLOutputConfigurationProvider implements IOutputConfigurationProvider { + @Inject + @Named(Constants.FILE_EXTENSIONS) + private String extensions; + private static final Logger LOGGER = LoggerFactory.getLogger(DSLOutputConfigurationProvider.class); + public static final String SMOOKS_OUTPUT_ONCE = "DEFAULT_OUTPUT_ONCE"; public static final String SMOOKS_OUTPUT_DIRECTORY = "smooks"; public static final String DEFAULT_OUTPUT_I18N = "DEFAULT_OUTPUT_I18N"; @@ -31,6 +43,7 @@ public class DSLOutputConfigurationProvider implements IOutputConfigurationProvi public static final String CUBE_CATALOG_OUTPUT = "CUBE_CATALOG_OUTPUT"; public static final String CUBE_CATALOG_DIRECTORY = "catalog"; public static final String CONFIGURATION_DIRECTORY = "config"; + public static final boolean NAMEDDEFAULTDIRECTORY = false; @Override public Set<OutputConfiguration> getOutputConfigurations() { @@ -38,13 +51,18 @@ public class DSLOutputConfigurationProvider implements IOutputConfigurationProvi OutputConfiguration defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT); defaultOutput.setDescription("Output Folder"); - defaultOutput.setOutputDirectory("./src-gen"); + if(!NAMEDDEFAULTDIRECTORY || extensions == null) { + defaultOutput.setOutputDirectory("./src-gen"); + } else { + defaultOutput.setOutputDirectory("./src-"+extensions); + } defaultOutput.setOverrideExistingResources(true); defaultOutput.setCreateOutputDirectory(true); defaultOutput.setCleanUpDerivedResources(true); defaultOutput.setSetDerivedProperty(true); defaultOutput.setKeepLocalHistory(true); configs.add(defaultOutput); +// LOGGER.debug("default:{}", defaultOutput); OutputConfiguration onceOutput = new OutputConfiguration(SMOOKS_OUTPUT_ONCE); onceOutput.setDescription("Output Folder (once)"); @@ -54,6 +72,7 @@ public class DSLOutputConfigurationProvider implements IOutputConfigurationProvi onceOutput.setCleanUpDerivedResources(true); onceOutput.setSetDerivedProperty(true); configs.add(onceOutput); +// LOGGER.debug("smooks:{}", onceOutput); OutputConfiguration catalogOutput = new OutputConfiguration(CUBE_CATALOG_OUTPUT); catalogOutput.setDescription("Output Folder (catalog)"); @@ -63,15 +82,21 @@ public class DSLOutputConfigurationProvider implements IOutputConfigurationProvi catalogOutput.setCleanUpDerivedResources(true); catalogOutput.setSetDerivedProperty(true); configs.add(catalogOutput); +// LOGGER.debug("cube:{}", catalogOutput); OutputConfiguration resourceOutput = new OutputConfiguration(DEFAULT_OUTPUT_I18N); resourceOutput.setDescription("Output Folder (i18n)"); - resourceOutput.setOutputDirectory("./"+I18N_OUTPUT_DIRECTORY); + if(!NAMEDDEFAULTDIRECTORY || extensions == null) { + resourceOutput.setOutputDirectory("./"+I18N_OUTPUT_DIRECTORY); + } else { + resourceOutput.setOutputDirectory("./"+I18N_OUTPUT_DIRECTORY+"_"+extensions); + } resourceOutput.setOverrideExistingResources(true); resourceOutput.setCreateOutputDirectory(true); resourceOutput.setCleanUpDerivedResources(false); resourceOutput.setSetDerivedProperty(false); configs.add(resourceOutput); +// LOGGER.debug("i18n:{}", resourceOutput); OutputConfiguration reportOutput = new OutputConfiguration(DEFAULT_REPORT_OUTPUT); reportOutput.setDescription("Output Folder"); @@ -81,17 +106,7 @@ public class DSLOutputConfigurationProvider implements IOutputConfigurationProvi reportOutput.setCleanUpDerivedResources(true); reportOutput.setSetDerivedProperty(true); configs.add(reportOutput); - - OutputConfiguration componentOutput = new OutputConfiguration( - "OSGI-INF"); - componentOutput.setDescription("OSGi-Services"); - componentOutput.setOutputDirectory("./OSGI-INF"); - componentOutput.setOverrideExistingResources(true); - componentOutput.setCreateOutputDirectory(true); - componentOutput.setCleanUpDerivedResources(true); - componentOutput.setSetDerivedProperty(true); - componentOutput.setKeepLocalHistory(true); - configs.add(componentOutput); +// LOGGER.debug("report:{}", reportOutput); OutputConfiguration dtoOutput = new OutputConfiguration("DTOs"); dtoOutput.setDescription("derived DTOs"); @@ -102,17 +117,23 @@ public class DSLOutputConfigurationProvider implements IOutputConfigurationProvi dtoOutput.setSetDerivedProperty(false); dtoOutput.setKeepLocalHistory(true); configs.add(dtoOutput); +// LOGGER.debug("dto:{}", dtoOutput); OutputConfiguration dtoMapperOutput = new OutputConfiguration( "Dto-Mappers"); dtoMapperOutput.setDescription("Dto Mappers"); - dtoMapperOutput.setOutputDirectory("./src-gen"); + if(!NAMEDDEFAULTDIRECTORY) { + dtoMapperOutput.setOutputDirectory("./src-gen"); + } else { + dtoMapperOutput.setOutputDirectory("./src-mappers"); + } dtoMapperOutput.setOverrideExistingResources(true); dtoMapperOutput.setCreateOutputDirectory(true); dtoMapperOutput.setCleanUpDerivedResources(true); dtoMapperOutput.setSetDerivedProperty(true); dtoMapperOutput.setKeepLocalHistory(true); configs.add(dtoMapperOutput); +// LOGGER.debug("dtoMapper:{}", dtoMapperOutput); OutputConfiguration servicesOutput = new OutputConfiguration( "Services-DSL"); @@ -124,6 +145,7 @@ public class DSLOutputConfigurationProvider implements IOutputConfigurationProvi servicesOutput.setSetDerivedProperty(true); servicesOutput.setKeepLocalHistory(true); configs.add(servicesOutput); +// LOGGER.debug("service:{}", servicesOutput); OutputConfiguration binOutput = new OutputConfiguration( "ModelBin"); @@ -135,6 +157,7 @@ public class DSLOutputConfigurationProvider implements IOutputConfigurationProvi binOutput.setSetDerivedProperty(true); binOutput.setKeepLocalHistory(true); configs.add(binOutput); +// LOGGER.debug("modelbin:{}", binOutput); OutputConfiguration configOutput = new OutputConfiguration(CONFIGURATION_DIRECTORY); configOutput.setDescription("Configuration Folder (once)"); @@ -144,8 +167,41 @@ public class DSLOutputConfigurationProvider implements IOutputConfigurationProvi configOutput.setCleanUpDerivedResources(false); configOutput.setSetDerivedProperty(false); configs.add(configOutput); - +// LOGGER.debug("configuration:{}", configOutput); + + OutputConfiguration xmiOutput = new OutputConfiguration("xmi"); + xmiOutput.setDescription("xmi"); + xmiOutput.setOutputDirectory("./modelsbin"); + xmiOutput.setOverrideExistingResources(true); + xmiOutput.setCreateOutputDirectory(true); + xmiOutput.setCleanUpDerivedResources(true); + xmiOutput.setSetDerivedProperty(true); + xmiOutput.setKeepLocalHistory(true); + configs.add(xmiOutput); +// LOGGER.debug("xmi:{}", xmiOutput); + + OutputConfiguration ecviewOutput = new OutputConfiguration("Autowire-ECViews"); + ecviewOutput.setDescription("Autowired ECViews"); + ecviewOutput.setOutputDirectory("./ecviews"); + ecviewOutput.setOverrideExistingResources(true); + ecviewOutput.setCreateOutputDirectory(true); + ecviewOutput.setCleanUpDerivedResources(true); + ecviewOutput.setSetDerivedProperty(true); + ecviewOutput.setKeepLocalHistory(true); + configs.add(ecviewOutput); +// LOGGER.debug("ecviews:{}", ecviewOutput); + + OutputConfiguration componentOutput = new OutputConfiguration("OSGI-INF"); + componentOutput.setDescription("OSGi-Services"); + componentOutput.setOutputDirectory("./OSGI-INF"); + componentOutput.setOverrideExistingResources(true); + componentOutput.setCreateOutputDirectory(true); + componentOutput.setCleanUpDerivedResources(true); + componentOutput.setSetDerivedProperty(true); + componentOutput.setKeepLocalHistory(true); + configs.add(componentOutput); +// LOGGER.debug("osgi:{}", componentOutput); + return configs; } - } diff --git a/org.eclipse.osbp.xtext.i18n/src/org/eclipse/osbp/xtext/i18n/GeneratorDelegate.xtend b/org.eclipse.osbp.xtext.i18n/src/org/eclipse/osbp/xtext/i18n/GeneratorDelegate.xtend index 2e24c62..68f3b61 100644 --- a/org.eclipse.osbp.xtext.i18n/src/org/eclipse/osbp/xtext/i18n/GeneratorDelegate.xtend +++ b/org.eclipse.osbp.xtext.i18n/src/org/eclipse/osbp/xtext/i18n/GeneratorDelegate.xtend @@ -28,7 +28,6 @@ class GeneratorDelegate extends I18NModelGenerator implements IGeneratorDelegate DSLOutputConfigurationProvider configProvider = new DSLOutputConfigurationProvider() override generate(Resource input, IFileSystemAccess fsa) { - super.addTranslatables("Name,Priority,Status,Subject,Description,ExpirationTime,CreatedOn,CreatedBy,ActivationTime,ActualOwner,TaskId,ProcessId,ProcessInstanceId,ProcessSessionId") fsa.generateI18n(input) } diff --git a/org.eclipse.osbp.xtext.i18n/src/org/eclipse/osbp/xtext/i18n/I18NModelGenerator.xtend b/org.eclipse.osbp.xtext.i18n/src/org/eclipse/osbp/xtext/i18n/I18NModelGenerator.xtend index fae1e6c..451fe97 100644 --- a/org.eclipse.osbp.xtext.i18n/src/org/eclipse/osbp/xtext/i18n/I18NModelGenerator.xtend +++ b/org.eclipse.osbp.xtext.i18n/src/org/eclipse/osbp/xtext/i18n/I18NModelGenerator.xtend @@ -197,9 +197,10 @@ class I18NModelGenerator extends AdvancedJvmModelGenerator { translations.get(localeId).put(key, property) } else if (!ProductConfiguration.languagesAutotranslate) { // if auto translation is disabled, copy english to german as default - if (localeId.equals("de")) { - translations.get(localeId).put(key, payLoads.join); - } + // TODO (JCD): Only for test purposes. To avoid the auto creation of the german translation values. +// if (localeId.equals("de")) { +// translations.get(localeId).put(key, payLoads.join); +// } } } } @@ -247,7 +248,7 @@ class I18NModelGenerator extends AdvancedJvmModelGenerator { def splitTextAndNumbers(String text) { var array = <String>newArrayList - if (text == null || text.length == 0) { + if (text === null || text.length == 0) { return array } var current = "" diff --git a/org.eclipse.osbp.xtext.i18n/src/org/eclipse/osbp/xtext/i18n/JvmInferrerDelegate.xtend b/org.eclipse.osbp.xtext.i18n/src/org/eclipse/osbp/xtext/i18n/JvmInferrerDelegate.xtend index c60393c..7dead24 100644 --- a/org.eclipse.osbp.xtext.i18n/src/org/eclipse/osbp/xtext/i18n/JvmInferrerDelegate.xtend +++ b/org.eclipse.osbp.xtext.i18n/src/org/eclipse/osbp/xtext/i18n/JvmInferrerDelegate.xtend @@ -21,20 +21,15 @@ package org.eclipse.osbp.xtext.i18n import com.google.inject.Inject import org.eclipse.emf.ecore.EObject +import org.eclipse.osbp.xtext.oxtype.hooks.IInferrerDelegate import org.eclipse.xtext.common.types.JvmDeclaredType -import org.eclipse.xtext.naming.IQualifiedNameProvider import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor import org.eclipse.xtext.xbase.jvmmodel.JvmAnnotationReferenceBuilder import org.eclipse.xtext.xbase.jvmmodel.JvmTypeReferenceBuilder -import org.eclipse.osbp.dsl.semantic.common.types.LTypedPackage -import org.eclipse.osbp.xtext.oxtype.hooks.IInferrerDelegate @SuppressWarnings("restriction") class JvmInferrerDelegate implements IInferrerDelegate { -// @Inject IndexDerivedStateHelper stateHelper -// @Inject extension I18NModelTranslatables - @Inject extension IQualifiedNameProvider @Inject JvmAnnotationReferenceBuilder.Factory annotationRefBuilderFactory; @Inject JvmTypeReferenceBuilder.Factory typeRefBuilderFactory; @@ -42,24 +37,15 @@ class JvmInferrerDelegate implements IInferrerDelegate { @Extension protected JvmTypeReferenceBuilder _typeReferenceBuilder; override void inferTypesOnly(EObject semanticElement, IJvmDeclaredTypeAcceptor acceptor, boolean preIndexingPhase) { - if (semanticElement instanceof LTypedPackage) { - val LTypedPackage lPkg = semanticElement as LTypedPackage; -// inferTranslatorTypeOnly(lPkg.fullyQualifiedName, lPkg, acceptor, I18nUtil.TRANSLATABLE) - } } override void inferFullState(JvmDeclaredType jvmType, EObject semanticElement, IJvmDeclaredTypeAcceptor acceptor, boolean preIndexingPhase, String selector) { - if (_annotationTypesBuilder==null){ + if (_annotationTypesBuilder===null){ _annotationTypesBuilder = annotationRefBuilderFactory.create(semanticElement.eResource.getResourceSet()); } - if (_typeReferenceBuilder==null){ + if (_typeReferenceBuilder===null){ _typeReferenceBuilder = typeRefBuilderFactory.create(semanticElement.eResource.getResourceSet()); } - if (selector != null && selector.equals("osbp.translator")) { -// additionalTranslatables("Name,Priority,Status,Subject,Description,ExpirationTime,CreatedOn,CreatedBy,ActivationTime,ActualOwner,TaskId,ProcessId,ProcessInstanceId,ProcessSessionId") - val LTypedPackage lPkg = semanticElement as LTypedPackage; -// infeTranslatorFullState(lPkg.fullyQualifiedName, jvmType, lPkg, _typeReferenceBuilder, _annotationTypesBuilder, acceptor, I18nUtil.TRANSLATABLE) - } } } diff --git a/org.eclipse.osbp.xtext.i18n/xtend-gen/org/eclipse/osbp/xtext/i18n/GeneratorDelegate.java b/org.eclipse.osbp.xtext.i18n/xtend-gen/org/eclipse/osbp/xtext/i18n/GeneratorDelegate.java index dc67a5d..38cd1cb 100644 --- a/org.eclipse.osbp.xtext.i18n/xtend-gen/org/eclipse/osbp/xtext/i18n/GeneratorDelegate.java +++ b/org.eclipse.osbp.xtext.i18n/xtend-gen/org/eclipse/osbp/xtext/i18n/GeneratorDelegate.java @@ -2,10 +2,10 @@ * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) * * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 + * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-2.0/ - * + * * SPDX-License-Identifier: EPL-2.0 * * Contributors: @@ -30,7 +30,6 @@ public class GeneratorDelegate extends I18NModelGenerator implements IGeneratorD @Override public void generate(final Resource input, final IFileSystemAccess fsa) { - super.addTranslatables("Name,Priority,Status,Subject,Description,ExpirationTime,CreatedOn,CreatedBy,ActivationTime,ActualOwner,TaskId,ProcessId,ProcessInstanceId,ProcessSessionId"); this.generateI18n(fsa, input); } diff --git a/org.eclipse.osbp.xtext.i18n/xtend-gen/org/eclipse/osbp/xtext/i18n/I18NModelGenerator.java b/org.eclipse.osbp.xtext.i18n/xtend-gen/org/eclipse/osbp/xtext/i18n/I18NModelGenerator.java index c22cf0e..cc5cc9d 100644 --- a/org.eclipse.osbp.xtext.i18n/xtend-gen/org/eclipse/osbp/xtext/i18n/I18NModelGenerator.java +++ b/org.eclipse.osbp.xtext.i18n/xtend-gen/org/eclipse/osbp/xtext/i18n/I18NModelGenerator.java @@ -2,10 +2,10 @@ * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) * * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 + * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-2.0/ - * + * * SPDX-License-Identifier: EPL-2.0 * * Contributors: @@ -16,7 +16,6 @@ */ package org.eclipse.osbp.xtext.i18n; -import com.google.common.base.Objects; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -211,10 +210,6 @@ public class I18NModelGenerator extends AdvancedJvmModelGenerator { boolean _isLanguagesAutotranslate_1 = ProductConfiguration.isLanguagesAutotranslate(); boolean _not_2 = (!_isLanguagesAutotranslate_1); if (_not_2) { - boolean _equals_2 = localeId_1.equals("de"); - if (_equals_2) { - translations.get(localeId_1).put(key, IterableExtensions.join(payLoads)); - } } } } @@ -235,8 +230,8 @@ public class I18NModelGenerator extends AdvancedJvmModelGenerator { output.append(((key_1 + "=") + value_1)).append("\n"); } } - boolean _equals_3 = localeId_2.equals("default"); - if (_equals_3) { + boolean _equals_2 = localeId_2.equals("default"); + if (_equals_2) { erfsa.generateFile("I18N.properties", DSLOutputConfigurationProvider.DEFAULT_OUTPUT_I18N, output); } else { erfsa.generateFile((("I18N_" + localeId_2) + ".properties"), @@ -270,7 +265,7 @@ public class I18NModelGenerator extends AdvancedJvmModelGenerator { public ArrayList<String> splitTextAndNumbers(final String text) { ArrayList<String> array = CollectionLiterals.<String>newArrayList(); - if ((Objects.equal(text, null) || (text.length() == 0))) { + if (((text == null) || (text.length() == 0))) { return array; } String current = ""; diff --git a/org.eclipse.osbp.xtext.i18n/xtend-gen/org/eclipse/osbp/xtext/i18n/JvmInferrerDelegate.java b/org.eclipse.osbp.xtext.i18n/xtend-gen/org/eclipse/osbp/xtext/i18n/JvmInferrerDelegate.java index e1cb916..ee9b211 100644 --- a/org.eclipse.osbp.xtext.i18n/xtend-gen/org/eclipse/osbp/xtext/i18n/JvmInferrerDelegate.java +++ b/org.eclipse.osbp.xtext.i18n/xtend-gen/org/eclipse/osbp/xtext/i18n/JvmInferrerDelegate.java @@ -2,10 +2,10 @@ * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) * * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 + * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-2.0/ - * + * * SPDX-License-Identifier: EPL-2.0 * * Contributors: @@ -16,13 +16,10 @@ */ package org.eclipse.osbp.xtext.i18n; -import com.google.common.base.Objects; import com.google.inject.Inject; import org.eclipse.emf.ecore.EObject; -import org.eclipse.osbp.dsl.semantic.common.types.LTypedPackage; import org.eclipse.osbp.xtext.oxtype.hooks.IInferrerDelegate; import org.eclipse.xtext.common.types.JvmDeclaredType; -import org.eclipse.xtext.naming.IQualifiedNameProvider; import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; import org.eclipse.xtext.xbase.jvmmodel.JvmAnnotationReferenceBuilder; import org.eclipse.xtext.xbase.jvmmodel.JvmTypeReferenceBuilder; @@ -31,10 +28,6 @@ import org.eclipse.xtext.xbase.lib.Extension; @SuppressWarnings("restriction") public class JvmInferrerDelegate implements IInferrerDelegate { @Inject - @Extension - private IQualifiedNameProvider _iQualifiedNameProvider; - - @Inject private JvmAnnotationReferenceBuilder.Factory annotationRefBuilderFactory; @Inject @@ -48,23 +41,15 @@ public class JvmInferrerDelegate implements IInferrerDelegate { @Override public void inferTypesOnly(final EObject semanticElement, final IJvmDeclaredTypeAcceptor acceptor, final boolean preIndexingPhase) { - if ((semanticElement instanceof LTypedPackage)) { - final LTypedPackage lPkg = ((LTypedPackage) semanticElement); - } } @Override public void inferFullState(final JvmDeclaredType jvmType, final EObject semanticElement, final IJvmDeclaredTypeAcceptor acceptor, final boolean preIndexingPhase, final String selector) { - boolean _equals = Objects.equal(this._annotationTypesBuilder, null); - if (_equals) { + if ((this._annotationTypesBuilder == null)) { this._annotationTypesBuilder = this.annotationRefBuilderFactory.create(semanticElement.eResource().getResourceSet()); } - boolean _equals_1 = Objects.equal(this._typeReferenceBuilder, null); - if (_equals_1) { + if ((this._typeReferenceBuilder == null)) { this._typeReferenceBuilder = this.typeRefBuilderFactory.create(semanticElement.eResource().getResourceSet()); } - if (((!Objects.equal(selector, null)) && selector.equals("osbp.translator"))) { - final LTypedPackage lPkg = ((LTypedPackage) semanticElement); - } } } diff --git a/org.eclipse.osbp.xtext.i18n/xtend-gen/org/eclipse/osbp/xtext/i18n/StringComparator.java b/org.eclipse.osbp.xtext.i18n/xtend-gen/org/eclipse/osbp/xtext/i18n/StringComparator.java index 9e81c9f..aaed70e 100644 --- a/org.eclipse.osbp.xtext.i18n/xtend-gen/org/eclipse/osbp/xtext/i18n/StringComparator.java +++ b/org.eclipse.osbp.xtext.i18n/xtend-gen/org/eclipse/osbp/xtext/i18n/StringComparator.java @@ -2,10 +2,10 @@ * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) * * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 + * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-2.0/ - * + * * SPDX-License-Identifier: EPL-2.0 * * Contributors: |