Skip to content

Commit

Permalink
Camel 3.0 extension + Export fixes
Browse files Browse the repository at this point in the history
Camel  3.0 extensions fixes
Type & Unit model export fixes
  • Loading branch information
Amina-Moussaoui committed Mar 10, 2023
1 parent 70c93d3 commit db4cb14
Show file tree
Hide file tree
Showing 37 changed files with 1,009 additions and 188 deletions.
20 changes: 13 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- definition -->
<groupId>fr.softeam</groupId>
<artifactId>cameldesigner</artifactId>
<version>1.0.14</version>
<version>1.0.15</version>
<name>CamelDesigner</name>
<repositories>
<repository>
Expand Down Expand Up @@ -307,12 +307,6 @@
<type>jar</type>
</dependency>

<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>CamelDSLExporter</artifactId>
<version>3.0.0-SNAPSHOT</version>
<type>jar</type>
</dependency>

<dependency>
<groupId>org.eclipse.core</groupId>
Expand Down Expand Up @@ -376,6 +370,18 @@
<version>4.1.1</version>
</dependency>

<dependency>
<groupId>camel</groupId>
<artifactId>camel</artifactId>
<version>5.5.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>camel</groupId>
<artifactId>camel.dsl</artifactId>
<version>5.5.0-SNAPSHOT</version>
</dependency>

</dependencies>

<!-- // Build // -->
Expand Down
123 changes: 122 additions & 1 deletion src/main/conf/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,126 @@
<Module id="${project.name}" class="fr.softeam.cameldesigner.impl.CamelDesignerModule" binaryversion="4.1.0" version="${project.version}" schema-level="2" uid="dc1688c2-8bd2-4585-a786-b1b5877996d7" author="Softeam" image="" url="">
<ClassPath>
<PathEntry path="lib/${project.artifactId}-${project.version}.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/CamelDSLExporter-3.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/CamelDSLExporter-3.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/CamelDSLExporter-3.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/CamelDSLExporter-3.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/camel.dsl-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/CamelDSLExporter-3.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/camel-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/camel-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/camel-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/camel.dsl-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/camel-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/camel.dsl-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/camel-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/camel.dsl-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/camel-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/camel.dsl-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/camel-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/camel.dsl-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/camel-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/camel.dsl-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/camel-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/camel.dsl-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/camel-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/camel.dsl-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/camel-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/camel.dsl-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/camel-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/camel.dsl-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/camel-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/camel.dsl-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/camel-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/camel.dsl-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/inject-3.0.0.jar"/>
<PathEntry path="lib/registry-3.7.0.jar"/>
<PathEntry path="lib/xtext-2.12.0.jar"/>
Expand Down Expand Up @@ -42,7 +162,6 @@
<PathEntry path="lib/essentialocl-1.3.0.jar"/>
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
<PathEntry path="lib/util-3.7.0.jar"/>
<PathEntry path="lib/CamelDSLExporter-3.0.0-SNAPSHOT.jar"/>
<PathEntry path="lib/contenttype-3.6.0.jar"/>
<PathEntry path="lib/ocl-3.6.200.jar"/>
<PathEntry path="lib/ecore-3.6.200.jar"/>
Expand All @@ -52,6 +171,8 @@
<PathEntry path="lib/util-2.12.0.jar"/>
<PathEntry path="lib/gson-2.8.9.jar"/>
<PathEntry path="lib/MathParser.org-mXparser-4.1.1.jar"/>
<PathEntry path="lib/camel-5.5.0-SNAPSHOT.jar"/>
<PathEntry path="lib/camel.dsl-5.5.0-SNAPSHOT.jar"/>
</ClassPath>
<Profiles>
<Profile uid="28a1b85d-93b2-47f7-845a-f4883b71ded5" id="CamelCore">
Expand Down
21 changes: 10 additions & 11 deletions src/main/java/fr/softeam/cameldesigner/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import java.nio.charset.StandardCharsets;
import java.util.Scanner;
import com.modeliosoft.modelio.javadesigner.annotations.objid;

import fr.softeam.cameldesigner.profiler.data.Category;
import fr.softeam.cameldesigner.profiler.data.ProvidingInfo;

