Re: [tcljava-user] Creating an Eclipse plug-in for TclBlend
Brought to you by:
mdejong
From: Gregory P. <gp...@ls...> - 2005-08-24 01:37:10
|
Hi Patrick, I probably haven't been clear in what my application is doing. What I am writing is an Eclipse (Rich Client Platform) RCP application. This application will be writing in Eclipse Java and it will have a Tcl command shell. This command shell will be written using the Eclipse SWT StyleText widget. This command shell will call TclBlend's Java->Tcl classes. For example: Interp interp = new Interp(); interp.eval("puts hello"); ... The reason I don't want to use Jacl to provide a Tcl interface to my Java application is that I need to load Itcl because I have existing Tcl code that needs to run in this command shell which depends on Itcl. So far, I've been able to build a tcl.lang Eclipse plug-in, however, I'm working on a way for it to find the init.tcl file which I plan to distribute with my RCP application. BTW, I should note that I built TclBlend by statically linking in Tcl 8.4.11 using the .a file. This eliminates the need for my RCP application to locate and load the libtcl8.4.so file. Usually, there's always a way to do something. I'm well on my way to finding it. I was just hoping that someone on this user group might have some information that would help. Thanks, Greg Pierce Patrick Finnegan wrote: > See my post on comp.lang.tcl re running JACL under RAD6/Eclipse. > > http://groups.google.com/group/comp.lang.tcl/browse_frm/thread/3d26cccab289a00e/c59a217ca0bdd708?lnk=st&q=group:*tcl*+author:Patrick+author:Finnegan&rnum=2&hl=en#c59a217ca0bdd708 > > In my opinion developing an Eclipse plugin for TclBlend is rather > pointless as TclBlend is architected to connect to a JVM rather than > run inside a JVM. It's designed to expose the Java system libraries > for use in a dynamic language environment. Mo may correct me but > AFAIK you cannot write native Java under TclBlend so you can't debug > under Eclipse. > > I use TclBlend to implement system monitoring scripts for MQ Series > and DB2 using the JDK and IBM supplied Java API libraries. Since > TclBlend is certified to work with only a certain release of JAVA we > compile TclBlend on Windows against the appropriate JDK and bundle > that JDK with the distro so TclBlend always knows the location of the > JDK. The Sun JDK licence allows JDK re-distribution with applications. > > The directory structure looks like: > > D:\tclBlend > D:\tclBlend\JDK142 > D:\tclBlend\lib > D:\tclBlend\bin > > We drop any required tcl packages in the lib directory and ship these > as well. We compile TclBlend on Windows XP and deploy to Windows 2003 > server with no issues. On Win2k TclBlend is called from a bat file > "jtclsh.bat" that sets up the env vars. I created a tcl script > "tclblend.tcl" to set the required env vars then starpacked it using > the "set base $starkit::topdir" to locate the installation directory > and from there the relative location of the JDK. Tclblend.exe calls > tclsh.exe which locates the JDK in the same sub-directory of the > installation directory regardless of where TclBlend is installed. > > Eclipse may be useful if someone writes a Tcl editor/debug plugin that > can switch from Tcl to the java editor/debugger when TclBlend calls a > java class or method. Otherwise stick with SourceNav. > |