1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-03 14:25:37 +02:00

[cleanup] in preparation for 142806

javadoc, nl strings, etc.
This commit is contained in:
David Dykstal 2006-12-08 19:21:39 +00:00
parent 28e772baaa
commit 33c8fcb206
14 changed files with 189 additions and 148 deletions

View file

@ -0,0 +1,3 @@
#Fri Dec 08 11:30:09 CST 2006
eclipse.preferences.version=1
encoding//persistence/org/eclipse/rse/internal/persistence/messages.properties=8859_1

View file

@ -1,8 +1,8 @@
#Tue Nov 28 18:18:22 CET 2006
#Fri Dec 08 11:38:30 CST 2006
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
org.eclipse.jdt.core.compiler.compliance=1.4
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
org.eclipse.jdt.core.compiler.source=1.3
org.eclipse.jdt.core.compiler.source=1.4

View file

@ -0,0 +1,3 @@
#Fri Dec 08 11:38:30 CST 2006
eclipse.preferences.version=1
internal.default.compliance=user

View file

@ -0,0 +1,20 @@
package org.eclipse.rse.internal.persistence;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.rse.internal.persistence.messages"; //$NON-NLS-1$
public static String PropertyFileProvider_LoadingTaskName;
public static String PropertyFileProvider_SavingTaskName;
public static String PropertyFileProvider_UnexpectedException;
public static String RSEPersistenceManager_DeleteProfileJobName;
public static String SaveRSEDOMJob_SavingProfileJobName;
public static String SerializingProvider_UnexpectedException;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
private Messages() {
}
}

View file

