rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
stackDepth++; | public void taskStarted(BuildEvent event) { } | |
protected Object getResolvedDescriptor(String org, String module, boolean strict) { return getReference("ivy.resolved.descriptor", org, module, strict); | protected Object getResolvedDescriptor(String org, String module) { return getResolvedDescriptor(org, module, false); | protected Object getResolvedDescriptor(String org, String module, boolean strict) { return getReference("ivy.resolved.descriptor", org, module, strict); } |
d2wContext().takeValueForKey(eo, "object"); | if(d2wContext() != null) { d2wContext().takeValueForKey(eo, "object"); } else { log.warn("No D2W context!"); } | public void setObject(EOEnterpriseObject eo) { _context = (eo != null) ? eo.editingContext() : null; // for SmartAssignment d2wContext().takeValueForKey(eo, "object"); super.setObject(eo); } |
EOEditingContext peerContext=ERXExtensions.newEditingContext(session().defaultEditingContext().parentObjectStore()); | EOEditingContext peerContext=ERXEC.newEditingContext(session().defaultEditingContext().parentObjectStore()); | public WOComponent newObjectAction() { WOComponent nextPage=null; EOEntity entity=EOModelGroup.defaultGroup().entityNamed(_manipulatedEntityName); EOClassDescription aClassDesc=entity.classDescriptionForInstances(); if (isEntityReadOnly(entity)) { ErrorPageInterface api=D2W.fa... |
if( types.length <= 5 ){ il.append( new ICONST( types.length ) ); }else if ( types.length < Byte.MAX_VALUE ) { il.append( new BIPUSH( (byte)types.length ) ); }else{ il.append( new SIPUSH( (short)types.length ) ); } | il.append( ClassFileUtils.getIntConst( types.length , cp ) ); | public static MetaClass getInstance(ClassLoader loader, Class target, String getters[], String setters[], Class types[] ) throws Throwable{ String key = generateKey(target, getters, setters, types); ... |
if( i<= 5 ){ il.append( new ICONST( i ) ); }else if ( i < Byte.MAX_VALUE ) { il.append( new BIPUSH( (byte)i ) ); } else { il.append( new SIPUSH( (short)i ) ); } | il.append( ClassFileUtils.getIntConst(i , cp ) ); | public static MetaClass getInstance(ClassLoader loader, Class target, String getters[], String setters[], Class types[] ) throws Throwable{ String key = generateKey(target, getters, setters, types); ... |
public synchronized void write (byte[] buf) throws IOException | public synchronized void write (int bval) throws IOException | public synchronized void write (byte[] buf) throws IOException { write (buf, 0, buf.length); } |
write (buf, 0, buf.length); | super.write (bval); crc.update (bval); | public synchronized void write (byte[] buf) throws IOException { write (buf, 0, buf.length); } |
else if (object instanceof Date) { return UTC_FORMAT.format(object); } | static String encode(Object object) { if (object instanceof String) { return object.toString(); } else if (object instanceof Date) { return UTC_FORMAT.format(object); } else if (object instanceof Boolean) { return Boolean.TRUE.equals(object) ? "1" ... | |
else if (object instanceof Date) { return FAST_UTC_FORMAT.format((Date) object); } | static String encode(Object object) { if (object instanceof String) { return object.toString(); } else if (object instanceof Date) { return UTC_FORMAT.format(object); } else if (object instanceof Boolean) { return Boolean.TRUE.equals(object) ? "1" ... | |
return UTC_FORMAT.parse(date); | synchronized (UTC_FORMAT) { return UTC_FORMAT.parse(date); } | public static Date parseDate(String date) throws ParseException { return UTC_FORMAT.parse(date); } |
return allPermissions; | Permissions perms = new Permissions(); perms.add(allPermission); return perms; | public PermissionCollection getPermissions(CodeSource codesource) { return allPermissions; } |
public void addToBothSidesOfOriginator(er.bugtracker.People object) { | public void addToBothSidesOfOriginator(People object) { | public void addToBothSidesOfOriginator(er.bugtracker.People object) { addObjectToBothSidesOfRelationshipWithKey(object, "originator"); } |
public void addToBothSidesOfPreviousOwner(er.bugtracker.People object) { | public void addToBothSidesOfPreviousOwner(People object) { | public void addToBothSidesOfPreviousOwner(er.bugtracker.People object) { addObjectToBothSidesOfRelationshipWithKey(object, "previousOwner"); } |
public void addToBothSidesOfPriority(er.bugtracker.Priority object) { | public void addToBothSidesOfPriority(Priority object) { | public void addToBothSidesOfPriority(er.bugtracker.Priority object) { addObjectToBothSidesOfRelationshipWithKey(object, "priority"); } |
public void addToBothSidesOfState(er.bugtracker.State object) { | public void addToBothSidesOfState(State object) { | public void addToBothSidesOfState(er.bugtracker.State object) { addObjectToBothSidesOfRelationshipWithKey(object, "state"); } |
public void addToBothSidesOfTargetRelease(er.bugtracker.Release object) { | public void addToBothSidesOfTargetRelease(Release object) { | public void addToBothSidesOfTargetRelease(er.bugtracker.Release object) { addObjectToBothSidesOfRelationshipWithKey(object, "targetRelease"); } |
public void addToBothSidesOfTestItems(er.bugtracker.TestItem object) { | public void addToBothSidesOfTestItems(TestItem object) { | public void addToBothSidesOfTestItems(er.bugtracker.TestItem object) { addObjectToBothSidesOfRelationshipWithKey(object, "testItems"); } |
public void addToTestItems(er.bugtracker.TestItem object) { | public void addToTestItems(TestItem object) { | public void addToTestItems(er.bugtracker.TestItem object) { NSMutableArray array = (NSMutableArray)testItems(); willChange(); array.addObject(object); } |
public er.bugtracker.People originator() { return (er.bugtracker.People)storedValueForKey("originator"); | public People originator() { return (People)storedValueForKey("originator"); | public er.bugtracker.People originator() { return (er.bugtracker.People)storedValueForKey("originator"); } |
public er.bugtracker.People previousOwner() { return (er.bugtracker.People)storedValueForKey("previousOwner"); | public People previousOwner() { return (People)storedValueForKey("previousOwner"); | public er.bugtracker.People previousOwner() { return (er.bugtracker.People)storedValueForKey("previousOwner"); } |
public er.bugtracker.Priority priority() { return (er.bugtracker.Priority)storedValueForKey("priority"); | public Priority priority() { return (Priority)storedValueForKey("priority"); | public er.bugtracker.Priority priority() { return (er.bugtracker.Priority)storedValueForKey("priority"); } |
public void removeFromBothSidesOfOriginator(er.bugtracker.People object) { | public void removeFromBothSidesOfOriginator(People object) { | public void removeFromBothSidesOfOriginator(er.bugtracker.People object) { removeObjectFromBothSidesOfRelationshipWithKey(object, "originator"); } |
public void removeFromBothSidesOfPreviousOwner(er.bugtracker.People object) { | public void removeFromBothSidesOfPreviousOwner(People object) { | public void removeFromBothSidesOfPreviousOwner(er.bugtracker.People object) { removeObjectFromBothSidesOfRelationshipWithKey(object, "previousOwner"); } |
public void removeFromBothSidesOfPriority(er.bugtracker.Priority object) { | public void removeFromBothSidesOfPriority(Priority object) { | public void removeFromBothSidesOfPriority(er.bugtracker.Priority object) { removeObjectFromBothSidesOfRelationshipWithKey(object, "priority"); } |
public void removeFromBothSidesOfState(er.bugtracker.State object) { | public void removeFromBothSidesOfState(State object) { | public void removeFromBothSidesOfState(er.bugtracker.State object) { removeObjectFromBothSidesOfRelationshipWithKey(object, "state"); } |
public void removeFromBothSidesOfTargetRelease(er.bugtracker.Release object) { | public void removeFromBothSidesOfTargetRelease(Release object) { | public void removeFromBothSidesOfTargetRelease(er.bugtracker.Release object) { removeObjectFromBothSidesOfRelationshipWithKey(object, "targetRelease"); } |
public void removeFromBothSidesOfTestItems(er.bugtracker.TestItem object) { | public void removeFromBothSidesOfTestItems(TestItem object) { | public void removeFromBothSidesOfTestItems(er.bugtracker.TestItem object) { removeObjectFromBothSidesOfRelationshipWithKey(object, "testItems"); } |
public void removeFromTestItems(er.bugtracker.TestItem object) { | public void removeFromTestItems(TestItem object) { | public void removeFromTestItems(er.bugtracker.TestItem object) { NSMutableArray array = (NSMutableArray)testItems(); willChange(); array.removeObject(object); } |
public void setOriginator(er.bugtracker.People aValue) { | public void setOriginator(People aValue) { | public void setOriginator(er.bugtracker.People aValue) { takeStoredValueForKey(aValue, "originator"); } |
public void setPreviousOwner(er.bugtracker.People aValue) { | public void setPreviousOwner(People aValue) { | public void setPreviousOwner(er.bugtracker.People aValue) { takeStoredValueForKey(aValue, "previousOwner"); } |
public void setPriority(er.bugtracker.Priority aValue) { | public void setPriority(Priority aValue) { | public void setPriority(er.bugtracker.Priority aValue) { takeStoredValueForKey(aValue, "priority"); } |
public void setState(er.bugtracker.State aValue) { | public void setState(State aValue) { | public void setState(er.bugtracker.State aValue) { takeStoredValueForKey(aValue, "state"); } |
public void setTargetRelease(er.bugtracker.Release aValue) { | public void setTargetRelease(Release aValue) { | public void setTargetRelease(er.bugtracker.Release aValue) { takeStoredValueForKey(aValue, "targetRelease"); } |
public er.bugtracker.State state() { return (er.bugtracker.State)storedValueForKey("state"); | public State state() { return (State)storedValueForKey("state"); | public er.bugtracker.State state() { return (er.bugtracker.State)storedValueForKey("state"); } |
public er.bugtracker.Release targetRelease() { return (er.bugtracker.Release)storedValueForKey("targetRelease"); | public Release targetRelease() { return (Release)storedValueForKey("targetRelease"); | public er.bugtracker.Release targetRelease() { return (er.bugtracker.Release)storedValueForKey("targetRelease"); } |
String pre = woresponse.contentString(); | int offset = woresponse.contentString().length(); | public void appendToResponse(WOResponse woresponse, WOContext wocontext) { String pre = woresponse.contentString(); super.appendToResponse(woresponse, wocontext); if(cleanupXHTML) correctResponse(woresponse, pre.length(), pre); } |
if(cleanupXHTML) correctResponse(woresponse, pre.length(), pre); | processResponse(this, woresponse, wocontext, offset, nameInContext(wocontext, wocontext.component())); | public void appendToResponse(WOResponse woresponse, WOContext wocontext) { String pre = woresponse.contentString(); super.appendToResponse(woresponse, wocontext); if(cleanupXHTML) correctResponse(woresponse, pre.length(), pre); } |
if(cleanupXHTML) correctResponse(woresponse, pre.length(), pre); | processResponse(this, woresponse, wocontext, offset, null); | public void appendToResponse(WOResponse woresponse, WOContext wocontext) { String pre = woresponse.contentString(); super.appendToResponse(woresponse, wocontext); if(cleanupXHTML) correctResponse(woresponse, pre.length(), pre); } |
public static final void correctResponse(WOResponse response, int start, String pre) { | public static final void correctResponse(WOResponse response, int start) { | public static final void correctResponse(WOResponse response, int start, String pre) { String string = response.contentString(); int length = string.length(); StringBuffer buf = new StringBuffer(length); buf.append(pre); for(int i = start; i < length; i++) ... |
buf.append(pre); | buf.append(string.substring(0, start)); | public static final void correctResponse(WOResponse response, int start, String pre) { String string = response.contentString(); int length = string.length(); StringBuffer buf = new StringBuffer(length); buf.append(pre); for(int i = start; i < length; i++) ... |
aNavigationItem = null; | public void reset() { _level1Items=null; _level2Items=null; _level3Items=null; _menuIsSetUp=false; _renderLevelCount=0; _navigationState = null; _navigationContext = null; super.reset(); } | |
protected ResultSet executeQuery(Statement stmt, String query) throws SQLException { if (query == null) throw new IllegalArgumentException("executeQuery: null query"); | protected ResultSet executeQuery(PreparedStatement pstmt, String query) throws SQLException { if (query == null) throw new IllegalArgumentException("executeUpdate: null query"); | protected ResultSet executeQuery(Statement stmt, String query) throws SQLException { if (query == null) throw new IllegalArgumentException("executeQuery: null query"); try { long startTime = 0; if (log != null) startTime = System.currentTimeMillis(); Res... |
ResultSet rs = stmt.executeQuery(query); | ResultSet result = pstmt.executeQuery(); | protected ResultSet executeQuery(Statement stmt, String query) throws SQLException { if (query == null) throw new IllegalArgumentException("executeQuery: null query"); try { long startTime = 0; if (log != null) startTime = System.currentTimeMillis(); Res... |
return rs; | return result; | protected ResultSet executeQuery(Statement stmt, String query) throws SQLException { if (query == null) throw new IllegalArgumentException("executeQuery: null query"); try { long startTime = 0; if (log != null) startTime = System.currentTimeMillis(); Res... |
if (!modified) { JOptionPane.showMessageDialog(this, "No modifications were made."); return; } modified = false; | public void save() {// Hashtable newHostToNodes = new Hashtable();// Hashtable newNodeToAgents = new Hashtable();// setHostNodeAgentMapping(newHostToNodes, newNodeToAgents);// Utils.updateHostNodeAgentMapping(hostToNodes, nodeToAgents,// newHostToNodes, newNod... | |
modified = true; | public void treeNodesChanged(TreeModelEvent e) { Object source = e.getSource(); if (hostTree.getModel().equals(source)) setNameServerHostName(); } | |
modified = true; | public void treeNodesInserted(TreeModelEvent e) { // System.out.println("CSMARTConsole: treeNodesInserted"); Object source = e.getSource(); if (hostTree.getModel().equals(source)) treeNodesInsertedInHostTree(e); else if (nodeTree.getModel().equals(source)) treeNodesInsertedInNodeTree(e); } | |
modified = true; | public void treeNodesRemoved(TreeModelEvent e) { Object source = e.getSource(); if (hostTree.getModel().equals(source)) treeNodesRemovedFromHostTree(e); else if (nodeTree.getModel().equals(source)) treeNodesRemovedFromNodeTree(e); } | |
while ( index >= 0 && ((bytes[index+1] & 0xC0) == 0x80) ) { | while ( index >= 0 && ((bytes[index+1] & 0xC0) == 0x80) ) | public static String stringByTruncatingStringToByteLengthInEncoding(final String inputString, final int byteLength, final String encoding) { String result = null; if ( log.isDebugEnabled() ) { log.debug("stringByTruncatingStringToByteLengthInEncoding: encoding='" + encoding + "', by... |
} | public static String stringByTruncatingStringToByteLengthInEncoding(final String inputString, final int byteLength, final String encoding) { String result = null; if ( log.isDebugEnabled() ) { log.debug("stringByTruncatingStringToByteLengthInEncoding: encoding='" + encoding + "', by... | |
charBuffer = decoder.decode(byteBuffer); | charBuffer = decoder.reset().decode(byteBuffer); | public static String stringByTruncatingStringToByteLengthInEncoding(final String inputString, final int byteLength, final String encoding) { String result = null; if ( log.isDebugEnabled() ) { log.debug("stringByTruncatingStringToByteLengthInEncoding: encoding='" + encoding + "', by... |
if (last == null) throw new IllegalStateException(); | public void remove() { if (knownMod != modCount) throw new ConcurrentModificationException(); if (last == null) throw new IllegalStateException(); removeNode(last); last = null; knownMod++; } | |
for (rowsize = 2; rowsize + rowsize < count; rowsize <<= 1) | for (rowsize = 2; rowsize + rowsize <= count; rowsize <<= 1) | private void fabricateTree(final int count) { if (count == 0) return; // We color every row of nodes black, except for the overflow nodes. // I believe that this is the optimal arrangement. We construct the tree // in place by temporarily linking each node to the next node in the row, // then upd... |
assertTrue(ex.getMessage().indexOf("'modul'") != -1); | if (XMLHelper.canUseSchemaValidation()) { assertTrue("exception message not explicit. It should contain 'modul', but it's:"+ex.getMessage(), ex.getMessage().indexOf("'modul'") != -1); } | public void testBad() throws IOException { try { XmlModuleDescriptorParser.getInstance().parseDescriptor(_ivy, getClass().getResource("test-bad.xml"), true); fail("bad ivy file raised no error"); } catch (ParseException ex) { assertTrue(ex.getMessage().indexOf("'modul'") ... |
createLogger(); | private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { ois.defaultReadObject(); initDBProperties(); } | |
return _old.schemaBasedQualifierWithRootEntity(eoqualifier, eoentity); | EOQualifier result = _old.schemaBasedQualifierWithRootEntity(eoqualifier, eoentity); return result; | public EOQualifier schemaBasedQualifierWithRootEntity(EOQualifier eoqualifier, EOEntity eoentity) { EOKeyValueQualifier qualifier = (EOKeyValueQualifier)eoqualifier; if(IsContainedInArraySelectorName.equals(qualifier.selector().name())) { return new ERXPrimaryKeyListQualifie... |
if (cat.isDebugEnabled()) cat.debug("Object = "+object()); | public WOComponent debug() { WOComponent result=null; if (cat.isDebugEnabled()) cat.debug("Object = "+object()); if (object() instanceof EOEditingContext) { result=pageWithName("ERXEditingContextInspector"); result.takeValueForKey(object(),"object"); } else if (obje... | |
result.takeValueForKey(object(),"object"); | if(result != null) { result.takeValueForKey(object(),"object"); } else if(object() instanceof ERXGenericRecord) { cat.info("Object: " + ((ERXGenericRecord)object()).toLongString()); } else { cat.info("Object: " + object()); } | public WOComponent debug() { WOComponent result=null; if (cat.isDebugEnabled()) cat.debug("Object = "+object()); if (object() instanceof EOEditingContext) { result=pageWithName("ERXEditingContextInspector"); result.takeValueForKey(object(),"object"); } else if (obje... |
renameMetric(popupNode); } | renameComponent(popupNode); } | public void actionPerformed(ActionEvent e) { renameMetric(popupNode); } |
deleteMetric(popupNode); } | deleteComponent(popupNode); } | public void actionPerformed(ActionEvent e) { deleteMetric(popupNode); } |
while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newFolder(popupNode); } | copyComponentInNode(popupNode); } | public void actionPerformed(ActionEvent e) { while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newFolder(popupNode); } |
while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newSociety(popupNode); } | startExperimentBuilder(popupNode, true); } | public void actionPerformed(ActionEvent e) { while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newSociety(popupNode); } |
while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newImpact(popupNode); } | renameMetric(popupNode); } | public void actionPerformed(ActionEvent e) { while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newImpact(popupNode); } |
while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newMetric(popupNode); } | deleteMetric(popupNode); } | public void actionPerformed(ActionEvent e) { while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newMetric(popupNode); } |
while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newExperiment(popupNode); } | while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newFolder(popupNode); } | public void actionPerformed(ActionEvent e) { while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newExperiment(popupNode); } |
renameFolder(popupNode); } | while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newSociety(popupNode); } | public void actionPerformed(ActionEvent e) { renameFolder(popupNode); } |
deleteFolder(popupNode); } | while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newImpact(popupNode); } | public void actionPerformed(ActionEvent e) { deleteFolder(popupNode); } |
DefaultMutableTreeNode node) { DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(impact, false); addNode(node, newNode); impactNames.add(impact.getImpactName()); return newNode; } | DefaultMutableTreeNode node) { if (impact == null) return null; DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(impact, false); addNode(node, newNode); impactNames.add(impact.getImpactName()); return newNode; } | private DefaultMutableTreeNode addImpactToWorkspace(ImpactComponent impact, DefaultMutableTreeNode node) { DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(impact, false); addNode(node, newNode); impactNames.add(impact.getImpactName()); // installListeners(sc); return new... |
model.insertNodeInto(newNode, node, node.getChildCount()); workspace.scrollPathToVisible(new TreePath(newNode.getPath())); } | if (node == null) node = root; model.insertNodeInto(newNode, node, node.getChildCount()); workspace.scrollPathToVisible(new TreePath(newNode.getPath())); } | private void addNode(DefaultMutableTreeNode node, DefaultMutableTreeNode newNode) { model.insertNodeInto(newNode, node, node.getChildCount()); workspace.scrollPathToVisible(new TreePath(newNode.getPath()));// TreePath path = new TreePath(newNode.getPath());// workspace.expandPath(path);// ... |
installListeners(sc); | installListeners((ModifiableConfigurableComponent)sc); | private DefaultMutableTreeNode addSocietyToWorkspace(SocietyComponent sc, DefaultMutableTreeNode node) { DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(sc, false); addNode(node, newNode); societyNames.add(sc.getSocietyName()); installListeners(sc); return newNode; } |
if (context == null) addImpactToWorkspace(impactCopy, (DefaultMutableTreeNode)findNode(impact).getParent()); | public ImpactComponent copyImpact(ImpactComponent impact, Object context) { ImpactComponent impactCopy = impact.copy(this, context); addImpactToWorkspace(impactCopy, (DefaultMutableTreeNode)context); return impactCopy; } | |
if (context == null) addMetricToWorkspace(metricCopy, (DefaultMutableTreeNode)findNode(metric).getParent()); | public Metric copyMetric(Metric metric, Object context) { Metric metricCopy = metric.copy(this, context); addMetricToWorkspace(metricCopy, (DefaultMutableTreeNode)context); return metricCopy; } | |
} else if (aNode.getUserObject() instanceof ModifiableConfigurableComponent) { myorg.renameComponent(aNode, newValue.toString()); | private DefaultTreeModel createModel(final Organizer myorg, DefaultMutableTreeNode node) { return new DefaultTreeModel(node) { public void valueForPathChanged(TreePath path, Object newValue) { if (newValue == null) return; DefaultMutableTreeNode aNode = (DefaultMutableTreeNode)path.getLastPathComponent(); ... | |
SocietyComponent society = (SocietyComponent)node.getUserObject(); if (!society.isEditable()) { int result = JOptionPane.showConfirmDialog(this, "Society is in use; delete anyway?", "Society Not Editable", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); if (result != JOptionPane.YES_OPTION) return; } model.rem... | SocietyComponent society = (SocietyComponent)node.getUserObject(); if (!society.isEditable()) { int result = JOptionPane.showConfirmDialog(this, "Society is in use; delete anyway?", "Society Not Editable", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); if (result != JOptionPane.YES_OPTION) return; | private void deleteSociety(DefaultMutableTreeNode node) { SocietyComponent society = (SocietyComponent)node.getUserObject(); if (!society.isEditable()) { int result = JOptionPane.showConfirmDialog(this, "Society is in use; delete anyway?", "Society Not Editable", JOptionPane.YES... |
model.removeNodeFromParent(node); societyNames.remove(society.getSocietyName()); } | private void deleteSociety(DefaultMutableTreeNode node) { SocietyComponent society = (SocietyComponent)node.getUserObject(); if (!society.isEditable()) { int result = JOptionPane.showConfirmDialog(this, "Society is in use; delete anyway?", "Society Not Editable", JOptionPane.YES... | |
} else if (o instanceof Impact) { | } else if (o instanceof ImpactComponent) { | private void doPopup(MouseEvent e) { TreePath selPath = workspace.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // set the selected node to be the node the mouse is pointing at workspace.setSelectionPath(selPath); popupNode = (DefaultMutableTreeNode) selPath.getLastPathComponent(... |
} else if (o instanceof ModifiableConfigurableComponent) { componentMenu.show(workspace, e.getX(), e.getY()); | private void doPopup(MouseEvent e) { TreePath selPath = workspace.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // set the selected node to be the node the mouse is pointing at workspace.setSelectionPath(selPath); popupNode = (DefaultMutableTreeNode) selPath.getLastPathComponent(... | |
synchronized(root) { if (updateNeeded) { nextUpdate = System.currentTimeMillis(); root.notify(); while (updateNeeded) { try { root.wait(); } catch (InterruptedException ie) { } } } } return true; | synchronized(root) { if (updateNeeded) { nextUpdate = System.currentTimeMillis(); root.notify(); while (updateNeeded) { try { root.wait(); } catch (InterruptedException ie) { } } } | public boolean exitAllowed() { synchronized(root) { if (updateNeeded) { nextUpdate = System.currentTimeMillis(); root.notify(); while (updateNeeded) { try { root.wait(); } catch (InterruptedEx... |
return true; } | public boolean exitAllowed() { synchronized(root) { if (updateNeeded) { nextUpdate = System.currentTimeMillis(); root.notify(); while (updateNeeded) { try { root.wait(); } catch (InterruptedEx... | |
Enumeration nodes = root.depthFirstEnumeration(); while (nodes.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)nodes.nextElement(); workspace.expandPath(new TreePath(node.getPath())); } | Enumeration nodes = root.depthFirstEnumeration(); while (nodes.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)nodes.nextElement(); workspace.expandPath(new TreePath(node.getPath())); | private void expandTree() { Enumeration nodes = root.depthFirstEnumeration(); while (nodes.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)nodes.nextElement(); workspace.expandPath(new TreePath(node.getPath())); } } |
} | private void expandTree() { Enumeration nodes = root.depthFirstEnumeration(); while (nodes.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)nodes.nextElement(); workspace.expandPath(new TreePath(node.getPath())); } } | |
for (int i = 0; i < paths.length; i++) { DefaultMutableTreeNode selNode = (DefaultMutableTreeNode) paths[i].getLastPathComponent(); Object o = selNode.getUserObject(); if (leafClass.isInstance(o)) { result.add(o); } else if (o instanceof String) { for (Enumeration e = selNode.depthFirstEnumeration(); e.hasMoreElements(... | for (int i = 0; i < paths.length; i++) { DefaultMutableTreeNode selNode = (DefaultMutableTreeNode) paths[i].getLastPathComponent(); Object o = selNode.getUserObject(); if (leafClass.isInstance(o)) { result.add(o); } else if (o instanceof String) { for (Enumeration e = selNode.depthFirstEnumeration(); e.hasMoreElements(... | private Object[] fill(List result, Class leafClass, TreePath[] paths) { for (int i = 0; i < paths.length; i++) { DefaultMutableTreeNode selNode = (DefaultMutableTreeNode) paths[i].getLastPathComponent(); Object o = selNode.getUserObject(); if (leafClass.isInsta... |
return result.toArray((Object[]) Array.newInstance(leafClass, result.size())); } | private Object[] fill(List result, Class leafClass, TreePath[] paths) { for (int i = 0; i < paths.length; i++) { DefaultMutableTreeNode selNode = (DefaultMutableTreeNode) paths[i].getLastPathComponent(); Object o = selNode.getUserObject(); if (leafClass.isInsta... | |
Enumeration nodes = root.depthFirstEnumeration(); while (nodes.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)nodes.nextElement(); if (node.isLeaf() && node.getUserObject().equals(userObject)) return node; } return null; | Enumeration nodes = root.depthFirstEnumeration(); while (nodes.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)nodes.nextElement(); if (node.isLeaf() && node.getUserObject().equals(userObject)) return node; | 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; ... |
return null; } | 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; ... | |
return (ImpactComponent[]) getLeaves(Impact.class, node); } | return (ImpactComponent[]) getLeaves(ImpactComponent.class, node); } | private ImpactComponent[] getImpacts(TreeNode node) { return (ImpactComponent[]) getLeaves(Impact.class, node); } |
public Impact[] getSelectedImpacts() { return (Impact[]) getSelectedLeaves(Impact.class); } | public ImpactComponent[] getSelectedImpacts() { return (ImpactComponent[]) getSelectedLeaves(ImpactComponent.class); } | public Impact[] getSelectedImpacts() { return (Impact[]) getSelectedLeaves(Impact.class); } |
Enumeration nodes = root.depthFirstEnumeration(); while (nodes.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)nodes.nextElement(); if (node.isLeaf()) { Object o = node.getUserObject(); if (o instanceof SocietyComponent) societyNames.add(((SocietyComponent)o).getSocietyName()); } | Enumeration nodes = root.depthFirstEnumeration(); while (nodes.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)nodes.nextElement(); if (node.isLeaf()) { Object o = node.getUserObject(); if (o instanceof SocietyComponent) societyNames.add(((SocietyComponent)o).getSocietyName()); | private void initSocietyNames() { // initialize known society names Enumeration nodes = root.depthFirstEnumeration(); while (nodes.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)nodes.nextElement(); if (node.isLeaf()) { Object o = node.getUserObject(); if (o instanc... |
} | private void initSocietyNames() { // initialize known society names Enumeration nodes = root.depthFirstEnumeration(); while (nodes.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)nodes.nextElement(); if (node.isLeaf()) { Object o = node.getUserObject(); if (o instanc... | |
private void installListeners(SocietyComponent sc) { sc.addPropertiesListener(myPropertiesListener); for (Iterator i = sc.getPropertyNames(); i.hasNext(); ) { Property p = sc.getProperty((CompositeName) i.next()); PropertyEvent event = new PropertyEvent(p, PropertyEvent.PROPERTY_ADDED); myPropertiesListener.propertyAdd... | private void installListeners(ModifiableConfigurableComponent sc) { sc.addPropertiesListener(myPropertiesListener); for (Iterator i = sc.getPropertyNames(); i.hasNext(); ) { Property p = sc.getProperty((CompositeName) i.next()); PropertyEvent event = new PropertyEvent(p, PropertyEvent.PROPERTY_ADDED); myPropertiesListe... | private void installListeners(SocietyComponent sc) { sc.addPropertiesListener(myPropertiesListener); for (Iterator i = sc.getPropertyNames(); i.hasNext(); ) { Property p = sc.getProperty((CompositeName) i.next()); PropertyEvent event = new PropertyEvent(p, PropertyEvent.PROPERTY_... |
sc.addModificationListener(myModificationListener); } | private void installListeners(SocietyComponent sc) { sc.addPropertiesListener(myPropertiesListener); for (Iterator i = sc.getPropertyNames(); i.hasNext(); ) { Property p = sc.getProperty((CompositeName) i.next()); PropertyEvent event = new PropertyEvent(p, PropertyEvent.PROPERTY_... | |
String name = experimentNames.generateName(); while (true) { name = (String) JOptionPane.showInputDialog(this, "Enter Experiment Name", "Experiment Name", JOptionPane.QUESTION_MESSAGE, null, null, name); if (name == null) return null; if (!experimentNames.contains(name)) break; int answer = JOptionPane.showConfirmDialo... | String name = experimentNames.generateName(); while (true) { name = (String) JOptionPane.showInputDialog(this, "Enter Experiment Name", "Experiment Name", JOptionPane.QUESTION_MESSAGE, null, null, name); if (name == null) return null; if (!experimentNames.contains(name)) break; int answer = JOptionPane.showConfirmDialo... | private DefaultMutableTreeNode newExperiment(DefaultMutableTreeNode node) { String name = experimentNames.generateName(); while (true) { name = (String) JOptionPane.showInputDialog(this, "Enter Experiment Name", "Experiment Name", ... |
try { Experiment experiment = new Experiment(name); DefaultMutableTreeNode newNode = addExperimentToWorkspace(experiment, node); workspace.setSelection(newNode); return newNode; } catch (Exception e) { e.printStackTrace(); return null; } } | private DefaultMutableTreeNode newExperiment(DefaultMutableTreeNode node) { String name = experimentNames.generateName(); while (true) { name = (String) JOptionPane.showInputDialog(this, "Enter Experiment Name", "Experiment Name", ... | |
String name = JOptionPane.showInputDialog("New folder name"); if (name != null) { DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(name, true); addNode(node, newNode); workspace.setSelection(newNode); } | String name = JOptionPane.showInputDialog("New folder name"); if (name != null) { DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(name, true); addNode(node, newNode); workspace.setSelection(newNode); | private void newFolder(DefaultMutableTreeNode node) { String name = JOptionPane.showInputDialog("New folder name"); if (name != null) { DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(name, true); addNode(node, newNode); workspace.setSelection(newNode); ... |
} | private void newFolder(DefaultMutableTreeNode node) { String name = JOptionPane.showInputDialog("New folder name"); if (name != null) { DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(name, true); addNode(node, newNode); workspace.setSelection(newNode); ... | |
Object[] values = { new ComboItem("ABCImpact", ABCImpact.class), new ComboItem("High Impact", HighImpact.class), new ComboItem("Low Impact", LowImpact.class) }; Object answer = JOptionPane.showInputDialog(this, "Select Impact Type", "Select Impact", JOptionPane.QUESTION_MESSAGE, null, values, "Low Impact"); if (answer ... | Object[] values = { new ComboItem("ABCImpact", ABCImpact.class) }; Object answer = JOptionPane.showInputDialog(this, "Select Impact Type", "Select Impact", JOptionPane.QUESTION_MESSAGE, null, values, "ABCImpact"); if (answer instanceof ComboItem) { ComboItem item = (ComboItem) answer; String name = impactNames.generate... | private void newImpact(DefaultMutableTreeNode node) { Object[] values = { new ComboItem("ABCImpact", ABCImpact.class), new ComboItem("High Impact", HighImpact.class), new ComboItem("Low Impact", LowImpact.class) }; Object answer = JOptionPane.showInpu... |
} | private void newImpact(DefaultMutableTreeNode node) { Object[] values = { new ComboItem("ABCImpact", ABCImpact.class), new ComboItem("High Impact", HighImpact.class), new ComboItem("Low Impact", LowImpact.class) }; Object answer = JOptionPane.showInpu... | |
Object[] values = { new ComboItem("Some Metric", SomeMetric.class), new ComboItem("Mo Metric", MoMetric.class) }; Object answer = JOptionPane.showInputDialog(this, "Select Metric Type", "Select Metric", JOptionPane.QUESTION_MESSAGE, null, values, "Mo Metric"); if (answer instanceof ComboItem) { ComboItem item = (ComboI... | Object[] values = { new ComboItem("Some Metric", SomeMetric.class), new ComboItem("Mo Metric", MoMetric.class) }; Object answer = JOptionPane.showInputDialog(this, "Select Metric Type", "Select Metric", JOptionPane.QUESTION_MESSAGE, null, values, "Mo Metric"); if (answer instanceof ComboItem) { ComboItem item = (ComboI... | private void newMetric(DefaultMutableTreeNode node) { Object[] values = { new ComboItem("Some Metric", SomeMetric.class), new ComboItem("Mo Metric", MoMetric.class) }; Object answer = JOptionPane.showInputDialog(this, "Select Metric Type", ... |
} | private void newMetric(DefaultMutableTreeNode node) { Object[] values = { new ComboItem("Some Metric", SomeMetric.class), new ComboItem("Mo Metric", MoMetric.class) }; Object answer = JOptionPane.showInputDialog(this, "Select Metric Type", ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.