rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
re.printStackTrace();
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...
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 = addExperimentToWorksp...
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...
public void run() { cmtDialog.processResults(); // a potentially long process final String trialId = cmtDialog.getTrialId(); if (trialId != null) { Experiment experiment = helper.createExperiment(originalExperimentName, c...
if (log.isDebugEnabled() && oagents.length > 0) { log.debug("copy: Found node whose Agent mapping may not have been copied: " + nnodes[i]); } for (int j = 0; j < oagents.length; j++) for (int k = 0; k < nagents.length; k++)
for (int j = 0; j < oagents.length; j++) { for (int k = 0; k < nagents.length; k++) {
public ModifiableComponent copy(String uniqueName) { if (log.isDebugEnabled()) { log.debug("Experiment copying " + getExperimentName() + " into new name " + uniqueName); } Experiment experimentCopy = null; if (DBUtils.dbMode) experimentCopy = new Experiment(uniqueName, expID, trialID); else ...
log.debug("copy: Putting ne Agent " + nagents[k].getShortName() + " on new Node " + nnodes[i].getShortName());
log.debug("copy: Putting new Agent " + nagents[k].getShortName() + " on new Node " + nnodes[i].getShortName());
public ModifiableComponent copy(String uniqueName) { if (log.isDebugEnabled()) { log.debug("Experiment copying " + getExperimentName() + " into new name " + uniqueName); } Experiment experimentCopy = null; if (DBUtils.dbMode) experimentCopy = new Experiment(uniqueName, expID, trialID); else ...
} } }
} } } } }
public ModifiableComponent copy(String uniqueName) { if (log.isDebugEnabled()) { log.debug("Experiment copying " + getExperimentName() + " into new name " + uniqueName); } Experiment experimentCopy = null; if (DBUtils.dbMode) experimentCopy = new Experiment(uniqueName, expID, trialID); else ...
window.removeMouseMotionListener(mouseMotionListener); window.removeMouseListener(mouseListener); window.removeGLEventListener(glListener); ManipManager.getManipManager().setupMouseListeners(window);
if (window != null) { window.removeMouseMotionListener(mouseMotionListener); window.removeMouseListener(mouseListener); window.removeGLEventListener(glListener); ManipManager.getManipManager().setupMouseListeners(window); }
private void removeListeners() { window.removeMouseMotionListener(mouseMotionListener); window.removeMouseListener(mouseListener); window.removeGLEventListener(glListener); ManipManager.getManipManager().setupMouseListeners(window); }
EOEditingContext peer = ERXExtensions.newEditingContext();
EOEditingContext peer = ERXEC.newEditingContext();
public WOComponent editUser() { // This will be a peer of the session's default editingContext. We want to edit in a peer so in case they hit // the back button the ec won't be dirty EOEditingContext peer = ERXExtensions.newEditingContext(); EditPageInterface epi = (EditPageInterface)D2...
if(log.isDebugEnabled()) { log.error(fnf.toString());
if(log.isErrorEnabled()) { log.error("Exception", fnf);
public static CSMARTGraph createGraphFromDotFile(File f) { InputStream input = null; Logger log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.generic.CSMARTGraph"); try { input = new FileInputStream(f); } catch(FileNotFoundException fnf) { if(log.isDebugEnabled()) { log.error...
if(log.isDebugEnabled()) { log.error("CSMARTGraph: parser exception: " + ex);
if(log.isErrorEnabled()) { log.error("CSMARTGraph: parser exception: ", ex);
public static CSMARTGraph createGraphFromDotFile(File f) { InputStream input = null; Logger log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.generic.CSMARTGraph"); try { input = new FileInputStream(f); } catch(FileNotFoundException fnf) { if(log.isDebugEnabled()) { log.error...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
public Subgraph[] createRankedSubgraphs(int numberOfSubgraphs) { Node lastNode = null; Subgraph[] subgraphs = new Subgraph[numberOfSubgraphs]; for (int i = 0; i < numberOfSubgraphs; i++) { subgraphs[i] = new Subgraph(this); subgraphs[i].setAttribute(RANK_ATTRIBUTE, RANK_SAME); Node node = new ...
node + " " + e);
node + " ", e);
public Subgraph[] createRankedSubgraphs(int numberOfSubgraphs) { Node lastNode = null; Subgraph[] subgraphs = new Subgraph[numberOfSubgraphs]; for (int i = 0; i < numberOfSubgraphs; i++) { subgraphs[i] = new Subgraph(this); subgraphs[i].setAttribute(RANK_ATTRIBUTE, RANK_SAME); Node node = new ...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
private void deleteEdges(Node node) { Enumeration inEdgeElements; Enumeration outEdgeElements; inEdgeElements = node.inEdgeElements(); // first, connect in-edges to out-edges while (inEdgeElements.hasMoreElements()) { Edge inEdge = (Edge)inEdgeElements.nextElement(); outEdgeElements = node.ou...
outEdge.getHead() + " " + e);
outEdge.getHead() + " ", e);
private void deleteEdges(Node node) { Enumeration inEdgeElements; Enumeration outEdgeElements; inEdgeElements = node.inEdgeElements(); // first, connect in-edges to out-edges while (inEdgeElements.hasMoreElements()) { Edge inEdge = (Edge)inEdgeElements.nextElement(); outEdgeElements = node.ou...
if(log.isDebugEnabled()) {
if(log.isInfoEnabled()) {
public void doLayout() { if(log.isDebugEnabled()) { log.info("CSMARTGraph: Starting layout..."); } // if we have a mapping of UIDs to nodes then we can minimize the // information sent to the layout engine boolean minimizeGraph = true; if (UIDToNode.size() == 0) minimizeGraph = false; /...
if(log.isDebugEnabled()) { log.error("CSMARTGraph: Could not open file handle for " + dotPathname);
if(log.isErrorEnabled()) { log.error("CSMARTGraph: Could not open file handle for " + dotPathname, e);
public void doLayout() { if(log.isDebugEnabled()) { log.info("CSMARTGraph: Starting layout..."); } // if we have a mapping of UIDs to nodes then we can minimize the // information sent to the layout engine boolean minimizeGraph = true; if (UIDToNode.size() == 0) minimizeGraph = false; /...
if(log.isDebugEnabled()) { log.error("CSMARTGraph: Could not write to file:" + dotPathname + " file not found exception: " + e);
if(log.isErrorEnabled()) { log.error("CSMARTGraph: Could not write to file:" + dotPathname + " file not found exception: ", e);
public void doLayout() { if(log.isDebugEnabled()) { log.info("CSMARTGraph: Starting layout..."); } // if we have a mapping of UIDs to nodes then we can minimize the // information sent to the layout engine boolean minimizeGraph = true; if (UIDToNode.size() == 0) minimizeGraph = false; /...
if(log.isDebugEnabled()) { log.error("CSMARTGraph: Could not write to file:" + dotPathname + " security exception: " + se);
if(log.isErrorEnabled()) { log.error("CSMARTGraph: Could not write to file:" + dotPathname + " security exception: ", se);
public void doLayout() { if(log.isDebugEnabled()) { log.info("CSMARTGraph: Starting layout..."); } // if we have a mapping of UIDs to nodes then we can minimize the // information sent to the layout engine boolean minimizeGraph = true; if (UIDToNode.size() == 0) minimizeGraph = false; /...
if(log.isDebugEnabled()) { log.error("CSMARTGraph: Could not write to file:" + dotPathname + " I/O exception: " + ie);
if(log.isErrorEnabled()) { log.error("CSMARTGraph: Could not write to file:" + dotPathname + " I/O exception: ", ie);
public void doLayout() { if(log.isDebugEnabled()) { log.info("CSMARTGraph: Starting layout..."); } // if we have a mapping of UIDs to nodes then we can minimize the // information sent to the layout engine boolean minimizeGraph = true; if (UIDToNode.size() == 0) minimizeGraph = false; /...
if(log.isDebugEnabled()) {
if(log.isWarnEnabled()) {
public Vector getNodeColors() { Vector nodeColors = new Vector(); Vector allNodes = vectorOfElements(GrappaConstants.NODE); for (int i = 0; i < allNodes.size(); i++) { Node node = (Node)allNodes.elementAt(i); Attribute attribute = node.getAttribute(COLOR_DETERMINER); if (attribute == null) { ...
if(log.isDebugEnabled()) { log.error("CSMARTGraph: " + e);
if(log.isErrorEnabled()) { log.error("CSMARTGraph: ", e);
private Vector getNodesByComparison(String attributeName, long value, int comparison) { Vector nodes = new Vector(); try { GraphEnumeration ge = elements(GrappaConstants.NODE); while (ge.hasMoreElements()) { Element e = ge.nextGraphElement(); String s = (String)e.getAttributeValue(attributeNa...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
private void hideEdges(Node node) { Enumeration inEdgeElements; Enumeration outEdgeElements; inEdgeElements = node.inEdgeElements(); // first, connect in-edges to out-edges using wider lines // but only add a new edge if both ends are visible GrappaStyle gs = new GrappaStyle(GrappaConstants.EDGE, "l...
outEdge.getHead() + " " + e);
outEdge.getHead() + " ", e);
private void hideEdges(Node node) { Enumeration inEdgeElements; Enumeration outEdgeElements; inEdgeElements = node.inEdgeElements(); // first, connect in-edges to out-edges using wider lines // but only add a new edge if both ends are visible GrappaStyle gs = new GrappaStyle(GrappaConstants.EDGE, "l...
if(log.isDebugEnabled()) { log.error("CSMARTGraph: Could not open file handle for " + dotPathname);
if(log.isErrorEnabled()) { log.error("CSMARTGraph: Could not open file handle for " + dotPathname, e);
private void layoutDotFile(String dotPathname, boolean minimizeGraph) { // Create a file handle for the dot file // This will be used later to get the size of the file File dotFile = null; try { dotFile = new File(dotPathname); } catch (NullPointerException e) { if(log.isDebugEnabled()) { ...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
private void layoutDotFile(String dotPathname, boolean minimizeGraph) { // Create a file handle for the dot file // This will be used later to get the size of the file File dotFile = null; try { dotFile = new File(dotPathname); } catch (NullPointerException e) { if(log.isDebugEnabled()) { ...
command + " " + ex.getMessage()); ex.printStackTrace(System.err);
command + " ", ex);
private void layoutDotFile(String dotPathname, boolean minimizeGraph) { // Create a file handle for the dot file // This will be used later to get the size of the file File dotFile = null; try { dotFile = new File(dotPathname); } catch (NullPointerException e) { if(log.isDebugEnabled()) { ...
if(log.isDebugEnabled()) { log.error("CSMARTGraph: Couldn't get from filter: " + e);
if(log.isErrorEnabled()) { log.error("CSMARTGraph: Couldn't get from filter: ", e);
private void layoutDotFile(String dotPathname, boolean minimizeGraph) { // Create a file handle for the dot file // This will be used later to get the size of the file File dotFile = null; try { dotFile = new File(dotPathname); } catch (NullPointerException e) { if(log.isDebugEnabled()) { ...
if(log.isDebugEnabled()) { log.error("CSMARTGraph: parser exception: " + ex.getMessage()); ex.printStackTrace();
if(log.isErrorEnabled()) { log.error("CSMARTGraph: parser exception: " + ex.getMessage(), ex);
private void layoutDotFile(String dotPathname, boolean minimizeGraph) { // Create a file handle for the dot file // This will be used later to get the size of the file File dotFile = null; try { dotFile = new File(dotPathname); } catch (NullPointerException e) { if(log.isDebugEnabled()) { ...
if(log.isDebugEnabled()) { log.error("Error closing special reader");
if(log.isErrorEnabled()) { log.error("Error closing special reader", io);
private void layoutDotFile(String dotPathname, boolean minimizeGraph) { // Create a file handle for the dot file // This will be used later to get the size of the file File dotFile = null; try { dotFile = new File(dotPathname); } catch (NullPointerException e) { if(log.isDebugEnabled()) { ...
if(log.isDebugEnabled()) {
if(log.isWarnEnabled()) {
private void layoutDotFile(String dotPathname, boolean minimizeGraph) { // Create a file handle for the dot file // This will be used later to get the size of the file File dotFile = null; try { dotFile = new File(dotPathname); } catch (NullPointerException e) { if(log.isDebugEnabled()) { ...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
private Node makeNode(NodeObject obj) { String UID = obj.getUID(); if (UIDToNode.get(UID) != null) return null; // don't make duplicates Node node = new Node(this, UID); UIDToNode.put(UID, node); if (!obj.isVisible()) { node.setAttribute(INVISIBLE_ATTRIBUTE, "true"); node.visible = false...
name + " " + e);
name + " ", e);
private Node makeNode(NodeObject obj) { String UID = obj.getUID(); if (UIDToNode.get(UID) != null) return null; // don't make duplicates Node node = new Node(this, UID); UIDToNode.put(UID, node); if (!obj.isVisible()) { node.setAttribute(INVISIBLE_ATTRIBUTE, "true"); node.visible = false...
if(log.isDebugEnabled()) {
if(log.isWarnEnabled()) {
private Node makeNode(NodeObject obj) { String UID = obj.getUID(); if (UIDToNode.get(UID) != null) return null; // don't make duplicates Node node = new Node(this, UID); UIDToNode.put(UID, node); if (!obj.isVisible()) { node.setAttribute(INVISIBLE_ATTRIBUTE, "true"); node.visible = false...
headNode.getName() + " " + e);
headNode.getName() + " ", e);
private Node makeNode(NodeObject obj) { String UID = obj.getUID(); if (UIDToNode.get(UID) != null) return null; // don't make duplicates Node node = new Node(this, UID); UIDToNode.put(UID, node); if (!obj.isVisible()) { node.setAttribute(INVISIBLE_ATTRIBUTE, "true"); node.visible = false...
node.getName() + " " + e);
node.getName() + " ", e);
private Node makeNode(NodeObject obj) { String UID = obj.getUID(); if (UIDToNode.get(UID) != null) return null; // don't make duplicates Node node = new Node(this, UID); UIDToNode.put(UID, node); if (!obj.isVisible()) { node.setAttribute(INVISIBLE_ATTRIBUTE, "true"); node.visible = false...
linkedToNode.getName() + " " + e);
linkedToNode.getName() + " ", e);
private Node makeNode(NodeObject obj) { String UID = obj.getUID(); if (UIDToNode.get(UID) != null) return null; // don't make duplicates Node node = new Node(this, UID); UIDToNode.put(UID, node); if (!obj.isVisible()) { node.setAttribute(INVISIBLE_ATTRIBUTE, "true"); node.visible = false...
if(log.isDebugEnabled()) {
if(log.isWarnEnabled()) {
public void resetColors() { for (int i = 0; i < markedElements.size(); i++) { Element element = (Element)markedElements.elementAt(i); if (element instanceof Edge) { element.setAttribute(GrappaConstants.COLOR_ATTR, "black"); } else if (element instanceof Node) { Node node = (Node)element; if (!node.v...
if(log.isDebugEnabled()) {
if(log.isWarnEnabled()) {
public void saveAsGraph() { JFileChooser jfc = new JFileChooser(System.getProperty("org.cougaar.install.path")); ExtensionFileFilter filter; String[] filters = { "dot" }; filter = new ExtensionFileFilter(filters, "dot files"); jfc.addChoosableFileFilter(filter); if (jfc.showSaveDialog(null) == JFile...
if(log.isDebugEnabled()) { log.error("CSMARTGraph: Can't get local host: " + e);
if(log.isErrorEnabled()) { log.error("CSMARTGraph: Can't get local host: ", e);
private void saveGraph(File outputFile) { if (outputFile == null) return; StringBuffer colorTable = new StringBuffer(500); // first, save colors as real colors Attribute ct = getAttribute(COLOR_TABLE); // if there's no color table, then give the COLOR_DETERMINER attributes // unique ids before ...
if(log.isDebugEnabled()) { log.error("CSMARTGraph: Could not write to file:" + e);
if(log.isErrorEnabled()) { log.error("CSMARTGraph: Could not write to file:", e);
private void saveGraph(File outputFile) { if (outputFile == null) return; StringBuffer colorTable = new StringBuffer(500); // first, save colors as real colors Attribute ct = getAttribute(COLOR_TABLE); // if there's no color table, then give the COLOR_DETERMINER attributes // unique ids before ...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
private void setupDotPath() { if (dotExecutable != null) return; // Win: x86, Linux: i386, Solaris: sparc String arch = (String)System.getProperty("os.arch"); // Win: Windows NT, Linux: Linux, Solaris: SunOS String os = (String)System.getProperty("os.name"); String[] dotNames = {"dot.exe", "dot...
if(log.isDebugEnabled()) {
if(log.isWarnEnabled()) {
private static Color stringToColor(String s) { StringTokenizer st = new StringTokenizer(s, ","); Logger log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.generic.CSMARTGraph"); if (st.countTokens() < 3) { if(log.isDebugEnabled()) { log.warn("CSMARTGraph: WARNING: Can't parse color: "...
if(log.isDebugEnabled()) { log.error("Exception parsing color string: " + e);
if(log.isErrorEnabled()) { log.error("Exception parsing color string: ", e);
private static Color stringToColor(String s) { StringTokenizer st = new StringTokenizer(s, ","); Logger log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.generic.CSMARTGraph"); if (st.countTokens() < 3) { if(log.isDebugEnabled()) { log.warn("CSMARTGraph: WARNING: Can't parse color: "...
if(log.isDebugEnabled()) { log.debug("ULPlanTableModel: attribute not found: " + name); }
private void addAttribute(String name) { Attribute a = node.getLocalAttribute(name); if (a == null) { if(log.isDebugEnabled()) { log.debug("ULPlanTableModel: attribute not found: " + name); } return; } names.addElement(name); values.addElement(a.getValue()); }
log.warn("Error relaoding class "+className+": " + t);
log.warn("Error reloading class "+className+": " + t);
public Class reloadClass(String className) { Class c = null; try { byte buffer[] = null; String fileName = className.replace('.', '/') + ".class"; InputStream in = null; File classFile = findClassFile(className); if...
boolean isWindows = !("/".equals(File.fileSeparator));
boolean isWindows = File.pathSeparatorChar == ';';
public void initialize() { if (initialized) { return; } log.info("initialize start"); initialized = true; if(WOApplication.application()!=null && WOApplication.application().isCachingEnabled()) { log.info("I assume this is deployment mode, rapid-turnaround mode is disable...
throw new SocketException("no network interface with this name exists");
return null;
public static NetworkInterface getByName(String name) throws SocketException { Vector networkInterfaces = getRealNetworkInterfaces(); for (Enumeration e = networkInterfaces.elements(); e.hasMoreElements();) { NetworkInterface tmp = (NetworkInterface) e.nextElement(); if (name.equals(tmp.getName())) r...
options.addOption("m2compatible", false, "use maven2 compatibility");
private static Options getOptions() { Option conf = OptionBuilder.withArgName( "conffile" ) .hasArg() .withDescription( "use given file for configuration" ) .create( "conf" ); Option cache = OptionBuilder.withArgName( "cachedir" ) .hasArg() .with...
ivy.configure(Ivy.class.getResource("ivyconf.xml"));
ivy.configureDefault();
public static void main(String[] args) throws Exception { Options options = getOptions(); CommandLineParser parser = new GnuParser(); try { // parse the command line arguments CommandLine line = parser.parse( options, args ); if (line.hasOpti...
public static DataBuffer createBuffer(int dataType, int size, int numBanks)
public static DataBuffer createBuffer(int dataType, Object data, int size)
public static DataBuffer createBuffer(int dataType, int size, int numBanks) { switch (dataType) { case DataBuffer.TYPE_BYTE: return new DataBufferByte(size, numBanks); case DataBuffer.TYPE_USHORT: return new DataBufferUShort(size, numBanks); case DataBuffer.TYPE_INT: return new DataBufferInt(s...
switch (dataType) { case DataBuffer.TYPE_BYTE: return new DataBufferByte(size, numBanks); case DataBuffer.TYPE_USHORT: return new DataBufferUShort(size, numBanks); case DataBuffer.TYPE_INT: return new DataBufferInt(size, numBanks); default: throw new UnsupportedOperationException(); }
if (data == null) return createBuffer(dataType, size, 1); return createBufferFromData(dataType, data, size);
public static DataBuffer createBuffer(int dataType, int size, int numBanks) { switch (dataType) { case DataBuffer.TYPE_BYTE: return new DataBufferByte(size, numBanks); case DataBuffer.TYPE_USHORT: return new DataBufferUShort(size, numBanks); case DataBuffer.TYPE_INT: return new DataBufferInt(s...
if (insertionTrackingLog.isDebugEnabled()) { insertionStackTrace = ERXUtilities.stackTrace(); insertionTrackingLog.debug("inserted "+getClass().getName()+" at "+insertionStackTrace); } else if (insertionTrackingLog.isInfoEnabled()) { insertionStackTrace = ERXUtilities.stackTrace(); }
public void awakeFromInsertion(EOEditingContext editingContext) { _checkEditingContextDelegate(editingContext); super.awakeFromInsertion(editingContext); }
if (validityMethods == null) { validityMethods = new Method[4]; Method m = methodInSharedGSVEngineInstanceWithName("validateEOObjectOnSave"); validityMethods[0] = m; m = methodInSharedGSVEngineInstanceWithName("validateEOObjectOnDelete"); validityMethods[1] = m; m = methodInSharedGSVEngineInstanceWithName("validateEO...
if (validityMethods == null) { validityMethods = new Method[4]; Method m = methodInSharedGSVEngineInstanceWithName("validateEOObjectOnSave"); validityMethods[0] = m; m = methodInSharedGSVEngineInstanceWithName("validateEOObjectOnDelete"); validityMethods[1] = m; m = methodInSharedGSVEngineInstanceWithName("validateEO...
private Method[] validityMethods() { if (validityMethods == null) { validityMethods = new Method[4]; Method m = methodInSharedGSVEngineInstanceWithName("validateEOObjectOnSave"); validityMethods[0] = m; m = methodInSharedGSVEngineInstanceWithName("validateEOObjectOnDelete"); ...
return validityMethods; }
private Method[] validityMethods() { if (validityMethods == null) { validityMethods = new Method[4]; Method m = methodInSharedGSVEngineInstanceWithName("validateEOObjectOnSave"); validityMethods[0] = m; m = methodInSharedGSVEngineInstanceWithName("validateEOObjectOnDelete"); ...
log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.generic");
createLogger();
public UIProperties() { log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.generic"); // define default properties Properties defaults = new Properties(); setDefaults(defaults); // define new properties from config file; default to defaults properties = new Properties(defaults); Confi...
avail--;
public int write (char[] inbuffer, int inpos, int inlength) { int start_pos = inpos; int avail = buf.length - count; for (;;) { if (avail == 0 || (inlength == 0 && bytes_todo == 0)) break; // The algorithm is made more complicated because we want to write // at least one byte in the output buffer, if...
if (resolver == null) { Message.debug("\tresolver not found: "+depMD.getResolverName()+" => trying to use default one for "+mrid); resolver = getDefaultResolver(); }
public ResolvedModuleRevision findModuleInCache(ModuleRevisionId mrid, File cache, boolean validate) { // first, check if it is in cache if (mrid.isExactRevision()) { File ivyFile = getIvyFileInCache(cache, mrid); if (ivyFile.exists()) { // found in cache ! ...
ModifiableComponent societyCopy = new SocietyFileComponent(name, filenames);
ModifiableComponent societyCopy;
public ModifiableComponent copy(String name) { ModifiableComponent societyCopy = new SocietyFileComponent(name, filenames); //societyCopy.initProperties(); for(int i=0; i < this.getChildCount(); i++) { societyCopy.addChild(this.getChild(i)); } return societyCopy; }
for(int i=0; i < this.getChildCount(); i++) { societyCopy.addChild(this.getChild(i)); }
if (filenames != null) societyCopy = new SocietyFileComponent(name, filenames); else societyCopy = new SocietyFileComponent(singleFilename, name); societyCopy.initProperties(); ((SocietyBase)societyCopy).setAssemblyId(getAssemblyId()); ((SocietyBase)societyCopy).saveToDatabase();
public ModifiableComponent copy(String name) { ModifiableComponent societyCopy = new SocietyFileComponent(name, filenames); //societyCopy.initProperties(); for(int i=0; i < this.getChildCount(); i++) { societyCopy.addChild(this.getChild(i)); } return societyCopy; }
String confirmConfigurationName=(String)d2wContext().valueForKey("confirmConfigurationName"); if(confirmConfigurationName!=null){ ConfirmPageInterface nextPage = (ConfirmPageInterface)D2W.factory().pageForConfigurationNamed(confirmConfigurationName,session());
String confirmDeleteConfigurationName=(String)d2wContext().valueForKey("confirmDeleteConfigurationName"); if(confirmDeleteConfigurationName!=null){ ConfirmPageInterface nextPage = (ConfirmPageInterface)D2W.factory().pageForConfigurationNamed(confirmDeleteConfigurationName,session());
public WOComponent deleteObjectAction() { // FIXME: Shouldn't ave a hard dependency on names here. String confirmConfigurationName=(String)d2wContext().valueForKey("confirmConfigurationName"); if(confirmConfigurationName!=null){ ConfirmPageInterface nextPage = (ConfirmPageInterface)D...
nextPage.setMessage("<B>Are you sure you want to delete the following "+d2wContext().valueForKey("displayNameForEntity")+"</B>:<br> "+object().userPresentableDescription()+ " ?");
nextPage.setMessage("Are you sure you want to delete the following "+d2wContext().valueForKey("displayNameForEntity")+":<br> "+object().userPresentableDescription()+ " ?");
public WOComponent deleteObjectAction() { // FIXME: Shouldn't ave a hard dependency on names here. String confirmConfigurationName=(String)d2wContext().valueForKey("confirmConfigurationName"); if(confirmConfigurationName!=null){ ConfirmPageInterface nextPage = (ConfirmPageInterface)D...
int result = bb.getInt ((position () >> 2) + offset);
int result = bb.getInt ((position () << 2) + offset);
public int get () { int result = bb.getInt ((position () >> 2) + offset); position (position () + 1); return result; }
bb.putInt ((position () >> 2) + offset, value);
bb.putInt ((position () << 2) + offset, value); position (position () + 1);
public IntBuffer put (int value) { bb.putInt ((position () >> 2) + offset, value); return this; }
public abstract int get ();
public IntBuffer get (int[] dst, int offset, int length) { for (int i = offset; i < offset + length; i++) { dst [i] = get (); } return this; }
public abstract int get ();
e.aconst_null(); e.invoke_static_this(SET_THREAD_CALLBACKS);
private void emitNewInstanceMultiarg(ClassEmitter ce, List constructors) { final CodeEmitter e = ce.begin_method(Constants.ACC_PUBLIC, MULTIARG_NEW_INSTANCE, null, null); e.load_arg(2); e.invoke_static_this(SET_THREAD_CALLBACKS); e.new_instance_this(); e.dup(); e.load_arg(0...
NSLog.setAllowedDebugLevel(NSLog.DebugLevelInformational);
public static void configureAdaptorContextRapidTurnAround(Object observer) { if (!_isConfigureAdaptorContextRapidTurnAround) { // This allows enabling from the log4j system. adaptorCategory = Category.getInstance("er.transaction.adaptor.EOAdaptorDebugEnabled"); sharedEOAdapto...
public void write(int ch) throws IOException
public void write(char[] buf, int offset, int count) throws IOException
public void write(int ch) throws IOException { synchronized (lock) { if (work == null) work = new char[100]; if (wcount >= work.length) { writeChars(work, 0, wcount); wcount = 0; } work[wcount++] = (char) ch; } }
if (work == null) work = new char[100]; if (wcount >= work.length)
if (wcount > 0)
public void write(int ch) throws IOException { synchronized (lock) { if (work == null) work = new char[100]; if (wcount >= work.length) { writeChars(work, 0, wcount); wcount = 0; } work[wcount++] = (char) ch; } }
work[wcount++] = (char) ch;
writeChars(buf, offset, count);
public void write(int ch) throws IOException { synchronized (lock) { if (work == null) work = new char[100]; if (wcount >= work.length) { writeChars(work, 0, wcount); wcount = 0; } work[wcount++] = (char) ch; } }
return s.objectForKey(key) != null ? ERXUtilities.booleanValue(s.objectForKey(key)) : defaultValue;
return s.objectForKey(key) != null ? ERXValueUtilities.booleanValue(s.objectForKey(key)) : defaultValue;
public static boolean booleanFlagOnSessionForKeyWithDefault(WOSession s, String key, boolean defaultValue) { return s.objectForKey(key) != null ? ERXUtilities.booleanValue(s.objectFor...
runMonitor();
if (NamedFrame.getNamedFrame().getToolFrame(SOCIETY_MONITOR) == null) runMonitor();
public void actionPerformed(ActionEvent e) { String s = ((AbstractButton)e.getSource()).getActionCommand(); if (s.equals(NEW_MENU_ITEM)) { newWorkspace(); } else if (s.equals(NEW_RESULTS_MENU_ITEM)) { setResultDir(); } else if (s.equals(EXIT_MENU_ITEM)) { exit(); } else if (s.equals(HELP...
if (!cc.isEditable()) { Object[] options = { "Edit", "View", "Copy", "Cancel" }; int result = JOptionPane.showOptionDialog(this, cc.getShortName() + " is not editable", "Not Editable", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); if (result == 0) { cc.setEditable(true); } else i...
public void runBuilder(ModifiableComponent cc, boolean alwaysNew) { if (!cc.isEditable()) { Object[] options = { "Edit", "View", "Copy", "Cancel" }; int result = JOptionPane.showOptionDialog(this, cc.getShortName() + " is not editable",...
if (experiment.isRunInProgress()) { Object[] options = { "View", "Copy", "Cancel" }; experiment = queryUser(experiment, options); } else if (!experiment.isEditable()) {
if (!experiment.isEditable()) {
public void runExperimentBuilder(Experiment experiment, boolean alwaysNew) { // if this experiment is being edited, then don't edit again if (isExperimentInEditor(experiment)) return; // if the experiment is being run, it can't be edited if (experiment.isRunInProgre...
HostComponent[] hosts = getRunningExperiment().getHosts(); String name = hosts[0].getShortName(); createTool(SOCIETY_MONITOR, CSMARTUL.class, name, null, null, null);
Experiment runningExperiment = null; String name = ""; if (runningExperiments.size() > 0) { runningExperiment = (Experiment)runningExperiments.get(0); name = runningExperiment.getExperimentName(); } Class[] paramClasses = { CSMART.class, Experiment.class }; Object[] params = new Object[2]; params[0] = this; params[1] =...
public void runMonitor() { HostComponent[] hosts = getRunningExperiment().getHosts(); String name = hosts[0].getShortName(); createTool(SOCIETY_MONITOR, CSMARTUL.class, name, null, null, null); }
return loaded;
return handleConfiguration(loaded, conf) && loaded;
public boolean loadData(String conf) { boolean loaded = _md != null; if (!isEvicted(_rootModuleConf) && hasConfigurationsToLoad() && !hasProblem()) { if (_md == null) { DependencyResolver resolver = _data.getIvy().getResolver(getModuleId()); try { ...
if ("*".equals(conf)) { if (_md != null) { _fetchedConfigurations.addAll(Arrays.asList(_md.getPublicConfigurationsNames())); _confsToFetch.clear(); addRootModuleConfigurations(_rootModuleConf, _md.getPublicConfigurationsNames()); } } else { if (_md != null) { Configuration c = _md.getConfiguration(conf); if (c == null)...
if (!handleConfiguration(loaded, conf)) { return false;
public boolean loadData(String conf) { boolean loaded = _md != null; if (!isEvicted(_rootModuleConf) && hasConfigurationsToLoad() && !hasProblem()) { if (_md == null) { DependencyResolver resolver = _data.getIvy().getResolver(getModuleId()); try { ...
if (!tabbedPane.getSelectedComponent().equals(hcb)) { globalCommandLineMenuItem.setEnabled(false); newHostMenuItem.setEnabled(false); newNodeMenu.setEnabled(false); commandLineMenuItem.setEnabled(false); describeHostMenuItem.setEnabled(false); describeNodeMenuItem.setEnabled(false); hostTypeMenuItem.setEnabled(false); ...
Component selectedComponent = tabbedPane.getSelectedComponent(); boolean communityEnabled = selectedComponent.equals(communityPanel); newCommunityMenuItem.setEnabled(communityEnabled); viewCommunityMenuItem.setEnabled(communityEnabled); boolean hcbEnabled = selectedComponent.equals(hcb); globalCommandLineMenuItem.setEn...
public void menuSelected(MenuEvent e) { // if host configuration builder not selected // disable all the menu commands for it if (!tabbedPane.getSelectedComponent().equals(hcb)) { globalCommandLineMenuItem.setEnabled(false); newHostMenuItem.setEnabled(false); newNod...
}
public void menuSelected(MenuEvent e) { // if host configuration builder not selected // disable all the menu commands for it if (!tabbedPane.getSelectedComponent().equals(hcb)) { globalCommandLineMenuItem.setEnabled(false); newHostMenuItem.setEnabled(false); newNod...
fileMenu.setToolTipText("Configure hosts and nodes, save, or quit");
fileMenu.setToolTipText("Configure communities, hosts and nodes, save, or quit"); communityPanel = new CommunityPanel(experiment); newCommunityMenuItem = new JMenuItem(communityPanel.newCommunityAction); fileMenu.add(newCommunityMenuItem); viewCommunityMenuItem = new JMenuItem(communityPanel.viewCommunityAction); file...
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,...
setSize(650, 400);
setSize(660, 600);
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,...
JOptionPane.showMessageDialog(null, errors.toString()); errors = null;
public ArrayList getAgentLocations() { Vector urls = CSMARTUL.getAgentURLs(); for (int i = 0; i < urls.size(); i++) { ArrayList results = getAgentLocations((String)urls.get(i)); if (results != null) return results; } return null; }
int last = index + MAXIMUM_INTEGER_DIGITS;
int last = index + maximumIntegerDigits; if (maximumFractionDigits > 0) last += maximumFractionDigits + 1; if (useExponentialNotation) last += minExponentDigits + 1;
public Number parse (String str, ParsePosition pos) { /* * Our strategy is simple: copy the text into separate buffers: one for the int part, * one for the fraction part and for the exponential part. * We translate or omit locale-specific information. * If exponential is sufficiently big we merg...
return context().directActionURLForActionNamed(d2wContext().dynamicPage(), null);
return context().directActionURLForActionNamed(d2wContext().dynamicPage(), null).replaceAll("&amp;", "&");
public String urlForCurrentState() { return context().directActionURLForActionNamed(d2wContext().dynamicPage(), null); }
log = CSMART.createLogger(this.getClass().getName());
public PropertyBuilder(ModifiableComponent mc) { // initialize menus and gui panels JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); JMenu fileMenu = new JMenu(FILE_MENU); saveMenuItem = new JMenuItem(SAVE_DB_MENU_ITEM); saveMenuItem.addActionListener(this); fileMenu.add(sav...
sqle.printStackTrace();
if(log.isErrorEnabled()) { log.error("Exception", sqle); }
private void saveToDatabase() { if (configComponent instanceof RecipeComponent) { try { RecipeComponent rc = (RecipeComponent) configComponent; PDbBase pdb = new PDbBase(); switch (pdb.recipeExists(rc)) { case PDbBase.RECIPE_STATUS_EXISTS: JOptionPane.showMessageDialog(thi...
Class clazz = method.getDeclaringClass();
protected void invoke(Method method) { Class clazz = method.getDeclaringClass(); if (method.getDeclaringClass().isInterface()) { invoke_interface(method); } else if (Modifier.isStatic(method.getModifiers())) { invoke_static(method); } else { invoke_virtua...
public String primaryKey() { return ERXExtensions.primaryKeyForObject(this); }
public String primaryKey() { return primaryKeyInTransaction(); }
public String primaryKey() { return ERXExtensions.primaryKeyForObject(this); }
configuration.getAttribute("src"), new WrapperComponentManager(super.m_manager));
configuration.getAttribute("src"), super.m_manager);
public void build(final Configuration configuration) throws ConfigurationException { try { m_src = VariableResolverFactory.getResolver( configuration.getAttribute("src"), new WrapperComponentManager(super.m_manager)); } catch (PatternException e) { final String ...
public LatLonPoint getPosition();
LatLonPoint getPosition();
public LatLonPoint getPosition();
for (int i = 0; i < newExperimentActions.length; i++) { newExperimentMenu.add(newExperimentActions[i]); newExperimentInFolderMenu.add(newExperimentActions[i]);
for (int i = 0; i < organizer.newExperimentActions.length; i++) { newExperimentMenu.add(organizer.newExperimentActions[i]); newExperimentInFolderMenu.add(organizer.newExperimentActions[i]);
public OrganizerMouseListener(Organizer organizer, OrganizerTree workspace) { this.organizer = organizer; this.workspace = workspace; // set up experiment submenus for (int i = 0; i < newExperimentActions.length; i++) { newExperimentMenu.add(newExperimentActions[i]); ...
for (int i = 0; i < newRecipeActions.length; i++) { newRecipeMenu.add(newRecipeActions[i]); newRecipeInFolderMenu.add(newRecipeActions[i]);
for (int i = 0; i < organizer.newRecipeActions.length; i++) { newRecipeMenu.add(organizer.newRecipeActions[i]); newRecipeInFolderMenu.add(organizer.newRecipeActions[i]);
public OrganizerMouseListener(Organizer organizer, OrganizerTree workspace) { this.organizer = organizer; this.workspace = workspace; // set up experiment submenus for (int i = 0; i < newExperimentActions.length; i++) { newExperimentMenu.add(newExperimentActions[i]); ...
String s = ((JMenuItem)c).getActionCommand(); ((JMenuItem)c).setEnabled(ActionUtil.isActionAllowed(s, organizer, true));
Action action = ((JMenuItem)c).getAction(); if (action != null) ActionUtil.setActionAllowed(action, organizer);
private void configureMenu(JPopupMenu menu) { int n = menu.getComponentCount(); for (int i = 0; i < n; i++) { Component c = menu.getComponent(i); if (c != null && c instanceof JMenuItem) { String s = ((JMenuItem)c).getActionCommand(); ((JMenuItem)c).setEnabled(ActionUtil.isActionAllowed(...
if (organizer.isNodeBeingEdited(selectedNode))
if (organizer.isNodeInUse(selectedNode))
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); DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode...
organizer.deleteExperiment();
organizer.delete();
public void actionPerformed(ActionEvent e) { organizer.deleteExperiment(); }
organizer.delete();
organizer.renameExperiment();
public void actionPerformed(ActionEvent e) { organizer.delete(); }
organizer.renameExperiment();
organizer.rename();
public void actionPerformed(ActionEvent e) { organizer.renameExperiment(); }
organizer.rename(); }
organizer.startBuilder(); }
public void actionPerformed(ActionEvent e) { organizer.rename(); }
organizer.startBuilder(); }
organizer.deleteRecipe(); }
public void actionPerformed(ActionEvent e) { organizer.startBuilder(); }
organizer.deleteRecipe();
organizer.renameRecipe();
public void actionPerformed(ActionEvent e) { organizer.deleteRecipe(); }
organizer.renameRecipe();
organizer.deleteFolder();
public void actionPerformed(ActionEvent e) { organizer.renameRecipe(); }
organizer.deleteFolder();
organizer.renameFolder();
public void actionPerformed(ActionEvent e) { organizer.deleteFolder(); }