Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ease-dev] Hello World Java Script

Hi Raphael,

You might find it useful to clone the ease examples scripts:
https://git.eclipse.org/c/ease/org.eclipse.ease.scripts.git/

To answer the specific questions:

> I try a Hello-World-Example, but my Hello World text was not written
> in the UI Console (only to the console of Eclipse). So
> System.out.println ist not written to the write console.
When using "System" from Javascript, you are using the one in the same
JVM as Eclipse is running, so System.out is the stdout of Eclipse, not
the console. Example:
https://git.eclipse.org/c/ease/org.eclipse.ease.scripts.git/tree/JavaScript%20Beginner%20Tutorial/01%20Hello%20world/03%20Hello%20World%20SysOut.js

> Does someone know how can I print to the right console?
Use the custom provided print() method. Example:
https://git.eclipse.org/c/ease/org.eclipse.ease.scripts.git/tree/JavaScript%20Beginner%20Tutorial/01%20Hello%20world/01%20Hello%20world.js


> And second question: How can I load modules?
Further example in same category is using showInfoDialog from the UI
Module. The code is:

loadModule('/System/UI');
showInfoDialog("Hello World", "Greetings");

The full example (which has no more code, but comments):
https://git.eclipse.org/c/ease/org.eclipse.ease.scripts.git/tree/JavaScript%20Beginner%20Tutorial/01%20Hello%20world/02%20Hello%20World%20UI.js

For documentation on the modules, open Help within your EASE install.

HTH
Jonah


Back to the top