heads-project / heads_ide Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://heads-project.eu
Home Page: http://heads-project.eu
This text is not understandable if you are unfamiliar to thingml and Eclipse:
"To check if the ThingML editor is properly installed, open a sample ".thingml" file. It should open with the ThingML editor (text editor with syntax highlighting). To check if the compilers are properly installed, right-click on a ".thingml" file. You should have a "HEADS / ThingML" sub-menu in the context menu. This sub-menu allows calling the different ThingML compilers."
There are no .thingml file available in the bundle, and where to find the "context menu" is not obvious.
The size of HEADS IDE is 824MB. Product contains Scala, WST, Python, JST, Google Apps, etc. This has to be reviewed and minimized. Remove not needed features and plugins. Not all of the platforms should be added by default, instead a feature for each supported platform should be created with dependencies from Eclipse Platform or any other plugins, so that it will be added to IDE once platform feature is installed.
The tutorial should be updated to include instruction to include import new Maven project after code is generated.
There is no option (wizard) to create HEADS Project. The project should contain model (ThingML) and deployment configuration (Kevoree). Currently two seperate wizards exists for ThingML and Kevoree.
For C and Java the generated code for different ThingML programs are given different names and directories.
For JS the same name and directory is used for different programs
We need to provide more information (or at least pointers to proper guides/tutorials) on how to get started with Eclipse.
The PrintIncrementForward made during my training works for Linux C and Plain JAVA.
For JS the code runs the first timer tick, but the timer does not reload
This operation will generate faulty C code
transition -> Init
event m : from_ender?pif_token
action do
to_starter!pif_token(m.token-1)
end
If not allowed, this should lead to HEADS-IDE error message
Though it might not be recommended to have a configuration and a thing having the same name, this is valid and should be supported by all compiler. The C compiler currently does not support that feature and generates a long list of error on make
cc -O2 -w -c ChatServer.c
cc -O2 -w -c ChatClient.c
cc -O2 -w -c CPrinter.c
cc -O2 -w -c runtime.c
cc -o ChatServer ChatServer.o ChatClient.o CPrinter.o ChatServer.o runtime.o -lpthread -lm
ChatServer.o: In function `enqueue_ChatServer_send_chatRoom_chat_stop':
ChatServer.c:(.text+0x0): multiple definition of `enqueue_ChatServer_send_chatRoom_chat_stop'
ChatServer.o:ChatServer.c:(.text+0x0): first defined here
ChatServer.o: In function `enqueue_ChatServer_send_chatRoom_chat':
ChatServer.c:(.text+0xd0): multiple definition of `enqueue_ChatServer_send_chatRoom_chat'
ChatServer.o:ChatServer.c:(.text+0xd0): first defined here
ChatServer.o: In function `enqueue_ChatServer_send_Print_customPrint':
ChatServer.c:(.text+0x1a0): multiple definition of `enqueue_ChatServer_send_Print_customPrint'
ChatServer.o:ChatServer.c:(.text+0x1a0): first defined here
ChatServer.o: In function `enqueue_ChatClient_send_chatRoom_chat_start':
ChatServer.c:(.text+0x310): multiple definition of `enqueue_ChatClient_send_chatRoom_chat_start'
ChatServer.o:ChatServer.c:(.text+0x310): first defined here
ChatServer.o: In function `enqueue_ChatClient_send_chatRoom_chat_stop':
ChatServer.c:(.text+0x3e0): multiple definition of `enqueue_ChatClient_send_chatRoom_chat_stop'
ChatServer.o:ChatServer.c:(.text+0x3e0): first defined here
ChatServer.o: In function `enqueue_ChatClient_send_chatRoom_chat':
ChatServer.c:(.text+0x4b0): multiple definition of `enqueue_ChatClient_send_chatRoom_chat'
ChatServer.o:ChatServer.c:(.text+0x4b0): first defined here
ChatServer.o: In function `enqueue_ChatClient_send_Print_customPrint':
ChatServer.c:(.text+0x580): multiple definition of `enqueue_ChatClient_send_Print_customPrint'
ChatServer.o:ChatServer.c:(.text+0x580): first defined here
ChatServer.o: In function `dispatch_ChatClient_send_chatRoom_chat_start':
ChatServer.c:(.text+0x6f0): multiple definition of `dispatch_ChatClient_send_chatRoom_chat_start'
ChatServer.o:ChatServer.c:(.text+0x6f0): first defined here
ChatServer.o: In function `dispatch_ChatClient_send_chatRoom_chat_stop':
ChatServer.c:(.text+0x720): multiple definition of `dispatch_ChatClient_send_chatRoom_chat_stop'
ChatServer.o:ChatServer.c:(.text+0x720): first defined here
ChatServer.o: In function `dispatch_ChatClient_send_chatRoom_chat':
ChatServer.c:(.text+0x750): multiple definition of `dispatch_ChatClient_send_chatRoom_chat'
ChatServer.o:ChatServer.c:(.text+0x750): first defined here
ChatServer.o: In function `dispatch_ChatClient_send_Print_customPrint':
ChatServer.c:(.text+0x780): multiple definition of `dispatch_ChatClient_send_Print_customPrint'
ChatServer.o:ChatServer.c:(.text+0x780): first defined here
ChatServer.o: In function `dispatch_ChatServer_send_chatRoom_chat_stop':
ChatServer.c:(.text+0x7b0): multiple definition of `dispatch_ChatServer_send_chatRoom_chat_stop'
ChatServer.o:ChatServer.c:(.text+0x7b0): first defined here
ChatServer.o: In function `dispatch_ChatServer_send_chatRoom_chat':
ChatServer.c:(.text+0x7c0): multiple definition of `dispatch_ChatServer_send_chatRoom_chat'
ChatServer.o:ChatServer.c:(.text+0x7c0): first defined here
ChatServer.o: In function `dispatch_ChatServer_send_Print_customPrint':
ChatServer.c:(.text+0x7f0): multiple definition of `dispatch_ChatServer_send_Print_customPrint'
ChatServer.o:ChatServer.c:(.text+0x7f0): first defined here
ChatServer.o: In function `processMessageQueue':
ChatServer.c:(.text+0x810): multiple definition of `processMessageQueue'
ChatServer.o:ChatServer.c:(.text+0x810): first defined here
ChatServer.o: In function `initialize_configuration_ChatServer':
ChatServer.c:(.text+0xb40): multiple definition of `initialize_configuration_ChatServer'
ChatServer.o:ChatServer.c:(.text+0xb40): first defined here
ChatServer.o: In function `main':
ChatServer.c:(.text.startup+0x0): multiple definition of `main'
ChatServer.o:ChatServer.c:(.text.startup+0x0): first defined here
ChatServer.o: In function `initialize_configuration_ChatServer':
ChatServer.c:(.text+0xb4a): undefined reference to `register_ChatServer_send_chatRoom_chat_listener'
ChatServer.c:(.text+0xb54): undefined reference to `register_ChatServer_send_chatRoom_chat_stop_listener'
ChatServer.c:(.text+0xb5e): undefined reference to `register_ChatServer_send_Print_customPrint_listener'
ChatServer.c:(.text+0xc42): undefined reference to `ChatServer_behavior_OnEntry'
ChatServer.o: In function `dispatch_ChatClient_send_chatRoom_chat_start':
ChatServer.c:(.text+0x70e): undefined reference to `ChatServer_handle_chatRoom_chat_start'
ChatServer.o: In function `dispatch_ChatClient_send_chatRoom_chat_stop':
ChatServer.c:(.text+0x73e): undefined reference to `ChatServer_handle_chatRoom_chat_stop'
ChatServer.o: In function `dispatch_ChatClient_send_chatRoom_chat':
ChatServer.c:(.text+0x76e): undefined reference to `ChatServer_handle_chatRoom_chat'
ChatServer.o: In function `initialize_configuration_ChatServer':
ChatServer.c:(.text+0xb4a): undefined reference to `register_ChatServer_send_chatRoom_chat_listener'
ChatServer.c:(.text+0xb54): undefined reference to `register_ChatServer_send_chatRoom_chat_stop_listener'
ChatServer.c:(.text+0xb5e): undefined reference to `register_ChatServer_send_Print_customPrint_listener'
ChatServer.c:(.text+0xc42): undefined reference to `ChatServer_behavior_OnEntry'
ChatServer.o: In function `dispatch_ChatClient_send_chatRoom_chat_start':
ChatServer.c:(.text+0x70e): undefined reference to `ChatServer_handle_chatRoom_chat_start'
ChatServer.o: In function `dispatch_ChatClient_send_chatRoom_chat_stop':
ChatServer.c:(.text+0x73e): undefined reference to `ChatServer_handle_chatRoom_chat_stop'
ChatServer.o: In function `dispatch_ChatClient_send_chatRoom_chat':
ChatServer.c:(.text+0x76e): undefined reference to `ChatServer_handle_chatRoom_chat'
collect2: error: ld returned 1 exit status
make: *** [ChatServer] Error 1
When executing examples from Tutorials the JavaScript outputs contain extra new line for each output, hence producing different output comparing to C or Java code execution.
In the tutorial 3 for platform C file "CPrinter.thingML" contain the incorrect import file name
[import "../CustomPrint.thingml"] which cause the compilation errors .
Please correct the import file name which is [import "../CustomPrinter.thingml"].
Provide samples for ThingML, Kevoree, etc that can be deployed in the workspace using Eclipse samples mechanisms.
It should be possible to specify java package for the generated code for Java language.
Is it me or the link in the README that is supposed to help you download the latest version of the HEADS IDE is just sending you to the Issues page ?
### 0. Installing the HEADS tools for ThingML
To follow this tutorial, you need to have the ThingML editor and compilers. They are released as plugins for the Eclipse IDE. There are two options for installing the ThingML tools:
* Download the latest HEADS IDE Eclipse bundle. This bundle contains all the HEADS plugins already installed. Information on downloading and installing can be found [here](https://github.com/HEADS-project/heads_ide/issues).
I cannot see how is it helpful.
Maybe it should simply point to HEADS IDE download and issues tracking
c and Java execution can be stopped by using CTRL+C. This is not a case with JavaScript code. However, CTRL+D stops the execution for JavaScript.
When I try to compile to Java code, Eclipse does still spinning and then crashes so I have to restart it, but I can find the generated java code in my workspace. However, it works fine for other compilers. I am using Heads IDE Eclipse, Mac OS and the HelloWorld example.
Create a lightweight Maven- or NPM-like repository for HEADS artifacts so that models can be more easily constructed by importing other models from the standard HEADS libraries (timers, serial, etc).
I guess we can put those libraries in a separate GitHub repository and enable the import mechanism in ThingML to import from GitHub (or any HTTP address), a bit similarly to what golang proposes.
Kevoree 5 provides a better support for multi-platforms, we should switch to this version once stable. This includes:
See Issue TelluIoT/ThingML#64
Both Java and NodeJS compile, but make fails to compile the C code.
It seems it is using kevoree 3.6.8 instead of latest stable version (using kevoree watchdog)
When things are renamed etc. old generated stuff will be left back and cause problems
Attempt to compile HelloWorld to Java brings IDE to not responding state.
Version: org.heads_ide.product-1.0.0-SNAPSHOT-macosx.cocoa.x86_64
OS: Mac OS X Version 10.9.5
When Running the Hello World example of the ThingML tutorial, the program generated for the different platforms stops in the Bye state but does not terminate. The JS generator terminates automatically.
Generated javascript for the Node.js platform should be refactored so that it produces a proper npm module.
The generated state.js
library in lib/state.js
is available in the npm
registry.
The generated state.js wrapper at the beginning of behavior.js
should be externalized as an npm module.
For instance:
thingml-state
module that depends on state.js
, and publish it to the npm
registry.behavior.js
that uses thingml-state
package.json
at the root of the javascript/
folderThe overall generated code base should look like this:
Samples:
package.json
{
"name": "thing-helloworld",
"version": "1.0.0",
"description": "HelloWorld thing generated from ThingML",
"main": "helloworld.js",
"dependencies": {
"thingml-state": "^X.Y.Z"
}
}
helloworld.js
var ThingMLState = require('thingml-state');
/**
* Definition for type : HelloThing
**/
function HelloThing() {
// ...
// state machine (states and regions)
// DONT DO this.HelloThing_HelloWorld
// no one is using upper case for their attributes :D
this.helloworld_region = ThingMLState.buildRegion("HelloWorld");
// ...
}
About the Connector
function, it might also need its own module (?)
At least one person per partner should complete the tutorial:
Using the internal "print" in ThingML map anything directly to the target print function
Generated code made is similar to:
int myVar;
fprintf(stdout, myVar);
This should lead to a compilation error not to core dump
TODO comment points to
ThingML -> Compile X
instead of
HEADS/ThingML -> X
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.kevoree.project</groupId>
<artifactId>helloworld</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>helloworld</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<xtend.version>2.6.2</xtend.version>
<kevoree.version>5.1.3</kevoree.version>
</properties>
<dependencies>
<dependency>
<groupId>org.kevoree</groupId>
<artifactId>org.kevoree.annotation.api</artifactId>
<version>${kevoree.version}</version>
</dependency>
<dependency>
<groupId>org.kevoree</groupId>
<artifactId>org.kevoree.api</artifactId>
<version>${kevoree.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtend</groupId>
<artifactId>org.eclipse.xtend.lib</artifactId>
<version>${xtend.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.kevoree.tools</groupId>
<artifactId>org.kevoree.tools.mavenplugin</artifactId>
<version>${kevoree.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<nodename>node0</nodename>
<model>src/main/kevs/main.kevs</model>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<version>${xtend.version}</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
<goal>xtend-install-debug-info</goal>
<goal>xtend-test-install-debug-info</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>snap</id>
<snapshots><enabled>true</enabled></snapshots>
<url>http://oss.sonatype.org/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>snap1</id>
<snapshots><enabled>true</enabled></snapshots>
<url>http://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
</project>
Every XTend-related things are useless.
Indentation is messy.
Currently, we can define "interfaces" for the asynchronous behavior by defining messages and ports in a thing fragment and including this fragment in a concrete thing.
We should also be able to do similar things for synchronous behavior (typically functions). This would for example allow users to define their own printer/formatter/etc (as requested after Tutorial 1) without:
Here is what I think would make sense:
thing fragment myFragment {
abstract function myFunction(....)
}
thing myConcreteThing includes myFragment {
refined function myFunction(...) do
//do something useful here
end
}
thing myPIMThing includes myFragment {
....
myFunction(....) //in the PIM thing, we should be allowed to call the abstract function, so that we remain PIM
....
}
configuration myConf {
instance myInstance : myPIMThing with myConcreteThing //at deployment time, we cannot have abstract function anymore and we should "mix" the PIM thing with concrete things refining the abstract function
}
//alternatively it should be allowed to have PSMThing that directly include refined function
thing myPSMThing includes myConcreteThing {
....
myFunction(...) //will call the conrete implementation
....
}
Once project is re-opened thingml-gen folder is not shown. Refreshing project does not help.
The folder appears with all available platforms after one of the sources is compiled again.
Quick Run as Kevoree Script should invoke grunt kevoree --no-reinstall
but it seems like it does not
The ThingML print function can only print a string
More flexibility is wanted, at least printing numbers
In the last Heads IDE.
java.lang.ClassNotFoundException: org.sintef.thingml.resource.thingml.ui.launch.ThingmlLaunchShortcut cannot be found by org.sintef.thingml.resource.thingml.ui_0.6.0.201412120908
Do you refactor something ?
loaded the HEADS-IDE environment, but it doesnt include the ThingML editor.
This is separately downloaded from thingml.org/dist .... but I dont know where to place it.
When starting eclipse I get many errors
eclipse.buildId=unknown
java.version=1.8.0_25
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86_64
org.eclipse.equinox.registry
Error
Tue Dec 09 15:09:42 CET 2014
Error instantiating adapter factory for "org.sintef.thingml.resource.thingml.ui.ThingmlEditor" declared by "org.sintef.thingml.resource.thingml.ui".
org.eclipse.core.runtime.CoreException: Plug-in org.sintef.thingml.resource.thingml.ui was unable to load class org.sintef.thingml.resource.thingml.ui.debug.ThingmlAdapterFactory.
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.core.internal.adapter.AdapterFactoryProxy.loadFactory(AdapterFactoryProxy.java:136)
at org.eclipse.core.internal.adapter.AdapterFactoryProxy.getAdapter(AdapterFactoryProxy.java:81)
at org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:295)
at org.eclipse.ui.part.WorkbenchPart.getAdapter(WorkbenchPart.java:155)
at org.eclipse.ui.texteditor.AbstractTextEditor.getAdapter(AbstractTextEditor.java:6213)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.getAdapter(AbstractDecoratedTextEditor.java:1430)
at org.eclipse.ui.editors.text.TextEditor.getAdapter(TextEditor.java:181)
at org.sintef.thingml.resource.thingml.ui.ThingmlEditor.getAdapter(ThingmlEditor.java:122)
at org.eclipse.debug.internal.ui.actions.ToggleBreakpointsTargetManager$ToggleBreakpointsTargetAdapterFactory.canGetToggleBreakpointsTarget(ToggleBreakpointsTargetManager.java:319)
at org.eclipse.debug.internal.ui.actions.ToggleBreakpointsTargetManager$ToggleBreakpointsTargetAdapterFactory.isEnabled(ToggleBreakpointsTargetManager.java:362)
at org.eclipse.debug.internal.ui.actions.ToggleBreakpointsTargetManager.getEnabledFactories(ToggleBreakpointsTargetManager.java:503)
at org.eclipse.debug.internal.ui.actions.ToggleBreakpointsTargetManager.getPreferredToggleBreakpointsTargetID(ToggleBreakpointsTargetManager.java:543)
at org.eclipse.debug.internal.ui.actions.ToggleBreakpointsTargetManager.getToggleBreakpointsTarget(ToggleBreakpointsTargetManager.java:550)
at org.eclipse.debug.ui.actions.ToggleBreakpointAction.update(ToggleBreakpointAction.java:202)
at org.eclipse.ui.texteditor.AbstractRulerActionDelegate.update(AbstractRulerActionDelegate.java:132)
at org.eclipse.ui.texteditor.AbstractRulerActionDelegate.setActiveEditor(AbstractRulerActionDelegate.java:89)
at org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate.setActiveEditor(RulerToggleBreakpointActionDelegate.java:100)
at org.eclipse.ui.internal.EditorPluginAction.editorChanged(EditorPluginAction.java:77)
at org.eclipse.ui.internal.EditorActionBuilder$EditorContribution.editorChanged(EditorActionBuilder.java:86)
at org.eclipse.ui.internal.EditorActionBuilder$ExternalContributor.setActiveEditor(EditorActionBuilder.java:135)
at org.eclipse.ui.internal.EditorActionBars.partChanged(EditorActionBars.java:357)
at org.eclipse.ui.internal.WorkbenchPage.updateActivations(WorkbenchPage.java:305)
at org.eclipse.ui.internal.WorkbenchPage.access$17(WorkbenchPage.java:287)
at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partActivated(WorkbenchPage.java:209)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$3.run(PartServiceImpl.java:236)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartActivated(PartServiceImpl.java:233)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:684)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:615)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:603)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:986)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3171)
at org.eclipse.ui.internal.WorkbenchPage.access$23(WorkbenchPage.java:3125)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:3107)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3102)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3066)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3047)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:573)
at org.python.pydev.navigator.actions.PyOpenResourceAction.openFiles(PyOpenResourceAction.java:95)
at org.python.pydev.navigator.actions.PyOpenPythonFileAction.run(PyOpenPythonFileAction.java:86)
at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:229)
at org.eclipse.ui.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:185)
at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:853)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:178)
at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:850)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1142)
at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:462)
at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1249)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:278)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:272)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:313)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.ClassNotFoundException: org.sintef.thingml.resource.thingml.ui.debug.ThingmlAdapterFactory cannot be found by org.sintef.thingml.resource.thingml.ui_0.6.0.201412051516
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:568)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
... 84 more
The name of the wizard for ThingML is ThingML Project and it is created under EMFText Project. This is misleading. The name should change and possible added under HEADS Menu Item.
By using this wizard the ThingML project is created with sample files. If this was meant to be used for tutorial only than the name of the wizard should include something like ThingML Examples.
Does ThingML handle the Float data type? because in datatypes.thingml all primitive types are defined except the Float type.
It should be possible to easily go from a Kevoree component and visualize its ThingML implementation (not just the code generated by ThingML)
mvn clean install
works well. When I try mvn kev:run
from the HEADS IDE (or from the CLI outside Eclipse), it fails to deploy the hello world:
It seems there is a ClassNotFoundException, probably linked to an inconsistency in the typeDefinition of the kevs model. But it is not clear to me what is the problem...
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Kevoree :: helloworld 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- org.kevoree.tools.mavenplugin:5.1.4:run (default-cli) @ helloworld ---
00:00 INFO: Bootstrap Kevoree node : node0, version 5.1.4
00:01 INFO: Resolved 19 typeDefinitions from Kevoree Registry http://registry.kevoree.org/v5/ (JavaNode/5.1.1,JavaNode/5.0.3,JavaNode/5.1.2,JavaNode/5.1.3,JavaNode/5.0.4,JavaNode/5.0.5,JavaNode/5.0.6,JavaNode/5.0.6-SNAPSHOT,JavaNode/5.0.7,JavaNode/5.1.2-SNAPSHOT,JavaNode/5.1.4-SNAPSHOT,JavaNode/5.0.5-SNAPSHOT,JavaNode/5.0.8-SNAPSHOT,JavaNode/5.0.4-SNAPSHOT,JavaNode/5.1.1-SNAPSHOT,JavaNode/5.0.3-SNAPSHOT,JavaNode/5.1.0,JavaNode/5.0.7-SNAPSHOT,HelloWorld/0.0.1-SNAPSHOT)
00:01 WARN: Try to select snapshot in best effort mode for org.kevoree.example.HelloWorld
00:18 INFO: Resolving ............. /packages[org]/packages[kevoree]/packages[library]/packages[java]/deployUnits[hashcode=,name=org.kevoree.library.java.javaNode,version=5.1.3]
00:18 INFO: Resolved in 0ms
00:18 INFO: JavaNode, changing LOG level to INFO
00:18 INFO: Starting node type of node0
00:18 ERROR: Error while creating instance HelloWorld
java.lang.ClassNotFoundException: org.kevoree.example.HelloWorld
at org.kevoree.kcl.impl.FlexyClassLoaderImpl.loadClass(FlexyClassLoaderImpl.java:111)
at org.kevoree.kcl.impl.FlexyClassLoaderImpl.loadClass(FlexyClassLoaderImpl.java:22)
at org.kevoree.bootstrap.kernel.KevoreeCLKernel.createInstance(KevoreeCLKernel.java:172)
at org.kevoree.library.java.command.AddInstance.run(AddInstance.java:98)
at java.lang.Thread.run(Thread.java:745)
00:18 ERROR: Inconsistency in typeDefinition
{"class":"org.kevoree.ComponentType@name=HelloWorld,version=0.0.1-SNAPSHOT","name":"HelloWorld","abstract":"false","version":"0.0.1-SNAPSHOT","deployUnits":["/packages[org]/packages[kevoree]/packages[sample]/deployUnits[hashcode=,name=helloworld,version=0.0.1-SNAPSHOT]"],"superTypes":[],"dictionaryType":[
{"class":"org.kevoree.DictionaryType@20004215231418391615188","generated_KMF_ID":"20004215231418391615188","attributes":[
{"class":"org.kevoree.DictionaryAttribute@greetMessage","datatype":"STRING","defaultValue":"Hello, world!","name":"greetMessage","fragmentDependant":"false","optional":"true","state":"false","genericTypes":[]}
]}
],"metaData":[
{"class":"[email protected]","name":"java.class","value":"org.kevoree.example.HelloWorld"}
],"required":[
{"class":"org.kevoree.PortTypeRef@hello","noDependency":"false","name":"hello","optional":"true","ref":[],"mappings":[]}
],"provided":[]}
00:18 ERROR: Error while adding instance myComp
java.lang.NullPointerException
at org.kevoree.library.java.wrapper.KInstanceWrapper.setTargetObj(KInstanceWrapper.java:69)
at org.kevoree.library.java.wrapper.WrapperFactory.wrap(WrapperFactory.java:40)
at org.kevoree.library.java.command.AddInstance.run(AddInstance.java:99)
at java.lang.Thread.run(Thread.java:745)
00:18 WARN: Error during execution of AddInstance myComp
00:18 WARN: JavaSENode is aborting last update...
00:18 INFO: Remove instance /nodes[node0]/components[myComp]
00:18 WARN: JavaSENode update aborted in 14 ms
00:18 INFO: End deploy result=false-12
00:18 INFO: Bootstrap completed
The exact same implementation in 3 platforms except from print statements generate 3 different outputs.
The config is:
configuration ChatServer {
instance client1 : JSChatClient
instance client2 : JSChatClient
instance server : JSChatServer
connector client1.chatRoom => server.chatRoom
connector client2.chatRoom => server.chatRoom
}
Outputs
C:
Server: message no: 1, Entering Room, participants in chat: 1
Server: message no: 2, Entering Room, participants in chat: 2
Client: message no: 1, Welcome!
Client: message no: 1, Welcome!
Client: message no: 2, Welcome!
Client: message no: 2, Welcome!
Server: message no: 3, chat message: Chat
Server: message no: 4, chat message: Chat
Server: message no: 5, chat message: Chat
Server: message no: 6, chat message: Chat
Client: message no: 3, Chat
Client: message no: 3, Chat
Client: message no: 4, Chat
Client: message no: 4, Chat
Bye.
Bye.
Server: message no: 7, chat message: Chat
Server: message no: 8, chat message: Chat
Server: message no: 9, chat message: Chat
Server: message no: 10, chat message: Chat
Server: Leaving Room, participants in chat: 1
Server: Leaving Room, participants in chat: 0
JavaScript:
Client: message no:1, Welcome!
Server: Entering Room, participants in chat: 1
Client: message no:2, Chat
Server: message no:2, message: Chat
Client: message no:3, Chat
Server: message no:3, message: Chat
Client: message no:4, Chat
Server: message no:4, message: Chat
Bye.
Server: message no:5, message: Chat
Server: Leaving Room, participants in chat: 0
Server: Entering Room, participants in chat: 1
Server: message no:7, message: Chat
Client: message no:1, Welcome!
Server: message no:8, message: Chat
Client: message no:2, Chat
Server: message no:9, message: Chat
Client: message no:3, Chat
Server: message no:10, message: Chat
Client: message no:4, Chat
Server: Leaving Room, participants in chat: 0
Bye.
Java:
Server: Entering Room, participants in chat: 1
Client: message no:1, Welcome!
Server: Entering Room, participants in chat: 2
Client: message no:2, Welcome!
Server: message no:3, message: Chat
Client: message no:3, Chat
Server: message no:4, message: Chat
Client: message no:4, Chat
Server: message no:5, message: Chat
Bye.
Server: message no:6, message: Chat
Server: Leaving Room, participants in chat: 1
My analyse of the situations is as follows:
Java: Message is only passed on to the first connector. Should be passed to all connectors
Javascript and C
Scheduler works different. Client 1 is allowed to finish behavior before Client 2 starts running. Not wrong, but the interleaving of messages is different. Client 2 would starve if client 1 just continued to send messages.
Trying to press ctrl+space after "tim" does not bring up any alternatives. Works elsewhere in the code, e.g. after event keyword.
state Init {
on entry do
tim(ctrl+space here)
end
transition -> Init
event timer?timer_timeout
action do
print "Hello World!\n"
end
}
In the tutorial it states:
"The code will be generated in an src-gen folder within the same eclipse project as the ThingML source file. One sub-folder is created for each different target platform and an additional sub-folder is created for each configuration"
The folder is not src-gen but thingml-gen.
Also where to start build should be better specified, must be where the POM file is.
My build fails with the following:
PS C:\work\heads\heads-ide\workspace\Tutorial1\thingml-gen\java\HelloCfg> mvn clean package exec:java -Dexec.mainClass=org.thingml.generated.Main
[INFO] Scanning for projects...
....
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.108 s
[INFO] Finished at: 2014-12-15T12:55:15+01:00
[INFO] Final Memory: 9M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase ".mainClass=org.thingml.generated.Main". You must specify a valid lifecycle phase or a g
oal in the format : or :[:]:. Available
lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, co
mpile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, te
st-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integrati
on-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException
When creating a new thingml model, we have to create a new "EMFText .thingml file". It would be nicer if we could create a new "ThingML model" instead or something less confusing than "EMFText .thingml file"
The generated code should follow the Java Programming Style Guide. For example the proper use of indentation, tabs and spacing.
The project architecture in the ThingML training tutorial put the "top level configuration" into the platform specific files.
This results in duplication of platform independent configuration for all the platforms.
We should have a project architecture where platform specific files are like libraries (make and dont touch). The configuration section should be split into at least two sections.
The platform independent configuration section should be the top where the code generation is started for N targets.
At least one person per partner should complete the tutorials:
HEADS Methodology should also be available from within Eclipse.
One option is to directly use the web-browser embedded into Eclipse.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.