rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
generateProxy(iface, method, i);
generateProxy(clazz, method, i);
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 ...
private void generateProxy(Class iface, Method method, int arrayref) {
private void generateProxy(Class clazz, Method method, int arrayref) {
private void generateProxy(Class iface, Method method, int arrayref) { begin_method(method); load_this(); getfield(FIELD_NAME); aaload(arrayref); checkcast(iface); load_args(); invoke(method); return_value(); end_method(); }
checkcast(iface);
checkcast(clazz);
private void generateProxy(Class iface, Method method, int arrayref) { begin_method(method); load_this(); getfield(FIELD_NAME); aaload(arrayref); checkcast(iface); load_args(); invoke(method); return_value(); end_method(); }
return "output-device-assigened";
return "output-device-assigned";
public final String getName() { return "output-device-assigened"; }
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints);
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints, int translateX, int translateY);
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints);
protected MethodProxy(Method method, Method superMethod) { ClassLoader loader = superMethod.getDeclaringClass().getClassLoader(); this.method = createMethod(method); this.superMethod = createMethod(superMethod);
private MethodProxy(Class c1, String m1, Class c2, String m2) { this.m1 = m1; this.m2 = m2; this.f1 = FastClass.create(c1); this.f2 = FastClass.create(c2); i1 = f1.getIndex(m1); i2 = f2.getIndex(m2);
protected MethodProxy(Method method, Method superMethod) { ClassLoader loader = superMethod.getDeclaringClass().getClassLoader(); this.method = createMethod(method); this.superMethod = createMethod(superMethod); }
public static MethodProxy create(Method method, Method superMethod) { return new MethodProxy(method, superMethod);
public static MethodProxy create(Class c1, String m1, Class c2, String m2) { return new MethodProxy(c1, m1, c2, m2);
public static MethodProxy create(Method method, Method superMethod) { return new MethodProxy(method, superMethod); }
return method.invoke(obj, args);
if (i1 == -1) { throw new IllegalAccessException("Protected method: " + m1); } else { return f1.invoke(i1, obj, args); }
public Object invoke(Object obj, Object[] args) throws Throwable { return method.invoke(obj, args); }
return superMethod.invoke(obj, args);
if (i2 == -1) { throw new IllegalAccessException("Protected method: " + m2); } else { return f2.invoke(i2, obj, args); }
public Object invokeSuper(Object obj, Object[] args) throws Throwable { return superMethod.invoke(obj, args); }
(Experiment)getPropertyValue((ConfigurableComponent)node, "Experiment");
(Experiment)getPropertyValue((ComponentProperties)node, "Experiment");
public ConsoleInternalFrame(NodeComponent node, ConsoleNodeListener listener, JScrollPane pane, JRadioButton statusButton, String logFileName, NodeServesClient nodeServer, ...
(ArrayList)getPropertyValue((ConfigurableComponent)node, "AgentNames");
(ArrayList)getPropertyValue((ComponentProperties)node, "AgentNames");
public void displayAbout() { final ArrayList agentNames = (ArrayList)getPropertyValue((ConfigurableComponent)node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; // insets are top, left, bottom, right aboutPanel.add(new JLab...
aboutPanel.add(new JLabel((String)getPropertyValue((ConfigurableComponent)host, "MachineType")),
aboutPanel.add(new JLabel((String)getPropertyValue((ComponentProperties)host, "MachineType")),
public void displayAbout() { final ArrayList agentNames = (ArrayList)getPropertyValue((ConfigurableComponent)node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; // insets are top, left, bottom, right aboutPanel.add(new JLab...
aboutPanel.add(new JLabel((String)getPropertyValue((ConfigurableComponent)host, "Location")),
aboutPanel.add(new JLabel((String)getPropertyValue((ComponentProperties)host, "Location")),
public void displayAbout() { final ArrayList agentNames = (ArrayList)getPropertyValue((ConfigurableComponent)node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; // insets are top, left, bottom, right aboutPanel.add(new JLab...
aboutPanel.add(new JLabel((String)getPropertyValue((ConfigurableComponent)host, "Description")),
aboutPanel.add(new JLabel((String)getPropertyValue((ComponentProperties)host, "Description")),
public void displayAbout() { final ArrayList agentNames = (ArrayList)getPropertyValue((ConfigurableComponent)node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; // insets are top, left, bottom, right aboutPanel.add(new JLab...
aboutPanel.add(new JLabel((String)getPropertyValue((ConfigurableComponent)node, "Description")),
aboutPanel.add(new JLabel((String)getPropertyValue((ComponentProperties)node, "Description")),
public void displayAbout() { final ArrayList agentNames = (ArrayList)getPropertyValue((ConfigurableComponent)node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; // insets are top, left, bottom, right aboutPanel.add(new JLab...
private Object getPropertyValue(ConfigurableComponent component, String name) { Property prop = component.getProperty(new ComponentName(component, name));
private Object getPropertyValue(ComponentProperties component, String name) { Property prop = component.getProperty(name);
private Object getPropertyValue(ConfigurableComponent component, String name) { Property prop = component.getProperty(new ComponentName(component, name)); if (prop == null) return null; return prop.getValue(); }
_ivypattern = getProperty(_ivypattern, ivy, "ivy.retrieve.ivy.pattern");
public void execute() throws BuildException { Ivy ivy = getIvyInstance(); _organisation = getProperty(_organisation, ivy, "ivy.organisation"); _module = getProperty(_module, ivy, "ivy.module"); ensureResolved(isHaltonfailure(), getOrganisation(), getModule()); _org...
Signature sig = TypeUtils.getSignature(method);
Signature sig = ReflectUtils.getSignature(method);
public void invoke(Method method) { Class declaring = method.getDeclaringClass(); Type owner = Type.getType(declaring); Signature sig = TypeUtils.getSignature(method); if (declaring.isInterface()) { invoke_interface(owner, sig); } else if (TypeUtils.isStatic(method.getM...
log.warn("Caught general adaptor exception, reverting context. Might be running multiple mailers", ge);
if ( _warnOnGeneralAdaptorExceptionLockingMessage ) log.warn("Caught general adaptor exception, reverting context. Might be running multiple mailers", ge);
public void sendMailMessages(NSArray mailMessages) { if (mailMessages.count() > 0) { log.info("Sending " + mailMessages.count() + " mail message(s)."); for (Enumeration messageEnumerator = mailMessages.objectEnumerator(); messageEnumerator.hasMoreElements();) { ...
log.info("Of primaryKey count: " + primaryKeys.count() + " fetching range: " + range + " which is: " + primaryKeysToFetch.count());
log.debug("Of primaryKey count: " + primaryKeys.count() + " fetching range: " + range + " which is: " + primaryKeysToFetch.count());
public NSArray nextBatch() { if (editingContext() == null) throw new RuntimeException("ERXFetchSpecificationBatchIterator: Calling nextBatch with a null editing context!"); EOEntity entity = EOUtilities.entityNamed(editingContext(), fetchSpecification.entityName()); if (entit...
public void sendMail (boolean shouldBlock) {
public void sendMail () {
public void sendMail (boolean shouldBlock) { try { this.finishMessagePreparation (); ERMailSender sender = ERMailSender.sharedMailSender (); ERMessage message = this.buildMessage (); if (shouldBlock) sender.sendMessageNow (message); els...
this.finishMessagePreparation (); ERMailSender sender = ERMailSender.sharedMailSender (); ERMessage message = this.buildMessage (); if (shouldBlock) sender.sendMessageNow (message); else { boolean mailAccepted = false; while (!mailAccepted) { try { sender.sendMessageDeffered (message); mailAccepted = true; } catch...
sendMail (false); } catch (NSForwardException e) { log.warn ("Sending mail in a non-blocking manner and a forward exception was thrown.", e);
public void sendMail (boolean shouldBlock) { try { this.finishMessagePreparation (); ERMailSender sender = ERMailSender.sharedMailSender (); ERMessage message = this.buildMessage (); if (shouldBlock) sender.sendMessageNow (message); els...
ExtendableItemHelper.getExtraAttributes(attributes, new String[] {"position", "name", "default", "evicted", "error", "pubdate", "conf", "searched", "downloaded", "resolver", "artresolver", "status", "homepage"}));
ExtendableItemHelper.getExtraAttributes(attributes, "extra-"));
public void parse() throws Exception { SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser(); saxParser.parse(_report, new DefaultHandler() { private String _organisation; private String _module; private String _revision; ...
Artifact artifact = new DefaultArtifact(_mrid, _pubdate, artifactName, type, ext, ExtendableItemHelper.getExtraAttributes(attributes, new String[] {"name", "type", "ext", "status"}));
Artifact artifact = new DefaultArtifact(_mrid, _pubdate, artifactName, type, ext, ExtendableItemHelper.getExtraAttributes(attributes, "extra-"));
public void parse() throws Exception { SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser(); saxParser.parse(_report, new DefaultHandler() { private String _organisation; private String _module; private String _revision; ...
ExtendableItemHelper.getExtraAttributes(attributes, new String[] {"position", "name", "default", "evicted", "error", "pubdate", "conf", "searched", "downloaded", "resolver", "artresolver", "status", "homepage"}));
ExtendableItemHelper.getExtraAttributes(attributes, "extra-"));
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if ("module".equals(qName)) { _organisation = attributes.getValue("organisation"); _module = attributes.getValue("name"); ...
Artifact artifact = new DefaultArtifact(_mrid, _pubdate, artifactName, type, ext, ExtendableItemHelper.getExtraAttributes(attributes, new String[] {"name", "type", "ext", "status"}));
Artifact artifact = new DefaultArtifact(_mrid, _pubdate, artifactName, type, ext, ExtendableItemHelper.getExtraAttributes(attributes, "extra-"));
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if ("module".equals(qName)) { _organisation = attributes.getValue("organisation"); _module = attributes.getValue("name"); ...
public GenerateHTMLDoc(String jSDir, String destDir, String nomeArquivo) {
public GenerateHTMLDoc(File fis, String destDir) { String nomeArquivo = fis.getName();
public GenerateHTMLDoc(String jSDir, String destDir, String nomeArquivo) { try { fis = new FileInputStream(jSDir + nomeArquivo); fos = new FileOutputStream(destDir + nomeArquivo.substring(0, nomeArquivo.indexOf(".")) + ".htm"); br = new BufferedReader(new InputStreamReader(fi...
fis = new FileInputStream(jSDir + nomeArquivo);
public GenerateHTMLDoc(String jSDir, String destDir, String nomeArquivo) { try { fis = new FileInputStream(jSDir + nomeArquivo); fos = new FileOutputStream(destDir + nomeArquivo.substring(0, nomeArquivo.indexOf(".")) + ".htm"); br = new BufferedReader(new InputStreamReader(fi...
br = new BufferedReader(new InputStreamReader(fis));
br = new BufferedReader(new FileReader(fis));
public GenerateHTMLDoc(String jSDir, String destDir, String nomeArquivo) { try { fis = new FileInputStream(jSDir + nomeArquivo); fos = new FileOutputStream(destDir + nomeArquivo.substring(0, nomeArquivo.indexOf(".")) + ".htm"); br = new BufferedReader(new InputStreamReader(fi...
fos.write(("<H2>Arquivo: " + nomeArquivo + "</H2>" + LINE_SEPARATOR).getBytes());
fos.write(("<H2>Filename: " + nomeArquivo + "</H2>" + LINE_SEPARATOR).getBytes());
public GenerateHTMLDoc(String jSDir, String destDir, String nomeArquivo) { try { fis = new FileInputStream(jSDir + nomeArquivo); fos = new FileOutputStream(destDir + nomeArquivo.substring(0, nomeArquivo.indexOf(".")) + ".htm"); br = new BufferedReader(new InputStreamReader(fi...
public static void main(String args[]) {
public static void main(String args[]) throws Exception{
public static void main(String args[]) { GenerateHTMLDoc main1 = new GenerateHTMLDoc(args[0], args[1], args[2]); }
GenerateHTMLDoc main1 = new GenerateHTMLDoc(args[0], args[1], args[2]);
GenerateHTMLDoc main1 = new GenerateHTMLDoc(new File(args[0]), args[1]);
public static void main(String args[]) { GenerateHTMLDoc main1 = new GenerateHTMLDoc(args[0], args[1], args[2]); }
MethodInterceptor interceptor = new NoOpInterceptor();
public void testEnhance()throws Throwable{ MethodInterceptor interceptor = new NoOpInterceptor(); java.util.Vector vector1 = (java.util.Vector)Enhancer.enhance( java.util.Vector.class, new Class[]{java.util.List.class},interceptor ); java.util.Vector vecto...
new Class[]{java.util.List.class},interceptor );
new Class[]{java.util.List.class}, NOOP_INTERCEPTOR );
public void testEnhance()throws Throwable{ MethodInterceptor interceptor = new NoOpInterceptor(); java.util.Vector vector1 = (java.util.Vector)Enhancer.enhance( java.util.Vector.class, new Class[]{java.util.List.class},interceptor ); java.util.Vector vecto...
MethodInterceptor interceptor = new NoOpInterceptor();
public void testEnhanced()throws Throwable{ MethodInterceptor interceptor = new NoOpInterceptor(); Source source = (Source)Enhancer.enhance( Source.class, new Class[]{java.util.List.class}, interceptor ); TestCase.assertTrue("enhance", Source.class != source.getClass() ...
new Class[]{java.util.List.class}, interceptor );
null, NOOP_INTERCEPTOR );
public void testEnhanced()throws Throwable{ MethodInterceptor interceptor = new NoOpInterceptor(); Source source = (Source)Enhancer.enhance( Source.class, new Class[]{java.util.List.class}, interceptor ); TestCase.assertTrue("enhance", Source.class != source.getClass() ...
new Class[]{java.util.List.class},interceptor );
null,interceptor );
public void testMethods()throws Throwable{ MethodInterceptor interceptor = new NoOpInterceptor(){ public Object afterReturn( Object obj, Method method, Object args[], boolean invokedSuper, Object retValFromSuper, java.lang.Throwable e )thro...
MethodInterceptor interceptor = new NoOpInterceptor();
public void testTypes()throws Throwable{ MethodInterceptor interceptor = new NoOpInterceptor(); Source source = (Source)Enhancer.enhance( Source.class, new Class[]{java.util.List.class}, interceptor ); TestCase.assertTrue("intType", 1 == source.intType(1)); TestCase...
new Class[]{java.util.List.class}, interceptor );
null, NOOP_INTERCEPTOR );
public void testTypes()throws Throwable{ MethodInterceptor interceptor = new NoOpInterceptor(); Source source = (Source)Enhancer.enhance( Source.class, new Class[]{java.util.List.class}, interceptor ); TestCase.assertTrue("intType", 1 == source.intType(1)); TestCase...
clazz.setEntityName(entity.name());
public EOEnterpriseObjectClazz classFromEntity(EOEntity entity) { EOEnterpriseObjectClazz clazz = null; if(entity == null) { clazz = newInstanceOfDefaultClazz(); } else { try { String className = entity.className(); ...
clazz.setEntityName(entityName);
public static EOEnterpriseObjectClazz clazzForEntityNamed(String entityName) { EOEnterpriseObjectClazz clazz = (EOEnterpriseObjectClazz)allClazzes.objectForKey(entityName); if(clazz == null) { clazz = factory().classFromEntity(ERXEOAccessUtilities.entityNamed(null, entityName)); } ...
return ERXLocalizer.currentLocalizer().localizedStringForKeyWithDefault(result);
result = ERXLocalizer.currentLocalizer().localizedStringForKeyWithDefault(result); return result;
protected Object localizedValueForDisplayNameOfKeyPath(String keyPath, D2WContext c) { String result = ERXStringUtilities.displayNameForKey((String)c.valueForKeyPath(keyPath)); if(result != null) { return ERXLocalizer.currentLocalizer().localizedStringForKeyWithDefault(result); } ...
if (crc < 0 || crc > 0xffffffff)
if (crc < 0 || crc > 0xffffffffL)
public void setCrc (long crc) { if (crc < 0 || crc > 0xffffffff) throw new IllegalArgumentException (); this.crc = crc; }
if (size < 0 || size > 0xffffffff)
if (size < 0 || size > 0xffffffffL)
public void setSize (long size) { if (size < 0 || size > 0xffffffff) throw new IllegalArgumentException (); this.size = size; }
if (destinationSortKey() == null)
if (destinationSortKey() == null || destinationSortKey().length() == 0)
protected String _localSortKey() { if (destinationSortKey() == null) { setDestinationSortKey((String)valueForBinding("destinationSortKey")); if (destinationSortKey() == null) setDestinationSortKey(_localDestinationDisplayKey()); } return destinationSortKey()...
if (_localSortKey()!=null && _localSortKey().length()>0) ERXArrayUtilities.sortArrayWithKey(aSortedArray, _localSortKey());
ERXArrayUtilities.sortArrayWithKey(aSortedArray, _localSortKey());
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...
{ }
{ textListener = AWTEventMulticaster.add (textListener, listener); }
public synchronized void addTextListener (TextListener listener) { /* FIXME */ }
public void setCaretPosition (int pos) { caretPosition = pos; }
public void setCaretPosition (int pos) { caretPosition = pos; if (peer != null) { TextComponentPeer t = (TextComponentPeer) peer; t.setCaretPosition (pos); } }
public void setCaretPosition (int pos) { caretPosition = pos; }
return getItemCount ();
return items.size ();
public int countItems (){ return getItemCount ();}
String path = "src" + java.io.File.separator + "documentation" + java.io.File.separator + "content" + java.io.File.separator
String path = getPathToContent() + java.io.File.separator
public static String getPathToXDocs() { if (logger.isDebugEnabled()) { logger.debug("getPathToXDocs() - start"); } // FIXME: get this value from the package config file (forrest.properties) String path = "src" + java.io.File.separator + "documentation" + java.io.Fi...
result.append("CSMART ");
result.append("Based on Cougaar core ");
public static String writeDebug() { // Cougaar version, build info StringBuffer result = new StringBuffer(); String version = null; long buildtime = 0; try { Class vc = Class.forName("org.cougaar.Version"); Field vf = vc.getField("version"); Field bf = vc.getField("buildTime"); vers...
result.append(version+" built on "+(new Date(buildtime)) + "\n");
result.append(version+" built on "+((buildtime > 0) ? (new Date(buildtime)).toString() : "(unknown time)") + "\n"); result.append("Repository: "+ ((repositoryTag != null) ? (repositoryTag + (repositoryModified ? " (modified)" : "")) : "(unknown tag)")+ " on "+ ((repositoryTime > 0) ? ((new Date(repositoryTime)).toStri...
public static String writeDebug() { // Cougaar version, build info StringBuffer result = new StringBuffer(); String version = null; long buildtime = 0; try { Class vc = Class.forName("org.cougaar.Version"); Field vf = vc.getField("version"); Field bf = vc.getField("buildTime"); vers...
Object object = context.objectAtIndex(index);
object = context.objectAtIndex(index);
protected void _prepareForIterationWithIndex(Context context, int index, WOContext wocontext, WOComponent wocomponent) { if (_item != null) { Object object = context.objectAtIndex(index); _item._setValueNoValidation(object, wocomponent); } if (_index != null) { ...
if (index != 0) wocontext.incrementLastElementIDComponent(); else wocontext.appendZeroElementIDComponent();
if(checkHashCodes(wocontext)) { if(object != null) { if (index != 0) { wocontext.deleteLastElementIDComponent(); } wocontext.appendElementIDComponent(index + "-" + hashCodeForObject(object)); } else { if (index != 0) { wocontext.incrementLastElementIDComponent(); } else { wocontext.appendZeroElementIDComponent(); } } }...
protected void _prepareForIterationWithIndex(Context context, int index, WOContext wocontext, WOComponent wocomponent) { if (_item != null) { Object object = context.objectAtIndex(index); _item._setValueNoValidation(object, wocomponent); } if (_index != null) { ...
int index = indexString == null ? 0 : Integer.parseInt(indexString);
int index = 0; int hashCode = 0; if(indexString != null) { if(checkHashCodes(wocontext)) { int sep = indexString.indexOf("-"); if(sep > 0) { hashCode = Integer.parseInt(indexString.substring(sep+1)); index = Integer.parseInt(indexString.substring(0, sep)); } else { } } else { index = Integer.parseInt(indexString); } }
public WOActionResults invokeAction(WORequest worequest, WOContext wocontext) { WOComponent wocomponent = wocontext.component(); Context context = createContext(wocomponent); int count = _count(context, wocomponent); WOActionResults woactionresults = null; String i...
if(checkHashCodes(wocontext)) { if(object != null && hashCode != 0) { int objectHashCode = hashCodeForObject(object); if(objectHashCode != hashCode) { boolean found = false; for(int i = 0; i < context.count() && !found; i++) { Object o = context.objectAtIndex(i); int otherHashCode = hashCodeForObject(o); if(otherHashCo...
public WOActionResults invokeAction(WORequest worequest, WOContext wocontext) { WOComponent wocomponent = wocontext.component(); Context context = createContext(wocomponent); int count = _count(context, wocomponent); WOActionResults woactionresults = null; String i...
userObject instanceof SocietyComponent) ((SocietyComponent)userObject).setEditable(true);
userObject instanceof ModifiableConfigurableComponent) ((ModifiableConfigurableComponent)userObject).setEditable(true);
private void removeAllChildren(DefaultMutableTreeNode parent) { for (int i = 0; i < parent.getChildCount(); i++) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)parent.getChildAt(i); // make removed society component editable again Object userObject = node.getUserObject(); if (userObje...
userObject instanceof SocietyComponent) ((SocietyComponent)userObject).setEditable(true);
userObject instanceof ModifiableConfigurableComponent) ((ModifiableConfigurableComponent)userObject).setEditable(true);
private void removeSelectedItems() { TreePath[] selectionPaths = tree.getSelectionPaths(); if (selectionPaths == null) return; DefaultMutableTreeNode[] nodes = new DefaultMutableTreeNode[selectionPaths.length]; for (int i = 0; i < nodes.length; i++) { nodes[i] = (DefaultMutableTreeNode) se...
return getParameter(paramName, mimeType);
int idx = mimeString.indexOf(paramName + "="); if (idx == -1) return(null); String value = mimeString.substring(idx + paramName.length() + 2); idx = value.indexOf(" "); if (idx == -1) return(value); else return(value.substring(0, idx));
getParameter(String paramName){ return getParameter(paramName, mimeType);}
return new BufferedInputStream(new CoreInputStream (core));
return new CoreInputStream (core);
public InputStream getInputStream() throws IOException { if (!connected) connect(); if (! doInput) throw new ProtocolException("Can't open InputStream if doInput is false"); return new BufferedInputStream(new CoreInputStream (core)); }
public String getHeaderField(String name)
public String getHeaderField(int index)
public String getHeaderField(String name) { // Subclasses for specific protocols override this. return null; }
ProtocolException(String message)
ProtocolException()
ProtocolException(String message){ super(message);}
super(message);
super();
ProtocolException(String message){ super(message);}
_actionUrl = context().componentActionURL();
_actionUrl = AjaxUtils.ajaxComponentActionUrl(context());
public void appendToResponse(WOResponse response, WOContext context) { _actionUrl = context().componentActionURL(); super.appendToResponse(response, context); }
value = defaultValue;
value = valueForBinding(name);
public Object valueForBinding(String name, Object defaultValue) { Object value = defaultValue; if(hasBinding(name)) { value = defaultValue; } return value; }
return getLatestStrategy().findLatest(ais, date) == ais[0];
return getLatestStrategy().findLatest(ais, date) != ais[1];
private boolean isAfter(ResolvedModuleRevision rmr1, ResolvedModuleRevision rmr2, Date date) { ArtifactInfo[] ais = new ArtifactInfo[] { new ResolvedModuleRevisionArtifactInfo(rmr1), new ResolvedModuleRevisionArtifactInfo(rmr2) }; return getLatestStrategy().findLat...
if (mr == null) { throw new NullPointerException("null module revision not allowed"); } if (resolver == null) { throw new NullPointerException("null resolver not allowed"); }
public ResolvedModuleRevisionProxy(ResolvedModuleRevision mr, DependencyResolver resolver) { _mr = mr; _resolver = resolver; }
if ( this.process == null ) { throw new MissingAttributeException( "process" ); }
checkObjectAttribute( "process", getProcess() );
public void doTag(XMLOutput output) throws Exception { if ( this.process == null ) { throw new MissingAttributeException( "process" ); } ProcessContext context = getProcessContext(); ProcessEngine engine = getProcessEngine(); engine.call( getProcess(), ...
ProcessEngine engine = getProcessEngine();
ProcessEngine engine = context.getProcessEngine();
public void doTag(XMLOutput output) throws Exception { if ( this.process == null ) { throw new MissingAttributeException( "process" ); } ProcessContext context = getProcessContext(); ProcessEngine engine = getProcessEngine(); engine.call( getProcess(), ...
private static void loadProviders(String dir, String vendor)
private static void loadProviders(String baseUrl, String vendor)
private static void loadProviders(String dir, String vendor) { if (dir == null || vendor == null) return; String separator = System.getProperty("file.separator"); String secfilestr = (dir + separator + "lib" + separator + "security" + separator + vendor + ".security"); try { FileInputS...
if (dir == null || vendor == null)
if (baseUrl == null || vendor == null)
private static void loadProviders(String dir, String vendor) { if (dir == null || vendor == null) return; String separator = System.getProperty("file.separator"); String secfilestr = (dir + separator + "lib" + separator + "security" + separator + vendor + ".security"); try { FileInputS...
String separator = System.getProperty("file.separator"); String secfilestr = (dir + separator + "lib" + separator + "security" + separator + vendor + ".security");
String secfilestr = baseUrl + "/security/" + vendor + ".security";
private static void loadProviders(String dir, String vendor) { if (dir == null || vendor == null) return; String separator = System.getProperty("file.separator"); String secfilestr = (dir + separator + "lib" + separator + "security" + separator + vendor + ".security"); try { FileInputS...
FileInputStream fin = new FileInputStream(secfilestr);
InputStream fin = new URL(secfilestr).openStream();
private static void loadProviders(String dir, String vendor) { if (dir == null || vendor == null) return; String separator = System.getProperty("file.separator"); String secfilestr = (dir + separator + "lib" + separator + "security" + separator + vendor + ".security"); try { FileInputS...
if ((tx == 0) || (ty == 0))
if ((tx == 0) && (ty == 0))
public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints) { if ((tx == 0) || (ty == 0)) { directGfx.drawPolygon(xPoints, yPoints, nPoints); return; } throw new UnsupportedOperationException("translate not implemented"); }
if ((tx == 0) || (ty == 0))
if ((tx == 0) && (ty == 0))
public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints) { if ((tx == 0) || (ty == 0)) { directGfx.drawPolyline(xPoints, yPoints, nPoints); return; } throw new UnsupportedOperationException("translate not implemented"); }
if ((tx == 0) || (ty == 0)) { directGfx.fillPolygon(xPoints, yPoints, nPoints); return; } throw new UnsupportedOperationException("translate not implemented");
directGfx.fillPolygon (xPoints, yPoints, nPoints, tx, ty);
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints) { if ((tx == 0) || (ty == 0)) { directGfx.fillPolygon(xPoints, yPoints, nPoints); return; } throw new UnsupportedOperationException("translate not implemented"); }
super((Frame)null, true);
public NodeArgumentDialog() { JPanel nodeArgPanel = new JPanel(new BorderLayout()); // ok and cancel buttons panel JPanel buttonPanel = new JPanel(); JButton okButton = new JButton("OK"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { setVisib...
argTable.getSelectionModel().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
argTable.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
public NodeArgumentDialog() { JPanel nodeArgPanel = new JPanel(new BorderLayout()); // ok and cancel buttons panel JPanel buttonPanel = new JPanel(); JButton okButton = new JButton("OK"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { setVisib...
if ((b & 0xE) == 0xC0)
if ((b & 0xE0) == 0xC0)
public int read (char[] outbuffer, int outpos, int outlength) { int origpos = outpos; for (;;) { if (outpos >= outlength) break; if (inpos >= inlength) break; int b = inbuffer[inpos++]; if (b >= 0) outbuffer[outpos++] = (char) b; else { if ((b & 0xC0) == 0x80) // Continuation byte { par...
else if ((b & 0xF) == 0xF0)
else if ((b & 0xF0) == 0xE0)
public int read (char[] outbuffer, int outpos, int outlength) { int origpos = outpos; for (;;) { if (outpos >= outlength) break; if (inpos >= inlength) break; int b = inbuffer[inpos++]; if (b >= 0) outbuffer[outpos++] = (char) b; else { if ((b & 0xC0) == 0x80) // Continuation byte { par...
super.addNotify ();
public void addNotify () { if (peer == null) peer = getToolkit ().createChoice (this); }
if ((k == (char) 27) || (k == 'q')) { quit = true; return; }
private void dispatchKey(char k) { if ((k == (char) 27) || (k == 'q')) { quit = true; return; } switch (k) { case 27: case 'q': quit = true; break; case 'v': doViewAll = true; System.err.println("Forcing viewAll()"); break; ...
quit = true;
runExit();
private void dispatchKey(char k) { if ((k == (char) 27) || (k == 'q')) { quit = true; return; } switch (k) { case 27: case 'q': quit = true; break; case 'v': doViewAll = true; System.err.println("Forcing viewAll()"); break; ...
if (quit) { return;
viewer.update(); CameraParameters params = viewer.getCameraParameters(); cameraPerspective.set(params.getProjectionMatrix()); cameraInverseTransform.set(params.getModelviewMatrix()); cameraTransform.set(cameraInverseTransform); cameraTransform.invertRigid(); spotlightTransform.set(spotlight.getTransform()); spotli...
public void display(GLDrawable drawable) { if (quit) { return; } if (!fullyInitialized) { return; } if (!firstRender) { if (++frameCount == 30) { timer.stop(); System.err.println("Frames per second: " + (30.0f / timer.getDurationAsSeconds())); ...
CameraParameters params = viewer.getCameraParameters();
public void display(GLDrawable drawable) { if (quit) { return; } if (!fullyInitialized) { return; } if (!firstRender) { if (++frameCount == 30) { timer.stop(); System.err.println("Frames per second: " + (30.0f / timer.getDurationAsSeconds())); ...
quit = true;
public void init(GLDrawable drawable) { // drawable.setGL(new DebugGL(drawable.getGL())); GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); glut = new GLUT(); try { checkExtension(gl, "GL_ARB_multitexture"); checkExtension(gl, "GL_ARB_depth_texture"); checkExt...
quit = true;
runExit();
public void run(String[] args) { canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); canvas.addGLEventListener(new Listener()); canvas.setNoAutoRedrawMode(true); Frame frame = new Frame("ARB_shadow Shadows"); frame.setLayout(new BorderLayout()); canvas.setSize(512, 512); ...
try { while (!quit) { if (viewer != null) { viewer.update(); CameraParameters params = viewer.getCameraParameters(); cameraPerspective.set(params.getProjectionMatrix()); cameraInverseTransform.set(params.getModelviewMatrix()); cameraTransform.set(cameraInverseTransform); cameraTransform.invertRigid(); spotlightTra...
animator.start();
public void run(String[] args) { canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); canvas.addGLEventListener(new Listener()); canvas.setNoAutoRedrawMode(true); Frame frame = new Frame("ARB_shadow Shadows"); frame.setLayout(new BorderLayout()); canvas.setSize(512, 512); ...
quit = true;
runExit();
public void windowClosing(WindowEvent e) { quit = true; }
aborting = true;
userStoppedTrials = true;
private void abortButton_actionPerformed(ActionEvent e) { aborting = true; stopAllNodes(); }
runButton.setEnabled(false);
private void experimentFinished() { trialProgressBar.setValue(experiment.getTrialCount() + 1); updateExperimentControls(experiment, false); runButton.setEnabled(false); runButton.setSelected(false); experimentTimer.stop(); }
runButton.setEnabled(true); currentTrial = -1;
private void experimentFinished() { trialProgressBar.setValue(experiment.getTrialCount() + 1); updateExperimentControls(experiment, false); runButton.setEnabled(false); runButton.setSelected(false); experimentTimer.stop(); }
if (aborting) { experimentFinished(); aborting = false; } else if (haveMoreTrials()) {
if (haveMoreTrials()) {
public void nodeStopped(NodeComponent nodeComponent) { oldNodes.put(nodeComponent, runningNodes.get(nodeComponent)); runningNodes.remove(nodeComponent); // when any node has stopped, kill the rest of the nodes // unless we're already killing the other nodes if (!stopping) stopAllNodes(); // wh...
trialProgressPanel.add(trialTimeLabel); trialProgressPanel.add(Box.createRigidArea(HGAP5));
if (!experiment.isInDatabase()) { trialProgressPanel.add(trialTimeLabel); trialProgressPanel.add(Box.createRigidArea(HGAP10)); }
private void setSocietyComponent(SocietyComponent cc) { communitySupport = new ClientCommunityController(); runningNodes = new Hashtable(); oldNodes = new Hashtable(); nodeListeners = new Hashtable(); nodePanes = new Hashtable(); // top level menus JMenu fileMenu = new JMenu(FILE_MENU); fileMe...
hostConfiguration = new HostConfigurationBuilder(experiment);
hostConfiguration = new HostConfigurationBuilder(experiment, csmart);
private void setSocietyComponent(SocietyComponent cc) { communitySupport = new ClientCommunityController(); runningNodes = new Hashtable(); oldNodes = new Hashtable(); nodeListeners = new Hashtable(); nodePanes = new Hashtable(); // top level menus JMenu fileMenu = new JMenu(FILE_MENU); fileMe...
PropertyEditorPanel trialViewer = new PropertyEditorPanel(experiment.getComponentsAsArray()); jif = new JInternalFrame("Trial Values", true, false, true, true); jif.getContentPane().add(trialViewer); jif.setSize(300, 300); jif.setLocation(310, 0); jif.setVisible(true); desktop.add(jif, JLayeredPane.DEFAULT_LAYER);
if (!experiment.isInDatabase()) { PropertyEditorPanel trialViewer = new PropertyEditorPanel(experiment.getComponentsAsArray()); jif = new JInternalFrame("Trial Values", true, false, true, true); jif.getContentPane().add(trialViewer); jif.setSize(300, 300); jif.setLocation(310, 0); jif.setVisible(true); desktop.add(jif,...
private void setSocietyComponent(SocietyComponent cc) { communitySupport = new ClientCommunityController(); runningNodes = new Hashtable(); oldNodes = new Hashtable(); nodeListeners = new Hashtable(); nodePanes = new Hashtable(); // top level menus JMenu fileMenu = new JMenu(FILE_MENU); fileMe...
if (aborting) { runButton.setEnabled(false); runButton.setSelected(false); stopButton.setEnabled(false); stopButton.setSelected(false); abortButton.setEnabled(false); abortButton.setSelected(false); return; }
private void updateExperimentControls(Experiment experiment, boolean isRunning) { if (!isRunning) { experiment.experimentStopped(); csmart.setRunningExperiment(null); } else csmart.setRunningExperiment(experiment); // update societies int nSocieties = experiment.getSocietyComponentCount...
abortButton.setSelected(false);
private void updateExperimentControls(Experiment experiment, boolean isRunning) { if (!isRunning) { experiment.experimentStopped(); csmart.setRunningExperiment(null); } else csmart.setRunningExperiment(experiment); // update societies int nSocieties = experiment.getSocietyComponentCount...
DBUtils.deleteItems(asbPrefix+"asb_thread", "assembly_id", "assembly_id", QUERY_FILE);
static void clearAllCMTAssemblies(){ DBUtils.deleteItems(asbPrefix+"asb_component_hierarchy","assembly_id","assembly_id", QUERY_FILE); DBUtils.deleteItems(asbPrefix+"asb_agent", "assembly_id", "assembly_id", QUERY_FILE); DBUtils.deleteItems(asbPrefix+"asb_agent_pg_attr","assembly_id","assembly_id", QUERY_FIL...
queries.add(DBUtils.makeDeleteQuery(asbPrefix+"expt_trial_metric_prop", "trial_id", trial_id)); queries.add(DBUtils.makeDeleteQuery(asbPrefix+"expt_trial_metric", "trial_id", trial_id));
public static void deleteExperiment(String experiment_id, String experiment_name) { if (experiment_id == null) return; boolean doIt = true; // HACK: Avoid deleting base experiments if (! experiment_id.startsWith("EXPT-")) doIt = false; if (doIt == false) { int response = JOption...