[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform] Re: [HOW] Setting ANT_HOME properties in runtime

See the code in AntRuntimePreferencePage.performOk, the AntClasspathPage and
the ClasspathModel
found in org.eclipse.ant.internal.ui.preferences of the org.eclipse.ant.ui
plugin.

Essentially you will need to call
antPreferences.setAntHomeClasspathEntries(IAntClasspathEntry)

HTH
Darins

"Alexey Kalmykoff" <alexey.kalmykoff@xxxxxxxx> wrote in message
news:6337582.1142699973532.JavaMail.root@xxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I would like to change ANT_HOME property of Ant plugin from the code.
Property changes, but JARs list is still the same (JARs from the old
ANT_HOME are in list and they are used by Ant plugin). How can I force Ant
plugin to reload/recalculate JARs list and use JARs from new ANT_HOME?
>
> I try to change ANT_HOME using the following code:
>
> [code]
> AntCorePreferences antPreferences =
AntCorePlugin.getPlugin().getPreferences();
> antPreferences.setAntHome(...);
> antPreferences.updatePluginPreferences ();
> [/code]
>
> Thanks in advance!