|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.javapathfinder.vjp.config.editors.ModePropertyConfiguration
public class ModePropertyConfiguration
This class serves to manage the userdefined and default properties for JPF. There are three levels of properties:
Constructor Summary | |
---|---|
ModePropertyConfiguration(org.eclipse.core.resources.IFile configFile,
org.eclipse.jdt.core.IJavaProject project)
Creates a default instance of the PropertyManager. |
Method Summary | |
---|---|
void |
addChangeListener(PropertyChangeListener listener)
Adds a change listener to this configuration. |
static java.util.HashMap<java.lang.String,java.lang.String> |
getConfigFileProperties(org.eclipse.core.resources.IFile file)
Loads this configuration with the properties contained in configuration file associated. |
java.lang.Object[] |
getDefaultPropertiesAsArray()
Returns an object array containing all of the properties listed by the JPF defaults and the VJP defaults. |
org.eclipse.core.resources.IFile |
getIFile()
The IFile associated to this configuration. |
Property |
getProperty(java.lang.String propertyName)
Retrieves a Property object for the property of this name. |
java.lang.String |
getPropertyValue(java.lang.String name)
Retrieves a value for the property of this name. |
java.lang.Object[] |
getUserDefinedPropertiesAsArray()
Returns all Properties that are only defined by the user and not found in jpf.properties or defined by VJP |
boolean |
isDefaultProperty(java.lang.String propertyName)
Returns whether the property is defined by either jpfDefaults or if in use VJP defaults. |
boolean |
isDefined(Property prop)
|
boolean |
isDefined(java.lang.String propertyName)
|
boolean |
isDirty()
|
boolean |
isUserDefined(java.lang.String prop)
|
boolean |
isUsingDefaultValue(java.lang.String propertyName)
Returns whether the property is using the default value or a user defined value. |
void |
movePropertiesFile(org.eclipse.core.runtime.IPath newPath,
org.eclipse.core.runtime.IProgressMonitor monitor)
Move the property file. |
void |
parseConfigFile()
Parses the configuration file and handles it appropriatly |
void |
reloadFromFile()
Clears all of the config properties contained and then reloads all properties from the configuration file. |
void |
removeChangeListener(PropertyChangeListener listener)
Removes this change listener from this configuration. |
void |
removeProperty(Property property)
Removes the property from the userdefined status. |
void |
removeProperty(java.lang.String propertyName)
Removes this property from this configuration. |
void |
renameProperty(java.lang.String oldName,
java.lang.String newName)
Renames a property stored in this configuration |
void |
save()
Saves the properties stored in this configuration to the corresponding file. |
void |
save(org.eclipse.core.runtime.IProgressMonitor monitor)
Saves the properties stored in this configuration to the corresponding file. |
void |
setProperty(Property prop)
Sets the given property as a User defined property. |
void |
setProperty(Property prop,
java.lang.String value)
Sets the given property as a User defined property. |
void |
setProperty(java.lang.String name,
java.lang.String value)
Sets the given property as a User defined property. |
void |
setToDefaultValue(Property prop)
Remove the user defined value of a setting and set it back to its default value |
void |
setVJPDefault(java.lang.String name,
java.lang.String value)
Set the VJP default value for a property |
void |
setVJPDefaults(org.eclipse.jdt.core.IJavaProject project)
Sets the VJP default properties for this configuration based on the the project given. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModePropertyConfiguration(org.eclipse.core.resources.IFile configFile, org.eclipse.jdt.core.IJavaProject project)
configFile
- the file that properties and loaded from and stored to.project
- the project used to determine the VJP propertiesMethod Detail |
---|
public void setVJPDefaults(org.eclipse.jdt.core.IJavaProject project)
project
- The project to be used to define the VJP default settingspublic void reloadFromFile() throws java.io.IOException, org.eclipse.core.runtime.CoreException
java.io.IOException
- if the file can not be read
org.eclipse.core.runtime.CoreException
- if the file can not be foundpublic void parseConfigFile()
public static java.util.HashMap<java.lang.String,java.lang.String> getConfigFileProperties(org.eclipse.core.resources.IFile file)
java.io.IOException
org.eclipse.core.runtime.CoreException
public void save() throws java.io.IOException, org.eclipse.core.runtime.CoreException
java.io.IOException
org.eclipse.core.runtime.CoreException
public void save(org.eclipse.core.runtime.IProgressMonitor monitor) throws java.io.IOException, org.eclipse.core.runtime.CoreException
monitor
- used to track the progress of saving the file
java.io.IOException
org.eclipse.core.runtime.CoreException
public void movePropertiesFile(org.eclipse.core.runtime.IPath newPath, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
newPath
- the path representing the new location of the configuration filemonitor
- tracks the progress of moving the file to the new location
org.eclipse.core.runtime.CoreException
public boolean isDirty()
public java.lang.String getPropertyValue(java.lang.String name)
public boolean isDefined(java.lang.String propertyName)
public boolean isDefined(Property prop)
public boolean isUserDefined(java.lang.String prop)
public Property getProperty(java.lang.String propertyName)
Property
object for the property of this name.
This method first looks to userDefined values, then to VJP defined values
(unless useVJP has been set to false), then finally to JPF defined.
If none of these levels define the property, then a null value is returned.
public void setProperty(java.lang.String name, java.lang.String value)
name
- the name for the property being definedvalue
- the value for the property being definedpublic void setProperty(Property prop)
prop
- the property to set in this configurationpublic void setProperty(Property prop, java.lang.String value)
prop
- the name of the property to be definedvalue
- the value of the propert being definedpublic void setToDefaultValue(Property prop)
prop
- the property to set back to its default valuepublic boolean isUsingDefaultValue(java.lang.String propertyName)
propertyName
- the name of the property to be checked
public boolean isDefaultProperty(java.lang.String propertyName)
public void setVJPDefault(java.lang.String name, java.lang.String value)
name
- the name of the property to be defined.value
- the value of the property to be defined.public void removeProperty(java.lang.String propertyName)
public void removeProperty(Property property)
the
- property to be removed from this configurationpublic java.lang.Object[] getDefaultPropertiesAsArray()
public java.lang.Object[] getUserDefinedPropertiesAsArray()
public org.eclipse.core.resources.IFile getIFile()
public void addChangeListener(PropertyChangeListener listener)
listener
- adds the listener to this configuration.public void removeChangeListener(PropertyChangeListener listener)
listener
- the listener to be removed from this configuration.public void renameProperty(java.lang.String oldName, java.lang.String newName)
oldValue
- the name of the old valuenewValue
- the value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |