rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
setDocument(DocumentHelper.createDocument(getNamespaceURI(), getQualifiedName(localName), null));
this.document = _document;
public NamespaceHelper(String _namespaceUri, String _prefix, String localName) throws ParserConfigurationException { this.namespaceUri = _namespaceUri; this.prefix = _prefix; setDocument(DocumentHelper.createDocument(getNamespaceURI(), getQualifiedName(localName), null)); ...
log = CSMART.createLogger("org.cougaar.tools.csmart.ui");
createLogger();
public Analyzer(CSMART csmart, Experiment experiment) { log = CSMART.createLogger("org.cougaar.tools.csmart.ui"); this.csmart = csmart; this.experiment = experiment; myFrame = this; JMenu fileMenu = new JMenu(FILE_MENU); JMenuItem openMenuItem = new JMenuItem(OPEN_MENU_ITEM); openMenuItem.addActi...
public void setTarget(ClassVisitor target, ClassVisitor outer) {
public void setTarget(ClassVisitor target) {
public void setTarget(ClassVisitor target, ClassVisitor outer) { cv = new ClassVisitorTee(branch, target); }
for (int i = lo + 1 ; i < hi; i++) {
for (int i = lo + 1 ; i <= hi; i++) {
private void insertionSort(Object[] a, int lo, int hi, Comparator cmp) { for (int i = lo + 1 ; i < hi; i++) { for (int j = i; j > lo; j--) { if (cmp.compare(a[j - 1], a[j]) > 0) { swap(j - 1, j); } else { break; } ...
public void mergeSort(Comparable[] a, int lo, int hi) {
public void mergeSort(Object[] a, int lo, int hi) {
public void mergeSort(Comparable[] a, int lo, int hi) { mergeSort(a, lo, hi, DEFAULT_COMPARATOR); }
public void quickSort(Comparable[] a, int lo, int hi) {
public void quickSort(Object[] a, int lo, int hi) {
public void quickSort(Comparable[] a, int lo, int hi) { quickSort(a, lo, hi, DEFAULT_COMPARATOR); }
if (cmp.compare(a[lo], a[hi]) > 0)
if (cmp.compare(a[lo], a[hi - 1]) > 0)
private void quickSortHelper(Object[] a, int lo, int hi, Comparator cmp) { for (;;) { int diff = hi - lo; if (diff <= QUICKSORT_THRESHOLD) break; int i = (hi + lo) / 2; if (cmp.compare(a[lo], a[i]) > 0) swap(lo, i); if (cmp....
if (cmp.compare(a[i], a[hi]) > 0)
if (cmp.compare(a[i], a[hi - 1]) > 0)
private void quickSortHelper(Object[] a, int lo, int hi, Comparator cmp) { for (;;) { int diff = hi - lo; if (diff <= QUICKSORT_THRESHOLD) break; int i = (hi + lo) / 2; if (cmp.compare(a[lo], a[i]) > 0) swap(lo, i); if (cmp....
System.err.println ("Failed to load Main-Class manifest attribute from\n" + name);
System.err.println("Failed to load Main-Class manifest attribute from " + name);
private String getMain (String name) { String mainName = null; try { JarFile j = new JarFile (name); Attributes a = j.getManifest().getMainAttributes(); mainName = a.getValue(Attributes.Name.MAIN_CLASS); } catch (Exception e) { // empty } if (mainName == null) { System.err.pri...
public LatLonPoint (float lat, float lon) { lat_ = normalize_latitude(lat); lon_ = wrap_longitude(lon); radlat_ = EarthConstants.degToRad(lat_); radlon_ = EarthConstants.degToRad(lon_);
public LatLonPoint () {
public LatLonPoint (float lat, float lon) { lat_ = normalize_latitude(lat); lon_ = wrap_longitude(lon); radlat_ = EarthConstants.degToRad(lat_); radlon_ = EarthConstants.degToRad(lon_); }
public void setPosition(LatLonPoint pos);
void setPosition(LatLonPoint pos);
public void setPosition(LatLonPoint pos);
String home = System.getProperty("java.home");
String home = System.getProperty("gnu.classpath.home.url");
protected void init (Hashtable environment) { // FIXME: Is this enough? final String[] properties = { Context.DNS_URL, Context.INITIAL_CONTEXT_FACTORY, Context.OBJECT_FACTORIES, Context.PROVIDER_URL, Context.STATE_FACTORIES, Context.URL_PKG_PREFIXES, }; // Create myProps, cloning environm...
String fileName = home + File.separator + "lib" + File.separator + "jndi.properties";
String url = home + "/jndi.properties";
protected void init (Hashtable environment) { // FIXME: Is this enough? final String[] properties = { Context.DNS_URL, Context.INITIAL_CONTEXT_FACTORY, Context.OBJECT_FACTORIES, Context.PROVIDER_URL, Context.STATE_FACTORIES, Context.URL_PKG_PREFIXES, }; // Create myProps, cloning environm...
try { InputStream is = new FileInputStream (fileName); p.load (is); is.close (); } catch (IOException e) {}
try { InputStream is = new URL(url).openStream(); p.load (is); is.close (); } catch (IOException e) { }
protected void init (Hashtable environment) { // FIXME: Is this enough? final String[] properties = { Context.DNS_URL, Context.INITIAL_CONTEXT_FACTORY, Context.OBJECT_FACTORIES, Context.PROVIDER_URL, Context.STATE_FACTORIES, Context.URL_PKG_PREFIXES, }; // Create myProps, cloning environm...
Enumeration enum = refs.elements();
Enumeration enumList = refs.elements();
private void persist(String referentFileClass, String referentType, String referentTag, String referentClass, Definition def) { // System.out.println("persist: referentType="+referentType+" referentTag="+referentTag); // boolean debugFlag = referentClass...
while (enum.hasMoreElements()) { Occurrence occ = (Occurrence) enum.nextElement();
while (enumList.hasMoreElements()) { Occurrence occ = (Occurrence) enumList.nextElement();
private void persist(String referentFileClass, String referentType, String referentTag, String referentClass, Definition def) { // System.out.println("persist: referentType="+referentType+" referentTag="+referentTag); // boolean debugFlag = referentClass...
persist(referentFileClass, referentType, referentTag, referentClass, def.getOccurrence()); }
private void persist(String referentFileClass, String referentType, String referentTag, String referentClass, Definition def) { // System.out.println("persist: referentType="+referentType+" referentTag="+referentTag); // boolean debugFlag = referentClass...
if (experiments.length == 1)
if (experiments != null && experiments.length == 1)
public void actionPerformed(ActionEvent e) { String s = ((AbstractButton)e.getSource()).getActionCommand(); if (s.equals(NEW_MENU_ITEM)) { newWorkspace(); } else if (s.equals(EXIT_MENU_ITEM)) { exit(); } else if (s.equals(HELP_MENU_ITEM)) { URL help = (URL)getClass().getResource(HELP_DOC); ...
else if (experiments.length > 1)
else if (experiments != null && experiments.length > 1)
public void actionPerformed(ActionEvent e) { String s = ((AbstractButton)e.getSource()).getActionCommand(); if (s.equals(NEW_MENU_ITEM)) { newWorkspace(); } else if (s.equals(EXIT_MENU_ITEM)) { exit(); } else if (s.equals(HELP_MENU_ITEM)) { URL help = (URL)getClass().getResource(HELP_DOC); ...
if (experiments.length > 0)
if (experiments != null && experiments.length > 0)
public void actionPerformed(ActionEvent e) { String s = ((AbstractButton)e.getSource()).getActionCommand(); if (s.equals(NEW_MENU_ITEM)) { newWorkspace(); } else if (s.equals(EXIT_MENU_ITEM)) { exit(); } else if (s.equals(HELP_MENU_ITEM)) { URL help = (URL)getClass().getResource(HELP_DOC); ...
return !disableBindVariables();
return (!disableBindVariables()) || arg0.className().equals("com.webobjects.foundation.NSData") || arg0.externalType().equals("bytea") || arg0.externalType().equals("bit") ;
public boolean mustUseBindVariableForAttribute(EOAttribute arg0) { return !disableBindVariables(); }
return !disableBindVariables();
return (!disableBindVariables()) || arg0.className().equals("com.webobjects.foundation.NSData") || arg0.externalType().equals("bytea") || arg0.externalType().equals("bit") ;
public boolean shouldUseBindVariableForAttribute(EOAttribute arg0) { return !disableBindVariables(); }
String c = ""; if (attribute.className().equals("String") || attribute.className().equals("java.lang.String")) { c = "'";
if (!shouldUseBindVariableForAttribute(attribute)) { String c = ""; if (attribute.className().endsWith("String") || attribute.externalType().indexOf("char") > -1 ) { c = "'"; } return c + super.sqlStringForValue(v,kp) + c + "::" + s; } else { return super.sqlStringForValue(v, kp) + "::" + s;
public String sqlStringForValue(Object v, String kp) { if(disableTypeCasting()) { return super.sqlStringForValue(v,kp); } EOAttribute attribute; int lastDotIdx = kp.lastIndexOf("."); if (lastDotIdx == -1) { attribute = entity().attributeNamed(kp); } el...
return new StringBuffer(c).append(super.sqlStringForValue(v,kp)).append(c).append("::").append(s).toString();
public String sqlStringForValue(Object v, String kp) { if(disableTypeCasting()) { return super.sqlStringForValue(v,kp); } EOAttribute attribute; int lastDotIdx = kp.lastIndexOf("."); if (lastDotIdx == -1) { attribute = entity().attributeNamed(kp); } el...
theWholeSoc = null;
public void dumpINIFiles() { ExperimentINIWriter cw = null; theWholeSoc = null; if (DBUtils.dbMode) { if (theWholeSoc == null) { // write it to the db saveToDb(new DBConflictHandler() { public int handleConflict(Object msg, Object[] choices, Object defaultChoice) { ...
if (theWholeSoc == null) { saveToDb(new DBConflictHandler() { public int handleConflict(Object msg, Object[] choices, Object defaultChoice) { return JOptionPane.showOptionDialog(null, msg, "Database Conflict", JOptionPane.WARNING_MESSAGE, JOptionPane.DEFAULT_OPTION, null, choices, defaultChoice); } }); } if (theWholeS...
saveToDb(); if (theWholeSoc == null) return; cw = new ExperimentINIWriter(theWholeSoc); } else
public void dumpINIFiles() { ExperimentINIWriter cw = null; theWholeSoc = null; if (DBUtils.dbMode) { if (theWholeSoc == null) { // write it to the db saveToDb(new DBConflictHandler() { public int handleConflict(Object msg, Object[] choices, Object defaultChoice) { ...
}
public void dumpINIFiles() { ExperimentINIWriter cw = null; theWholeSoc = null; if (DBUtils.dbMode) { if (theWholeSoc == null) { // write it to the db saveToDb(new DBConflictHandler() { public int handleConflict(Object msg, Object[] choices, Object defaultChoice) { ...
if (DBUtils.dbMode && theWholeSoc != null) return theWholeSoc; theWholeSoc = new GenericComponentData(); theWholeSoc.setType(ComponentData.SOCIETY); theWholeSoc.setName(getExperimentName()); theWholeSoc.setClassName("java.lang.Object"); theWholeSoc.setOwner(this); theWholeSoc.setParent(null); addNodes(); List co...
saveToDb();
public ComponentData getSocietyComponentData() { if (DBUtils.dbMode && theWholeSoc != null) return theWholeSoc; theWholeSoc = new GenericComponentData(); theWholeSoc.setType(ComponentData.SOCIETY); theWholeSoc.setName(getExperimentName()); // this should be experiment: trial FIXME theWholeSoc.setC...
modified = true;
public void modified(ModificationEvent e) { fireModification(); }
modified = true;
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { ois.defaultReadObject(); createLogger(); createConfigWriter(); }
System.out.println("Removed node: " + nc.getShortName());
public void removeNode(NodeComponent nc) { System.out.println("Removed node: " + nc.getShortName()); ExperimentNode sc = (ExperimentNode) nc; nodes.remove(nc); sc.dispose(); // Let the node disassociate itself from agents sc.removeModificationListener(this); fireModification(); }
modified = false;
public void saveToDb(DBConflictHandler ch) { try { updateNameServerHostName(); // Be sure this is up-to-date Set writtenNodes = new HashSet(); List components = getComponents(); NodeComponent[] nodesToWrite = getNodes(); ComponentData theSoc = new GenericComponentData(); theSoc.setTyp...
public void setRegarding(PlanElement pe);
void setRegarding(PlanElement pe);
public void setRegarding(PlanElement pe);
public void setSource(ClusterIdentifier source);
void setSource(ClusterIdentifier source);
public void setSource(ClusterIdentifier source);
URLStreamHandler ph;
URLStreamHandler ph = null;
getURLStreamHandler (String protocol) { URLStreamHandler ph; // First, see if a protocol handler is in our cache. if (cache_handlers) { if ((ph = (URLStreamHandler) ph_cache.get(protocol)) != null) return ph; } // If a non-default factory has been set, use it to find the proto...
StringTokenizer pkgPrefix = new StringTokenizer (ph_search_path, "|");
StringTokenizer pkgPrefix = new StringTokenizer (propVal, "|");
getURLStreamHandler (String protocol) { URLStreamHandler ph; // First, see if a protocol handler is in our cache. if (cache_handlers) { if ((ph = (URLStreamHandler) ph_cache.get(protocol)) != null) return ph; } // If a non-default factory has been set, use it to find the proto...
(String)((Integer)propRate.getValue()).toString() + ", " +
(String)((Long)propRate.getValue()).toString() + ", " +
public String getConfigLine() { return (String)propWorldState.getValue() + ", " + (String)propTaskVerb.getValue() + ", " + (String)((Integer)propRate.getValue()).toString() + ", " + (String)((Integer)propChaos.getValue()).toString() + ", " + (String)((Double)propVital.getValue()).toString() + "...
(String)((Integer)propDuration.getValue()).toString();
(String)((Long)propDuration.getValue()).toString();
public String getConfigLine() { return (String)propWorldState.getValue() + ", " + (String)propTaskVerb.getValue() + ", " + (String)((Integer)propRate.getValue()).toString() + ", " + (String)((Integer)propChaos.getValue()).toString() + ", " + (String)((Double)propVital.getValue()).toString() + "...
suite.addTest(TestEnhancer.suite()); suite.addTest(TestMetaClass.suite()); suite.addTest(TestDelegator.suite()); suite.addTest(TestKeyFactory.suite()); suite.addTest(TestProxy.suite()); suite.addTest(TestMethodProxy.suite()); suite.addTest(TestParallelSorter.suite()); suite.addTest(TestSwitch.suite()); suite.addTest(Te...
suite.addTest(TestMemberSwitch.suite());
public static Test suite() { // System.setSecurityManager( new java.rmi.RMISecurityManager()); System.getProperties().list(System.out); TestSuite suite = new TestSuite(); suite.addTest(TestEnhancer.suite()); suite.addTest(TestMetaClass.suite()); suite.addTest...
String result = super.browserStringForItem(); if(showIndex()){ Integer index = (Integer)browserItem.valueForKey(indexKey()); if(index != null){ result = index.intValue()+". "+result; } } return result; }
String result = super.browserStringForItem(); if(showIndex()){ Integer index = (Integer)browserItem.valueForKey(indexKey()); if(index != null){ result = index.intValue()". "result; } } return result; }
public String browserStringForItem(){ String result = super.browserStringForItem(); if(showIndex()){ Integer index = (Integer)browserItem.valueForKey(indexKey()); if(index != null){ result = index.intValue()+". "+result; } } return result; }
XmlModuleDescriptorUpdater.update(new Ivy(),
Ivy ivy = new Ivy(); ivy.setVariable("myvar", "myconf1"); XmlModuleDescriptorUpdater.update(ivy,
public void testUpdate() throws Exception { /* * For updated file to be equals to updated.xml, * we have to fix the line separator to the one used * in updated.xml, in order for this test to works in * all platforms (default line separator used in * updater being plat...
log = CSMART.createLogger("org.cougaar.tools.csmart.ui.experiment");
createLogger();
public ExperimentBuilder(CSMART csmart, Experiment experiment) { this.csmart = csmart; log = CSMART.createLogger("org.cougaar.tools.csmart.ui.experiment"); setExperiment(experiment); JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); JMenu fileMenu = new JMenu(FILE_MENU); file...
return new VsftpResource(_repository, cloneName, exists(), getContentLength(), getLastModified());
try { return _repository.getResource(cloneName); } catch (IOException e) { throw new RuntimeException(e); }
public Resource clone(String cloneName) { return new VsftpResource(_repository, cloneName, exists(), getContentLength(), getLastModified()); }
attributeValues[i] = filteringProperties.filter(attributeValues[i]
if (null!=attributeValues[i]) attributeValues[i] = filteringProperties.filter(attributeValues[i]
public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel) throws ConfigurationException { Object[] attributeValues = super.getAttributeValues(name, modeConf, objectModel); for (int i = 0; i < attributeValues.length; i++) { attributeVa...
else attributeValues[i] = filteringProperties.filter(filteringProperties.getProperty(name));
public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel) throws ConfigurationException { Object[] attributeValues = super.getAttributeValues(name, modeConf, objectModel); for (int i = 0; i < attributeValues.length; i++) { attributeVa...
HttpURLConnection http;
HttpURLConnection po;
private final String IliasCommit () { core.transEnd(); StringBuffer P = new StringBuffer(); Hashtable ins = core.getTransNew (); Hashtable mod = core.getTransMod (); core.transBegin(); int i=0; for (Enumeration e = ins.keys(); e.hasMoreElements(); i++) { Object l = e.nextElement(); Object r = ins.get(l); ...
http = (HttpURLConnection) ( new java.net.URL (
po = (HttpURLConnection) ( new java.net.URL (
private final String IliasCommit () { core.transEnd(); StringBuffer P = new StringBuffer(); Hashtable ins = core.getTransNew (); Hashtable mod = core.getTransMod (); core.transBegin(); int i=0; for (Enumeration e = ins.keys(); e.hasMoreElements(); i++) { Object l = e.nextElement(); Object r = ins.get(l); ...
http.setRequestProperty (
po.setRequestProperty (
private final String IliasCommit () { core.transEnd(); StringBuffer P = new StringBuffer(); Hashtable ins = core.getTransNew (); Hashtable mod = core.getTransMod (); core.transBegin(); int i=0; for (Enumeration e = ins.keys(); e.hasMoreElements(); i++) { Object l = e.nextElement(); Object r = ins.get(l); ...
http.setDoOutput (true); http.setUseCaches (false); http.setRequestMethod ("POST"); http.setAllowUserInteraction (false);
po.setDoOutput (true); po.setUseCaches (false); po.setRequestMethod ("POST"); po.setAllowUserInteraction (false);
private final String IliasCommit () { core.transEnd(); StringBuffer P = new StringBuffer(); Hashtable ins = core.getTransNew (); Hashtable mod = core.getTransMod (); core.transBegin(); int i=0; for (Enumeration e = ins.keys(); e.hasMoreElements(); i++) { Object l = e.nextElement(); Object r = ins.get(l); ...
OutputStream os = http.getOutputStream();
OutputStream os = po.getOutputStream();
private final String IliasCommit () { core.transEnd(); StringBuffer P = new StringBuffer(); Hashtable ins = core.getTransNew (); Hashtable mod = core.getTransMod (); core.transBegin(); int i=0; for (Enumeration e = ins.keys(); e.hasMoreElements(); i++) { Object l = e.nextElement(); Object r = ins.get(l); ...
http.getInputStream ()
po.getInputStream ()
private final String IliasCommit () { core.transEnd(); StringBuffer P = new StringBuffer(); Hashtable ins = core.getTransNew (); Hashtable mod = core.getTransMod (); core.transBegin(); int i=0; for (Enumeration e = ins.keys(); e.hasMoreElements(); i++) { Object l = e.nextElement(); Object r = ins.get(l); ...
core.transEnd();
private final void IliasFinish () { core.transEnd(); if (!isLaunched) return; IliasLaunchContent ( "../scorm_presentation.php?cmd=view" +"&ref_id=" + IliasRefId ); isLaunched = false; }
IliasScoId = IliasNextScoId;
private final void IliasInitialize () { core.sysPut ("cmi.core.student_id", IliasStudentId); core.sysPut ("cmi.core.student_name", IliasStudentName); if (IliasCredit) { core.sysPut ("cmi.core.credit", "credit"); core.sysPut ("cmi.core.lesson_mode", "normal"); } core.sysPut (IliasScoCmi); core.transBegin();...
IliasScoId = sco_id;
IliasNextScoId = sco_id;
public final void IliasLaunchSco (String sco_id) { if (sco_id == null) return; if (isLaunched && sco_id.equals(IliasScoId)) { say ("SCO " +sco_id +" is already running."); return; } IliasScoCmi.clear(); say ("Launching sco " +sco_id); if (isLaunched) say ("Sco "+IliasScoId +" will be unloaded."); isLaunched...
core.reset(); rv = core.LMSInitialize(s);
public final String LMSInitialize (String s) { String rv = core.LMSInitialize(s); say ("LMSInitialize("+s+")="+rv); if (rv.equals("false")) return rv; IliasInitialize (); return rv; }
Attribute lacksLayoutAttr = graph.getAttribute(LACKS_LAYOUT); String lacksLayout = (lacksLayoutAttr != null ? lacksLayoutAttr.getStringValue() : null); if ("true".equals(lacksLayout)) { graph.doLayout(); }
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.isErrorEnabled()) { log.error...
setAttribute(LACKS_LAYOUT, "false");
public void doLayout() { if(log.isInfoEnabled()) { 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; //...
setAttribute(LACKS_LAYOUT, "true");
private void initGraph() { // create logger here so it's done for all the constructors log = CSMART.createLogger(this.getClass().getName()); Grappa.usePrintList = true; // limit the number of attributes written // the hashtable has to contain the attributes that will be written // but the associated va...
ERXEntityClassDescription.registerDescriptionForClass((Class)n.object());
Class c = (Class)n.object(); cat.debug("classDescriptionNeededForClass: " + c.getName()); ERXEntityClassDescription.registerDescriptionForClass(c);
public void classDescriptionNeededForClass(NSNotification n) { ERXEntityClassDescription.registerDescriptionForClass((Class)n.object()); }
cat.debug("Entity: " + e);
public void classDescriptionNeededForEntityName(NSNotification n) { String name = (String)n.object(); EOEntity e = EOModelGroup.defaultGroup().entityNamed(name); //FIXME: This isn't the best way to get ERXEntityClassDescription.registerDescriptionForEntity(e); }
cat.debug("modelWasAddedNotification: " + ((EOModel)n.object()).name());
public void modelWasAddedNotification(NSNotification n) { // Don't want this guy getting in our way. NSNotificationCenter.defaultCenter().removeObserver((EOModel)n.object()); ERXEntityClassDescription.registerDescriptionForEntitiesInModel((EOModel)n.object()); }
NSArray entities = (NSArray)_entitiesForClass.objectForKey(class1.getName()); if (entities != null) { if (cat.isDebugEnabled()) cat.debug("Registering descriptions for class: " + class1.getName() + " found entities: " + entities.valueForKey("name")); for (Enumeration e = entities.objectEnumerator(); e.hasMoreElements()...
if(false) { NSArray entities = (NSArray)_entitiesForClass.objectForKey(class1.getName()); if (entities != null) { if (cat.isDebugEnabled()) cat.debug("Registering descriptions for class: " + class1.getName() + " found entities: " + entities.valueForKey("name")); for (Enumeration e = entities.objectEnumerator(); e.hasMo...
public static void registerDescriptionForClass(Class class1) { NSArray entities = (NSArray)_entitiesForClass.objectForKey(class1.getName()); if (entities != null) { if (cat.isDebugEnabled()) cat.debug("Registering descriptions for class: " + class1.getName() + " found entitie...
cat.error("Unable to register descriptions for class: " + class1.getName());
EOEntity entity = (EOEntity)_entitiesForClass.objectForKey(class1.getName()); if (entity != null) { if (cat.isDebugEnabled()) cat.debug("Registering description for class: " + class1.getName() + " found entity: " + entity.name()); EOClassDescription.registerClassDescription(new ERXEntityClassDescription(entity), class1...
public static void registerDescriptionForClass(Class class1) { NSArray entities = (NSArray)_entitiesForClass.objectForKey(class1.getName()); if (entities != null) { if (cat.isDebugEnabled()) cat.debug("Registering descriptions for class: " + class1.getName() + " found entitie...
_registeredModelNames.addObject(model.name());
public static void registerDescriptionForEntitiesInModel(EOModel model) { if (!_registeredModelNames.containsObject(model.name())) { for (Enumeration e = model.entities().objectEnumerator(); e.hasMoreElements();) { EOEntity eoentity = (EOEntity)e.nextElement(); _entit...
public ERDRecoverableErrorPage(WOContext context) { super(context); }
public ERDRecoverableErrorPage(WOContext context) { super(context); log.info("ERDRecoverableErrorPage is deprecated, subclass ERD2WMessagePage instead"); }
public ERDRecoverableErrorPage(WOContext context) { super(context); }
if(stage != currentStage || !lastID.equals(contextID)) {
if(stage != currentStage || lastID == null || !lastID.equals(contextID)) {
public void resetDict(int currentStage, String contextID) { int count = 0; String key = keyName(); if(cat.isDebugEnabled()) cat.debug("stage:" + stage + ", currentStage:" + currentStage + ", context:" + contextID + ", lastID:" + lastID); if(stage != currentStage || !lastID.equals(contextID)) { ...
multiArg(1,1,1,1,"");
multiArg(1,1,1,1,"","","");
public void callAll(){ protectedMethod(); packageMethod(); abstractMethod(); synchronizedMethod(); finalMethod(); intType(1); longType(1L); floatType(1f); doubleType(1.0); objectType("1") ; voidType(); multiArg(1,1,1,1,""); }
double arg3, float arg4, Object arg5 ){
double arg3, float arg4, Object arg5, Object arg6, Object arg7 ){
public void multiArg( int arg1, long arg2, double arg3, float arg4, Object arg5 ){ }
Message.debug(node+" was previously selected in root module conf "+node.getRootModuleConf());
private boolean checkConflictSolved(IvyNode node, IvyNode parent) { if (parent.getResolvedRevisions(node.getModuleId(), node.getRootModuleConf()).contains(node.getResolvedId())) { // resolve conflict has already be done with node with the same id // => job already done, we just have to ...
cf.setVerbose(true);
private Vector getServletList() { Vector vec = null; ConfigFinder cf = ConfigFinder.getInstance("csmart"); File inputFile = null; try { inputFile = cf.locateFile("servlets.txt"); } catch(Exception e) { if (log.isErrorEnabled()) { log.error("Could not read servlets file.", e); } } ...
_displayGroup = new WODisplayGroup();
boolean useBatchingDisplayGroup = ERXValueUtilities.booleanValue(d2wContext().valueForKey("useBatchingDisplayGroup")); if(useBatchingDisplayGroup) { _displayGroup = new ERXBatchingDisplayGroup(); } else { _displayGroup = new WODisplayGroup(); }
public WODisplayGroup displayGroup() { if(_displayGroup == null) { _displayGroup = new WODisplayGroup(); _displayGroup.setSelectsFirstObjectAfterFetch(false); if (ERD2WFactory.erFactory().defaultListPageDisplayGroupDelegate() != null) { _displayGroup.setDelegat...
String newName = getUniqueName("New recipe name", "Recipe Name not Unique", recipeNames);
DefaultMutableTreeNode node = getSelectedNode(); final RecipeComponent recipe = (RecipeComponent) node.getUserObject(); String originalName = recipe.getRecipeName(); String newName = getUniqueRecipeName(originalName, true);
public void renameRecipe() { String newName = getUniqueName("New recipe name", "Recipe Name not Unique", recipeNames); if (newName == null) return; DefaultMutableTreeNode node = getSelectedNode(); final RecipeComponent recipe = (Reci...
DefaultMutableTreeNode node = getSelectedNode(); final RecipeComponent recipe = (RecipeComponent) node.getUserObject(); if (newName.equals(recipe.getRecipeName()))
if (newName.equals(originalName))
public void renameRecipe() { String newName = getUniqueName("New recipe name", "Recipe Name not Unique", recipeNames); if (newName == null) return; DefaultMutableTreeNode node = getSelectedNode(); final RecipeComponent recipe = (Reci...
recipeNames.remove(recipe.getRecipeName());
recipeNames.remove(originalName);
public void renameRecipe() { String newName = getUniqueName("New recipe name", "Recipe Name not Unique", recipeNames); if (newName == null) return; DefaultMutableTreeNode node = getSelectedNode(); final RecipeComponent recipe = (Reci...
JOptionPane.showMessageDialog(null, "There is already a recipe named " + recipeName + " in your workspace.\nDelete or rename it first.", "Recipe Exists", JOptionPane.ERROR_MESSAGE); return;
recipeName = getUniqueRecipeName(recipeNames.generateName(recipeName), false); if (recipeName == null) return;
public void selectRecipeFromDatabase() { Map recipeNamesHT = helper.getRecipeNamesFromDatabase(); Set dbRecipeNames = recipeNamesHT.keySet(); if (dbRecipeNames.isEmpty()) { JOptionPane.showMessageDialog(this, "There are no recipes in the database", ...
return localizedStringForKey(key);
return localizedValueForKey(key);
public Object valueForKey(String key) { return localizedStringForKey(key); }
Object result = valueForKey(key);
Object result = localizedValueForKey(key);
public Object valueForKeyPath(String key) { Object result = valueForKey(key); if(result == null) { int indexOfDot = key.indexOf("."); if(indexOfDot > 0) { String firstComponent = key.substring(0, indexOfDot); String otherComponents = key.substring(in...
if (modified)
if (modified && experiment.isInDatabase())
public void exit() { if (modified) saveHelper(); }
public HostConfigurationBuilder(Experiment experiment, CSMART csmart) {
public HostConfigurationBuilder(Experiment experiment, ExperimentBuilder experimentBuilder) {
public HostConfigurationBuilder(Experiment experiment, CSMART csmart) { this.experiment = experiment; this.csmart = csmart; isEditable = experiment.isEditable(); isRunnable = experiment.isRunnable(); initDisplay(); }
this.csmart = csmart;
this.experimentBuilder = experimentBuilder;
public HostConfigurationBuilder(Experiment experiment, CSMART csmart) { this.experiment = experiment; this.csmart = csmart; isEditable = experiment.isEditable(); isRunnable = experiment.isRunnable(); initDisplay(); }
System.out.println("CSMARTConsole deleteNodeMenuItem called with null path; ignoring");
System.out.println("HostConfigurationBuilder deleteNodeMenuItem called with null path; ignoring");
private void deleteNodeFromTree(JTree tree) { TreePath path = tree.getSelectionPath(); if (path == null) { System.out.println("CSMARTConsole deleteNodeMenuItem called with null path; ignoring"); return; } DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)path.getLastPathCompone...
System.out.println("CSMARTConsole newNodeInTree called with null path; ignoring");
System.out.println("HostConfigurationBuilder newNodeInTree called with null path; ignoring");
private void newNodeInTree(JTree tree) { TreePath path = tree.getSelectionPath(); if (path == null) { System.out.println("CSMARTConsole newNodeInTree called with null path; ignoring"); return; } DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)path.getLastPathComponent(); S...
modified = true;
experimentBuilder.setModified(true);
public void treeNodesChanged(TreeModelEvent e) { Object source = e.getSource(); if (hostTree.getModel().equals(source)) setNameServerHostName(); modified = true; }
modified = true;
experimentBuilder.setModified(true);
public void treeNodesInserted(TreeModelEvent e) { // System.out.println("CSMARTConsole: treeNodesInserted"); Object source = e.getSource(); if (hostTree.getModel().equals(source)) treeNodesInsertedInHostTree(e); else if (nodeTree.getModel().equals(source)) treeNodesInsertedInNodeTree(e); m...
modified = true;
experimentBuilder.setModified(true);
public void treeNodesRemoved(TreeModelEvent e) { Object source = e.getSource(); if (hostTree.getModel().equals(source)) treeNodesRemovedFromHostTree(e); else if (nodeTree.getModel().equals(source)) treeNodesRemovedFromNodeTree(e); modified = true; }
substitutions.put(":comp_alib_id", nodeName);
private void addAgents(Experiment experiment, ArrayList nodes, AgentComponent[] agents, String trialId, String assemblyMatch) { Iterator iter = nodes.iterator(); try { Connection conn = DBUtils.getConnection(); Map substitutions =...
+ experimentName);
+ originalExperimentName);
private void createCMTExperiment(DefaultMutableTreeNode node, String experimentName, String experimentId, String trialId, boolean isCloned) { // System.out.println("Creating so...
createCMTExperiment(node, dialog.getExperimentName(),
createCMTExperiment(node, originalExperimentName, dialog.getExperimentName(),
private void selectExperimentFromDatabase(DefaultMutableTreeNode node) { 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....
options.setObjectForKey("Form.serialize(this.form) + \"&" + name + "=" + valueForBinding("value", component) + "\"", "parameters");
options.setObjectForKey("Form.serialize(this.form) + \"&" + KEY_AJAX_SUBMIT_BUTTON_NAME + "=" + name + "\"", "parameters");
public NSDictionary createAjaxOptions(WOComponent component) { String name = nameInContext(component.context(), component); NSMutableArray ajaxOptionsArray = new NSMutableArray(); ajaxOptionsArray.addObject(new AjaxOption("onSuccess", AjaxOption.SCRIPT)); ajaxOptionsArray.addObject(new AjaxOption("onFailure",...
((wocontext._isMultipleSubmitForm() && worequest.formValueForKey(nameInContext(wocontext, wocomponent)) != null)
((wocontext._isMultipleSubmitForm() && nameInContext.equals(worequest.formValueForKey(KEY_AJAX_SUBMIT_BUTTON_NAME)))
public WOActionResults invokeAction(WORequest worequest, WOContext wocontext) { WOActionResults result = null; WOComponent wocomponent = wocontext.component(); boolean shouldHandleRequest = (!disabledInComponent(wocomponent) && wocontext._wasFormSubmitted()) && ((wocontext._isMultipleSubmitFo...
this.released = false;
public FileLockImpl (FileDescriptor fd, FileChannel channel, long position, long size, boolean shared) { super (channel, position, size, shared); this.fd = fd; this.released = false; }
notifyCondition = s.toLowerCase();
if (s == null) notifyCondition = s; else notifyCondition = s.toLowerCase();
public void setNotifyCondition(String s) { notifyCondition = s.toLowerCase(); }
if (useHook) { if (sig.equals(Constants.SIG_STATIC)) { seenStatic = true; e.invoke_static_this(STATIC_HOOK); return e; }
if (useHook && sig.equals(Constants.SIG_STATIC) && !TypeUtils.isInterface(access)) { seenStatic = true; e.invoke_static_this(STATIC_HOOK);
public CodeEmitter begin_method(int access, Signature sig, Type[] exceptions) { CodeVisitor v = cv.visitMethod(access, sig.getName(), sig.getDescriptor(), TypeUtils.toInternalNames(exceptions)); ...
if (useHook) {
if (useHook && !TypeUtils.isInterface(access)) {
public void end_class() { if (useHook) { if (hook != null && !seenStatic) { CodeEmitter e = begin_static(); e.return_value(); e.end_method(); } if (seenStatic) { getStaticHook(); // make sure hook is not null ...
if (connected) throw new IllegalStateException ("Already connected");
public void addRequestProperty(String key, String value) { if (getRequestProperty (key) == null) { setRequestProperty (key, value); } }
if (connected) throw new IllegalStateException ("Already connected");
public String getRequestProperty(String key) { // Overridden by subclasses that support reading header fields from the // request. return null; }
protected static String guessContentTypeFromName(String fname)
public static String guessContentTypeFromName(String fname)
protected static String guessContentTypeFromName(String fname) { int dot = fname.lastIndexOf ("."); if (dot != -1) { if (dot == fname.length()) return ("application/octet-stream"); else fname = fname.substring (dot + 1); } String type = MimeTypes.getMimeTypeFromExtension (fname); ...
throw new IllegalAccessError("Already connected");
throw new IllegalStateException ("Already connected");
public void setAllowUserInteraction(boolean allowed) { if (connected) throw new IllegalAccessError("Already connected"); allowUserInteraction = allowed; }
throw new IllegalAccessError("Already connected");
throw new IllegalStateException ("Already connected");
public void setDoInput(boolean doinput) { if (connected) throw new IllegalAccessError("Already connected"); doInput = doinput; }
throw new IllegalAccessError("Already connected");
throw new IllegalStateException ("Already connected");
public void setDoOutput(boolean dooutput) { if (connected) throw new IllegalAccessError("Already connected"); doOutput = dooutput; }