@ -126,7 +126,7 @@ public class PropertyFileProvider implements IRSEPersistenceProvider {
IFolder providerFolder = getProviderFolder();
try {
int n = countNodes(dom);
if (monitor != null) monitor.beginTask("Saving DOM", n);
if (monitor != null) monitor.beginTask(Messages.PropertyFileProvider_SavingTaskName, n);
saveNode(dom, providerFolder, monitor);
if (monitor != null) monitor.done();
} catch (Exception e) {
@ -146,7 +146,7 @@ public class PropertyFileProvider implements IRSEPersistenceProvider {
try {
profileFolder.delete(IResource.FORCE, monitor);
} catch (CoreException e) {
result = new Status(IStatus.ERROR, null, 0, "Unexpected Exception", e);
result = new Status(IStatus.ERROR, null, 0, Messages.PropertyFileProvider_UnexpectedException, e);
}
}
return result;
@ -401,7 +401,7 @@ public class PropertyFileProvider implements IRSEPersistenceProvider {
* @return a string equivalent from "00000" to "99999"
*/
private String getIndexString(int i) {
if (i < 0 || i > 99999) throw new IllegalArgumentException("Argument must be between 0 and 99999");
assert (i >= 0 && i <=99999);
String index = "00000" + Integer.toString(i); //$NON-NLS-1$
index = index.substring(index.length() - 5);
return index;
@ -541,7 +541,7 @@ public class PropertyFileProvider implements IRSEPersistenceProvider {
if (profileFolder.exists()) {
//System.out.println("loading from " + profileFolder.getFullPath().toString() + "...");
int n = countPropertiesFiles(profileFolder);
if (monitor != null) monitor.beginTask("Loading DOM", n);
if (monitor != null) monitor.beginTask(Messages.PropertyFileProvider_LoadingTaskName, n);
dom = (RSEDOM) loadNode(null, profileFolder, monitor);
if (monitor != null) monitor.done();
} else {

View file

@ -53,7 +53,7 @@ import org.eclipse.rse.persistence.dom.RSEDOM;
* The persistence manager controls all aspects of persisting the RSE data model. It will both
* save and restore this model. There should be only persistence manager in existence. This instance
* can be retrieved using RSEUIPlugin.getThePersistenceManager.
* @see RSEUIPlugin#getThePersistenceManager()
* @see RSECorePlugin#getThePersistenceManager()
*/
public class RSEPersistenceManager implements IRSEPersistenceManager {
@ -69,12 +69,12 @@ public class RSEPersistenceManager implements IRSEPersistenceManager {
private static IProject remoteSystemsProject = null;
public static final String RESOURCE_PROJECT_NAME = "RemoteSystemsConnections"; //$NON-NLS-1$
private ISystemRegistry _registry;
// private ISystemRegistry _registry;
private ISystemProfileManager _profileManager;
public RSEPersistenceManager(ISystemRegistry registry)
{
_registry = registry;
// _registry = registry;
_profileManager = registry.getSystemProfileManager();
_exporter = RSEDOMExporter.getInstance();
_exporter.setSystemRegistry(registry);
@ -120,18 +120,18 @@ public class RSEPersistenceManager implements IRSEPersistenceManager {
try {
provider = (IRSEPersistenceProvider) providerCandidate.createExecutableExtension("class"); //$NON-NLS-1$
} catch (CoreException e) {
logger.logError("Exception loading persistence provider", e); // DWD nls
logger.logError("Exception loading persistence provider", e); //$NON-NLS-1$
}
}
} else {
logger.logError("Missing id attribute in persistenceProvider element", null); // DWD nls
logger.logError("Missing id attribute in persistenceProvider element", null); //$NON-NLS-1$
}
} else {
logger.logError("Invalid element in persistenceProviders extension point", null); // DWD nls
logger.logError("Invalid element in persistenceProviders extension point", null); //$NON-NLS-1$
}
}
if (provider == null) {
logger.logError("Persistence provider not found.", null); // DWD nls
logger.logError("Persistence provider not found.", null); //$NON-NLS-1$
}
loadedProviders.put(id, provider); // even if provider is null
}
@ -176,8 +176,10 @@ public class RSEPersistenceManager implements IRSEPersistenceManager {
try {
commit(profiles[idx]);
} catch (Exception exc) {
exc.printStackTrace();
System.out.println("Error saving profile " + profiles[idx] + ": " + exc.getClass().getName() + " " + exc.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
Logger logger = RSECorePlugin.getDefault().getLogger();
String profileName = profiles[idx].getName();
String message = "Error saving profile " + profileName; //$NON-NLS-1$
logger.logError(message, exc);
return false;
}
}
@ -304,19 +306,18 @@ public class RSEPersistenceManager implements IRSEPersistenceManager {
}
/**
* Restore the filter pools from disk.
* @param logger The logging object to log errors to
* @param mgrFolder folder containing filter pool folders, or single file for that save policy
* Creates a filter pool manager for a particular SubSystemConfiguration and SystemProfile. Called
* "restore" for historcal reasons.
* @param profile the profile that will own this ISystemFilterPoolManager. There is one of these per profile.
* @param logger the logging object for logging errors. Each ISystemFilterPoolManager has one of these.
* @param caller The creator/owner of this ISystemFilterPoolManager, this ends up being a SubSystemConfiguration.
* @param name the name of the manager to restore. File name is derived from it when saving to one file.
* @param savePolicy How to persist filters. See SystemFilterConstants.
* @param namingPolicy Naming prefix information for persisted data file names.
* @return the restored manager, or null if it does not exist. If anything else went
* wrong, an exception is thrown.
* @return the "restored" manager.
*/
public ISystemFilterPoolManager restoreFilterPoolManager(ISystemProfile profile, Logger logger, ISystemFilterPoolManagerProvider caller, String name) {
ISystemFilterPoolManager mgr = SystemFilterPoolManager.createManager(profile);
((SystemFilterPoolManager) mgr).initialize(logger, caller, name); // core data
mgr.setWasRestored(false); // DWD let's try this
SystemFilterPoolManager mgr = SystemFilterPoolManager.createManager(profile);
mgr.initialize(logger, caller, name); // core data
mgr.setWasRestored(false); // managers are not "restored from disk" since they are not persistent of themselves
return mgr;
}
@ -399,7 +400,7 @@ public class RSEPersistenceManager implements IRSEPersistenceManager {
* @see org.eclipse.rse.persistence.IRSEPersistenceManager#deleteProfile(java.lang.String)
*/
public void deleteProfile(final String profileName) {
Job job = new Job("delete profile") {
Job job = new Job(Messages.RSEPersistenceManager_DeleteProfileJobName) {
protected IStatus run(IProgressMonitor monitor) {
IRSEPersistenceProvider provider = getRSEPersistenceProvider();
IStatus result = provider.deleteProfile(profileName, monitor);
@ -433,7 +434,7 @@ public class RSEPersistenceManager implements IRSEPersistenceManager {
dom = provider.loadRSEDOM(domName, null);
} else {
Logger logger = RSECorePlugin.getDefault().getLogger();
logger.logError("Persistence provider is not available.", null); // DWD NLS
logger.logError("Persistence provider is not available.", null); //$NON-NLS-1$
}
return dom;
}

View file

@ -16,6 +16,8 @@
package org.eclipse.rse.internal.persistence;
import java.text.MessageFormat;
import org.eclipse.core.resources.WorkspaceJob;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@ -29,7 +31,9 @@ public class SaveRSEDOMJob extends WorkspaceJob {
private IRSEPersistenceProvider _provider;
public SaveRSEDOMJob(RSEDOM dom, IRSEPersistenceProvider provider) {
super("Saving RSE Profile: " + dom.getName());
super("Saving Profile"); //$NON-NLS-1$
String title = MessageFormat.format(Messages.SaveRSEDOMJob_SavingProfileJobName, new Object[] {dom.getName()});
setName(title);
_dom = dom;
_provider = provider;
}

View file

@ -84,12 +84,8 @@ public class SerializingProvider implements IRSEPersistenceProvider
return result;
}
/**
* Restores a system profile in RSE. This API will likely change.
*
* @param profileManager
* @param profileFile the file representing the profile
* @return
/* (non-Javadoc)
* @see org.eclipse.rse.persistence.IRSEPersistenceProvider#loadRSEDOM(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
*/
public RSEDOM loadRSEDOM(String profileName, IProgressMonitor monitor)
{
@ -150,11 +146,8 @@ public class SerializingProvider implements IRSEPersistenceProvider
return folder.getFile(domName + ".rsedom"); //$NON-NLS-1$
}
/**
* Saves an RSE dom to disk. This API will likely change.
* @param dom
* @param profileFile
* @return true if succcessful
/* (non-Javadoc)
* @see org.eclipse.rse.persistence.IRSEPersistenceProvider#saveRSEDOM(org.eclipse.rse.persistence.dom.RSEDOM, org.eclipse.core.runtime.IProgressMonitor)
*/
public boolean saveRSEDOM(RSEDOM dom, IProgressMonitor monitor)
{
@ -186,7 +179,7 @@ public class SerializingProvider implements IRSEPersistenceProvider
try {
profileFile.delete(IResource.FORCE | IResource.KEEP_HISTORY, monitor);
} catch (CoreException e) {
result = new Status(IStatus.ERROR, null, 0, "Unexpected Exception", e);
result = new Status(IStatus.ERROR, null, 0, Messages.SerializingProvider_UnexpectedException, e);
}
}
return result;

View file

@ -0,0 +1,6 @@
RSEPersistenceManager_DeleteProfileJobName=Delete RSE Profile Job
PropertyFileProvider_SavingTaskName=Saving DOM
PropertyFileProvider_UnexpectedException=Unexpected Exception
PropertyFileProvider_LoadingTaskName=Loading DOM
SaveRSEDOMJob_SavingProfileJobName=Saving RSE Profile {0}
SerializingProvider_UnexpectedException=Unexpected Exception

View file

@ -16,7 +16,6 @@
package org.eclipse.rse.persistence;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.rse.core.filters.ISystemFilter;
import org.eclipse.rse.core.filters.ISystemFilterPool;
import org.eclipse.rse.core.filters.ISystemFilterPoolManager;

View file

@ -19,70 +19,70 @@ package org.eclipse.rse.persistence.dom;
public interface IRSEDOMConstants
{
// node types
public static final String TYPE_PROFILE = "Profile";
public static final String TYPE_PROPERTY_SET = "PropertySet";
public static final String TYPE_PROPERTY = "Property";
public static final String TYPE_HOST = "Host";
public static final String TYPE_FILTER_POOL = "FilterPool";
public static final String TYPE_FILTER = "Filter";
public static final String TYPE_FILTER_STRING = "FilterString";
public static final String TYPE_FILTER_POOL_REFERENCE = "FilterPoolReference";
public static final String TYPE_CONNECTOR_SERVICE = "ConnectorService";
public static final String TYPE_SERVER_LAUNCHER = "ServerLauncher";
public static final String TYPE_SUBSYSTEM = "SubSystem";
public static final String TYPE_PROFILE = "Profile"; //$NON-NLS-1$
public static final String TYPE_PROPERTY_SET = "PropertySet"; //$NON-NLS-1$
public static final String TYPE_PROPERTY = "Property"; //$NON-NLS-1$
public static final String TYPE_HOST = "Host"; //$NON-NLS-1$
public static final String TYPE_FILTER_POOL = "FilterPool"; //$NON-NLS-1$
public static final String TYPE_FILTER = "Filter"; //$NON-NLS-1$
public static final String TYPE_FILTER_STRING = "FilterString"; //$NON-NLS-1$
public static final String TYPE_FILTER_POOL_REFERENCE = "FilterPoolReference"; //$NON-NLS-1$
public static final String TYPE_CONNECTOR_SERVICE = "ConnectorService"; //$NON-NLS-1$
public static final String TYPE_SERVER_LAUNCHER = "ServerLauncher"; //$NON-NLS-1$
public static final String TYPE_SUBSYSTEM = "SubSystem"; //$NON-NLS-1$
// node attributes
// profile attributes
public static final String ATTRIBUTE_DEFAULT_PRIVATE="defaultPrivate";
public static final String ATTRIBUTE_IS_ACTIVE="isActive";
public static final String ATTRIBUTE_DEFAULT_PRIVATE="defaultPrivate"; //$NON-NLS-1$
public static final String ATTRIBUTE_IS_ACTIVE="isActive"; //$NON-NLS-1$
// subsystem attributes
public static final String ATTRIBUTE_HIDDEN="hidden";
public static final String ATTRIBUTE_HIDDEN="hidden"; //$NON-NLS-1$
// common attributes
public static final String ATTRIBUTE_NAME="name";
public static final String ATTRIBUTE_TYPE="type";
public static final String ATTRIBUTE_NAME="name"; //$NON-NLS-1$
public static final String ATTRIBUTE_TYPE="type"; //$NON-NLS-1$
// host attributes
public static final String ATTRIBUTE_HOSTNAME = "hostname";
public static final String ATTRIBUTE_OFFLINE = "offline";
public static final String ATTRIBUTE_DESCRIPTION = "description";
public static final String ATTRIBUTE_HOSTNAME = "hostname"; //$NON-NLS-1$
public static final String ATTRIBUTE_OFFLINE = "offline"; //$NON-NLS-1$
public static final String ATTRIBUTE_DESCRIPTION = "description"; //$NON-NLS-1$
// ConnectorService attributes
public static final String ATTRIBUTE_GROUP="group";
public static final String ATTRIBUTE_USE_SSL="useSSL";
public static final String ATTRIBUTE_GROUP="group"; //$NON-NLS-1$
public static final String ATTRIBUTE_USE_SSL="useSSL"; //$NON-NLS-1$
// Filter string attributes
public static final String ATTRIBUTE_STRING = "string";
public static final String ATTRIBUTE_STRING = "string"; //$NON-NLS-1$
// filter attributes
public static final String ATTRIBUTE_SUPPORTS_NESTED_FILTERS = "supportsNestedFilters";
public static final String ATTRIBUTE_RELATIVE_ORDER = "relativeOrder";
public static final String ATTRIBUTE_DEFAULT = "default";
public static final String ATTRIBUTE_STRING_CASE_SENSITIVE = "stringsCaseSensitive";
public static final String ATTRIBUTE_PROMPTABLE ="promptable";
public static final String ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS="supportsDuplicateFilterStrings";
public static final String ATTRIBUTE_NON_DELETABLE="nonDeletable";
public static final String ATTRIBUTE_NON_RENAMABLE="nonRenamable";
public static final String ATTRIBUTE_NON_CHANGEABLE="nonChangable";
public static final String ATTRIBUTE_STRINGS_NON_CHANGABLE="stringsNonChangable";
public static final String ATTRIBUTE_RELEASE="release";
public static final String ATTRIBUTE_SINGLE_FILTER_STRING_ONLY="singleFilterStringOnly";
public static final String ATTRIBUTE_SUPPORTS_NESTED_FILTERS = "supportsNestedFilters"; //$NON-NLS-1$
public static final String ATTRIBUTE_RELATIVE_ORDER = "relativeOrder"; //$NON-NLS-1$
public static final String ATTRIBUTE_DEFAULT = "default"; //$NON-NLS-1$
public static final String ATTRIBUTE_STRING_CASE_SENSITIVE = "stringsCaseSensitive"; //$NON-NLS-1$
public static final String ATTRIBUTE_PROMPTABLE ="promptable"; //$NON-NLS-1$
public static final String ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS="supportsDuplicateFilterStrings"; //$NON-NLS-1$
public static final String ATTRIBUTE_NON_DELETABLE="nonDeletable"; //$NON-NLS-1$
public static final String ATTRIBUTE_NON_RENAMABLE="nonRenamable"; //$NON-NLS-1$
public static final String ATTRIBUTE_NON_CHANGEABLE="nonChangable"; //$NON-NLS-1$
public static final String ATTRIBUTE_STRINGS_NON_CHANGABLE="stringsNonChangable"; //$NON-NLS-1$
public static final String ATTRIBUTE_RELEASE="release"; //$NON-NLS-1$
public static final String ATTRIBUTE_SINGLE_FILTER_STRING_ONLY="singleFilterStringOnly"; //$NON-NLS-1$
// server launcher attributes
public static final String ATTRIBUTE_REXEC_PORT="rexecPort";
public static final String ATTRIBUTE_DAEMON_PORT="daemonPort";
public static final String ATTRIBUTE_PORT="port";
public static final String ATTRIBUTE_SERVER_PATH="serverPath";
public static final String ATTRIBUTE_SERVER_SCRIPT="serverScript";
public static final String ATTRIBUTE_RESTRICTED_TYPES="restrictedTypes";
public static final String ATTRIBUTE_REXEC_PORT="rexecPort"; //$NON-NLS-1$
public static final String ATTRIBUTE_DAEMON_PORT="daemonPort"; //$NON-NLS-1$
public static final String ATTRIBUTE_PORT="port"; //$NON-NLS-1$
public static final String ATTRIBUTE_SERVER_PATH="serverPath"; //$NON-NLS-1$
public static final String ATTRIBUTE_SERVER_SCRIPT="serverScript"; //$NON-NLS-1$
public static final String ATTRIBUTE_RESTRICTED_TYPES="restrictedTypes"; //$NON-NLS-1$
public static final String ATTRIBUTE_VALUE = "value";
public static final String ATTRIBUTE_ID = "id";
public static final String ATTRIBUTE_OWNING_PARENT_NAME = "owningParentName";
public static final String ATTRIBUTE_REF_ID= "refID";
public static final String ATTRIBUTE_DELETABLE = "deletable";
public static final String ATTRIBUTE_TRUE = "true";
public static final String ATTRIBUTE_FALSE = "false";
public static final String ATTRIBUTE_VALUE = "value"; //$NON-NLS-1$
public static final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
public static final String ATTRIBUTE_OWNING_PARENT_NAME = "owningParentName"; //$NON-NLS-1$
public static final String ATTRIBUTE_REF_ID= "refID"; //$NON-NLS-1$
public static final String ATTRIBUTE_DELETABLE = "deletable"; //$NON-NLS-1$
public static final String ATTRIBUTE_TRUE = "true"; //$NON-NLS-1$
public static final String ATTRIBUTE_FALSE = "false"; //$NON-NLS-1$
}

View file

@ -34,8 +34,9 @@ public interface IRSEDOMExporter
/**
* Creates the RSE DOM for this profile
* @param profile
* @param clean indicates whether to create from scratch or merger
* @return
* @param clean true if the node should being created from scratch, false if the an existing
* node should be found and merged
* @return the created DOM
*/
RSEDOM createRSEDOM(ISystemProfile profile, boolean clean);
@ -43,88 +44,108 @@ public interface IRSEDOMExporter
* Creates an RSE DOM for use in persistence
* @param dom
* @param profile
* @return
* @param clean true if the node should being created from scratch, false if the an existing
* node should be found and merged
* @return the created DOM
*/
public RSEDOM populateRSEDOM(RSEDOM dom, ISystemProfile profile, boolean clean);
/**
* Returns the RSEDOM for this profile iff it exists
* @param profile
* @return
* @return The DOM retrieved from the profile
*/
RSEDOM getRSEDOM(ISystemProfile profile);
/**
* Create a DOM node representing a host
* @param parent
* @param host
* @return
* @param parent the parent of this node, must be node for an ISystemProfile
* @param host the host from which to create this node
* @param clean true if the node should being created from scratch, false if the an existing
* node should be found and merged
* @return The DOM node for the IHost
*/
RSEDOMNode createNode(RSEDOMNode parent, IHost host, boolean clean);
/**
* Creates a DOM node for a connector service
* @param parent
* @param connectorService
* @return
* @param parent the parent of this node, must be node for an IHost
* @param cs the connector service from which to create a node
* @param clean true if the node should being created from scratch, false if the an existing
* node should be found and merged
* @return The DOM node for the IConnectorService
*/
RSEDOMNode createNode(RSEDOMNode parent, IConnectorService cs, boolean clean);
/**
* Creates a DOM node for a server launcher
* @param parent
* @param serverLauncher
* @return
* @param parent the parent of this node, must be a node for an IConnectorService
* @param sl the server launcher properties from which to create a node
* @param clean true if the node should being created from scratch, false if the an existing
* node should be found and merged
* @return the DOM node for the IServerLauncherProperties
*/
RSEDOMNode createNode(RSEDOMNode parent, IServerLauncherProperties sl, boolean clean);
/**
* Creates a DOM node for a subsystem
* @param parent
* @param subSystem
* @return
* @param parent the parent of this node, must be a node for an IConnectorService
* @param ss the subsystem from which to create a node
* @param clean true if the node should being created from scratch, false if the an existing
* node should be found and merged
* @return The DOM node for the ISubSystem
*/
RSEDOMNode createNode(RSEDOMNode parent, ISubSystem ss, boolean clean);
/**
* Creates a DOM node for a filter
* @param parent
* @param filter
* @return
* @param parent the parent DOM node for this new node, must be a node for an ISystemFilterPool
* @param filter the filter from which to create the node
* @param clean true if the node should being created from scratch, false if the an existing
* node should be found and merged
* @return The DOM node for the filter
*/
RSEDOMNode createNode(RSEDOMNode parent, ISystemFilter sf, boolean clean);
RSEDOMNode createNode(RSEDOMNode parent, ISystemFilter filter, boolean clean);
/**
* Create a DOM node representing a filter pool
* @param parent
* @param filterPool
* @return
* @param parent the parent DOM node for this new node, must be a node for an ISystemProfile
* @param filterPool the filter pool from which to create the node
* @param clean true if the node should being created from scratch, false if the an existing
* node should be found and merged
* @return The DOM node for the filter pool
*/
RSEDOMNode createNode(RSEDOMNode parent, ISystemFilterPool fp, boolean clean);
/**
* Creates a DOM node for a filter pool reference
* @param parent
* @param filterPoolReference
* @return
* @param parent the parent DOM node for this new node, must be a node for an ISubSystem
* @param fpr the filter pool reference from which to create the node
* @param clean true if the node should being created from scratch, false if the an existing
* node should be found and merged
* @return The DOM node for this filter pool reference
*/
RSEDOMNode createNode(RSEDOMNode parent , ISystemFilterPoolReference fpr, boolean clean);
/**
* Creates a DOM node for a filter string
* @param parent
* @param filterString
* @return
* @param parent the parent DOM node for this new node, must be node for an ISystemFilter
* @param fs the filter string from which to create the node
* @param clean true if the node should being created from scratch, false if the an existing
* node should be found and merged
* @return the DOM node for this filter string
*/
RSEDOMNode createNode(RSEDOMNode parent, ISystemFilterString fs, boolean clean);
/**
* Creates DOM nodes for each associated property set
* @param parent
* @param modelObject
* @return
* Creates DOM nodes for each associated property set of a model object
* @param parent the parent DOM node for these new nodes, can be DOM node for any RSE model object
* @param mo the model object
* @param clean true if the node should being created from scratch, false if the an existing
* node should be found and merged
* @return an array of DOM nodes for the property sets of an RSE model object
*/
RSEDOMNode[] createPropertySetNodes(RSEDOMNode parent, IRSEModelObject mo, boolean clean);
}

View file

@ -68,24 +68,24 @@ public class RSEDOM extends RSEDOMNode {
RSEDOMNodeAttribute[] attributes = node.getAttributes();
RSEDOMNode[] children = node.getChildren();
System.out.println(indent + "RSEDOMNode " + type);
System.out.println(indent + "{");
String sindent = indent + " ";
System.out.println(indent + "RSEDOMNode " + type); //$NON-NLS-1$
System.out.println(indent + "{"); //$NON-NLS-1$
String sindent = indent + " "; //$NON-NLS-1$
System.out.println(sindent + "name=" + name);
System.out.println(sindent + "name=" + name); //$NON-NLS-1$
for (int i = 0; i < attributes.length; i++) {
RSEDOMNodeAttribute attribute = attributes[i];
String key = attribute.getKey();
String value = attribute.getValue();
System.out.println(sindent + key + "=" + value);
System.out.println(sindent + key + "=" + value); //$NON-NLS-1$
}
String cindent = sindent + " ";
String cindent = sindent + " "; //$NON-NLS-1$
for (int c = 0; c < children.length; c++) {
RSEDOMNode child = children[c];
print(child, cindent);
}
System.out.println(indent + "}");
System.out.println(indent + "}"); //$NON-NLS-1$
}
public Job getSaveJob() {

View file

@ -65,8 +65,7 @@ public class RSEDOMNode implements IRSEDOMConstants, Serializable
}
/**
* Propagate needs save indicator up to the root
* @param flag
* Propagates the needs save indicator up to the root
*/
public void markForSave()
{
@ -102,8 +101,7 @@ public class RSEDOMNode implements IRSEDOMConstants, Serializable
}
/**
* Returns the name of this node
* @return
* @return the name of this node
*/
public String getName()
{
@ -111,8 +109,7 @@ public class RSEDOMNode implements IRSEDOMConstants, Serializable
}
/**
* Returns the type of this node
* @return
* @return the type of this node
*/
public String getType()
{
@ -120,8 +117,7 @@ public class RSEDOMNode implements IRSEDOMConstants, Serializable
}
/**
* Returns the parent of this node
* @return
* @return the parent of this node
*/
public RSEDOMNode getParent()
{
@ -129,8 +125,7 @@ public class RSEDOMNode implements IRSEDOMConstants, Serializable
}
/**
* Returns all the children of this node
* @return
* @return all the children of this node
*/
public RSEDOMNode[] getChildren()
{
@ -138,9 +133,8 @@ public class RSEDOMNode implements IRSEDOMConstants, Serializable
}
/**
* Returns the first attribute found that has the specified key
* @param key
* @return
* @param key the name of this attribute
* @return the first attribute found that has the specified name
*/
public RSEDOMNodeAttribute getAttribute(String key)
{
@ -156,9 +150,8 @@ public class RSEDOMNode implements IRSEDOMConstants, Serializable
}
/**
* Returns the immediate children of this node that are of the specified type
* @param type
* @return
* @return the immediate children of this node that are of the specified type
*/
public RSEDOMNode[] getChildren(String type)
{
@ -175,10 +168,9 @@ public class RSEDOMNode implements IRSEDOMConstants, Serializable
}
/**
* Returns the first immediate child of this node that is of the specified type and name
* @param type
* @param name
* @return
* @return the first immediate child of this node that is of the specified type and name
*/
public RSEDOMNode getChild(String type, String name)
{
@ -194,8 +186,7 @@ public class RSEDOMNode implements IRSEDOMConstants, Serializable
}
/**
* Returns all the attributes for this node
* @return
* @return all the attributes for this node
*/
public RSEDOMNodeAttribute [] getAttributes()
{