prantl.ant.eclipse
Class PreferencesElement

java.lang.Object
  extended by prantl.ant.eclipse.PreferencesElement
Direct Known Subclasses:
GeneralPreferencesElement, OrgEclipseCoreResourcesPreferencesElement, OrgEclipseCoreRuntimePreferencesElement, OrgEclipseJdtCorePreferencesElement, OrgEclipseJdtUiPreferencesElement

public abstract class PreferencesElement
extends java.lang.Object

Configures a component preferences in a file under the directory .settings using variable elements. The version element is mandatory and will be generated automatically if not provided. The attributes name of all elements describing the preferences must be distinct.

Since:
Ant-Eclipse 1.0
Author:
Ferdinand Prantl <prantl@users.sourceforge.net>

Method Summary
 java.lang.String getName()
          Returns the name of the file with preferences.
 java.util.Vector getVariables()
          Returns a list with instances of the class VariableElement defining variables for a file <full qualified class name> under the directory .settings.
 java.lang.String getVersion()
          Returns the version of the preferences set by this element (1 is used as a default).
 void setVersion(java.lang.String value)
          Sets the version of the Eclipse preferences.
 void validate()
          Performs the validation of the element at the time when the whole build file was parsed checking the content of the element and possibly adding mandatory variables with default settings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()
Returns the name of the file with preferences. The name must not be null, it is a mandatory attribute.

Returns:
The name of the file with preferences or null if not having been set.

getVersion

public java.lang.String getVersion()
Returns the version of the preferences set by this element (1 is used as a default). The default value should be left.

Returns:
The version of the Eclipse preferences (1 is used as a default).

setVersion

public void setVersion(java.lang.String value)
Sets the version of the Eclipse preferences. The default value should be left and not set explicitely.

Parameters:
value - A valid version of the Eclipse preferences.
Since:
Ant-Eclipse 1.0

getVariables

public java.util.Vector getVariables()
Returns a list with instances of the class VariableElement defining variables for a file <full qualified class name> under the directory .settings. If it is empty the version element will be generated automatically.

Returns:
A list with instances of the descendants of the class PreferencesElement.

validate

public void validate()
Performs the validation of the element at the time when the whole build file was parsed checking the content of the element and possibly adding mandatory variables with default settings.

Since:
Ant-Eclipse 1.0