rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
runningNodes.put(nodeComponent, remoteNode); | runningNodes.put(nodeName, remoteNode); | public RemoteProcess restartNode(NodeComponent nodeComponent) { boolean doRun = false; synchronized (runningNodes) { if (oldNodes.size() + runningNodes.size() == 1) doRun = true; } // end synchronized if (doRun) { runButton_actionPerformed(); return null; // it doesn't matter what we... |
if (!haveMoreTrials()) { if(log.isWarnEnabled()) { log.warn("CSMARTConsole: WARNING: no more trials to run"); } runButton.setSelected(false); runButton.setEnabled(false); return; } experiment.setResultDirectory(csmart.getResultDir()); if (experiment.getNodeComponents().length != 0) runTrial(); | if (experiment != null) initNodesFromExperiment(); runTrial(); | private void runButton_actionPerformed() { if (log.isDebugEnabled()) { log.debug("Hit run button"); } destroyOldNodes(); // Get rid of any old stuff before creating the new userStoppedTrials = false; // this state should be detected earlier and the run button disabled if (!haveMoreTrials()) { ... |
setTrialValues(); runStart = new Date(); | runStart = new Date(); if (experiment != null) setTrialValues(); | private void runTrial() { if (log.isDebugEnabled()) { log.debug("runTrial about to setTrialValues"); } setTrialValues(); runStart = new Date(); nodeCreationInfoList = new ArrayList(); prepareToCreateNodes(); stopNodeCreation = false; startTimers(); if (log.isDebugEnabled()) { log.... |
prepareToCreateNodes(); | Collection values = nodeToNodeInfo.values(); for (Iterator i = values.iterator(); i.hasNext(); ) { NodeInfo ni = (NodeInfo)i.next(); prepareToCreateNode(ni.appServer, ni.nodeName, ni.hostName, ni.properties, ni.args); } | private void runTrial() { if (log.isDebugEnabled()) { log.debug("runTrial about to setTrialValues"); } setTrialValues(); runStart = new Date(); nodeCreationInfoList = new ArrayList(); prepareToCreateNodes(); stopNodeCreation = false; startTimers(); if (log.isDebugEnabled()) { log.... |
}); } else { final String glsAgent = findServlet(); if(glsAgent != null) { SwingUtilities.invokeLater(new Runnable() { public void run() { JInternalFrame jif = new JInternalFrame("GLS", true, false, true, true); glsClient = new GLSClient(getOPlanAgentURL(glsAgent)); jif.getContentPane().add(glsClient); jif.setSize(35... | public void run() { runButton.setSelected(false); runButton.setEnabled(true); unsetTrialValues(); currentTrial--; } | |
JInternalFrame jif = new JInternalFrame("GLS", true, false, true, true); glsClient = new GLSClient(getOPlanAgentURL(glsAgent)); jif.getContentPane().add(glsClient); jif.setSize(350, 350); jif.setLocation(0, 0); jif.setVisible(true); desktop.add(jif, JLayeredPane.DEFAULT_LAYER); try { jif.setIcon(true); } catch (Propert... | runButton.setSelected(false); runButton.setEnabled(true); unsetTrialValues(); currentTrial--; } | public void run() { JInternalFrame jif = new JInternalFrame("GLS", true, false, true, true); glsClient = new GLSClient(getOPlanAgentURL(glsAgent)); jif.getContentPane().add(glsClient); jif.setSize(350, 350); ... |
File resultDir = experiment.getResultDirectory(); if (resultDir == null) return; Trial trial = experiment.getTrials()[currentTrial]; if (runStart == null) runStart = new Date(); String dirname = resultDir.getAbsolutePath() + File.separatorChar + experiment.getExperimentName() + File.separatorChar + trial.getShortName()... | String dirname = makeResultDirectory(); if (experiment != null) { try { String myHostName = InetAddress.getLocalHost().getHostName(); URL url = new URL("file", myHostName, dirname); Trial trial = experiment.getTrials()[currentTrial]; trial.addTrialResult(new TrialResult(runStart, url)); } catch (Exception e) { | private void saveResults() { if (currentTrial < 0) return; // nothing to save File resultDir = experiment.getResultDirectory(); if (resultDir == null) return; // can't save, user didn't specify metrics directory Trial trial = experiment.getTrials()[currentTrial]; if (runStart == null) ru... |
log.error("CSMARTConsole: Could not save results in: " + dirname); | log.error("Exception creating trial results URL: ", e); | private void saveResults() { if (currentTrial < 0) return; // nothing to save File resultDir = experiment.getResultDirectory(); if (resultDir == null) return; // can't save, user didn't specify metrics directory Trial trial = experiment.getTrials()[currentTrial]; if (runStart == null) ru... |
return; } String myHostName = InetAddress.getLocalHost().getHostName(); URL url = new URL("file", myHostName, dirname); trial.addTrialResult(new TrialResult(runStart, url)); } catch (Exception e) { if(log.isErrorEnabled()) { log.error("Exception creating trial results URL: ", e); | private void saveResults() { if (currentTrial < 0) return; // nothing to save File resultDir = experiment.getResultDirectory(); if (resultDir == null) return; // can't save, user didn't specify metrics directory Trial trial = experiment.getTrials()[currentTrial]; if (runStart == null) ru... | |
HostComponent[] hosts = experiment.getHostComponents(); for (int i = 0; i < hosts.length; i++) { NodeComponent[] nodes = hosts[i].getNodes(); if (nodes.length == 0) continue; String hostName = hosts[i].getShortName(); Properties properties = null; properties = getNodeMinusD(nodes[0], hostName); int remotePort = get... | Collection values = nodeToNodeInfo.values(); for (Iterator i = values.iterator(); i.hasNext(); ) { NodeInfo ni = (NodeInfo)i.next(); RemoteHost remoteAppServer = ni.appServer; RemoteFileSystem remoteFS = null; | private void saveResults() { if (currentTrial < 0) return; // nothing to save File resultDir = experiment.getResultDirectory(); if (resultDir == null) return; // can't save, user didn't specify metrics directory Trial trial = experiment.getTrials()[currentTrial]; if (runStart == null) ru... |
JOptionPane.showMessageDialog(this, "Cannot save results. Unable to access " + " filesystem for " + hostName + " : " + remotePort + ".", "Unable to access file system", JOptionPane.WARNING_MESSAGE); continue; | JOptionPane.showMessageDialog(this, "Cannot save results. Unable to access filesystem for " + ni.hostName + ".", "Unable to access file system", JOptionPane.WARNING_MESSAGE); continue; | private void saveResults() { if (currentTrial < 0) return; // nothing to save File resultDir = experiment.getResultDirectory(); if (resultDir == null) return; // can't save, user didn't specify metrics directory Trial trial = experiment.getTrials()[currentTrial]; if (runStart == null) ru... |
if (hostConfiguration == null) return; | private void selectNodeInHostTree(String nodeName) { hostConfiguration.removeHostTreeSelectionListener(myTreeListener); hostConfiguration.selectNodeInHostTree(nodeName); hostConfiguration.addHostTreeSelectionListener(myTreeListener); } | |
runButton_actionPerformed(); | attachButton_actionPerformed(); | public void actionPerformed(ActionEvent e) { runButton_actionPerformed(); } |
stopButton_actionPerformed(e); | runButton_actionPerformed(); | public void actionPerformed(ActionEvent e) { stopButton_actionPerformed(e); } |
abortButton_actionPerformed(); | stopButton_actionPerformed(e); | public void actionPerformed(ActionEvent e) { abortButton_actionPerformed(); } |
trialTimeLabel.setText(getElapsedTimeLabel("Trial: ", startTrialTime)); } | abortButton_actionPerformed(); } | public void actionPerformed(ActionEvent e) { trialTimeLabel.setText(getElapsedTimeLabel("Trial: ", startTrialTime)); } |
experimentTimeLabel.setText(getElapsedTimeLabel("Experiment: ", startExperimentTime)); | trialTimeLabel.setText(getElapsedTimeLabel("Trial: ", startTrialTime)); | public void actionPerformed(ActionEvent e) { experimentTimeLabel.setText(getElapsedTimeLabel("Experiment: ", startExperimentTime)); } |
displayAboutNode(); } | experimentTimeLabel.setText(getElapsedTimeLabel("Experiment: ", startExperimentTime)); } | public void actionPerformed(ActionEvent e) { displayAboutNode(); } |
resetNodeStatus(); | displayAboutNode(); | public void actionPerformed(ActionEvent e) { resetNodeStatus(); } |
legend.setVisible(true); | resetNodeStatus(); | public void actionPerformed(ActionEvent e) { legend.setVisible(true); } |
hostConfiguration.update(); | private void setTrialValues() { if (currentTrial >= 0) unsetTrialValues(); // unset previous trial values currentTrial++; // starts with 0 Trial trial = experiment.getTrials()[currentTrial]; trialNameLabel.setText(trial.getShortName()); trialProgressBar.setValue(currentTrial+1); Property[] pro... | |
Enumeration nodeComponents; | Enumeration nodeNames; | private void stopAllNodes() { // if there's a thread still creating nodes, stop it stopNodeCreation = true; // wait for the creating thread to stop if (nodeCreator != null) { try { nodeCreator.join(); } catch (InterruptedException ie) { if(log.isErrorEnabled()) { log.error... |
nodeComponents = runningNodes.keys(); | nodeNames = runningNodes.keys(); | private void stopAllNodes() { // if there's a thread still creating nodes, stop it stopNodeCreation = true; // wait for the creating thread to stop if (nodeCreator != null) { try { nodeCreator.join(); } catch (InterruptedException ie) { if(log.isErrorEnabled()) { log.error... |
while (nodeComponents.hasMoreElements()) { NodeComponent nodeComponent = (NodeComponent)nodeComponents.nextElement(); | while (nodeNames.hasMoreElements()) { String nodeName = (String)nodeNames.nextElement(); | private void stopAllNodes() { // if there's a thread still creating nodes, stop it stopNodeCreation = true; // wait for the creating thread to stop if (nodeCreator != null) { try { nodeCreator.join(); } catch (InterruptedException ie) { if(log.isErrorEnabled()) { log.error... |
remoteNode = (RemoteProcess)runningNodes.get(nodeComponent); | remoteNode = (RemoteProcess)runningNodes.get(nodeName); | private void stopAllNodes() { // if there's a thread still creating nodes, stop it stopNodeCreation = true; // wait for the creating thread to stop if (nodeCreator != null) { try { nodeCreator.join(); } catch (InterruptedException ie) { if(log.isErrorEnabled()) { log.error... |
String nodeName = nodeComponent.getShortName(); | private void stopAllNodes() { // if there's a thread still creating nodes, stop it stopNodeCreation = true; // wait for the creating thread to stop if (nodeCreator != null) { try { nodeCreator.join(); } catch (InterruptedException ie) { if(log.isErrorEnabled()) { log.error... | |
nodeStopped(nodeComponent); getNodeStatusButton(nodeComponent.getShortName()).setStatus(NodeStatusButton.STATUS_NO_ANSWER); | nodeStopped(nodeName); getNodeStatusButton(nodeName).setStatus(NodeStatusButton.STATUS_NO_ANSWER); | private void stopAllNodes() { // if there's a thread still creating nodes, stop it stopNodeCreation = true; // wait for the creating thread to stop if (nodeCreator != null) { try { nodeCreator.join(); } catch (InterruptedException ie) { if(log.isErrorEnabled()) { log.error... |
SocietyComponent society = experiment.getSocietyComponent(); | private void stopButton_actionPerformed(ActionEvent e) { stopButton.setSelected(true); // indicate stopping stopButton.setEnabled(false); // disable until experiment stops SocietyComponent society = experiment.getSocietyComponent(); userStoppedTrials = true; // if self terminating, don't start next trial ... | |
if (society != null && !society.isSelfTerminating()) stopAllNodes(); | stopAllNodes(); | private void stopButton_actionPerformed(ActionEvent e) { stopButton.setSelected(true); // indicate stopping stopButton.setEnabled(false); // disable until experiment stops SocietyComponent society = experiment.getSocietyComponent(); userStoppedTrials = true; // if self terminating, don't start next trial ... |
public void stopNode(NodeComponent node) { | public void stopNode(String nodeName) { | public void stopNode(NodeComponent node) { boolean doAbort = false; synchronized (runningNodesLock) { if (runningNodes.size() == 1) doAbort = true; } // end synchronized if (doAbort) { abortButton_actionPerformed(); return; } RemoteProcess remoteNode; synchronized (runningNo... |
remoteNode = (RemoteProcess)runningNodes.get(node); | remoteNode = (RemoteProcess)runningNodes.get(nodeName); | public void stopNode(NodeComponent node) { boolean doAbort = false; synchronized (runningNodesLock) { if (runningNodes.size() == 1) doAbort = true; } // end synchronized if (doAbort) { abortButton_actionPerformed(); return; } RemoteProcess remoteNode; synchronized (runningNo... |
nodeStopped(node); getNodeStatusButton(node.getShortName()).setStatus(NodeStatusButton.STATUS_NO_ANSWER); | nodeStopped(nodeName); getNodeStatusButton(nodeName).setStatus(NodeStatusButton.STATUS_NO_ANSWER); | public void stopNode(NodeComponent node) { boolean doAbort = false; synchronized (runningNodesLock) { if (runningNodes.size() == 1) doAbort = true; } // end synchronized if (doAbort) { abortButton_actionPerformed(); return; } RemoteProcess remoteNode; synchronized (runningNo... |
updateExperimentControls(experiment, false); | updateControls(false); | private void trialFinished() { trialTimer.stop(); Collection c = nodeListeners.values(); for (Iterator i = c.iterator(); i.hasNext(); ) ((ConsoleNodeListener)i.next()).closeLogFile(); saveResults(); updateExperimentControls(experiment, false); } |
if (experiment == null) return; | private void unsetTrialValues() { if (currentTrial < 0) return; Trial trial = experiment.getTrials()[currentTrial]; Property[] properties = trial.getParameters(); for (int i = 0; i < properties.length; i++) properties[i].setValue(null); } | |
if (experiment.isEditable()) experiment.setEditInProgress(true); | experiment.setEditInProgress(true); | public ExperimentBuilder(CSMART csmart, Experiment experiment) { this.csmart = csmart; createLogger(); setExperiment(experiment); JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); JMenu fileMenu = new JMenu(FILE_MENU); fileMenu.setToolTipText("Configure hosts and nodes, save,... |
System.out.println("PropertyBuilder: Property removed: " + prop.getName()); | public void propertyRemoved(PropertyEvent e) { Property prop = e.getProperty(); CompositeName name = prop.getName(); if (removePropertyName(name)) { TreePath path = tree.getSelectionPath(); if (path == null) return; PropertyTreeNode node = (PropertyTreeNode)path.getLastPathComponent(); if... | |
Properties newProperties = new Properties(); Enumeration propertyNames = arguments.propertyNames(); while (propertyNames.hasMoreElements()) { String key = (String)propertyNames.nextElement(); newProperties.setProperty(key, arguments.getProperty(key)); | Properties newProperties = new Properties(experimentCopy.getDefaultNodeArguments()); Properties myProps = getArguments(); Enumeration props = myProps.keys(); while (props.hasMoreElements()) { String propertyName = (String)props.nextElement(); newProperties.setProperty(propertyName, myProps.getProperty(propertyName)); | public NodeComponent copy(Experiment experimentCopy) { NodeComponent nodeCopy = new ExperimentNode(getShortName(), experimentCopy); Properties newProperties = new Properties(); Enumeration propertyNames = arguments.propertyNames(); while (propertyNames.hasMo... |
methodMap.put(methodKey, method); | }else{ methodMap.put(methodKey, method); | protected void generate() throws NoSuchMethodException { if (wreplace == null) { wreplace = Enhancer.InternalReplace.class.getMethod("writeReplace", OBJECT_CLASS_ARRAY); } declare_interface(Factory.class); declare_field(Modifier.PRIVATE, MethodInterceptor.class, INTERC... |
protected void box(Class clazz) { if (clazz.isPrimitive()) { if (clazz.equals(Void.TYPE)) { aconst_null(); } else { Class wrapper = (Class)primitiveToWrapper.get(clazz); new_instance(wrapper); if (getStackSize(clazz) == 2) { dup_x2(); dup_x2(); pop(); } else { dup_x1(); swap(); } invoke_constructor(wrapper, new Class... | private void box(Type type) { if (type instanceof BasicType) { box(getPrimitiveClass((BasicType)type)); | protected void box(Class clazz) { if (clazz.isPrimitive()) { if (clazz.equals(Void.TYPE)) { aconst_null(); } else { Class wrapper = (Class)primitiveToWrapper.get(clazz); new_instance(wrapper); if (getStackSize(clazz) == 2) { ... |
protected void nop(String label){ append( label, new NOP() ); } | protected void nop(){ append( new NOP()); } | protected void nop(String label){ append( label, new NOP() ); } |
return super.paramString (); | return "TEXT_VALUE_CHANGED"; | public String paramString () { return super.paramString (); } |
return toString (); | return ""; | public String paramString () { return toString (); } |
public ConsoleNodeOutputFilter(boolean[] initialValues, boolean acceptAll) { super((java.awt.Frame)null, "Filter", true); | public ConsoleNodeOutputFilter(Frame parent, boolean[] initialValues, boolean acceptAll) { super(parent, "Filter", true); | public ConsoleNodeOutputFilter(boolean[] initialValues, boolean acceptAll) { super((java.awt.Frame)null, "Filter", true); // modal dialog filterPanel = new JPanel(new BorderLayout()); // ok and cancel buttons panel JPanel buttonPanel = new JPanel(); JButton okButton = new JButton("OK"); // only upda... |
TitledBorder msgTypesTitledBorder = new TitledBorder("Messages Types"); | TitledBorder msgTypesTitledBorder = new TitledBorder("Message Types To Display"); | public ConsoleNodeOutputFilter(boolean[] initialValues, boolean acceptAll) { super((java.awt.Frame)null, "Filter", true); // modal dialog filterPanel = new JPanel(new BorderLayout()); // ok and cancel buttons panel JPanel buttonPanel = new JPanel(); JButton okButton = new JButton("OK"); // only upda... |
setSize(225, 300); Point p = parent.getLocation(); Dimension d = parent.getSize(); int centerX = p.x + d.width/2; int centerY = p.y + d.height/2; Dimension myD = getSize(); setLocation(new Point(centerX - myD.width/2, centerY - myD.height/2)); | public ConsoleNodeOutputFilter(boolean[] initialValues, boolean acceptAll) { super((java.awt.Frame)null, "Filter", true); // modal dialog filterPanel = new JPanel(new BorderLayout()); // ok and cancel buttons panel JPanel buttonPanel = new JPanel(); JButton okButton = new JButton("OK"); // only upda... | |
ConsoleNodeOutputFilter filter = new ConsoleNodeOutputFilter(null, true); | ConsoleNodeOutputFilter filter = new ConsoleNodeOutputFilter(null, null, true); | public static void main(String[] args) { ConsoleNodeOutputFilter filter = new ConsoleNodeOutputFilter(null, true); filter.setVisible(true); } |
if (peer != null) | if (peer == null) | addNotify(){ if (peer != null) peer = getToolkit().createMenu(this); super.addNotify ();} |
java.util.Enumeration e = items.elements(); while (e.hasMoreElements()) { MenuItem mi = (MenuItem)e.nextElement(); mi.addNotify(); } | addNotify(){ if (peer != null) peer = getToolkit().createMenu(this); super.addNotify ();} | |
add(separator); | if (peer != null) ((MenuPeer) peer).addSeparator(); | addSeparator(){ add(separator);} |
public void setTarget(ClassVisitor target, ClassVisitor outer); | public void setTarget(ClassVisitor target); | public void setTarget(ClassVisitor target, ClassVisitor outer); |
if (_localSortKey() != null && _localSortKey().length() > 0) ERXArrayUtilities.sortArrayWithKey(aSortedArray, _localSortKey()); | ERXArrayUtilities.sortArrayWithKey(aSortedArray, _localSortKey()); | public NSArray theList() { NSMutableArray aSortedArray; NSArray anUnsortedArray; if (_privateList()==null) { EODataSource aDataSource = _localDataSource(); // Need to make sure that the eos are in the right editingContext. anUnsortedArray = ERXEOControlUtilities... |
if (_selections==null) { NSArray oldValues = (NSArray)NSKeyValueCodingAdditions.Utility.valueForKeyPath(sourceObject(), relationshipKey()); setSelections(oldValues); if ((_selections==null) && isMandatory()) { if (theList().count() > 0) { Object anObject = theList().objectAtIndex(0); setSelections(new NSArray(anObject... | if (_selections == null) { NSArray oldValues = (NSArray) NSKeyValueCodingAdditions.Utility.valueForKeyPath(sourceObject(), relationshipKey()); if(oldValues.lastObject() instanceof EOEnterpriseObject) { oldValues = ERXEOControlUtilities.localInstancesOfObjects(editingContext(), oldValues); } setSelections(oldValues); i... | public NSArray selections() { if (_selections==null) { NSArray oldValues = (NSArray)NSKeyValueCodingAdditions.Utility.valueForKeyPath(sourceObject(), relationshipKey()); setSelections(oldValues); // deal with isMandatory if ((_selections==null) && isMandatory()) { ... |
return _selections; | } | public NSArray selections() { if (_selections==null) { NSArray oldValues = (NSArray)NSKeyValueCodingAdditions.Utility.valueForKeyPath(sourceObject(), relationshipKey()); setSelections(oldValues); // deal with isMandatory if ((_selections==null) && isMandatory()) { ... |
return _selections; } | public NSArray selections() { if (_selections==null) { NSArray oldValues = (NSArray)NSKeyValueCodingAdditions.Utility.valueForKeyPath(sourceObject(), relationshipKey()); setSelections(oldValues); // deal with isMandatory if ((_selections==null) && isMandatory()) { ... | |
if ((selections==null) || (selections.count() == 0)) { if (isMandatory() && (theList().count() > 0)) { Object anObject = theList().objectAtIndex(0); selections = new NSArray(anObject); } else { selections = null; } } _selections = selections; updateSourceObject(selections); | if ((selections == null) || (selections.count() == 0)) { if (isMandatory() && (theList().count() > 0)) { Object anObject = theList().objectAtIndex(0); selections = new NSArray(anObject); } else { selections = null; } | public void setSelections(NSArray selections) { // set selections to nil if it's an empty array if ((selections==null) || (selections.count() == 0)) { // deal with isMandatory if (isMandatory() && (theList().count() > 0)) { Object anObject = theList().objectAtIndex... |
_selections = selections; updateSourceObject(selections); } | public void setSelections(NSArray selections) { // set selections to nil if it's an empty array if ((selections==null) || (selections.count() == 0)) { // deal with isMandatory if (isMandatory() && (theList().count() > 0)) { Object anObject = theList().objectAtIndex... | |
} | public void updateSourceObject(NSArray newValues) { Object realSourceObject = realSourceObject(); String realRelationshipKey = realRelationshipKey(); newValues = newValues != null ? newValues : NSArray.EmptyArray; if(realSourceObject instanceof EOEnterpriseObject && // only add/r... | |
} | public void updateSourceObject(NSArray newValues) { Object realSourceObject = realSourceObject(); String realRelationshipKey = realRelationshipKey(); newValues = newValues != null ? newValues : NSArray.EmptyArray; if(realSourceObject instanceof EOEnterpriseObject && // only add/r... | |
public static String toString (double d) | public String toString () | public static String toString (double d) { return toString (d, false); } |
return toString (d, false); | return toString (value); | public static String toString (double d) { return toString (d, false); } |
case HOUR_OF_DAY1_FIELD: withLeadingZeros(theCalendar.get(Calendar.HOUR),p.size,buffer); | case HOUR_OF_DAY1_FIELD: withLeadingZeros(((theCalendar.get(Calendar.HOUR_OF_DAY)+23)%24)+1,p.size,buffer); | public StringBuffer format(Date date, StringBuffer buffer, FieldPosition pos) { String temp; Calendar theCalendar = (Calendar) calendar.clone(); theCalendar.setTime(date); // go through vector, filling in fields where applicable, else toString Enumeration e = tokens.elements(); while (e.hasMoreE... |
case HOUR1_FIELD: withLeadingZeros(theCalendar.get(Calendar.HOUR_OF_DAY)+1,p.size,buffer); | case HOUR1_FIELD: withLeadingZeros(((theCalendar.get(Calendar.HOUR)+11)%12)+1,p.size,buffer); | public StringBuffer format(Date date, StringBuffer buffer, FieldPosition pos) { String temp; Calendar theCalendar = (Calendar) calendar.clone(); theCalendar.setTime(date); // go through vector, filling in fields where applicable, else toString Enumeration e = tokens.elements(); while (e.hasMoreE... |
withLeadingZeros(theCalendar.get(Calendar.HOUR)-1,p.size,buffer); | withLeadingZeros(theCalendar.get(Calendar.HOUR),p.size,buffer); | public StringBuffer format(Date date, StringBuffer buffer, FieldPosition pos) { String temp; Calendar theCalendar = (Calendar) calendar.clone(); theCalendar.setTime(date); // go through vector, filling in fields where applicable, else toString Enumeration e = tokens.elements(); while (e.hasMoreE... |
public synchronized String substring(int beginIndex, int endIndex) | public String substring(int beginIndex) | public synchronized String substring(int beginIndex, int endIndex) { int len = endIndex - beginIndex; if (beginIndex < 0 || endIndex > count || len < 0) throw new StringIndexOutOfBoundsException(); if (len == 0) return ""; // Share the char[] unless 3/4 empty. shared = (len << 2) >= value.le... |
int len = endIndex - beginIndex; if (beginIndex < 0 || endIndex > count || len < 0) throw new StringIndexOutOfBoundsException(); if (len == 0) return ""; shared = (len << 2) >= value.length; return new String(value, beginIndex, len, shared); | return substring(beginIndex, count); | public synchronized String substring(int beginIndex, int endIndex) { int len = endIndex - beginIndex; if (beginIndex < 0 || endIndex > count || len < 0) throw new StringIndexOutOfBoundsException(); if (len == 0) return ""; // Share the char[] unless 3/4 empty. shared = (len << 2) >= value.le... |
private static boolean isActionAllowedOnExperiment(String action, | private static boolean isActionAllowedOnExperiment(Action action, | private static boolean isActionAllowedOnExperiment(String action, Organizer organizer, Experiment experiment) { if (action.equals(DUPLICATE_ACTION)) return true; if (action.equals(SAVE_ACTION) && experim... |
if (action.equals(DUPLICATE_ACTION)) | if (action.equals(organizer.newExperimentFromDBAction) || action.equals(organizer.newExperimentFromFileAction) || action.equals(organizer.newExperimentFromUIAction) || action.equals(organizer.newFolderAction) || action.equals(organizer.newRecipeFromDatabaseAction) || action.equals(organizer.newRecipeBuiltInAction)) ret... | private static boolean isActionAllowedOnExperiment(String action, Organizer organizer, Experiment experiment) { if (action.equals(DUPLICATE_ACTION)) return true; if (action.equals(SAVE_ACTION) && experim... |
if (action.equals(SAVE_ACTION) && experiment.isModified()) | if (action.equals(organizer.saveAction) && experiment.isModified()) | private static boolean isActionAllowedOnExperiment(String action, Organizer organizer, Experiment experiment) { if (action.equals(DUPLICATE_ACTION)) return true; if (action.equals(SAVE_ACTION) && experim... |
if (action.equals(RUN_ACTION) || action.equals(CONFIGURE_ACTION)) | if (action.equals(organizer.runExperimentAction) || action.equals(organizer.configureAction)) | private static boolean isActionAllowedOnExperiment(String action, Organizer organizer, Experiment experiment) { if (action.equals(DUPLICATE_ACTION)) return true; if (action.equals(SAVE_ACTION) && experim... |
if (action.equals(RUN_ACTION)) | if (action.equals(organizer.runExperimentAction)) | private static boolean isActionAllowedOnExperiment(String action, Organizer organizer, Experiment experiment) { if (action.equals(DUPLICATE_ACTION)) return true; if (action.equals(SAVE_ACTION) && experim... |
if (action.equals(DELETE_ACTION) || action.equals(RENAME_ACTION) || action.equals(CONFIGURE_ACTION) || action.equals(BUILD_ACTION)) | if (action.equals(organizer.deleteAction) || action.equals(organizer.deleteExperimentAction) || action.equals(organizer.renameAction) || action.equals(organizer.renameExperimentAction) || action.equals(organizer.configureAction) || action.equals(organizer.buildExperimentAction)) | private static boolean isActionAllowedOnExperiment(String action, Organizer organizer, Experiment experiment) { if (action.equals(DUPLICATE_ACTION)) return true; if (action.equals(SAVE_ACTION) && experim... |
private static boolean isActionAllowedOnFolder(String action, | private static boolean isActionAllowedOnFolder(Action action, | private static boolean isActionAllowedOnFolder(String action, Organizer organizer, DefaultMutableTreeNode node) { if (action.equals(NEW_EXPERIMENT_ACTION) || action.equals(NEW_RECIPE_ACTION) || action.equa... |
if (action.equals(NEW_EXPERIMENT_ACTION) || action.equals(NEW_RECIPE_ACTION) || action.equals(NEW_FOLDER_ACTION) || action.equals(RENAME_ACTION)) | if (action.equals(organizer.newExperimentFromDBAction) || action.equals(organizer.newExperimentFromFileAction) || action.equals(organizer.newExperimentFromUIAction) || action.equals(organizer.newFolderAction) || action.equals(organizer.newRecipeFromDatabaseAction) || action.equals(organizer.newRecipeBuiltInAction) || a... | private static boolean isActionAllowedOnFolder(String action, Organizer organizer, DefaultMutableTreeNode node) { if (action.equals(NEW_EXPERIMENT_ACTION) || action.equals(NEW_RECIPE_ACTION) || action.equa... |
return action.equals(DELETE_ACTION); | return (action.equals(organizer.deleteAction) || action.equals(organizer.deleteFolderAction)); | private static boolean isActionAllowedOnFolder(String action, Organizer organizer, DefaultMutableTreeNode node) { if (action.equals(NEW_EXPERIMENT_ACTION) || action.equals(NEW_RECIPE_ACTION) || action.equa... |
private static boolean isActionAllowedOnRecipe(String action, | private static boolean isActionAllowedOnRecipe(Action action, | private static boolean isActionAllowedOnRecipe(String action, Organizer organizer, RecipeComponent recipe) { if (!recipe.isEditable()) return false; if (isNodeInExperiment(organizer)) { if (action.equals(DU... |
if (action.equals(DUPLICATE_ACTION) || action.equals(DELETE_ACTION)) | if (action.equals(organizer.duplicateAction) || action.equals(organizer.deleteAction) || action.equals(organizer.deleteRecipeAction)) | private static boolean isActionAllowedOnRecipe(String action, Organizer organizer, RecipeComponent recipe) { if (!recipe.isEditable()) return false; if (isNodeInExperiment(organizer)) { if (action.equals(DU... |
if (action.equals(SAVE_ACTION) && recipe.isModified()) | if (action.equals(organizer.saveAction) && recipe.isModified()) | private static boolean isActionAllowedOnRecipe(String action, Organizer organizer, RecipeComponent recipe) { if (!recipe.isEditable()) return false; if (isNodeInExperiment(organizer)) { if (action.equals(DU... |
if (action.equals(DUPLICATE_ACTION)) | if (action.equals(organizer.duplicateAction)) | private static boolean isActionAllowedOnRecipe(String action, Organizer organizer, RecipeComponent recipe) { if (!recipe.isEditable()) return false; if (isNodeInExperiment(organizer)) { if (action.equals(DU... |
if (action.equals(DELETE_ACTION) || action.equals(RENAME_ACTION)) | if (action.equals(organizer.deleteAction) || action.equals(organizer.deleteRecipeAction) || action.equals(organizer.renameAction) || action.equals(organizer.renameRecipeAction)) | private static boolean isActionAllowedOnRecipe(String action, Organizer organizer, RecipeComponent recipe) { if (!recipe.isEditable()) return false; if (isNodeInExperiment(organizer)) { if (action.equals(DU... |
if (action.equals(CONFIGURE_ACTION)) | if (action.equals(organizer.configureAction)) | private static boolean isActionAllowedOnRecipe(String action, Organizer organizer, RecipeComponent recipe) { if (!recipe.isEditable()) return false; if (isNodeInExperiment(organizer)) { if (action.equals(DU... |
private static boolean isActionAllowedOnSociety(String action, | private static boolean isActionAllowedOnSociety(Action action, | private static boolean isActionAllowedOnSociety(String action, Organizer organizer, SocietyComponent society) { if (!society.isEditable()) return false; if (isNodeInExperiment(organizer)) { if (action.equ... |
if (action.equals(DUPLICATE_ACTION) || action.equals(BUILD_ACTION) || action.equals(DELETE_ACTION) || action.equals(RUN_ACTION)) | if (action.equals(organizer.duplicateAction) || action.equals(organizer.buildExperimentAction) || action.equals(organizer.deleteAction) || action.equals(organizer.deleteSocietyAction) || action.equals(organizer.runExperimentAction)) | private static boolean isActionAllowedOnSociety(String action, Organizer organizer, SocietyComponent society) { if (!society.isEditable()) return false; if (isNodeInExperiment(organizer)) { if (action.equ... |
if (action.equals(DUPLICATE_ACTION)) | if (action.equals(organizer.duplicateAction)) | private static boolean isActionAllowedOnSociety(String action, Organizer organizer, SocietyComponent society) { if (!society.isEditable()) return false; if (isNodeInExperiment(organizer)) { if (action.equ... |
if (action.equals(SAVE_ACTION) && society.isModified()) | if (action.equals(organizer.saveAction) && society.isModified()) | private static boolean isActionAllowedOnSociety(String action, Organizer organizer, SocietyComponent society) { if (!society.isEditable()) return false; if (isNodeInExperiment(organizer)) { if (action.equ... |
if (action.equals(DELETE_ACTION) || action.equals(RENAME_ACTION)) | if (action.equals(organizer.deleteAction) || action.equals(organizer.deleteSocietyAction) || action.equals(organizer.renameAction) || action.equals(organizer.renameSocietyAction)) | private static boolean isActionAllowedOnSociety(String action, Organizer organizer, SocietyComponent society) { if (!society.isEditable()) return false; if (isNodeInExperiment(organizer)) { if (action.equ... |
if (action.equals(CONFIGURE_ACTION) || action.equals(BUILD_ACTION) || action.equals(RUN_ACTION)) | if (action.equals(organizer.configureAction) || action.equals(organizer.buildExperimentAction) || action.equals(organizer.runExperimentAction)) | private static boolean isActionAllowedOnSociety(String action, Organizer organizer, SocietyComponent society) { if (!society.isEditable()) return false; if (isNodeInExperiment(organizer)) { if (action.equ... |
String s = (String)action.getValue(Action.NAME); | Logger log = CSMART.createLogger("org.cougaar.tools.csmart.ui.viewer.ActionUtil"); | public static void setActionAllowed(Action action, Organizer organizer) { String s = (String)action.getValue(Action.NAME); DefaultMutableTreeNode selectedNode = organizer.getSelectedNode(); // If nothing is selected, some things are still legitimate if (selectedNode ==... |
if (s.equals(DELETE_EXPERIMENT_FROM_DATABASE_ACTION) || s.equals(DELETE_RECIPE_FROM_DATABASE_ACTION)) { | if (action.equals(organizer.deleteExperimentFromDatabaseAction) || action.equals(organizer.deleteRecipeFromDatabaseAction)) { | public static void setActionAllowed(Action action, Organizer organizer) { String s = (String)action.getValue(Action.NAME); DefaultMutableTreeNode selectedNode = organizer.getSelectedNode(); // If nothing is selected, some things are still legitimate if (selectedNode ==... |
if (s.equals(NEW_EXPERIMENT_ACTION) || s.equals(NEW_RECIPE_ACTION) || s.equals(NEW_FOLDER_ACTION) || s.equals(RENAME_ACTION) || s.equals(DELETE_EXPERIMENT_FROM_DATABASE_ACTION) || s.equals(DELETE_RECIPE_FROM_DATABASE_ACTION)) { | if (action.equals(organizer.newExperimentFromDBAction) || action.equals(organizer.newExperimentFromFileAction) || action.equals(organizer.newExperimentFromUIAction) || action.equals(organizer.newFolderAction) || action.equals(organizer.renameAction) || action.equals(organizer.renameWorkspaceAction) || action.equals(org... | public static void setActionAllowed(Action action, Organizer organizer) { String s = (String)action.getValue(Action.NAME); DefaultMutableTreeNode selectedNode = organizer.getSelectedNode(); // If nothing is selected, some things are still legitimate if (selectedNode ==... |
action.setEnabled(isActionAllowedOnFolder(s, organizer, | action.setEnabled(isActionAllowedOnFolder(action, organizer, | public static void setActionAllowed(Action action, Organizer organizer) { String s = (String)action.getValue(Action.NAME); DefaultMutableTreeNode selectedNode = organizer.getSelectedNode(); // If nothing is selected, some things are still legitimate if (selectedNode ==... |
action.setEnabled(isActionAllowedOnExperiment(s, organizer, | action.setEnabled(isActionAllowedOnExperiment(action, organizer, | public static void setActionAllowed(Action action, Organizer organizer) { String s = (String)action.getValue(Action.NAME); DefaultMutableTreeNode selectedNode = organizer.getSelectedNode(); // If nothing is selected, some things are still legitimate if (selectedNode ==... |
action.setEnabled(isActionAllowedOnSociety(s, organizer, | action.setEnabled(isActionAllowedOnSociety(action, organizer, | public static void setActionAllowed(Action action, Organizer organizer) { String s = (String)action.getValue(Action.NAME); DefaultMutableTreeNode selectedNode = organizer.getSelectedNode(); // If nothing is selected, some things are still legitimate if (selectedNode ==... |
action.setEnabled(isActionAllowedOnRecipe(s, organizer, | action.setEnabled(isActionAllowedOnRecipe(action, organizer, | public static void setActionAllowed(Action action, Organizer organizer) { String s = (String)action.getValue(Action.NAME); DefaultMutableTreeNode selectedNode = organizer.getSelectedNode(); // If nothing is selected, some things are still legitimate if (selectedNode ==... |
System.out.println("ActionUtil: unhandled case: " + s); | if(log.isErrorEnabled()) { log.error("ActionUtil: unhandled case: " + (String)action.getValue(Action.NAME)); } | public static void setActionAllowed(Action action, Organizer organizer) { String s = (String)action.getValue(Action.NAME); DefaultMutableTreeNode selectedNode = organizer.getSelectedNode(); // If nothing is selected, some things are still legitimate if (selectedNode ==... |
public void displayHostTreeMenu(MouseEvent e) { | private void displayHostTreeMenu(MouseEvent e) { | public void displayHostTreeMenu(MouseEvent e) { // the path to the node the mouse is pointing at TreePath selPath = hostTree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // if the mouse is pointing at a selected node // and all selected nodes are of the same type, then act ... |
public void displayNodeTreeMenu(MouseEvent e) { | private void displayNodeTreeMenu(MouseEvent e) { | public void displayNodeTreeMenu(MouseEvent e) { // the path to the node the mouse is pointing at TreePath selPath = nodeTree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // if the mouse is pointing at a selected node // and all selected nodes are of the same type, then act ... |
newHostMenuItem_actionPerformed(e); | createHost(); | private void initDisplay() { // host split pane contains host tree and // the bottom split pane which contains the node and agent trees JSplitPane hostPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); // tree of hosts and assigned nodes and agents DefaultMutableTreeNode root = new DefaultMutable... |
deleteHostMenuItem_actionPerformed(e); | deleteHost(); | private void initDisplay() { // host split pane contains host tree and // the bottom split pane which contains the node and agent trees JSplitPane hostPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); // tree of hosts and assigned nodes and agents DefaultMutableTreeNode root = new DefaultMutable... |
newNodeInHostMenuItem_actionPerformed(e); | createAssignedNode(); | private void initDisplay() { // host split pane contains host tree and // the bottom split pane which contains the node and agent trees JSplitPane hostPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); // tree of hosts and assigned nodes and agents DefaultMutableTreeNode root = new DefaultMutable... |
new JMenuItem(DESCRIPTION_MENU_ITEM); | new JMenuItem(DESCRIBE_MENU_ITEM); | private void initDisplay() { // host split pane contains host tree and // the bottom split pane which contains the node and agent trees JSplitPane hostPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); // tree of hosts and assigned nodes and agents DefaultMutableTreeNode root = new DefaultMutable... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.