rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
Message.init(new AntMessageImpl(getProject()));
if (!Message.isInitialised()) { Message.init(new AntMessageImpl(getProject())); getProject().addBuildListener(new BuildListener() { public void buildFinished(BuildEvent event) { Message.uninit(); } public void buildStarted(BuildEvent event) { } public void targetStarted(BuildEvent event) { } public void targetFinished...
protected void ensureMessageInitialised() { Message.init(new AntMessageImpl(getProject())); }
return ("ContainerEvent[" + child + ";" + super.paramString () + "]");
String r; switch (id) { case COMPONENT_ADDED: r = "COMPONENT_ADDED"; break; case COMPONENT_REMOVED: r = "COMPONENT_REMOVED"; break; default: r = "unknown id"; break; } r += ",child=" + child; return r;
public String paramString () { return ("ContainerEvent[" + child + ";" + super.paramString () + "]"); }
return super.paramString ();
String r; switch (id) { case COMPONENT_HIDDEN: r = "COMPONENT_HIDDEN"; break; case COMPONENT_MOVED: r = "COMPONENT_MOVED"; break; case COMPONENT_RESIZED: r = "COMPONENT_RESIZED"; break; case COMPONENT_SHOWN: r = "COMPONENT_SHOWN"; break; default: r = "unknown id"; break; } return r;
public String paramString () { return super.paramString (); }
public VfsRepository() { try { _manager = new StandardFileSystemManager(); _manager.setConfiguration(getClass().getResource(IVY_VFS_CONFIG)); _manager.init(); Message.verbose("Available VFS schemes..."); String[] schemes = _manager.getSchemes(); Arrays.sort(schemes); for (int i = 0; i < schemes.length; i++) { Messag...
public VfsRepository() {
public VfsRepository() { try { /* * The DefaultFileSystemManager gets its configuration from the jakarta-vfs-common * implementation which includes the res and tmp schemes which are of no use to use here. * Using StandardFileSystemManager lets us specify which schemes to support as well as * providin...
_manager.close();
if (_manager != null) { _manager.close(); _manager = null; }
protected void finalize() { _manager.close(); }
VfsResource src = new VfsResource(srcVfsURI, _manager);
VfsResource src = new VfsResource(srcVfsURI, getVFSManager());
public void get(String srcVfsURI, File destination) throws IOException { VfsResource src = new VfsResource(srcVfsURI, _manager); fireTransferInitiated(src, TransferEvent.REQUEST_GET); try { FileContent content = src.getContent(); if (content == null) { throw new IllegalArgumentException(...
return new VfsResource(vfsURI, _manager);
return new VfsResource(vfsURI, getVFSManager());
public Resource getResource(String vfsURI) throws IOException { return new VfsResource(vfsURI, _manager); }
VfsResource res = new VfsResource(vfsURI, _manager);
VfsResource res = new VfsResource(vfsURI, getVFSManager());
public List list(String vfsURI) throws IOException { VfsResource res = new VfsResource(vfsURI, _manager); return res.getChildren(); };
};
}
public List list(String vfsURI) throws IOException { VfsResource res = new VfsResource(vfsURI, _manager); return res.getChildren(); };
VfsResource dest = new VfsResource(vfsURI, _manager);
VfsResource dest = new VfsResource(vfsURI, getVFSManager());
public void put(File source, String vfsURI, boolean overwrite) throws IOException { VfsResource dest = new VfsResource(vfsURI, _manager); fireTransferInitiated(dest, TransferEvent.REQUEST_PUT); if (dest.physicallyExists() && ! overwrite) { throw new IOException("Cannot copy. Destination file: " + dest.getName() +...
text = text.trim();
public List retrieveListing(URL url, boolean includeFiles, boolean includeDirectories) throws IOException { List urlList = new ArrayList(); // add trailing slash for relative urls if (!url.getPath().endsWith("/")) { url = new URL(url.getProtocol(), url.getHost(), url.getPort()...
if (!accept(name)) {
if (!accept(this.name)) {
public void visit(int access, String name, String superName, String[] interfaces, String sourceFile) { this.name = name.replace('/', '.'); if (!accept(name)) { throw new EarlyExitException(); } super.visit(access, name, superName, interfaces, sourceFile...
t.setTarget(v);
t.setTarget(v, t);
public void generateClass(ClassVisitor v) throws Exception { t.setTarget(v); gen.generateClass(t); }
public void write (byte[] b) throws IOException, NullPointerException
public void write (int b) throws IOException
public void write (byte[] b) throws IOException, NullPointerException { fd.write (b, 0, b.length); }
fd.write (b, 0, b.length);
fd.write (b);
public void write (byte[] b) throws IOException, NullPointerException { fd.write (b, 0, b.length); }
sb.append(" FROM "); if (disableOuterJoins) sb.append(tableList); else { if (_alreadyJoined.count() > 0) { sb.append(joinClauseString()); } else { sb.append(tableList);
if(selectString.indexOf(" DISTINCT") != -1) { String [] columns = orderByClause.split(","); for(int i = 0; i < columns.length; i++) { String column = columns[i].replaceFirst("\\s+(ASC|DESC)\\s*", ""); if(columnList.indexOf(column) == -1) { sb.append(", "); sb.append(column); }
public String assembleSelectStatementWithAttributes(NSArray attributes, boolean lock, EOQualifier qualifier, NSArray fetchOrder, ...
sb.append(" FROM "); String fieldString; if (disableOuterJoins) { fieldString = tableList; } else { if (_alreadyJoined.count() > 0) { fieldString = joinClauseString(); } else { fieldString = tableList; } } sb.append(fieldString);
public String assembleSelectStatementWithAttributes(NSArray attributes, boolean lock, EOQualifier qualifier, NSArray fetchOrder, ...
log.debug("Writing Agent: " + agentsToWrite[i].getShortName());
log.debug("getHNA Writing Agent: " + agentsToWrite[i].getShortName());
private void generateHNACDATA() { Set savedNodes = new HashSet(); Set savedAgents = new HashSet(); NodeComponent[] nodesToWrite = getNodeComponents(); AgentComponent[] agentsToWrite = getAgents(); completeSociety = new GenericComponentData(); completeSociety.setType(ComponentData.SOCIETY); comple...
if (log.isDebugEnabled()) checkHNA(completeSociety, getAgents());
private void generateHNACDATA() { Set savedNodes = new HashSet(); Set savedAgents = new HashSet(); NodeComponent[] nodesToWrite = getNodeComponents(); AgentComponent[] agentsToWrite = getAgents(); completeSociety = new GenericComponentData(); completeSociety.setType(ComponentData.SOCIETY); comple...
setReadAsBoolean(false);
public void awakeFromInsertion(EOEditingContext anEditingContext) { super.awakeFromInsertion(anEditingContext); setState(ERCMailState.READY_TO_BE_SENT_STATE); }
public ERXValidationException createCustomException(EOEnterpriseObject eo, String property, Object value, String method) { ERXValidationException erv = createException(eo, property, value, ERXValidationException.CustomMethodException); if (erv != null) erv.setMethod(method); return erv;
public ERXValidationException createCustomException(EOEnterpriseObject eo, String method) { return createCustomException(eo, null, null, method);
public ERXValidationException createCustomException(EOEnterpriseObject eo, String property, Object value, String method) { ERXValidationException erv = createException(eo, property, value, ERXValidationException.CustomMethodException); if (erv != null) erv.setMethod(method); return e...
writer.print(quote(rel.getRole()) + " ");
writer.print(rel.getRole() + " ");
private void writePrototypeINI(File configDir, AgentComponentData agent) throws IOException { AgentAssetData assetData = agent.getAgentAssetData(); if (assetData == null) { // No Asset info available return; } PrintWriter writer = new PrintWriter(new FileWriter(new File(configDir, agent.getName(...
writer.print(quote(rel.getType()) + " ");
writer.print(quote(rel.getTypeId()) + " ");
private void writePrototypeINI(File configDir, AgentComponentData agent) throws IOException { AgentAssetData assetData = agent.getAgentAssetData(); if (assetData == null) { // No Asset info available return; } PrintWriter writer = new PrintWriter(new FileWriter(new File(configDir, agent.getName(...
ERXArrayUtilities.sortedArraySortedWithKey(possibleEntities, "length");
ERXArrayUtilities.sortArrayWithKey(possibleEntities, "length");
protected Object entityForName(String name) { Object result = null; if(name != null) { String lowerCaseName = name.toLowerCase(); if (entityNames == null) { entityNames = (NSArray)((NSArray)ERXUtilities.entitiesForModelGroup(EOModelGroup.defaultGroup()).valueForKey...
public void addAttribute(VizAttrStmt attrstmt) { if (!type.equals(attrstmt.getType())) return; Enumeration enumList = attrstmt.getAttributes();
public void addAttribute(VizAttr attr) { Enumeration enumList = attrs.elements();
public void addAttribute(VizAttrStmt attrstmt) { if (!type.equals(attrstmt.getType())) return; Enumeration enumList = attrstmt.getAttributes(); while (enumList.hasMoreElements()) { addAttribute((VizAttr) enumList.nextElement()); } }
addAttribute((VizAttr) enumList.nextElement());
VizAttr a = (VizAttr) enumList.nextElement(); if (a.getName().equals(attr.getName())) { a.setValue(attr.getValue()); return; }
public void addAttribute(VizAttrStmt attrstmt) { if (!type.equals(attrstmt.getType())) return; Enumeration enumList = attrstmt.getAttributes(); while (enumList.hasMoreElements()) { addAttribute((VizAttr) enumList.nextElement()); } }
attrs.addElement(attr);
public void addAttribute(VizAttrStmt attrstmt) { if (!type.equals(attrstmt.getType())) return; Enumeration enumList = attrstmt.getAttributes(); while (enumList.hasMoreElements()) { addAttribute((VizAttr) enumList.nextElement()); } }
EOQualifierSQLGeneration.Support.setSupportForClass(new ERXInOrQualifierSupport(), EOOrQualifier._CLASS);
public void finishInitialization() { ERXJDBCAdaptor.registerJDBCAdaptor(); ERXProperties.populateSystemProperties(); ERXConfigurationManager.defaultManager().configureRapidTurnAround(); ERXLocalizer.initialize(); ERXValidationFactory.defaultFactory().configureFactory(); ...
throw_exception(NoSuchMethodError.class, "Cannot find matching method/constructor");
push(-1); return_value();
public void processDefault() { // TODO: improve exception throw_exception(NoSuchMethodError.class, "Cannot find matching method/constructor"); }
Predicate p = new VisibilityPredicate(type, false); final Method[] methods = (Method[])ReflectUtils.filter(type.getDeclaredMethods(), p); final Constructor[] constructors = (Constructor[])ReflectUtils.filter(type.getDeclaredConstructors(), p);
VisibilityPredicate vp = new VisibilityPredicate(type, false); List methodList = ReflectUtils.addAllMethods(type, new ArrayList()); CollectionUtils.filter(methodList, vp); CollectionUtils.filter(methodList, new DuplicatesPredicate()); final Method[] methods = (Method[])methodList.toArray(new Method[methodList.size()]);...
public void generate() throws Exception { // constructor begin_constructor(CONSTRUCTOR_TYPES); load_this(); load_args(); super_invoke_constructor(CONSTRUCTOR_TYPES); return_value(); end_method(); Predicate p = new VisibilityPredicate(type, false); final...
public void processCase(int key, Label end) { Constructor constructor = constructors[key]; Class[] types = constructor.getParameterTypes(); for (int i = 0; i < types.length; i++) { load_arg(1); aaload(i); unbox(types[i]); } invoke(constructor);
public void processCase(Object key, Label end) { push(signatures.indexOf(key));
public void processCase(int key, Label end) { Constructor constructor = constructors[key]; Class[] types = constructor.getParameterTypes(); for (int i = 0; i < types.length; i++) { load_arg(1); aaload(i); u...
throw_exception(NoSuchMethodError.class, "Cannot find matching method/constructor");
push(-1); return_value();
public void processDefault() { throw_exception(NoSuchMethodError.class, "Cannot find matching method/constructor"); }
public void begin_constructor(Class[] parameterTypes) { checkInMethod(); this.returnType = Void.TYPE; this.parameterTypes = parameterTypes; backend.begin_constructor(parameterTypes); setNextLocal();
public void begin_constructor(Constructor constructor) { begin_constructor(constructor.getParameterTypes());
public void begin_constructor(Class[] parameterTypes) { checkInMethod(); this.returnType = Void.TYPE; this.parameterTypes = parameterTypes; backend.begin_constructor(parameterTypes); setNextLocal(); }
public void super_invoke_constructor(Class[] parameterTypes) { invoke_constructor(superclass.getName(), parameterTypes);
public void super_invoke_constructor() { invoke_constructor(superclass.getName(), Constants.TYPES_EMPTY);
public void super_invoke_constructor(Class[] parameterTypes) { invoke_constructor(superclass.getName(), parameterTypes); }
public void begin_method(Method method) { begin_method(method, getDefaultModifiers(method));
public void begin_method(int modifiers, Class returnType, String methodName, Class[] parameterTypes, Class[] exceptionTypes) { checkInMethod(); this.methodName = methodName; this.returnType = returnType; this.parameterTypes = parameterTypes; isStatic = Modifier.isStatic(modifiers); backend.begin_method(modifiers, retur...
public void begin_method(Method method) { begin_method(method, getDefaultModifiers(method)); }
public void new_instance(Class type) { new_instance(type.getName());
public void new_instance(String className) { backend.emit_type(Opcodes.NEW, className);
public void new_instance(Class type) { new_instance(type.getName()); }
addExperimentToWorkspace(experimentCopy, node);
addExperimentAndComponentsToWorkspace(experimentCopy, node);
protected 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("Dupli...
societyCopy.saveToDatabase();
experimentCopy.saveToDb(saveToDbConflictHandler);
public void run() { societyCopy.saveToDatabase(); GUIUtils.timeConsumingTaskEnd(organizer); }
if (experiment.getSocietyComponent().equals(society))
SocietyComponent sc = experiment.getSocietyComponent(); if (sc != null && sc.equals(society)) { experiment.modified(new ModificationEvent(this, 0));
private ArrayList getExperimentNamesInWorkspace(SocietyComponent society) { ArrayList results = new ArrayList(); ArrayList experiments = getExperiments(); for (int i = 0; i < experiments.size(); i++) { Experiment experiment = (Experiment)experiments.get(i); if (experiment.getSocietyComponent().equa...
}
private ArrayList getExperimentNamesInWorkspace(SocietyComponent society) { ArrayList results = new ArrayList(); ArrayList experiments = getExperiments(); for (int i = 0; i < experiments.size(); i++) { Experiment experiment = (Experiment)experiments.get(i); if (experiment.getSocietyComponent().equa...
if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (trialId != null) { Experiment experiment = helper.createExperiment(originalExperimentName, cmtDialog.getExperimentName(), cmtDialog.getExperimentId(), trialId); if (experiment != null) addDatabaseExperimentToWorkspace(experiment); }
experiment.saveToDb(saveToDbConflictHandler); GUIUtils.timeConsumingTaskEnd(organizer);
public void run() { // a potentially long process if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (trialId != null) { Experiment experiment = helper.createExperiment(originalExperimentName, cmtDialog.getExperimentName(), cmtDialog.getExperime...
GUIUtils.timeConsumingTaskEnd(organizer); }
public void run() { // a potentially long process if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (trialId != null) { Experiment experiment = helper.createExperiment(originalExperimentName, cmtDialog.getExperimentName(), cmtDialog.getExperime...
addDatabaseExperimentToWorkspace(experiment);
addExperimentAndComponentsToWorkspace(experiment, getSelectedNode());
protected 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 Ex...
experimentCopy.saveToDb(saveToDbConflictHandler); GUIUtils.timeConsumingTaskEnd(organizer);
if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (trialId != null) { Experiment experiment = helper.createExperiment(originalExperimentName, cmtDialog.getExperimentName(), cmtDialog.getExperimentId(), trialId); if (experiment != null) addExperimentAndComponentsToWorkspace(experiment, ...
public void run() { experimentCopy.saveToDb(saveToDbConflictHandler); GUIUtils.timeConsumingTaskEnd(organizer); }
GUIUtils.timeConsumingTaskEnd(organizer); }
public void run() { experimentCopy.saveToDb(saveToDbConflictHandler); GUIUtils.timeConsumingTaskEnd(organizer); }
Logger log = CSMART.createLogger("org.cougaar.tools.csmart.ui.servlet");
Logger log = (Logger)NullLoggingServiceImpl.getNullLoggingServiceImpl();
public static void setParams(String name, String value) { Logger log = CSMART.createLogger("org.cougaar.tools.csmart.ui.servlet"); if (name.equals(PropertyNames.PLAN_OBJECTS_TO_IGNORE)) { try { StringTokenizer st = new StringTokenizer(value, ","); while (st.hasMoreToke...
log = CSMART.createLogger("org.cougaar.tools.csmart.ui.servlet");
log = (Logger) NullLoggingServiceImpl.getNullLoggingServiceImpl();
public PlanServlet(SimpleServletSupport support) { super(); this.support = support; log = CSMART.createLogger("org.cougaar.tools.csmart.ui.servlet"); if ( ! ( "/CSMART_PlanServlet".equals(support.getPath()) ) ) { System.out.println("Error in servlet path: " + support.getPath()); } }
public static Object newInstance(Class type, Class[] parameterTypes, Object[] args) { return newInstance(getConstructor(type, parameterTypes), args);
public static Object newInstance(Class type) { return newInstance(type, Constants.TYPES_EMPTY, null);
public static Object newInstance(Class type, Class[] parameterTypes, Object[] args) { return newInstance(getConstructor(type, parameterTypes), args); }
extraAttributes.put("nullatt", null); testEncodeDecodeToString(ModuleRevisionId.newInstance("org/jayasoft", "pre/name", "1.0-dev8/2", extraAttributes));
public void testEncodeDecodeToString() { testEncodeDecodeToString(ModuleRevisionId.newInstance("org", "name", "revision")); testEncodeDecodeToString(ModuleRevisionId.newInstance("org", "name", "")); testEncodeDecodeToString(ModuleRevisionId.newInstance("org.jayasoft", "name-post", "1.0")); ...
if(!(new File(_jikesPath)).exists()) { log.error("Can't use compiler proxy, no jikes found at path :<" + _jikesPath + ">"); return; } String classPathSeparator = ":"; if(isWindows) classPathSeparator = ";";
public void initialize() { if (initialized) { return; } log.info("initialize start"); initialized = true; if(WOApplication.application()!=null && WOApplication.application().isCachingEnabled()) { log.info("I assume this is deployment mode, rapid-turnaround mode is disable...
System.setProperty("java.class.path", _classPath + ":" + System.getProperty("java.class.path"));
System.setProperty("java.class.path", _classPath + classPathSeparator + System.getProperty("java.class.path"));
public void initialize() { if (initialized) { return; } log.info("initialize start"); initialized = true; if(WOApplication.application()!=null && WOApplication.application().isCachingEnabled()) { log.info("I assume this is deployment mode, rapid-turnaround mode is disable...
if(_classPath.indexOf("Classes/classes.jar") < 0) {
if(_classPath.indexOf("Classes/classes.jar") < 0 && !isWindows) {
public void initialize() { if (initialized) { return; } log.info("initialize start"); initialized = true; if(WOApplication.application()!=null && WOApplication.application().isCachingEnabled()) { log.info("I assume this is deployment mode, rapid-turnaround mode is disable...
_classPath += ":" + systemRoot + "classes.jar"; _classPath += ":" + systemRoot + "ui.jar";
_classPath += classPathSeparator + systemRoot + "classes.jar"; _classPath += classPathSeparator + systemRoot + "ui.jar";
public void initialize() { if (initialized) { return; } log.info("initialize start"); initialized = true; if(WOApplication.application()!=null && WOApplication.application().isCachingEnabled()) { log.info("I assume this is deployment mode, rapid-turnaround mode is disable...
recipeName = recipeNames.getUniqueName(recipeName, false);
if (recipeNames.contains(recipeName)) recipeName = recipeNames.getUniqueName(recipeName, false); else recipeName = recipeNames.getUniqueName(recipeName, true);
protected void selectRecipeFromDatabase() { Map recipeNamesHT = helper.getRecipeNamesFromDatabase(); Set dbRecipeNames = recipeNamesHT.keySet(); if (dbRecipeNames.isEmpty()) { JOptionPane.showMessageDialog(this, "There are no recipes in the database", ...
if (dependency.getModuleRevision() == null || dependency.isCompletelyEvicted()) { continue; }
private void generateXml(Ivy ivy, IvyNode[] dependencies, Map moduleRevToArtifactsMap, Map artifactsToCopy) { try { FileOutputStream fileOuputStream = new FileOutputStream(_tofile); try { TransformerHandler saxHandler = createTransformerHandler(fileOuputStream); ...
public IvyNode[] getDependencies(ModuleDescriptor md, String[] confs, File cache, Date date, ResolveReport report, boolean validate) { if (md == null) { throw new NullPointerException("module descriptor must not be null"); } if (cache==null) { cache = getDefaultCache(); } if (confs.length == 1 && confs[0].equals("*")) ...
public IvyNode[] getDependencies(URL ivySource, String[] confs, File cache, Date date, boolean validate) throws ParseException, IOException { return getDependencies(ModuleDescriptorParserRegistry.getInstance().parseDescriptor(this, ivySource, validate), confs, cache, date, null, validate);
public IvyNode[] getDependencies(ModuleDescriptor md, String[] confs, File cache, Date date, ResolveReport report, boolean validate) { if (md == null) { throw new NullPointerException("module descriptor must not be null"); } if (cache==null) { // ensure that a cache exists ...
if ( delegateImplementsDidRevert ) _safeInvokeSelectorOnObjectWithParameters(EditingContextDidRevertObjectsDelegateSelector, delegate, parameters);
public void revert() { boolean wasAutoLocked = autoLock("revert"); try { super.revert(); } finally { autoUnlock(wasAutoLocked); } }
public int lastIndexOf(Object elem)
public synchronized int lastIndexOf(Object e, int index)
public int lastIndexOf(Object elem) { return lastIndexOf(elem, elementCount - 1); }
return lastIndexOf(elem, elementCount - 1);
if (index >= elementCount) throw new ArrayIndexOutOfBoundsException(index + " >= " + elementCount); for (int i = index; i >= 0; i--) { if (e == null ? elementData[i] == null : e.equals(elementData[i])) return i; } return -1;
public int lastIndexOf(Object elem) { return lastIndexOf(elem, elementCount - 1); }
" " + e.toString());
" ", e);
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 { ...
this.log = support.getLog();
public PlanProvider(SimpleServletSupport support) { this.support = support; }
sourceCode = ERXExtensions.replaceStringByStringInString("\n\n", "<br>", sourceCode);
sourceCode = ERXStringUtilities.replaceStringByStringInString("\n\n", "<br>", sourceCode);
public String sourceCode() { if(sourceCode != null) return sourceCode; StringWriter writer = new StringWriter(); try { Decompiler decompiler = new Decompiler(); decompiler.setClassPath(cp); decompiler.decompile(classInf...
public BigDecimal (double num) throws NumberFormatException
public BigDecimal (BigInteger num)
public BigDecimal (double num) throws NumberFormatException { if (Double.isInfinite (num) || Double.isNaN (num)) throw new NumberFormatException ("invalid argument: " + num); // Note we can't convert NUM to a String and then use the // String-based constructor. The BigDecimal documentation makes /...
if (Double.isInfinite (num) || Double.isNaN (num)) throw new NumberFormatException ("invalid argument: " + num); final int mantissaBits = 52; final int exponentBits = 11; final long mantMask = (1L << mantissaBits) - 1; final long expMask = (1L << exponentBits) - 1; long bits = Double.doubleToLongBits (num); long m...
this (num, 0);
public BigDecimal (double num) throws NumberFormatException { if (Double.isInfinite (num) || Double.isNaN (num)) throw new NumberFormatException ("invalid argument: " + num); // Note we can't convert NUM to a String and then use the // String-based constructor. The BigDecimal documentation makes /...
public BigDecimal divide(BigDecimal val, int newScale, int roundingMode)
public BigDecimal divide (BigDecimal val, int roundingMode)
public BigDecimal divide(BigDecimal val, int newScale, int roundingMode) throws ArithmeticException, IllegalArgumentException { if (roundingMode < 0 || roundingMode > 7) throw new IllegalArgumentException("illegal rounding mode: " + roundingMode); if (newScale < 0) throw new ArithmeticException ...
if (roundingMode < 0 || roundingMode > 7) throw new IllegalArgumentException("illegal rounding mode: " + roundingMode); if (newScale < 0) throw new ArithmeticException ("scale is negative: " + newScale); if (intVal.signum () == 0) return ZERO; int valScale = val.scale; BigInteger valIntVal = val.intVal; int power =...
return divide (val, scale, roundingMode);
public BigDecimal divide(BigDecimal val, int newScale, int roundingMode) throws ArithmeticException, IllegalArgumentException { if (roundingMode < 0 || roundingMode > 7) throw new IllegalArgumentException("illegal rounding mode: " + roundingMode); if (newScale < 0) throw new ArithmeticException ...
return findResourceUsingPattern(getName(), getRepository(), getLatestStrategy(), mrid, pattern, artifact, type, ext, date);
return findResourceUsingPattern(getName(), getRepository(), getLatestStrategy(), mrid, pattern, artifact, type, ext, date, isAlwaysCheckExactRevision());
protected ResolvedResource findResourceUsingPattern(ModuleRevisionId mrid, String pattern, String artifact, String type, String ext, Date date) { return findResourceUsingPattern(getName(), getRepository(), getLatestStrategy(), mrid, pattern, artifact, type, ext, date); }
viewSize = displayViewSizeDialog(viewSize);
int newViewSize = displayViewSizeDialog(viewSize); if (newViewSize == -2) return; viewSize = newViewSize;
private void viewSizeMenuItem_actionPerformed() { viewSize = displayViewSizeDialog(viewSize); Enumeration textPanes = nodePanes.elements(); while (textPanes.hasMoreElements()) { JTextPane textPane = (JTextPane)textPanes.nextElement(); ((ConsoleStyledDocument)textPane.getStyledDocument()).setBufferS...
suite.addTest(TestProxy.suite()); suite.addTest(TestMethodProxy.suite());
suite.addTest(TestDelegates.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(TestBulkBean.suite()); suite.addTest(...
suite.addTest(TestDispatcher.suite()); suite.addTest(TestLazyLoader.suite()); suite.addTest(TestNoOp.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(TestBulkBean.suite()); suite.addTest(...
log.debug("Caching disabled. Registering for notification: " + ERXApplication.WORequestHandlerDidHandleRequestNotification); NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("checkIfFilesHaveChanged", ERXConstant.NotificationClassArray), ERXApplication.WORequestHandlerDidHandleRequestNotification,...
log.debug("Caching disabled. Registering for notification: " + WOApplication.ApplicationWillDispatchRequestNotification); NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("checkIfFilesHaveChanged", ERXConstant.NotificationClassArray), WOApplication.ApplicationWillDispatchRequestNotification, null)...
public ERXFileNotificationCenter() { if (!WOApplication.application().isCachingEnabled()) { ERXRetainer.retain(this); log.debug("Caching disabled. Registering for notification: " + ERXApplication.WORequestHandlerDidHandleRequestNotification); NSNotificationCenter.defaultCent...
anUnsortedArray = ERXUtilities.localInstancesOfObjects(ec, aDataSource.fetchObjects());
anUnsortedArray = ERXEOControlUtilities.localInstancesOfObjects(ec, aDataSource.fetchObjects());
public NSArray theList() { NSMutableArray aSortedArray; NSArray anUnsortedArray; if (_privateList()==null ) { EODataSource aDataSource = _localDataSource(); // Need to make sure that the eos are in the right editingContext. // ak: We get a dictionary as object if we us...
localArray.addObject((ec != eo.editingContext() && ERXUtilities.localInstanceOfObject(ec, eo) != null ? ERXUtilities.localInstanceOfObject(ec, eo) : eo));
localArray.addObject((ec != eo.editingContext() && ERXEOControlUtilities.localInstanceOfObject(ec, eo) != null ? ERXEOControlUtilities.localInstanceOfObject(ec, eo) : eo));
public NSArray theList() { NSMutableArray aSortedArray; NSArray anUnsortedArray; if (_privateList()==null ) { EODataSource aDataSource = _localDataSource(); // Need to make sure that the eos are in the right editingContext. // ak: We get a dictionary as object if we us...
ERXUtilities.localInstanceOfObject(_eo.editingContext(), (EOEnterpriseObject)anEO) : null;
ERXEOControlUtilities.localInstanceOfObject(_eo.editingContext(), (EOEnterpriseObject)anEO) : null;
public void updateSourceObject(Object anEO) { String masterKey = _localRelationshipKey(); Object aSourceObject = _localSourceObject(); boolean isDictionary = (aSourceObject instanceof NSMutableDictionary); NSMutableDictionary _dictionary = (isDictionary) ? (NSMutableDictionary)aSourceObj...
Message.error("configuration not found in "+this+": "+conf+". It was required from "+getParent()+" "+getParentConf());
public boolean loadData(String conf) { boolean loaded = _md != null; if (!isEvicted(_rootModuleConf) && hasConfigurationsToLoad() && !hasProblem()) { if (_md == null) { DependencyResolver resolver = _data.getIvy().getResolver(getModuleId()); try { ...
Message.error("configuration not public in "+this+": "+c+". It was required from "+getParent()+" "+getParentConf());
public boolean loadData(String conf) { boolean loaded = _md != null; if (!isEvicted(_rootModuleConf) && hasConfigurationsToLoad() && !hasProblem()) { if (_md == null) { DependencyResolver resolver = _data.getIvy().getResolver(getModuleId()); try { ...
_problem = new RuntimeException("configuration not public in "+this+": "+c+". It was required from "+getParent()+" "+getParentConf());
public boolean loadData(String conf) { boolean loaded = _md != null; if (!isEvicted(_rootModuleConf) && hasConfigurationsToLoad() && !hasProblem()) { if (_md == null) { DependencyResolver resolver = _data.getIvy().getResolver(getModuleId()); try { ...
Object item = aList.objectAtIndex(index);
Object item = index < aList.count() ? aList.objectAtIndex(index) : null;
public void pushItem() { NSArray aList = list(); int index = currentCol+maxColumns()*currentRow; Object item = aList.objectAtIndex(index); setValueForBinding(item, "item"); setValueForBinding(ERXConstant.integerForInt(currentRow), "row"); setValueForBinding(ERXConstant.int...
DefaultMutableTreeNode node = getSelectedNode(); if (node == null) return; Experiment experiment = (Experiment)node.getUserObject(); if (!experiment.isEditable()) { int result = JOptionPane.showConfirmDialog(this, "Experiment is not editable; delete anyway?", "Experiment Not Editable", JOptionPane.YES_NO_OPTION, JOptio...
deleteExperimentInNode(getSelectedNode());
public void deleteExperiment() { DefaultMutableTreeNode node = getSelectedNode(); if (node == null) return; Experiment experiment = (Experiment)node.getUserObject(); if (!experiment.isEditable()) { int result = JOptionPane.showConfirmDialog(this, "Experiment is...
if (reply == JOptionPane.OK_OPTION)
if (reply != JOptionPane.OK_OPTION) return; if (node.isLeaf()) {
public void deleteFolder() { DefaultMutableTreeNode node = getSelectedNode(); if (node == root) return; if (node == null) return; int reply = JOptionPane.showConfirmDialog(this, "Delete folder and all its contents?", "Delete Folde...
return; } ArrayList nodesToDelete = new ArrayList(); Enumeration nodes = node.breadthFirstEnumeration(); nodes.nextElement(); while (nodes.hasMoreElements()) { DefaultMutableTreeNode childNode = (DefaultMutableTreeNode)nodes.nextElement(); if (childNode.isLeaf()) nodesToDelete.add(childNode); } for (int i = 0; i <...
public void deleteFolder() { DefaultMutableTreeNode node = getSelectedNode(); if (node == root) return; if (node == null) return; int reply = JOptionPane.showConfirmDialog(this, "Delete folder and all its contents?", "Delete Folde...
DefaultMutableTreeNode node = getSelectedNode(); if (node == null) return; model.removeNodeFromParent(node); RecipeComponent rc = (RecipeComponent) node.getUserObject(); try { PDbBase pdb = new PDbBase(); try { int status = pdb.recipeExists(rc); if (status == PDbBase.RECIPE_STATUS_EXISTS || status == PDbBase.RECIPE_STA...
deleteRecipeInNode(getSelectedNode());
public void deleteRecipe() { DefaultMutableTreeNode node = getSelectedNode(); if (node == null) return; model.removeNodeFromParent(node); RecipeComponent rc = (RecipeComponent) node.getUserObject(); try { PDbBase pdb = new PDbBase(); try { int status = pdb.recipeExists(rc); if (...
if (!(iq.getType() == Type.get || iq.getType() == Type.result)) {
if (!(iq.getType() == Type.get || iq.getType() == Type.set)) {
public static IQ createResultIQ(IQ iq) { if (!(iq.getType() == Type.get || iq.getType() == Type.result)) { throw new IllegalArgumentException("IQ must be of type 'set' or 'get'."); } IQ result = new IQ(Type.result, iq.getID()); result.setFrom(iq.getTo()); result.setTo(i...
public void setFrom(JID from) { element.addAttribute("from", from.toString());
public void setFrom(String from) { element.addAttribute("from", from);
public void setFrom(JID from) { element.addAttribute("from", from.toString()); }
public void setTo(JID to) { setTo(to.toString());
public void setTo(String to) { element.addAttribute("to", to);
public void setTo(JID to) { setTo(to.toString()); }
processQueuedNotifications();
public void saveChanges() { boolean wasAutoLocked = autoLock("saveChanges"); try { super.saveChanges(); } finally { autoUnlock(wasAutoLocked); } }
public CDATASection createCDATASection(char[] buf, int off, int len)
public CDATASection createCDATASection(String value)
public CDATASection createCDATASection(char[] buf, int off, int len) { if (checkingCharacters) { checkChar(buf, off, len, "1.1".equals(version)); } return new DomCDATASection(this, buf, off, len); }
checkChar(buf, off, len, "1.1".equals(version));
checkChar(value, "1.1".equals(version));
public CDATASection createCDATASection(char[] buf, int off, int len) { if (checkingCharacters) { checkChar(buf, off, len, "1.1".equals(version)); } return new DomCDATASection(this, buf, off, len); }
return new DomCDATASection(this, buf, off, len);
return new DomCDATASection(this, value);
public CDATASection createCDATASection(char[] buf, int off, int len) { if (checkingCharacters) { checkChar(buf, off, len, "1.1".equals(version)); } return new DomCDATASection(this, buf, off, len); }
NSNotificationCenter.defaultCenter().postNotification(ConfigurationDidChangeNotification, null);
public synchronized void updateSystemProperties(NSNotification n) { _updateSystemPropertiesFromMonitoredProperties(n != null ? (File)n.object() : null, _monitoredProperties); if (_commandLineArguments != null && _commandLineArguments.length > 0) _reinsertCommandLineArgumentsToSystemPrope...
public static NSArray pathsForUserAndBundleProperties(boolean reportLoggingEnabled) { NSMutableArray propertiesPaths = new NSMutableArray(); NSMutableArray projectsInfo = new NSMutableArray(); String projectPath, aPropertiesPath; WOApplication application = WOApplication.application(); if (application == null) { log.wa...
public static NSArray pathsForUserAndBundleProperties() { return pathsForUserAndBundleProperties(false);
public static NSArray pathsForUserAndBundleProperties(boolean reportLoggingEnabled) { NSMutableArray propertiesPaths = new NSMutableArray(); NSMutableArray projectsInfo = new NSMutableArray(); String projectPath, aPropertiesPath; WOApplication application = WOApplication.application(); ...
GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());
GLCanvas canvas = new GLCanvas();
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); ...
CSMART.createLogger("org.cougaar.tools.csmart.core.cdata");
public CommunityTimePhasedData() { super(); communities = new ArrayList(); CSMART.createLogger("org.cougaar.tools.csmart.core.cdata"); try { setStartTime(""); } catch (ParseException pe) { if(log.isDebugEnabled()) { log.error("Caught an exception setting startTime"); } } try...
super(TYPE_USHORT, size, numBanks); bankData = new short[numBanks][size]; data = bankData[0];
super(TYPE_USHORT, size); data = new short[size];
public DataBufferUShort(int size, int numBanks) { super(TYPE_USHORT, size, numBanks); bankData = new short[numBanks][size]; data = bankData[0]; }
log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.plan");
createLogger();
public ULPlanFinder(CSMARTFrame frame, CSMARTGraph graph, Hashtable communityToAgents) { super(frame, "Finder"); log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.plan"); this.communityToAgents = communityToAgents; this.graph = graph; this.frame ...
public void select(Element e) {
public void select(Vector elements) {
public void select(Element e) { clearSelection(); resetColors(); currentSelection = new Vector(); GrappaSupport.setHighlight(e, GrappaSupport.SELECTION_MASK, GrappaSupport.HIGHLIGHT_ON); ((Vector)currentSelection).addElement(e); }
GrappaSupport.setHighlight(e, GrappaSupport.SELECTION_MASK, GrappaSupport.HIGHLIGHT_ON); ((Vector)currentSelection).addElement(e);
for (int i = 0; i < elements.size(); i++) { Element e = (Element)elements.elementAt(i); GrappaSupport.setHighlight(e, GrappaSupport.SELECTION_MASK, GrappaSupport.HIGHLIGHT_ON); ((Vector)currentSelection).addElement(e); }
public void select(Element e) { clearSelection(); resetColors(); currentSelection = new Vector(); GrappaSupport.setHighlight(e, GrappaSupport.SELECTION_MASK, GrappaSupport.HIGHLIGHT_ON); ((Vector)currentSelection).addElement(e); }
declare_interfaces(interfaces); declare_interface(Delegator.Factory.TYPE);
protected void generate() throws NoSuchMethodException { declare_interfaces(interfaces); declare_interface(Delegator.Factory.TYPE); generateConstructor(); generateFactory(); Set methodSet = new HashSet(); for (int i = 0; i < interfaces.length; i++) { Class iface ...
for (int i = 0; i < interfaces.length; i++) { Class iface = interfaces[i]; if (!iface.isInterface()) { throw new IllegalArgumentException(iface + " is not an interface");
for (int i = 0; i < classes.length; i++) { Class clazz = classes[i]; Method[] methods; if (bean) { methods = getBeanMethods(clazz); } else { if (!clazz.isInterface()) { throw new IllegalArgumentException(clazz + " is not an interface"); } declare_interface(clazz); methods = clazz.getMethods();
protected void generate() throws NoSuchMethodException { declare_interfaces(interfaces); declare_interface(Delegator.Factory.TYPE); generateConstructor(); generateFactory(); Set methodSet = new HashSet(); for (int i = 0; i < interfaces.length; i++) { Class iface ...
Method[] methods = iface.getMethods();
protected void generate() throws NoSuchMethodException { declare_interfaces(interfaces); declare_interface(Delegator.Factory.TYPE); generateConstructor(); generateFactory(); Set methodSet = new HashSet(); for (int i = 0; i < interfaces.length; i++) { Class iface ...