BillS avatar image
BillS asked BillS posted

Way to call built-in Tcl interp, but not from a "tool"?

We have a scenario where a menu contribution we're making to iTest may receive some Tcl data (specifically Tcl commands loaded from a text file). We'd like to be able to process that by calling directly to the iTest built-in Tcl interpreter.


If it were a tool plugin, or an execution monitor, or any of those kind of plugin additions it'd be straight-forward, but this is from a plugin that's simply a menu contribution and separate code.


Any thoughts on whether this is achievable? We have other options, this just struck me as one of the nicer potential choices... so before I spend any time digging further I figured I'd check at a high level if it was feasible.





10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

KumarS avatar image
KumarS answered KumarS posted

It should be. TclInterpreter service should be accessible through some open platform apis. Let me dig through and find out.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KumarS avatar image KumarS commented ·

This is not part of SDK - but you can do following:


if you add a dependency to this plugin:



You can call:

   public ITestTclInterpreter createInterpHandle() throws InterpCreationException;


ITestTclInterpreter will allow you to evaluate tcl statements. It will the tcl shell which is set in iTest preferences.


Note that this is an internal API and will not work in next release of iTest. It will only work in 3.4. Not only that, it may stop working in a new service pack of 3.4 - but probability of that is really low. We will take a look if we can make ITclInterpreter from the SDK available for purposes other than tools.



0 Likes 0 ·
PaulD avatar image PaulD KumarS commented ·

I think you might have this wrong, Kumar.


I believe you need the com.fnfr.svt.adapter.tcl plugin and then:


ITestTclInterpreter interp = InterpHandler.createInstance().createInterpHandle();



0 Likes 0 ·
AdamB avatar image AdamB PaulD commented ·

Hi Bill,


There is a better way to get a tcl interpreter.  If you include the package:



You will then have access to its activator:



If you call:



You will get an ITclServiceManager.  It has methods that let you create a tcl interpreter.


Wei will be able to answer further questions about this.


One caveat, this is not in the officially supported SDK, so it may change from release to release (But given it is in the platform, it is less likely to change than the options above.)  We will look to add a supported API for services like this.



0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.