Eclipse, debug and java extensions

39 views
Skip to first unread message

Tomás Puelma

unread,
Jun 22, 2010, 7:59:51 PM6/22/10
to SPARK Users Group
Hi,

I was wondering if there is a way to compile/execute SPARK java code
from Eclipse, to take advantage of this SDK features, like debugging.

I suppose one could make a model in SPARK-PL, translate the code to
Java using the SPARK GUI and then use Eclipse to compile, debug and
execute the model. Is this posible? Or is there any other way one can
make debugging?

Also... is it possible to extend the java code generated from SPARK-PL
with more, self-programmed java code if the SPARK-PL language were not
expressive enough.

Thanks in advance,

best,

Tomas

Alexey

unread,
Jun 24, 2010, 10:05:22 AM6/24/10
to SPARK Users Group
Hi Tomas,

It is always possible to create a SPARK model in Java using Eclipse
(or another IDE). It is also true that the models created in SPARK-PL
are translated into Java first, and then compiled. So, you can use
Eclipse for debugging SPARK-PL models. The Java code of translated
models is located in the folder "output" which is automatically
created for each SPARK-PL model.

SPARK-PL can be extended with additional commands. Now, it is not very
convenient and simple. To add a new command, one needs to edit files
"logo/commands.xml" and/or "logo/SparkTypes.xml". The syntax of these
files is not very complicated, and if you want to add a simple command
with arguments (like a function which returns some value), then it
will be not hard to do. It is more difficult to extend SPARK with new
control commands (like "if", "for", etc.), but it is also possible in
some cases (for example, commands "ifelse", "repeat" are defined in
commands.xml, meanwhile commands "ask", "for" are translated in a
special way).

Right now, a new version of SPARK-PL is developed where users will be
able easily extend the language with new commands and constructions.

If you want, I can describe everything in more details, but then it
will be simpler for me if you give me a specific example of what you
want to get. Then I will be able to write down a step by step
instruction for this.

Best,
Alexey
Reply all
Reply to author
Forward
0 new messages