rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
generateEquals();
protected void generate() throws NoSuchMethodException, NoSuchFieldException { if (!keyInterface.isInterface()) { throw new IllegalArgumentException(keyInterface + " is not an interface"); } Method[] methods = keyInterface.getDeclaredMethods(); for (int i = 0; i < methods.leng...
String assetClassName = tokens.sval; aad.setAssetClass(assetClassName); if(log.isDebugEnabled()) { log.debug("AgentAssetData Class: " + aad.getAssetClass());
aad.setAssetClass("Organization"); if(log.isInfoEnabled()) { log.info("Switching AgentAssetData Class from: " + tokens.sval + " to: " + aad.getAssetClass());
public AgentAssetData parsePrototypeFile(String cId) { clusterId = cId; String dataItem = ""; int newVal; String filename = getFileName(); BufferedReader input = null; Reader fileStream = null; AgentAssetData aad = new AgentAssetData(null); if(log.isDebugEnabled()) { log.debug("Setting IN...
if(assetClassName.equals("Entity")) { aad.setType(AgentAssetData.ENTITY); }
public AgentAssetData parsePrototypeFile(String cId) { clusterId = cId; String dataItem = ""; int newVal; String filename = getFileName(); BufferedReader input = null; Reader fileStream = null; AgentAssetData aad = new AgentAssetData(null); if(log.isDebugEnabled()) { log.debug("Setting IN...
createLogger();
public ConsoleTreeObject(BaseComponent component) { name = component.toString(); this.component = component; }
log = CSMART.createLogger("org.cougaar.tools.csmart.core.property");
createLogger();
protected ConfigurableComponent(String name) { if (name == null) { name = getClass().getName(); int ix = name.lastIndexOf('.'); if (ix >= 0) name = name.substring(ix + 1); name += "-" + ++nameCount; } myName = new ComponentName(null, name); log = CSMART.createLogger("org.cougaar.tools....
createLogger();
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); Map properties = getMyProperties(); int n = stream.readInt(); myPropertyEntries = new ArrayList(n); for (int i = 0; i < n; i++) { PropertyEntry entry = (PropertyEntry)stre...
Enumeration enum = as.getAttributes(); while (enum.hasMoreElements()) { VizAttr attr = (VizAttr) enum.nextElement();
Enumeration enumList = as.getAttributes(); while (enumList.hasMoreElements()) { VizAttr attr = (VizAttr) enumList.nextElement();
public void printAttrStmt(VizAttrStmt as) { Enumeration enum = as.getAttributes(); while (enum.hasMoreElements()) { VizAttr attr = (VizAttr) enum.nextElement(); // The attribute value must be raw. DO NOT ESCAPE. // Some escape sequence exists: // justificat...
}
public void printAttrStmt(VizAttrStmt as) { Enumeration enum = as.getAttributes(); while (enum.hasMoreElements()) { VizAttr attr = (VizAttr) enum.nextElement(); // The attribute value must be raw. DO NOT ESCAPE. // Some escape sequence exists: // justificat...
int []types = {AspectType.COST}; double []results = {(double) 0.0}; AllocationResult estAR =
AspectValue[] values = {AspectValue.newAspectValue(AspectType.COST, 0.0)}; AllocationResult estAR =
private void processTasks(Enumeration tasks) { while(tasks.hasMoreElements()) { Task task = (Task) tasks.nextElement(); Verb verb = task.getVerb(); if (verb.equals(Verb_Start)) { startStatistics(); } else if (verb.equals(Verb_Sample)) { sampleStatistics(); } else if (verb.equ...
types, results);
values);
private void processTasks(Enumeration tasks) { while(tasks.hasMoreElements()) { Task task = (Task) tasks.nextElement(); Verb verb = task.getVerb(); if (verb.equals(Verb_Start)) { startStatistics(); } else if (verb.equals(Verb_Sample)) { sampleStatistics(); } else if (verb.equ...
setSelection(NSKeyValueCoding.Utility.valueForKey(realSourceObject(), realRelationshipKey()));
Object object = realSourceObject(); String key = realRelationshipKey(); Object selection = NSKeyValueCoding.Utility.valueForKey(object,key); setSelection(selection);
public Object selection() { if (_selection == null) { setSelection(NSKeyValueCoding.Utility.valueForKey(realSourceObject(), realRelationshipKey())); } // deal with isMandatory if ((_selection==null) && !isMandatory()) { setSelection(NO_SELECTION_STRING); } ...
log = new PrintWriter(new FileWriter("PopulateDbQuery.log"));
public PopulateDb(String cmtType, String hnaType, String csmType, String experimentName, String exptId, String trialId, boolean createNew) throws SQLException, IOException { if (cmtType == null) throw new IllegalArgumentException("null cmtType"); if ...
return stmt.executeQuery(query);
long startTime = 0; if (log != null) startTime = System.currentTimeMillis(); ResultSet rs = stmt.executeQuery(query); if (log != null) { long endTime = System.currentTimeMillis(); log.println((endTime - startTime) + " " + query); } return rs;
private ResultSet executeQuery(Statement stmt, String query) throws SQLException { if (query == null) throw new IllegalArgumentException("executeQuery: null query"); try { return stmt.executeQuery(query); } catch (SQLException sqle) { if (debug) sqle.printStackTrace(); ...
if (debug) sqle.printStackTrace();
System.err.println("SQLException query: " + query);
private ResultSet executeQuery(Statement stmt, String query) throws SQLException { if (query == null) throw new IllegalArgumentException("executeQuery: null query"); try { return stmt.executeQuery(query); } catch (SQLException sqle) { if (debug) sqle.printStackTrace(); ...
if (debug) sqle.printStackTrace();
System.err.println("SQLException query: " + query);
private void executeUpdate(Statement stmt, String query) throws SQLException { if (query == null) throw new IllegalArgumentException("executeUpdate: null query"); try { stmt.executeUpdate(query); } catch (SQLException sqle) { if (debug) sqle.printStackTrace(); t...
return sqlQuote(CLONE_SET_ID + "-" + agentName);
return sqlQuote(CLONE_SET_PREFIX + agentName);
private String getAgentAlibId(String agentName) { return sqlQuote(CLONE_SET_ID + "-" + agentName); }
if (r.getRole().equals(RelationshipData.SUPERIOR)) { substitutions.put(":role:", sqlQuote("Subordinate")); } else { substitutions.put(":role:", sqlQuote(r.getRole()));
long startTime = r.getStartTime(); long endTime = r.getEndTime(); substitutions.put(":role:", sqlQuote(r.getRole())); substitutions.put(":supporting:", getComponentAlibId(data)); substitutions.put(":supported:", getAgentAlibId(r.getSupported())); substitutions.put(":start_date:", "?"); substitutions.put(":end_date:", "...
private void populateAgent(ComponentData data, boolean isAdded) throws SQLException { AgentAssetData assetData = data.getAgentAssetData(); if (assetData == null) return; substitutions.put(":component_lib_id:", getComponentLibId(data)); substitutions.put(":agent_org_prototype:", sqlQuote(...
substitutions.put(":supporting:", getComponentAlibId(data)); substitutions.put(":supported:", getAgentAlibId(r.getCluster())); substitutions.put(":start_date:", sqlQuote(r.getStartTime())); substitutions.put(":end_date:", sqlQuote(r.getStopTime())); ResultSet rs = executeQuery(stmt, dbp.getQuery(CHECK_RELATIONSHIP, sub...
pstmt.close();
private void populateAgent(ComponentData data, boolean isAdded) throws SQLException { AgentAssetData assetData = data.getAgentAssetData(); if (assetData == null) return; substitutions.put(":component_lib_id:", getComponentLibId(data)); substitutions.put(":agent_org_prototype:", sqlQuote(...
if (! this.isLightweight() && dispatcher == null) { dispatcher = new LightweightDispatcher (this); dispatcher.enableEvents (component[i].eventMask); }
private void addNotifyContainerChildren() { synchronized (getTreeLock ()) { for (int i = ncomponents; --i >= 0; ) { component[i].addNotify(); if (component[i].isLightweight ()) { enableEvents(component[i].eventMask); if (peer != null && !isLightweight ()) ena...
if (dispatcher != null && dispatcher.handleEvent (e)) return;
void dispatchEventImpl(AWTEvent e) { if ((e.id <= ContainerEvent.CONTAINER_LAST && e.id >= ContainerEvent.CONTAINER_FIRST) && (containerListener != null || (eventMask & AWTEvent.CONTAINER_EVENT_MASK) != 0)) processEvent(e); else super.dispatchEventImpl(e); }
Rectangle clip = gfx.getClipBounds().intersection(bounds);
Rectangle oldClip = gfx.getClipBounds(); if (oldClip == null) oldClip = bounds; Rectangle clip = oldClip.intersection(bounds);
private void visitChild(Graphics gfx, GfxVisitor visitor, Component comp) { Rectangle bounds = comp.getBounds(); Rectangle clip = gfx.getClipBounds().intersection(bounds); if (clip.isEmpty()) return; Graphics gfx2 = gfx.create(); try { gfx2.setClip(clip.x, clip.y, clip.wi...
Graphics gfx2 = gfx.create();
boolean clipped = false; boolean translated = false;
private void visitChild(Graphics gfx, GfxVisitor visitor, Component comp) { Rectangle bounds = comp.getBounds(); Rectangle clip = gfx.getClipBounds().intersection(bounds); if (clip.isEmpty()) return; Graphics gfx2 = gfx.create(); try { gfx2.setClip(clip.x, clip.y, clip.wi...
gfx2.setClip(clip.x, clip.y, clip.width, clip.height); gfx2.translate(bounds.x, bounds.y); visitor.visit(comp, gfx2);
gfx.setClip(clip.x, clip.y, clip.width, clip.height); clipped = true; gfx.translate(bounds.x, bounds.y); translated = true; visitor.visit(comp, gfx);
private void visitChild(Graphics gfx, GfxVisitor visitor, Component comp) { Rectangle bounds = comp.getBounds(); Rectangle clip = gfx.getClipBounds().intersection(bounds); if (clip.isEmpty()) return; Graphics gfx2 = gfx.create(); try { gfx2.setClip(clip.x, clip.y, clip.wi...
gfx2.dispose ();
if (translated) gfx.translate (-bounds.x, -bounds.y); if (clipped) gfx.setClip (oldClip.x, oldClip.y, oldClip.width, oldClip.height);
private void visitChild(Graphics gfx, GfxVisitor visitor, Component comp) { Rectangle bounds = comp.getBounds(); Rectangle clip = gfx.getClipBounds().intersection(bounds); if (clip.isEmpty()) return; Graphics gfx2 = gfx.create(); try { gfx2.setClip(clip.x, clip.y, clip.wi...
nativeContainer = c;
LightweightDispatcher(Container c) { }
eventMask |= l;
void enableEvents(long l) { }
ConsoleDesktop.this.componentMoved(e.getComponent());
ConsoleDesktop.this.componentMoved(e.getComponent(), true);
public void componentMoved(ComponentEvent e) { ConsoleDesktop.this.componentMoved(e.getComponent()); }
ConsoleDesktop.this.componentMoved(e.getComponent());
ConsoleDesktop.this.componentMoved(e.getComponent(), true);
public void componentShown(ComponentEvent e) { ConsoleDesktop.this.componentMoved(e.getComponent()); }
componentMoved(c);
componentMoved(c, false);
protected void addImpl(Component c, Object constraints, int index) { componentMoved(c); super.addImpl(c, constraints, index); c.addComponentListener(myComponentListener); }
private void componentMoved(Component c) {
private void componentMoved(Component c, boolean peek) {
private void componentMoved(Component c) { if (c == this) return; // Don't care about this Point loc = c.getLocation(); Insets insets = this.getInsets(); int x = Math.max(0, Math.min(loc.x, this.getWidth() - insets.left - insets.right - M)); int y = Math.max(0, Math.min(loc.y, this.getHeight() - i...
Point loc = c.getLocation();
Rectangle bb = c.getBounds();
private void componentMoved(Component c) { if (c == this) return; // Don't care about this Point loc = c.getLocation(); Insets insets = this.getInsets(); int x = Math.max(0, Math.min(loc.x, this.getWidth() - insets.left - insets.right - M)); int y = Math.max(0, Math.min(loc.y, this.getHeight() - i...
int x = Math.max(0, Math.min(loc.x, this.getWidth() - insets.left - insets.right - M)); int y = Math.max(0, Math.min(loc.y, this.getHeight() - insets.top - insets.bottom - M)); if (loc.x > x || loc.y > y) {
int mx = peek ? M : bb.width; int my = peek ? M : bb.height; int x = Math.max(0, Math.min(bb.x, this.getWidth() - insets.left - insets.right - mx)); int y = Math.max(0, Math.min(bb.y, this.getHeight() - insets.top - insets.bottom - my)); if (bb.x > x || bb.y > y) {
private void componentMoved(Component c) { if (c == this) return; // Don't care about this Point loc = c.getLocation(); Insets insets = this.getInsets(); int x = Math.max(0, Math.min(loc.x, this.getWidth() - insets.left - insets.right - M)); int y = Math.max(0, Math.min(loc.y, this.getHeight() - i...
System.out.println("resized " + c);
private void componentResized(Component c) { System.out.println("resized " + c); if (c != this) return; // Don't care about these JInternalFrame[] frames = getAllFrames(); for (int i = 0; i < frames.length; i++) { componentMoved(frames[i]); } }
componentMoved(frames[i]);
componentMoved(frames[i], true);
private void componentResized(Component c) { System.out.println("resized " + c); if (c != this) return; // Don't care about these JInternalFrame[] frames = getAllFrames(); for (int i = 0; i < frames.length; i++) { componentMoved(frames[i]); } }
statisticsStore().setPassword("4Stats");
public Application() { setContextClassName("er.extensions.ERXWOContext"); setPageRefreshOnBacktrackEnabled(true); statisticsStore().setPassword("4Stats"); // http://myhost:aPort/cgi-bin/WebObjects/MyApp.woa/wa/WOEventSetup EOEventCenter.setPassword("4Events"); setDefaultReq...
EOEventCenter.setPassword("4Events");
public Application() { setContextClassName("er.extensions.ERXWOContext"); setPageRefreshOnBacktrackEnabled(true); statisticsStore().setPassword("4Stats"); // http://myhost:aPort/cgi-bin/WebObjects/MyApp.woa/wa/WOEventSetup EOEventCenter.setPassword("4Events"); setDefaultReq...
ERXLocalizer.setFrameworkSearchPath(new NSArray(new Object [] { "app", "BTBusinessLogic", "ERDirectToWeb", "ERExtensions"} ));
public Application() { setContextClassName("er.extensions.ERXWOContext"); setPageRefreshOnBacktrackEnabled(true); statisticsStore().setPassword("4Stats"); // http://myhost:aPort/cgi-bin/WebObjects/MyApp.woa/wa/WOEventSetup EOEventCenter.setPassword("4Events"); setDefaultReq...
EOEditingContext ec=new EOEditingContext(); NSArray everybody=EOUtilities.objectsForEntityNamed(ec,"People"); for (Enumeration e=everybody.objectEnumerator(); e.hasMoreElements();) { EOEnterpriseObject person=(EOEnterpriseObject)e.nextElement(); NSDictionary bindings = new NSDictionary(new Object[] {person}, new Object...
EOEditingContext ec=ERXEC.newEditingContext(); try { NSArray everybody=People.clazz.allObjects(ec); for (Enumeration e=everybody.objectEnumerator(); e.hasMoreElements();) { People person=(People)e.nextElement(); NSDictionary bindings = new NSDictionary(new Object[] {person}, new Object[] {"user"}); NSArray unreadBugs=p...
public void runBatchReport() { // we run over all people in the DB and send them a summary email if they have unread bugs EOEditingContext ec=new EOEditingContext(); NSArray everybody=EOUtilities.objectsForEntityNamed(ec,"People"); for (Enumeration e=everybody.objectEnumerator(); e.hasMo...
} finally { ec.unlock();
public void runBatchReport() { // we run over all people in the DB and send them a summary email if they have unread bugs EOEditingContext ec=new EOEditingContext(); NSArray everybody=EOUtilities.objectsForEntityNamed(ec,"People"); for (Enumeration e=everybody.objectEnumerator(); e.hasMo...
public FileChannelImpl (int fd, Object obj)
public FileChannelImpl (FileDescriptor fd, boolean write, Object obj)
public FileChannelImpl (int fd, Object obj) { this.fd = fd; this.file_obj = obj; }
if (!(obj instanceof RandomAccessFile) && !(obj instanceof FileInputStream) && !(obj instanceof FileOutputStream)) throw new InternalError ();
public FileChannelImpl (int fd, Object obj) { this.fd = fd; this.file_obj = obj; }
nio_msync (fd, address, length);
nio_msync (address, length);
public void force (boolean metaData) throws IOException { if (!isOpen ()) throw new ClosedChannelException (); // FIXME: What to do with metaData ? nio_msync (fd, address, length); }
nio_unmmap_file (fd, address, (int) length);
protected void implCloseChannel() throws IOException { if (address != 0) { nio_unmmap_file (fd, address, (int) length); address = 0; } // FIXME fd = 0; if (file_obj instanceof RandomAccessFile) { RandomAccessFile o = (RandomAccessFile) file_obj; o.close(); ...
fd = 0;
protected void implCloseChannel() throws IOException { if (address != 0) { nio_unmmap_file (fd, address, (int) length); address = 0; } // FIXME fd = 0; if (file_obj instanceof RandomAccessFile) { RandomAccessFile o = (RandomAccessFile) file_obj; o.close(); ...
throw new Error ("not implemented");
return implPosition ();
public long position () throws IOException { if (!isOpen ()) throw new ClosedChannelException (); throw new Error ("not implemented"); }
throw new Error ("not implemented");
return implTruncate (size);
public FileChannel truncate (long size) throws IOException { if (size < 0) throw new IllegalArgumentException (); if (!isOpen ()) throw new ClosedChannelException (); // FIXME: check for NonWritableChannelException throw new Error ("not implemented"); }
StringBuffer buf = new StringBuffer ();
AttributedFormatBuffer buf = new AttributedFormatBuffer ();
private final void applyPatternWithSymbols (String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExpon...
positivePrefix = buf.toString();
buf.sync(); positivePrefix = buf.getBuffer().toString(); positivePrefixRanges = buf.getRanges(); positivePrefixAttrs = buf.getAttributes();
private final void applyPatternWithSymbols (String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExpon...
positiveSuffix = buf.toString();
buf.sync(); positiveSuffix = buf.getBuffer().toString(); positiveSuffixRanges = buf.getRanges(); positiveSuffixAttrs = buf.getAttributes();
private final void applyPatternWithSymbols (String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExpon...
negativePrefix = buf.toString();
buf.sync(); negativePrefix = buf.getBuffer().toString(); negativePrefixRanges = buf.getRanges(); negativePrefixAttrs = buf.getAttributes();
private final void applyPatternWithSymbols (String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExpon...
negativeSuffix = buf.toString();
buf.sync(); negativeSuffix = buf.getBuffer().toString(); negativeSuffixRanges = buf.getRanges(); negativeSuffixAttrs = buf.getAttributes();
private final void applyPatternWithSymbols (String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExpon...
groupingUsed ? groupingSize + 1: 0);
groupingUsed ? groupingSize + 1: groupingSize);
private final String computePattern (DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer (); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumI...
if (Double.isNaN(number)) { dest.append(symbols.getNaN()); if (fieldPos != null && fieldPos.getField() == INTEGER_FIELD) { int index = dest.length(); fieldPos.setBeginIndex(index - symbols.getNaN().length()); fieldPos.setEndIndex(index); } return dest; } boolean is_neg = number < 0; if (is_neg) { if (negativePrefix !=...
formatInternal (number, new StringFormatBuffer(dest), fieldPos);
public StringBuffer format (double number, StringBuffer dest, FieldPosition fieldPos) { // A very special case. if (Double.isNaN(number)) { dest.append(symbols.getNaN()); if (fieldPos != null && fieldPos.getField() == INTEGER_FIELD) { int index = dest.length(); fieldPos.setBeginIndex(ind...
private final int scanFix (String pattern, int index, StringBuffer buf,
private final int scanFix (String pattern, int index, FormatBuffer buf,
private final int scanFix (String pattern, int index, StringBuffer buf, String patChars, DecimalFormatSymbols syms, boolean is_suffix) { int len = pattern.length(); buf.setLength(0); boolean multiplierSet = false; while (index < len) { char c = pattern.charAt(index); if (c == '\'' && i...
buf.setLength(0);
boolean quoteStarted = false; buf.clear();
private final int scanFix (String pattern, int index, StringBuffer buf, String patChars, DecimalFormatSymbols syms, boolean is_suffix) { int len = pattern.length(); buf.setLength(0); boolean multiplierSet = false; while (index < len) { char c = pattern.charAt(index); if (c == '\'' && i...
++index;
index++;
private final int scanFix (String pattern, int index, StringBuffer buf, String patChars, DecimalFormatSymbols syms, boolean is_suffix) { int len = pattern.length(); buf.setLength(0); boolean multiplierSet = false; while (index < len) { char c = pattern.charAt(index); if (c == '\'' && i...
else if (c == '\'' && index + 2 < len && pattern.charAt(index + 2) == '\'')
else if (c == '\'')
private final int scanFix (String pattern, int index, StringBuffer buf, String patChars, DecimalFormatSymbols syms, boolean is_suffix) { int len = pattern.length(); buf.setLength(0); boolean multiplierSet = false; while (index < len) { char c = pattern.charAt(index); if (c == '\'' && i...
buf.append(pattern.charAt(index + 1)); index += 2;
quoteStarted = true;
private final int scanFix (String pattern, int index, StringBuffer buf, String patChars, DecimalFormatSymbols syms, boolean is_suffix) { int len = pattern.length(); buf.setLength(0); boolean multiplierSet = false; while (index < len) { char c = pattern.charAt(index); if (c == '\'' && i...
buf.append(syms.getInternationalCurrencySymbol()); ++index;
buf.append(syms.getInternationalCurrencySymbol(), NumberFormat.Field.CURRENCY); index++;
private final int scanFix (String pattern, int index, StringBuffer buf, String patChars, DecimalFormatSymbols syms, boolean is_suffix) { int len = pattern.length(); buf.setLength(0); boolean multiplierSet = false; while (index < len) { char c = pattern.charAt(index); if (c == '\'' && i...
buf.append(syms.getCurrencySymbol());
buf.append(syms.getCurrencySymbol(), NumberFormat.Field.CURRENCY);
private final int scanFix (String pattern, int index, StringBuffer buf, String patChars, DecimalFormatSymbols syms, boolean is_suffix) { int len = pattern.length(); buf.setLength(0); boolean multiplierSet = false; while (index < len) { char c = pattern.charAt(index); if (c == '\'' && i...
buf.append(c);
buf.append(c, NumberFormat.Field.PERCENT);
private final int scanFix (String pattern, int index, StringBuffer buf, String patChars, DecimalFormatSymbols syms, boolean is_suffix) { int len = pattern.length(); buf.setLength(0); boolean multiplierSet = false; while (index < len) { char c = pattern.charAt(index); if (c == '\'' && i...
buf.append(c);
buf.append(c, NumberFormat.Field.PERMILLE);
private final int scanFix (String pattern, int index, StringBuffer buf, String patChars, DecimalFormatSymbols syms, boolean is_suffix) { int len = pattern.length(); buf.setLength(0); boolean multiplierSet = false; while (index < len) { char c = pattern.charAt(index); if (c == '\'' && i...
if (quoteStarted) throw new IllegalArgumentException ("pattern is lacking a closing quote");
private final int scanFix (String pattern, int index, StringBuffer buf, String patChars, DecimalFormatSymbols syms, boolean is_suffix) { int len = pattern.length(); buf.setLength(0); boolean multiplierSet = false; while (index < len) { char c = pattern.charAt(index); if (c == '\'' && i...
maximumIntegerDigits = groupingSize; groupingSize = 0; if (maximumIntegerDigits > minimumIntegerDigits && maximumIntegerDigits > 0) { minimumIntegerDigits = 1; exponentRound = maximumIntegerDigits; } else exponentRound = 1;
private final int scanFormat (String pattern, int index, String patChars, DecimalFormatSymbols syms, boolean is_positive) { int max = pattern.length(); int countSinceGroup = 0; int zeroCount = 0; boolean saw_group = false; // // Scan integer part. // while (index < max) { char c = ...
if (name == null || value == null) return; if (value != null) value = value.trim(); if (name != null) name = name.trim();
public void addRow(String name, String value) { int index = names.indexOf(name); if (index == -1) { names.add(name); values.add(value); if (isLocal) globalFlags.add(""); fireTableRowsInserted(index, index); } else { if (isCellEditable(index, 0)) { values.set(index, valu...
array.add( superName.replace('/', '.') );
if(superName != null){ array.add( superName.replace('/', '.') ); }
public static String[] getClassInfo(ClassReader r) { final List array = new ArrayList(); try { r.accept(new ClassAdapter(null) { public void visit(int version, int access, String name, ...
array.add( superName.replace('/', '.') );
if(superName != null){ array.add( superName.replace('/', '.') ); }
public void visit(int version, int access, String name, String superName, String[] interfaces, String sourceFile) { arra...
if (debugging())
if (debugging()) {
public Object getAttribute(String name, Configuration modeConf, Map objectModel) throws ConfigurationException { String original = super.getAttributeValues(name, modeConf, objectModel)[0] .toString(); String attributeValue = this.getAttributeValues(name, modeC...
if (debugging())
public Object getAttribute(String name, Configuration modeConf, Map objectModel) throws ConfigurationException { String original = super.getAttributeValues(name, modeConf, objectModel)[0] .toString(); String attributeValue = this.getAttributeValues(name, modeC...
}
public Object getAttribute(String name, Configuration modeConf, Map objectModel) throws ConfigurationException { String original = super.getAttributeValues(name, modeConf, objectModel)[0] .toString(); String attributeValue = this.getAttributeValues(name, modeC...
_safeInvokeSelectorOnObjectWithParameters(EditingContextWillRevertObjectsDelegateSelector, delegate, parameters);
ERXSelectorUtilities.invoke(EditingContextWillRevertObjectsDelegateSelector, delegate, parameters);
public void revert() { boolean wasAutoLocked = autoLock("revert"); try { final Object delegate = delegate(); final boolean delegateImplementsWillRevert = delegate != null && EditingContextWillRevertObjectsDelegateSelector.implementedByObject(delegate); ...
_safeInvokeSelectorOnObjectWithParameters(EditingContextDidRevertObjectsDelegateSelector, delegate, parameters);
ERXSelectorUtilities.invoke(EditingContextDidRevertObjectsDelegateSelector, delegate, parameters);
public void revert() { boolean wasAutoLocked = autoLock("revert"); try { final Object delegate = delegate(); final boolean delegateImplementsWillRevert = delegate != null && EditingContextWillRevertObjectsDelegateSelector.implementedByObject(delegate); ...
numberFormat.setMaximumFractionDigits (0);
public SimpleDateFormat() { /* * There does not appear to be a standard API for determining * what the default pattern for a locale is, so use package-scope * variables in DateFormatSymbols to encapsulate this. */ super(); Locale locale = Locale.getDefault(); calendar = new GregorianCal...
additionalExceptions = NSArray.EmptyArray;
return NSArray.EmptyArray;
public NSArray additionalExceptions() { if (additionalExceptions == null) { additionalExceptions = super.additionalExceptions(); if (additionalExceptions == null) additionalExceptions = NSArray.EmptyArray; } return additionalExceptions; }
+ propertyKey() + "; type: " + type() + ">";
+ propertyKey() + "; type: " + type() + "; additionalExceptions: " + additionalExceptions() + ">";
public String toString() { return "<" + getClass().getName() + " object: " + object() + "; propertyKey: " + propertyKey() + "; type: " + type() + ">"; }
saveMenuItem.setEnabled(this.metrics.inputFile != null);
public CSMARTMetricsFrame(String title, ArrayList names, ArrayList data ) { super(title); this.title = NamedFrame.getNamedFrame().addFrame(title, this); setTitle(this.title); this.metrics = new CSMARTMetrics(names, data); myFrame = this; init(); //saveMenuItem.setEnabled(false); }
saveMenuItem.setEnabled(metrics.inputFile != null);
public void actionPerformed(ActionEvent evt) { String command = ((JMenuItem)evt.getSource()).getText(); if (command.equals(CLOSE_MENU_ITEM)) { NamedFrame.getNamedFrame().removeFrame(this); this.dispose(); return; } // save graph into file it was read from if (command.equals(SAVE_MENU_ITE...
log = CSMART.createLogger(getClass().getPackage().toString());
createLogger();
public CMTDialog(JFrame parent, Organizer organizer, String experimentName, String experimentId) { super(parent, "Threads and Groups", true); // modal dialog log = CSMART.createLogger(getClass().getPackage().toString()); this.organizer = organizer; // to get unique names ...
public String getConfigLine();
String getConfigLine();
public String getConfigLine();
public void writeIniFile(File configDir) throws IOException;
void writeIniFile(File configDir) throws IOException;
public void writeIniFile(File configDir) throws IOException;
modifyComponentData(cd);
return modifyComponentData(cd);
protected ComponentData getComponentData() { ComponentData cd = new GenericComponentData(); cd.setType(ComponentData.RECIPE); cd.setClassName(RECIPE_CLASS); cd.setName(getRecipeName()); cd.setOwner(null); cd.setParent(null); AgentComponent[] agents = getAgents(); for (int i = 0; i < agents.len...
return addComponentData(cd);
protected ComponentData getComponentData() { ComponentData cd = new GenericComponentData(); cd.setType(ComponentData.RECIPE); cd.setClassName(RECIPE_CLASS); cd.setName(getRecipeName()); cd.setOwner(null); cd.setParent(null); AgentComponent[] agents = getAgents(); for (int i = 0; i < agents.len...
public static void appendToResponse(WOResponse response, WOContext context, AjaxDynamicElement element, String observeFieldID, String updateContainerID, boolean fullSubmit, NSDictionary options) { WOComponent component = context.component(); response.appendContentString("new Form.Element.Observer($('" + observeFieldID...
public void appendToResponse(WOResponse response, WOContext context) { WOComponent component = context.component(); String observeFieldID = (String) valueForBinding("observeFieldID", component); String updateContainerID = (String) valueForBinding("updateContainerID", component); if (observeFieldID != null && updateCont...
public static void appendToResponse(WOResponse response, WOContext context, AjaxDynamicElement element, String observeFieldID, String updateContainerID, boolean fullSubmit, NSDictionary options) { WOComponent component = context.component(); response.appendContentString("new Form.Element.Observer($('" + observeFi...
observerOptions.setObjectForKey("true", "asynchronous"); observerOptions.setObjectForKey("'post'", "method"); if (!fullSubmit) { response.appendContentString("var observedFieldForm = $('" + observeFieldID + "').form;\n"); response.appendContentString("var observedFieldFormAction = observedFieldForm.action;\n"); r...
public static void appendToResponse(WOResponse response, WOContext context, AjaxDynamicElement element, String observeFieldID, String updateContainerID, boolean fullSubmit, NSDictionary options) { WOComponent component = context.component(); response.appendContentString("new Form.Element.Observer($('" + observeFi...
} if (columnIndex == 1) {
} else if (columnIndex == 1) {
public void setValueAt(Object aValue, int rowIndex, int columnIndex) { if (rowIndex < 0 || rowIndex >= getRowCount() || columnIndex < 0 || columnIndex >= getColumnCount()) return; // index out of range if (columnIndex == 0) { // it's a name names.set(rowIndex, aValue); } if (columnIndex == 1) { ...
if (isLocal) { globalFlags.set(rowIndex, ""); fireTableCellUpdated(rowIndex, 2); }
public void setValueAt(Object aValue, int rowIndex, int columnIndex) { if (rowIndex < 0 || rowIndex >= getRowCount() || columnIndex < 0 || columnIndex >= getColumnCount()) return; // index out of range if (columnIndex == 0) { // it's a name names.set(rowIndex, aValue); } if (columnIndex == 1) { ...
StyleConstants.setForeground(atts[1], Color.red);
StyleConstants.setForeground(atts[1], new Color(192, 64, 64));
public ConsoleNodeListener(CSMARTConsole console, NodeComponent nodeComponent, String logFileName, NodeStatusButton statusButton, ConsoleStyledDocument doc) throws IOException { this.console = console; this.nodeComponent = nodeComponent; nodeName = nodeCompon...
StyleConstants.setForeground(atts[2], Color.green);
StyleConstants.setForeground(atts[2], new Color(205, 205, 205));
public ConsoleNodeListener(CSMARTConsole console, NodeComponent nodeComponent, String logFileName, NodeStatusButton statusButton, ConsoleStyledDocument doc) throws IOException { this.console = console; this.nodeComponent = nodeComponent; nodeName = nodeCompon...
StyleConstants.setForeground(atts[3], Color.blue);
StyleConstants.setForeground(atts[3], new Color(64, 64, 192));
public ConsoleNodeListener(CSMARTConsole console, NodeComponent nodeComponent, String logFileName, NodeStatusButton statusButton, ConsoleStyledDocument doc) throws IOException { this.console = console; this.nodeComponent = nodeComponent; nodeName = nodeCompon...
if(adaptorType == AdaptorDateType) { defaultValue = ERXTimestampUtilities.timestampForString(stringValue); } else if (adaptorType == AdaptorNumberType) { NSTimestamp temp = ERXTimestampUtilities.timestampForString(stringValue); if(temp != null) { defaultValue = ERXTimestampUtilities.unixTimestamp(temp); } else { defaul...
if(stringValue.startsWith("@threadStorage.")) { String keyPath = stringValue.substring("@threadStorage.".length()); defaultValue = ERXThreadStorage.valueForKey(keyPath); if(keyPath.indexOf(".") > 0) { keyPath = stringValue.substring(keyPath.indexOf(".")+1); defaultValue = NSKeyValueCodingAdditions.Utility.valueForKeyPa...
public void setValueInObject(EOEnterpriseObject eo) { Object defaultValue = this.stringValue; if(adaptorType == AdaptorDateType) { defaultValue = ERXTimestampUtilities.timestampForString(stringValue); } else if (adaptorType == AdaptorNumberType) { N...
if(defaultValue != null) { if(adaptorType == AdaptorDateType) { defaultValue = ERXTimestampUtilities.timestampForString(defaultValue.toString()); } else if (adaptorType == AdaptorNumberType) { NSTimestamp temp = ERXTimestampUtilities.timestampForString(defaultValue.toString()); if(temp != null) { defaultValue = ERXTime...
public void setValueInObject(EOEnterpriseObject eo) { Object defaultValue = this.stringValue; if(adaptorType == AdaptorDateType) { defaultValue = ERXTimestampUtilities.timestampForString(stringValue); } else if (adaptorType == AdaptorNumberType) { N...
ERXUtilities.addObjectToObjectOnBothSidesOfRelationshipWithKey(eo,(EOEnterpriseObject)o, keyPath);
ERXUtilities.addObjectToObjectOnBothSidesOfRelationshipWithKey((EOEnterpriseObject)o, eo, key);
public void setValueInObject(EOEnterpriseObject eo) { Object defaultValue = this.stringValue; EOEditingContext ec = eo.editingContext(); if(stringValue.charAt(0) == '@') { // computed key if(stringValue.equals("@new")) { EOClassDescription cd = ...
ERXUtilities.addObjectToObjectOnBothSidesOfRelationshipWithKey(eo,(EOEnterpriseObject)e.nextElement(),keyPath);
ERXUtilities.addObjectToObjectOnBothSidesOfRelationshipWithKey((EOEnterpriseObject)e.nextElement(), eo, key);
public void setValueInObject(EOEnterpriseObject eo) { Object defaultValue = this.stringValue; EOEditingContext ec = eo.editingContext(); if(stringValue.charAt(0) == '@') { // computed key if(stringValue.equals("@new")) { EOClassDescription cd = ...
} else { defaultLog.warn("setValueInObject: Object is neither an EO nor an array");
public void setValueInObject(EOEnterpriseObject eo) { Object defaultValue = this.stringValue; EOEditingContext ec = eo.editingContext(); if(stringValue.charAt(0) == '@') { // computed key if(stringValue.equals("@new")) { EOClassDescription cd = ...
_initialDefaultValues = new NSMutableDictionary();
public ERXEntityClassDescription(EOEntity entity) { super(entity); _validationInfo = ERXValueUtilities.dictionaryValue(entity.userInfo().objectForKey("ERXValidation")); _validationQualiferCache = new NSMutableDictionary(); _initialDefaultValues = new NSMutableDictionary(); // FIXME comme...
EOEntity entity = entity(); NSMutableDictionary dict = new NSMutableDictionary(); NSDictionary entityInfo = (NSDictionary)entity.userInfo().objectForKey("ERXDefaultValues");
if(_initialDefaultValues == null) { _initialDefaultValues = new NSMutableDictionary();
public void readDefaultValues() { EOEntity entity = entity(); NSMutableDictionary dict = new NSMutableDictionary(); NSDictionary entityInfo = (NSDictionary)entity.userInfo().objectForKey("ERXDefaultValues"); for( Enumeration e = entity.attributes().objectEnumerator(); e.hasMoreElements()...
for( Enumeration e = entity.attributes().objectEnumerator(); e.hasMoreElements();) { EOAttribute attr = (EOAttribute)e.nextElement(); String defaultValue = null; if(attr.userInfo() != null) defaultValue = (String)attr.userInfo().objectForKey(defaultKey); if(defaultValue == null && entityInfo != null) { defaultValue =...
EOEntity entity = entity(); NSMutableDictionary dict = new NSMutableDictionary(); NSDictionary entityInfo = (NSDictionary)entity.userInfo().objectForKey("ERXDefaultValues"); for( Enumeration e = entity.attributes().objectEnumerator(); e.hasMoreElements();) { EOAttribute attr = (EOAttribute)e.nextElement(); String defa...
public void readDefaultValues() { EOEntity entity = entity(); NSMutableDictionary dict = new NSMutableDictionary(); NSDictionary entityInfo = (NSDictionary)entity.userInfo().objectForKey("ERXDefaultValues"); for( Enumeration e = entity.attributes().objectEnumerator(); e.hasMoreElements()...
if(defaultValue != null) setDefaultAttributeValue(attr, defaultValue); }
public void readDefaultValues() { EOEntity entity = entity(); NSMutableDictionary dict = new NSMutableDictionary(); NSDictionary entityInfo = (NSDictionary)entity.userInfo().objectForKey("ERXDefaultValues"); for( Enumeration e = entity.attributes().objectEnumerator(); e.hasMoreElements()...
for( Enumeration e = entity.relationships().objectEnumerator(); e.hasMoreElements();) { EORelationship rel = (EORelationship)e.nextElement(); String defaultValue = null; if(rel.userInfo() != null) defaultValue = (String)rel.userInfo().objectForKey(defaultKey); if(defaultValue == null && entityInfo != null) { defaultV...
for( Enumeration e = entity.relationships().objectEnumerator(); e.hasMoreElements();) { EORelationship rel = (EORelationship)e.nextElement(); String defaultValue = null; if(rel.userInfo() != null) defaultValue = (String)rel.userInfo().objectForKey(defaultKey); if(defaultValue == null && entityInfo != null) { defaultV...
public void readDefaultValues() { EOEntity entity = entity(); NSMutableDictionary dict = new NSMutableDictionary(); NSDictionary entityInfo = (NSDictionary)entity.userInfo().objectForKey("ERXDefaultValues"); for( Enumeration e = entity.attributes().objectEnumerator(); e.hasMoreElements()...
if(defaultValue != null) setDefaultRelationshipValue(rel, defaultValue);
public void readDefaultValues() { EOEntity entity = entity(); NSMutableDictionary dict = new NSMutableDictionary(); NSDictionary entityInfo = (NSDictionary)entity.userInfo().objectForKey("ERXDefaultValues"); for( Enumeration e = entity.attributes().objectEnumerator(); e.hasMoreElements()...