public class AntCorePreferences extends Object implements Preferences.IPropertyChangeListener
Modifier | Constructor and Description |
---|---|
protected |
AntCorePreferences(List<IConfigurationElement> defaultTasks,
List<IConfigurationElement> defaultExtraClasspath,
List<IConfigurationElement> defaultTypes,
boolean headless) |
protected |
AntCorePreferences(List<IConfigurationElement> defaultTasks,
List<IConfigurationElement> defaultExtraClasspath,
List<IConfigurationElement> defaultTypes,
List<IConfigurationElement> defaultProperties,
boolean headless) |
Modifier and Type | Method and Description |
---|---|
protected void |
addPluginClassLoader(Bundle bundle) |
protected void |
computeDefaultExtraClasspathEntries(List<IConfigurationElement> entries) |
protected List<Task> |
computeDefaultTasks(List<IConfigurationElement> tasks)
Returns the complete list of pre-configured
Task s |
protected List<Type> |
computeDefaultTypes(List<IConfigurationElement> types)
Returns the complete listing of pre-configured
Type s |
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.
use
getDefaultAntHomeEntries() instead |
List<Property> |
getDefaultProperties()
Returns the default properties defined via the properties extension point
|
List<Task> |
getDefaultTasks()
Returns the default tasks defined via the task extension point
|
List<Type> |
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<Property> |
getProperties()
Returns the default and custom properties.
|
List<Property> |
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<Task> |
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<Type> |
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<Task> |
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<Type> |
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<IConfigurationElement> defaultTasks, List<IConfigurationElement> defaultExtraClasspath, List<IConfigurationElement> defaultTypes, boolean headless)
protected AntCorePreferences(List<IConfigurationElement> defaultTasks, List<IConfigurationElement> defaultExtraClasspath, List<IConfigurationElement> defaultTypes, List<IConfigurationElement> defaultProperties, 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)
@Deprecated public URL[] getDefaultAntURLs()
getDefaultAntHomeEntries()
insteadpublic IAntClasspathEntry[] getDefaultAntHomeEntries()
@Deprecated public URL[] getAntURLs()
protected List<Task> computeDefaultTasks(List<IConfigurationElement> tasks)
Task
stasks
- the IConfigurationElement
handles for contributed Task
sTask
sprotected List<Type> computeDefaultTypes(List<IConfigurationElement> types)
Type
stypes
- the list of IConfigurationElement
handles to contributed Type
sType
sprotected void computeDefaultExtraClasspathEntries(List<IConfigurationElement> 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
@Deprecated 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<Task> getTasks()
public List<Task> getRemoteTasks()
public Task[] getCustomTasks()
public Type[] getCustomTypes()
public Property[] getCustomProperties()
public List<Property> getProperties()
public List<Property> getRemoteAntProperties()
public String[] getCustomPropertyFiles(boolean performStringSubstition)
performStringSubstition
- whether or not to perform the string substitution on the property file stringspublic String[] getCustomPropertyFiles()
@Deprecated public URL[] getCustomURLs()
public void setCustomTasks(Task[] tasks)
tasks
- public void setCustomTypes(Type[] types)
types
- The custom types@Deprecated public void setCustomURLs(URL[] urls)
urls
- the URLs defining the Ant classpath@Deprecated public 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<Type> getTypes()
public List<Type> getRemoteTypes()
public List<Type> getDefaultTypes()
public List<Task> getDefaultTasks()
public List<Property> 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, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.