) allowedActions.clone();
- // end-user-code
}
/**
- *
- *
* This operation returns the status of the Item.
- *
- *
*
- * @return
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
+ * @return The current status of the Item.
*/
public FormStatus getStatus() {
- // begin-user-code
// If the Item is disabled, do not do any further checks. Just report
// it.
@@ -1313,88 +1021,58 @@ public FormStatus getStatus() {
}
return status;
- // end-user-code
}
/**
- *
- *
* This protected operation setups the Entries, DataComponents and Form for
* a subclass of Item. The default implementation of setupForm() will add
* Entries with parents to the Registry if the Item is loaded from a file,
* otherwise it will do nothing. Subclasses should tailor this operation as
* needed. The list of allowed Actions may also be specified here.
- *
- *
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
protected void setupForm() {
- // begin-user-code
// Initialize the Form it should be a PSF in case the Item is loaded
// from a PSF file.
form = new PainfullySimpleForm();
return;
- // end-user-code
}
/**
- *
- *
* This operation is used to setup the name and description of an Item. This
* information can be provided by the ItemBuilder responsible for this Item
* or any client, but it is convenient to define it on the class. It is also
* convenient to define it separately of the work in setupForm(). The
* default implementation of this operation does nothing and subclasses must
* override it.
- *
- *
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
protected void setupItemInfo() {
- // begin-user-code
// Do nothing by default
- // end-user-code
}
/**
- *
- *
* The reviewEntries operations reviews and updates Entry values as needed.
* This is an abstract operation that must be implemented by a subclass.
- *
- *
+ *
* This operation is only concerned with the business issues of the Form and
* not the contractual obligations that it must fulfill to satisfy ICE. For
* example, reviewEntries() should make sure that the Form has acceptable
* Entries for the particular business problem instead of worrying about
* unique identifiers. This operation should also return the status of the
* Form as a literal from the FormStatus enumeration.
- *
- *
+ *
* By default, the reviewEntries() operation on an Item only performs simple
* dependency checks to determine if Entries should or should not be
* notified that their parents have changed or been marked ready.
- *
- *
*
* @param preparedForm
- * @return
- * True if the Entries are completely specified and the Item can be
+ * @return True if the Entries are completely specified and the Item can be
* processed, false otherwise.
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
protected FormStatus reviewEntries(Form preparedForm) {
- // begin-user-code
// Local Declarations
FormStatus retStatus = FormStatus.InfoError;
@@ -1421,31 +1099,21 @@ protected FormStatus reviewEntries(Form preparedForm) {
}
return retStatus;
- // end-user-code
}
/**
- *
- *
* This operation performs dependency matching by registering IUpdateable
* objects with the registry based on values and child names. Subclasses
* should always override this operation to register their dependencies
* since dependencies must be re-registered if the Item is copied. This
* operation does a non-trivial task, so subclasses should always call
* super.registerUpdateables() too.
- *
- *
+ *
* The default implementation pulls all Entries from all Data, Table and
* Output components and registers parent-child dependencies for those
* Entries.
- *
- *
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
protected void registerUpdateables() {
- // begin-user-code
// Create the registry
registry = new Registry();
@@ -1481,24 +1149,14 @@ protected void registerUpdateables() {
// can mark themselves ready.
registry.dispatch();
- // end-user-code
}
/**
- *
- *
* This operation returns the hashcode value of the Item.
- *
- *
*
- * @return
- * The hashcode
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
+ * @return The hashcode
*/
public int hashCode() {
- // begin-user-code
// Local Declaration
int hash = 9;
@@ -1522,26 +1180,16 @@ public int hashCode() {
hash += 31 * this.builderName.hashCode();
return hash;
- // end-user-code
}
/**
- *
- *
* This operation performs a deep copy of the attributes of another Item
* into the current Item.
- *
- *
*
* @param otherItem
- *
* The Item from which information should be copied.
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void copy(Item otherItem) {
- // begin-user-code
// Return if otherItem is null
if (otherItem == null) {
@@ -1568,24 +1216,14 @@ public void copy(Item otherItem) {
setupEntryList();
return;
- // end-user-code
}
/**
- *
- *
* This operation provides a deep copy of the Item.
- *
- *
*
- * @return
- * A clone of the Item.
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
+ * @return A clone of the Item.
*/
public Object clone() {
- // begin-user-code
// Create a new instance, copy contents, and return it
// create a new instance of Item and copy contents
@@ -1593,31 +1231,22 @@ public Object clone() {
item.copy(this);
return item;
- // end-user-code
-
}
/**
- *
- *
* This operation loads the SerializedItem from a Painfully Simple Form file
* format. If it is unable to load the InputStream or determines that the
* contents of the stream are not consistent with the PSF format, then it
* will throw an IOException. It delegates the actual work to a
* PainfullySimpleForm.
- *
- *
*
* @param inputStream
- *
* The InputStream that contains a PSF file.
- *
* @throws IOException
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
+ * This exception is thrown if there is a problem with the
+ * Inputstream.
*/
public void loadFromPSF(InputStream inputStream) throws IOException {
- // begin-user-code
// Local Declarations
InputStreamReader inputStreamReader = null;
@@ -1658,54 +1287,34 @@ public void loadFromPSF(InputStream inputStream) throws IOException {
throw new IOException(
"PSF cannot be loaded from a null InputStream!");
}
- // end-user-code
}
/**
- *
- *
* This operation returns true if the Item is already associated with a
* project space that it can use for storing and retrieving files. That is,
* it returns true if the non-nullary constructor was called or setProject()
* has been called.
- *
- *
*
- * @return
- * True if the Item has a project, false otherwise.
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
+ * @return True if the Item has a project, false otherwise.
*/
public boolean hasProject() {
- // begin-user-code
// Return true if the Project is set
return (project != null);
- // end-user-code
}
/**
- *
- *
* This operation sets the project for the Item. It should only be called
* after the Item is constructed with its nullary constructor. Calling it
* after the Item has been running for a time could lead to unintended
* consequences.
- *
- *
*
* @param projectSpace
- *
* The Eclipse Platform IProject that should be referenced for
* project space information by this Item.
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void setProject(IProject projectSpace) {
- // begin-user-code
// Set the project so long as it is not null
if (projectSpace != null) {
@@ -1717,24 +1326,15 @@ public void setProject(IProject projectSpace) {
// FIXME - SHOULD THIS ONLY BE ALLOWED TO BE CALLED ONCE??? ~JJB
// 20120502 14:01
- // end-user-code
}
/**
- *
- *
* This operation sets up a master list of Entries that are managed by the
* Item base class to handle dependencies and accelerate dependency
* checking. It is called by the non-nullary constructor and the loadFrom*
* operations. It also add the components to the Item's component map.
- *
- *
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private void setupEntryList() {
- // begin-user-code
// Local Declarations
int numComps = 0;
@@ -1761,32 +1361,20 @@ private void setupEntryList() {
}
}
- // end-user-code
}
/**
- *
- *
* This operation adds a Component to the component map with the specified
* key (data, output or table). It is called by the visit() operations that
* the Item realizes to satisfy the IComponentVisitor interface.
- *
- *
*
* @param component
- *
* The Component to insert into the map of Components.
- *
* @param key
- *
* The key that identifies the type of the Component, equal to
* one of "data," "output" or "table."
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private void addComponentToMap(Component component, String key) {
- // begin-user-code
// Local Declarations
ArrayList components = null;
@@ -1800,21 +1388,12 @@ private void addComponentToMap(Component component, String key) {
}
return;
- // end-user-code
}
/**
- *
- *
* This operation instantiates the output file.
- *
- *
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private void setupOutputFile() {
- // begin-user-code
// Setup the output file handle name
String outputFilename = form.getName().replaceAll("\\s+", "_") + "_"
@@ -1837,35 +1416,23 @@ private void setupOutputFile() {
}
return;
- // end-user-code
}
/**
- *
- *
* This operation returns a list of files in the current project space with
* the given type or all of the files in the project space if no type is
* selected (type = null) if and only if the project space is available. If
* the project space is not available, it will return null.
- *
- *
*
* @param type
- *
* The file extension or type of the file that should be
* discovered in the project or null if all files should be
* returned by this operation.
- *
- * @return
- * The names of the files in the project space with the given type
+ * @return The names of the files in the project space with the given type
* or names of all of the files in the project space if no type is
* specified.
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
protected ArrayList getProjectFileNames(String type) {
- // begin-user-code
ArrayList files = null, allFiles = null;
@@ -1908,72 +1475,42 @@ protected ArrayList getProjectFileNames(String type) {
}
return files;
- // end-user-code
}
/**
- *
- *
* This operation directs the Item to reload data that it has read from its
* project. Calling this operation signifies to the Item that new files have
* been added or old files have been updated in the project.
- *
- *
+ *
* Calling this operation does not refresh the IProject.
- *
- *
+ *
* This operation is meant to be overridden by subclasses and customized. It
* does nothing on the base class.
- *
- *
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void reloadProjectData() {
- // begin-user-code
// TODO Auto-generated method stub
- // end-user-code
}
/**
- *
- *
* This operation adds a listeners to the Item's set of listeners.
- *
- *
*
* @param listener
- *
* The new listener that is subscribing to the Item for updates.
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void addListener(ItemListener listener) {
- // begin-user-code
if (listener != null) {
listeners.add(listener);
}
return;
- // end-user-code
}
/**
- *
- *
* This operation notifies the listeners of a change in the IProject,
* normally do to a newly created or deleted resource.
- *
- *
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
protected void notifyListenersOfProjectChange() {
- // begin-user-code
// Notify all of the listeners that they should reload their project
// data because the project has been changed somehow.
@@ -1982,27 +1519,17 @@ protected void notifyListenersOfProjectChange() {
}
return;
- // end-user-code
}
/**
- *
- *
* This operation returns the Eclipse IFolder that points to the preferences
* directory for this Item. This operation will try to create the directory
* in the project if the project exists. It will return null if the project
* space doesn't exist or it can't create the directory.
- *
- *
*
- * @return
- * The directory where preferences should be stored.
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
+ * @return The directory where preferences should be stored.
*/
protected IFolder getPreferencesDirectory() {
- // begin-user-code
// Local Declarations
String folderName = getName().replaceAll("\\s+", "_");
@@ -2024,7 +1551,6 @@ protected IFolder getPreferencesDirectory() {
return folder;
- // end-user-code
}
/**
@@ -2245,67 +1771,43 @@ protected void copyFiles(String sourceDir, String destinationDir,
}
/**
- *
- *
* This operation loads data into the Item from an input file. This
* operation should be overridden by subclasses and specialized for the
* correct behavior. The implementation on the base class does nothing.
- *
- *
+ *
* Subclasses that override this operation should make sure that a failed
* load does not result in a partially initialized or incorrect Form and an
* erroneous Item state.
- *
- *
+ *
* This operation expects that the file is in the workspace and only needs
* its name to find it.
- *
- *
*
* @param input
- *
* The file containing the input that should be loaded. It should
* be a file in the project space.
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void loadInput(String input) {
- // begin-user-code
// TODO Auto-generated method stub
- // end-user-code
}
/**
- *
- *
* This operation updates the Item to let it know that a particular event
* has occurred in an ICE subsystem, remote ICE subsystem or external
* third-party process.
- *
- *
+ *
* The base class takes care of a small amount of worked related to
* messages, namely writing them to the process log, and subclasses should
* override this operation to specialize the behavior. Subclasses should
* still call the operation on the base class (via super.update(msg)) from
* their overridden operation so that the message can be properly logged.
- *
- *
*
* @param msg
- *
* The incoming Message.
- *
- * @return
- * True if the Item was able to respond to the Message, false
+ * @return True if the Item was able to respond to the Message, false
* otherwise.
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public boolean update(Message msg) {
- // begin-user-code
// Dump the text to stdout if we are in debugging mode.
if (debuggingEnabled) {
@@ -2319,28 +1821,18 @@ public boolean update(Message msg) {
// Just return true for now until the logging functionality can be moved
// from JobLauncher to Item.
return true;
- // end-user-code
}
/**
- *
- *
* This operation sets the Item's builderName. This operation can only be
* called once. Although this operation is public, it should only be called
* in the respective ItemBuilder class.
- *
- *
*
* @param builderName
- *
* The builderName to be set. Can not be null or the empty
* string.
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void setItemBuilderName(String builderName) {
- // begin-user-code
// If the passed parameter is not null, not an empty string, and the
// builder name has not been set.
@@ -2351,76 +1843,43 @@ public void setItemBuilderName(String builderName) {
this.builderName = builderName;
}
- // end-user-code
}
/**
- *
- *
* This operation sets the Item's builderName. This operation can only be
* called once. Although this operation is public, it should only be called
* in the respective ItemBuilder class.
- *
- *
*
- * @return
- * Returns the builder name. This can be null.
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
+ * @return Returns the builder name. This can be null.
*/
public String getItemBuilderName() {
- // begin-user-code
return this.builderName;
- // end-user-code
}
/**
- *
- *
* This operation disables the Item. Disabled Items will not accept changes
* to their Forms and they cannot be processed.
- *
- *
*
* @param state
- *
* True if the Item is disabled, false if not.
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void disable(boolean state) {
- // begin-user-code
// Enable is the opposite of disabled.
enabled = !state;
- // end-user-code
}
/**
- *
- *
* True if the Item is enabled, false if it is disabled.
- *
- *
*
- * @return
- * True if the Item is enabled, false if not.
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
+ * @return True if the Item is enabled, false if not.
*/
public boolean isEnabled() {
- // begin-user-code
return enabled;
- // end-user-code
}
/**
- *
- *
* This operation returns a file handle to the output file for the Item. It
* returns a handle to the file whether or not it actually exists and
* clients should check the File.exists() operation before attempting to
@@ -2430,17 +1889,10 @@ public boolean isEnabled() {
* to only read from the file. Nullerizing the file handle will not
* nullerize it in the Item. If the output file for the Item has not been
* configured, this operation will return null.
- *
- *
*
- * @return
- * The output file for this Item, thoroughly documented elsewhere.
- *
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
+ * @return The output file for this Item, thoroughly documented elsewhere.
*/
public File getOutputFile() {
- // begin-user-code
// Local Declarations
File copiedFileHandle = null;
@@ -2450,7 +1902,6 @@ public File getOutputFile() {
copiedFileHandle = new File(outputFile.toURI());
}
return copiedFileHandle;
- // end-user-code
}
/**
@@ -2477,134 +1928,98 @@ protected IActionFactory getActionFactory() {
* (non-Javadoc)
*
* @see IComponentVisitor#visit(DataComponent component)
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void visit(DataComponent component) {
- // begin-user-code
// Add the Component to the map of components
addComponentToMap(component, "data");
return;
- // end-user-code
}
/**
* (non-Javadoc)
*
* @see IComponentVisitor#visit(ResourceComponent component)
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void visit(ResourceComponent component) {
- // begin-user-code
// TODO Auto-generated method stub
- // end-user-code
}
/**
* (non-Javadoc)
*
* @see IComponentVisitor#visit(TableComponent component)
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void visit(TableComponent component) {
- // begin-user-code
// Add the Component to the map of components
addComponentToMap(component, "table");
return;
- // end-user-code
}
/**
* (non-Javadoc)
*
* @see IComponentVisitor#visit(MatrixComponent component)
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void visit(MatrixComponent component) {
- // begin-user-code
// TODO Auto-generated method stub
- // end-user-code
}
/**
* (non-Javadoc)
*
* @see IComponentVisitor#visit(IShape component)
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void visit(IShape component) {
- // begin-user-code
// TODO Auto-generated method stub
- // end-user-code
}
/**
* (non-Javadoc)
*
* @see IComponentVisitor#visit(GeometryComponent component)
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void visit(GeometryComponent component) {
- // begin-user-code
// TODO Auto-generated method stub
- // end-user-code
}
/**
* (non-Javadoc)
*
* @see IComponentVisitor#visit(MasterDetailsComponent component)
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void visit(MasterDetailsComponent component) {
- // begin-user-code
// TODO Auto-generated method stub
- // end-user-code
}
/**
* (non-Javadoc)
*
* @see IComponentVisitor#visit(TreeComposite component)
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void visit(TreeComposite component) {
- // begin-user-code
// TODO Auto-generated method stub
- // end-user-code
}
/**
* (non-Javadoc)
*
* @see IComponentVisitor#visit(IReactorComponent component)
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void visit(IReactorComponent component) {
- // begin-user-code
// TODO Auto-generated method stub
- // end-user-code
}
@Override
@@ -2619,14 +2034,10 @@ public void visit(TimeDataComponent component) {
* (non-Javadoc)
*
* @see IComponentVisitor#visit(MeshComponent component)
- * @generated
- * "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void visit(MeshComponent component) {
- // begin-user-code
// TODO Auto-generated method stub
- // end-user-code
}
@Override