Skip to content

Commit

Permalink
Remove Xpand
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenporras committed May 29, 2024
1 parent 018b732 commit 3cfa822
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package com.avaloq.tools.ddk.check.validation;

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.avaloq.tools.ddk.check.runtime.configuration.ModelLocation;
import com.avaloq.tools.ddk.check.runtime.registry.ICheckCatalogRegistry;
import com.avaloq.tools.ddk.check.runtime.registry.ICheckValidatorRegistry;
import com.avaloq.tools.ddk.check.runtime.registry.ICheckValidatorStandaloneSetup;


/**
* Standalone setup for ExecutionEnvironment as required by the standalone builder.
*/
Expand All @@ -18,10 +19,10 @@ public class ExecutionEnvironmentStandaloneSetup implements ICheckValidatorStand
private static final String GRAMMAR_NAME = "com.avaloq.tools.ddk.check.TestLanguage";
private static final String CATALOG_FILE_PATH = "com/avaloq/tools/ddk/check/validation/ExecutionEnvironment.check";

@Override
public void doSetup() {
ICheckValidatorRegistry.INSTANCE.registerValidator(GRAMMAR_NAME, new ExecutionEnvironmentCheckImpl());
ICheckCatalogRegistry.INSTANCE.registerCatalog(GRAMMAR_NAME, new ModelLocation(
ExecutionEnvironmentStandaloneSetup.class.getClassLoader().getResource(CATALOG_FILE_PATH), CATALOG_FILE_PATH));
ICheckCatalogRegistry.INSTANCE.registerCatalog(GRAMMAR_NAME, new ModelLocation(ExecutionEnvironmentStandaloneSetup.class.getClassLoader().getResource(CATALOG_FILE_PATH), CATALOG_FILE_PATH));
LOG.info("Standalone setup done for com/avaloq/tools/ddk/check/validation/ExecutionEnvironment.check");
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package com.avaloq.tools.ddk.check.validation;

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.avaloq.tools.ddk.check.runtime.configuration.ModelLocation;
import com.avaloq.tools.ddk.check.runtime.registry.ICheckCatalogRegistry;
import com.avaloq.tools.ddk.check.runtime.registry.ICheckValidatorRegistry;
import com.avaloq.tools.ddk.check.runtime.registry.ICheckValidatorStandaloneSetup;


/**
* Standalone setup for LibraryChecks as required by the standalone builder.
*/
Expand All @@ -18,10 +19,10 @@ public class LibraryChecksStandaloneSetup implements ICheckValidatorStandaloneSe
private static final String GRAMMAR_NAME = "com.avaloq.tools.ddk.check.TestLanguage";
private static final String CATALOG_FILE_PATH = "com/avaloq/tools/ddk/check/validation/LibraryChecks.check";

@Override
public void doSetup() {
ICheckValidatorRegistry.INSTANCE.registerValidator(GRAMMAR_NAME, new LibraryChecksCheckImpl());
ICheckCatalogRegistry.INSTANCE.registerCatalog(GRAMMAR_NAME, new ModelLocation(
LibraryChecksStandaloneSetup.class.getClassLoader().getResource(CATALOG_FILE_PATH), CATALOG_FILE_PATH));
ICheckCatalogRegistry.INSTANCE.registerCatalog(GRAMMAR_NAME, new ModelLocation(LibraryChecksStandaloneSetup.class.getClassLoader().getResource(CATALOG_FILE_PATH), CATALOG_FILE_PATH));
LOG.info("Standalone setup done for com/avaloq/tools/ddk/check/validation/LibraryChecks.check");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class CheckCatalogGenerator {
private JavaIoFileSystemAccess fsa;

/**
* Generates a check file. Calls an Xpand template.
* Generates a check file.
*
* @param path
* the path used for the output file destination
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public String getDefaultPackageImport() {
}

/**
* Gets the path to where files should be generated by Xpand. If {@code path} is {@code null}, a default is calculated.
* Gets the path to where files should be generated. If {@code path} is {@code null}, a default is calculated.
*
* @return the path
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,7 @@ public void checkExtensions(final ExportModel model) {
if (!Platform.isRunning()) {
resourceManager = new ResourceManagerDefaultImpl();
}
// } else {
// FIXME: sort out xpand
// IXtendXpandProject project = Activator.getExtXptModelManager().findProject(ResourcesPlugin.getWorkspace().getRoot().getFile(new
// Path(model.eResource().getURI().toPlatformString(true))).getProject());
// if (project != null) {
// resourceManager = new XpandPluginExecutionContext(project).getResourceManager();
// }

if (resourceManager == null) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* The CompilationContext is used by CodeGeneration.ext to resolve types, get information about local variables, etc. It is a
* wrapper around {@link ExecutionContext}.
* <p>
* Note that many of these methods are called from Xtend and Xpand and will thus not show up when doing a find references in Eclipse.
* Note that many of these methods are called from Xtend and will thus not show up when doing a find references in Eclipse.
*/
public class CompilationContext {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Bundle-Vendor: Avaloq Group AG
Bundle-Version: 13.4.0.qualifier
Bundle-SymbolicName: com.avaloq.tools.ddk.xtext.format.generator;singleton:=true
Require-Bundle: com.avaloq.tools.ddk.xtext.format;visibility:=reexport,
org.eclipse.xpand,
org.eclipse.xtend,
org.eclipse.xtext.xtext.generator,
org.eclipse.xtext,
Expand Down
1 change: 0 additions & 1 deletion com.avaloq.tools.ddk.xtext.generator/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Bundle-RequiredExecutionEnvironment: JavaSE-17
Require-Bundle: org.eclipse.jface,
org.eclipse.ui.views,
org.eclipse.emf.codegen.ecore,
org.eclipse.xpand,
org.eclipse.xtext,
org.eclipse.xtext.xtext.generator,
org.eclipse.emf.mwe2.lib,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class ScopeProviderGenerator {
'''
def dispatch scopeExpression(ScopeExpression it, ScopeModel model, String typeOrRef, ScopeDefinition scope, Boolean isGlobal) {
error("Xpand called the wrong definition." + it.toString() + javaContributorComment(it.location()))
error("Xtend called the wrong definition." + it.toString() + javaContributorComment(it.location()))
}
def dispatch scopeExpression(FactoryExpression it, ScopeModel model, String typeOrRef, ScopeDefinition scope, Boolean isGlobal) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,7 @@ public void checkExtensions(final ScopeModel model) {
if (!Platform.isRunning()) {
resourceManager = new ResourceManagerDefaultImpl();
}
// } else {
// FIXME: xpand
// IXtendXpandProject project = Activator.getExtXptModelManager().findProject(ResourcesPlugin.getWorkspace().getRoot().getFile(new
// Path(model.eResource().getURI().toPlatformString(true))).getProject());
// if (project != null) {
// resourceManager = new XpandPluginExecutionContext(project).getResourceManager();
// }

if (resourceManager == null) {
return;
}
Expand Down
5 changes: 0 additions & 5 deletions com.avaloq.tools.ddk.xtext.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@
<id>org.eclipse.xtext.sdk</id>
<versionRange>0.0.0</versionRange>
</requirement>
<requirement>
<type>eclipse-feature</type>
<id>org.eclipse.xpand.sdk</id>
<versionRange>0.0.0</versionRange>
</requirement>
<requirement>
<type>eclipse-feature</type>
<id>org.eclipse.pde</id>
Expand Down
1 change: 0 additions & 1 deletion ddk-configuration/launches/devkit-run.launch
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@
<setEntry value="org.eclipse.ui.workbench@default:default"/>
<setEntry value="org.eclipse.ui@default:default"/>
<setEntry value="org.eclipse.update.configurator@3:true"/>
<setEntry value="org.eclipse.xpand@default:default"/>
<setEntry value="org.eclipse.xtend.core@default:default"/>
<setEntry value="org.eclipse.xtend.doc@default:default"/>
<setEntry value="org.eclipse.xtend.examples@default:default"/>
Expand Down
3 changes: 1 addition & 2 deletions ddk-target/ddk-antlr.target
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="DDK Target - ANTLR" sequenceNumber="2">
<target name="DDK Target - ANTLR" sequenceNumber="3">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="https://download.itemis.com/updates/releases/2.1.1/" />
Expand All @@ -10,7 +10,6 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="http://download.eclipse.org/technology/swtbot/releases/4.0.0/" />
<repository location="https://download.eclipse.org/releases/2022-12/202212071000/" />
<repository location="https://download.eclipse.org/modeling/m2t/xpand/updates/releases/R201605260315/" />
<repository location="https://download.eclipse.org/modeling/emft/mwe/updates/releases/2.18.0/" />
<repository location="https://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.35.0/" />
<repository location="https://download.eclipse.org/lsp4j/updates/releases/0.23.1/" />
Expand Down
6 changes: 1 addition & 5 deletions ddk-target/ddk.target
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="DDK Target" sequenceNumber="20">
<target name="DDK Target" sequenceNumber="21">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.swtbot.eclipse.feature.group" version="0.0.0"/>
Expand All @@ -17,10 +17,6 @@
<unit id="org.eclipse.emf.codegen.ecore.ui.feature.group" version="2.32.0.v20220925-1245"/>
<repository location="https://download.eclipse.org/releases/2022-12/202212071000/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.xpand.sdk.feature.group" version="0.0.0"/>
<repository location="https://download.eclipse.org/modeling/m2t/xpand/updates/releases/R201605260315/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.emf.mwe2.runtime.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.mwe2.launcher.feature.group" version="0.0.0"/>
Expand Down

0 comments on commit 3cfa822

Please sign in to comment.