Set Runtime-Classpath (LaunchConfiguration) programmatically [message #203088] |
Wed, 11 May 2005 06:56  |
Eclipse User |
|
|
|
Hallo,
my Plugin sets for certain javaprojects a nature (extends from
IProjectNature). Now I want to add new runtime-classpath for every
launchconfiguration for this projects. (I want do this programmatically
inside my plugin when I set the nature...).
First I tried the Extension:
Code:
<extension
point="org.eclipse.jdt.launching.runtimeClasspathEntries">
<runtimeClasspathEntry
class="MyPathEntry"
id="MyPathEntryID">
</runtimeClasspathEntry>
</extension>
but it did not work.
Then I tried the Extension:
Code:
<extension
point="org.eclipse.jdt.launching.classpathProviders">
<classpathProvider
class="MyClasspathProvider"
id="MyClasspathProviderID">
</classpathProvider>
</extension>
but my class MyClasspathProvider is never executed.
Even if I walk through all launchconfigurations when i set my nature:
Code:
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfiguration[] lcs = manager.getLaunchConfigurations();
for (int i = 0; i < lcs.length; i++) {
ILaunchConfiguration configuration = lcs[i];
ILaunchConfigurationWorkingCopy wc =
configuration.getWorkingCopy();
if(wc.getAttribute("org.eclipse.debug.ui.private", false)) {
continue;
}
wc.setAttribute("ATTR_CLASSPATH_PROVIDER",
"MyClasspathProviderID");
wc.doSave();
}
and I set the attribute "ATTR_CLASSPATH_PROVIDER" with my provider id
"MyClasspathProviderID", like described in the documentation of this
Extension-Point nothing happens...
What do I wrong?
Can someone help me, please?
--
Przemyslaw Dul
Przemek_d@gmx.de
www.stud.uni-hannover.de/~pd
|
|
|
Re: Set Runtime-Classpath (LaunchConfiguration) programmatically [message #203104 is a reply to message #203088] |
Wed, 11 May 2005 10:14  |
Eclipse User |
|
|
|
Please see this article that describes some Java launching features to see
if it answers your questions:
http://www.eclipse.org/articles/Article-Java-launch/launchin g-java.html
Darin
"Przemyslaw" <Przemek_d@gmx.de> wrote in message
news:d5sot3$sbb$1@news.eclipse.org...
> Hallo,
> my Plugin sets for certain javaprojects a nature (extends from
> IProjectNature). Now I want to add new runtime-classpath for every
> launchconfiguration for this projects. (I want do this programmatically
> inside my plugin when I set the nature...).
>
> First I tried the Extension:
> Code:
>
> <extension
> point="org.eclipse.jdt.launching.runtimeClasspathEntries">
> <runtimeClasspathEntry
> class="MyPathEntry"
> id="MyPathEntryID">
> </runtimeClasspathEntry>
> </extension>
>
>
> but it did not work.
>
> Then I tried the Extension:
> Code:
>
> <extension
> point="org.eclipse.jdt.launching.classpathProviders">
> <classpathProvider
> class="MyClasspathProvider"
> id="MyClasspathProviderID">
> </classpathProvider>
> </extension>
>
>
> but my class MyClasspathProvider is never executed.
>
> Even if I walk through all launchconfigurations when i set my nature:
> Code:
>
> ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
> ILaunchConfiguration[] lcs = manager.getLaunchConfigurations();
> for (int i = 0; i < lcs.length; i++) {
> ILaunchConfiguration configuration = lcs[i];
> ILaunchConfigurationWorkingCopy wc =
> configuration.getWorkingCopy();
> if(wc.getAttribute("org.eclipse.debug.ui.private", false)) {
> continue;
> }
> wc.setAttribute("ATTR_CLASSPATH_PROVIDER",
> "MyClasspathProviderID");
> wc.doSave();
>
> }
>
>
> and I set the attribute "ATTR_CLASSPATH_PROVIDER" with my provider id
> "MyClasspathProviderID", like described in the documentation of this
> Extension-Point nothing happens...
>
> What do I wrong?
> Can someone help me, please?
>
> --
> Przemyslaw Dul
> Przemek_d@gmx.de
> www.stud.uni-hannover.de/~pd
>
|
|
|
Powered by
FUDForum. Page generated in 0.06225 seconds