bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
private void mousePressedSelectionTarget(PNode node) { if (ChainBuilderAgent.DEBUG) { System.err.println("pressing on selection target.."); System.err.println("mousePressedSelectionTarget.... setting link state to changing point"); } selectionTarget = (LinkSelectionTarget) node; selectionTarget.getLink().setSelected(true); linkState = LINK_CHANGING_POINT; }
private void mousePressedSelectionTarget(PNode node) { if (ChainBuilderAgent.DEBUG) { System.err.println("pressing on selection target.."); System.err.println("mousePressedSelectionTarget.... setting link state to changing point"); } selectionTarget = (LinkSelectionTarget) node; selectionTarget.getLink().setSelected(true); linkState = LINK_CHANGING_POINT; }
3,233,752
public void mouseReleased(PInputEvent e) { if (e.isPopupTrigger()) { if (ChainBuilderAgent.DEBUG) System.err.println("mouse released"); evaluatePopup(e); } }
public void mouseReleased(PInputEvent e) { if (e.isPopupTrigger()) { if (ChainBuilderAgent.DEBUG) System.err.println("mouse released"); evaluatePopup(e); } }
3,233,753
public void setModulesDisplayMode() { Collection mods = canvas.findModules(); Iterator iter = mods.iterator(); ModuleView mod; PCamera camera=canvas.getCamera(); double curScale = camera.getViewScale(); boolean showingOverview = false; if (curScale< Constants.SCALE_THRESHOLD) { showingOverview = true; } if (ChainBuilderAgent.DEBUG) { System.err.println("current scale is "+curScale); System.err.println("showing overview..."+showingOverview); } iter = mods.iterator(); while (iter.hasNext()) { mod = (ModuleView)iter.next(); if (showingOverview == true) { mod.showOverview(); } else { mod.showDetails(); } } if (showingOverview == true) canvas.showModuleLinks(); else canvas.showParamLinks(); }
public void setModulesDisplayMode() { Collection mods = canvas.findModules(); Iterator iter = mods.iterator(); ModuleView mod; PCamera camera=canvas.getCamera(); double curScale = camera.getViewScale(); boolean showingOverview = false; if (curScale< Constants.SCALE_THRESHOLD) { showingOverview = true; } if (ChainBuilderAgent.DEBUG) { System.err.println("current scale is "+curScale); System.err.println("showing overview..."+showingOverview); } iter = mods.iterator(); while (iter.hasNext()) { mod = (ModuleView)iter.next(); if (showingOverview == true) { mod.showOverview(); } else { mod.showDetails(); } } if (showingOverview == true) canvas.showModuleLinks(); else canvas.showParamLinks(); }
3,233,754
private void startModuleLinks(PInputEvent e) { if (selectedModule == null) return; Point2D pos = e.getPosition(); boolean isInput = selectedModule.isOnInputSide(pos); Collection inputs = selectedModule.getInputParameters(); Collection outputs = selectedModule.getOutputParameters(); if (isInput == true || outputs.size() == 0) { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on input side"); startModuleLinks(inputs); moduleLinksStartedAsInputs = true; } else { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on output side"); startModuleLinks(outputs); moduleLinksStartedAsInputs = false; } if (ChainBuilderAgent.DEBUG) System.err.println("start module links. link state is LINKING_MODULES"); linkState = LINKING_MODULES; }
private void startModuleLinks(PInputEvent e) { if (selectedModule == null) return; Point2D pos = e.getPosition(); boolean isInput = selectedModule.isOnInputSide(pos); Collection inputs = selectedModule.getInputParameters(); Collection outputs = selectedModule.getOutputParameters(); if (isInput == true || outputs.size() == 0) { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on input side"); startModuleLinks(inputs); moduleLinksStartedAsInputs = true; } else { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on output side"); startModuleLinks(outputs); moduleLinksStartedAsInputs = false; } if (ChainBuilderAgent.DEBUG) System.err.println("start module links. link state is LINKING_MODULES"); linkState = LINKING_MODULES; }
3,233,755
private void startModuleLinks(PInputEvent e) { if (selectedModule == null) return; Point2D pos = e.getPosition(); boolean isInput = selectedModule.isOnInputSide(pos); Collection inputs = selectedModule.getInputParameters(); Collection outputs = selectedModule.getOutputParameters(); if (isInput == true || outputs.size() == 0) { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on input side"); startModuleLinks(inputs); moduleLinksStartedAsInputs = true; } else { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on output side"); startModuleLinks(outputs); moduleLinksStartedAsInputs = false; } if (ChainBuilderAgent.DEBUG) System.err.println("start module links. link state is LINKING_MODULES"); linkState = LINKING_MODULES; }
private void startModuleLinks(PInputEvent e) { if (selectedModule == null) return; Point2D pos = e.getPosition(); boolean isInput = selectedModule.isOnInputSide(pos); Collection inputs = selectedModule.getInputParameters(); Collection outputs = selectedModule.getOutputParameters(); if (isInput == true || outputs.size() == 0) { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on input side"); startModuleLinks(inputs); moduleLinksStartedAsInputs = true; } else { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on output side"); startModuleLinks(outputs); moduleLinksStartedAsInputs = false; } if (ChainBuilderAgent.DEBUG) System.err.println("start module links. link state is LINKING_MODULES"); linkState = LINKING_MODULES; }
3,233,756
private void startModuleLinks(PInputEvent e) { if (selectedModule == null) return; Point2D pos = e.getPosition(); boolean isInput = selectedModule.isOnInputSide(pos); Collection inputs = selectedModule.getInputParameters(); Collection outputs = selectedModule.getOutputParameters(); if (isInput == true || outputs.size() == 0) { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on input side"); startModuleLinks(inputs); moduleLinksStartedAsInputs = true; } else { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on output side"); startModuleLinks(outputs); moduleLinksStartedAsInputs = false; } if (ChainBuilderAgent.DEBUG) System.err.println("start module links. link state is LINKING_MODULES"); linkState = LINKING_MODULES; }
private void startModuleLinks(PInputEvent e) { if (selectedModule == null) return; Point2D pos = e.getPosition(); boolean isInput = selectedModule.isOnInputSide(pos); Collection inputs = selectedModule.getInputParameters(); Collection outputs = selectedModule.getOutputParameters(); if (isInput == true || outputs.size() == 0) { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on input side"); startModuleLinks(inputs); moduleLinksStartedAsInputs = true; } else { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on output side"); startModuleLinks(outputs); moduleLinksStartedAsInputs = false; } if (ChainBuilderAgent.DEBUG) System.err.println("start module links. link state is LINKING_MODULES"); linkState = LINKING_MODULES; }
3,233,757
private void startModuleTargetLink(ModuleLinkTarget modLink) { moduleLinkOriginTarget = modLink; if (ChainBuilderAgent.DEBUG) System.err.println("starting mmodule target link..."+modLink+", link state is LINKING_MODULE_TARGETS"); moduleLink = new ModuleLink(linkLayer,moduleLinkOriginTarget); moduleLink.setPickable(false); linkState = LINKING_MODULE_TARGETS; }
private void startModuleTargetLink(ModuleLinkTarget modLink) { moduleLinkOriginTarget = modLink; if (ChainBuilderAgent.DEBUG) System.err.println("starting mmodule target link..."+modLink+", link state is LINKING_MODULE_TARGETS"); moduleLink = new ModuleLink(linkLayer,moduleLinkOriginTarget); moduleLink.setPickable(false); linkState = LINKING_MODULE_TARGETS; }
3,233,758
private void startParamLink(FormalParameter param) { if (ChainBuilderAgent.DEBUG) { System.err.println("mouse pressing and starting link"); System.err.println("start param link. link state is LINKING_PARAMS"); } linkOrigin = param; link = new ParamLink(); linkLayer.addChild(link); link.setStartParam(linkOrigin); link.setPickable(false); linkState = LINKING_PARAMS; }
private void startParamLink(FormalParameter param) { if (ChainBuilderAgent.DEBUG > 3) { System.err.println("mouse pressing and starting link"); System.err.println("start param link. link state is LINKING_PARAMS"); } linkOrigin = param; link = new ParamLink(); linkLayer.addChild(link); link.setStartParam(linkOrigin); link.setPickable(false); linkState = LINKING_PARAMS; }
3,233,759
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
3,233,760
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (containingClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
3,233,761
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && containingClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
3,233,762
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, threadContext.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
3,233,763
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); containingClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
3,233,764
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
3,233,765
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } if (singletonClass != null) { threadContext.pushClass(singletonClass); singletonClass.addMethod(iVisited.getName(), newMethod); } else { containingClass.callMethod("method_added", builtins.toSymbol(name)); } }
3,233,766
public Object doInHibernate(Session session) throws HibernateException, SQLException { if (session.isDirty()) { throw new InternalException("Session is dirty. Cannot properly " + "reset security system. Must rollback."); } return null; }
public Object doInHibernate(Session session) throws HibernateException, SQLException { if (session.isDirty()) { throw new InternalException("Session is dirty. Cannot properly " + "reset security system. Must rollback."); } return null; }
3,233,767
public Object invoke(MethodInvocation arg0) throws Throwable { secSys.setCurrentDetails(); boolean readOnly = checkReadOnly(arg0); // If read-only, we don't save the new current event, which should // allow us to clear the session. if ( readOnly ) { if (log.isDebugEnabled()) { log.debug("Tx readonly. Not saving current event."); } // write operations are to be expected, prepare the current details // by saving the current event. } else { secSys.setCurrentEvent((Event)ht.merge(secSys.getCurrentEvent())); } // now the user can be considered to be logged in. log.info(String.format(" Auth:\tuser=%s,group=%s,event=%s(%s)", secSys.currentUserId(),secSys.currentGroup().getId(), secSys.currentEvent().getId(),secSys.currentEvent().getType())); boolean failure = false; Object retVal = null; try { ht.execute(new EnableFilterAction(secSys)); retVal = arg0.proceed(); return retVal; } catch (Exception ex){ failure = true; throw ex; } finally { try { boolean stateful = (arg0.getThis() instanceof StatefulServiceInterface); // stateful services should NOT be flushed, because that's part // of the state that should hang around. if ( stateful ) { // we don't want to do anything, really. } // read-only sessions should not have anything changed. else if ( readOnly ) { ht.execute(new ClearIfDirtyAction(secSys)); } // on failure, we want to make sure that no one attempts // any further changes. else if ( failure ) { // TODO we should probably do some forced clean up here. } // stateless services, don't keep their sesssions about. else { ht.flush(); ht.execute(new CheckDirtyAction(secSys)); ht.execute(new DisableFilterAction(secSys)); } } finally { secSys.clearCurrentDetails(); } } }
public Object invoke(MethodInvocation arg0) throws Throwable { secSys.setCurrentDetails(); boolean readOnly = checkReadOnly(arg0); // If read-only, we don't save the new current event, which should // allow us to clear the session. if ( readOnly ) { if (log.isDebugEnabled()) { log.debug("Tx readonly. Not saving current event."); } // write operations are to be expected, prepare the current details // by saving the current event. } else { secSys.setCurrentEvent((Event)ht.merge(secSys.getCurrentEvent())); } // now the user can be considered to be logged in. log.info(String.format(" Auth:\tuser=%s,group=%s,event=%s(%s)", secSys.currentUserId(),secSys.currentGroup().getId(), secSys.currentEvent().getId(),secSys.currentEvent().getType())); boolean failure = false; Object retVal = null; try { ht.execute(new EnableFilterAction(secSys)); retVal = arg0.proceed(); return retVal; } catch (Exception ex){ failure = true; throw ex; } finally { try { boolean stateful = (arg0.getThis() instanceof StatefulServiceInterface); // stateful services should NOT be flushed, because that's part // of the state that should hang around. else if ( stateful ) { // we don't want to do anything, really. } // read-only sessions should not have anything changed. else if ( readOnly ) { ht.execute(new ClearIfDirtyAction(secSys)); } // on failure, we want to make sure that no one attempts // any further changes. else if ( failure ) { // TODO we should probably do some forced clean up here. } // stateless services, don't keep their sesssions about. else { ht.flush(); ht.execute(new CheckDirtyAction(secSys)); ht.execute(new DisableFilterAction(secSys)); } } finally { secSys.clearCurrentDetails(); } } }
3,233,768
public Object invoke(MethodInvocation arg0) throws Throwable { secSys.setCurrentDetails(); boolean readOnly = checkReadOnly(arg0); // If read-only, we don't save the new current event, which should // allow us to clear the session. if ( readOnly ) { if (log.isDebugEnabled()) { log.debug("Tx readonly. Not saving current event."); } // write operations are to be expected, prepare the current details // by saving the current event. } else { secSys.setCurrentEvent((Event)ht.merge(secSys.getCurrentEvent())); } // now the user can be considered to be logged in. log.info(String.format(" Auth:\tuser=%s,group=%s,event=%s(%s)", secSys.currentUserId(),secSys.currentGroup().getId(), secSys.currentEvent().getId(),secSys.currentEvent().getType())); boolean failure = false; Object retVal = null; try { ht.execute(new EnableFilterAction(secSys)); retVal = arg0.proceed(); return retVal; } catch (Exception ex){ failure = true; throw ex; } finally { try { boolean stateful = (arg0.getThis() instanceof StatefulServiceInterface); // stateful services should NOT be flushed, because that's part // of the state that should hang around. if ( stateful ) { // we don't want to do anything, really. } // read-only sessions should not have anything changed. else if ( readOnly ) { ht.execute(new ClearIfDirtyAction(secSys)); } // on failure, we want to make sure that no one attempts // any further changes. else if ( failure ) { // TODO we should probably do some forced clean up here. } // stateless services, don't keep their sesssions about. else { ht.flush(); ht.execute(new CheckDirtyAction(secSys)); ht.execute(new DisableFilterAction(secSys)); } } finally { secSys.clearCurrentDetails(); } } }
public Object invoke(MethodInvocation arg0) throws Throwable { secSys.setCurrentDetails(); boolean readOnly = checkReadOnly(arg0); // If read-only, we don't save the new current event, which should // allow us to clear the session. if ( readOnly ) { if (log.isDebugEnabled()) { log.debug("Tx readonly. Not saving current event."); } // write operations are to be expected, prepare the current details // by saving the current event. } else { secSys.setCurrentEvent((Event)ht.merge(secSys.getCurrentEvent())); } // now the user can be considered to be logged in. log.info(String.format(" Auth:\tuser=%s,group=%s,event=%s(%s)", secSys.currentUserId(),secSys.currentGroup().getId(), secSys.currentEvent().getId(),secSys.currentEvent().getType())); boolean failure = false; Object retVal = null; try { ht.execute(new EnableFilterAction(secSys)); retVal = arg0.proceed(); return retVal; } catch (Exception ex){ failure = true; throw ex; } finally { try { boolean stateful = (arg0.getThis() instanceof StatefulServiceInterface); // stateful services should NOT be flushed, because that's part // of the state that should hang around. if ( stateful ) { // we don't want to do anything, really. } // read-only sessions should not have anything changed. else if ( readOnly ) { ht.execute(new ClearIfDirtyAction(secSys)); } // on failure, we want to make sure that no one attempts // any further changes. else if ( failure ) { // TODO we should probably do some forced clean up here. } // stateless services, don't keep their sesssions about. else { ht.flush(); ht.execute(new CheckDirtyAction(secSys)); ht.execute(new DisableFilterAction(secSys)); } } finally { secSys.clearCurrentDetails(); } } }
3,233,769
public Object invoke(MethodInvocation arg0) throws Throwable { secSys.setCurrentDetails(); boolean readOnly = checkReadOnly(arg0); // If read-only, we don't save the new current event, which should // allow us to clear the session. if ( readOnly ) { if (log.isDebugEnabled()) { log.debug("Tx readonly. Not saving current event."); } // write operations are to be expected, prepare the current details // by saving the current event. } else { secSys.setCurrentEvent((Event)ht.merge(secSys.getCurrentEvent())); } // now the user can be considered to be logged in. log.info(String.format(" Auth:\tuser=%s,group=%s,event=%s(%s)", secSys.currentUserId(),secSys.currentGroup().getId(), secSys.currentEvent().getId(),secSys.currentEvent().getType())); boolean failure = false; Object retVal = null; try { ht.execute(new EnableFilterAction(secSys)); retVal = arg0.proceed(); return retVal; } catch (Exception ex){ failure = true; throw ex; } finally { try { boolean stateful = (arg0.getThis() instanceof StatefulServiceInterface); // stateful services should NOT be flushed, because that's part // of the state that should hang around. if ( stateful ) { // we don't want to do anything, really. } // read-only sessions should not have anything changed. else if ( readOnly ) { ht.execute(new ClearIfDirtyAction(secSys)); } // on failure, we want to make sure that no one attempts // any further changes. else if ( failure ) { // TODO we should probably do some forced clean up here. } // stateless services, don't keep their sesssions about. else { ht.flush(); ht.execute(new CheckDirtyAction(secSys)); ht.execute(new DisableFilterAction(secSys)); } } finally { secSys.clearCurrentDetails(); } } }
public Object invoke(MethodInvocation arg0) throws Throwable { secSys.setCurrentDetails(); boolean readOnly = checkReadOnly(arg0); // If read-only, we don't save the new current event, which should // allow us to clear the session. if ( readOnly ) { if (log.isDebugEnabled()) { log.debug("Tx readonly. Not saving current event."); ht.clear(); saveLogs(); } // write operations are to be expected, prepare the current details // by saving the current event. ht.clear(); saveLogs(); } else { secSys.setCurrentEvent((Event)ht.merge(secSys.getCurrentEvent())); ht.clear(); saveLogs(); } // now the user can be considered to be logged in. log.info(String.format(" Auth:\tuser=%s,group=%s,event=%s(%s)", secSys.currentUserId(),secSys.currentGroup().getId(), secSys.currentEvent().getId(),secSys.currentEvent().getType())); boolean failure = false; Object retVal = null; try { ht.execute(new EnableFilterAction(secSys)); retVal = arg0.proceed(); return retVal; ht.clear(); saveLogs(); } catch (Exception ex){ failure = true; throw ex; ht.clear(); saveLogs(); } finally { try { boolean stateful = (arg0.getThis() instanceof StatefulServiceInterface); // stateful services should NOT be flushed, because that's part // of the state that should hang around. if ( stateful ) { // we don't want to do anything, really. ht.clear(); saveLogs(); } // read-only sessions should not have anything changed. else if ( readOnly ) { ht.execute(new ClearIfDirtyAction(secSys)); ht.clear(); saveLogs(); } // on failure, we want to make sure that no one attempts // any further changes. else if ( failure ) { // TODO we should probably do some forced clean up here. ht.clear(); saveLogs(); } // stateless services, don't keep their sesssions about. else { ht.flush(); ht.execute(new CheckDirtyAction(secSys)); ht.execute(new DisableFilterAction(secSys)); ht.clear(); saveLogs(); } ht.clear(); saveLogs(); } finally { secSys.clearCurrentDetails(); ht.clear(); saveLogs(); } ht.clear(); saveLogs(); } }
3,233,770
private void buildGUI() { JPanel bars = new JPanel(), outerPanel = new JPanel(); bars.setBorder(null); bars.setLayout(new BoxLayout(bars, BoxLayout.X_AXIS)); bars.add(createManagementBar()); bars.add(createEditBar()); outerPanel.setBorder(null); outerPanel.setLayout(new BoxLayout(outerPanel, BoxLayout.X_AXIS)); outerPanel.add(bars); outerPanel.add(Box.createRigidArea(new Dimension(100, 16))); outerPanel.add(Box.createHorizontalGlue()); setLayout(new FlowLayout(FlowLayout.LEFT)); add(outerPanel); }
private void buildGUI() { JPanel bars = new JPanel(), outerPanel = new JPanel(); bars.setBorder(null); bars.setLayout(new BoxLayout(bars, BoxLayout.X_AXIS)); bars.add(createManagementBar()); bars.add(createEditBar()); outerPanel.setBorder(null); outerPanel.setLayout(new BoxLayout(outerPanel, BoxLayout.X_AXIS)); outerPanel.add(bars); outerPanel.add(Box.createRigidArea(HBOX)); outerPanel.add(Box.createHorizontalGlue()); setLayout(new FlowLayout(FlowLayout.LEFT)); add(outerPanel); }
3,233,771
private JToolBar createEditBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); JButton b = new JButton(controller.getAction( TreeViewerControl.ANNOTATE)); b.setBorderPainted(false); bar.add(b); TreeViewerAction a = controller.getAction(TreeViewerControl.CLASSIFIER); b = new JButton(a); b.addMouseListener((ClassifierAction) a); b.setBorderPainted(false); bar.add(b); b = new JButton(controller.getAction(TreeViewerControl.PROPERTIES)); b.setBorderPainted(false); bar.add(b); bar.add(new JSeparator(SwingConstants.VERTICAL)); return bar; }
private JToolBar createEditBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); JButton b = new JButton(controller.getAction( TreeViewerControl.ANNOTATE)); setButtonProperties(b); bar.add(b); TreeViewerAction a = controller.getAction(TreeViewerControl.CLASSIFIER); b = new JButton(a); b.addMouseListener((ClassifierAction) a); setButtonProperties(b); bar.add(b); b = new JButton(controller.getAction(TreeViewerControl.PROPERTIES)); setButtonProperties(b); bar.add(b); bar.add(new JSeparator(SwingConstants.VERTICAL)); return bar; }
3,233,772
private JToolBar createEditBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); JButton b = new JButton(controller.getAction( TreeViewerControl.ANNOTATE)); b.setBorderPainted(false); bar.add(b); TreeViewerAction a = controller.getAction(TreeViewerControl.CLASSIFIER); b = new JButton(a); b.addMouseListener((ClassifierAction) a); b.setBorderPainted(false); bar.add(b); b = new JButton(controller.getAction(TreeViewerControl.PROPERTIES)); b.setBorderPainted(false); bar.add(b); bar.add(new JSeparator(SwingConstants.VERTICAL)); return bar; }
private JToolBar createEditBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); JButton b = new JButton(controller.getAction( TreeViewerControl.ANNOTATE)); setButtonProperties(b); bar.add(b); TreeViewerAction a = controller.getAction(TreeViewerControl.CLASSIFIER); b = new JButton(a); b.addMouseListener((ClassifierAction) a); setButtonProperties(b); bar.add(b); b = new JButton(controller.getAction(TreeViewerControl.PROPERTIES)); setButtonProperties(b); bar.add(b); bar.add(new JSeparator(SwingConstants.VERTICAL)); return bar; }
3,233,773
private JToolBar createEditBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); JButton b = new JButton(controller.getAction( TreeViewerControl.ANNOTATE)); b.setBorderPainted(false); bar.add(b); TreeViewerAction a = controller.getAction(TreeViewerControl.CLASSIFIER); b = new JButton(a); b.addMouseListener((ClassifierAction) a); b.setBorderPainted(false); bar.add(b); b = new JButton(controller.getAction(TreeViewerControl.PROPERTIES)); b.setBorderPainted(false); bar.add(b); bar.add(new JSeparator(SwingConstants.VERTICAL)); return bar; }
private JToolBar createEditBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); JButton b = new JButton(controller.getAction( TreeViewerControl.ANNOTATE)); setButtonProperties(b); bar.add(b); TreeViewerAction a = controller.getAction(TreeViewerControl.CLASSIFIER); b = new JButton(a); b.addMouseListener((ClassifierAction) a); setButtonProperties(b); bar.add(b); b = new JButton(controller.getAction(TreeViewerControl.PROPERTIES)); setButtonProperties(b); bar.add(b); bar.add(new JSeparator(SwingConstants.VERTICAL)); return bar; }
3,233,774
private JToolBar createManagementBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); JButton b = new JButton(controller.getAction(TreeViewerControl.VIEW)); b.setBorderPainted(false); bar.add(b); TreeViewerAction a = controller.getAction(TreeViewerControl.MANAGER); b = new JButton(a); b.setBorderPainted(false); b.addMouseListener((ManagerAction) a); bar.add(b); bar.add(new JSeparator(SwingConstants.VERTICAL)); return bar; }
private JToolBar createManagementBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); JButton b = new JButton(controller.getAction(TreeViewerControl.VIEW)); setButtonProperties(b); bar.add(b); TreeViewerAction a = controller.getAction(TreeViewerControl.MANAGER); b = new JButton(a); setButtonProperties(b); b.addMouseListener((ManagerAction) a); bar.add(b); bar.add(new JSeparator(SwingConstants.VERTICAL)); return bar; }
3,233,775
private JToolBar createManagementBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); JButton b = new JButton(controller.getAction(TreeViewerControl.VIEW)); b.setBorderPainted(false); bar.add(b); TreeViewerAction a = controller.getAction(TreeViewerControl.MANAGER); b = new JButton(a); b.setBorderPainted(false); b.addMouseListener((ManagerAction) a); bar.add(b); bar.add(new JSeparator(SwingConstants.VERTICAL)); return bar; }
private JToolBar createManagementBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); JButton b = new JButton(controller.getAction(TreeViewerControl.VIEW)); setButtonProperties(b); bar.add(b); TreeViewerAction a = controller.getAction(TreeViewerControl.MANAGER); b = new JButton(a); setButtonProperties(b); b.addMouseListener((ManagerAction) a); bar.add(b); bar.add(new JSeparator(SwingConstants.VERTICAL)); return bar; }
3,233,776
private JMenu createFileMenu() { JMenu menu = new JMenu("File"); menu.setMnemonic(KeyEvent.VK_F); TreeViewerAction a = controller.getAction( TreeViewerControl.CREATE_TOP_CONTAINER); JMenuItem item = new JMenuItem(a); item.setText(a.getActionName()); menuItems.add(item); menu.add(item); menu.add(new JMenuItem( controller.getAction(TreeViewerControl.CREATE_OBJECT))); menu.add(createRootMenu()); menu.add(new JSeparator(JSeparator.HORIZONTAL)); a = controller.getAction(TreeViewerControl.VIEW); item = new JMenuItem(a); item.setText(a.getActionName()); menuItems.add(item); menu.add(item); menu.add(new JMenuItem( controller.getAction(TreeViewerControl.REFRESH_TREE))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(TreeViewerControl.EXIT))); return menu; }
private JMenu createFileMenu() { JMenu menu = new JMenu("File"); menu.setMnemonic(KeyEvent.VK_F); TreeViewerAction a = controller.getAction( TreeViewerControl.CREATE_TOP_CONTAINER); JMenuItem item = new JMenuItem(a); item.setText(a.getActionName()); menuItems.add(item); menu.add(item); menu.add(new JMenuItem( controller.getAction(TreeViewerControl.CREATE_OBJECT))); menu.add(createRootMenu()); menu.add(new JSeparator(JSeparator.HORIZONTAL)); a = controller.getAction(TreeViewerControl.VIEW); item = new JMenuItem(a); item.setText(a.getActionName()); menuItems.add(item); menu.add(item); menu.add(new JMenuItem( controller.getAction(TreeViewerControl.REFRESH_TREE))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(TreeViewerControl.EXIT))); return menu; }
3,233,778
void updateMenuItems() { Iterator i = menuItems.iterator(); JMenuItem item; while (i.hasNext()) { item = (JMenuItem) i.next(); item.setText(((TreeViewerAction) item.getAction()).getActionName()); } }
void updateMenuItems() { Iterator i = menuItems.iterator(); JMenuItem item; while (i.hasNext()) { item = (JMenuItem) i.next(); item.setText(((TreeViewerAction) item.getAction()).getActionName()); } }
3,233,779
public void visitForNode(ForNode iVisited) { ruby.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode()), self); ruby.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { String file = ruby.getSourceFile(); int line = ruby.getSourceLine(); // XXX ruby.getBlock().flags &= ~RubyBlock.BLOCK_D_SCOPE; Block tmpBlock = ArgsUtil.beginCallArgs(ruby); IRubyObject recv = eval(iVisited.getIterNode()); ArgsUtil.endCallArgs(ruby, tmpBlock); ruby.setSourceFile(file); ruby.setSourceLine(line); result = recv.getInternalClass().call(recv, "each", null, 0); return; } catch (RetryException rExcptn) { } } } catch (ReturnJump rExcptn) { result = rExcptn.getReturnValue(); } catch (BreakJump bExcptn) { result = ruby.getNil(); } finally { ruby.getIterStack().pop(); ruby.getBlockStack().pop(); } }
public void visitForNode(ForNode iVisited) {ruby.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode()), self);ruby.getIterStack().push(Iter.ITER_PRE);try {while (true) {try {String file = ruby.getSourceFile();int line = ruby.getSourceLine();// XXX ruby.getBlock().flags &= ~RubyBlock.BLOCK_D_SCOPE;Block tmpBlock = ArgsUtil.beginCallArgs(ruby);IRubyObject recv = eval(iVisited.getIterNode());ArgsUtil.endCallArgs(ruby, tmpBlock);ruby.setSourceFile(file);ruby.setSourceLine(line);result = recv.getInternalClass().call(recv, "each", null, 0);return;} catch (RetryException rExcptn) {}}} catch (ReturnJump rExcptn) {result = rExcptn.getReturnValue();} catch (BreakJump bExcptn) {result = ruby.getNil();} finally {ruby.getIterStack().pop();ruby.getBlockStack().pop();}}
3,233,780
RGBBuffer render(Renderer ctx, PlaneDef planeDef) throws IOException, QuantizationException { //Set the context and retrieve objects we're gonna use. renderer = ctx; QuantumManager qManager = renderer.getQuantumManager(); PixelBuffer pixels = renderer.getPixels(); Pixels metadata = renderer.getMetadata(); ChannelBinding[] cBindings = renderer.getChannelBindings(); RenderingStats performanceStats = renderer.getStats(); //Initialize sizeX1 and sizeX2 according to the plane definition and //create the RGB buffer. initAxesSize(planeDef, metadata); performanceStats.startMalloc(); log.info("Creating RGBBuffer of size " + sizeX1 + "x" + sizeX2); RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //Process the first active wavelength. Plane2D wData; for (int i = 0; i < cBindings.length; i++) { if (cBindings[i].getActive().booleanValue()) { //Get the raw data. performanceStats.startIO(i); wData = PlaneFactory.createPlane(planeDef, i, metadata, pixels); performanceStats.endIO(i); try { //Transform it into an RGB image. performanceStats.startRendering(); renderWave(renderedDataBuf, wData, cBindings[i].getColor(), qManager.getStrategyFor(i)); performanceStats.endRendering(); } catch (QuantizationException e) { e.setWavelength(i); throw e; } break; } } //Done. return renderedDataBuf; }
RGBBuffer render(Renderer ctx, PlaneDef planeDef) throws IOException, QuantizationException { //Set the context and retrieve objects we're gonna use. renderer = ctx; QuantumManager qManager = renderer.getQuantumManager(); PixelBuffer pixels = renderer.getPixels(); Pixels metadata = renderer.getMetadata(); ChannelBinding[] cBindings = renderer.getChannelBindings(); RenderingStats performanceStats = renderer.getStats(); //Initialize sizeX1 and sizeX2 according to the plane definition and //create the RGB buffer. initAxesSize(planeDef, metadata); performanceStats.startMalloc(); log.info("Creating RGBBuffer of size " + sizeX1 + "x" + sizeX2); RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //Process the first active wavelength. Plane2D wData; for (int i = 0; i < cBindings.length; i++) { if (cBindings[i].getActive().booleanValue()) { //Get the raw data. performanceStats.startIO(i); wData = PlaneFactory.createPlane(planeDef, i, metadata, pixels); performanceStats.endIO(i); try { //Transform it into an RGB image. performanceStats.startRendering(); renderWave(renderedDataBuf, wData, cBindings[i].getColor(), qManager.getStrategyFor(i)); performanceStats.endRendering(); } catch (QuantizationException e) { e.setWavelength(i); throw e; } break; } } //Done. return renderedDataBuf; }
3,233,782
RGBBuffer render(Renderer ctx, PlaneDef planeDef) throws IOException, QuantizationException { //Set the context and retrieve objects we're gonna use. renderer = ctx; QuantumManager qManager = renderer.getQuantumManager(); PixelBuffer pixels = renderer.getPixels(); Pixels metadata = renderer.getMetadata(); ChannelBinding[] cBindings = renderer.getChannelBindings(); RenderingStats performanceStats = renderer.getStats(); //Initialize sizeX1 and sizeX2 according to the plane definition and //create the RGB buffer. initAxesSize(planeDef, metadata); performanceStats.startMalloc(); log.info("Creating RGBBuffer of size " + sizeX1 + "x" + sizeX2); RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //Process the first active wavelength. Plane2D wData; for (int i = 0; i < cBindings.length; i++) { if (cBindings[i].getActive().booleanValue()) { //Get the raw data. performanceStats.startIO(i); wData = PlaneFactory.createPlane(planeDef, i, metadata, pixels); performanceStats.endIO(i); try { //Transform it into an RGB image. performanceStats.startRendering(); renderWave(renderedDataBuf, wData, cBindings[i].getColor(), qManager.getStrategyFor(i)); performanceStats.endRendering(); } catch (QuantizationException e) { e.setWavelength(i); throw e; } break; } } //Done. return renderedDataBuf; }
RGBBuffer render(Renderer ctx, PlaneDef planeDef) throws IOException, QuantizationException { //Set the context and retrieve objects we're gonna use. renderer = ctx; QuantumManager qManager = renderer.getQuantumManager(); PixelBuffer pixels = renderer.getPixels(); Pixels metadata = renderer.getMetadata(); ChannelBinding[] cBindings = renderer.getChannelBindings(); RenderingStats performanceStats = renderer.getStats(); //Initialize sizeX1 and sizeX2 according to the plane definition and //create the RGB buffer. initAxesSize(planeDef, metadata); performanceStats.startMalloc(); log.info("Creating RGBBuffer of size " + sizeX1 + "x" + sizeX2); RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //Process the first active wavelength. Plane2D wData; for (int i = 0; i < cBindings.length; i++) { if (cBindings[i].getActive().booleanValue()) { //Get the raw data. performanceStats.startIO(i); wData = PlaneFactory.createPlane(planeDef, i, metadata, pixels); performanceStats.endIO(i); try { //Transform it into an RGB image. performanceStats.startRendering(); renderWave(renderedDataBuf, wData, cBindings[i].getColor(), qManager.getStrategyFor(i)); performanceStats.endRendering(); } catch (QuantizationException e) { e.setWavelength(i); throw e; } break; } } //Done. return renderedDataBuf; }
3,233,783
RGBBuffer render(Renderer ctx, PlaneDef planeDef) throws IOException, QuantizationException { //Set the context and retrieve objects we're gonna use. renderer = ctx; QuantumManager qManager = renderer.getQuantumManager(); PixelBuffer pixels = renderer.getPixels(); Pixels metadata = renderer.getMetadata(); ChannelBinding[] cBindings = renderer.getChannelBindings(); RenderingStats performanceStats = renderer.getStats(); //Initialize sizeX1 and sizeX2 according to the plane definition and //create the RGB buffer. initAxesSize(planeDef, metadata); performanceStats.startMalloc(); log.info("Creating RGBBuffer of size " + sizeX1 + "x" + sizeX2); RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //Process the first active wavelength. Plane2D wData; for (int i = 0; i < cBindings.length; i++) { if (cBindings[i].getActive().booleanValue()) { //Get the raw data. performanceStats.startIO(i); wData = PlaneFactory.createPlane(planeDef, i, metadata, pixels); performanceStats.endIO(i); try { //Transform it into an RGB image. performanceStats.startRendering(); renderWave(renderedDataBuf, wData, cBindings[i].getColor(), qManager.getStrategyFor(i)); performanceStats.endRendering(); } catch (QuantizationException e) { e.setWavelength(i); throw e; } break; } } //Done. return renderedDataBuf; }
RGBBuffer render(Renderer ctx, PlaneDef planeDef) throws IOException, QuantizationException { //Set the context and retrieve objects we're gonna use. renderer = ctx; QuantumManager qManager = renderer.getQuantumManager(); PixelBuffer pixels = renderer.getPixels(); Pixels metadata = renderer.getMetadata(); ChannelBinding[] cBindings = renderer.getChannelBindings(); RenderingStats performanceStats = renderer.getStats(); //Initialize sizeX1 and sizeX2 according to the plane definition and //create the RGB buffer. initAxesSize(planeDef, metadata); performanceStats.startMalloc(); log.info("Creating RGBBuffer of size " + sizeX1 + "x" + sizeX2); RGBBuffer buf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //Process the first active wavelength. Plane2D wData; for (int i = 0; i < cBindings.length; i++) { if (cBindings[i].getActive().booleanValue()) { //Get the raw data. performanceStats.startIO(i); wData = PlaneFactory.createPlane(planeDef, i, metadata, pixels); performanceStats.endIO(i); try { //Transform it into an RGB image. performanceStats.startRendering(); renderWave(renderedDataBuf, wData, cBindings[i].getColor(), qManager.getStrategyFor(i)); performanceStats.endRendering(); } catch (QuantizationException e) { e.setWavelength(i); throw e; } break; } } //Done. return renderedDataBuf; }
3,233,784
RGBBuffer render(Renderer ctx, PlaneDef planeDef) throws IOException, QuantizationException { //Set the context and retrieve objects we're gonna use. renderer = ctx; QuantumManager qManager = renderer.getQuantumManager(); PixelBuffer pixels = renderer.getPixels(); Pixels metadata = renderer.getMetadata(); ChannelBinding[] cBindings = renderer.getChannelBindings(); RenderingStats performanceStats = renderer.getStats(); //Initialize sizeX1 and sizeX2 according to the plane definition and //create the RGB buffer. initAxesSize(planeDef, metadata); performanceStats.startMalloc(); log.info("Creating RGBBuffer of size " + sizeX1 + "x" + sizeX2); RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //Process the first active wavelength. Plane2D wData; for (int i = 0; i < cBindings.length; i++) { if (cBindings[i].getActive().booleanValue()) { //Get the raw data. performanceStats.startIO(i); wData = PlaneFactory.createPlane(planeDef, i, metadata, pixels); performanceStats.endIO(i); try { //Transform it into an RGB image. performanceStats.startRendering(); renderWave(renderedDataBuf, wData, cBindings[i].getColor(), qManager.getStrategyFor(i)); performanceStats.endRendering(); } catch (QuantizationException e) { e.setWavelength(i); throw e; } break; } } //Done. return renderedDataBuf; }
RGBBuffer render(Renderer ctx, PlaneDef planeDef) throws IOException, QuantizationException { //Set the context and retrieve objects we're gonna use. renderer = ctx; QuantumManager qManager = renderer.getQuantumManager(); PixelBuffer pixels = renderer.getPixels(); Pixels metadata = renderer.getMetadata(); ChannelBinding[] cBindings = renderer.getChannelBindings(); RenderingStats performanceStats = renderer.getStats(); //Initialize sizeX1 and sizeX2 according to the plane definition and //create the RGB buffer. initAxesSize(planeDef, metadata); performanceStats.startMalloc(); log.info("Creating RGBBuffer of size " + sizeX1 + "x" + sizeX2); RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //Process the first active wavelength. Plane2D wData; for (int i = 0; i < cBindings.length; i++) { if (cBindings[i].getActive().booleanValue()) { //Get the raw data. performanceStats.startIO(i); wData = PlaneFactory.createPlane(planeDef, i, metadata, pixels); performanceStats.endIO(i); try { //Transform it into an RGB image. performanceStats.startRendering(); renderWave(renderedDataBuf, wData, cBindings[i].getColor(), qManager.getStrategyFor(i)); performanceStats.endRendering(); } catch (QuantizationException e) { e.setWavelength(i); throw e; } break; } } //Done. return renderedDataBuf; }
3,233,785
private void renderWave(RGBBuffer dataBuf, Plane2D plane, Color color, QuantumStrategy qs) throws QuantizationException { System.err.println("Render wave."); CodomainChain cc = renderer.getCodomainChain(); int x1, x2, discreteValue, pixelIndex; byte value; float alpha = color.getAlpha().floatValue()/255; byte[] red = dataBuf.getRedBand(), green = dataBuf.getGreenBand(), blue = dataBuf.getBlueBand(); for (x2 = 0; x2 < sizeX2; ++x2) { for (x1 = 0; x1 < sizeX1; ++x1) { pixelIndex = sizeX1*x2+x1; discreteValue = qs.quantize(plane.getPixelValue(x1, x2)); discreteValue = cc.transform(discreteValue); value = (byte) (discreteValue*alpha); red[pixelIndex] = value; green[pixelIndex] = value; blue[pixelIndex] = value; } } }
private void renderWave(RGBBuffer dataBuf, Plane2D plane, Color color, QuantumStrategy qs) throws QuantizationException { CodomainChain cc = renderer.getCodomainChain(); int x1, x2, discreteValue, pixelIndex; byte value; float alpha = color.getAlpha().floatValue()/255; byte[] red = dataBuf.getRedBand(), green = dataBuf.getGreenBand(), blue = dataBuf.getBlueBand(); for (x2 = 0; x2 < sizeX2; ++x2) { for (x1 = 0; x1 < sizeX1; ++x1) { pixelIndex = sizeX1*x2+x1; discreteValue = qs.quantize(plane.getPixelValue(x1, x2)); discreteValue = cc.transform(discreteValue); value = (byte) (discreteValue*alpha); red[pixelIndex] = value; green[pixelIndex] = value; blue[pixelIndex] = value; } } }
3,233,786
private void renderWave(RGBBuffer dataBuf, Plane2D plane, Color color, QuantumStrategy qs) throws QuantizationException { System.err.println("Render wave."); CodomainChain cc = renderer.getCodomainChain(); int x1, x2, discreteValue, pixelIndex; byte value; float alpha = color.getAlpha().floatValue()/255; byte[] red = dataBuf.getRedBand(), green = dataBuf.getGreenBand(), blue = dataBuf.getBlueBand(); for (x2 = 0; x2 < sizeX2; ++x2) { for (x1 = 0; x1 < sizeX1; ++x1) { pixelIndex = sizeX1*x2+x1; discreteValue = qs.quantize(plane.getPixelValue(x1, x2)); discreteValue = cc.transform(discreteValue); value = (byte) (discreteValue*alpha); red[pixelIndex] = value; green[pixelIndex] = value; blue[pixelIndex] = value; } } }
private void renderWave(RGBBuffer dataBuf, Plane2D plane, Color color, QuantumStrategy qs) throws QuantizationException { System.err.println("Render wave."); CodomainChain cc = renderer.getCodomainChain(); int x1, x2, discreteValue, pixelIndex; byte value; float alpha = color.getAlpha().floatValue()/255; byte[] red = dataBuf.getRedBand(), green = dataBuf.getGreenBand(), blue = dataBuf.getBlueBand(); for (x2 = 0; x2 < sizeX2; ++x2) { for (x1 = 0; x1 < sizeX1; ++x1) { pixelIndex = sizeX1*x2+x1; discreteValue = qs.quantize(plane.getPixelValue(x1, x2)); discreteValue = cc.transform(discreteValue); value = (byte) (discreteValue*alpha); red[pixelIndex] = value; green[pixelIndex] = value; blue[pixelIndex] = value; } } }
3,233,787
final private boolean jj_3R_23() { Token xsp; xsp = jj_scanpos; if (jj_3R_44()) { jj_scanpos = xsp; if (jj_3R_45()) { jj_scanpos = xsp; if (jj_3R_46()) { jj_scanpos = xsp; if (jj_3R_47()) { jj_scanpos = xsp; if (jj_3R_48()) { jj_scanpos = xsp; if (jj_3R_49()) { jj_scanpos = xsp; if (jj_3R_50()) { jj_scanpos = xsp; if (jj_3R_51()) { jj_scanpos = xsp; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) { jj_scanpos = xsp; if (jj_3R_54()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_23() { Token xsp; xsp = jj_scanpos; if (jj_3R_44()) { jj_scanpos = xsp; if (jj_3R_45()) { jj_scanpos = xsp; if (jj_3R_46()) { jj_scanpos = xsp; if (jj_3R_47()) { jj_scanpos = xsp; if (jj_3R_48()) { jj_scanpos = xsp; if (jj_3R_49()) { jj_scanpos = xsp; if (jj_3R_50()) { jj_scanpos = xsp; if (jj_3R_51()) { jj_scanpos = xsp; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) { jj_scanpos = xsp; if (jj_3R_54()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,789
final private boolean jj_3R_23() { Token xsp; xsp = jj_scanpos; if (jj_3R_44()) { jj_scanpos = xsp; if (jj_3R_45()) { jj_scanpos = xsp; if (jj_3R_46()) { jj_scanpos = xsp; if (jj_3R_47()) { jj_scanpos = xsp; if (jj_3R_48()) { jj_scanpos = xsp; if (jj_3R_49()) { jj_scanpos = xsp; if (jj_3R_50()) { jj_scanpos = xsp; if (jj_3R_51()) { jj_scanpos = xsp; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) { jj_scanpos = xsp; if (jj_3R_54()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_23() { Token xsp; xsp = jj_scanpos; if (jj_3R_44()) { jj_scanpos = xsp; if (jj_3R_45()) { jj_scanpos = xsp; if (jj_3R_46()) { jj_scanpos = xsp; if (jj_3R_47()) { jj_scanpos = xsp; if (jj_3R_48()) { jj_scanpos = xsp; if (jj_3R_49()) { jj_scanpos = xsp; if (jj_3R_50()) { jj_scanpos = xsp; if (jj_3R_51()) { jj_scanpos = xsp; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) { jj_scanpos = xsp; if (jj_3R_54()) { jj_scanpos = xsp; if (jj_3R_55()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,790
final private boolean jj_3R_30() { Token xsp; xsp = jj_scanpos; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; if (jj_3R_57()) { jj_scanpos = xsp; if (jj_3R_58()) { jj_scanpos = xsp; if (jj_3R_59()) { jj_scanpos = xsp; if (jj_3R_60()) { jj_scanpos = xsp; if (jj_3R_61()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_30() { Token xsp; xsp = jj_scanpos; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; if (jj_3R_57()) { jj_scanpos = xsp; if (jj_3R_58()) { jj_scanpos = xsp; if (jj_3R_59()) { jj_scanpos = xsp; if (jj_3R_60()) { jj_scanpos = xsp; if (jj_3R_61()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,791
final private boolean jj_3R_30() { Token xsp; xsp = jj_scanpos; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; if (jj_3R_57()) { jj_scanpos = xsp; if (jj_3R_58()) { jj_scanpos = xsp; if (jj_3R_59()) { jj_scanpos = xsp; if (jj_3R_60()) { jj_scanpos = xsp; if (jj_3R_61()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_30() { Token xsp; xsp = jj_scanpos; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; if (jj_3R_57()) { jj_scanpos = xsp; if (jj_3R_58()) { jj_scanpos = xsp; if (jj_3R_59()) { jj_scanpos = xsp; if (jj_3R_60()) { jj_scanpos = xsp; if (jj_3R_61()) { jj_scanpos = xsp; if (jj_3R_62()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,792
final private boolean jj_3R_41() { if (jj_3R_62()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_41() { if (jj_3R_63()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,793
final private boolean jj_3R_42() { Token xsp; xsp = jj_scanpos; if (jj_3R_63()) { jj_scanpos = xsp; if (jj_3R_64()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_42() { Token xsp; xsp = jj_scanpos; if (jj_3R_63()) { jj_scanpos = xsp; if (jj_3R_64()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,794
final private boolean jj_3R_42() { Token xsp; xsp = jj_scanpos; if (jj_3R_63()) { jj_scanpos = xsp; if (jj_3R_64()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_42() { Token xsp; xsp = jj_scanpos; if (jj_3R_63()) { jj_scanpos = xsp; if (jj_3R_64()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,795
final private boolean jj_3R_45() { if (jj_scan_token(LPAREN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_45() { if (jj_3R_67()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,797
final private boolean jj_3R_46() { if (jj_3R_67()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_46() { if (jj_scan_token(LPAREN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,798
final private boolean jj_3R_48() { if (jj_scan_token(NULL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_48() { if (jj_3R_69()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,799
final private boolean jj_3R_49() { if (jj_scan_token(TRUE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_49() { if (jj_scan_token(NULL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,800
final private boolean jj_3R_50() { if (jj_scan_token(FALSE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_50() { if (jj_scan_token(TRUE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,801
final private boolean jj_3R_51() { if (jj_scan_token(UNDEFINED)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_51() { if (jj_scan_token(FALSE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,802
final private boolean jj_3R_52() { if (jj_scan_token(OP_NOT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_52() { if (jj_scan_token(UNDEFINED)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,803
final private boolean jj_3R_53() { if (jj_scan_token(NUMBER)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_53() { if (jj_scan_token(OP_NOT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,804
final private boolean jj_3R_54() { if (jj_scan_token(OP_MINUS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_54() { if (jj_scan_token(NUMBER)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,805
final private boolean jj_3R_55() { if (jj_scan_token(OP_EQ)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_55() { if (jj_scan_token(OP_MINUS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,806
final private boolean jj_3R_56() { if (jj_scan_token(OP_SET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_56() { if (jj_scan_token(OP_EQ)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,807
final private boolean jj_3R_57() { if (jj_scan_token(OP_NE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_57() { if (jj_scan_token(OP_SET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,808
final private boolean jj_3R_58() { if (jj_scan_token(OP_GT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_58() { if (jj_scan_token(OP_NE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,809
final private boolean jj_3R_59() { if (jj_scan_token(OP_GE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_59() { if (jj_scan_token(OP_GT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,810
final private boolean jj_3R_60() { if (jj_scan_token(OP_LE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_60() { if (jj_scan_token(OP_GE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,811
final private boolean jj_3R_61() { if (jj_scan_token(OP_LT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_61() { if (jj_scan_token(OP_LE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,812
final private boolean jj_3R_62() { Token xsp; xsp = jj_scanpos; if (jj_3R_69()) { jj_scanpos = xsp; if (jj_3R_70()) { jj_scanpos = xsp; if (jj_3R_71()) { jj_scanpos = xsp; if (jj_3R_72()) { jj_scanpos = xsp; if (jj_3R_73()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_62() { Token xsp; xsp = jj_scanpos; if (jj_3R_69()) { jj_scanpos = xsp; if (jj_3R_70()) { jj_scanpos = xsp; if (jj_3R_71()) { jj_scanpos = xsp; if (jj_3R_72()) { jj_scanpos = xsp; if (jj_3R_73()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,813
final private boolean jj_3R_62() { Token xsp; xsp = jj_scanpos; if (jj_3R_69()) { jj_scanpos = xsp; if (jj_3R_70()) { jj_scanpos = xsp; if (jj_3R_71()) { jj_scanpos = xsp; if (jj_3R_72()) { jj_scanpos = xsp; if (jj_3R_73()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_62() { Token xsp; xsp = jj_scanpos; if (jj_3R_69()) { jj_scanpos = xsp; if (jj_3R_70()) { jj_scanpos = xsp; if (jj_3R_71()) { jj_scanpos = xsp; if (jj_3R_72()) { jj_scanpos = xsp; if (jj_3R_73()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,814
final private boolean jj_3R_63() { if (jj_scan_token(LBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_63() { Token xsp; xsp = jj_scanpos; if (jj_3R_70()) { jj_scanpos = xsp; if (jj_3R_71()) { jj_scanpos = xsp; if (jj_3R_72()) { jj_scanpos = xsp; if (jj_3R_73()) { jj_scanpos = xsp; if (jj_3R_74()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,815
final private boolean jj_3R_64() { if (jj_scan_token(RBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_64() { if (jj_scan_token(LBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,817
final private boolean jj_3R_65() { if (jj_scan_token(POUND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_65() { if (jj_scan_token(RBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,818
final private boolean jj_3R_66() { if (jj_scan_token(DOLLAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_66() { if (jj_scan_token(POUND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,819
final private boolean jj_3R_67() { Token xsp; xsp = jj_scanpos; if (jj_3R_74()) { jj_scanpos = xsp; if (jj_3R_75()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_67() { Token xsp; xsp = jj_scanpos; if (jj_3R_74()) { jj_scanpos = xsp; if (jj_3R_75()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,820
final private boolean jj_3R_67() { Token xsp; xsp = jj_scanpos; if (jj_3R_74()) { jj_scanpos = xsp; if (jj_3R_75()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_67() { Token xsp; xsp = jj_scanpos; if (jj_3R_74()) { jj_scanpos = xsp; if (jj_3R_75()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,821
final private boolean jj_3R_68() { if (jj_scan_token(LBRACKET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_68() { Token xsp; xsp = jj_scanpos; if (jj_3R_75()) { jj_scanpos = xsp; if (jj_3R_76()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,822
final private boolean jj_3R_69() { if (jj_scan_token(STUFF)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_69() { if (jj_scan_token(LBRACKET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,824
final private boolean jj_3R_70() { if (jj_scan_token(QCHAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_70() { if (jj_scan_token(STUFF)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,825
final private boolean jj_3R_71() { if (jj_scan_token(SLASH)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_71() { if (jj_scan_token(QCHAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,826
final private boolean jj_3R_72() { if (jj_3R_76()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_72() { if (jj_scan_token(SLASH)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,827
final private boolean jj_3R_74() { if (jj_scan_token(QUOTE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_74() { if (jj_3R_78()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,828
final private boolean jj_3R_75() { if (jj_scan_token(SQUOTE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_75() { if (jj_scan_token(QUOTE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,829
final private boolean jj_3R_76() { if (jj_scan_token(POUNDPOUND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_76() { if (jj_scan_token(SQUOTE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,830
final private boolean jj_3R_77() { Token xsp; xsp = jj_scanpos; if (jj_3R_78()) { jj_scanpos = xsp; if (jj_3R_79()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_77() { Token xsp; xsp = jj_scanpos; if (jj_3R_78()) { jj_scanpos = xsp; if (jj_3R_79()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,831
final private boolean jj_3R_77() { Token xsp; xsp = jj_scanpos; if (jj_3R_78()) { jj_scanpos = xsp; if (jj_3R_79()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_77() { Token xsp; xsp = jj_scanpos; if (jj_3R_78()) { jj_scanpos = xsp; if (jj_3R_79()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,832
final private boolean jj_3R_78() { if (jj_3R_66()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_78() { Token xsp; xsp = jj_scanpos; if (jj_3R_79()) { jj_scanpos = xsp; if (jj_3R_80()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,833
final private boolean jj_3R_79() { if (jj_scan_token(DOLLAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3R_79() { if (jj_3R_67()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,835
final private boolean jj_3_21() { Token xsp; xsp = jj_scanpos; if (jj_3R_41()) { jj_scanpos = xsp; if (jj_3R_42()) { jj_scanpos = xsp; lookingAhead = true; jj_semLA = lookahead_not_breaking_subd(); lookingAhead = false; if (!jj_semLA || jj_3R_43()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
final private boolean jj_3_21() { Token xsp; xsp = jj_scanpos; if (jj_3R_41()) { jj_scanpos = xsp; if (jj_3R_42()) { jj_scanpos = xsp; lookingAhead = true; jj_semLA = lookahead_not_breaking_subd(); lookingAhead = false; if (!jj_semLA || jj_3R_44()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
3,233,836
private void checkForStaleRooms() { int delay = 1000; // delay for 1 minute int period = 60000; // repeat every 30 seconds. Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { for (ChatRoom chatRoom : getStaleChatRooms()) { // Turn tab gray int index = indexOfComponent(chatRoom); if (index == -1) { return; } SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); titleLabel.setForeground(Color.gray); titleLabel.setFont(tab.getDefaultFont()); if (chatRoom instanceof ChatRoomImpl) { ChatRoomImpl impl = (ChatRoomImpl)chatRoom; if(impl.isIconHandler()){ return; } String jid = ((ChatRoomImpl)chatRoom).getParticipantJID(); Presence presence = SparkManager.getConnection().getRoster().getPresence(jid); if (presence == null || presence.getType() == Presence.Type.unavailable) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_UNAVAILABLE_STALE_IMAGE)); } else if (presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AVAILABLE_STALE_IMAGE)); } else if (mode == Presence.Mode.away) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AWAY_STALE_IMAGE)); } else if (mode == Presence.Mode.chat) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_FREE_CHAT_STALE_IMAGE)); } else if (mode == Presence.Mode.dnd) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } else if (mode == Presence.Mode.xa) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } } } titleLabel.validate(); titleLabel.repaint(); } } }, delay, period); }
private void checkForStaleRooms() { int delay = 1000; // delay for 1 minute int period = 60000; // repeat every 30 seconds. Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { for (ChatRoom chatRoom : getStaleChatRooms()) { // Turn tab gray int index = indexOfComponent(chatRoom); if (index == -1) { return; } SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); titleLabel.setForeground(Color.gray); titleLabel.setFont(tab.getDefaultFont()); if (chatRoom instanceof ChatRoomImpl) { ChatRoomImpl impl = (ChatRoomImpl)chatRoom; if (impl.isIconHandler()) { return; } String jid = ((ChatRoomImpl)chatRoom).getParticipantJID(); Presence presence = SparkManager.getConnection().getRoster().getPresence(jid); if (presence == null || presence.getType() == Presence.Type.unavailable) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_UNAVAILABLE_STALE_IMAGE)); } else if (presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AVAILABLE_STALE_IMAGE)); } else if (mode == Presence.Mode.away) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AWAY_STALE_IMAGE)); } else if (mode == Presence.Mode.chat) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_FREE_CHAT_STALE_IMAGE)); } else if (mode == Presence.Mode.dnd) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } else if (mode == Presence.Mode.xa) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } } } titleLabel.validate(); titleLabel.repaint(); } } }, delay, period); }
3,233,838
private void checkForStaleRooms() { int delay = 1000; // delay for 1 minute int period = 60000; // repeat every 30 seconds. Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { for (ChatRoom chatRoom : getStaleChatRooms()) { // Turn tab gray int index = indexOfComponent(chatRoom); if (index == -1) { return; } SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); titleLabel.setForeground(Color.gray); titleLabel.setFont(tab.getDefaultFont()); if (chatRoom instanceof ChatRoomImpl) { ChatRoomImpl impl = (ChatRoomImpl)chatRoom; if(impl.isIconHandler()){ return; } String jid = ((ChatRoomImpl)chatRoom).getParticipantJID(); Presence presence = SparkManager.getConnection().getRoster().getPresence(jid); if (presence == null || presence.getType() == Presence.Type.unavailable) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_UNAVAILABLE_STALE_IMAGE)); } else if (presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AVAILABLE_STALE_IMAGE)); } else if (mode == Presence.Mode.away) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AWAY_STALE_IMAGE)); } else if (mode == Presence.Mode.chat) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_FREE_CHAT_STALE_IMAGE)); } else if (mode == Presence.Mode.dnd) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } else if (mode == Presence.Mode.xa) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } } } titleLabel.validate(); titleLabel.repaint(); } } }, delay, period); }
private void checkForStaleRooms() { int delay = 1000; // delay for 1 minute int period = 60000; // repeat every 30 seconds. Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { for (ChatRoom chatRoom : getStaleChatRooms()) { // Turn tab gray int index = indexOfComponent(chatRoom); if (index == -1) { return; } SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); titleLabel.setForeground(Color.gray); titleLabel.setFont(tab.getDefaultFont()); if (chatRoom instanceof ChatRoomImpl) { ChatRoomImpl impl = (ChatRoomImpl)chatRoom; if(impl.isIconHandler()){ return; } String jid = ((ChatRoomImpl)chatRoom).getParticipantJID(); Presence presence = SparkManager.getConnection().getRoster().getPresence(jid); if (presence == null || presence.getType() == Presence.Type.unavailable) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_UNAVAILABLE_STALE_IMAGE)); } else if (presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AVAILABLE_STALE_IMAGE)); } else if (mode == Presence.Mode.away) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AWAY_STALE_IMAGE)); } else if (mode == Presence.Mode.chat) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_FREE_CHAT_STALE_IMAGE)); } else if (mode == Presence.Mode.dnd) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } else if (mode == Presence.Mode.xa) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } } } titleLabel.validate(); titleLabel.repaint(); } } }, delay, period); }
3,233,839
public void run() { for (ChatRoom chatRoom : getStaleChatRooms()) { // Turn tab gray int index = indexOfComponent(chatRoom); if (index == -1) { return; } SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); titleLabel.setForeground(Color.gray); titleLabel.setFont(tab.getDefaultFont()); if (chatRoom instanceof ChatRoomImpl) { ChatRoomImpl impl = (ChatRoomImpl)chatRoom; if(impl.isIconHandler()){ return; } String jid = ((ChatRoomImpl)chatRoom).getParticipantJID(); Presence presence = SparkManager.getConnection().getRoster().getPresence(jid); if (presence == null || presence.getType() == Presence.Type.unavailable) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_UNAVAILABLE_STALE_IMAGE)); } else if (presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AVAILABLE_STALE_IMAGE)); } else if (mode == Presence.Mode.away) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AWAY_STALE_IMAGE)); } else if (mode == Presence.Mode.chat) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_FREE_CHAT_STALE_IMAGE)); } else if (mode == Presence.Mode.dnd) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } else if (mode == Presence.Mode.xa) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } } } titleLabel.validate(); titleLabel.repaint(); } }
public void run() { for (ChatRoom chatRoom : getStaleChatRooms()) { // Turn tab gray int index = indexOfComponent(chatRoom); if (index == -1) { return; } SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); titleLabel.setForeground(Color.gray); titleLabel.setFont(tab.getDefaultFont()); if (chatRoom instanceof ChatRoomImpl) { ChatRoomImpl impl = (ChatRoomImpl)chatRoom; if (impl.isIconHandler()) { return; } String jid = ((ChatRoomImpl)chatRoom).getParticipantJID(); Presence presence = SparkManager.getConnection().getRoster().getPresence(jid); if (presence == null || presence.getType() == Presence.Type.unavailable) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_UNAVAILABLE_STALE_IMAGE)); } else if (presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AVAILABLE_STALE_IMAGE)); } else if (mode == Presence.Mode.away) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AWAY_STALE_IMAGE)); } else if (mode == Presence.Mode.chat) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_FREE_CHAT_STALE_IMAGE)); } else if (mode == Presence.Mode.dnd) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } else if (mode == Presence.Mode.xa) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } } } titleLabel.validate(); titleLabel.repaint(); } }
3,233,840
public void run() { for (ChatRoom chatRoom : getStaleChatRooms()) { // Turn tab gray int index = indexOfComponent(chatRoom); if (index == -1) { return; } SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); titleLabel.setForeground(Color.gray); titleLabel.setFont(tab.getDefaultFont()); if (chatRoom instanceof ChatRoomImpl) { ChatRoomImpl impl = (ChatRoomImpl)chatRoom; if(impl.isIconHandler()){ return; } String jid = ((ChatRoomImpl)chatRoom).getParticipantJID(); Presence presence = SparkManager.getConnection().getRoster().getPresence(jid); if (presence == null || presence.getType() == Presence.Type.unavailable) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_UNAVAILABLE_STALE_IMAGE)); } else if (presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AVAILABLE_STALE_IMAGE)); } else if (mode == Presence.Mode.away) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AWAY_STALE_IMAGE)); } else if (mode == Presence.Mode.chat) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_FREE_CHAT_STALE_IMAGE)); } else if (mode == Presence.Mode.dnd) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } else if (mode == Presence.Mode.xa) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } } } titleLabel.validate(); titleLabel.repaint(); } }
public void run() { for (ChatRoom chatRoom : getStaleChatRooms()) { // Turn tab gray int index = indexOfComponent(chatRoom); if (index == -1) { return; } SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); titleLabel.setForeground(Color.gray); titleLabel.setFont(tab.getDefaultFont()); if (chatRoom instanceof ChatRoomImpl) { ChatRoomImpl impl = (ChatRoomImpl)chatRoom; if(impl.isIconHandler()){ return; } String jid = ((ChatRoomImpl)chatRoom).getParticipantJID(); Presence presence = SparkManager.getConnection().getRoster().getPresence(jid); if (presence == null || presence.getType() == Presence.Type.unavailable) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_UNAVAILABLE_STALE_IMAGE)); } else if (presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AVAILABLE_STALE_IMAGE)); } else if (mode == Presence.Mode.away) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AWAY_STALE_IMAGE)); } else if (mode == Presence.Mode.chat) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_FREE_CHAT_STALE_IMAGE)); } else if (mode == Presence.Mode.dnd) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } else if (mode == Presence.Mode.xa) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } } } titleLabel.validate(); titleLabel.repaint(); } }
3,233,841
public void closeActiveRoom() { ChatRoom room = null; try { room = getActiveChatRoom(); } catch (ChatRoomNotFoundException e1) { // AgentLog.logError("Chat room not found", e1); } // Confirm end session boolean isGroupChat = room.getChatType() == Message.Type.GROUP_CHAT; if (isGroupChat) { String message = "Would you like to end this session?"; final int ok = JOptionPane.showConfirmDialog(chatFrame, message, "Confirmation", JOptionPane.YES_NO_OPTION); if (ok == JOptionPane.OK_OPTION) { room.closeChatRoom(); return; } } else { room.closeChatRoom(); return; } }
public void closeActiveRoom() { ChatRoom room = null; try { room = getActiveChatRoom(); } catch (ChatRoomNotFoundException e1) { // AgentLog.logError("Chat room not found", e1); } // Confirm end session boolean isGroupChat = room.getChatType() == Message.Type.GROUP_CHAT; if (isGroupChat) { String message = "Would you like to end this session?"; final int ok = JOptionPane.showConfirmDialog(chatFrame, message, "Confirmation", JOptionPane.YES_NO_OPTION); if (ok == JOptionPane.OK_OPTION) { room.closeChatRoom(); return; } } else { room.closeChatRoom(); return; } }
3,233,842
private void handleRoomPresence(final Presence p) { final String roomname = StringUtils.parseBareAddress(p.getFrom()); ChatRoom chatRoom; try { chatRoom = getChatRoom(roomname); } catch (ChatRoomNotFoundException e1) { Log.error("Could not locate chat room.", e1); return; } final String userid = StringUtils.parseResource(p.getFrom()); if (p.getType() == Presence.Type.unavailable) { fireUserHasLeft(chatRoom, userid); } else if (p.getType() == Presence.Type.available) { fireUserHasJoined(chatRoom, userid); } // Change tab icon if (chatRoom instanceof ChatRoomImpl) { StatusItem statusItem = SparkManager.getWorkspace().getStatusBar().getItemFromPresence(p); Icon tabIcon = null; if (statusItem == null && p == null) { tabIcon = SparkRes.getImageIcon(SparkRes.CLEAR_BALL_ICON); } else if (statusItem == null && p != null && p.getType() == Presence.Type.available) { tabIcon = SparkRes.getImageIcon(SparkRes.GREEN_BALL); } else { String status = p.getStatus(); if (status != null && status.indexOf("phone") != -1) { tabIcon = SparkRes.getImageIcon(SparkRes.ON_PHONE_IMAGE); } else if (statusItem == null) { tabIcon = SparkRes.getImageIcon(SparkRes.CLEAR_BALL_ICON); } else { tabIcon = statusItem.getIcon(); } } Icon icon = SparkManager.getChatManager().getPresenceIconForContactHandler(p); if (icon != null) { tabIcon = icon; } int tabLoc = indexOfComponent(chatRoom); if (tabLoc != -1) { getTabAt(tabLoc).setIcon(tabIcon); } } }
private void handleRoomPresence(final Presence p) { final String roomname = StringUtils.parseBareAddress(p.getFrom()); ChatRoom chatRoom; try { chatRoom = getChatRoom(roomname); } catch (ChatRoomNotFoundException e1) { Log.debug("Could not locate chat room " + roomname); return; } final String userid = StringUtils.parseResource(p.getFrom()); if (p.getType() == Presence.Type.unavailable) { fireUserHasLeft(chatRoom, userid); } else if (p.getType() == Presence.Type.available) { fireUserHasJoined(chatRoom, userid); } // Change tab icon if (chatRoom instanceof ChatRoomImpl) { StatusItem statusItem = SparkManager.getWorkspace().getStatusBar().getItemFromPresence(p); Icon tabIcon = null; if (statusItem == null && p == null) { tabIcon = SparkRes.getImageIcon(SparkRes.CLEAR_BALL_ICON); } else if (statusItem == null && p != null && p.getType() == Presence.Type.available) { tabIcon = SparkRes.getImageIcon(SparkRes.GREEN_BALL); } else { String status = p.getStatus(); if (status != null && status.indexOf("phone") != -1) { tabIcon = SparkRes.getImageIcon(SparkRes.ON_PHONE_IMAGE); } else if (statusItem == null) { tabIcon = SparkRes.getImageIcon(SparkRes.CLEAR_BALL_ICON); } else { tabIcon = statusItem.getIcon(); } } Icon icon = SparkManager.getChatManager().getPresenceIconForContactHandler(p); if (icon != null) { tabIcon = icon; } int tabLoc = indexOfComponent(chatRoom); if (tabLoc != -1) { getTabAt(tabLoc).setIcon(tabIcon); } } }
3,233,843
public void visitDefnNode(DefnNode iVisited) { RubyModule containingClass = threadContext.getRubyClass(); if (containingClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (containingClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && containingClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } MetaClass singletonClass = null; /* // if defining in a singleton, pop it and use visitDefs-style definition below if (containingClass.isSingleton()) { singletonClass = (MetaClass) threadContext.popClass(); containingClass = threadContext.getRubyClass(); } */ DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, threadContext.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); containingClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { containingClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); containingClass.callMethod("singleton_method_added", runtime.newSymbol(name)); } if (singletonClass != null) { threadContext.pushClass(singletonClass); singletonClass.addMethod(iVisited.getName(), newMethod); // FIXME: need to call someone's singleton_method_added (receiver is lost at this point)! //.callMethod("singleton_method_added", runtime.toSymbol(iVisited.getName())); } else { containingClass.callMethod("method_added", runtime.newSymbol(name)); } }
public void visitDefnNode(DefnNode iVisited) { RubyModule containingClass = threadContext.getRubyClass(); if (containingClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (containingClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && containingClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } MetaClass singletonClass = null; /* // if defining in a singleton, pop it and use visitDefs-style definition below if (containingClass.isSingleton()) { singletonClass = (MetaClass) threadContext.popClass(); containingClass = threadContext.getRubyClass(); } */ DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, (ArrayStack)threadContext.getClassStack().clone()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); containingClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { containingClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); containingClass.callMethod("singleton_method_added", runtime.newSymbol(name)); } if (singletonClass != null) { threadContext.pushClass(singletonClass); singletonClass.addMethod(iVisited.getName(), newMethod); // FIXME: need to call someone's singleton_method_added (receiver is lost at this point)! //.callMethod("singleton_method_added", runtime.toSymbol(iVisited.getName())); } else { containingClass.callMethod("method_added", runtime.newSymbol(name)); } }
3,233,844
public void visitDefsNode(DefsNode iVisited) { IRubyObject receiver = eval(iVisited.getReceiverNode()); if (runtime.getSafeLevel() >= 4 && !receiver.isTaint()) { throw new SecurityError(runtime, "Insecure; can't define singleton method."); } if (receiver.isFrozen()) { throw new FrozenError(runtime, "object"); } if (! receiver.singletonMethodsAllowed()) { throw new TypeError(runtime, "can't define singleton method \"" + iVisited.getName() + "\" for " + receiver.getType()); } RubyClass rubyClass = receiver.getSingletonClass(); if (runtime.getSafeLevel() >= 4) { ICallable method = (ICallable) rubyClass.getMethods().get(iVisited.getName()); if (method != null) { throw new SecurityError(runtime, "Redefining method prohibited."); } } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), Visibility.PUBLIC, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(iVisited.getName(), newMethod); receiver.callMethod("singleton_method_added", runtime.newSymbol(iVisited.getName())); result = runtime.getNil(); }
public void visitDefsNode(DefsNode iVisited) { IRubyObject receiver = eval(iVisited.getReceiverNode()); if (runtime.getSafeLevel() >= 4 && !receiver.isTaint()) { throw new SecurityError(runtime, "Insecure; can't define singleton method."); } if (receiver.isFrozen()) { throw new FrozenError(runtime, "object"); } if (! receiver.singletonMethodsAllowed()) { throw new TypeError(runtime, "can't define singleton method \"" + iVisited.getName() + "\" for " + receiver.getType()); } RubyClass rubyClass = receiver.getSingletonClass(); if (runtime.getSafeLevel() >= 4) { ICallable method = (ICallable) rubyClass.getMethods().get(iVisited.getName()); if (method != null) { throw new SecurityError(runtime, "Redefining method prohibited."); } } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), Visibility.PUBLIC, (ArrayStack)threadContext.getClassStack().clone()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(iVisited.getName(), newMethod); receiver.callMethod("singleton_method_added", runtime.newSymbol(iVisited.getName())); result = runtime.getNil(); }
3,233,845
public void visitScopeNode(ScopeNode iVisited) { threadContext.getFrameStack().pushCopy(); threadContext.getScopeStack().push(iVisited.getLocalNames()); try { eval(iVisited.getBodyNode()); System.out.println(iVisited.getBodyNode().getClass().getName()); } finally { threadContext.getScopeStack().pop(); threadContext.getFrameStack().pop(); } }
public void visitScopeNode(ScopeNode iVisited) { threadContext.getFrameStack().pushCopy(); threadContext.getScopeStack().push(iVisited.getLocalNames()); try { eval(iVisited.getBodyNode()); } finally { threadContext.getScopeStack().pop(); threadContext.getFrameStack().pop(); } }
3,233,846
private void parseArguments(String[] args) throws Exception { FileFinder finder = new FileFinder(); for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) { finder.addBaseDirectory(new File(args[++i])); } else if (args[i].equals("--datafile")) { setDataFile( args[++i]); } else if (args[i].equals("--destination")) { setDestination( args[++i]); } else if (args[i].equals("--format")) { setFormat( args[++i]); } else { finder.addSourceFilePath(args[i]); } } if (dataFile == null) dataFile = CoverageDataFileHandler.getDefaultDataFile(); if (destinationDir == null) { System.err.println("Error: destination directory must be set"); System.exit(1); } if (format == null) { System.err.println("Error: format must be set"); System.exit(1); } if (LOGGER.isDebugEnabled()) { LOGGER.debug("format is " + format); LOGGER.debug("dataFile is " + dataFile.getAbsolutePath()); LOGGER.debug("destinationDir is " + destinationDir.getAbsolutePath()); } ProjectData projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) { System.err.println("Error: Unable to read from data file " + dataFile.getAbsolutePath()); System.exit(1); } if (format.equalsIgnoreCase("html")) { new HTMLReport(projectData, destinationDir, finder); } else if (format.equalsIgnoreCase("xml")) { new XMLReport(projectData, destinationDir, finder); } }
private void parseArguments(String[] args) throws Exception { FileFinder finder = new FileFinder(); for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) { finder.addBaseDirectory(new File(args[++i])); } else if (args[i].equals("--datafile")) { setDataFile( args[++i]); } else if (args[i].equals("--destination")) { setDestination( args[++i]); } else if (args[i].equals("--format")) { setFormat( args[++i]); } else { finder.addSourceFilePath(args[i]); } } if (dataFile == null) dataFile = CoverageDataFileHandler.getDefaultDataFile(); if (destinationDir == null) { System.err.println("Error: destination directory must be set"); System.exit(1); } if (format == null) { System.err.println("Error: format must be set"); System.exit(1); } if (LOGGER.isDebugEnabled()) { LOGGER.debug("format is " + format); LOGGER.debug("dataFile is " + dataFile.getAbsolutePath()); LOGGER.debug("destinationDir is " + destinationDir.getAbsolutePath()); } ProjectData projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) { System.err.println("Error: Unable to read from data file " + dataFile.getAbsolutePath()); System.exit(1); } if (format.equalsIgnoreCase("html")) { new HTMLReport(projectData, destinationDir, finder); } else if (format.equalsIgnoreCase("xml")) { new XMLReport(projectData, destinationDir, finder); } }
3,233,847
private void parseArguments(String[] args) throws Exception { FileFinder finder = new FileFinder(); for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) { finder.addBaseDirectory(new File(args[++i])); } else if (args[i].equals("--datafile")) { setDataFile( args[++i]); } else if (args[i].equals("--destination")) { setDestination( args[++i]); } else if (args[i].equals("--format")) { setFormat( args[++i]); } else { finder.addSourceFilePath(args[i]); } } if (dataFile == null) dataFile = CoverageDataFileHandler.getDefaultDataFile(); if (destinationDir == null) { System.err.println("Error: destination directory must be set"); System.exit(1); } if (format == null) { System.err.println("Error: format must be set"); System.exit(1); } if (LOGGER.isDebugEnabled()) { LOGGER.debug("format is " + format); LOGGER.debug("dataFile is " + dataFile.getAbsolutePath()); LOGGER.debug("destinationDir is " + destinationDir.getAbsolutePath()); } ProjectData projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) { System.err.println("Error: Unable to read from data file " + dataFile.getAbsolutePath()); System.exit(1); } if (format.equalsIgnoreCase("html")) { new HTMLReport(projectData, destinationDir, finder); } else if (format.equalsIgnoreCase("xml")) { new XMLReport(projectData, destinationDir, finder); } }
private void parseArguments(String[] args) throws Exception { FileFinder finder = new FileFinder(); for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) { finder.addBaseDirectory(new File(args[++i])); } else if (args[i].equals("--datafile")) { setDataFile( args[++i]); } else if (args[i].equals("--destination")) { setDestination( args[++i]); } else if (args[i].equals("--format")) { setFormat( args[++i]); } else { finder.addSourceFilePath(args[i]); } } if (dataFile == null) dataFile = CoverageDataFileHandler.getDefaultDataFile(); if (destinationDir == null) { System.err.println("Error: destination directory must be set"); System.exit(1); } if (format == null) { System.err.println("Error: format must be set"); System.exit(1); } if (LOGGER.isDebugEnabled()) { LOGGER.debug("format is " + format); LOGGER.debug("dataFile is " + dataFile.getAbsolutePath()); LOGGER.debug("destinationDir is " + destinationDir.getAbsolutePath()); } ProjectData projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) { System.err.println("Error: Unable to read from data file " + dataFile.getAbsolutePath()); System.exit(1); } if (format.equalsIgnoreCase("html")) { new HTMLReport(projectData, destinationDir, finder); } else if (format.equalsIgnoreCase("xml")) { new XMLReport(projectData, destinationDir, finder); } }
3,233,848
private void parseArguments(String[] args) throws Exception { FileFinder finder = new FileFinder(); for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) { finder.addBaseDirectory(new File(args[++i])); } else if (args[i].equals("--datafile")) { setDataFile( args[++i]); } else if (args[i].equals("--destination")) { setDestination( args[++i]); } else if (args[i].equals("--format")) { setFormat( args[++i]); } else { finder.addSourceFilePath(args[i]); } } if (dataFile == null) dataFile = CoverageDataFileHandler.getDefaultDataFile(); if (destinationDir == null) { System.err.println("Error: destination directory must be set"); System.exit(1); } if (format == null) { System.err.println("Error: format must be set"); System.exit(1); } if (LOGGER.isDebugEnabled()) { LOGGER.debug("format is " + format); LOGGER.debug("dataFile is " + dataFile.getAbsolutePath()); LOGGER.debug("destinationDir is " + destinationDir.getAbsolutePath()); } ProjectData projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) { System.err.println("Error: Unable to read from data file " + dataFile.getAbsolutePath()); System.exit(1); } if (format.equalsIgnoreCase("html")) { new HTMLReport(projectData, destinationDir, finder); } else if (format.equalsIgnoreCase("xml")) { new XMLReport(projectData, destinationDir, finder); } }
private void parseArguments(String[] args) throws Exception { FileFinder finder = new FileFinder(); for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) { finder.addBaseDirectory(new File(args[++i])); } else if (args[i].equals("--datafile")) { setDataFile( args[++i]); } else if (args[i].equals("--destination")) { setDestination( args[++i]); } else if (args[i].equals("--format")) { setFormat( args[++i]); } else { finder.addSourceFilePath(args[i]); } } if (dataFile == null) dataFile = CoverageDataFileHandler.getDefaultDataFile(); if (destinationDir == null) { System.err.println("Error: destination directory must be set"); System.exit(1); } if (format == null) { System.err.println("Error: format must be set"); System.exit(1); } if (LOGGER.isDebugEnabled()) { LOGGER.debug("format is " + format); LOGGER.debug("dataFile is " + dataFile.getAbsolutePath()); LOGGER.debug("destinationDir is " + destinationDir.getAbsolutePath()); } ProjectData projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) { System.err.println("Error: Unable to read from data file " + dataFile.getAbsolutePath()); System.exit(1); } if (format.equalsIgnoreCase("html")) { new HTMLReport(projectData, destinationDir, finder); } else if (format.equalsIgnoreCase("xml")) { new XMLReport(projectData, destinationDir, finder); } }
3,233,849
private void parseArguments(String[] args) throws Exception { FileFinder finder = new FileFinder(); for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) { finder.addBaseDirectory(new File(args[++i])); } else if (args[i].equals("--datafile")) { setDataFile( args[++i]); } else if (args[i].equals("--destination")) { setDestination( args[++i]); } else if (args[i].equals("--format")) { setFormat( args[++i]); } else { finder.addSourceFilePath(args[i]); } } if (dataFile == null) dataFile = CoverageDataFileHandler.getDefaultDataFile(); if (destinationDir == null) { System.err.println("Error: destination directory must be set"); System.exit(1); } if (format == null) { System.err.println("Error: format must be set"); System.exit(1); } if (LOGGER.isDebugEnabled()) { LOGGER.debug("format is " + format); LOGGER.debug("dataFile is " + dataFile.getAbsolutePath()); LOGGER.debug("destinationDir is " + destinationDir.getAbsolutePath()); } ProjectData projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) { System.err.println("Error: Unable to read from data file " + dataFile.getAbsolutePath()); System.exit(1); } if (format.equalsIgnoreCase("html")) { new HTMLReport(projectData, destinationDir, finder); } else if (format.equalsIgnoreCase("xml")) { new XMLReport(projectData, destinationDir, finder); } }
private void parseArguments(String[] args) throws Exception { FileFinder finder = new FileFinder(); for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) { finder.addBaseDirectory(new File(args[++i])); } else if (args[i].equals("--datafile")) { setDataFile( args[++i]); } else if (args[i].equals("--destination")) { setDestination( args[++i]); } else if (args[i].equals("--format")) { setFormat( args[++i]); } else { finder.addSourceFilePath(args[i]); } } if (dataFile == null) dataFile = CoverageDataFileHandler.getDefaultDataFile(); if (destinationDir == null) { System.err.println("Error: destination directory must be set"); System.exit(1); } if (format == null) { System.err.println("Error: format must be set"); System.exit(1); } if (LOGGER.isDebugEnabled()) { LOGGER.debug("format is " + format); LOGGER.debug("dataFile is " + dataFile.getAbsolutePath()); LOGGER.debug("destinationDir is " + destinationDir.getAbsolutePath()); } ProjectData projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) { System.err.println("Error: Unable to read from data file " + dataFile.getAbsolutePath()); System.exit(1); } if (format.equalsIgnoreCase("html")) { new HTMLReport(projectData, destinationDir, finder); } else if (format.equalsIgnoreCase("xml")) { new XMLReport(projectData, destinationDir, finder); } }
3,233,850
public void addSourceFilePath(String path) { change(); sourceFilePaths.add(path); }
public void addSourceFilePath(String path) { change(); sourceFilePaths.add(path); }
3,233,851
Set getImagesDiff(pojos.DatasetData data, Map filters, Map complexFilters) { Set imagesDiff = new HashSet(); try { imagesDiff = getImportedImages(filters, complexFilters); pojos.ImageData isg; Iterator i = imagesDiff.iterator(); Set images = data.getImages(); Iterator j; while (i.hasNext()) { isg = (pojos.ImageData) i.next(); j = images.iterator(); while (j.hasNext()) { if (((pojos.ImageData) j.next()).getId() == isg.getId()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; /* List imagesDiff = new ArrayList(); try { imagesDiff = getImportedImages(filters, complexFilters); Set images = data.getImages(); pojos.ImageData isg; Iterator i; for (int j = 0; j < imagesDiff.size(); j++) { isg = (pojos.ImageData) imagesDiff.get(j); i = images.iterator(); while (i.hasNext()) { if (((pojos.ImageData) i.next()).getId() == isg.getId()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; */ }
Set getImagesDiff(pojos.DatasetData data, Map filters, Map complexFilters) { Set imagesDiff = new HashSet(); try { imagesDiff = getImportedImages(filters, complexFilters); pojos.ImageData isg; Iterator i = imagesDiff.iterator(); Set images = data.getImages(); Iterator j; while (i.hasNext()) { isg = (pojos.ImageData) i.next(); j = images.iterator(); while (j.hasNext()) { if (((pojos.ImageData) j.next()).getId() == isg.getId()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; /* List imagesDiff = new ArrayList(); try { imagesDiff = getImportedImages(filters, complexFilters); Set images = data.getImages(); pojos.ImageData isg; Iterator i; for (int j = 0; j < imagesDiff.size(); j++) { isg = (pojos.ImageData) imagesDiff.get(j); i = images.iterator(); while (i.hasNext()) { if (((pojos.ImageData) i.next()).getId() == isg.getId()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; */ }
3,233,852
Set getImagesDiff(pojos.DatasetData data, Map filters, Map complexFilters) { Set imagesDiff = new HashSet(); try { imagesDiff = getImportedImages(filters, complexFilters); pojos.ImageData isg; Iterator i = imagesDiff.iterator(); Set images = data.getImages(); Iterator j; while (i.hasNext()) { isg = (pojos.ImageData) i.next(); j = images.iterator(); while (j.hasNext()) { if (((pojos.ImageData) j.next()).getId() == isg.getId()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; /* List imagesDiff = new ArrayList(); try { imagesDiff = getImportedImages(filters, complexFilters); Set images = data.getImages(); pojos.ImageData isg; Iterator i; for (int j = 0; j < imagesDiff.size(); j++) { isg = (pojos.ImageData) imagesDiff.get(j); i = images.iterator(); while (i.hasNext()) { if (((pojos.ImageData) i.next()).getId() == isg.getId()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; */ }
Set getImagesDiff(pojos.DatasetData data, Map filters, Map complexFilters) { Set imagesDiff = new HashSet(); try { imagesDiff = getImportedImages(filters, complexFilters); pojos.ImageData isg; Iterator i = imagesDiff.iterator(); Set images = data.getImages(); Iterator j; while (i.hasNext()) { isg = (pojos.ImageData) i.next(); j = images.iterator(); while (j.hasNext()) { if (((pojos.ImageData) j.next()).getId() == isg.getId()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; /* List imagesDiff = new ArrayList(); try { imagesDiff = getImportedImages(filters, complexFilters); Set images = data.getImages(); pojos.ImageData isg; Iterator i; for (int j = 0; j < imagesDiff.size(); j++) { isg = (pojos.ImageData) imagesDiff.get(j); i = images.iterator(); while (i.hasNext()) { if (((pojos.ImageData) i.next()).getId() == isg.getId()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; */ }
3,233,853
public DefnNode(ISourcePosition position, String name, Node argsNode, ScopeNode bodyNode, Visibility visibility) { super(position); this.name = name.intern(); this.argsNode = argsNode; this.bodyNode = bodyNode; this.visibility = visibility; }
public DefnNode(ISourcePosition position, ArgumentNode nameNode, Node argsNode, ScopeNode bodyNode, Visibility visibility) { super(position); this.name = name.intern(); this.argsNode = argsNode; this.bodyNode = bodyNode; this.visibility = visibility; }
3,233,855
public DefnNode(ISourcePosition position, String name, Node argsNode, ScopeNode bodyNode, Visibility visibility) { super(position); this.name = name.intern(); this.argsNode = argsNode; this.bodyNode = bodyNode; this.visibility = visibility; }
public DefnNode(ISourcePosition position, String name, Node argsNode, ScopeNode bodyNode, Visibility visibility) { super(position); this.nameNode = nameNode; this.argsNode = argsNode; this.bodyNode = bodyNode; this.visibility = visibility; }
3,233,856
public List childNodes() { return Node.createList(argsNode, bodyNode); }
public List childNodes() { return Node.createList(nameNode, argsNode, bodyNode); }
3,233,857
public Map getImageAnnotations(int imageID) throws DSOutOfServiceException, DSAccessException { Criteria c = AnnotationMapper.buildImageAnnotationCriteria(imageID); List l = (List) gateway.retrieveListSTSData("ImageAnnotation", c); TreeMap map = new TreeMap(); if (l != null && l.size() > 0) AnnotationMapper.fillImageAnnotations(l, map); return map; }
public Map getImageAnnotations(int imageID) throws DSOutOfServiceException, DSAccessException { Criteria c = AnnotationMapper.buildImageAnnotationCriteria(imageID); List l = (List) gateway.retrieveListSTSData("ImageAnnotation", c); TreeMap map = new TreeMap(); if (l != null && l.size() > 0) AnnotationMapper.fillImageAnnotations(l, map); return map; }
3,233,858
public List retrieveCGCIHierarchy(List imageSummaries) throws DSOutOfServiceException, DSAccessException { if (imageSummaries == null) throw new NullPointerException("List of imageSummaries " + "cannot be null"); if (imageSummaries.size() == 0) throw new IllegalArgumentException("List of imageSummaries " + "cannot be of length 0"); Iterator i = imageSummaries.iterator(); ImageSummary is; Map map = new HashMap(); List ids = new ArrayList(); Integer id; while (i.hasNext()) { is = (ImageSummary) i.next(); id = new Integer(is.getID()); map.put(id, is); ids.add(id); } UserCredentials uc = (UserCredentials) registry.lookup(LookupNames.USER_CREDENTIALS); if (ids.size() > DMSAdapter.LIMIT_FOR_IN) ids = null; Criteria c = HierarchyMapper.buildICGHierarchyCriteria(ids, uc.getUserID()); List classifications = (List) gateway.retrieveListSTSData("Classification", c); if (classifications == null) return null; return HierarchyMapper.fillICGHierarchy(classifications, map); }
public List retrieveCGCIHierarchy(List imageSummaries) throws DSOutOfServiceException, DSAccessException { if (imageSummaries == null) throw new NullPointerException("List of imageSummaries " + "cannot be null"); if (imageSummaries.size() == 0) throw new IllegalArgumentException("List of imageSummaries " + "cannot be of length 0"); Iterator i = imageSummaries.iterator(); ImageSummary is; Map map = new HashMap(); List ids = new ArrayList(); Integer id; while (i.hasNext()) { is = (ImageSummary) i.next(); id = new Integer(is.getID()); map.put(id, is); ids.add(id); } UserCredentials uc = (UserCredentials) registry.lookup(LookupNames.USER_CREDENTIALS); Criteria c = HierarchyMapper.buildICGHierarchyCriteria(ids, uc.getUserID()); List classifications = (List) gateway.retrieveListSTSData("Classification", c); if (classifications == null) return null; return HierarchyMapper.fillICGHierarchy(classifications, map); }
3,233,859
public List retrieveCGCIHierarchy(List imageSummaries) throws DSOutOfServiceException, DSAccessException { if (imageSummaries == null) throw new NullPointerException("List of imageSummaries " + "cannot be null"); if (imageSummaries.size() == 0) throw new IllegalArgumentException("List of imageSummaries " + "cannot be of length 0"); Iterator i = imageSummaries.iterator(); ImageSummary is; Map map = new HashMap(); List ids = new ArrayList(); Integer id; while (i.hasNext()) { is = (ImageSummary) i.next(); id = new Integer(is.getID()); map.put(id, is); ids.add(id); } UserCredentials uc = (UserCredentials) registry.lookup(LookupNames.USER_CREDENTIALS); if (ids.size() > DMSAdapter.LIMIT_FOR_IN) ids = null; Criteria c = HierarchyMapper.buildICGHierarchyCriteria(ids, uc.getUserID()); List classifications = (List) gateway.retrieveListSTSData("Classification", c); if (classifications == null) return null; return HierarchyMapper.fillICGHierarchy(classifications, map); }
public List retrieveCGCIHierarchy(List imageSummaries) throws DSOutOfServiceException, DSAccessException { if (imageSummaries == null) throw new NullPointerException("List of imageSummaries " + "cannot be null"); if (imageSummaries.size() == 0) throw new IllegalArgumentException("List of imageSummaries " + "cannot be of length 0"); Iterator i = imageSummaries.iterator(); ImageSummary is; Map map = new HashMap(); List ids = new ArrayList(); Integer id; while (i.hasNext()) { is = (ImageSummary) i.next(); id = new Integer(is.getID()); map.put(id, is); ids.add(id); } UserCredentials uc = (UserCredentials) registry.lookup(LookupNames.USER_CREDENTIALS); if (ids.size() > DMSAdapter.LIMIT_FOR_IN) ids = null; Criteria c = HierarchyMapper.buildICGHierarchyCriteria(ids, uc.getUserID()); List classifications = (List) gateway.retrieveListSTSData("Classification", c); if (classifications == null) return new ArrayList(); return HierarchyMapper.fillICGHierarchy(classifications, map); }
3,233,860