rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
DefaultMutableTreeNode selectedNode = getSelectedNode();
public void createExperimentFromFile() { // query user for INI file and create society SocietyComponent society = newSocietyComponent(); if (society == null) return; DefaultMutableTreeNode selectedNode = getSelectedNode(); Experiment experiment = new Experiment("Experiment for " + society.ge...
addExperimentToWorkspace(experiment, selectedNode); addSocietyToWorkspace(society, selectedNode);
DefaultMutableTreeNode experimentNode = addExperimentToWorkspace(experiment, getSelectedNode()); addSocietyToWorkspace(society, experimentNode);
public void createExperimentFromFile() { // query user for INI file and create society SocietyComponent society = newSocietyComponent(); if (society == null) return; DefaultMutableTreeNode selectedNode = getSelectedNode(); Experiment experiment = new Experiment("Experiment for " + society.ge...
DefaultMutableTreeNode selectedNode = getSelectedNode();
public void createExperimentFromUI() { String name = getUniqueExperimentName("", false); if (name == null) return; DefaultMutableTreeNode selectedNode = getSelectedNode(); SocietyComponent society = new SocietyUIComponent("Society for " + name); Experiment experiment = new Experiment(name, society...
addExperimentToWorkspace(experiment, selectedNode); addSocietyToWorkspace(society, selectedNode);
DefaultMutableTreeNode experimentNode = addExperimentToWorkspace(experiment, getSelectedNode()); addSocietyToWorkspace(society, experimentNode);
public void createExperimentFromUI() { String name = getUniqueExperimentName("", false); if (name == null) return; DefaultMutableTreeNode selectedNode = getSelectedNode(); SocietyComponent society = new SocietyUIComponent("Society for " + name); Experiment experiment = new Experiment(name, society...
if (childNode.isLeaf()) nodesToDelete.add(childNode);
nodesToDelete.add(childNode);
public void deleteFolder() { DefaultMutableTreeNode node = getSelectedNode(); if (node == root) return; if (node == null) return; int reply = JOptionPane.showConfirmDialog(this, "Delete folder and all its contents?", "Delete Folde...
DefaultMutableTreeNode node = findNodeNamed(recipeName); if (node != null) { workspace.setSelection(node); model.removeNodeFromParent(node); recipeNames.remove(recipeName); }
public void deleteRecipeFromDatabase() { Map recipeNamesHT = helper.getRecipeNamesFromDatabase(); Set dbRecipeNames = recipeNamesHT.keySet(); if (dbRecipeNames.isEmpty()) { JOptionPane.showMessageDialog(this, "There are no recipes in the database", ...
private void deleteRecipeInNode(DefaultMutableTreeNode node) { if (node == null) return; model.removeNodeFromParent(node); RecipeComponent rc = (RecipeComponent) node.getUserObject();
private void deleteRecipeInNode(DefaultMutableTreeNode recipeNode) { RecipeComponent recipe = (RecipeComponent) recipeNode.getUserObject(); model.removeNodeFromParent(recipeNode); int result = JOptionPane.showConfirmDialog(this, "Delete recipe " + recipe.getRecipeName() + " from all experiments?", "Delete Recipe", JOpt...
private void deleteRecipeInNode(DefaultMutableTreeNode node) { if (node == null) return; model.removeNodeFromParent(node); RecipeComponent rc = (RecipeComponent) node.getUserObject(); try { PDbBase pdb = new PDbBase(); try { int status = pdb.recipeExists(rc); if (status == PDbBase....
int status = pdb.recipeExists(rc); if (status == PDbBase.RECIPE_STATUS_EXISTS || status == PDbBase.RECIPE_STATUS_DIFFERS) {
int status = pdb.recipeExists(recipe); if (status == PDbBase.RECIPE_STATUS_EXISTS || status == PDbBase.RECIPE_STATUS_DIFFERS) {
private void deleteRecipeInNode(DefaultMutableTreeNode node) { if (node == null) return; model.removeNodeFromParent(node); RecipeComponent rc = (RecipeComponent) node.getUserObject(); try { PDbBase pdb = new PDbBase(); try { int status = pdb.recipeExists(rc); if (status == PDbBase....
rc.getRecipeName() +
recipe.getRecipeName() +
private void deleteRecipeInNode(DefaultMutableTreeNode node) { if (node == null) return; model.removeNodeFromParent(node); RecipeComponent rc = (RecipeComponent) node.getUserObject(); try { PDbBase pdb = new PDbBase(); try { int status = pdb.recipeExists(rc); if (status == PDbBase....
pdb.removeLibRecipe(rc);
pdb.removeLibRecipe(recipe);
private void deleteRecipeInNode(DefaultMutableTreeNode node) { if (node == null) return; model.removeNodeFromParent(node); RecipeComponent rc = (RecipeComponent) node.getUserObject(); try { PDbBase pdb = new PDbBase(); try { int status = pdb.recipeExists(rc); if (status == PDbBase....
recipeNames.remove(rc.getRecipeName());
recipeNames.remove(recipe.getRecipeName());
private void deleteRecipeInNode(DefaultMutableTreeNode node) { if (node == null) return; model.removeNodeFromParent(node); RecipeComponent rc = (RecipeComponent) node.getUserObject(); try { PDbBase pdb = new PDbBase(); try { int status = pdb.recipeExists(rc); if (status == PDbBase....
DefaultMutableTreeNode node = getSelectedNode(); SocietyComponent society = (SocietyComponent)node.getUserObject(); if (!society.isEditable()) { int result = JOptionPane.showConfirmDialog(this, "Society has been or is being used; delete anyway?", "Society Not Editable", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_ME...
deleteSocietyInNode(getSelectedNode());
public void deleteSociety() { DefaultMutableTreeNode node = getSelectedNode(); SocietyComponent society = (SocietyComponent)node.getUserObject(); if (!society.isEditable()) { int result = JOptionPane.showConfirmDialog(this, "Society has been or is being used; delete anyway?", "Society Not Ed...
if (node.isLeaf() && node.getUserObject().equals(userObject))
if (node.getUserObject().equals(userObject))
private DefaultMutableTreeNode findNode(Object userObject) { Enumeration nodes = root.depthFirstEnumeration(); while (nodes.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)nodes.nextElement(); if (node.isLeaf() && node.getUserObject().equals(userObject)) return node; }...
private String generateRecipeName(String name) {
public String generateRecipeName(String name) {
private String generateRecipeName(String name) { return recipeNames.generateName(name); }
private String generateSocietyName(String name) {
public String generateSocietyName(String name) {
private String generateSocietyName(String name) { return societyNames.generateName(name); }
public Experiment[] getExperiments() {
private ArrayList getExperiments() {
public Experiment[] getExperiments() { ArrayList experiments = new ArrayList(); Enumeration nodes = root.depthFirstEnumeration(); while (nodes.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)nodes.nextElement(); if (node.isLeaf()) { Object o = node.getUser...
if (node.isLeaf()) { Object o = node.getUserObject(); if (o instanceof Experiment) experiments.add(o); }
Object o = node.getUserObject(); if (o instanceof Experiment) experiments.add(o);
public Experiment[] getExperiments() { ArrayList experiments = new ArrayList(); Enumeration nodes = root.depthFirstEnumeration(); while (nodes.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)nodes.nextElement(); if (node.isLeaf()) { Object o = node.getUser...
return (Experiment[])experiments.toArray(new Experiment[experiments.size()]);
return experiments;
public Experiment[] getExperiments() { ArrayList experiments = new ArrayList(); Enumeration nodes = root.depthFirstEnumeration(); while (nodes.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)nodes.nextElement(); if (node.isLeaf()) { Object o = node.getUser...
String name = null; while (true) { name = (String) JOptionPane.showInputDialog(this, "Enter Experiment Name", "Experiment Name", JOptionPane.QUESTION_MESSAGE, null, null, originalName); if (name == null) return null; if (name.equals(originalName) && allowExistingName) return name; if (!experimentNames.contains(name)) ...
return getUniqueName("Experiment", experimentNames, originalName, allowExistingName, "isExperimentNameInDatabase");
public String getUniqueExperimentName(String originalName, boolean allowExistingName) { String name = null; while (true) { name = (String) JOptionPane.showInputDialog(this, "Enter Experiment Name", "Experiment Name", ...
private String getUniqueName(String prompt, String errorMsgTitle, UniqueNameSet uniqueNames) { String name;
private String getUniqueName(String prompt, UniqueNameSet names, String originalName, boolean allowExistingName, String databaseCheck) { Method dbCheckMethod = null; String name = null;
private String getUniqueName(String prompt, String errorMsgTitle, UniqueNameSet uniqueNames) { String name; while (true) { name = JOptionPane.showInputDialog(prompt); if (name == null || name.equals("")) return null; if (!uniqueNames.contains(name)) break; ...
name = JOptionPane.showInputDialog(prompt); if (name == null || name.equals("")) return null; if (!uniqueNames.contains(name)) break; int result = JOptionPane.showConfirmDialog(this, "Use an unique name", errorMsgTitle, JOptionPane.OK_CANCEL_OPTION, JOptionPane.ERROR_MESSAGE); if (result != JOptionPane.OK_OPTION) retur...
String inputPrompt = "Enter " + prompt + " Name"; String title = prompt + " Name"; name = (String) JOptionPane.showInputDialog(this, inputPrompt, title, JOptionPane.QUESTION_MESSAGE, null, null, originalName); if (name == null) return null; if (name.equals(originalName) && allowExistingName) return name; if (names.co...
private String getUniqueName(String prompt, String errorMsgTitle, UniqueNameSet uniqueNames) { String name; while (true) { name = JOptionPane.showInputDialog(prompt); if (name == null || name.equals("")) return null; if (!uniqueNames.contains(name)) break; ...
String name = null; while (true) { name = (String) JOptionPane.showInputDialog(this, "Enter Recipe Name", "Recipe Name", JOptionPane.QUESTION_MESSAGE, null, null, originalName); if (name == null) return null; if (name.equals(originalName) && allowExistingName) return name; if (!recipeNames.contains(name)) { Map recip...
return getUniqueName("Recipe", recipeNames, originalName, allowExistingName, "isRecipeNameInDatabase");
public String getUniqueRecipeName(String originalName, boolean allowExistingName) { String name = null; while (true) { name = (String) JOptionPane.showInputDialog(this, "Enter Recipe Name", "Recipe Name", ...
String name = getUniqueName("New folder name", "Folder Name Not Unique", folderNames);
String name = getUniqueFolderName("", false);
public void newFolder() { String name = getUniqueName("New folder name", "Folder Name Not Unique", folderNames); if (name == null) return; DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(name, true); addNode(getSelectedNode(), newNo...
DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(name, true); addNode(getSelectedNode(), newNode); workspace.setSelection(newNode);
addFolderToWorkspace(name, getSelectedNode());
public void newFolder() { String name = getUniqueName("New folder name", "Folder Name Not Unique", folderNames); if (name == null) return; DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(name, true); addNode(getSelectedNode(), newNo...
workspace.setSelection(addRecipeToWorkspace(recipe));
addRecipeToWorkspace(recipe, getSelectedNode());
public void newRecipe() { Object[] values = metNameClassItems; Object answer = JOptionPane.showInputDialog(this, "Select Recipe Type", "Select Recipe", JOptionPane.QUESTION_MESSAGE, null, values, "Empty Recipe"); if (answer instanceof NameClassItem) { NameClassItem item = (...
experiment.saveToDb(saveToDbConflictHandler); GUIUtils.timeConsumingTaskEnd(organizer);
if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (trialId != null) { Experiment experiment = helper.createExperiment(originalExperimentName, cmtDialog.getExperimentName(), cmtDialog.getExperimentId(), trialId); if (experiment != null) addDatabaseExperimentToWorkspace(experiment); }
public void run() { experiment.saveToDb(saveToDbConflictHandler); // save under new name GUIUtils.timeConsumingTaskEnd(organizer); }
GUIUtils.timeConsumingTaskEnd(organizer); }
public void run() { experiment.saveToDb(saveToDbConflictHandler); // save under new name GUIUtils.timeConsumingTaskEnd(organizer); }
String newName = getUniqueName("New folder name", "Folder Name Not Unique", folderNames);
String originalName = (String)(getSelectedNode().getUserObject()); String newName = getUniqueFolderName(originalName, true);
public void renameFolder() { String newName = getUniqueName("New folder name", "Folder Name Not Unique", folderNames); if (newName == null) return; DefaultMutableTreeNode node = getSelectedNode(); if (node.getUserObject().equals(newName))...
folderNames.remove(originalName); folderNames.add(newName);
public void renameFolder() { String newName = getUniqueName("New folder name", "Folder Name Not Unique", folderNames); if (newName == null) return; DefaultMutableTreeNode node = getSelectedNode(); if (node.getUserObject().equals(newName))...
recipe.setName(newName); GUIUtils.timeConsumingTaskStart(organizer); try { new Thread("SaveRecipe") { public void run() { recipe.saveToDatabase(); GUIUtils.timeConsumingTaskEnd(organizer); } }.start(); } catch (RuntimeException re) { if(log.isErrorEnabled()) { log.error("Runtime exception saving recipe", re);
Object o = parentNode.getUserObject(); if (o instanceof Experiment) { Experiment experiment = (Experiment)o; model.removeNodeFromParent(node); experiment.removeRecipeComponent(recipe); RecipeComponent recipeCopy = (RecipeComponent)recipe.copy(newName); experiment.addRecipeComponent(recipeCopy); recipeCopy.saveToDatabas...
public void renameRecipe() { DefaultMutableTreeNode node = getSelectedNode(); final RecipeComponent recipe = (RecipeComponent) node.getUserObject(); String originalName = recipe.getRecipeName(); String newName = getUniqueRecipeName(originalName, true); if (newName == null) return; if (newName.e...
GUIUtils.timeConsumingTaskEnd(organizer);
displayExperiments(recipe);
public void renameRecipe() { DefaultMutableTreeNode node = getSelectedNode(); final RecipeComponent recipe = (RecipeComponent) node.getUserObject(); String originalName = recipe.getRecipeName(); String newName = getUniqueRecipeName(originalName, true); if (newName == null) return; if (newName.e...
recipeNames.add(newName); model.nodeChanged(node);
public void renameRecipe() { DefaultMutableTreeNode node = getSelectedNode(); final RecipeComponent recipe = (RecipeComponent) node.getUserObject(); String originalName = recipe.getRecipeName(); String newName = getUniqueRecipeName(originalName, true); if (newName == null) return; if (newName.e...
recipe.saveToDatabase();
experimentCopy.saveToDb(saveToDbConflictHandler);
public void run() { recipe.saveToDatabase(); GUIUtils.timeConsumingTaskEnd(organizer); }
String newName = getUniqueName("New society name", "Society Name Not Unique", societyNames);
DefaultMutableTreeNode node = getSelectedNode(); DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode)node.getParent(); int index = parentNode.getIndex(node); SocietyComponent society = (SocietyComponent) node.getUserObject(); String originalName = society.getSocietyName(); String newName = getUniqueSocietyName(...
public void renameSociety() { String newName = getUniqueName("New society name", "Society Name Not Unique", societyNames); if (newName == null) return; DefaultMutableTreeNode node = getSelectedNode(); SocietyComponent societyComponen...
DefaultMutableTreeNode node = getSelectedNode(); SocietyComponent societyComponent = (SocietyComponent) node.getUserObject(); if (newName.equals(societyComponent.getSocietyName()))
if (newName.equals(originalName))
public void renameSociety() { String newName = getUniqueName("New society name", "Society Name Not Unique", societyNames); if (newName == null) return; DefaultMutableTreeNode node = getSelectedNode(); SocietyComponent societyComponen...
societyNames.remove(societyComponent.getSocietyName()); societyNames.add(newName); societyComponent.setName(newName); model.nodeChanged(node);
societyNames.remove(originalName); Object o = parentNode.getUserObject(); if (o instanceof Experiment) { Experiment experiment = (Experiment)o; model.removeNodeFromParent(node); experiment.removeSocietyComponent(); SocietyComponent societyCopy = (SocietyComponent)society.copy(newName); experiment.addSocietyComponent(so...
public void renameSociety() { String newName = getUniqueName("New society name", "Society Name Not Unique", societyNames); if (newName == null) return; DefaultMutableTreeNode node = getSelectedNode(); SocietyComponent societyComponen...
folderNames.init(getLeaves(String.class, root), String.class.getMethod("toString", noTypes));
private void restore(String fileName) { PropertyListener l = null; try { File f = new File(fileName); this.workspaceFileName = f.getPath(); if (f.canRead()) { ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f)); try { root = (DefaultMutableTreeNode) ois.readObject(); for (En...
exp.saveToDb(saveToDbConflictHandler);
experiment.saveToDb(saveToDbConflictHandler);
public void run() { exp.saveToDb(saveToDbConflictHandler); // save under new name GUIUtils.timeConsumingTaskEnd(organizer); }
if (experiment != null) { DefaultMutableTreeNode newNode = addExperimentToWorkspace(experiment); RecipeComponent[] recipes = experiment.getRecipeComponents(); for (int i = 0; i < recipes.length; i++) if (!recipeNames.contains(recipes[i].getRecipeName())) addRecipeToWorkspace(recipes[i]); workspace.setSelection(newNode)...
if (experiment != null) addDatabaseExperimentToWorkspace(experiment); } }
public void selectExperimentFromDatabase() { Map experimentNamesMap = ExperimentDB.getExperimentNames(); Set keys = experimentNamesMap.keySet(); JComboBox cb = new JComboBox(keys.toArray(new String[keys.size()])); cb.setEditable(false); JPanel panel = new JPanel(); panel.add(new JLabel("Select Exper...
if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (trialId != null) { Experiment experiment = helper.createExperiment(originalExperimentName, cmtDialog.getExperimentName(), cmtDialog.getExperimentId(), trialId); if (experiment != null) { DefaultMutableTreeNode newNode = addExperimentTo...
societyCopy.saveToDatabase(); GUIUtils.timeConsumingTaskEnd(organizer);
public void run() { // a potentially long process if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (trialId != null) { Experiment experiment = helper.createExperiment(originalExperimentName, cmtDialog.getExperimentName(), cmtDialog.getExperime...
addRecipeToWorkspace(rc);
addRecipeToWorkspace(rc, getSelectedNode());
public void selectRecipeFromDatabase() { Map recipeNamesHT = helper.getRecipeNamesFromDatabase(); Set dbRecipeNames = recipeNamesHT.keySet(); if (dbRecipeNames.isEmpty()) { JOptionPane.showMessageDialog(this, "There are no recipes in the database", ...
DefaultMutableTreeNode parent =
DefaultMutableTreeNode parentNode =
public void startConsole() { DefaultMutableTreeNode node = getSelectedNode(); Object o = node.getUserObject(); Experiment experiment; if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyComponent) o; String name = "Temp Experiment for " + sc.getSocietyName(); name = experimen...
DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(experiment, false); model.insertNodeInto(newNode, parent, parent.getChildCount()); experimentNames.add(name); experiment.addModificationListener(myModificationListener); workspace.setSelection(newNode);
addExperimentToWorkspace(experiment, parentNode);
public void startConsole() { DefaultMutableTreeNode node = getSelectedNode(); Object o = node.getUserObject(); Experiment experiment; if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyComponent) o; String name = "Temp Experiment for " + sc.getSocietyName(); name = experimen...
DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(experiment, false);
public void startExperimentBuilder() { Experiment experiment = null; DefaultMutableTreeNode node = getSelectedNode(); Object o = node.getUserObject(); if (o instanceof RecipeComponent || o instanceof SocietyComponent) { if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyCompone...
model.insertNodeInto(newNode, parentNode, parentNode.getIndex(node) + 1); workspace.setSelection(newNode); experimentNames.add(experiment.getExperimentName()); experiment.addModificationListener(myModificationListener);
addExperimentToWorkspace(experiment, parentNode);
public void startExperimentBuilder() { Experiment experiment = null; DefaultMutableTreeNode node = getSelectedNode(); Object o = node.getUserObject(); if (o instanceof RecipeComponent || o instanceof SocietyComponent) { if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyCompone...
declare_field(Constants.PRIVATE_FINAL_STATIC, Map.class, CONSTRUCTOR_PROXY_MAP);
protected void generate() throws Exception { Class type = getSuperclass(); List constructors = new ArrayList(Arrays.asList(type.getDeclaredConstructors())); filterMembers(constructors, new VisibilityFilter(type)); if (constructors.size() == 0) { throw new IllegalArgumentExcept...
generateFactory();
generateFactory(constructors);
protected void generate() throws Exception { Class type = getSuperclass(); List constructors = new ArrayList(Arrays.asList(type.getDeclaredConstructors())); filterMembers(constructors, new VisibilityFilter(type)); if (constructors.size() == 0) { throw new IllegalArgumentExcept...
private void generateFactory() throws Exception {
private void generateFactory(List constructors) throws Exception {
private void generateFactory() throws Exception { int[] keys = getCallbackKeys(); // Factory.getCallback(int) begin_method(GET_CALLBACK); load_this(); load_arg(0); process_switch(keys, new ProcessSwitchCallback() { public void processCase(int key, Label end) ...
getfield(CONSTRUCTOR_PROXY_MAP); load_arg(0); invoke(NEW_CLASS_KEY); invoke(MethodConstants.MAP_GET); checkcast(ConstructorProxy.class);
new_instance_this();
private void generateFactory() throws Exception { int[] keys = getCallbackKeys(); // Factory.getCallback(int) begin_method(GET_CALLBACK); load_this(); load_arg(0); process_switch(keys, new ProcessSwitchCallback() { public void processCase(int key, Label end) ...
ifnull(fail); load_arg(1); invoke(PROXY_NEW_INSTANCE); checkcast_this();
load_arg(0); constructor_switch((Constructor[])constructors.toArray(new Constructor[0]), new ObjectSwitchCallback() { public void processCase(Object key, Label end) throws Exception { Constructor constructor = (Constructor)key; Class types[] = constructor.getParameterTypes(); for (int i = 0; i < types.length; i++) { lo...
private void generateFactory() throws Exception { int[] keys = getCallbackKeys(); // Factory.getCallback(int) begin_method(GET_CALLBACK); load_this(); load_arg(0); process_switch(keys, new ProcessSwitchCallback() { public void processCase(int key, Label end) ...
mark(fail); throw_exception(IllegalArgumentException.class, "Constructor not found");
private void generateFactory() throws Exception { int[] keys = getCallbackKeys(); // Factory.getCallback(int) begin_method(GET_CALLBACK); load_this(); load_arg(0); process_switch(keys, new ProcessSwitchCallback() { public void processCase(int key, Label end) ...
new_instance(HashMap.class); dup(); invoke_constructor(HashMap.class); dup(); putfield(CONSTRUCTOR_PROXY_MAP); Local map = make_local(); store_local(map); for (int i = 0, size = constructors.size(); i < size; i++) { Constructor constructor = (Constructor)constructors.get(i); Class[] types = constructor.getParameterType...
private void generateStatic(List constructors, CallbackGenerator[] generators, CallbackGenerator.Context[] contexts) throws Exception { begin_static(); new_instance(HashMap.class); dup(); invoke_constructor(HashMap.class); ...
int accept(Member member);
int accept(Method member);
int accept(Member member);
case NO_OP: return NoOpCallbackGenerator.INSTANCE; case JDK_PROXY: return InvocationHandlerGenerator.INSTANCE;
case DISPATCH: return DispatcherGenerator.INSTANCE;
static CallbackGenerator getGenerator(int type) { switch (type) { case INTERCEPT: return MethodInterceptorGenerator.INSTANCE; case LAZY_LOAD: return LazyLoaderGenerator.INSTANCE; case NO_OP: return NoOpCallbackGenerator.INSTANCE; case JDK_PROXY: ...
case JDK_PROXY:
static Class getType(int type) { switch (type) { case JDK_PROXY: case INTERCEPT: return MethodInterceptor.class; case LAZY_LOAD: return LazyLoader.class; default: return null; } }
case DISPATCH: return Dispatcher.class;
static Class getType(int type) { switch (type) { case JDK_PROXY: case INTERCEPT: return MethodInterceptor.class; case LAZY_LOAD: return LazyLoader.class; default: return null; } }
void generate(CodeGenerator cg, List methods, Context context) throws Exception;
void generate(CodeGenerator cg, Context context) throws Exception;
void generate(CodeGenerator cg, List methods, Context context) throws Exception;
void generateStatic(CodeGenerator cg, List methods) throws Exception;
void generateStatic(CodeGenerator cg, Context context) throws Exception;
void generateStatic(CodeGenerator cg, List methods) throws Exception;
public DefaultArtifact(ModuleRevisionId mrid, Date publicationDate, String name, String type, String ext, Map extraAttributes) { this(mrid, publicationDate, name, type, ext, null, extraAttributes);
public DefaultArtifact(ModuleRevisionId mrid, Date publicationDate, String name, String type, String ext) { this(mrid, publicationDate, name, type, ext, null, null);
public DefaultArtifact(ModuleRevisionId mrid, Date publicationDate, String name, String type, String ext, Map extraAttributes) { this(mrid, publicationDate, name, type, ext, null, extraAttributes); }
return new DefaultArtifact(artifact.getModuleRevisionId(), artifact.getPublicationDate(), artifact.getName(), newType, artifact.getExt(), artifact.getExtraAttributes());
return new DefaultArtifact(artifact.getModuleRevisionId(), artifact.getPublicationDate(), artifact.getName(), newType, artifact.getExt(), artifact.getUrl(), artifact.getExtraAttributes());
public static Artifact cloneWithAnotherType(Artifact artifact, String newType) { return new DefaultArtifact(artifact.getModuleRevisionId(), artifact.getPublicationDate(), artifact.getName(), newType, artifact.getExt(), artifact.getExtraAttributes()); }
return new DefaultArtifact(artifact.getModuleRevisionId(), artifact.getPublicationDate(), artifact.getName(), newType, newExt, artifact.getExtraAttributes());
return new DefaultArtifact(artifact.getModuleRevisionId(), artifact.getPublicationDate(), artifact.getName(), newType, newExt, artifact.getUrl(), artifact.getExtraAttributes());
public static Artifact cloneWithAnotherTypeAndExt(Artifact artifact, String newType, String newExt) { return new DefaultArtifact(artifact.getModuleRevisionId(), artifact.getPublicationDate(), artifact.getName(), newType, newExt, artifact.getExtraAttributes()); }
System.out.println("*** Im here");
public void writePrototypeIniFile(PrintWriter writer) { System.out.println("*** Im here"); try { writer.println("[Prototype] Entity"); writer.println(); writer.println("[Relationship]"); writer.println("#Role ItemIdentification TypeIdentification Cluster Start End"); I...
public void addTimePhasedData(TimePhasedData data);
void addTimePhasedData(TimePhasedData data);
public void addTimePhasedData(TimePhasedData data);
System.out.println("Organizer " + COMPONENT_ARGS_QUERY + ": " + query);
private void setComponentProperties(ConfigurableComponent cc, String comp_alib_id, String assemblyMatch) { try { Connection conn = DBUtils.getConnection(); Map substitutions = new HashMap(); substitutions.put(":assemblyMatch"...
System.out.println("adding " + pname + "=" + pvalue);
private void setComponentProperties(ConfigurableComponent cc, String comp_alib_id, String assemblyMatch) { try { Connection conn = DBUtils.getConnection(); Map substitutions = new HashMap(); substitutions.put(":assemblyMatch"...
System.out.println("setting " + pname + "=" + pvalue);
private void setComponentProperties(ConfigurableComponent cc, String comp_alib_id, String assemblyMatch) { try { Connection conn = DBUtils.getConnection(); Map substitutions = new HashMap(); substitutions.put(":assemblyMatch"...
public boolean contains(Point p)
public boolean contains(int x, int y)
public boolean contains(Point p) { return contains(p.x, p.y); }
return contains(p.x, p.y);
return x >= 0 && y >= 0 && x < width && y < height;
public boolean contains(Point p) { return contains(p.x, p.y); }
public JMenu(String text) {
public JMenu() {
public JMenu(String text) { // TODO } // JMenu()
public JMenuItem add(Action action) {
public JMenuItem add(JMenuItem item) {
public JMenuItem add(Action action) { return null; // TODO } // add()
NodeComponent[] nodes = getNodes(); for (int i = 0; i < nodes.length; i++) { NodeComponent nnode = experimentCopy.addNode(nodes[i].getFullName().toString()); AgentComponent[] agents = nodes[i].getAgents(); for (int j = 0; j < agents.length; j++) { AgentComponent[] nags = experimentCopy.getAgents(); CompositeName tai...
public Experiment copy(Organizer organizer, Object context) { String uniqueName = organizer.generateExperimentName(getExperimentName()); Experiment experimentCopy = null; if (inDatabase) experimentCopy = new Experiment(uniqueName, expID, trialID); else experimentCopy = new Experiment(uniqueName...
NodeComponent[] nnodes = experimentCopy.getNodes(); for (int k = 0; k < nnodes.length; k++) { if (nnodes[k].getFullName().equals(onodes[j].getFullName())) { nhost.addNode(nnodes[k]); break; } }
NodeComponent nnode = experimentCopy.addNode(onodes[j].getFullName().toString()); AgentComponent[] oagents = onodes[j].getAgents(); for (int x=0; x < oagents.length; x++) { AgentComponent[] nagents = experimentCopy.getAgents(); for (int y=0; y < nagents.length; y++ ) { if (nagents[y].getFullName().equals(oagents[x].get...
public Experiment copy(Organizer organizer, Object context) { String uniqueName = organizer.generateExperimentName(getExperimentName()); Experiment experimentCopy = null; if (inDatabase) experimentCopy = new Experiment(uniqueName, expID, trialID); else experimentCopy = new Experiment(uniqueName...
public Experiment(String name, String expID, String trialID) { super(name); this.expID = expID; this.trialID = trialID; inDatabase = true;
public Experiment(String name, SocietyComponent[] societyComponents, RecipeComponent[] recipes) { this(name); setSocietyComponents(societyComponents); setRecipes(recipes);
public Experiment(String name, String expID, String trialID) { super(name); this.expID = expID; this.trialID = trialID; inDatabase = true; // System.out.println("Experiment: " + expID + " Trial: " + trialID); }
if(log.isDebugEnabled()) { log.error("Illegal number: "+sLimit);
if(log.isErrorEnabled()) { log.error("Illegal number: "+sLimit, nfe);
public void actionPerformed(ActionEvent evt) { String command = ((JMenuItem)evt.getSource()).getText(); if (command.equals(NEW_WITH_SELECTION_MENU_ITEM)) { // check that at least one node is selected, else do nothing if (!graph.isNodeSelected()) return; CSMARTGraph newGraph = graph.newGraphFromSe...
saveMenuItem.setEnabled(graph.hasOutputFile());
public void actionPerformed(ActionEvent evt) { String command = ((JMenuItem)evt.getSource()).getText(); if (command.equals(FIND_MENU_ITEM)) { findNode(); return; } if (command.equals(CLEAR_MENU_ITEM)) { if (evt.getSource() instanceof JComponent) { JComponent component = (JComponent)evt.getS...
deleteItems(asbPrefix+"expt_trial_metric_prop", "trial_id", sqlQuote(experiment_id+".TRIAL")); deleteItems(asbPrefix+"expt_trial_metric", "trial_id", sqlQuote(experiment_id+".TRIAL"));
deleteItems(asbPrefix+"expt_trial_metric_prop", "trial_id", trial_id); deleteItems(asbPrefix+"expt_trial_metric", "trial_id", trial_id); deleteItems(asbPrefix+"expt_trial_mod_recipe", "trial_id", trial_id);
public static void deleteExperiment(String experiment_id) { boolean doIt = true; if(experiment_id.equals("EXPT_TRANS")){ doIt=false; int response = JOptionPane.showConfirmDialog(null, "You seem to be trying to delete the base experiment -- do you REALLY want to do this?", "Confirm Dele...
ScrollPaneAdjustable (ScrollPane sp, int orientation, int value, int minimum, int maximum, in visibleAmount, int unitIncrement, int blockIncrement)
ScrollPaneAdjustable (int orientation)
ScrollPaneAdjustable (ScrollPane sp, int orientation, int value, int minimum, int maximum, in visibleAmount, int unitIncrement, int blockIncrement) { this.sp = sp; this.orientation = orientation; this.value = value; this.minimum = minimum; this.maximum = m...
this.sp = sp; this.orientation = orientation; this.value = value; this.minimum = minimum; this.maximum = maximum; this.visibleAmount = visibleAmount; this.unitIncrement = Increment; this.blockIncrement = Increment;
throw new Error ("not implemented");
ScrollPaneAdjustable (ScrollPane sp, int orientation, int value, int minimum, int maximum, in visibleAmount, int unitIncrement, int blockIncrement) { this.sp = sp; this.orientation = orientation; this.value = value; this.minimum = minimum; this.maximum = m...
public void resize(Dimension d)
public void resize(int width, int height)
public void resize(Dimension d) { setSize(d.width, d.height); }
setSize(d.width, d.height);
setSize(width, height);
public void resize(Dimension d) { setSize(d.width, d.height); }
try { NSDictionary dic = Services.dictionaryFromFile(modelFile); if (ruleDecodeLog.isDebugEnabled()) { ruleDecodeLog.debug("Got dictionary for file: " + modelFile + "\n\n"); for (Enumeration e = ((NSArray)dic.objectForKey("rules")).objectEnumerator(); e.hasMoreElements();) { NSDictionary aRule = (NSDictionary)e.nextEle...
NSDictionary dic = dictionaryFromFile(modelFile); if (ruleDecodeLog.isDebugEnabled()) { ruleDecodeLog.debug("Got dictionary for file: " + modelFile + "\n\n"); for (Enumeration e = ((NSArray)dic.objectForKey("rules")).objectEnumerator(); e.hasMoreElements();) { NSDictionary aRule = (NSDictionary)e.nextElement(); NSMutab...
protected void mergePathURL(URL modelURL) { if(modelURL != null) { File modelFile = new File(modelURL.getFile()); if (log.isDebugEnabled()) log.debug("Merging rule file \"" + modelFile.getPath() + "\""); setCurrentFile(modelFile)...
} else { ERD2WModel model = new ERD2WModel(new EOKeyValueUnarchiver(dic)); addRules(model.rules());
protected void mergePathURL(URL modelURL) { if(modelURL != null) { File modelFile = new File(modelURL.getFile()); if (log.isDebugEnabled()) log.debug("Merging rule file \"" + modelFile.getPath() + "\""); setCurrentFile(modelFile)...
} catch (IOException except) { ruleDecodeLog.error("Could not load rule file: " + except.getMessage());
} else { ERD2WModel model = new ERD2WModel(new EOKeyValueUnarchiver(dic)); addRules(model.rules());
protected void mergePathURL(URL modelURL) { if(modelURL != null) { File modelFile = new File(modelURL.getFile()); if (log.isDebugEnabled()) log.debug("Merging rule file \"" + modelFile.getPath() + "\""); setCurrentFile(modelFile)...
public Object replaceObjectAtIndex(Object object, int index) { if (object == null) throw new IllegalArgumentException("Attempt to insert null into an " + getClass().getName() + "."); if (index >= 0 && index < _count) { Object result = _objects[index]; _objects[index] = object; clearCache(); return result; } else { thr...
public void replaceObjectAtIndex(int index, Object object) { replaceObjectAtIndex(object, index);
public Object replaceObjectAtIndex(Object object, int index) { if (object == null) throw new IllegalArgumentException("Attempt to insert null into an " + getClass().getName() + "."); if (index >= 0 && index < _count) { Object result = _objects[index]; _objects[index] ...
public String radioBoxGroupName(){ return ("YesNoGroup_"+d2wContext().propertyKey());
public String radioBoxGroupName(){ if (_radioBoxGroupName == null) { _radioBoxGroupName = "YesNoGroup_"+ context().elementID().replace('.','_'); } return _radioBoxGroupName;
public String radioBoxGroupName(){ return ("YesNoGroup_"+d2wContext().propertyKey()); }
_radioBoxGroupName = null;
public void reset(){ super.reset(); _choicesNames = null; }
if (this.getName().equals(that.getName())) {
if (this.getName() == null) { if (this.getClassName() != null && this.getClassName().equals(that.getClassName()) && this.getType() != null && this.getType().equals(that.getType()) && this.parameterCount() == that.parameterCount()) { for (int j = 0; j < that.parameterCount(); j++) { if (! that.getParameter(j).equals(thi...
public boolean equals(Object o) { if (o instanceof GenericComponentData) { GenericComponentData that = (GenericComponentData)o; // FIXME: Compare AlibIDs if they're both not null first?// if (this.getAlibID() != null && that.getAlibID() != null) {// return (this.getAlibID().equals(that.getAlibID...
public void addChildDefaultLoc(ComponentData comp);
void addChildDefaultLoc(ComponentData comp);
public void addChildDefaultLoc(ComponentData comp);
public void testEnterState_Invalid_NotExitedOtherState()
public void testEnterState_Invalid_NotExitedOtherState() throws Exception
public void testEnterState_Invalid_NotExitedOtherState() { this.processContext.startProcess( this.process ); assertSame( this.process, this.processContext.getCurrentProcess() ); assertNull( this.processContext.getCurrentState() ); try { this.proces...
this.processContext.enterState( this.state1 ); assertSame( this.state1, this.processContext.getCurrentState() ); try { this.processContext.enterState( this.state2 ); fail( "Should have thrown InvalidMotionException" ); } catch (InvalidMotionException e) { }
this.processContext.enterState( this.state2 ); fail( "Should have thrown InvalidMotionException" );
public void testEnterState_Invalid_NotExitedOtherState() { this.processContext.startProcess( this.process ); assertSame( this.process, this.processContext.getCurrentProcess() ); assertNull( this.processContext.getCurrentState() ); try { this.proces...
fail( e.getLocalizedMessage() );
public void testEnterState_Invalid_NotExitedOtherState() { this.processContext.startProcess( this.process ); assertSame( this.process, this.processContext.getCurrentProcess() ); assertNull( this.processContext.getCurrentState() ); try { this.proces...
public void testEnterState_Valid()
public void testEnterState_Valid() throws Exception
public void testEnterState_Valid() { this.processContext.startProcess( this.process ); assertSame( this.process, this.processContext.getCurrentProcess() ); assertNull( this.processContext.getCurrentState() ); try { this.processContext.enterState( t...
try { this.processContext.enterState( this.state1 ); assertSame( this.state1, this.processContext.getCurrentState() ); } catch (InvalidMotionException e) { fail( e.getLocalizedMessage() ); }
this.processContext.enterState( this.state1 ); assertSame( this.state1, this.processContext.getCurrentState() );
public void testEnterState_Valid() { this.processContext.startProcess( this.process ); assertSame( this.process, this.processContext.getCurrentProcess() ); assertNull( this.processContext.getCurrentState() ); try { this.processContext.enterState( t...
public void testExitState_Invalid_WrongState()
public void testExitState_Invalid_WrongState() throws Exception
public void testExitState_Invalid_WrongState() { this.processContext.startProcess( this.process ); assertSame( this.process, this.processContext.getCurrentProcess() ); assertNull( this.processContext.getCurrentState() ); try { this.processContext.e...
this.processContext.enterState( this.state1 ); try { this.processContext.exitState( this.state2 ); fail( "Should have thrown InvalidMotionException" ); } catch (InvalidMotionException e) { }
this.processContext.exitState( this.state2 ); fail( "Should have thrown InvalidMotionException" );
public void testExitState_Invalid_WrongState() { this.processContext.startProcess( this.process ); assertSame( this.process, this.processContext.getCurrentProcess() ); assertNull( this.processContext.getCurrentState() ); try { this.processContext.e...
fail( e.getLocalizedMessage() );
public void testExitState_Invalid_WrongState() { this.processContext.startProcess( this.process ); assertSame( this.process, this.processContext.getCurrentProcess() ); assertNull( this.processContext.getCurrentState() ); try { this.processContext.e...
public void testExitState_Valid()
public void testExitState_Valid() throws Exception
public void testExitState_Valid() { this.processContext.startProcess( this.process ); assertSame( this.process, this.processContext.getCurrentProcess() ); assertNull( this.processContext.getCurrentState() ); try { this.processContext.enterState( th...
try { this.processContext.enterState( this.state1 ); assertSame( this.state1, this.processContext.getCurrentState() ); this.processContext.exitState( this.state1 ); assertNull( this.processContext.getCurrentState() ); } catch (InvalidMotionException e) { fail( e.getLocalizedMessage() ); }
this.processContext.enterState( this.state1 ); assertSame( this.state1, this.processContext.getCurrentState() ); this.processContext.exitState( this.state1 ); assertNull( this.processContext.getCurrentState() );
public void testExitState_Valid() { this.processContext.startProcess( this.process ); assertSame( this.process, this.processContext.getCurrentProcess() ); assertNull( this.processContext.getCurrentState() ); try { this.processContext.enterState( th...
public void testFinishProcess_Valid()
public void testFinishProcess_Valid() throws Exception
public void testFinishProcess_Valid() { this.processContext.startProcess( this.process ); assertSame( process, this.processContext.getCurrentProcess() ); try { this.processContext.finishProcess( this.process ); } catch (InvalidMotionExceptio...
try { this.processContext.finishProcess( this.process ); } catch (InvalidMotionException e) { fail( e.getLocalizedMessage() ); }
this.processContext.finishProcess( this.process );
public void testFinishProcess_Valid() { this.processContext.startProcess( this.process ); assertSame( process, this.processContext.getCurrentProcess() ); try { this.processContext.finishProcess( this.process ); } catch (InvalidMotionExceptio...