rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
assetData.addPropertyGroup(createClusterPG()); assetData.addPropertyGroup(createItemIdentificationPG());
private ComponentData addAssetData(ComponentData data) { AgentAssetData assetData = new AgentAssetData((AgentComponentData)data); assetData.setType(AgentAssetData.ORG); assetData.setAssetClass("Org"); assetData.setUniqueID("UTC/RTOrg"); if(propRelations != null ) { for(int i=0; i < p...
System.out.println("Inserted " + plugin + " into " + data.getName());
public ComponentData addComponentData(ComponentData data) { if (this.getShortName().equals(data.getName())) { // Add the planserver plugin. GenericComponentData plugin = new GenericComponentData(); plugin.setType(ComponentData.PLUGIN); plugin.setName(planServer_name); plugin....
propAssetClass = addProperty(PROP_ASSETCLASS, PROP_ASSETCLASS_DFLT); propAssetClass.setToolTip(PROP_ASSETCLASS_DESC);
public void initProperties() { propName = addProperty(PROP_NAME, PROP_NAME_DFLT); propName.setToolTip(PROP_NAME_DESC); propClassName = addProperty(PROP_CLASSNAME, PROP_CLASSNAME_DFLT); propClassName.setToolTip(PROP_CLASSNAME_DESC);// propUIC = addProperty(PROP_UIC, PROP_UIC_DFLT);// propUIC.setToo...
aboutPanel.add(new JLabel("-D Options:"),
aboutPanel.add(new JLabel("-D Options (in CSMART):"),
public void displayAbout() { final ArrayList agentNames = (ArrayList)getPropertyValue(node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; // insets are top, left, bottom, right aboutPanel.add(new JLabel("Status:"), ...
aboutPanel.add(new JLabel("Agents:"),
aboutPanel.add(new JLabel("Agents (initial configuration):"),
public void displayAbout() { final ArrayList agentNames = (ArrayList)getPropertyValue(node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; // insets are top, left, bottom, right aboutPanel.add(new JLabel("Status:"), ...
JList agentsList = new JList(agentNames.toArray());
JList agentsList = null; if (agentNames == null) agentsList = new JList(); else agentsList = new JList(agentNames.toArray());
public void displayAbout() { final ArrayList agentNames = (ArrayList)getPropertyValue(node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; // insets are top, left, bottom, right aboutPanel.add(new JLabel("Status:"), ...
public ConsoleInternalFrame(NodeComponent node,
public ConsoleInternalFrame(String nodeName, String hostName, Properties properties, java.util.List args,
public ConsoleInternalFrame(NodeComponent node, ConsoleNodeListener listener, JScrollPane pane, JRadioButton statusButton, String logFileName, RemoteProcess remoteNode, ...
this.node = node;
this.nodeName = nodeName; this.hostName = hostName; this.properties = properties; this.args = args;
public ConsoleInternalFrame(NodeComponent node, ConsoleNodeListener listener, JScrollPane pane, JRadioButton statusButton, String logFileName, RemoteProcess remoteNode, ...
experiment = (Experiment)getPropertyValue(node, "Experiment"); HostComponent[] hosts = experiment.getHostComponents(); for (int i = 0; i < hosts.length; i++) { NodeComponent[] nodes = hosts[i].getNodes(); for (int j = 0; j < nodes.length; j++) { if (nodes[j].equals(node)) { host = hosts[i]; hostName = host.getShortName...
setTitle("Node " + nodeName + " (" + hostName + ")");
public ConsoleInternalFrame(NodeComponent node, ConsoleNodeListener listener, JScrollPane pane, JRadioButton statusButton, String logFileName, RemoteProcess remoteNode, ...
(ArrayList)((ArrayList)getPropertyValue(node, "AgentNames")).clone();
(ArrayList)console.getNodePropertyValue(nodeName, "AgentNames");
public void displayAbout() { // clone the agent names so we don't modify them when we add the NodeAgent ArrayList agentNames = (ArrayList)((ArrayList)getPropertyValue(node, "AgentNames")).clone(); if (agentNames == null) agentNames = new ArrayList(); // Add the NodeAgent as the first Agent in t...
else agentNames = (ArrayList)agentNames.clone();
public void displayAbout() { // clone the agent names so we don't modify them when we add the NodeAgent ArrayList agentNames = (ArrayList)((ArrayList)getPropertyValue(node, "AgentNames")).clone(); if (agentNames == null) agentNames = new ArrayList(); // Add the NodeAgent as the first Agent in t...
agentNames.add(0, node.getShortName());
agentNames.add(0, nodeName);
public void displayAbout() { // clone the agent names so we don't modify them when we add the NodeAgent ArrayList agentNames = (ArrayList)((ArrayList)getPropertyValue(node, "AgentNames")).clone(); if (agentNames == null) agentNames = new ArrayList(); // Add the NodeAgent as the first Agent in t...
aboutPanel.add(new JLabel((String)getPropertyValue(host, "MachineType")),
aboutPanel.add(new JLabel((String)console.getHostPropertyValue(hostName, "MachineType")),
public void displayAbout() { // clone the agent names so we don't modify them when we add the NodeAgent ArrayList agentNames = (ArrayList)((ArrayList)getPropertyValue(node, "AgentNames")).clone(); if (agentNames == null) agentNames = new ArrayList(); // Add the NodeAgent as the first Agent in t...
aboutPanel.add(new JLabel((String)getPropertyValue(host, "Location")),
aboutPanel.add(new JLabel((String)console.getHostPropertyValue(hostName, "Location")),
public void displayAbout() { // clone the agent names so we don't modify them when we add the NodeAgent ArrayList agentNames = (ArrayList)((ArrayList)getPropertyValue(node, "AgentNames")).clone(); if (agentNames == null) agentNames = new ArrayList(); // Add the NodeAgent as the first Agent in t...
aboutPanel.add(new JLabel((String)getPropertyValue(host, "Description")),
aboutPanel.add(new JLabel((String)console.getHostPropertyValue(hostName, "Description")),
public void displayAbout() { // clone the agent names so we don't modify them when we add the NodeAgent ArrayList agentNames = (ArrayList)((ArrayList)getPropertyValue(node, "AgentNames")).clone(); if (agentNames == null) agentNames = new ArrayList(); // Add the NodeAgent as the first Agent in t...
aboutPanel.add(new JLabel((String)getPropertyValue(node, "Description")),
aboutPanel.add(new JLabel((String)console.getNodePropertyValue(nodeName, "Description")),
public void displayAbout() { // clone the agent names so we don't modify them when we add the NodeAgent ArrayList agentNames = (ArrayList)((ArrayList)getPropertyValue(node, "AgentNames")).clone(); if (agentNames == null) agentNames = new ArrayList(); // Add the NodeAgent as the first Agent in t...
Properties properties = console.getNodeMinusD(node, hostName);
public void displayAbout() { // clone the agent names so we don't modify them when we add the NodeAgent ArrayList agentNames = (ArrayList)((ArrayList)getPropertyValue(node, "AgentNames")).clone(); if (agentNames == null) agentNames = new ArrayList(); // Add the NodeAgent as the first Agent in t...
JTextArea args = new JTextArea(5, 40); Properties props = node.getArguments(); String commandArguments = props.getProperty(CSMARTConsole.COMMAND_ARGUMENTS); if (commandArguments == null) commandArguments = ""; args.setText(commandArguments); JScrollPane jspArgs = new JScrollPane(args);
JScrollPane jspArgs = new JScrollPane(new JList(args.toArray()));
public void displayAbout() { // clone the agent names so we don't modify them when we add the NodeAgent ArrayList agentNames = (ArrayList)((ArrayList)getPropertyValue(node, "AgentNames")).clone(); if (agentNames == null) agentNames = new ArrayList(); // Add the NodeAgent as the first Agent in t...
"Information: " + node.getShortName() +
"Information: " + nodeName +
public void displayAbout() { // clone the agent names so we don't modify them when we add the NodeAgent ArrayList agentNames = (ArrayList)((ArrayList)getPropertyValue(node, "AgentNames")).clone(); if (agentNames == null) agentNames = new ArrayList(); // Add the NodeAgent as the first Agent in t...
ComponentData societyComponentData = experiment.getSocietyComponentData(); if (societyComponentData == null) { if(log.isWarnEnabled()) { log.warn("ConsoleInternalFrame: Need to save experiment"); }
ArrayList entries = console.getAgentComponentDescriptions(nodeName, agentName); if (entries == null)
private void displayPlugins(String agentName) { ComponentData societyComponentData = experiment.getSocietyComponentData(); if (societyComponentData == null) { if(log.isWarnEnabled()) { log.warn("ConsoleInternalFrame: Need to save experiment"); } return; } ComponentData[] children = s...
} ComponentData[] children = societyComponentData.getChildren(); ComponentData nodeComponentData = null; for (int i = 0; i < children.length; i++) { if (children[i].getType().equals(ComponentData.HOST)) { ComponentData[] nodes = children[i].getChildren(); for (int j = 0; j < nodes.length; j++) { if (nodes[j].getName()....
private void displayPlugins(String agentName) { ComponentData societyComponentData = experiment.getSocietyComponentData(); if (societyComponentData == null) { if(log.isWarnEnabled()) { log.warn("ConsoleInternalFrame: Need to save experiment"); } return; } ComponentData[] children = s...
RemoteProcess newRemoteNode = console.restartNode(node);
RemoteProcess newRemoteNode = console.restartNode(nodeName);
private void restart_actionPerformed() { startAction.setEnabled(false); RemoteProcess newRemoteNode = console.restartNode(node); if (newRemoteNode != null) { remoteNode = newRemoteNode; stopAction.setEnabled(true); } }
console.stopNode(node);
console.stopNode(nodeName);
private void stop_actionPerformed() { stopAction.setEnabled(false); console.stopNode(node); }
if(cat.isDebugEnabled()) cat.debug("The batch index is being set to :"+0); displayGroup().setCurrentBatchIndex(0);
if(cat.isDebugEnabled()) cat.debug("The batch index is being set to : "+ 1); displayGroup().setCurrentBatchIndex(1);
public void setNumberOfObjectsPerBatch(Number newValue) { if (newValue!=null) { if (displayGroup()!=null) { cat.debug("Setting db # of objects per batch to "+newValue); displayGroup().setNumberOfObjectsPerBatch(newValue.intValue()); // For some strange ...
rule.getProperty(ABCAllocationRule.PROP_TASKVERB).setValue(new String[0]);
private void updateAllocationRuleCount(Long newCount) { long count = newCount.longValue(); if(count == 0) { // Remove all allocation rules. while(getChildCount() != 0) { removeChild(getChildCount() -1); } } else if( count > getChildCount() ) { long newRules = count - getChildCount(); ...
return res.getName().endsWith(".pom") || "pom.xml".equals(res.getName()) || "project.xml".equals(res.getName());
return res.getName().endsWith(".pom") || res.getName().endsWith("pom.xml") || res.getName().endsWith("project.xml");
public boolean accept(Resource res) { return res.getName().endsWith(".pom") || "pom.xml".equals(res.getName()) || "project.xml".equals(res.getName()); }
final GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());
final GLCanvas canvas = new GLCanvas();
public static void main(String[] args) { final GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); HWShadowmapsSimple demo = new HWShadowmapsSimple(); canvas.addGLEventListener(demo); demo.setDemoListener(new DemoListener() { public void shutdownDemo() { ...
NSMutableDictionary dict = AjaxUtils.mutableUserInfo(context.response()); dict.takeValueForKey(AjaxUtils.DONT_STORE_PAGE, AjaxUtils.DONT_STORE_PAGE);
AjaxUtils.updateMutableUserInfoWithAjaxInfo(context.response());
public static void updateMutableUserInfoWithAjaxInfo(WOContext context) { NSMutableDictionary dict = AjaxUtils.mutableUserInfo(context.response()); dict.takeValueForKey(AjaxUtils.DONT_STORE_PAGE, AjaxUtils.DONT_STORE_PAGE); }
return (released || !channel ().isOpen ());
return !channel().isOpen();
public boolean isValid () { return (released || !channel ().isOpen ()); }
released = true;
public synchronized void release () throws IOException { releaseImpl (); released = true; }
Message.verbose("trace found MD : " + rmr.getDescriptor().isDefault());
public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data) throws ParseException { dd = fromSystem(dd); clearIvyAttempts(); boolean downloaded = false; boolean searched = false; Date cachedPublicationDate = null; ModuleRevisionId mrid = d...
Message.verbose("\t"+getName()+": revision already resolved: "+resolvedMrid); return toSystem(searchedRmr(node.getModuleRevision()));
if (node.getDescriptor() != null && node.getDescriptor().isDefault()) { Message.verbose("\t"+getName()+": found already resolved revision: "+resolvedMrid+": but it's a default one, maybe we can find a better one"); } else { Message.verbose("\t"+getName()+": revision already resolved: "+resolvedMrid); return toSystem(se...
public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data) throws ParseException { dd = fromSystem(dd); clearIvyAttempts(); boolean downloaded = false; boolean searched = false; Date cachedPublicationDate = null; ModuleRevisionId mrid = d...
CharBuffer a = (CharBuffer) obj;
CharBuffer other = (CharBuffer) obj;
public int compareTo (Object obj) { CharBuffer a = (CharBuffer) obj; if (a.remaining () != remaining ()) return 1; if (! hasArray () || ! a.hasArray ()) { return 1; } int r = remaining (); int i1 = position (); int i2 = a.position (); for (int i = 0; i < r; i++) ...
if (a.remaining () != remaining ()) return 1; if (! hasArray () || ! a.hasArray ())
int num = Math.min(remaining(), other.remaining()); int pos_this = position(); int pos_other = other.position(); for (int count = 0; count < num; count++)
public int compareTo (Object obj) { CharBuffer a = (CharBuffer) obj; if (a.remaining () != remaining ()) return 1; if (! hasArray () || ! a.hasArray ()) { return 1; } int r = remaining (); int i1 = position (); int i2 = a.position (); for (int i = 0; i < r; i++) ...
return 1;
char a = get(pos_this++); char b = other.get(pos_other++); if (a == b) continue; if (a < b) return -1; return 1;
public int compareTo (Object obj) { CharBuffer a = (CharBuffer) obj; if (a.remaining () != remaining ()) return 1; if (! hasArray () || ! a.hasArray ()) { return 1; } int r = remaining (); int i1 = position (); int i2 = a.position (); for (int i = 0; i < r; i++) ...
int r = remaining (); int i1 = position (); int i2 = a.position (); for (int i = 0; i < r; i++) { int t = (int) (get (i1) - a.get (i2)); if (t != 0) { return (int) t; } } return 0;
return remaining() - other.remaining();
public int compareTo (Object obj) { CharBuffer a = (CharBuffer) obj; if (a.remaining () != remaining ()) return 1; if (! hasArray () || ! a.hasArray ()) { return 1; } int r = remaining (); int i1 = position (); int i2 = a.position (); for (int i = 0; i < r; i++) ...
super.addNotify ();
public void addNotify () { if (peer == null) peer = getToolkit ().createLabel (this); }
return log1;
return log;
public ERXLogger getClassLog() { ERXLogger log = (ERXLogger)classLogs.objectForKey(this.getClass()); if ( log == null) { synchronized(classLogs) { log = ERXLogger.getERXLogger(this.getClass()); classLogs.setObjectForKey(log, this.getClass()); } ...
_messageEncoding = browser().messageEncodingForLanguage(_localizer.language());
if (browser()!= null) { _messageEncoding = browser().messageEncodingForLanguage(_localizer.language()); }
public void setLanguage(String language) { ERXLocalizer newLocalizer = ERXLocalizer.localizerForLanguage(language); if (! newLocalizer.equals(_localizer)) { if (_localizer == null && ! WOApplication.application().isCachingEnabled()) observer().registerForLocalizationDidRes...
defaultEditingContext().setSharedEditingContext(null); if (_observer != null) NSNotificationCenter.defaultCenter().removeObserver(_observer); if (_browser != null) ERXBrowserFactory.factory().releaseBrowser(_browser);
public void terminate() { // WOFIX: 5.1.2 // work around a bug in WO 5.1.2 where the sessions EC will keep a lock on the SEC defaultEditingContext().setSharedEditingContext(null); if (_observer != null) NSNotificationCenter.defaultCenter().removeObserver(_observer); if...
if(model() == notification.object()) {
if(_model == notification.object()) {
public void rebuildModel(NSNotification notification) { if(model() == notification.object()) { _currentZCriteria.removeAllObjects(); _initializedDimensionArrayFromBindings = false; _model = null; log.info("Rebuild model"); } }
System.arraycopy(buf.toString().toCharArray(), where, txt.array, 0, len); txt.count = len; txt.offset = 0;
if ((where < gapStart) && ((gapStart - where) < len)) { char[] copy = new char[len]; int lenFirst = gapStart - where; System.arraycopy(buffer, where, copy, 0, lenFirst); System.arraycopy(buffer, gapEnd, copy, lenFirst, len - lenFirst); txt.array = copy; txt.offset = 0; txt.count = len; } else { txt.array = buffer; i...
public void getChars(int where, int len, Segment txt) throws BadLocationException { txt.array = new char[len]; System.arraycopy(buf.toString().toCharArray(), where, txt.array, 0, len); txt.count = len; txt.offset = 0; }
try { return fc.getIndex(method.getName(), method.getParameterTypes()); } catch (Error e) { System.err.println("Caught error " + e + " LOOKING UP INDEX name=" + method.getName() + " types=" + java.util.Arrays.asList(method.getParameterTypes()) + " in class " + fc.getClass().getName()); throw e;
int index = fc.getIndex(method.getName(), method.getParameterTypes()); if (index < 0) { Class[] types = method.getParameterTypes(); System.err.println("hash=" + method.getName().hashCode() + " size=" + types.length); for (int i = 0; i < types.length; i++) { System.err.println(" types[" + i + "]=" + types[i].getName())...
private static int helper(FastClass fc, Method method) { try { return fc.getIndex(method.getName(), method.getParameterTypes()); } catch (Error e) { System.err.println("Caught error " + e + " LOOKING UP INDEX name=" + method.getName() + " types=" + java.util.Arrays.asList(method....
return index;
private static int helper(FastClass fc, Method method) { try { return fc.getIndex(method.getName(), method.getParameterTypes()); } catch (Error e) { System.err.println("Caught error " + e + " LOOKING UP INDEX name=" + method.getName() + " types=" + java.util.Arrays.asList(method....
hcb.findNode();
hcb.findHost();
public void actionPerformed(ActionEvent e) { hcb.findNode(); }
hcb.findAgent();
hcb.findNode();
public void actionPerformed(ActionEvent e) { hcb.findAgent(); }
URL help = (URL)this.getClass().getResource(ABOUT_DOC);
URL help = null; try { File f = new File(PROPERTIES_DOC); if (f.exists()) help = f.toURI().toURL(); } catch (IllegalArgumentException iae) { } catch (MalformedURLException mue) { }
public void actionPerformed(ActionEvent e) { URL help = (URL)this.getClass().getResource(ABOUT_DOC); if (help != null) Browser.setPage(help); }
save();
URL help = (URL)this.getClass().getResource(ABOUT_DOC); if (help != null) Browser.setPage(help);
public void actionPerformed(ActionEvent e) { save(); }
saveAs();
save();
public void actionPerformed(ActionEvent e) { saveAs(); }
dumpINIs(); }
saveAs(); }
public void actionPerformed(ActionEvent e) { dumpINIs(); }
dumpHNA();
dumpINIs();
public void actionPerformed(ActionEvent e) { dumpHNA(); }
hcb.findHost();
exit(); NamedFrame.getNamedFrame().removeFrame(ExperimentBuilder.this); dispose();
public void actionPerformed(ActionEvent e) { hcb.findHost(); }
hcb.setGlobalCommandLine(); }
hcb.findAgent(); }
public void actionPerformed(ActionEvent e) { hcb.setGlobalCommandLine(); }
hcb.createHost();
hcb.setGlobalCommandLine();
public void actionPerformed(ActionEvent e) { hcb.createHost(); }
hcb.createUnassignedNode();
hcb.createHost();
public void actionPerformed(ActionEvent e) { hcb.createUnassignedNode(); }
hcb.createAssignedNode();
hcb.createUnassignedNode();
public void actionPerformed(ActionEvent e) { hcb.createAssignedNode(); }
hcb.setNodeCommandLine();
hcb.createAssignedNode();
public void actionPerformed(ActionEvent e) { hcb.setNodeCommandLine(); }
hcb.setHostDescription();
hcb.setNodeCommandLine();
public void actionPerformed(ActionEvent e) { hcb.setHostDescription(); }
hcb.setNodeDescription();
hcb.setHostDescription();
public void actionPerformed(ActionEvent e) { hcb.setNodeDescription(); }
hcb.setHostType();
hcb.setNodeDescription();
public void actionPerformed(ActionEvent e) { hcb.setHostType(); }
hcb.setHostLocation();
hcb.setHostType();
public void actionPerformed(ActionEvent e) { hcb.setHostLocation(); }
hcb.deleteHost();
hcb.setHostLocation();
public void actionPerformed(ActionEvent e) { hcb.deleteHost(); }
hcb.deleteNode();
hcb.deleteHost();
public void actionPerformed(ActionEvent e) { hcb.deleteNode(); }
dragDividerTo(adjust(x, y));
dragDividerTo(adjust(newX, newY));
protected void continueDrag(int newX, int newY) { if (isValid()) dragDividerTo(adjust(x, y)); }
;
protected int positionForMouseEvent(MouseEvent e) { return e.getX() + getX() - offset; ; }
throw new IllegalArgumentException("value may not be less then 0");
throw new IllegalArgumentException("value may not be less than 0");
public JobMediaSheets(int value) { super(value); if (value < 0) throw new IllegalArgumentException("value may not be less then 0"); }
log = CSMART.createLogger("org.cougaar.tools.csmart.experiment");
createLogger();
public ExperimentHost(String hostName) { super(hostName); log = CSMART.createLogger("org.cougaar.tools.csmart.experiment"); }
if(entity.className().equals("ERXGenericRecord")) clazz = new ERXGenericRecord.ERXGenericRecordClazz(); else clazz = new EOGenericRecordClazz();
return new EOGenericRecordClazz();
private static EOGenericRecordClazz classFromEntity(EOEntity entity) { EOGenericRecordClazz clazz = null; if(entity == null) { if(entity.className().equals("ERXGenericRecord")) clazz = new ERXGenericRecord.ERXGenericRecordClazz(); else clazz = new EO...
clazz = (EOGenericRecordClazz)Class.forName(className + "$" + entity.name() + "Clazz").newInstance();
if(className.equals("ERXGenericRecord")) clazz = new ERXGenericRecord.ERXGenericRecordClazz(); else clazz = (EOGenericRecordClazz)Class.forName(className + "$" + entity.name() + "Clazz").newInstance();
private static EOGenericRecordClazz classFromEntity(EOEntity entity) { EOGenericRecordClazz clazz = null; if(entity == null) { if(entity.className().equals("ERXGenericRecord")) clazz = new ERXGenericRecord.ERXGenericRecordClazz(); else clazz = new EO...
ResultSet rschck = executeQuery(stmt, dbp.getQuery("checkAttribute", substitutions));
String checkQuery = dbp.getQuery("checkAttribute", substitutions); if (log.isDebugEnabled()) log.debug("Checking for PG Attr entry query: " + checkQuery); ResultSet rschck = executeQuery(stmt, checkQuery);
private void populateAgent(ComponentData data, boolean isAdded) throws SQLException { if(log.isDebugEnabled()) { log.debug("populating Agent: " + data.getName()); } AgentAssetData assetData = data.getAgentAssetData(); if (assetData == null) return; substitutions.put(":agent_org_class:", sqlQ...
executeUpdate(dbp.getQuery("insertAttribute", substitutions));
String insertQuery = dbp.getQuery("insertAttribute", substitutions); if (log.isDebugEnabled()) log.debug("InsertPGAttr query: " + insertQuery); executeUpdate(insertQuery);
private void populateAgent(ComponentData data, boolean isAdded) throws SQLException { if(log.isDebugEnabled()) { log.debug("populating Agent: " + data.getName()); } AgentAssetData assetData = data.getAgentAssetData(); if (assetData == null) return; substitutions.put(":agent_org_class:", sqlQ...
if(!show && propRelations != null && propRelations.length > 0) { for(int i=0; i < propRelations.length; i++) { removeProperty(propRelations[i]); removeProperty(propRoles[i]); } }
private void updateOrgParameters(String val) { boolean show = (val.equals(TRUE)) ? true : false; setPropertyVisible(propRelationCount, show); setPropertyVisible(propAssetClass, show); setPropertyVisible(propNomenclature, show); setPropertyVisible(propType, show); setPropertyVisible(propAltTypeId, sh...
String userHome = filteringProperties.getProperty("user.home"); if (userHome != null) { forrestPropertiesStringURI = userHome + SystemUtils.FILE_SEPARATOR + "forrest.properties.xml"; filteringProperties = loadXMLPropertiesFromURI(filteringProperties, forrestPropertiesStringURI); } String globalHome = filteringPropert...
public void initialize() throws Exception { // add all homes important to forrest to the properties setHomes(); // NOTE: the first values set get precedence, as in AntProperties String forrestPropertiesStringURI; // get the values from local.forrest.properties.xml try { ...
forrestPropertiesStringURI = projectHome + SystemUtils.FILE_SEPARATOR + "forrest.properties"; filteringProperties = loadAntPropertiesFromURI(filteringProperties, forrestPropertiesStringURI); String defaultForrestPropertiesStringURI = contextHome + SystemUtils.FILE_SEPARATOR + "default-forrest.properties"; filteringPr...
String strPluginList = filteringProperties.getProperty("project.required.plugins"); if (strPluginList != null) { StringTokenizer st = new StringTokenizer(strPluginList, ","); while (st.hasMoreTokens()) { forrestPropertiesStringURI = ForrestConfUtils.getPluginDir(st.nextToken().trim());
public void initialize() throws Exception { // add all homes important to forrest to the properties setHomes(); // NOTE: the first values set get precedence, as in AntProperties String forrestPropertiesStringURI; // get the values from local.forrest.properties.xml try { ...
}
public void initialize() throws Exception { // add all homes important to forrest to the properties setHomes(); // NOTE: the first values set get precedence, as in AntProperties String forrestPropertiesStringURI; // get the values from local.forrest.properties.xml try { ...
loadSystemProperties(filteringProperties); ForrestConfUtils.aliasSkinProperties(filteringProperties); if (debugging()) debug("Loaded project properties:" + filteringProperties);
ForrestConfUtils.aliasSkinProperties(filteringProperties); if (debugging()) debug("Loaded project properties:" + filteringProperties);
public void initialize() throws Exception { // add all homes important to forrest to the properties setHomes(); // NOTE: the first values set get precedence, as in AntProperties String forrestPropertiesStringURI; // get the values from local.forrest.properties.xml try { ...
for (Enumeration e = props.propertyNames(); e.hasMoreElements();) {
for (Enumeration e = System.getProperties().propertyNames(); e.hasMoreElements();) {
private void loadSystemProperties(AntProperties props) { for (Enumeration e = props.propertyNames(); e.hasMoreElements();) { String propName = (String) e.nextElement(); String systemPropValue = System.getProperty(propName); if (systemPropValue != null) { // Ant...
String systemPropValue = System.getProperty(propName); if (systemPropValue != null) { props.remove(propName); props.setProperty(propName, systemPropValue);
if (propName.startsWith("forrest.") || propName.startsWith("project.") || propName.endsWith(".home")) { String systemPropValue = System.getProperty(propName); if (systemPropValue != null) { props.setProperty(propName, systemPropValue); }
private void loadSystemProperties(AntProperties props) { for (Enumeration e = props.propertyNames(); e.hasMoreElements();) { String propName = (String) e.nextElement(); String systemPropValue = System.getProperty(propName); if (systemPropValue != null) { // Ant...
if (colorDescriptions == null) { colorDescriptions = new Hashtable(); colorDescriptions.put(CSMARTConsole.busyStatus, "extremely busy"); colorDescriptions.put(CSMARTConsole.highBusyStatus, "very busy"); colorDescriptions.put(CSMARTConsole.mediumHighBusyStatus, "busy"); colorDescriptions.put(CSMARTConsole.mediumBusyStat...
public ConsoleNodeListener(CSMARTConsole console, NodeComponent nodeComponent, String logFileName, JRadioButton statusButton, ConsoleTextPane textPane) throws IOException { this.console = console; this.nodeComponent = nodeComponent; nodeName = nodeComponent.t...
s = s.substring(0, index+1) + (String)colorDescriptions.get(statusColor);
s = s.substring(0, index+1) + CSMARTConsole.getStatusColorDescription(statusColor);
private void colorStatusButton(Color statusColor) { if (!haveError) { statusButton.setIcon(new ColoredCircle(statusColor, 20)); statusButton.setSelectedIcon(new SelectedColoredCircle(statusColor, 20)); String s = statusButton.getToolTipText((java.awt.event.MouseEvent)null); int index = s.lastIn...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
private String findInLeaf(ComponentData me, String filename) { if (me.leafCount() < 1) return null; LeafComponentData[] leaves = me.getLeafComponents(); for (int i = 0; i < me.leafCount(); i++) { LeafComponentData leaf = leaves[i]; if (leaf == null) continue; if (!leaf.getType().equals(Le...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
private Collection getLeafNames(ComponentData me) { ArrayList files = new ArrayList(); if (me.leafCount() < 1) return null; LeafComponentData[] leaves = me.getLeafComponents(); for (int i = 0; i < me.leafCount(); i++) { LeafComponentData leaf = leaves[i]; if (leaf == null) continue; if...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
private void writeLeafData(File configDir, ComponentData me) throws IOException { if (me.leafCount() < 1) return; LeafComponentData[] leaves = me.getLeafComponents(); for (int i = 0; i < me.leafCount(); i++) { LeafComponentData leaf = leaves[i]; if (leaf == null) continue; if (!leaf.getTy...
removeMenuBarPeer(menuBar);
removeMenuBarPeer();
public void setMenuBar (MenuBar bar) { if (bar == null) { if (menuBar != null) { removeMenuBarPeer(menuBar); menuBar = null; moveLayout(menuBarHeight); insets.top -= menuBarHeight; menuBarHeight = 0; awtComponent.doLayout(); } } else ...
log = CSMART.createLogger("org.cougaar.tools.csmart.core.db");
createLogger();
public PDbBase() throws SQLException, IOException { log = CSMART.createLogger("org.cougaar.tools.csmart.core.db"); if (logQueries) pwlog = new PrintWriter(new FileWriter(getLogName())); dbp = DBProperties.readQueryFile(QUERY_FILE); try { dbp.addQueryFile(Rec...
createLogger();
appServers = new AppServerList(); if (experiment != null) getAppServersFromExperiment();
public CSMARTConsole(CSMART csmart, Experiment experiment) { this.csmart = csmart; this.experiment = experiment; console = this; currentTrial = -1; remoteHostRegistry = RemoteHostRegistry.getInstance(); runningNodes = new Hashtable(); oldNodes = new ArrayList(); nodeListeners = new Hashtable()...
ArrayList appServers = getAppServers(); if (appServers == null || appServers.size() == 0)
if (appServers.size() == 0)
private void attachButton_actionPerformed() { attachButton.setSelected(false); ArrayList appServers = getAppServers(); if (appServers == null || appServers.size() == 0) return; Hashtable nodeToAppServer = getProcessDescriptions(appServers); Set pds = nodeToAppServer.keySet(); ProcessDescription...
Hashtable nodeToAppServer = getProcessDescriptions(appServers);
Hashtable nodeToAppServer = getProcessDescriptions();
private void attachButton_actionPerformed() { attachButton.setSelected(false); ArrayList appServers = getAppServers(); if (appServers == null || appServers.size() == 0) return; Hashtable nodeToAppServer = getProcessDescriptions(appServers); Set pds = nodeToAppServer.keySet(); ProcessDescription...
ProcessDescription[] attachToNodes = getNodesToAttach((ProcessDescription[])pds.toArray(new ProcessDescription[pds.size()]));
if (pds.size() == 0) return; ProcessDescription[] attachToNodes = getNodesToAttach(new ArrayList(pds));
private void attachButton_actionPerformed() { attachButton.setSelected(false); ArrayList appServers = getAppServers(); if (appServers == null || appServers.size() == 0) return; Hashtable nodeToAppServer = getProcessDescriptions(appServers); Set pds = nodeToAppServer.keySet(); ProcessDescription...
if (nodeCreator == null) return; addStatusButton(nci.statusButton); ConsoleInternalFrame frame = new ConsoleInternalFrame(nci.nodeName, nci.hostName, nci.properties, nci.args, (ConsoleNodeListener)nci.listener, nci.scrollPane, nci.statusButton, nci.logFileName, remoteNode, console); frame.addInternalFrameListener(new N...
createNodes(); starting = false; boolean reset = false; synchronized (runningNodesLock) { if (runningNodes.isEmpty()) reset = true; } if (reset) { SwingUtilities.invokeLater(new Runnable() { public void run() { runButton.setSelected(false); runButton.setEnabled(true); unsetTrialValues(); currentTrial--; } }); } else {...
public void run() { // don't create gui controls if node creation has been stopped if (nodeCreator == null) return; addStatusButton(nci.statusButton); ConsoleInternalFrame frame = new ConsoleInternalFrame(nci.nodeName, ...
} }
public void run() { // don't create gui controls if node creation has been stopped if (nodeCreator == null) return; addStatusButton(nci.statusButton); ConsoleInternalFrame frame = new ConsoleInternalFrame(nci.nodeName, ...
private ArrayList getAppServersFromExperiment() { ArrayList appServers = new ArrayList();
private void getAppServersFromExperiment() {
private ArrayList getAppServersFromExperiment() { ArrayList appServers = new ArrayList(); HostComponent[] hosts = experiment.getHostComponents(); for (int i = 0; i < hosts.length; i++) { String hostName = hosts[i].getShortName(); NodeComponent[] nodes = hosts[i].getNodes(); for (int j = 0; j <...
appServers.add(appServer);
appServers.add(new AppServerDescription(appServer, hostName, remotePort));
private ArrayList getAppServersFromExperiment() { ArrayList appServers = new ArrayList(); HostComponent[] hosts = experiment.getHostComponents(); for (int i = 0; i < hosts.length; i++) { String hostName = hosts[i].getShortName(); NodeComponent[] nodes = hosts[i].getNodes(); for (int j = 0; j <...
return appServers;
private ArrayList getAppServersFromExperiment() { ArrayList appServers = new ArrayList(); HostComponent[] hosts = experiment.getHostComponents(); for (int i = 0; i < hosts.length; i++) { String hostName = hosts[i].getShortName(); NodeComponent[] nodes = hosts[i].getNodes(); for (int j = 0; j <...
private ProcessDescription[] getNodesToAttach(ProcessDescription[] nodes) { JList nodeList = new JList(nodes); JScrollPane jsp = new JScrollPane(nodeList, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); jsp.setPreferredSize(new Dimension(400, 100)); JPanel infoPanel = ne...
private ProcessDescription[] getNodesToAttach(ArrayList nodes) { Object[] selected = Util.getObjectsFromList(this, nodes, "Attach to Nodes", "Select Nodes:"); if (selected != null) {
private ProcessDescription[] getNodesToAttach(ProcessDescription[] nodes) { JList nodeList = new JList(nodes); JScrollPane jsp = new JScrollPane(nodeList, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); jsp.setPr...
private Hashtable getProcessDescriptions(ArrayList appServers) {
private Hashtable getProcessDescriptions() {
private Hashtable getProcessDescriptions(ArrayList appServers) { Hashtable nodeToAppServer = new Hashtable(); for (int i = 0; i < appServers.size(); i++) { RemoteHost appServer = (RemoteHost)appServers.get(i); java.util.List someNodes = null; try { someNodes = appServer.listProcessDescript...
RemoteHost appServer = (RemoteHost)appServers.get(i);
AppServerDescription desc = (AppServerDescription)appServers.get(i); RemoteHost appServer = desc.appServer;
private Hashtable getProcessDescriptions(ArrayList appServers) { Hashtable nodeToAppServer = new Hashtable(); for (int i = 0; i < appServers.size(); i++) { RemoteHost appServer = (RemoteHost)appServers.get(i); java.util.List someNodes = null; try { someNodes = appServer.listProcessDescript...
menuBar.add(appServerMenu);
private void initGui() { String description = ""; if (experiment != null) { experiment.setRunInProgress(true); experiment.setResultDirectory(csmart.getResultDir()); description = experiment.getSocietyComponent().getSocietyName(); } // top level menus JMenu fileMenu = new JMenu(FILE_MENU)...
URL help = (URL)this.getClass().getResource(HELP_DOC); if (help != null) Browser.setPage(help); }
displayAppServers(); }
public void actionPerformed(ActionEvent e) { URL help = (URL)this.getClass().getResource(HELP_DOC); if (help != null) Browser.setPage(help); }
URL about = (URL)this.getClass().getResource(ABOUT_DOC); if (about != null) Browser.setPage(about); }
addAppServer(); }
public void actionPerformed(ActionEvent e) { URL about = (URL)this.getClass().getResource(ABOUT_DOC); if (about != null) Browser.setPage(about); }