Difference between revisions of "JET FAQ How do I get a console when running JET from Java?"

From Eclipsepedia

Jump to: navigation, search
(New page: == Question == The JET2Platform API runs JET transformations, but does not create an execution console like the the JET UI does. How do I run a JET transformation from my project, and get ...)
 
m
 
Line 24: Line 24:
 
TODO
 
TODO
 
</pre>
 
</pre>
 +
 +
== See Also ==
 +
[[JET FAQ How do I run a JET transformation from Java?]]
  
 
Back to [[M2T-JET-FAQ]]
 
Back to [[M2T-JET-FAQ]]
  
 
[[Category:Modeling]][[Category:M2T]]
 
[[Category:Modeling]][[Category:M2T]]

Latest revision as of 10:46, 22 June 2007

[edit] Question

The JET2Platform API runs JET transformations, but does not create an execution console like the the JET UI does. How do I run a JET transformation from my project, and get an execution console?

[edit] Answer

The JET UI uses Eclipse launch configurations to describe a JET launch. Your code can use the org.eclipse.debug.core plug-in to construct a JET launch configuration, and then to run it.

JET provides a class, org.eclipse.jet.transform.JETLaunchConstants, which contains the constants needed to configure the JET specific parts of a launch configuration. Unfortunately, the logging level constants required by the LOG_FILTER_LEVEL launch parameter are private. Here are the values, as defined:

  public static final int ERROR_LEVEL = 5;
  public static final int WARNING_LEVEL = 4;
  public static final int INFO_LEVEL = 3;
  public static final int TRACE_LEVEL = 2;
  public static final int DEBUG_LEVEL = 1;

A future JET release will make these public.

To configure the options from the Common tab of the JET launch configuration dialog, your code needs to reference org.eclipse.debug.ui.IDebugUIConstants (which is defined in the org.eclipse.debug.ui plug-in).

TODO: Show example here

TODO

[edit] See Also

JET FAQ How do I run a JET transformation from Java?

Back to M2T-JET-FAQ