Commit 1055de55 authored by Robert Smith's avatar Robert Smith

Made templates optional for VIBE

The VIBE Key-Value Pair Item now defaults to an empty table. Templates
may still be selected manually to populate it.
Signed-off-by: Robert Smith's avatarRobert Smith <smithrw@ornl.gov>
parent 768133f3
...@@ -178,6 +178,20 @@ public class VibeKVPairTester { ...@@ -178,6 +178,20 @@ public class VibeKVPairTester {
} }
} }
//The table should be empty initially
assertEquals(0, table.numberOfRows());
//Load a template
template.retrieveAllEntries().get(0).setValue("NTG");
// Give the form time to load the new data
try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
fail();
}
// Whether or not the CUTOFF key was found in the table // Whether or not the CUTOFF key was found in the table
boolean foundCutoff = false; boolean foundCutoff = false;
...@@ -190,7 +204,7 @@ public class VibeKVPairTester { ...@@ -190,7 +204,7 @@ public class VibeKVPairTester {
} }
// If the CUTOFF key was absent, then the table was not set up correctly // If the CUTOFF key was absent, then the table was not set up correctly
if (!foundCutoff) { if (foundCutoff) {
fail("Did not find CUTOFF row in default table."); fail("Did not find CUTOFF row in default table.");
} }
......
...@@ -74,7 +74,7 @@ public class VibeKVPair extends Item implements IReader, IWriter { ...@@ -74,7 +74,7 @@ public class VibeKVPair extends Item implements IReader, IWriter {
/** /**
* The name of the default template to load. * The name of the default template to load.
*/ */
private static String defaultTemplate = "NTG"; private static String defaultTemplate = "None";
/** /**
* The tag that indicates this file should be exported to kv pairs. * The tag that indicates this file should be exported to kv pairs.
...@@ -135,6 +135,7 @@ public class VibeKVPair extends Item implements IReader, IWriter { ...@@ -135,6 +135,7 @@ public class VibeKVPair extends Item implements IReader, IWriter {
// The list of available templates // The list of available templates
ArrayList<String> templateNames = new ArrayList<String>(); ArrayList<String> templateNames = new ArrayList<String>();
templateNames.add("None");
templateNames.add("NTG"); templateNames.add("NTG");
templateNames.add("DualFoil"); templateNames.add("DualFoil");
...@@ -728,6 +729,10 @@ public class VibeKVPair extends Item implements IReader, IWriter { ...@@ -728,6 +729,10 @@ public class VibeKVPair extends Item implements IReader, IWriter {
return "VibeKVPairItem"; return "VibeKVPairItem";
} }
/*
* (non-Javadoc)
* @see org.eclipse.ice.item.Item#update(org.eclipse.ice.datastructures.ICEObject.IUpdateable)
*/
@Override @Override
public void update(IUpdateable updateable) { public void update(IUpdateable updateable) {
......
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