Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore common types and Xbase generators #2882

Merged
merged 15 commits into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions org.eclipse.xtext.common.types/GenerateCommonTypes.mwe2.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.emf.mwe2.launch.Mwe2LaunchConfigurationType">
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${workspace}"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/org.eclipse.xtext.common.types"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_EXCLUDE_TEST_CODE" value="true"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher"/>
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="org.eclipse.xtext.common.types"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="src/org/eclipse/xtext/common/types/GenerateCommonTypes.mwe2"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.xtext.common.types"/>
</launchConfiguration>
5 changes: 3 additions & 2 deletions org.eclipse.xtext.common.types/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ bin.includes = META-INF/,\
about.html
src.includes = model/,\
about.html
src.excludes = generator/
additional.bundles = org.eclipse.emf.mwe2.lib
additional.bundles = org.eclipse.emf.mwe2.lib,\
org.eclipse.emf.codegen.ecore,\
org.eclipse.emf.mwe2.launch
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ private TypesPackageImpl()
{
super(eNS_URI, TypesFactory.eINSTANCE);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*******************************************************************************
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer if we wouldn't ship this workflow file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since MWE2 uses common.types, I'd prefer if we could regenerate without an MWE dependency. Otherwise changes to the types model would require MWE to run successfully before other changes to the types model can be applied.

* Copyright (c) 2023 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
module org.eclipse.xtext.common.types.CommonTypesGenerator

import org.eclipse.emf.mwe.utils.StandaloneSetup
import org.eclipse.emf.mwe.utils.DirectoryCleaner
import org.eclipse.emf.mwe2.ecore.EcoreGenerator

var project = "org.eclipse.xtext.common.types"

/**
* @author Lorenzo Bettini - Initial contribution
*/
Workflow {
bean = StandaloneSetup {
// initialize the EMF singleton with proper classpath to platform:/resource mappings
platformUri = "."
}

component = DirectoryCleaner {
directory = "emf-gen"
}

component = EcoreGenerator {
// generate the Java code for the EPackage
genModel = "platform:/resource/${project}/model/JavaVMTypes.genmodel"
srcPath = "platform:/resource/${project}/src"
lineDelimiter = "\n"
}
}
1 change: 1 addition & 0 deletions org.eclipse.xtext.xbase/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
<classpathentry kind="src" path="emf-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="src" path="deprecated"/>
<classpathentry kind="src" path="generator"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ private XAnnotationsPackageImpl()
{
super(eNS_URI, XAnnotationsFactory.eINSTANCE);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ private XbasePackageImpl()
{
super(eNS_URI, XbaseFactory.eINSTANCE);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ private XtypePackageImpl()
{
super(eNS_URI, XtypeFactory.eINSTANCE);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static void main(String[] args) {
final String root = "..";
szarnekow marked this conversation as resolved.
Show resolved Hide resolved
final String projectName = "org.eclipse.xtext.xbase";
final String runtimeProject = root + "/" + projectName;
final String uiProject = System.getProperty("uiProject", root + "/../xtext-eclipse/" + projectName + ".ui");
final String uiProject = System.getProperty("uiProject", root + "/../" + projectName + ".ui");
final boolean backtrack = false;
final boolean memoize = false;
final String lineDelimiter = "\n";
Expand Down
Loading