forked from eclipse-epsilon/epsilon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:epsilonlabs/epsilon-with-lsp
- Loading branch information
Showing
223 changed files
with
5,560 additions
and
3,259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
# Eclipse Epsilon | ||
|
||
[Epsilon](https://eclipse.org/epsilon) is a family of Java-based scripting languages for automating common model-based software engineering tasks, such as code generation, model-to-model transformation and model validation, that work out of the box with EMF (including Xtext and Sirius), UML, Simulink, XML and other types of models. Epsilon also includes Eclipse-based editors and debuggers, convenient reflective tools for textual modelling and model visualisation, and Apache Ant tasks. | ||
[Epsilon](https://eclipse.org/epsilon/) is a family of scripting languages and tools for automating common model-based software engineering tasks such as [code generation](https://eclipse.org/epsilon/doc/egl), [model-to-model transformation](https://eclipse.org/epsilon/doc/etl), [model validation](https://eclipse.org/epsilon/doc/evl) and [model visualisation](https://eclipse.org/epsilon/doc/picto), that work out of the box with EMF (including [Xtext](https://www.eclipse.org/Xtext) and [Sirius](https://www.eclipse.org/sirius)), UML (including Cameo/MagicDraw), Simulink, XML and [other types of models](https://eclipse.org/epsilon/doc/emc). | ||
|
||
[](https://eclipse.dev/epsilon/playground/?egx) | ||
|
||
Epsilon can be used as a [standard Java library](https://eclipse.org/epsilon/getting-started/#using-epsilon-as-a-java-library), and also provides [Apache Ant](https://eclipse.org/epsilon/doc/workflow) tasks that can be embedded in [Maven/Gradle builds](https://eclipse.org/epsilon/getting-started/#epsilon-in-mavengradle-builds). Editing support for Epsilon programs is available in [Eclipse](https://eclipse.org/epsilon/download), [VS Code](https://eclipse.org/epsilon/doc/articles/vscode) and [Sublime](https://github.com/epsilonlabs/sublime). | ||
|
||
## Quick Access | ||
|
||
- [Getting Started](https://eclipse.dev/epsilon/getting-started/) | ||
- [Playground](https://eclipse.dev/epsilon/playground/) | ||
- [Download](https://eclipse.dev/epsilon/download/) | ||
- [Documentation](https://eclipse.dev/epsilon/doc/) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
examples/org.eclipse.epsilon.examples.eol.dap/Debug Epsilon on port 4040.launch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<launchConfiguration type="org.eclipse.lsp4e.debug.launchType"> | ||
<launchConfiguration type="org.eclipse.epsilon.eol.dt.debug.RemoteEpsilonLaunchConfigurationDelegate"> | ||
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/> | ||
<booleanAttribute key="org.eclipse.lsp4e.debug.model.ATTR_CUSTOM_DEBUG_ADAPTER" value="false"/> | ||
<booleanAttribute key="org.eclipse.lsp4e.debug.model.ATTR_CUSTOM_LAUNCH_PARAMS" value="false"/> | ||
<stringAttribute key="org.eclipse.lsp4e.debug.model.ATTR_DSP_MODE" value="connect to server"/> | ||
<booleanAttribute key="org.eclipse.lsp4e.debug.model.ATTR_DSP_MONITOR_ADAPTER" value="false"/> | ||
<stringAttribute key="org.eclipse.lsp4e.debug.model.ATTR_DSP_PARAM" value="{ "request": "attach" }"/> | ||
<stringAttribute key="org.eclipse.lsp4e.debug.model.ATTR_DSP_SERVER_HOST" value="127.0.0.1"/> | ||
<stringAttribute key="org.eclipse.lsp4e.debug.model.ATTR_DSP_PARAM" value="{"request": "attach"}"/> | ||
<stringAttribute key="org.eclipse.lsp4e.debug.model.ATTR_DSP_SERVER_HOST" value="localhost"/> | ||
<intAttribute key="org.eclipse.lsp4e.debug.model.ATTR_DSP_SERVER_PORT" value="4040"/> | ||
</launchConfiguration> |
19 changes: 19 additions & 0 deletions
19
...g.eclipse.epsilon.examples.eol.dap/Run Debug Adapter on 07-orchestration from Java.launch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> | ||
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
<listEntry value="/org.eclipse.epsilon.examples.eol.dap/src/org/eclipse/epsilon/examples/eol/dap/DebugFileBasedEGX.java"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
<listEntry value="1"/> | ||
</listAttribute> | ||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/> | ||
<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"/> | ||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/> | ||
<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.epsilon.examples.eol.dap.DebugFileBasedEGX"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="org.eclipse.epsilon.examples.eol.dap"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="${workspace_loc:/org.eclipse.epsilon.examples.eol.dap/epsilon/07-orchestration.egx}"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.epsilon.examples.eol.dap"/> | ||
</launchConfiguration> |
1 change: 1 addition & 0 deletions
1
examples/org.eclipse.epsilon.examples.eol.dap/epsilon/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/.gradle/ | ||
/*.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
examples/org.eclipse.epsilon.examples.eol.dap/epsilon/07-orchestration.egx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
operation computeTarget(firstName, lastName) { | ||
return firstName + '-' + lastName + '.txt'; | ||
} | ||
|
||
rule Person2Text transform p: Person { | ||
template: '07-person.egl' | ||
target: computeTarget(p.firstName, p.lastName) | ||
} |
4 changes: 4 additions & 0 deletions
4
examples/org.eclipse.epsilon.examples.eol.dap/epsilon/07-person.egl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[% import '07-utils.eol'; %] | ||
# [%=p.firstName%] [%=p.lastName%] | ||
|
||
[%=p.generateGreeting()%] |
3 changes: 3 additions & 0 deletions
3
examples/org.eclipse.epsilon.examples.eol.dap/epsilon/07-utils.eol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
operation Person generateGreeting() { | ||
return 'Hello ' + self.firstName + ' ' + self.lastName; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
....epsilon.examples.eol.dap/src/org/eclipse/epsilon/examples/eol/dap/DebugFileBasedEGX.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.eclipse.epsilon.examples.eol.dap; | ||
|
||
import java.io.File; | ||
import java.nio.file.Paths; | ||
|
||
import org.eclipse.epsilon.egl.EgxModule; | ||
import org.eclipse.epsilon.emc.emf.EmfModel; | ||
import org.eclipse.epsilon.eol.dap.EpsilonDebugServer; | ||
|
||
public class DebugFileBasedEGX { | ||
|
||
public static void main(String[] args) throws Exception { | ||
EgxModule module = new EgxModule(Paths.get("epsilon")); | ||
module.parse(new File(args[0])); | ||
|
||
EmfModel model = new EmfModel(); | ||
model.setModelFile("epsilon/models/person.model"); | ||
model.setMetamodelFile("epsilon/models/person.ecore"); | ||
model.setReadOnLoad(true); | ||
model.setStoredOnDisposal(false); | ||
model.load(); | ||
module.getContext().getModelRepository().addModel(model); | ||
|
||
EpsilonDebugServer server = new EpsilonDebugServer(module, 4040); | ||
server.run(); | ||
|
||
/* | ||
* Retrieves the result from running the Epsilon script - may rethrow any | ||
* exception produced by execute(). | ||
*/ | ||
server.getResult().get(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?nsuri ccl?> | ||
<?import b.flexmi?> | ||
<_> | ||
<component name="A"> | ||
<in name="in"/> | ||
<out name="out" type="String"/> | ||
</component> | ||
<connector name="A2B" from="A.out" to="B.in"/> | ||
</_> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?nsuri ccl?> | ||
<?import c.flexmi?> | ||
<_> | ||
<component name="B"> | ||
<in name="in"/> | ||
<out name="out" type="String"/> | ||
</component> | ||
<connector name="B2C" from="B.out" to="C.in"/> | ||
</_> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?nsuri ccl?> | ||
<?import a.flexmi?> | ||
<_> | ||
<component name="C"> | ||
<in name="in"/> | ||
<out name="out" type="String"/> | ||
</component> | ||
<connector name="C2A" from="C.out" to="A.in"/> | ||
</_> |
22 changes: 22 additions & 0 deletions
22
examples/org.eclipse.epsilon.examples.evl.crossrefs/ccl.emf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package ccl; | ||
|
||
class Component { | ||
attr String name; | ||
val Port[*]#component ports; | ||
} | ||
|
||
class Connector { | ||
attr String name; | ||
ref OutPort source; | ||
ref InPort target; | ||
} | ||
|
||
class InPort extends Port {} | ||
|
||
class OutPort extends Port {} | ||
|
||
abstract class Port { | ||
attr String name; | ||
attr String type = "boolean"; | ||
ref Component#ports component; | ||
} |
17 changes: 17 additions & 0 deletions
17
examples/org.eclipse.epsilon.examples.evl.crossrefs/ccl.evl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
context Connector { | ||
|
||
/* If a connector connects two ports, their types must match */ | ||
constraint PortTypesMatch { | ||
guard: self.source.satisfies("HasValidType") and self.target.satisfies("HasValidType") | ||
check: self.source.type = self.target.type | ||
message: "The types of the source and target ports of connector " + self.name + " don't match" | ||
} | ||
} | ||
|
||
context Port { | ||
|
||
/* The only valid port types are boolean, int and String */ | ||
constraint HasValidType { | ||
check: Sequence{"boolean", "int", "String"}.contains(self.type) | ||
} | ||
} |
Oops, something went wrong.