public class AntCorePreferences extends Object implements Preferences.IPropertyChangeListener
Modifier | Constructor and Description |
---|---|
protected |
AntCorePreferences(List defaultTasks,
List defaultExtraClasspath,
List defaultTypes,
boolean headless) |
protected |
AntCorePreferences(List defaultTasks,
List defaultExtraClasspath,
List defaultTypes,
List defaultProperties,
boolean headless) |
Modifier and Type | Method and Description |
---|---|
protected void |
addPluginClassLoader(Bundle bundle) |
protected void |
computeDefaultExtraClasspathEntries(List entries) |
protected List |
computeDefaultTasks(List tasks) |
protected List |
computeDefaultTypes(List types) |
protected Property[] |
extractProperties(Preferences prefs,
String[] properties) |
protected Task[] |
extractTasks(Preferences prefs,
String[] tasks) |
protected Type[] |
extractTypes(Preferences prefs,
String[] types) |
IAntClasspathEntry[] |
getAdditionalClasspathEntries()
Returns the set of classpath entries that the user has added to the
Ant runtime classpath.
|
String |
getAntHome()
Returns the string that defines the Ant home set by the user or the location
of the Eclipse Ant plug-in if Ant home has not been specifically set by the user.
|
IAntClasspathEntry[] |
getAntHomeClasspathEntries()
Returns the set of classpath entries that compose the libraries added to the
Ant runtime classpath from the Ant home location.
|
URL[] |
getAntURLs()
Deprecated.
use getAntHomeClasspathEntries and getToolsJarEntry
|
protected String[] |
getArrayFromString(String list) |
IAntClasspathEntry[] |
getContributedClasspathEntries()
Returns all contributed classpath entries via the
extraClasspathEntries extension point. |
Property[] |
getCustomProperties()
Returns the custom user properties specified for Ant builds.
|
String[] |
getCustomPropertyFiles()
Returns the custom property files specified for Ant builds.
|
String[] |
getCustomPropertyFiles(boolean performStringSubstition)
Returns the custom property files specified for Ant builds performing any required
string substitution if indicated.
|
Task[] |
getCustomTasks()
Returns the user defined custom tasks
|
Type[] |
getCustomTypes()
Returns the user defined custom types
|
URL[] |
getCustomURLs()
Deprecated.
|
String |
getDefaultAntHome()
Returns the absolute path of the default ant.home to use for the build.
|
IAntClasspathEntry[] |
getDefaultAntHomeEntries()
Returns the array of classpath entries that is the default set of entries defining
the Ant classpath.
|
URL[] |
getDefaultAntURLs()
Deprecated.
|
List |
getDefaultProperties()
Returns the default properties defined via the properties extension point
|
List |
getDefaultTasks()
Returns the default tasks defined via the task extension point
|
List |
getDefaultTypes()
Returns the default types defined via the type extension point
|
URL[] |
getExtraClasspathURLs()
Returns the list of URLs added to the classpath by the extra classpath
entries extension point.
|
protected ClassLoader[] |
getPluginClassLoaders() |
List |
getProperties()
Returns the default and custom properties.
|
List |
getRemoteAntProperties()
Returns the default and custom properties that are relevant when there is no
Eclipse runtime context (Ant build in a separate VM).
|
URL[] |
getRemoteAntURLs()
Returns the list of URLs to added to the classpath for an Ant build that is
occurring without the Eclipse runtime.
|
URL[] |
getRemoteExtraClasspathURLs()
Returns the list of URLs added to the classpath by the extra classpath
entries extension point for an Ant build that is occurring without the Eclipse runtime.
|
List |
getRemoteTasks()
Returns the default and custom tasks that are relevant when there is no
Eclipse runtime context (an Ant build in a separate VM).
|
List |
getRemoteTypes()
Returns the default and custom types that are relevant when there is no
Eclipse runtime context (an Ant build in a separate VM).
|
List |
getTasks()
Returns the default and custom tasks.
|
IAntClasspathEntry |
getToolsJarEntry()
Returns the
IAntClasspathEntry for the tools.jar associated with the System property "java.home"
location. |
IAntClasspathEntry |
getToolsJarEntry(IPath javaHomePath)
Returns the IAntClasspathEntry for the tools.jar associated with the path supplied.
|
URL |
getToolsJarURL()
Deprecated.
use getToolsJarEntry()
|
List |
getTypes()
Returns the default and custom types.
|
URL[] |
getURLs()
Returns the entire set of URLs that define the Ant runtime classpath.
|
void |
propertyChange(Preferences.PropertyChangeEvent event)
When a preference changes, update the in-memory cache of the preference.
|
void |
setAdditionalClasspathEntries(IAntClasspathEntry[] entries)
Sets the set of classpath entries that the user has added to the
Ant runtime classpath.
|
void |
setAntHome(String antHome)
Sets the string that defines the Ant home set by the user.
|
void |
setAntHomeClasspathEntries(IAntClasspathEntry[] entries)
Sets the set of classpath entries that compose the libraries added to the
Ant runtime classpath from the Ant home location.
|
void |
setAntURLs(URL[] urls)
Deprecated.
use setAntHomeEntires(IAntClasspathEntry[])
|
void |
setCustomProperties(Property[] properties)
Sets the custom user properties specified for Ant builds.
|
void |
setCustomPropertyFiles(String[] paths)
Sets the custom property files specified for Ant builds.
|
void |
setCustomTasks(Task[] tasks)
Sets the user defined custom tasks.
|
void |
setCustomTypes(Type[] types)
Sets the user defined custom types.
|
void |
setCustomURLs(URL[] urls)
Deprecated.
use setAdditionalEntries(IAntClasspathEntry)[]
|
protected void |
updateAdditionalEntries(Preferences prefs) |
protected void |
updateAntHomeEntries(Preferences prefs) |
void |
updatePluginPreferences()
Updates the underlying plug-in preferences to the current state.
|
protected void |
updateProperties(Preferences prefs) |
protected void |
updatePropertyFiles(Preferences prefs) |
protected void |
updateTasks(Preferences prefs) |
protected void |
updateTypes(Preferences prefs) |
protected AntCorePreferences(List defaultTasks, List defaultExtraClasspath, List defaultTypes, boolean headless)
public void propertyChange(Preferences.PropertyChangeEvent event)
propertyChange
in interface Preferences.IPropertyChangeListener
event
- The property change event that has occurred.Preferences.IPropertyChangeListener.propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent)
public String getDefaultAntHome()
protected Task[] extractTasks(Preferences prefs, String[] tasks)
protected Type[] extractTypes(Preferences prefs, String[] types)
protected Property[] extractProperties(Preferences prefs, String[] properties)
public URL[] getDefaultAntURLs()
public IAntClasspathEntry[] getDefaultAntHomeEntries()
public URL[] getAntURLs()
protected void computeDefaultExtraClasspathEntries(List entries)
public IAntClasspathEntry getToolsJarEntry(IPath javaHomePath)
null
if no tools.jar is found (e.g. the path
points to a JRE install).javaHomePath
- path for Java homenull
public URL getToolsJarURL()
null
if no tools.jar is found.null
public IAntClasspathEntry getToolsJarEntry()
IAntClasspathEntry
for the tools.jar associated with the System property "java.home"
location.
If "java.home" has no associated tools.jar (such as a JRE install), the environment variable "JAVA_HOME" is
resolved to check for a tools.jar.
May return null
if no tools.jar is found.null
protected void addPluginClassLoader(Bundle bundle)
public URL[] getExtraClasspathURLs()
public URL[] getRemoteExtraClasspathURLs()
public URL[] getURLs()
protected ClassLoader[] getPluginClassLoaders()
public List getTasks()
public List getRemoteTasks()
public Task[] getCustomTasks()
public Type[] getCustomTypes()
public Property[] getCustomProperties()
public List getProperties()
public List getRemoteAntProperties()
public String[] getCustomPropertyFiles(boolean performStringSubstition)
performStringSubstition
- whether or not to perform the string substitution on the property file stringspublic String[] getCustomPropertyFiles()
public URL[] getCustomURLs()
public void setCustomTasks(Task[] tasks)
tasks
- public void setCustomTypes(Type[] types)
types
- The custom typespublic void setCustomURLs(URL[] urls)
urls
- the URLs defining the Ant classpathpublic void setAntURLs(URL[] urls)
urls
- the URLs defining the Ant classpathpublic void setCustomPropertyFiles(String[] paths)
paths
- the absolute paths defining the property files to use.public void setCustomProperties(Property[] properties)
properties
- the properties defining the Ant propertiespublic List getTypes()
public List getRemoteTypes()
public List getDefaultTypes()
public List getDefaultTasks()
public List getDefaultProperties()
public void updatePluginPreferences()
protected void updateTasks(Preferences prefs)
protected void updateTypes(Preferences prefs)
protected void updateProperties(Preferences prefs)
protected void updateAdditionalEntries(Preferences prefs)
protected void updateAntHomeEntries(Preferences prefs)
protected void updatePropertyFiles(Preferences prefs)
public void setAntHome(String antHome)
null
.antHome
- the fully qualified path to Ant homepublic String getAntHome()
null
public IAntClasspathEntry[] getAntHomeClasspathEntries()
public IAntClasspathEntry[] getAdditionalClasspathEntries()
public void setAntHomeClasspathEntries(IAntClasspathEntry[] entries)
entries
- the set of ant home classpath entriespublic void setAdditionalClasspathEntries(IAntClasspathEntry[] entries)
entries
- the set of user classpath entriespublic URL[] getRemoteAntURLs()
public IAntClasspathEntry[] getContributedClasspathEntries()
extraClasspathEntries
extension point.extraClasspathEntries
extension point
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.