Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dynamic Languages Toolkit (DLTK) » Installing custom language intepreter(I want to set my custom language interpreter across all workspaces)
Installing custom language intepreter [message #992823] Sat, 22 December 2012 18:58 Go to next message
Kevin Hagel is currently offline Kevin HagelFriend
Messages: 26
Registered: December 2012
Junior Member
We've developed a dltk-based IDE for our custom interpreted language, like lots of people here I suspect.
I've extended org.eclipse.dltk.launching.interpreterInstallTypes successfully, the interpreters block, all that stuff. user can find the interpreter script using the Add button. If I set up the PATH correctly user can find the interpreter using the Search button.
This has to be repeated across all workspaces however ... not all of our users are expert eclipse users who know how to export settings and so on.

I have a LaunchProject, as I see being done for the tcl, ruby, python, javascript, pde examples. They've all found a way to have their interpreter installed without my having to install it through the preference dialogs.

Where is this done?
I'd like to be able to check to see if my IInterpreterInstall is installed already, and if not install my IInterpreterInstall in the launch project plugin in the start() ... but where is this done?
Re: Installing custom language intepreter [message #993339 is a reply to message #992823] Mon, 24 December 2012 04:46 Go to previous messageGo to next message
Alex Panchenko is currently offline Alex PanchenkoFriend
Messages: 342
Registered: July 2009
Senior Member
Hi Kevin,

As far as I know interpreter is not installed automatically for tcl &
ruby, or what do you mean exactly?

Is your interpreter shipped with your product or can it be installed in
the arbitrary file system location?

Regards,
Alex
Re: Installing custom language intepreter [message #997047 is a reply to message #993339] Thu, 03 January 2013 13:35 Go to previous messageGo to next message
Kevin Hagel is currently offline Kevin HagelFriend
Messages: 26
Registered: December 2012
Junior Member
I see now that Ruby, Python, and Tcl all require a new interpreter setting for new workspaces. PHP does not seem to need that, it finds php by itself.
I'm looking in these different IDE sources, at the plugin.xml for example to see how they start up. I run the debugger in a child instance, looking at the CorePlugin and UIPlugin as well as the language toolkits to see where and when these things are done.

Which project, the core project, the launch project, the ui project? Is it a org.eclipse.ui.startup execution so it runs independently from the startup environment the user is using i.e. which perspective is opened, is the environment waking up with a php/tcl/python etc project already in focus or in the case of a new workspace ...

I see the InterpreterSearcher being used by the InterpretersBlock. These kinds of things are all executed as a result of the user choosing them in the settings, which must be done in every new workspace. Tcl in particular provides a bunch of different possible tcl interpreter names to look for, choosing the one (I think) with the greatest version number as the default.

PHP does not seem to require this however. How does it do that?

I can find my interpreter using the InterpretersBlock and InterpreterSearcher, pretty much just by nature and interpreter name provided by extensions.

I would like to have something that finds the interpreter independent of the user settings, some background process when my custom perspective wakes up for example ensures my UI plugin is executed (where the perspective is defined).
Re: Installing custom language intepreter [message #1002721 is a reply to message #997047] Sat, 19 January 2013 08:06 Go to previous messageGo to next message
Kevin Hagel is currently offline Kevin HagelFriend
Messages: 26
Registered: December 2012
Junior Member
I did find a way to do this - in your AbstractInterpreterInstallType extension there is a method:

public IFileHandle[] detectInstallLocations()

The ancestor returns null. You can return your discovered installations, however you've managed to implement that.

This is executed in the ScriptRuntime.detectInterpreterInstall method, itself being executed in the ScriptRuntime.initializeInterpreters method.

The problem for multiple installations is seen in this comment in detectInterpreterInstall:

				// Create a standin for the detected interpreter and add it to
				// the result collector
				// TODO (alex) handle all instances
				String interpID = String.valueOf(unique);
				InterpreterStandin detected = new InterpreterStandin(
						interpType, interpID);
				detected.setInstallLocation(detectedLocations[0]);
				detected.setName(interpType
						.generateDetectedInterpreterName(detected
								.getInstallLocation()));
				return detected;


Since I have to set one of my interpreter installations as default I just return that one. Extra installations can be deal with in the Search ...

Is there going to be any new releases of DLTK in the future, or has development ended?

[Updated on: Sat, 19 January 2013 08:15]

Report message to a moderator

Re: Installing custom language intepreter [message #1002912 is a reply to message #1002721] Sat, 19 January 2013 20:52 Go to previous messageGo to next message
Alex Panchenko is currently offline Alex PanchenkoFriend
Messages: 342
Registered: July 2009
Senior Member
I pushed the fix, so now DLTK remembers all the interpreters returned.

There are going to be new DLTK releases, the next one will be 5.0 in June 2013.

Regards,
Alex
Re: Installing custom language intepreter [message #1003173 is a reply to message #1002912] Sun, 20 January 2013 13:32 Go to previous messageGo to next message
Kevin Hagel is currently offline Kevin HagelFriend
Messages: 26
Registered: December 2012
Junior Member
I've been using http://download.eclipse.org/technology/dltk/updates-dev/4.0-stable/ which update site is your update on?

We are delivering a product so I might not want to use bleeding edges Cool
Re: Installing custom language intepreter [message #1003284 is a reply to message #1003173] Sun, 20 January 2013 21:50 Go to previous message
Alex Panchenko is currently offline Alex PanchenkoFriend
Messages: 342
Registered: July 2009
Senior Member
The recent updates are available in
- git.eclipse.org
- build job in hudson.eclipse.org

Regards,
Alex
Previous Topic:InterpreterInstallTypes
Next Topic:errors installing DLTK 3.0.0 into Indigo SR2
Goto Forum:
  


Current Time: Sat May 04 08:23:37 GMT 2024

Powered by FUDForum. Page generated in 0.04315 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top