Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

for test with Kevoree generator

  • Loading branch information...
commit 53ca8a5bad5d8aa329efca4ce8c09adf5b180bef 1 parent 2865d75
@haoshaochi authored
View
10 org.thingml.compilers/src/main/resources/pomtemplates/pom.xml
@@ -65,29 +65,29 @@
<version>${thingml.version}</version>
</dependency>
<!--DEP-->
- <dependency><!--TODO: this should be added only when needed-->
+ <!--<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-swing</artifactId>
<version>${scala.version}</version>
</dependency>
- <dependency><!--TODO: this should be added only when needed-->
+ <dependency>
<groupId>org.thingml</groupId>
<artifactId>org.thingml.simulators</artifactId>
<version>${thingml.version}</version>
</dependency>
- <dependency><!--TODO: this should be added only when needed-->
+ <dependency>
<groupId>org.thingml</groupId>
<artifactId>org.thingml.samples.utils</artifactId>
<version>${thingml.version}</version>
</dependency>
- <dependency><!--TODO: this should be added only when needed-->
+ <dependency>
<groupId>org.thingml</groupId>
<artifactId>org.thingml.samples.resources</artifactId>
<version>${thingml.version}</version>
<classifier>resources</classifier>
<type>zip</type>
<scope>provided</scope>
- </dependency>
+ </dependency>-->
</dependencies>
<build>
View
286 org.thingml.compilers/src/main/scala/org/thingml/kevoreegenerator/KevoreeGenerator.scala
@@ -0,0 +1,286 @@
+/**
+ * Copyright (C) 2011 SINTEF <franck.fleurey@sintef.no>
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3, 29 June 2007;
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * This code generator targets the SMAc Framework
+ * see https://github.com/brice-morin/SMAc
+ * @author: Brice MORIN <brice.morin@sintef.no>
+ */
+package org.thingml.kevoreegenerator
+
+import org.thingml.scalagenerator.ScalaGenerator._
+import org.sintef.thingml.constraints.ThingMLHelpers
+import org.thingml.model.scalaimpl.ThingMLScalaImpl._
+import org.sintef.thingml.resource.thingml.analysis.helper.CharacterEscaper
+import scala.collection.JavaConversions._
+import scala.io.Source
+import scala.actors._
+import scala.actors.Actor._
+import java.util.{ArrayList, Hashtable}
+import java.util.AbstractMap.SimpleEntry
+import java.io.{File, FileWriter, PrintWriter, BufferedReader, InputStreamReader}
+import org.sintef.thingml._
+
+import org.thingml.utils.log.Logger
+
+object Context {
+ val builder = new StringBuilder()
+
+ var thing : Thing = _
+ var pack : String = _
+ var port_name : String = _
+ var file_name : String = _
+ var wrapper_name :String =_
+
+ def firstToUpper(value : String) : String = {
+ return value.capitalize
+ }
+
+ def init {
+ builder.clear
+ thing = null
+ pack = null
+ port_name = null
+ file_name = null
+ wrapper_name = null
+ }
+}
+
+object KevoreeGenerator {
+ implicit def kevoreeGeneratorAspect(self: Thing): ThingKevoreeGenerator = ThingKevoreeGenerator(self)
+
+ //TODO: modification
+ def compileAndRun(cfg : Configuration, model: ThingMLModel) {

I think we should generate the Kevoree code only from the model : ThingMLModel. The idea is indeed to use the Kevoree graphical editor and runtime to define and run the configuration. Basically we should generate the code for all the things defined in the model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ new File(System.getProperty("java.io.tmpdir") + "ThingML_temp\\").deleteOnExit
+
+ val rootDir = System.getProperty("java.io.tmpdir") + "ThingML_temp\\" + cfg.getName
+ val outputDir = System.getProperty("java.io.tmpdir") + "ThingML_temp\\" + cfg.getName + "\\src\\main\\java\\org\\thingml\\generated\\kevoree"
+
+ val outputDirFile = new File(outputDir)
+ outputDirFile.mkdirs
+
+
+ cfg.allThings.foreach{case thing=>

see my previous comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ Context.init
+ Context.file_name = cfg.getName+"_"+thing.getName()+"_KV2ThingML"
+ Context.wrapper_name = cfg.getName+"_"+thing.getName()+"_Wrapper"
+ val code = compile(thing, "org.thingml.generated", model)
+
+ var w = new PrintWriter(new FileWriter(new File(outputDir + "\\" + Context.file_name+".java")));
+ System.out.println("code generated at "+outputDir + "\\" + Context.file_name+".java");
+ w.println(code._1);
+ w.close();
+
+ w = new PrintWriter(new FileWriter(new File(outputDir + "\\"+Context.wrapper_name+".java")));
+ System.out.println("code generated at "+outputDir + "\\" + Context.wrapper_name+".java");
+ w.println(code._2);
+ w.close();
+ }
+ javax.swing.JOptionPane.showMessageDialog(null, "Kevoree/java code generated");
+ }
+
+ def compile(t: Thing, pack : String, model: ThingMLModel) : Pair[String, String] = {
+ Context.pack = pack
+ var wrapperBuilder = new StringBuilder()
+
+ generateHeader()
+ generateHeader(wrapperBuilder, true)
+
+ /*model.allSimpleTypes.filter{ t => t.isInstanceOf[Enumeration] }.foreach{ e =>
+ e.generateScala()
+ }*/
+
+ // Generate code for .things which appear in the configuration
+
+ t.generateKevoree()
+ t.generateKevoreeWrapper(wrapperBuilder)
+ (Context.builder.toString, wrapperBuilder.toString)
+ }
+
+ def generateHeader(builder: StringBuilder = Context.builder, isWrapper : Boolean = false) = {
+ builder append "/**\n"
+ builder append " * File generated by the ThingML IDE\n"
+ builder append " * /!\\Do not edit this file/!\\\n"
+ builder append " * In case of a bug in the generated code,\n"
+ builder append " * please submit an issue on our GitHub\n"
+ builder append " **/\n\n"
+
+ builder append "package " + Context.pack +".kevoree;\n"
+ builder append "import " + Context.pack + ".*;\n"
+ builder append "import org.kevoree.framework.MessagePort;\n"
+ if(!isWrapper){
+ builder append "import org.kevoree.annotation.*;\n"
+ builder append "import org.kevoree.framework.AbstractComponentType;\n"
+ builder append "import org.sintef.smac.Event;"
+ }
+ else{
+ builder append "import scala.collection.immutable.$colon$colon;\n"
+ builder append "import org.sintef.smac.*;\n"
+
+ }
+ }
+}
+
+//TODO generate kevoree class + annotation
+case class ThingKevoreeGenerator(val self: Thing){
+
+ def generateKevoreeWrapper(builder:StringBuilder = Context.builder){
+ builder append "public class "+Context.wrapper_name+" extends ReactiveComponent{\n"
+
+ builder append Context.file_name+" kevoreeComponent;\n"
+ builder append self.getName+" thingML_"+self.getName+"_Component;\n"
+ self.allPorts.foreach{case p =>
+ if(p.getSends.size>0){
+ builder append "Port " + "port_" + Context.firstToUpper(self.getName) + "_" + p.getName + "_wrapper = null;\n"
+ }
+ }
+ self.allPorts.foreach{case p =>
+ if(p.getSends.size>0){
+ builder append "public Port get"+Context.firstToUpper(self.getName)+"_"+p.getName+"(){\n"
+ builder append "return port_" + Context.firstToUpper(self.getName) + "_" + p.getName + "_wrapper\n"
+ builder append "}\n"
+ }
+ }
+
+ builder append "public "+Context.wrapper_name+" (" +Context.file_name+" kevoreeComponent) {\n"
+ builder append "this.kevoreeComponent = kevoreeComponent;\n"
+ builder append "thingML_"+self.getName+"_Component = new "+self.getName+"("
+ generateParameters(builder)
+ builder append ");\n"
+
+ self.allPorts.foreach{case p=>
+ builder append "scala.collection.immutable.List<String> "+p.getName+"_sent = null;\n"
+ builder append "scala.collection.immutable.List<String> "+p.getName+"_rcv = null;\n"
+ if(p.getSends.size>0){
+ builder append p.getName+"_sent = scala.collection.immutable.List$.MODULE$.empty();\n"
+ // builder append p.getName+"_sent = scala.collection.immutable.List$.MODULE$.empty();\n"
+ p.getSends.foreach{case s=>
+ builder append p.getName+"_sent = new $colon$colon(\"" + s.getName + "\", "+p.getName+"_sent);\n"
+ //builder append p.getName+"_sent = new $colon$colon("result", "+p.getName+"_sent);\n"
+ }
+ }
+ if(p.getReceives.size>0){
+ builder append p.getName+"_rcv = scala.collection.immutable.List$.MODULE$.empty();\n"
+ p.getReceives.foreach{case s=>
+ builder append p.getName+"_rcv = new $colon$colon(\"" + s.getName + "\", "+p.getName+"_rcv);\n"
+ }
+ }
+ builder append "port_" + Context.firstToUpper(self.getName) + "_" + p.getName+"_wrapper = (Port) new Port(\"" + p.getName + "\", "+p.getName+"_sent, "+p.getName+"_rcv, this).start();\n"
+
+ }
+ self.allPorts.foreach{case p=>
+ if(p.getSends.size>0 || p.getReceives.size>0){
+ builder append "Channel c_" + p.getName + "_sent_" + p.hashCode + " = new Channel();\n"
+ builder append "c_" + p.getName + "_sent_" + p.hashCode + ".connect(" + " thingML_"+self.getName+"_Component.getPort(\""+p.getName+"\").get(),"+"port_" + Context.firstToUpper(self.getName) + "_" + p.getName+"_wrapper);\n"
+ builder append "c_" + p.getName + "_sent_" + p.hashCode+".start();\n"
+ }
+ }
+ builder append "thingML_"+self.getName+"_Component.start();\n"
+ builder append "}\n"
+ builder append "public "+ self.getName +" getInstance(){\n"
+ builder append "return "+" thingML_"+self.getName+"_Component;\n}\n\n"
+ builder append "@Override\n"
+ builder append "public void onIncomingMessage(SignedEvent e) {\n"
+ builder append "kevoreeComponent.onIncomingMessage(e.event());\n"
+
+ builder append "}\n"
+ builder append "}\n"
+ }
+ def generateKevoree(builder: StringBuilder = Context.builder) {
+ println(self.getName)
+ Context.thing = self
+
+ builder append "\n@Provides({\n"
+ builder append self.allPorts.collect{case p=>
+ if(p.getReceives.size>0) "@ProvidedPort(name = \""+p.getName+"_rcv\", type = PortType.MESSAGE)"
+ }.mkString(",\n")
+
+ builder append "})\n@Requires({\n"
+ builder append self.allPorts.collect{case p=>
+ if(p.getSends.size>0) "@RequiredPort(name = \""+p.getName+"_Transfer\", type = PortType.MESSAGE)"
+ }.mkString(",\n")
+
+ builder append "})\n"
+ builder append "@ComponentType\n "
+ builder append "public class "+ Context.file_name+" extends AbstractComponentType{\n"
+ builder append Context.wrapper_name+" wrapper;\n\n"
+ //generateParameters();
+
+ builder append "@Start\n"
+ builder append "public void startComponent() {System.out.println(\""+Context.file_name+" component start!\");"
+ builder append "wrapper"+" = new "+Context.wrapper_name+"(this);\n}\n"
+ builder append "@Stop\n"
+ builder append "public void stopComponent() {System.out.println(\""+Context.file_name+" component stop!\");}\n"
+ builder append "@Update\n"
+ builder append "public void updateComponent() {System.out.println(\""+Context.file_name+" component update!\");}\n"
+
+ //generate incoming messages
+ builder append "public void onIncomingMessage(Event e) {\n"
+ self.allOutgoingMessages.foreach{case m=>
+ builder append "if (e.event() instanceof "+Context.pack +"."+Context.firstToUpper(m.getName)+") {\n"
+ builder append "System.out.println(\"Kevoree4"+self.getName+": "+m.getName+" to send tranferred\");\n"
+ builder append "this.kevoreeComponent.getPortByName(\""+getPortNameWrapper(m)+"_Transfer\",MessagePort.class).process(e.event());\n"
+ builder append "}\n"
+ }
+
+ //generate port to receive messages
+ generatePortDef()
+
+ builder append "}\n"
+ }
+
+ def generatePortDef(builder: StringBuilder = Context.builder) {
+ builder append "@Ports({\n"
+ builder append self.allPorts.collect{case p=>
+ if(p.getReceives.size>0) "@Port(name = \""+p.getName+"_rcv\")"
+ }.mkString(",\n")
+
+ builder append "\n})\n"
+ builder append "public void tranferMessages(Object o) {\n"
+ self.allIncomingMessages.foreach{case m=>
+ builder append "if (o instanceof "+Context.pack +"."+Context.firstToUpper(m.getName)+") {\n"
+ builder append Context.pack +"."+Context.firstToUpper(m.getName)+" rcv_"+Context.firstToUpper(m.getName)+" = ("+Context.pack +"."+Context.firstToUpper(m.getName)+") o;\n"
+ getPortName(m)
+ builder append "wrapper.get"+Context.firstToUpper(self.getName)+"_"+Context.port_name+"().send(rcv_"+Context.firstToUpper(m.getName)+");\n"
+ builder append "}\n"
+ }
+ builder append "}\n"
+
+ }
+
+ def generateParameters(builder: StringBuilder = Context.builder) {
+ System.out.println("jinlaileme")
+ builder append self.allPropertiesInDepth.collect{case p=>
+ (if(p.getType.scala_type(p.getCardinality != null).equals("Short")) "(short)0"
+ else "new "+p.getType.scala_type(p.getCardinality != null)+"()")
+ }.mkString(", ")
+ }
+ def getPortName(m:Message){
+ self.allPorts.foreach{p=>
+ if(p.getReceives.contains(m)){
+ Context.port_name = p.getName
+ }
+ }
+ }
+ def getPortNameWrapper(m:Message):String = {
+ var name =""
+ self.allPorts.foreach{p=>
+ if(p.getSends.contains(m)){
+ name = p.getName
+ }
+ }
+ (name)
+ }
+}
View
2  org.thingml.compilers/src/main/scala/org/thingml/scalagenerator/ScalaGenerator.scala
@@ -77,7 +77,7 @@ object ScalaGenerator {
case t: PrimitiveType => PrimitiveTypeScalaGenerator(t)
case t: Enumeration => EnumerationScalaGenerator(t)
case _ => TypeScalaGenerator(self)
- }
+ }
implicit def scalaGeneratorAspect(self: TypedElement) = self match {
case t: Function => FunctionScalaGenerator(t)
View
67 org.thingml.editor.standalone/BookhotelMediator_KV.java
@@ -0,0 +1,67 @@
+/**
+ * Copyright (C) 2011 SINTEF <franck.fleurey@sintef.no>
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3, 29 June 2007;
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * File generated by the ThingML IDE /!\Do not edit this file/!\ In case of a
+ * bug in the generated code, please submit an issue on our GitHub
+ *
+ */
+package org.thingml.generated;
+
+import org.thingml.generated.*;
+import org.sintef.smac.*;
+import org.kevoree.annotation.*;
+import org.kevoree.framework.*;
+import org.thingml.generated.*;
+
+@Provides({
+ @ProvidedPort(name = "kv2thingML_client_port", type = PortType.MESSAGE)})
+@ComponentType
+public class Kv2ThingML_client extends AbstractComponentType {
+
+ Client thingML_client_component = new Client(new String(), new String(), new String(), (short) 0, (short) 0, new String(), new String());
+
+ @Start
+ public void startComponent() {
+ }
+
+ @Stop
+ public void stopComponent() {
+ }
+
+ @Update
+ public void updateComponent() {
+ }
+
+ @Port(name = "kv2thingML_client_port")
+ public void kv2thingML_client_port(Object o) {
+ if (o instanceof RRequest) {
+ RRequest rcv_RRequest = (RRequest) o;
+ kv2thingML_client_port.getPort("kv2thingML_client_port").get().send(rcv_RRequest);
+ }
+ if (o instanceof InputID) {
+ InputID rcv_InputID = (InputID) o;
+ kv2thingML_client_port.getPort("kv2thingML_client_port").get().send(rcv_InputID);
+ }
+ if (o instanceof TypeRequest) {
+ TypeRequest rcv_TypeRequest = (TypeRequest) o;
+ kv2thingML_client_port.getPort("kv2thingML_client_port").get().send(rcv_TypeRequest);
+ }
+ if (o instanceof Number) {
+ Number rcv_Number = (Number) o;
+ kv2thingML_client_port.getPort("kv2thingML_client_port").get().send(rcv_Number);
+ }
+ }
+}
View
39 org.thingml.editor.standalone/BookhotelMergeMediator_KV.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright (C) 2011 SINTEF <franck.fleurey@sintef.no>
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3, 29 June 2007;
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * File generated by the ThingML IDE
+ * /!\Do not edit this file/!\
+ * In case of a bug in the generated code,
+ * please submit an issue on our GitHub
+ **/
+
+package org.thingml.generated;
+import org.thingml.generated.*;
+import org.sintef.smac.*;
+import org.kevoree.annotation.*;
+import org.kevoree.framework.*;
+import org.thingml.generated.*;
+
+@Provides({
+@ProvidedPort(name = "kv2thingML_client_port", type = PortType.MESSAGE)})
+@ComponentType
+ public class Kv2ThingML_client extends AbstractComponentType{Client thingML_client_component = new Client(new String(), new String(), new String(), (short)0, (short)0, new String(), new String());
+
+@Start
+public void startComponent() {}@Stop
+public void stopComponent() {}@Update
+public void updateComponent() {}@Port(name = "kv2thingML_client_port")public void kv2thingML_client_port(Object o) {if (o instanceof RRequest) {RRequest rcv_RRequest = (RRequest) o;kv2thingML_client_port.getPort("kv2thingML_client_port").get().send(rcv_RRequest);}if (o instanceof InputID) {InputID rcv_InputID = (InputID) o;kv2thingML_client_port.getPort("kv2thingML_client_port").get().send(rcv_InputID);}if (o instanceof TypeRequest) {TypeRequest rcv_TypeRequest = (TypeRequest) o;kv2thingML_client_port.getPort("kv2thingML_client_port").get().send(rcv_TypeRequest);}if (o instanceof Number) {Number rcv_Number = (Number) o;kv2thingML_client_port.getPort("kv2thingML_client_port").get().send(rcv_Number);}}}
+
View
39 org.thingml.editor.standalone/BookhotelOneClientOneServer_KV.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright (C) 2011 SINTEF <franck.fleurey@sintef.no>
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3, 29 June 2007;
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * File generated by the ThingML IDE
+ * /!\Do not edit this file/!\
+ * In case of a bug in the generated code,
+ * please submit an issue on our GitHub
+ **/
+
+package org.thingml.generated;
+import org.thingml.generated.*;
+import org.sintef.smac.*;
+import org.kevoree.annotation.*;
+import org.kevoree.framework.*;
+import org.thingml.generated.*;
+
+@Provides({
+@ProvidedPort(name = "kv2thingML_client_port", type = PortType.MESSAGE)})
+@ComponentType
+ public class Kv2ThingML_client extends AbstractComponentType{Client thingML_client_component = new Client(new String(), new String(), new String(), (short)0, (short)0, new String(), new String());
+
+@Start
+public void startComponent() {}@Stop
+public void stopComponent() {}@Update
+public void updateComponent() {}@Port(name = "kv2thingML_client_port")public void kv2thingML_client_port(Object o) {if (o instanceof RRequest) {RRequest rcv_RRequest = (RRequest) o;kv2thingML_client_port.getPort("kv2thingML_client_port").get().send(rcv_RRequest);}if (o instanceof InputID) {InputID rcv_InputID = (InputID) o;kv2thingML_client_port.getPort("kv2thingML_client_port").get().send(rcv_InputID);}if (o instanceof TypeRequest) {TypeRequest rcv_TypeRequest = (TypeRequest) o;kv2thingML_client_port.getPort("kv2thingML_client_port").get().send(rcv_TypeRequest);}if (o instanceof Number) {Number rcv_Number = (Number) o;kv2thingML_client_port.getPort("kv2thingML_client_port").get().send(rcv_Number);}}}
+
View
2  org.thingml.editor.standalone/src/main/java/org/sintef/thingml/MacIntegration.java
@@ -76,7 +76,7 @@ public void handleOpenApplication(ApplicationEvent applicationEvent) {
@Override
public void handleOpenFile(ApplicationEvent applicationEvent) {
System.out.println("open => "+applicationEvent.getFilename());
- editor.codeEditor().setText(editor.codeEditor()+"\n"+applicationEvent.getFilename());
+ //editor.codeEditor().setText(editor.codeEditor()+"\n"+applicationEvent.getFilename());
}
@Override
View
25 org.thingml.editor.standalone/src/main/scala/org/sintef/thingml/ThingMLPanel.scala
@@ -53,6 +53,7 @@ import java.io._
import java.util.Hashtable
import javax.management.remote.rmi._RMIConnection_Stub
import org.thingml.model.scalaimpl.ThingMLScalaImpl._
+import org.thingml.kevoreegenerator.KevoreeGenerator
import scala.collection.JavaConversions._
@@ -87,10 +88,13 @@ class ThingMLPanel extends JPanel {
var bThingML = new JButton("Generate Comm")
var bThingML2 = new JButton("Generate Comm2")
var bCoAP = new JButton("Generate CoAP")
+ var bKevoree = new JButton("Generate Kevoree")
+
+ //TODO: add a button for the kevoree compiler
val filechooser = new JFileChooser();
filechooser.setDialogTitle("Select target directory");
filechooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
-
+
b.addActionListener(new ActionListener {
def actionPerformed(e: ActionEvent) {
println("Input file : " + targetFile)
@@ -213,12 +217,31 @@ class ThingMLPanel extends JPanel {
}
})
+ bKevoree.addActionListener(new ActionListener{
+ def actionPerformed(e:ActionEvent){
+ println("Input file : "+targetFile)
+ if(targetFile.isEmpty) return;
+
+ try{
+ val thingmlModel = loadThingMLmodel(targetFile.get)
+ thingmlModel.allConfigurations.foreach{c =>
+ KevoreeGenerator.compileAndRun(c,thingmlModel)
+ }
+ }
+ catch {
+ case t : Throwable => t.printStackTrace()
+ }
+ }
+ })
+
arduinoToolBar.add("Compilers", b)
arduinoToolBar.add("Compilers", bScala)
arduinoToolBar.add("Compilers", bSwing)
arduinoToolBar.add("Compilers", bThingML)
arduinoToolBar.add("Compilers", bThingML2)
arduinoToolBar.add("Compilers", bCoAP)
+ arduinoToolBar.add("Compilers", bKevoree)
+ //TODO
add(arduinoToolBar, BorderLayout.SOUTH)
Please sign in to comment.
Something went wrong with that request. Please try again.