|
|
How does OpenOffice.org and the IDE cooperate (from user perspective)?What technical issues have to be looked at for this to be achieved? The current situation (and possible future improvements)Let us examine the scenario where the user has received a document containing a broken Java script (assume that we've got the binding of Java scripts working in a similar way to StarBasic scripts, and that the Java runtime is initiated in the same way as for Java UNO components). We shall examine the steps needed to debug the script. The sections in bold are possible suggestions as to how this process could be made easier for the developer.
DebuggingCurrently within forte, we can do:
The ConnectPanel is good place to look on how to attach JPDA to the JVM From Jan Jancura of NetBeans/NetBeans JPDA debugger is default debugger "by default", so I am not sure what do you exactly want, but:
End quote Having Breakpoints at the start of a methodTo set a breakpoint in OpenOffice.org at *just* the method level, is a matter of harnessing the OpenOffice.org JVM's Debug Interface, the JVMDI will allow a developer to set breakpoints on methods without the use of an IDE.
The method in JVMDI is
More information on this is available at JVMDI Reference Setting a breakpoint on a method can also be done through the Open APIs in NetBeans, look at NetBeans Open APIs for more information. StorageStorage depends on the structure of the stored scripts within the document, currently, we can place Java source files into a OpenOffice.org document, and view and edit the source in forte. The problem arises when the scripts are in a jar file in the OpenOffice.org document, the content of the jar file is inaccessible to forte. However, this could be over come, through development of a module of forte for the forte filesystem, which would recursively "look into" zip/jar files. Dynamically, "mount and umounting" filesystems is achievable through the forte filesystem API, when editing scripts that OpenOffice.org is currently using, a forte module developed for scripting could possible tell OpenOffice.org through IPC that the scripts have been modified and to reload the scripts. One possible problem with Storage, is when OpenOffice.org launches the IDE, and it wants the IDE to edit the scripts. As the script is in memory and the contents of the document stored may be edited, this could have potential problems, like if the IDE edits the script through the filesystem, and saved the script in the document, OpenOffice.org would not get the edits, it has made into the document. We came up with two probable solutions to these problems
Our preferred solution is the second solution, it is a much cleaner solution, has everything is held in memory, there is multiple accesses to the filesystem. Also, if in the first solution, the script got saved back to the OpenOffice.org file and there were edits on the content of the file, the edits might not be saved. With the second solution, one process, OpenOffice.org is able to access the actual file, NetBeans is only able to access the serialized content. Links
|


