rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if (!ERXUtilities.booleanValue(d2wContext().valueForKey("isManditory"))) {
if (!ERXUtilities.booleanValue(d2wContext().valueForKey("isMandatory"))) {
public boolean displayRequiredMarker() { boolean displayRequiredMarker = false; // avoiding attribute() and relationship() because of lame-ass caching scheme on D2WContext String task = (String)d2wContext().valueForKey("task"); if (task==null || task.equals("edit")) { if (!ERX...
WOComponent result=ERDirectToWeb.printerFriendlyPageForD2WContext(d2wContext(),session());
WOComponent result=ERD2WFactory.erFactory().printerFriendlyPageForD2WContext(d2wContext(),session());
public WOComponent editPrinterFriendlyVersion() { WOComponent result=ERDirectToWeb.printerFriendlyPageForD2WContext(d2wContext(),session()); ((EditPageInterface)result).setObject(object()); return result; }
result=ERDirectToWeb.printerFriendlyPageForD2WContext(dummyContext,session());
result=ERD2WFactory.erFactory().printerFriendlyPageForD2WContext(dummyContext,session());
public WOComponent printerFriendlyVersion() { WOComponent result = null; if(object() != null) { D2WContext dummyContext = new D2WContext(); dummyContext.takeValueForKey(object(), "object"); dummyContext.setEntity(EOUtilities.entityNamed(object().editingContext(),object...
return new String (array (), position (), length ());
if (hasArray ()) return new String (array (), position (), length ()); char[] buf = new char [length ()]; get (buf); return new String (buf);
public String toString () { return new String (array (), position (), length ()); }
if (! pdb.isRecipeUsed(recipe)) pdb.removeLibRecipe(recipe);
if (! pdb.isRecipeUsed(recipe)) helper.deleteRecipe(recipe.getRecipeName());
private void deleteRecipeInNode(DefaultMutableTreeNode recipeNode) { RecipeComponent recipe = (RecipeComponent) recipeNode.getUserObject(); model.removeNodeFromParent(recipeNode); // if deleted last reference to recipe in the workspace // ask if recipe should be deleted from database and delete it if (...
ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f));
ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(new FileInputStream(f)));
private void restore(String fileName) { try { File f = new File(fileName); this.workspaceFileName = f.getPath(); if (doWorkspace && f.canRead()) { if (log.isInfoEnabled()) { log.info("Reading from workspace file " + fileName); } ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f))...
log.error("Organizer: can't read file: " + f + " got exception " + e);
log.error("Organizer: can't read file: " + f + " got exception ", e);
private void restore(String fileName) { try { File f = new File(fileName); this.workspaceFileName = f.getPath(); if (doWorkspace && f.canRead()) { if (log.isInfoEnabled()) { log.info("Reading from workspace file " + fileName); } ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f))...
if (! (file.endsWith("/") || file.endsWith(File.separator)))
if ("gcjlib".equals(protocol)) loader = new SoURLLoader(this, newUrl); else if (! (file.endsWith("/") || file.endsWith(File.separator)))
private void addURLImpl(URL newUrl) { synchronized(urlloaders) { if (newUrl == null) return; // Silently ignore... // check global cache to see if there're already url loader // for this url URLLoader loader = (URLLoader)urlloaders.get(newUrl); if (loader == null) { String file = newUrl.getFi...
else if ("file".equals(newUrl.getProtocol()))
else if ("file".equals(protocol))
private void addURLImpl(URL newUrl) { synchronized(urlloaders) { if (newUrl == null) return; // Silently ignore... // check global cache to see if there're already url loader // for this url URLLoader loader = (URLLoader)urlloaders.get(newUrl); if (loader == null) { String file = newUrl.getFi...
Resource resource = findURLResource(resourceName);
int max = urls.size(); Resource resource = null; for (int i = 0; i < max && resource == null; i++) { URLLoader loader = (URLLoader)urlinfos.elementAt(i); if (loader == null) continue; Class k = loader.getClass(className); if (k != null) return k; resource = loader.getResource(resourceName); }
protected Class findClass(final String className) throws ClassNotFoundException { // Just try to find the resource by the (almost) same name String resourceName = className.replace('.', '/') + ".class"; Resource resource = findURLResource(resourceName); if (resource == null) throw new ClassNotFou...
AgentComponent[] agents = ((SocietyComponent)componentToConfigure).getAgents(); for (int i = 0; i < agents.length; i++) relationships.add(agents[i].getShortName());
DefaultMutableTreeNode selNode = (DefaultMutableTreeNode)tree.getSelectionPath().getLastPathComponent(); RelationshipData relData = new RelationshipData(); if (componentToConfigure instanceof ComplexRecipeComponent) { Set agentNames = DBUtils.dbGetAgentNames(); for (Iterator i = agentNames.iterator(); i.hasNext();) {...
private void addRelationship() { Vector relationships = new Vector(); AgentComponent[] agents = ((SocietyComponent)componentToConfigure).getAgents(); for (int i = 0; i < agents.length; i++) relationships.add(agents[i].getShortName()); String relName = (String)ComboDialog.showDialog(this, ...
DefaultMutableTreeNode selNode = (DefaultMutableTreeNode)tree.getSelectionPath().getLastPathComponent(); RelationshipData relData = new RelationshipData();
private void addRelationship() { Vector relationships = new Vector(); AgentComponent[] agents = ((SocietyComponent)componentToConfigure).getAgents(); for (int i = 0; i < agents.length; i++) relationships.add(agents[i].getShortName()); String relName = (String)ComboDialog.showDialog(this, ...
EOEntity e=EOModelGroup.defaultGroup().entityNamed(from.entityName());
EOEntity e=ERXEOAccessUtilities.entityNamed(from.editingContext(), from.entityName());
public static void addObjectToBothSidesOfPotentialRelationshipFromObjectWithKeyPath(EOEnterpriseObject to, EOEnterpriseObject from, String key...
EOFetchSpecification fetchAll = EOModelGroup.defaultGroup().entityNamed(entityName).fetchSpecificationNamed("FetchAll");
EOFetchSpecification fetchAll = ERXEOAccessUtilities.entityNamed(peer, entityName).fetchSpecificationNamed("FetchAll");
public static void refreshSharedObjectsWithName(String entityName) { EOEditingContext peer = ERXExtensions.newEditingContext(); peer.setSharedEditingContext(null); EOFetchSpecification fetchAll = EOModelGroup.defaultGroup().entityNamed(entityName).fetchSpecificationNamed("FetchAll"); if ...
entity=EOModelGroup.defaultGroup().entityNamed(entityName);
entity=ERXEOAccessUtilities.entityNamed(object.editingContext(), entityName);
public static String userInfoUnit(EOEnterpriseObject object, String key) { // return the unit stored in the userInfo dictionary of the appropriate EOAttribute EOEntity entity=null; String lastKey=null; String result=null; if (key.indexOf(".")==-1) { String entityName=ob...
entity=EOModelGroup.defaultGroup().entityNamed(objectForPropertyDisplayed.entityName());
entity=ERXEOAccessUtilities.entityNamed(object.editingContext(), objectForPropertyDisplayed.entityName());
public static String userInfoUnit(EOEnterpriseObject object, String key) { // return the unit stored in the userInfo dictionary of the appropriate EOAttribute EOEntity entity=null; String lastKey=null; String result=null; if (key.indexOf(".")==-1) { String entityName=ob...
new Class[]{ String.class, MethodInterceptor.class }, new Object[]{ "test", TEST_INTERCEPTOR });
new Class[]{ String.class }, new Object[]{ "test" }); assertEquals("test", a.toString()); ((Factory)a).setInterceptor(TEST_INTERCEPTOR);
public void testArgInit() throws Throwable{ Class f = Enhancer.enhanceClass(ArgInit.class, null, null, null ); ArgInit a = (ArgInit)ReflectUtils.newInstance(f, new Class[]{ String.class, MethodInterceptor.class }, ...
TextAreaPeer peer = (TextAreaPeer) getPeer (); if (peer == null) return; peer.insert (str, peer.getText().length ());
appendText (str);
public void append (String str) { TextAreaPeer peer = (TextAreaPeer) getPeer (); if (peer == null) return; peer.insert (str, peer.getText().length ()); }
public void appendText (String text)
public void appendText (String str)
public void appendText (String text) { append (text); }
append (text);
TextAreaPeer peer = (TextAreaPeer) getPeer (); if (peer == null) return; peer.insert (str, peer.getText().length ());
public void appendText (String text) { append (text); }
public void insert (String text, int pos)
public void insert (String str, int pos)
public void insert (String text, int pos) { TextAreaPeer peer = (TextAreaPeer) getPeer (); if (peer == null) return; peer.insert (text, pos); }
TextAreaPeer peer = (TextAreaPeer) getPeer (); if (peer == null) return; peer.insert (text, pos);
insertText (str, pos);
public void insert (String text, int pos) { TextAreaPeer peer = (TextAreaPeer) getPeer (); if (peer == null) return; peer.insert (text, pos); }
public void insertText (String text, int pos)
public void insertText (String str, int pos)
public void insertText (String text, int pos) { insert (text, pos); }
insert (text, pos);
TextAreaPeer peer = (TextAreaPeer) getPeer (); if (peer == null) return; peer.insert (str, pos);
public void insertText (String text, int pos) { insert (text, pos); }
return getMinimumSize (getRows (), getColumns ());
return minimumSize (getRows (), getColumns ());
public Dimension minimumSize () { return getMinimumSize (getRows (), getColumns ()); }
return getPreferredSize (getRows (), getColumns ());
return preferredSize (getRows (), getColumns ());
public Dimension preferredSize () { return getPreferredSize (getRows (), getColumns ()); }
public void replaceRange (String text, int start, int end)
public void replaceRange (String str, int start, int end)
public void replaceRange (String text, int start, int end) { TextAreaPeer peer = (TextAreaPeer) getPeer (); if (peer == null) return; peer.replaceRange (text, start, end); }
TextAreaPeer peer = (TextAreaPeer) getPeer (); if (peer == null) return; peer.replaceRange (text, start, end);
replaceText (str, start, end);
public void replaceRange (String text, int start, int end) { TextAreaPeer peer = (TextAreaPeer) getPeer (); if (peer == null) return; peer.replaceRange (text, start, end); }
public void replaceText (String text, int start, int end)
public void replaceText (String str, int start, int end)
public void replaceText (String text, int start, int end) { replaceRange (text, start, end); }
replaceRange (text, start, end);
TextAreaPeer peer = (TextAreaPeer) getPeer (); if (peer == null) return; peer.replaceRange (str, start, end);
public void replaceText (String text, int start, int end) { replaceRange (text, start, end); }
public PacketError(Element element) { this.element = element;
public PacketError(Condition condition) { this.element = docFactory.createElement("error"); setCondition(condition); setType(condition.getDefaultType());
public PacketError(Element element) { this.element = element; }
if (log.isDebugEnabled()) {
AgentComponent[] oagents = nodes[i].getAgents(); if (log.isDebugEnabled() && oagents.length > 0) {
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 ...
for (int j = 0; j < oagents.length; j++) for (int k = 0; k < nagents.length; k++) if (nagents[k].getShortName().equals(oagents[j].getShortName())) { if (log.isDebugEnabled()) { log.debug("copy: Putting ne Agent " + nagents[k].getShortName() + " on new Node " + nnodes[i].getShortName()); } nnodes[i].addAgent(nagents[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 ...
VariableDef(String name, Occurrence occ, ClassDef type, ScopedDef parentScope) { super(name, occ, parentScope); this.type = type;
public VariableDef() {
VariableDef(String name, // the variable's name Occurrence occ, // where it was defined ClassDef type, // the type of the variable ScopedDef parentScope) { // which scope owns it super(name, occ, parentScope); this.type = type; }
Definition lookup(String name, int numParams, Class type) { throw new IllegalArgumentException("Can't lookup in a " + getClass());
Definition lookup(String name, Class type) { return lookup(name, -1, type);
Definition lookup(String name, int numParams, Class type) { throw new IllegalArgumentException("Can't lookup in a " + getClass()); }
Definition lookup(String name, int numParams, Class type) { for (int i = size() - 1; i > -1; i--) { Definition ld = (Definition) elementAt(i); Definition d = ld.lookup(name, numParams, type); if (d != null) { return d; } } return null;
Definition lookup(String name, Class type) { return lookup(name, -1, type);
Definition lookup(String name, int numParams, Class type) { // unfortunately, the enumeration of a stack returns it // in the reverse order in which we want to traverse it... // So we must walk manually... for (int i = size() - 1; i > -1; i--) { Definition ld = (Definition) el...
TypeUtils.getSignature(getters[i]),
ReflectUtils.getSignature(getters[i]),
public void generateClass(ClassVisitor v) { Type targetType = Type.getType(target); ClassEmitter ce = new ClassEmitter(v); ce.begin_class(Constants.ACC_PUBLIC, getClassName(), targetType, null, ...
TypeUtils.getSignature(setters[i]),
ReflectUtils.getSignature(setters[i]),
public void generateClass(ClassVisitor v) { Type targetType = Type.getType(target); ClassEmitter ce = new ClassEmitter(v); ce.begin_class(Constants.ACC_PUBLIC, getClassName(), targetType, null, ...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
public void setSource(ClusterIdentifier asource) { ClusterIdentifier old = getSource(); if (old != null) { if (! asource.equals(old)) { if(log.isDebugEnabled()) { log.error("Bad RealWorldEvent.setSource("+asource+") was "+old+":"); Thread.dumpStack(); } } } else { ...
Thread.dumpStack();
public void setSource(ClusterIdentifier asource) { ClusterIdentifier old = getSource(); if (old != null) { if (! asource.equals(old)) { if(log.isDebugEnabled()) { log.error("Bad RealWorldEvent.setSource("+asource+") was "+old+":"); Thread.dumpStack(); } } } else { ...
| (bytes[i++] & 0xff) << 8 | (bytes[i++] 0xff));
| (bytes[i++] & 0xff) << 8 | (bytes[i++] & 0xff));
public static JdwpPacket fromBytes (byte[] bytes) { int i = 0; int length = ((bytes[i++] & 0xff) << 24 | (bytes[i++] & 0xff) << 16 | (bytes[i++] & 0xff) << 8 | (bytes[i++] 0xff)); int id = 0; byte flags = 0; if (bytes.length == length) { id = ((bytes[i++] & 0xff) << 24 | (bytes[i...
public CompilerClassLoader(String destinationPath) {
public CompilerClassLoader(String destinationPath, CompilerClassLoader parent) {
public CompilerClassLoader(String destinationPath) { super(); _destinationPath = destinationPath; }
_parent = parent; activeLoader = this;
public CompilerClassLoader(String destinationPath) { super(); _destinationPath = destinationPath; }
return super.loadClass(name, resolveIt);
if(_parent == null) return super.loadClass(name, resolveIt); return _parent.loadClass(name, resolveIt);
public synchronized Class loadClass(String name, boolean resolveIt) throws ClassNotFoundException { try { return findClass(name); } catch(ClassNotFoundException ex) { return super.loadClass(name, resolveIt); } }
e = filesToCompile.objectEnumerator();
e = classFiles.objectEnumerator();
void checkAndCompileAllClasses() { CacheEntry cacheEntry; Enumeration e = _filesToWatch.objectEnumerator(); NSMutableArray filesToCompile = new NSMutableArray(); while(e.hasMoreElements()) { cacheEntry = (CacheEntry)e.nextElement(); if(cacheEntry.needsRefresh()) { ...
cl = new CompilerClassLoader(_destinationPath);
cl = new CompilerClassLoader(_destinationPath, activeLoader);
void checkAndCompileAllClasses() { CacheEntry cacheEntry; Enumeration e = _filesToWatch.objectEnumerator(); NSMutableArray filesToCompile = new NSMutableArray(); while(e.hasMoreElements()) { cacheEntry = (CacheEntry)e.nextElement(); if(cacheEntry.needsRefresh()) { ...
Class oldClass_ = classForName(cacheEntry.className());
void checkAndCompileAllClasses() { CacheEntry cacheEntry; Enumeration e = _filesToWatch.objectEnumerator(); NSMutableArray filesToCompile = new NSMutableArray(); while(e.hasMoreElements()) { cacheEntry = (CacheEntry)e.nextElement(); if(cacheEntry.needsRefresh()) { ...
com.webobjects.appserver.WOApplication.application()._removeComponentDefinitionCacheContents();
if(oldClass_ != null && !cacheEntry.className().equals(className)) { setClassForName(class_, cacheEntry.className()); } if(!didReset) { com.webobjects.appserver.WOApplication.application()._removeComponentDefinitionCacheContents(); NSKeyValueCoding.DefaultImplementation._flushCaches(); NSKeyValueCoding._ReflectionKeyBi...
void checkAndCompileAllClasses() { CacheEntry cacheEntry; Enumeration e = _filesToWatch.objectEnumerator(); NSMutableArray filesToCompile = new NSMutableArray(); while(e.hasMoreElements()) { cacheEntry = (CacheEntry)e.nextElement(); if(cacheEntry.needsRefresh()) { ...
if(entry.classFile() != null) classFiles.addObject(entry);
public void initialize() { if(WOApplication.application().isCachingEnabled()) { cat.info("I assume this is deployment mode, rapid-turnaround mode is disabled"); _filesToWatch = new NSMutableDictionary(); return; } if(!ERXUtilities.booleanValueWithDefault(System.getProp...
log = CSMART.createLogger("org.cougaar.tools.csmart.ui.experiment");
createLogger();
public ExperimentTree(DefaultTreeModel model) { super(model); this.model = model; setExpandsSelectedPaths(true); log = CSMART.createLogger("org.cougaar.tools.csmart.ui.experiment"); }
HostComponent[] hosts = experiment.getHosts();
HostComponent[] hosts = experiment.getHostComponents();
private void addHostsFromExperiment() { DefaultMutableTreeNode root = (DefaultMutableTreeNode)hostTree.getModel().getRoot(); DefaultTreeModel model = (DefaultTreeModel)hostTree.getModel(); HostComponent[] hosts = experiment.getHosts(); for (int i = 0; i < hosts.length; i++) { HostComponent host...
HostComponent[] hostsInExperiment = experiment.getHosts();
HostComponent[] hostsInExperiment = experiment.getHostComponents();
private void addHostsFromFile() { // this may silently fail, but that's ok, cause the file is optional String pathName = Util.getPath("hosts.txt"); if (pathName == null) return; java.util.List hosts = new ArrayList(); RandomAccessFile hostFile = null; // read hosts, one per line try { ...
NodeComponent[] nodes = experiment.getNodes();
NodeComponent[] nodes = experiment.getNodeComponents();
private void addUnassignedAgentsFromExperiment() {// // get all agents in the experiment and put them in unassigned list// AgentComponent[] agents = experiment.getAgents();// ArrayList unassignedAgentNames = new ArrayList();// ArrayList unassignedAgents = new ArrayList();// unassignedAgents.a...
HostComponent[] hosts = experiment.getHosts(); NodeComponent[] nodes = experiment.getNodes();
HostComponent[] hosts = experiment.getHostComponents(); NodeComponent[] nodes = experiment.getNodeComponents();
private void addUnassignedNodesFromExperiment() { Set unassignedNodes; unassignedNodes = new TreeSet(dbBaseComponentComparator); HostComponent[] hosts = experiment.getHosts(); NodeComponent[] nodes = experiment.getNodes(); unassignedNodes.addAll(Arrays.asList(nodes)); for (int i = 0; i < hosts.lengt...
HostComponent[] hc = experiment.getHosts();
HostComponent[] hc = experiment.getHostComponents();
public void createHost() { String hostName = null; while (true) { hostName = JOptionPane.showInputDialog("New host name: "); if (hostName == null || hostName.length() == 0) return; HostComponent[] hc = experiment.getHosts(); boolean isUnique = true; for (int i = 0; i < hc.length;...
findWorker(trees, experiment.getHosts(), "Host");
findWorker(trees, experiment.getHostComponents(), "Host");
public void findHost() { JTree[] trees = new JTree[1]; trees[0] = hostTree; findWorker(trees, experiment.getHosts(), "Host"); }
findWorker(trees, experiment.getNodes(), "Node");
findWorker(trees, experiment.getNodeComponents(), "Node");
public void findNode() { JTree[] trees = new JTree[2]; trees[0] = hostTree; trees[1] = nodeTree; findWorker(trees, experiment.getNodes(), "Node"); }
HostComponent[] hc = experiment.getHosts();
HostComponent[] hc = experiment.getHostComponents();
private boolean isHostNameUnique(String name) { HostComponent[] hc = experiment.getHosts(); boolean isUnique = true; for (int i = 0; i < hc.length; i++) if (name.equals(hc[i].getShortName())) return false; return true; }
animator.stop(); System.exit(0);
new Thread(new Runnable() { public void run() { animator.stop(); System.exit(0); } }).start();
public void run(String[] args) { GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); canvas.addGLEventListener(new Listener()); canvas.setSize(256, 256); frame1 = new Frame("Frame 1"); frame1.setLayout(new BorderLayout()); frame1.add(canvas, BorderLayout.CENTER); ...
get (position (), buf);
int pos = position (); get (buf, 0, buf.length); position (pos);
public String toString () { if (hasArray ()) return new String (array (), position (), length ()); char[] buf = new char [length ()]; get (position (), buf); return new String (buf); }
for (Enumeration e = entitiesForModelGroup(EOModelGroup.defaultGroup()).objectEnumerator(); e.hasMoreElements();) {
for (Enumeration e = entitiesForModelGroup(ERXEOAccessUtilities.modelGroup(null)).objectEnumerator(); e.hasMoreElements();) {
public static EOEntity caseInsensitiveEntityNamed(String entityName) { EOEntity entity = null; if (entityName != null) { if (_entityNameEntityCache == null) { _entityNameEntityCache = new NSMutableDictionary(); for (Enumeration e = entitiesForModelGroup(EOModel...
EOEntity e = EOModelGroup.defaultGroup().entityNamed(entityName);
EOEntity e = ERXEOAccessUtilities.entityNamed(null, entityName);
public static void makeEditableSharedEntityNamed(String entityName) { EOEntity e = EOModelGroup.defaultGroup().entityNamed(entityName); if (e.isReadOnly()) { e.setReadOnly(false); e.setCachesObjects(false); e.removeSharedObjectFetchSpecificationByName("FetchAll"); ...
EOEntity entity=EOModelGroup.defaultGroup().entityNamed(lastEO.entityName());
EOEntity entity=ERXEOAccessUtilities.entityNamed(object.editingContext(), lastEO.entityName());
public static EORelationship relationshipWithObjectAndKeyPath(EOEnterpriseObject object, String keyPath) { EOEnterpriseObject lastEO = relationshipObjectWithObjectAndKeyPath(object, keyPath); EORelationship relationship = null; if (lastEO!=null) { // FIXME: Should use the mod...
if(log.isDebugEnabled()) {
if(log.isInfoEnabled()) {
public void printParametersAndValues() { StringBuffer sb = new StringBuffer(200); for (int i = 0; i < trialParameters.size(); i++) { sb.append(((Property)trialParameters.get(i)).getName()); sb.append(","); } if(log.isDebugEnabled()) { log.info(sb.substring(0, sb.length()-1)); } sb.set...
src.put (toPut);
put (toPut);
public DoubleBuffer put (DoubleBuffer src) { if (src == this) throw new IllegalArgumentException (); checkForOverflow(src.remaining ()); if (src.remaining () > 0) { double[] toPut = new double [src.remaining ()]; src.get (toPut); src.put (toPut); } return this; }
super(classloader, getCanonicalFileURL(url));
super(classloader, url);
FileURLLoader(URLClassLoader classloader, URL url) { super(classloader, getCanonicalFileURL(url)); dir = new File(baseURL.getFile()); }
try { file = file.getCanonicalFile(); } catch (IOException ignore) { }
Resource getResource(String name) { File file = new File(dir, name); try { file = file.getCanonicalFile(); } catch (IOException ignore) { } if (file.exists() && !file.isDirectory()) return new FileResource(this, name, file); return null; }
super(classloader, getCanonicalFileURL(baseURL));
super(classloader, baseURL);
public JarURLLoader(URLClassLoader classloader, URL baseURL) { super(classloader, getCanonicalFileURL(baseURL)); // cache url prefix for all resources in this jar url String external = baseURL.toExternalForm(); StringBuffer sb = new StringBuffer(external.length() + 6); sb.append("jar:");...
if (certs != null)
if (certs == null)
CodeSource getCodeSource() { Certificate[] certs = getCertificates(); if (certs != null) return loader.noCertCodeSource; else return new CodeSource(loader.baseURL, certs); }
return getComponentCount();
return ncomponents;
public int countComponents() { return getComponentCount(); }
if (layoutMgr != null) layoutMgr.layoutContainer(this);
layout ();
public void doLayout() { if (layoutMgr != null) layoutMgr.layoutContainer(this); }
synchronized (getTreeLock ()) { if (! contains(x, y)) return null; for (int i = 0; i < ncomponents; ++i) { if (!component[i].isVisible()) continue; int x2 = x - component[i].x; int y2 = y - component[i].y; if (component[i].contains(x2, y2)) return component[i]; } return this; }
return locate (x, y);
public Component getComponentAt(int x, int y) { synchronized (getTreeLock ()) { if (! contains(x, y)) return null; for (int i = 0; i < ncomponents; ++i) { // Ignore invisible children... if (!component[i].isVisible()) continue; int...
return ncomponents;
return countComponents ();
public int getComponentCount() { return ncomponents; }
if (peer == null) return new Insets(0, 0, 0, 0); return ((ContainerPeer) peer).getInsets();
return insets ();
public Insets getInsets() { if (peer == null) return new Insets(0, 0, 0, 0); return ((ContainerPeer) peer).getInsets(); }
return getInsets();
if (peer == null) return new Insets (0, 0, 0, 0); return ((ContainerPeer) peer).getInsets ();
public Insets insets() { return getInsets(); }
doLayout();
if (layoutMgr != null) layoutMgr.layoutContainer (this);
public void layout() { doLayout(); }
return getComponentAt(x, y);
synchronized (getTreeLock ()) { if (!contains (x, y)) return null; for (int i = 0; i < ncomponents; ++i) { if (!component[i].isVisible ()) continue; int x2 = x - component[i].x; int y2 = y - component[i].y; if (component[i].contains (x2, y2)) return component[i]; } return this; }
public Component locate(int x, int y) { return getComponentAt(x, y); }
if (asb != null && asb.startsWith(REAL_CMT_TYPE) && asb.indexOf("134589") != -1) { if (log.isInfoEnabled()) { log.info("clnTrial found base CMT assembly " + asb + "- skipping"); } continue; }
private void cleanTrial(String cmtType, String hnaType, String csmiType, String oldTrialId) throws SQLException { // Basically we'll drop the HNA, CSMI assembly and recipes. It will drop // the CMT assembly too, but only if cmtType is null // Also drop any CSA in runtime if cmtType is not a CSA if(log...
if (trialId == null || ! trialId.startsWith("EXPT-")) { if (log.isInfoEnabled()) { log.info("fixAsb for base trial (" + trialId + ")? Skip out with error.", new Throwable()); } return false; }
public boolean fixAssemblies() throws SQLException { // return false on error // 1: delete any HNA assembly referenced in config (if not referenced elsewhere) // --- find any HNA in config // Use queryConfigTrialAssemblies and loop through? (returns assembly_ids // and just uses the trial_id) Statem...
if (assembly_id == null || assembly_id.equals("")) return false; if (assembly_id.startsWith(REAL_CMT_TYPE) && assembly_id.indexOf("134589") != -1) { if (log.isInfoEnabled()) { log.info("isAsbUsed got base CMT asb to ask is used: " + assembly_id, new Throwable()); } return true; }
public boolean isAssemblyUsed(String assembly_id) throws SQLException { // See if anyone uses this assembly ID anywhere substitutions.put(":assembly_id:", sqlQuote(assembly_id)); substitutions.put(":trial_id:", trialId); Statement stmt = getStatement(); ResultSet rs = executeQuery(stmt, dbp.getQuery("c...
if (trialId == null || ! trialId.startsWith("EXPT-")) { if (log.isInfoEnabled()) { log.info("rmConfAsb asked to remove from base trial " + trialId, new Throwable()); } return; }
private void removeConfigAssembly(String assembly_id) throws SQLException { if (assembly_id == null || assembly_id.equals("")) return; if (log.isDebugEnabled()) { log.debug("Removing assembly from config for trial " + trialId + ": " + assembly_id); } substitutions.put(":trial_id:", trialId); ...
} continue; } if (assid.startsWith(REAL_CMT_TYPE) || assid.startsWith(CSATYPE)) { if (log.isInfoEnabled()) { log.info("rmOrphanNonSoc got a CMT or CSA: " + assid);
public void removeOrphanNonSocietyAssemblies() throws SQLException { // Do a query for assemblyIDs in asb_assembly, where it is not // of type cmtType or csaType substitutions.put(":cmt_type:", REAL_CMT_TYPE); substitutions.put(":csa_type:", CSATYPE); substitutions.put(":trial_id:", ""); Statement s...
if (trialId == null || ! trialId.startsWith("EXPT-")) { if (log.isInfoEnabled()) { log.info("rmRunAsb asked to remove from base trial " + trialId, new Throwable()); } return; }
private void removeRuntimeAssembly(String assembly_id) throws SQLException { if (assembly_id == null || assembly_id.equals("")) return; substitutions.put(":trial_id:", trialId); substitutions.put(":expt_id:", exptId); substitutions.put(":assemblies_to_clean:", "(" + sqlQuote(assembly_id) + ")"); i...
abstract public Object afterReturn(Object obj, Method method, Object[] args, boolean invokedSuper, Object retValFromSuper, Throwable e) throws Throwable;
Object afterReturn(Object obj, Method method, Object[] args, boolean invokedSuper, Object retValFromSuper, Throwable e) throws Throwable;
abstract public Object afterReturn(Object obj, Method method, Object[] args, boolean invokedSuper, Object retValFromSuper, Throwable e) throws Throwable;
abstract public boolean invokeSuper(Object obj, Method method, Object[] args) throws Throwable;
boolean invokeSuper(Object obj, Method method, Object[] args) throws Throwable;
abstract public boolean invokeSuper(Object obj, Method method, Object[] args) throws Throwable;
if (in == null) throw new IOException("Stream closed");
public int read(char buf[], int offset, int length) throws IOException { synchronized (lock) { int wavail = wcount - wpos; if (wavail > 0) { if (length > wavail) length = wavail; System.arraycopy(work, wpos, buf, offset, length); wpos += length; return length; } else { if (len...
if (in == null) throw new IOException("Stream closed");
public boolean ready() throws IOException { synchronized (lock) { if (wpos < wcount) return true; if (work == null) { work = new char[100]; wpos = 0; wcount = 0; } for (;;) { if (in.available() <= 0) return false; in.mark(1); int b = in.read(); if (b < 0) retur...
nsme.printStackTrace();
if (log.isErrorEnabled()) { log.error("Organizer error finding experiment name", nsme); }
public void modified(ModificationEvent event) { if (event.getSource() instanceof Experiment) { model.nodeChanged(findNode(event.getSource())); try { Class[] noTypes = new Class[0]; experimentNames.clear(); experimentNames.init(getLeaves(Experiment.class, r...
se.printStackTrace();
if (log.isErrorEnabled()) { log.error("Organizer error finding experiment name", se); }
public void modified(ModificationEvent event) { if (event.getSource() instanceof Experiment) { model.nodeChanged(findNode(event.getSource())); try { Class[] noTypes = new Class[0]; experimentNames.clear(); experimentNames.init(getLeaves(Experiment.class, r...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
public Experiment copyExperiment(Experiment experiment) { String newName = generateExperimentName(experiment.getExperimentName()); final Experiment experimentCopy = (Experiment)experiment.copy(newName); // save copy in database GUIUtils.timeConsumingTaskStart(organizer); try { new Thread("Duplicat...
re.printStackTrace();
public Experiment copyExperiment(Experiment experiment) { String newName = generateExperimentName(experiment.getExperimentName()); final Experiment experimentCopy = (Experiment)experiment.copy(newName); // save copy in database GUIUtils.timeConsumingTaskStart(organizer); try { new Thread("Duplicat...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
public String getUniqueExperimentName(String originalName, boolean allowExistingName) { String name = null; while (true) { name = (String) JOptionPane.showInputDialog(this, "Enter Experiment Name", "Experiment Name", ...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
public void renameExperiment() { DefaultMutableTreeNode node = getSelectedNode(); final Experiment experiment = (Experiment) node.getUserObject(); String originalName = experiment.getExperimentName(); String newName = getUniqueExperimentName(originalName, true); if (newName == null) return; if ...
re.printStackTrace();
public void renameExperiment() { DefaultMutableTreeNode node = getSelectedNode(); final Experiment experiment = (Experiment) node.getUserObject(); String originalName = experiment.getExperimentName(); String newName = getUniqueExperimentName(originalName, true); if (newName == null) return; if ...
if(log.isDebugEnabled()) { log.error("Organizer: can't read file: " + f + " exception: " + e);
if(log.isErrorEnabled()) { log.error("Organizer: can't read file: " + f, e);
private void restore(String fileName) { PropertyListener l = null; try { File f = new File(fileName); this.workspaceFileName = f.getPath(); if (f.canRead()) { ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f)); try { root = (DefaultMutableTreeNode) ois.readObject(); for (En...
nsme.printStackTrace();
if (log.isErrorEnabled()) { log.error("Organizer error restoring workspace", nsme); }
private void restore(String fileName) { PropertyListener l = null; try { File f = new File(fileName); this.workspaceFileName = f.getPath(); if (f.canRead()) { ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f)); try { root = (DefaultMutableTreeNode) ois.readObject(); for (En...
se.printStackTrace();
if (log.isErrorEnabled()) { log.error("Organizer error restoring workspace", se); }
private void restore(String fileName) { PropertyListener l = null; try { File f = new File(fileName); this.workspaceFileName = f.getPath(); if (f.canRead()) { ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f)); try { root = (DefaultMutableTreeNode) ois.readObject(); for (En...
ioe.printStackTrace(); return;
if (log.isErrorEnabled()) { log.error("Organizer error restoring workspace", ioe); } return;
private void restore(String fileName) { PropertyListener l = null; try { File f = new File(fileName); this.workspaceFileName = f.getPath(); if (f.canRead()) { ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f)); try { root = (DefaultMutableTreeNode) ois.readObject(); for (En...
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 selectExperimentFromDatabase() { Map experimentNamesMap = ExperimentDB.getExperimentNames(); Set keys = experimentNamesMap.keySet(); JComboBox cb = new JComboBox(keys.toArray(new String[keys.size()])); cb.setEditable(false); JPanel panel = new JPanel(); panel.add(new JLabel("Select Exper...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
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...