Change interpreter for project [message #540424] |
Wed, 16 June 2010 06:45 |
Claudio Cancinos Messages: 6 Registered: July 2009 |
Junior Member |
|
|
Hi!
I'm using DLTK 1.0.2.v20100208-7C-77EAAoORwQXXqBeY-d and in my ide implementation I'd like to change the interpreter used for a specific project like in JDT using the project properties->java build path-> libraries tab.
I already have my own implementations of BuildPathsPropertyPage and BuildpathsBlock classes and I can see the project build path preference page similar to JDT in my ide.
The problem is when I go to Libraries tab. There I can see configured the default interpreter librarie configured for the project but there are 2 behaviours that differe from what I expected:
1) If I press the "Edit" button I get a dialog displaying a string representing the "buildpath container path", something like "org.eclipse.dltk.launching.INTERPRETER_CONTAINER"
What I'd like to have: a dialog similar to JDT with at least 1 combo containing the workspace configured interpreters from where I can choose one
2) If I press "Add Library..." I see a dialog with an empty table of libraries.
What I'd like to have: the table populated with the workspace configured interpreters.
Does DLTK have a proposed aproach for these features?
I copy the simple implementations of BuildPathsPropertyPage and BuildpathsBlock in case they might be useful:
public class TestBuildPathPropertyPage extends BuildPathsPropertyPage implements IWorkbenchPropertyPage {
protected BuildpathsBlock createBuildPathBlock(IWorkbenchPreferenceContainer pageContainer) {
return new TestBuildPathBlock(new BusyIndicatorRunnableContext(), this, getSettings().getInt(INDEX), false,
pageContainer);
}
public TestBuildPathPropertyPage() {
}
public IDLTKLanguageToolkit getLanguageToolkit() {
return TestLanguageToolkit.getDefault();
}
}
public class TestBuildPathBlock extends BuildpathsBlock {
public TestBuildPathBlock(IRunnableContext runnableContext, IStatusChangeListener context, int pageToShow,
boolean useNewPage, IWorkbenchPreferenceContainer pageContainer) {
super(runnableContext, context, pageToShow, useNewPage, pageContainer);
}
protected IPreferenceStore getPreferenceStore() {
return TestCorePlugin.getDefault().getPreferenceStore();
}
protected boolean supportZips() {
return false;
}
}
Thanks in Advance!
Claudio
[Updated on: Thu, 17 June 2010 16:49] Report message to a moderator
|
|
|
Re: Change interpreter for project [message #540448 is a reply to message #540424] |
Wed, 16 June 2010 08:17 |
Alex Panchenko Messages: 342 Registered: July 2009 |
Senior Member |
|
|
Hi Claudio,
I think you should do something like the following:
<extension point="org.eclipse.dltk.ui.buildpathContainerPage">
<buildpathContainerPage
class=" org.eclipse.dltk.ruby.internal.debug.ui.interpreters.RubyInterpreterContainerWizardPage "
id="org.eclipse.dltk.ruby.launching.INTERPRETER_CONTAINER"
name="Ruby Interpreter Libraries"
nature="org.eclipse.dltk.ruby.core.nature" />
</extension>
public class RubyInterpreterContainerWizardPage extends AbstractInterpreterContainerWizardPage {
@Override
public String getScriptNature() {
return RubyNature.NATURE_ID;
}
}
Regards,
Alex
[Updated on: Thu, 17 June 2010 02:32] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02679 seconds