Expand All @@ -22,14 +21,14 @@ public class Main {

@objid ("d72fc10f-4888-49a1-be53-a504d109a8c2")
public static void main(String[] args) {
ProvidingInfo info = new ProvidingInfo();
info.setComponentName("component-1");
info.getCategories().add(Category.GPU);
info.setLanguage("C");
info.setRepository("https://github.com/jdtotow/tme");
pushAnalyse(info);
getResponseAnalyse();
ProvidingInfo info = new ProvidingInfo();
info.setComponentName("component-1");
info.getCategories().add(Category.GPU);
info.setLanguage("C");
info.setRepository("https://github.com/jdtotow/tme");
pushAnalyse(info);

getResponseAnalyse();
}

@objid ("4b02b658-c672-42c8-a7e5-b71d5e33e816")
Expand Down Expand Up @@ -179,7 +178,7 @@ public static void pushAnalyse(ProvidingInfo info) {
@objid ("52969b0a-acaf-492c-8fb2-403cf7f9d89d")
public static void getResponseAnalyse() {
try {
System.out.println("collection of data");
System.out.println("collection of data");
URL url = new URL(_URL + "/collect?code=" + code );

HttpURLConnection conn = (HttpURLConnection) url.openConnection();
Expand All @@ -192,7 +191,7 @@ public static void getResponseAnalyse() {
if (responsecode != 200) {
throw new RuntimeException("HttpResponseCode: " + responsecode);
} else {
String inline = "";
Scanner scanner = new Scanner(url.openStream());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ public static Limit create() {
}

/**
* Tries to instantiate a {@link Limit} proxy from a {@link Class} stereotyped << Limit >> checking its metaclass and its stereotype.
* Tries to instantiate a {@link Limit} proxy from a {@link Class} stereotyped << Limit >> checking its metaclass and its stereotype.
* <p>
* The method returns <i>null</i> if the instantiation cannot be carried out.
*
* @param obj a Class
* @return a {@link Limit} proxy or <i>null</i>.
*/
Expand All @@ -86,19 +87,20 @@ public static Limit instantiate(final Class obj) {
}

/**
* Tries to instantiate a {@link Limit} proxy from a {@link Class} stereotyped << Limit >> checking its metaclass and its stereotype.
* Tries to instantiate a {@link Limit} proxy from a {@link Class} stereotyped << Limit >> checking its metaclass and its stereotype.
* <p>
* The method throws an {@link IllegalArgumentException} if the instantiation cannot be carried out.
*
* @param obj a {@link Class}
* @return a {@link Limit} proxy.
* @throws IllegalArgumentException if the instantiation cannot be carried out.
* @throws java.lang.IllegalArgumentException if the instantiation cannot be carried out.
*/
@objid ("de4ca448-be4c-4440-a478-f0e3d1fe5dd5")
public static Limit safeInstantiate(final Class obj) throws IllegalArgumentException {
if (Limit.canInstantiate(obj))
return new Limit(obj);
return new Limit(obj);
else
throw new IllegalArgumentException("Limit: Cannot instantiate "+obj+": wrong element type or stereotype");
throw new IllegalArgumentException("Limit: Cannot instantiate "+obj+": wrong element type or stereotype");
}

@objid ("2155859d-62dd-4592-8639-8087088df8c8")
Expand All @@ -118,7 +120,8 @@ public boolean equals(final Object obj) {
}

/**
* Get the underlying {@link Class}.
* Get the underlying {@link Class}.
*
* @return the Class represented by this proxy, never null.
*/
@objid ("2e4b3947-dcfb-469c-96c0-45ec7a86ca59")
Expand Down Expand Up @@ -207,11 +210,11 @@ public static void init(final IModuleContext ctx) {
}


static {
if(CamelDesignerModule.getInstance() != null) {
init(CamelDesignerModule.getInstance().getModuleContext());
}
}
static {
if(CamelDesignerModule.getInstance() != null) {
init(CamelDesignerModule.getInstance().getModuleContext());
}
}
}

}
Loading

0 comments on commit db4cb14

Please sign in to comment.