Commit 2cd5dea5 authored by Robert Smith's avatar Robert Smith
Browse files

Fixed persistence bugs



Fixed a bug where ExecutableEntries were calling the supertype clone()
method, causing Forms using them to have Entries of the wrong type. 

Fixed a bug where the VibeModel's IOservice, which does not need to be
persisted, was missing an XMLTransient annotation.
Signed-off-by: Robert Smith's avatarRobert Smith <smithrw@ornl.gov>
parent e8806ea6
...@@ -147,6 +147,46 @@ public class ExecutableEntry extends DiscreteEntry { ...@@ -147,6 +147,46 @@ public class ExecutableEntry extends DiscreteEntry {
} }
} }
/*
* (non-Javadoc)
* @see org.eclipse.ice.datastructures.entry.DiscreteEntry#clone()
*/
@Override
public Object clone() {
ExecutableEntry entry = new ExecutableEntry();
entry.copy(this);
return entry;
}
/**
* Copy the source entity's data into this object.
*
* @param entity The Entry of which this object will be come a copy.
*/
public void copy(ExecutableEntry entity) {
// Return if null
if (entity == null) {
return;
}
//Copy all data members
super.copy(entity);
executableUri = entity.executableUri;
//Clear the current map
allowedValueToURI.clear();
//Copy in each value from the other map.
for(String value : entity.allowedValueToURI.keySet()){
allowedValueToURI.put(value, allowedValueToURI.get(value));
}
return;
}
/* /*
* (non-Javadoc) * (non-Javadoc)
* *
......
...@@ -22,6 +22,7 @@ import java.net.URISyntaxException; ...@@ -22,6 +22,7 @@ import java.net.URISyntaxException;
import java.util.ArrayList; import java.util.ArrayList;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
...@@ -58,6 +59,7 @@ public class VibeModel extends Model { ...@@ -58,6 +59,7 @@ public class VibeModel extends Model {
private ArrayList<String> actionItems; private ArrayList<String> actionItems;
@XmlTransient
private IIOService ioService; private IIOService ioService;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment