[gme-users] Is it possible to debug or run a java component from Eclipse environment?

Gürkan Özhan gurkanozhan at gmail.com
Mon Feb 8 11:38:35 CST 2010


Dear GME Masters,
   I have a Java component that I have registered in GME to be invoked
on a GME model. All of the source code (as an Eclipse project) of the
component is readily available. I need to further modify the component
for some extra functionality. However I could not find a way to
dynamically debug the component within Eclipse as the component is
being invoked on a model inside the GME window. All I could do up to
now is to use the cumbersome effort of popping up a JOptionPane to
display the values of my critical data during runtime. I can also log
into a file too. Apparently, this is like carving with one's finger
nails. Therefore I am desperately seeking for an opportunity to be
able to debug at runtime.
    Alternatively, is there is a mechanism to run the interpreter
directly inside the Eclipse environment?

  When I examined gme.jar, I found the invokeEx method in
ComponentInvoker.java, whose API that I repeat below:

   /**
    * Main entry point of java interpreter invocation. GME calls this
method when the user
    * starts a java interpreter
    *
    * @param classPath     ClassPath of the user defined interpreter
    * @param jclass        Class of the user defined interpreter
    * @param iproject      MgaProject COM interface pointer
    * @param icurrentObj   The current MgaFCO COM object pointer
    * @param iselectedObjs MGAFCOs COM object pointer containing the
selected object
    * @param param         custom parameter for interpreter
    */
   public static void invokeEx(String classPath, String jclass, int
iproject, int icurrentObj, int iselectedObjs, int param )

I've modified this code to display the parameter values at runtime. I
found that iproject and icurrentObj parameters have some dynamically
created integer numbers. I believe that these values are produced
within the JVM being run by GME, pointing to the model. This of course
is of no use within the Eclipse environment.

Any help is very much appreciated. Best regards,

Gurkan Ozhan


More information about the gme-users mailing list