NetPhantom and Eclipse Coexistence

NetPhantom and Eclipse are required to communicate in real time in order to coexist and integrate properly. They are however independent processes, so they may run stand-alone. The Eclipse workspace is the sharing point, and Eclipse locks it whenever in use.

NetPhantom Editor can use a project that is shared with Eclipse by having the reference to the Eclipse workspace location configured. This causes NetPhantom Editor to request a lock of the workspace before beginning an operation, such as a Build operation. If the lock can be obtained, i.e. if Eclipse is not running or is not using that workspace, NetPhantom will compile REXX and Java code. When the lock cannot be obtained, the console will show a message about it and let the Eclipse Builder run instead (the NetPhantom plug-in registers a REXX Builder and a post-Java Builder to handle compilation).

Several functions are added to facilitate the integration, i.e. to enable NetPhantom to launch Eclipse, verification that the NetPhantom plug-ins are up-to-date. Eclipse supports launching NetPhantom Editor at start and when the NetPhantom toolbar icon for connection is pressed.

The Eclipse icon in the menu bars of the Editor Terminal and Panel parts is enabled showing that the connection to Eclipse is established. If the icon is grayed, this indicates no connection, and pressing the icon will launch Eclipse if the process is not already running.

The icons for the Terminal part, the Panel part and Eclipse is otherwise used to activate its respective window as the desktop does not have room for all of them at once.

REXX Compilation in Eclipse

When REXX is compiled in Eclipse, when a REXX file is saved (and Build automatically option is enabled), all errors that can be directly related to the REXX source is marked with errors directly in the source editor of the errorneous line. These are typically errors such as syntax errors.

As REXX is compiled into NetRexx that has a different structure, the error cannot automatically be reported to an accurate location in the original REXX source. A .rexxerr file is therefore created (with a red file icon) containing the textal error message in full. This file can be opened by simply double-clicking on the file. The Eclipse Problems view is also populated with compilation problems.

(Click to enlarge)

An error in GGGMAC.rexx calling the function posi(...) instead of pos(...) would result in the above scenario. In the Explorer, the GGGMAC.rexxerr file is created containing the text that is shown in the yellow tooltip that is displayed when the mouse pointer is moved of the error icon of line 1 in the source code. The Problem view gets two entries for the error, one that is placed in the GGGMAC.rexx source and one in the generated NetRexx source GGGMAC.nrx in the gensrc/rexx directory.