bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public Object invoke(MethodInvocation arg0) throws Throwable { return filter(null,arg0.proceed()); }
public Object invoke(MethodInvocation arg0) throws Throwable { return filter(null,arg0.proceed()); }
3,234,412
public RubyObject aref(RubyObject[] args) { if (argCount(args, 1, 2) == 2) { int beg = RubyNumeric.fix2int(args[0]); int len = RubyNumeric.fix2int(args[1]); return substr(beg, len); } if (args[0] instanceof RubyFixnum) { int idx = RubyNumeric.fix2int(args[0]); if (idx < 0) { idx += getValue().length(); } if (idx < 0 || idx >= getValue().length()) { return getRuby().getNil(); } return new RubyFixnum(getRuby(), getValue().charAt(idx)); } if (args[0] instanceof RubyRegexp) { if (RubyRegexp.regexpValue(args[0]).search(this, 0) >= 0) { return RubyRegexp.last_match(getRuby().getBackref()); } return getRuby().getNil(); } if (args[0] instanceof RubyString) { if (getValue().indexOf(stringValue(args[0]).getValue()) != -1) { return args[0]; } return getRuby().getNil(); } if (args[0] instanceof RubyRange) { long[] begLen = ((RubyRange) args[0]).getBeginLength(getValue().length(), true, false); if (begLen == null) { return getRuby().getNil(); } return substr((int) begLen[0], (int) begLen[1]); } int idx = (int) RubyNumeric.num2long(args[0]); if (idx < 0) { idx += getValue().length(); } if (idx < 0 || idx >= getValue().length()) { return getRuby().getNil(); } return new RubyFixnum(getRuby(), getValue().charAt(idx)); }
public RubyObject aref(RubyObject[] args) { if (argCount(args, 1, 2) == 2) { int beg = RubyNumeric.fix2int(args[0]); int len = RubyNumeric.fix2int(args[1]); return substr(beg, len); } if (args[0] instanceof RubyFixnum) { int idx = RubyNumeric.fix2int(args[0]); if (idx < 0) { idx += getValue().length(); } if (idx < 0 || idx >= getValue().length()) { return getRuby().getNil(); } return new RubyFixnum(getRuby(), getValue().charAt(idx)); } if (args[0] instanceof RubyRegexp) { if (RubyRegexp.regexpValue(args[0]).search(this, 0) >= 0) { return RubyRegexp.last_match(getRuby().getBackref()); } return getRuby().getNil(); } if (args[0] instanceof RubyString) { if (getValue().indexOf(stringValue(args[0]).getValue()) != -1) { return args[0]; } return getRuby().getNil(); } if (args[0] instanceof RubyRange) { long[] begLen = ((RubyRange) args[0]).getBeginLength(getValue().length(), true, false); if (begLen == null) { return getRuby().getNil(); } return substr((int) begLen[0], (int) begLen[1]); } int idx = (int) RubyNumeric.num2long(args[0]); if (idx < 0) { idx += getValue().length(); } if (idx < 0 || idx >= getValue().length()) { return getRuby().getNil(); } return new RubyFixnum(getRuby(), getValue().charAt(idx)); }
3,234,413
public RubyObject aref(RubyObject[] args) { if (argCount(args, 1, 2) == 2) { int beg = RubyNumeric.fix2int(args[0]); int len = RubyNumeric.fix2int(args[1]); return substr(beg, len); } if (args[0] instanceof RubyFixnum) { int idx = RubyNumeric.fix2int(args[0]); if (idx < 0) { idx += getValue().length(); } if (idx < 0 || idx >= getValue().length()) { return getRuby().getNil(); } return new RubyFixnum(getRuby(), getValue().charAt(idx)); } if (args[0] instanceof RubyRegexp) { if (RubyRegexp.regexpValue(args[0]).search(this, 0) >= 0) { return RubyRegexp.last_match(getRuby().getBackref()); } return getRuby().getNil(); } if (args[0] instanceof RubyString) { if (getValue().indexOf(stringValue(args[0]).getValue()) != -1) { return args[0]; } return getRuby().getNil(); } if (args[0] instanceof RubyRange) { long[] begLen = ((RubyRange) args[0]).getBeginLength(getValue().length(), true, false); if (begLen == null) { return getRuby().getNil(); } return substr((int) begLen[0], (int) begLen[1]); } int idx = (int) RubyNumeric.num2long(args[0]); if (idx < 0) { idx += getValue().length(); } if (idx < 0 || idx >= getValue().length()) { return getRuby().getNil(); } return new RubyFixnum(getRuby(), getValue().charAt(idx)); }
public RubyObject aref(RubyObject[] args) { if (argCount(args, 1, 2) == 2) { int beg = RubyNumeric.fix2int(args[0]); int len = RubyNumeric.fix2int(args[1]); return substr(beg, len); } if (args[0] instanceof RubyFixnum) { int idx = RubyNumeric.fix2int(args[0]); if (idx < 0) { idx += getValue().length(); } if (idx < 0 || idx >= getValue().length()) { return getRuby().getNil(); } return new RubyFixnum(getRuby(), getValue().charAt(idx)); } if (args[0] instanceof RubyRegexp) { if (RubyRegexp.regexpValue(args[0]).search(this, 0) >= 0) { return RubyRegexp.last_match(getRuby().getBackref()); } return getRuby().getNil(); } if (args[0] instanceof RubyString) { if (getValue().indexOf(stringValue(args[0]).getValue()) != -1) { return args[0]; } return getRuby().getNil(); } if (args[0] instanceof RubyRange) { long[] begLen = ((RubyRange) args[0]).getBeginLength(getValue().length(), true, false); if (begLen == null) { return getRuby().getNil(); } return substr((int) begLen[0], (int) begLen[1]); } int idx = (int) RubyNumeric.num2long(args[0]); if (idx < 0) { idx += getValue().length(); } if (idx < 0 || idx >= getValue().length()) { return getRuby().getNil(); } return new RubyFixnum(getRuby(), getValue().charAt(idx)); }
3,234,414
public RubyString each_byte() { byte[] lByteValue = toByteArray(); int lLength = lByteValue.length; for (int i = 0; i < lLength; i++) { ruby.yield(new RubyFixnum(ruby, lByteValue[i])); } return this; }
public RubyString each_byte() { byte[] lByteValue = toByteArray(); int lLength = lByteValue.length; for (int i = 0; i < lLength; i++) { ruby.yield(new RubyFixnum(ruby, lByteValue[i])); } return this; }
3,234,415
public RubyBoolean empty() { return new RubyBoolean(getRuby(), getValue().length() == 0); }
public RubyBoolean empty() { return new RubyBoolean(getRuby(), getValue().length() == 0); }
3,234,416
public RubyFixnum length() { return new RubyFixnum(getRuby(), getValue().length()); }
public RubyFixnum length() { return new RubyFixnum(getRuby(), getValue().length()); }
3,234,417
protected UIComponent getMainTaskbar() { String bref = WFPage.CONTENT_BUNDLE + "."; WFTabBar tb = new WFTabBar(); tb.setMainAreaStyleClass(null); tb.setId(MAIN_TASKBAR_ID); WFTab buttonContent = tb.addButtonVB(TASK_ID_CONTENT, bref + "content", getContentPerspective()); buttonContent.addActionListener(this); WFTab buttonEdit = tb.addButtonVB(TASK_ID_EDIT, bref + "edit", getEditPerspective()); buttonEdit.addActionListener(this); tb.addTaskbarListener(this); UICommand debugButton = new HtmlCommandButton(); debugButton.setId("debugbutton"); debugButton.setValue("debug"); debugButton.setImmediate(true); debugButton.addActionListener(this); this.getChildren().add(debugButton); return tb; }
protected UIComponent getMainTaskbar() { String bref = WFPage.CONTENT_BUNDLE + "."; WFTabBar tb = new WFTabBar(); tb.setMainAreaStyleClass(null); tb.setId(MAIN_TASKBAR_ID); WFTab buttonContent = tb.addButtonVB(TASK_ID_CONTENT, bref + "content", getContentPerspective()); buttonContent.addActionListener(this); WFTab buttonEdit = tb.addButtonVB(TASK_ID_EDIT, bref + "edit", getEditPerspective()); buttonEdit.addActionListener(this); tb.addTaskbarListener(this); UICommand debugButton = new HtmlCommandButton(); debugButton.setId("debugbutton"); debugButton.setValue("debug"); debugButton.setImmediate(true); debugButton.addActionListener(this); this.getChildren().add(debugButton); return tb; }
3,234,418
protected UIComponent getMainTaskbar() { String bref = WFPage.CONTENT_BUNDLE + "."; WFTabBar tb = new WFTabBar(); tb.setMainAreaStyleClass(null); tb.setId(MAIN_TASKBAR_ID); WFTab buttonContent = tb.addButtonVB(TASK_ID_CONTENT, bref + "content", getContentPerspective()); buttonContent.addActionListener(this); WFTab buttonEdit = tb.addButtonVB(TASK_ID_EDIT, bref + "edit", getEditPerspective()); buttonEdit.addActionListener(this); tb.addTaskbarListener(this); UICommand debugButton = new HtmlCommandButton(); debugButton.setId("debugbutton"); debugButton.setValue("debug"); debugButton.setImmediate(true); debugButton.addActionListener(this); this.getChildren().add(debugButton); return tb; }
protected UIComponent getMainTaskbar() { String bref = WFPage.CONTENT_BUNDLE + "."; WFTabBar tb = new WFTabBar(); tb.setMainAreaStyleClass(null); tb.setId(MAIN_TASKBAR_ID); WFTab buttonContent = tb.addButtonVB(TASK_ID_CONTENT, bref + "content", getContentPerspective()); buttonContent.addActionListener(this); WFTab buttonEdit = tb.addButtonVB(TASK_ID_EDIT, bref + "edit", getEditPerspective()); buttonEdit.addActionListener(this); tb.addTaskbarListener(this); UICommand debugButton = new HtmlCommandButton(); debugButton.setId("debugbutton"); debugButton.setValue("debug"); debugButton.setImmediate(true); debugButton.addActionListener(this); this.getChildren().add(debugButton); return tb; }
3,234,419
public void processAction(ActionEvent event) { UIComponent link = event.getComponent(); String id = WFUtil.getParameter(link, "id"); WFTabBar tb = (WFTabBar) link.getParent().getParent().getParent().findComponent(MAIN_TASKBAR_ID); tb.setSelectedButtonId(TASK_ID_EDIT); ArticleBlock ab = (ArticleBlock) tb.findComponent(ArticleBlock.ARTICLE_BLOCK_ID); ab.setEditMode(); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "clear"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLocaleId", "sv"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setHeadline", "headline"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setBody", id); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setAuthor", "author"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setComment", "comment"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setDescription", "description"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setSource", "source"); if (link.getId().equals(ArticleListBean.ARTICLE_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setStatus", ContentItemCase.STATUS_PUBLISHED); } else { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setStatus", ContentItemCase.STATUS_UNDER_REVIEW); } WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setMainCategoryId", new Integer(3)); ab.updateEditButtons(); }
public void processAction(ActionEvent event) { UIComponent link = event.getComponent(); String id = WFUtil.getParameter(link, "id"); WFTabBar tb = (WFTabBar) link.getParent().getParent().getParent().findComponent(MAIN_TASKBAR_ID); tb.setSelectedButtonId(TASK_ID_EDIT); ArticleBlock ab = (ArticleBlock) tb.findComponent(ArticleBlock.ARTICLE_BLOCK_ID); ab.setEditMode(); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "clear"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLocaleId", "sv"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setHeadline", "headline"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setBody", id); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setAuthor", "author"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setComment", "comment"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setDescription", "description"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setSource", "source"); if (link.getId().equals(ArticleListBean.ARTICLE_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setStatus", ContentItemCase.STATUS_PUBLISHED); } else { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setStatus", ContentItemCase.STATUS_UNDER_REVIEW); } WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setMainCategoryId", new Integer(3)); ab.updateEditButtons(); }
3,234,420
public void processAction(ActionEvent event) { UIComponent link = event.getComponent(); String id = WFUtil.getParameter(link, "id"); WFTabBar tb = (WFTabBar) link.getParent().getParent().getParent().findComponent(MAIN_TASKBAR_ID); tb.setSelectedButtonId(TASK_ID_EDIT); ArticleBlock ab = (ArticleBlock) tb.findComponent(ArticleBlock.ARTICLE_BLOCK_ID); ab.setEditMode(); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "clear"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLocaleId", "sv"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setHeadline", "headline"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setBody", id); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setAuthor", "author"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setComment", "comment"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setDescription", "description"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setSource", "source"); if (link.getId().equals(ArticleListBean.ARTICLE_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setStatus", ContentItemCase.STATUS_PUBLISHED); } else { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setStatus", ContentItemCase.STATUS_UNDER_REVIEW); } WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setMainCategoryId", new Integer(3)); ab.updateEditButtons(); }
public void processAction(ActionEvent event) { UIComponent link = event.getComponent(); String id = WFUtil.getParameter(link, "id"); WFTabBar tb = (WFTabBar) link.getParent().getParent().getParent().findComponent(MAIN_TASKBAR_ID); tb.setSelectedButtonId(TASK_ID_EDIT); ArticleBlock ab = (ArticleBlock) tb.findComponent(ArticleBlock.ARTICLE_BLOCK_ID); ab.setEditMode(); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "clear"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLocaleId", "sv"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setHeadline", "headline"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setBody", id); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setAuthor", "author"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setComment", "comment"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setDescription", "description"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setSource", "source"); if (link.getId().equals(ArticleListBean.ARTICLE_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setStatus", ContentItemCase.STATUS_PUBLISHED); } else { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setStatus", ContentItemCase.STATUS_UNDER_REVIEW); } WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setMainCategoryId", new Integer(3)); ab.updateEditButtons(); }
3,234,421
public void setEditMode() { WFTabBar tb = (WFTabBar) findComponent(MAIN_TASKBAR_ID); tb.setSelectedButtonId(TASK_ID_EDIT); ArticleBlock ab = (ArticleBlock) tb.findComponent(ArticleBlock.ARTICLE_BLOCK_ID); ab.setEditMode(); }
public void setEditMode() { WFTabBar tb = (WFTabBar) findComponent(MAIN_TASKBAR_ID); tb.setSelectedButtonId(TASK_ID_EDIT); ArticleBlock ab = (ArticleBlock) tb.findComponent(ArticleBlock.ARTICLE_BLOCK_ID); ab.setEditMode(); }
3,234,422
public void tabPressed(WFTabEvent e) { WFTabBar t = e.getTaskbar(); UIComponent articleVersionBlock = t.findComponent(ArticleVersionBlock.ARTICLE_VERSION_BLOCK_ID); if (t.getSelectedButtonId().equals(ArticleBlock.TASK_ID_PREVIEW)) { articleVersionBlock.setRendered(true); } else { articleVersionBlock.setRendered(false); } }
public void tabPressed(WFTabEvent e) { WFTabBar t = e.getTaskbar(); UIComponent articleVersionBlock = t.findComponent(ArticleVersionBlock.ARTICLE_VERSION_BLOCK_ID); if (t.getSelectedButtonId().equals(ArticleBlock.TASK_ID_PREVIEW)) { articleVersionBlock.setRendered(true); } else { articleVersionBlock.setRendered(false); } }
3,234,423
public void tabPressed(WFTabEvent e) { WFTabBar t = e.getTaskbar(); UIComponent articleVersionBlock = t.findComponent(ArticleVersionBlock.ARTICLE_VERSION_BLOCK_ID); if (t.getSelectedButtonId().equals(ArticleBlock.TASK_ID_PREVIEW)) { articleVersionBlock.setRendered(true); } else { articleVersionBlock.setRendered(false); } }
public void tabPressed(WFTabEvent e) { WFTabBar t = e.getTaskbar(); UIComponent articleVersionBlock = t.findComponent(ArticleVersionBlock.ARTICLE_VERSION_BLOCK_ID); if (t.getSelectedButtonId().equals(ArticleBlock.TASK_ID_PREVIEW)) { articleVersionBlock.setRendered(true); } else { articleVersionBlock.setRendered(false); } }
3,234,424
public static BeanDefinitionHolder createBeanDefinition(String propertyName, Set patterns, String referenceType) { RootBeanDefinition beanDefinition = new RootBeanDefinition(SingletonReference.class, 0); ConstructorArgumentValues args = beanDefinition.getConstructorArgumentValues(); args.addIndexedArgumentValue(0, propertyName, String.class.getName()); args.addIndexedArgumentValue(1, patterns, Set.class.getName()); args.addIndexedArgumentValue(2, referenceType, String.class.getName()); return new BeanDefinitionHolder(beanDefinition, SingletonReference.class.getName()); }
public static BeanDefinitionHolder createBeanDefinition(String name, Set patterns, String referenceType) { RootBeanDefinition beanDefinition = new RootBeanDefinition(SingletonReference.class, 0); ConstructorArgumentValues args = beanDefinition.getConstructorArgumentValues(); args.addIndexedArgumentValue(0, propertyName, String.class.getName()); args.addIndexedArgumentValue(1, patterns, Set.class.getName()); args.addIndexedArgumentValue(2, referenceType, String.class.getName()); return new BeanDefinitionHolder(beanDefinition, SingletonReference.class.getName()); }
3,234,425
public static BeanDefinitionHolder createBeanDefinition(String propertyName, Set patterns, String referenceType) { RootBeanDefinition beanDefinition = new RootBeanDefinition(SingletonReference.class, 0); ConstructorArgumentValues args = beanDefinition.getConstructorArgumentValues(); args.addIndexedArgumentValue(0, propertyName, String.class.getName()); args.addIndexedArgumentValue(1, patterns, Set.class.getName()); args.addIndexedArgumentValue(2, referenceType, String.class.getName()); return new BeanDefinitionHolder(beanDefinition, SingletonReference.class.getName()); }
public static BeanDefinitionHolder createBeanDefinition(String propertyName, Set patterns, String referenceType) { RootBeanDefinition beanDefinition = new RootBeanDefinition(SingletonReference.class, 0); ConstructorArgumentValues args = beanDefinition.getConstructorArgumentValues(); args.addIndexedArgumentValue(0, propertyName, String.class.getName()); args.addIndexedArgumentValue(1, patterns, Set.class.getName()); args.addIndexedArgumentValue(2, referenceType, String.class.getName()); return new BeanDefinitionHolder(beanDefinition, SingletonReference.class.getName()); }
3,234,426
public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { debug("Intercepted update."); boolean altered = false; if ( entity instanceof IObject) { IObject iobj = (IObject) entity; int idx = detailsIndex( propertyNames ); // If this instance was formerly locked, relock it regardless. Details trustedDetails = (Details) previousState[idx]; markLockedIfNecessary( iobj, trustedDetails); altered |= resetDetails( iobj, currentState, previousState, idx ); } return altered; }
public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { debug("Intercepted update."); boolean altered = false; if ( entity instanceof IObject) { IObject iobj = (IObject) entity; int idx = detailsIndex( propertyNames ); // If this instance was formerly locked, relock it regardless. Details trustedDetails = (Details) previousState[idx]; markLockedIfNecessary( iobj, trustedDetails); altered |= resetDetails( iobj, currentState, previousState, idx ); } return altered; }
3,234,427
public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) { debug("Intercepted save."); if ( entity instanceof IObject ) { IObject iobj = (IObject) entity; int idx = detailsIndex( propertyNames ); // New instances don't inherently need to be locked // as they have no trustedDetails markLockedIfNecessary( iobj, null ); // Get a new details based on the current context Details d = secSys.transientDetails( iobj ); state[idx] = d; } return true; // transferDetails ALWAYS edits the new entity. }
public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) { debug("Intercepted save."); if ( entity instanceof IObject ) { IObject iobj = (IObject) entity; int idx = detailsIndex( propertyNames ); // New instances don't inherently need to be locked // as they have no trustedDetails markLockedIfNecessary( iobj, null ); // Get a new details based on the current context Details d = secSys.transientDetails( iobj ); state[idx] = d; } return true; // transferDetails ALWAYS edits the new entity. }
3,234,428
public void viewProfile(final String jid, final JComponent parent) { SwingWorker worker = new SwingWorker() { VCard userVCard = new VCard(); public Object construct() { userVCard = getVCard(jid); return vcard; } public void finished() { if (userVCard.getError() != null) { // Show vcard not found JOptionPane.showMessageDialog(parent, "Unable to locate a profile for " + jid, "Profile Not Found", JOptionPane.ERROR_MESSAGE); return; } else { showUserProfile(jid, userVCard, parent); } } }; worker.start(); }
public void viewProfile(final String jid, final JComponent parent) { SwingWorker worker = new SwingWorker() { VCard userVCard = new VCard(); public Object construct() { userVCard = getVCard(jid); return vcard; } public void finished() { if (userVCard.getError() != null || userVCard == null) { // Show vcard not found JOptionPane.showMessageDialog(parent, "Unable to locate a profile for " + jid, "Profile Not Found", JOptionPane.ERROR_MESSAGE); return; } else { showUserProfile(jid, userVCard, parent); } } }; worker.start(); }
3,234,430
public void finished() { if (userVCard.getError() != null) { // Show vcard not found JOptionPane.showMessageDialog(parent, "Unable to locate a profile for " + jid, "Profile Not Found", JOptionPane.ERROR_MESSAGE); return; } else { showUserProfile(jid, userVCard, parent); } }
public void finished() { if (userVCard.getError() != null || userVCard == null) { // Show vcard not found JOptionPane.showMessageDialog(parent, "Unable to locate a profile for " + jid, "Profile Not Found", JOptionPane.ERROR_MESSAGE); return; } else { showUserProfile(jid, userVCard, parent); } }
3,234,431
public final Template handle(WebContext wc) throws HandlerException { String pageName = null; WikiPage wikiPage = null; // who is trying to do something? WikiUser user = getUser (wc); // which action wants to respond to this request? PageAction action = _actionManager.getAction (wc, user); // use the action to determine which WikiPage // we should be dealing with if (action != null) pageName = action.getWikiPageName (_wiki, wc); if (pageName != null) wikiPage = _wiki.getPage (pageName); // stuff the webcontext with useful stuff stuffContext (wc, wikiPage, user); if (action == null) throw new HandlerException ("Unable to find a PageAction to handle" + " this request."); try { // attempt to perform the action against the page action.perform (_wiki, wc, user, wikiPage); } catch (PageAction.RedirectException re) { // action wants us to redirect somewhere else try { wc.getResponse().sendRedirect (re.getURL()); } catch (IOException ioe) { throw new HandlerException ("Cannot redirect to " + re.getURL(), ioe); } return null; } catch (Exception e) { // something bad happened while performing the action // TODO: Handle error and error template ourselves _log.error ("Could not perform action", e); throw new HandlerException (e.toString()); } // the action performed successfully, so now return // the template it wants us to use try { // determine the template name and return String templateName = action.getTemplateName(_wiki, wikiPage); return getTemplate (templateName); } catch (ResourceException re) { throw new HandlerException ("Could not get template", re); } }
public final Template handle(WebContext wc) throws HandlerException { String pageName = null; WikiPage wikiPage = null; // who is trying to do something? WikiUser user = getUser (wc); // which action wants to respond to this request? PageAction action = _actionManager.getAction (wc, user); // use the action to determine which WikiPage // we should be dealing with if (action != null) pageName = action.getWikiPageName (_wiki, wc); if (pageName != null) wikiPage = _wiki.getPage (pageName); // stuff the webcontext with useful stuff stuffContext (wc, wikiPage, user, pageName); if (action == null) throw new HandlerException ("Unable to find a PageAction to handle" + " this request."); try { // attempt to perform the action against the page action.perform (_wiki, wc, user, wikiPage); } catch (PageAction.RedirectException re) { // action wants us to redirect somewhere else try { wc.getResponse().sendRedirect (re.getURL()); } catch (IOException ioe) { throw new HandlerException ("Cannot redirect to " + re.getURL(), ioe); } return null; } catch (Exception e) { // something bad happened while performing the action // TODO: Handle error and error template ourselves _log.error ("Could not perform action", e); throw new HandlerException (e.toString()); } // the action performed successfully, so now return // the template it wants us to use try { // determine the template name and return String templateName = action.getTemplateName(_wiki, wikiPage); return getTemplate (templateName); } catch (ResourceException re) { throw new HandlerException ("Could not get template", re); } }
3,234,432
private void stuffContext (WebContext wc, WikiPage page, WikiUser user) { wc.put ("Wiki", _wiki); wc.put ("WikiUtil", WikiUtil.getInstance()); wc.put ("Renderer", _wiki.getPageRenderer()); wc.put ("Page", page); wc.put ("User", user); }
private void stuffContext (WebContext wc, WikiPage page, WikiUser user, String pageName) { wc.put ("Wiki", _wiki); wc.put ("WikiUtil", WikiUtil.getInstance()); wc.put ("Renderer", _wiki.getPageRenderer()); wc.put ("Page", page); wc.put ("User", user); }
3,234,433
public static Set invertCGCI(Set imagesAll) { Set cleared = new HashSet(); Set hierarchies = new HashSet(); Iterator i = imagesAll.iterator(); while (i.hasNext()) { Image img = (Image) i.next(); Iterator c = img.linkedCategoryIterator(); if ( ! c.hasNext() ) { hierarchies.add(img); } else { while (c.hasNext()) { Category ca = (Category) c.next(); if ( ! cleared.contains( ca )) { ca.clearImageLinks(); cleared.add( ca ); } ca.linkImage( img ); Iterator g = ca.linkedCategoryGroupIterator(); if ( ! g.hasNext() ) { hierarchies.add(ca); } else { while (g.hasNext()){ CategoryGroup cg = (CategoryGroup) g.next(); if ( ! cleared.contains( cg )) { cg.clearCategoryLinks(); cleared.add( cg ); } cg.linkCategory( ca ); hierarchies.add( cg ); } } } } } return hierarchies; }
public static Set invertCGCI(Set imagesAll) { Set cleared = new HashSet(); Set hierarchies = new HashSet(); Iterator i = imagesAll.iterator(); while (i.hasNext()) { Image img = (Image) i.next(); List<Category> c_list = img.linkedCategoryList(); Iterator c = c_list.iterator(); if ( ! c.hasNext() ) { hierarchies.add(img); } else { while (c.hasNext()) { Category ca = (Category) c.next(); if ( ! cleared.contains( ca )) { ca.clearImageLinks(); cleared.add( ca ); } ca.linkImage( img ); Iterator g = ca.linkedCategoryGroupIterator(); if ( ! g.hasNext() ) { hierarchies.add(ca); } else { while (g.hasNext()){ CategoryGroup cg = (CategoryGroup) g.next(); if ( ! cleared.contains( cg )) { cg.clearCategoryLinks(); cleared.add( cg ); } cg.linkCategory( ca ); hierarchies.add( cg ); } } } } } return hierarchies; }
3,234,435
public static Set invertCGCI(Set imagesAll) { Set cleared = new HashSet(); Set hierarchies = new HashSet(); Iterator i = imagesAll.iterator(); while (i.hasNext()) { Image img = (Image) i.next(); Iterator c = img.linkedCategoryIterator(); if ( ! c.hasNext() ) { hierarchies.add(img); } else { while (c.hasNext()) { Category ca = (Category) c.next(); if ( ! cleared.contains( ca )) { ca.clearImageLinks(); cleared.add( ca ); } ca.linkImage( img ); Iterator g = ca.linkedCategoryGroupIterator(); if ( ! g.hasNext() ) { hierarchies.add(ca); } else { while (g.hasNext()){ CategoryGroup cg = (CategoryGroup) g.next(); if ( ! cleared.contains( cg )) { cg.clearCategoryLinks(); cleared.add( cg ); } cg.linkCategory( ca ); hierarchies.add( cg ); } } } } } return hierarchies; }
public static Set invertCGCI(Set imagesAll) { Set cleared = new HashSet(); Set hierarchies = new HashSet(); Iterator i = imagesAll.iterator(); while (i.hasNext()) { Image img = (Image) i.next(); Iterator c = img.linkedCategoryIterator(); if ( ! c.hasNext() ) { hierarchies.add(img); } else { while (c.hasNext()) { Category ca = (Category) c.next(); if ( ! cleared.contains( ca )) { ca.clearImageLinks(); cleared.add( ca ); } ca.linkImage( img ); List<CategoryGroup> cg_list = ca.linkedCategoryGroupList(); Iterator g = cg_list.iterator(); if ( ! g.hasNext() ) { hierarchies.add(ca); } else { while (g.hasNext()){ CategoryGroup cg = (CategoryGroup) g.next(); if ( ! cleared.contains( cg )) { cg.clearCategoryLinks(); cleared.add( cg ); } cg.linkCategory( ca ); hierarchies.add( cg ); } } } } } return hierarchies; }
3,234,436
public static Set invertPDI(Set imagesAll) { Set cleared = new HashSet(); Set hierarchies = new HashSet(); Iterator i = imagesAll.iterator(); while (i.hasNext()) { Image img = (Image) i.next(); Iterator d = img.linkedDatasetIterator(); if ( ! d.hasNext() ) { hierarchies.add(img); } else { while (d.hasNext()) { Dataset ds = (Dataset) d.next(); if ( ! cleared.contains( ds )) { ds.clearImageLinks(); cleared.add( ds ); } ds.linkImage( img ); Iterator p = ds.linkedProjectIterator(); if ( ! p.hasNext() ) { hierarchies.add( ds ); } else { while (p.hasNext()) { Project prj = (Project) p.next(); if ( ! cleared.contains( p )) { prj.clearDatasetLinks(); cleared.add( prj ); } prj.linkDataset( ds ); hierarchies.add(prj); } } } } } return hierarchies; }
public static Set invertPDI(Set imagesAll) { Set cleared = new HashSet(); Set hierarchies = new HashSet(); Iterator i = imagesAll.iterator(); while (i.hasNext()) { Image img = (Image) i.next(); List<Dataset> d_list = img.linkedDatasetList(); Iterator d = d_list.iterator(); if ( ! d.hasNext() ) { hierarchies.add(img); } else { while (d.hasNext()) { Dataset ds = (Dataset) d.next(); if ( ! cleared.contains( ds )) { ds.clearImageLinks(); cleared.add( ds ); } ds.linkImage( img ); Iterator p = ds.linkedProjectIterator(); if ( ! p.hasNext() ) { hierarchies.add( ds ); } else { while (p.hasNext()) { Project prj = (Project) p.next(); if ( ! cleared.contains( p )) { prj.clearDatasetLinks(); cleared.add( prj ); } prj.linkDataset( ds ); hierarchies.add(prj); } } } } } return hierarchies; }
3,234,437
public static Set invertPDI(Set imagesAll) { Set cleared = new HashSet(); Set hierarchies = new HashSet(); Iterator i = imagesAll.iterator(); while (i.hasNext()) { Image img = (Image) i.next(); Iterator d = img.linkedDatasetIterator(); if ( ! d.hasNext() ) { hierarchies.add(img); } else { while (d.hasNext()) { Dataset ds = (Dataset) d.next(); if ( ! cleared.contains( ds )) { ds.clearImageLinks(); cleared.add( ds ); } ds.linkImage( img ); Iterator p = ds.linkedProjectIterator(); if ( ! p.hasNext() ) { hierarchies.add( ds ); } else { while (p.hasNext()) { Project prj = (Project) p.next(); if ( ! cleared.contains( p )) { prj.clearDatasetLinks(); cleared.add( prj ); } prj.linkDataset( ds ); hierarchies.add(prj); } } } } } return hierarchies; }
public static Set invertPDI(Set imagesAll) { Set cleared = new HashSet(); Set hierarchies = new HashSet(); Iterator i = imagesAll.iterator(); while (i.hasNext()) { Image img = (Image) i.next(); Iterator d = img.linkedDatasetIterator(); if ( ! d.hasNext() ) { hierarchies.add(img); } else { while (d.hasNext()) { Dataset ds = (Dataset) d.next(); if ( ! cleared.contains( ds )) { ds.clearImageLinks(); cleared.add( ds ); } ds.linkImage( img ); List<Project> p_list = ds.linkedProjectList(); Iterator p = p_list.iterator(); if ( ! p.hasNext() ) { hierarchies.add( ds ); } else { while (p.hasNext()) { Project prj = (Project) p.next(); if ( ! cleared.contains( p )) { prj.clearDatasetLinks(); cleared.add( prj ); } prj.linkDataset( ds ); hierarchies.add(prj); } } } } } return hierarchies; }
3,234,438
public PixelBuffer createPixelBuffer(Pixels pixels) throws IOException { PixelBuffer pixbuf = new PixelBuffer(pixels); initPixelBuffer(pixbuf); return pixbuf; }
public PixelBuffer createPixelBuffer(Pixels pixels) throws IOException { PixelBuffer pixbuf = new PixelBuffer(getPixelsPath(pixels.getId()),pixels); initPixelBuffer(pixbuf); return pixbuf; }
3,234,439
public PixelBuffer getPixelBuffer(Pixels pixels) { return new PixelBuffer(pixels); }
public PixelBuffer getPixelBuffer(Pixels pixels) { return new PixelBuffer(getPixelsPath(pixels.getId()),pixels); }
3,234,440
private void initPixelBuffer(PixelBuffer pixbuf) throws IOException { String path = Helper.getPixelsPath(pixbuf.getId()); byte[] padding = new byte[pixbuf.getPlaneSize() - NULL_PLANE_SIZE]; FileOutputStream stream = new FileOutputStream(path); for (int z = 0; z < pixbuf.getSizeZ(); z++) { for (int c = 0; c < pixbuf.getSizeC(); c++) { for (int t = 0; t < pixbuf.getSizeT(); t++) { stream.write(nullPlane); stream.write(padding); } } } }
private void initPixelBuffer(PixelBuffer pixbuf) throws IOException { String path = getPixelsPath(pixbuf.getId()); byte[] padding = new byte[pixbuf.getPlaneSize() - NULL_PLANE_SIZE]; FileOutputStream stream = new FileOutputStream(path); for (int z = 0; z < pixbuf.getSizeZ(); z++) { for (int c = 0; c < pixbuf.getSizeC(); c++) { for (int t = 0; t < pixbuf.getSizeT(); t++) { stream.write(nullPlane); stream.write(padding); } } } }
3,234,441
public static RubyClass createFixnumClass(Ruby ruby) { RubyClass fixnumClass = ruby.defineClass("Fixnum", ruby.getClasses().getIntegerClass()); fixnumClass.includeModule(ruby.getClasses().getPrecisionModule()); fixnumClass.defineSingletonMethod("induced_from", CallbackFactory.getSingletonMethod(RubyFixnum.class, "induced_from", RubyObject.class)); fixnumClass.defineMethod("to_f", CallbackFactory.getMethod(RubyFixnum.class, "to_f")); fixnumClass.defineMethod("to_s", CallbackFactory.getMethod(RubyFixnum.class, "to_s")); fixnumClass.defineMethod("to_str", CallbackFactory.getMethod(RubyFixnum.class, "to_s")); fixnumClass.defineMethod("hash", CallbackFactory.getMethod(RubyFixnum.class, "hash")); fixnumClass.defineMethod("taint", CallbackFactory.getSelfMethod()); fixnumClass.defineMethod("freeze", CallbackFactory.getSelfMethod()); fixnumClass.defineMethod("<<", CallbackFactory.getMethod(RubyFixnum.class, "op_lshift", RubyObject.class)); fixnumClass.defineMethod(">>", CallbackFactory.getMethod(RubyFixnum.class, "op_rshift", RubyObject.class)); fixnumClass.defineMethod("+", CallbackFactory.getMethod(RubyFixnum.class, "op_plus", RubyObject.class)); fixnumClass.defineMethod("-", CallbackFactory.getMethod(RubyFixnum.class, "op_minus", RubyObject.class)); fixnumClass.defineMethod("*", CallbackFactory.getMethod(RubyFixnum.class, "op_mul", RubyObject.class)); fixnumClass.defineMethod("/", CallbackFactory.getMethod(RubyFixnum.class, "op_div", RubyObject.class)); fixnumClass.defineMethod("%", CallbackFactory.getMethod(RubyFixnum.class, "op_mod", RubyObject.class)); fixnumClass.defineMethod("**", CallbackFactory.getMethod(RubyFixnum.class, "op_pow", RubyObject.class)); fixnumClass.defineMethod("==", CallbackFactory.getMethod(RubyFixnum.class, "op_equal", RubyObject.class)); fixnumClass.defineMethod("<=>", CallbackFactory.getMethod(RubyFixnum.class, "op_cmp", RubyObject.class)); fixnumClass.defineMethod(">", CallbackFactory.getMethod(RubyFixnum.class, "op_gt", RubyObject.class)); fixnumClass.defineMethod(">=", CallbackFactory.getMethod(RubyFixnum.class, "op_ge", RubyObject.class)); fixnumClass.defineMethod("<", CallbackFactory.getMethod(RubyFixnum.class, "op_lt", RubyObject.class)); fixnumClass.defineMethod("<=", CallbackFactory.getMethod(RubyFixnum.class, "op_le", RubyObject.class)); fixnumClass.defineMethod("size", CallbackFactory.getMethod(RubyFixnum.class, "size")); return fixnumClass; }
fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); publicfixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); staticfixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyClassfixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); createFixnumClass(RubyfixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); ruby)fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); {fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyClassfixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClassfixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); =fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); ruby.defineClass("Fixnum",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); ruby.getClasses().getIntegerClass());fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.includeModule(ruby.getClasses().getPrecisionModule());fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineSingletonMethod("induced_from",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getSingletonMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "induced_from",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyObject.class));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("to_f",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "to_f"));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("to_s",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "to_s"));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("to_str",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "to_s"));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("hash",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "hash"));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("taint",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getSelfMethod());fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("freeze",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getSelfMethod());fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("<<",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "op_lshift",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyObject.class));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod(">>",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "op_rshift",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyObject.class));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("+",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "op_plus",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyObject.class));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("-",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "op_minus",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyObject.class));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("*",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "op_mul",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyObject.class));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("/",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "op_div",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyObject.class));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("%",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "op_mod",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyObject.class));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("**",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "op_pow",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyObject.class));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("==",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "op_equal",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyObject.class));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("<=>",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "op_cmp",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyObject.class));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod(">",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "op_gt",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyObject.class));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod(">=",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "op_ge",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyObject.class));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("<",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "op_lt",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyObject.class));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("<=",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "op_le",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); RubyObject.class));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("size",fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); CallbackFactory.getMethod(RubyFixnum.class,fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); "size"));fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); returnfixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass;fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); }
3,234,442
public void propertyChange(PropertyChangeEvent pce) { String name = pce.getPropertyName(); if (name == null) return; if (name.equals(TreeViewer.CANCEL_LOADING_PROPERTY)) { Browser browser = model.getSelectedBrowser(); if (browser != null) browser.cancel(); } else if (name.equals(Browser.POPUP_MENU_PROPERTY)) { Component c = (Component) pce.getNewValue(); Browser browser = model.getSelectedBrowser(); if (browser != null && c != null) view.showPopup(c, browser.getClickPoint()); } else if (name.equals(Browser.CLOSE_PROPERTY)) { Browser browser = (Browser) pce.getNewValue(); if (browser != null) view.removeBrowser(browser); } else if (name.equals(Editor.CLOSE_EDITOR_PROPERTY)) { Browser b = model.getSelectedBrowser(); TreeImageDisplay d = null; if (b != null) d = b.getLastSelectedDisplay(); int editorType = model.getEditorType(); model.removeEditor(); model.onComponentStateChange(true); if (editorType == TreeViewer.CREATE_EDITOR) resetSelectedDisplay(d); } else if (name.equals(Classifier.CLOSE_CLASSIFIER_PROPERTY)) { Browser b = model.getSelectedBrowser(); if (b != null) resetSelectedDisplay(b.getLastSelectedDisplay()); model.onComponentStateChange(true); } else if (name.equals(TreeViewer.FINDER_VISIBLE_PROPERTY)) { Boolean b = (Boolean) pce.getNewValue(); if (!b.booleanValue()) { model.clearFoundResults(); model.onComponentStateChange(true); } } else if (name.equals(TreeViewer.SELECTED_BROWSER_PROPERTY)) { Browser b = model.getSelectedBrowser(); Iterator i = model.getBrowsers().values().iterator(); Browser browser; while (i.hasNext()) { browser = (Browser) i.next(); browser.setSelected(browser.equals(b)); } } else if (name.equals(TreeViewer.THUMBNAIL_LOADING_PROPERTY)) { model.retrieveThumbnail((ImageData) pce.getNewValue()); } else if (name.equals(Browser.SELECTED_DISPLAY_PROPERTY)) { Object oldValue = pce.getOldValue(); Object newValue = pce.getNewValue(); if (oldValue != null && newValue != null) { if (!(oldValue.getClass().equals(newValue.getClass()))) model.setEditorSelectedPane(Editor.PROPERTIES_INDEX); } model.onSelectedDisplay(); view.updateMenuItems(); } else if (name.equals(TreeViewer.HIERARCHY_ROOT_PROPERTY)) { Map browsers = model.getBrowsers(); Iterator i = browsers.values().iterator(); while (i.hasNext()) ((Browser) i.next()).refreshTree(); } else if (name.equals( AddExistingObjectsDialog.EXISTING_ADD_PROPERTY)) { model.addExistingObjects((Set) pce.getNewValue()); } else if (name.equals(EditorSaverDialog.SAVING_DATA_EDITOR_PROPERTY)) { boolean b = ((Boolean) pce.getNewValue()).booleanValue(); model.saveInEditor(b); } else if (name.equals(DataHandler.ANNOTATED_PROPERTY) || name.equals(DataHandler.CLASSIFIED_PROPERTY)) { if (view.getDataHandler() == null) return; view.discardDataHandler(); Map browsers = model.getBrowsers(); Iterator i = browsers.values().iterator(); while (i.hasNext()) ((Browser) i.next()).refreshTree(); } }
public void propertyChange(PropertyChangeEvent pce) { String name = pce.getPropertyName(); if (name == null) return; if (name.equals(TreeViewer.CANCEL_LOADING_PROPERTY)) { Browser browser = model.getSelectedBrowser(); if (browser != null) browser.cancel(); } else if (name.equals(Browser.POPUP_MENU_PROPERTY)) { Component c = (Component) pce.getNewValue(); Browser browser = model.getSelectedBrowser(); if (browser != null && c != null) view.showPopup(c, browser.getClickPoint()); } else if (name.equals(Browser.CLOSE_PROPERTY)) { Browser browser = (Browser) pce.getNewValue(); if (browser != null) view.removeBrowser(browser); } else if (name.equals(Editor.CLOSE_EDITOR_PROPERTY)) { Browser b = model.getSelectedBrowser(); TreeImageDisplay d = null; if (b != null) d = b.getLastSelectedDisplay(); int editorType = model.getEditorType(); model.removeEditor(); model.onComponentStateChange(true); if (editorType == TreeViewer.CREATE_EDITOR) resetSelectedDisplay(d); } else if (name.equals(Classifier.CLOSE_CLASSIFIER_PROPERTY)) { Browser b = model.getSelectedBrowser(); if (b != null) resetSelectedDisplay(b.getLastSelectedDisplay()); model.onComponentStateChange(true); } else if (name.equals(TreeViewer.FINDER_VISIBLE_PROPERTY)) { Boolean b = (Boolean) pce.getNewValue(); if (!b.booleanValue()) { model.clearFoundResults(); model.onComponentStateChange(true); } } else if (name.equals(TreeViewer.SELECTED_BROWSER_PROPERTY)) { Browser b = model.getSelectedBrowser(); Iterator i = model.getBrowsers().values().iterator(); Browser browser; while (i.hasNext()) { browser = (Browser) i.next(); browser.setSelected(browser.equals(b)); } } else if (name.equals(TreeViewer.THUMBNAIL_LOADING_PROPERTY)) { model.retrieveThumbnail((ImageData) pce.getNewValue()); } else if (name.equals(Browser.SELECTED_DISPLAY_PROPERTY)) { Object oldValue = pce.getOldValue(); Object newValue = pce.getNewValue(); if (oldValue != null && newValue != null) { if (!(oldValue.getClass().equals(newValue.getClass()))) model.setEditorSelectedPane(Editor.PROPERTIES_INDEX); } model.onSelectedDisplay(); view.updateMenuItems(); } else if (name.equals(TreeViewer.HIERARCHY_ROOT_PROPERTY)) { Map browsers = model.getBrowsers(); Iterator i = browsers.values().iterator(); while (i.hasNext()) ((Browser) i.next()).refreshTree(); } else if (name.equals( AddExistingObjectsDialog.EXISTING_ADD_PROPERTY)) { model.addExistingObjects((Set) pce.getNewValue()); } else if (name.equals(EditorSaverDialog.SAVING_DATA_EDITOR_PROPERTY)) { boolean b = ((Boolean) pce.getNewValue()).booleanValue(); model.saveInEditor(b); } else if (name.equals(DataHandler.ANNOTATED_PROPERTY) || name.equals(DataHandler.CLASSIFIED_PROPERTY)) { if (view.getDataHandler() == null) return; view.discardDataHandler(); Map browsers = model.getBrowsers(); Iterator i = browsers.values().iterator(); while (i.hasNext()) ((Browser) i.next()).refreshTree(); } }
3,234,443
public void loadScript(RubyString scriptName, RubyString source, boolean wrap) { loadScript(scriptName.getValue(), new StringReader(source.getValue()), wrap); }
public void loadScript(RubyString scriptName, RubyString source, boolean wrap) { loadScript(scriptName.toString(), new StringReader(source.toString()), wrap); }
3,234,444
public IRubyObject basename(IRubyObject[] args) { checkArgumentCount(args, 1, 2); String name = RubyString.stringValue(args[0]).getValue(); if (name.length() > 1 && name.charAt(name.length() - 1) == '/') { name = name.substring(0, name.length() - 1); } // Paths which end in "/" or "\\" must be stripped off. int slashCount = 0; int length = name.length(); for (int i = length - 1; i >= 0; i--) { char c = name.charAt(i); if (c != '/' && c != '\\') { break; } slashCount++; } if (slashCount > 0 && length > 1) { name = name.substring(0, name.length() - slashCount); } int index = name.lastIndexOf('/'); if (index == -1) { // XXX actually only on windows... index = name.lastIndexOf('\\'); } if (!name.equals("/") && index != -1) { name = name.substring(index + 1); } if (args.length == 2) { String ext = RubyString.stringValue(args[1]).getValue(); if (".*".equals(ext)) { index = name.lastIndexOf('.'); if (index != -1) { name = name.substring(0, index); } } else if (name.endsWith(ext)) { name = name.substring(0, name.length() - ext.length()); } } return getRuntime().newString(name).infectBy(args[0]); }
public IRubyObject basename(IRubyObject[] args) { checkArgumentCount(args, 1, 2); String name = RubyString.stringValue(args[0]).toString(); if (name.length() > 1 && name.charAt(name.length() - 1) == '/') { name = name.substring(0, name.length() - 1); } // Paths which end in "/" or "\\" must be stripped off. int slashCount = 0; int length = name.length(); for (int i = length - 1; i >= 0; i--) { char c = name.charAt(i); if (c != '/' && c != '\\') { break; } slashCount++; } if (slashCount > 0 && length > 1) { name = name.substring(0, name.length() - slashCount); } int index = name.lastIndexOf('/'); if (index == -1) { // XXX actually only on windows... index = name.lastIndexOf('\\'); } if (!name.equals("/") && index != -1) { name = name.substring(index + 1); } if (args.length == 2) { String ext = RubyString.stringValue(args[1]).getValue(); if (".*".equals(ext)) { index = name.lastIndexOf('.'); if (index != -1) { name = name.substring(0, index); } } else if (name.endsWith(ext)) { name = name.substring(0, name.length() - ext.length()); } } return getRuntime().newString(name).infectBy(args[0]); }
3,234,445
public IRubyObject basename(IRubyObject[] args) { checkArgumentCount(args, 1, 2); String name = RubyString.stringValue(args[0]).getValue(); if (name.length() > 1 && name.charAt(name.length() - 1) == '/') { name = name.substring(0, name.length() - 1); } // Paths which end in "/" or "\\" must be stripped off. int slashCount = 0; int length = name.length(); for (int i = length - 1; i >= 0; i--) { char c = name.charAt(i); if (c != '/' && c != '\\') { break; } slashCount++; } if (slashCount > 0 && length > 1) { name = name.substring(0, name.length() - slashCount); } int index = name.lastIndexOf('/'); if (index == -1) { // XXX actually only on windows... index = name.lastIndexOf('\\'); } if (!name.equals("/") && index != -1) { name = name.substring(index + 1); } if (args.length == 2) { String ext = RubyString.stringValue(args[1]).getValue(); if (".*".equals(ext)) { index = name.lastIndexOf('.'); if (index != -1) { name = name.substring(0, index); } } else if (name.endsWith(ext)) { name = name.substring(0, name.length() - ext.length()); } } return getRuntime().newString(name).infectBy(args[0]); }
public IRubyObject basename(IRubyObject[] args) { checkArgumentCount(args, 1, 2); String name = RubyString.stringValue(args[0]).getValue(); if (name.length() > 1 && name.charAt(name.length() - 1) == '/') { name = name.substring(0, name.length() - 1); } // Paths which end in "/" or "\\" must be stripped off. int slashCount = 0; int length = name.length(); for (int i = length - 1; i >= 0; i--) { char c = name.charAt(i); if (c != '/' && c != '\\') { break; } slashCount++; } if (slashCount > 0 && length > 1) { name = name.substring(0, name.length() - slashCount); } int index = name.lastIndexOf('/'); if (index == -1) { // XXX actually only on windows... index = name.lastIndexOf('\\'); } if (!name.equals("/") && index != -1) { name = name.substring(index + 1); } if (args.length == 2) { String ext = RubyString.stringValue(args[1]).getValue(); if (".*".equals(ext)) { index = name.lastIndexOf('.'); if (index != -1) { name = name.substring(0, index); } } else if (name.endsWith(ext)) { name = name.substring(0, name.length() - ext.length()); } } return getRuntime().newString(name).infectBy(args[0]); }
3,234,446
public IRubyObject expand_path(IRubyObject[] args) { checkArgumentCount(args, 1, 2); String relativePath = RubyString.stringValue(args[0]).getValue(); int pathLength = relativePath.length(); if (pathLength >= 1 && relativePath.charAt(0) == '~') { // Enebo : Should ~frogger\\foo work (it doesnt in linux ruby)? int userEnd = relativePath.indexOf('/'); if (userEnd == -1) { if (pathLength == 1) { // Single '~' as whole path to expand relativePath = RubyDir.getHomeDirectoryPath(this).getValue(); } else { // No directory delimeter. Rest of string is username userEnd = pathLength; } } if (userEnd == 1) { // '~/...' as path to expand relativePath = RubyDir.getHomeDirectoryPath(this).getValue() + relativePath.substring(1); } else if (userEnd > 1){ // '~user/...' as path to expand String user = relativePath.substring(1, userEnd); IRubyObject dir = RubyDir.getHomeDirectoryPath(this, user); if (dir.isNil()) { throw getRuntime().newArgumentError("user " + user + " does not exist"); } relativePath = "" + dir + (pathLength == userEnd ? "" : relativePath.substring(userEnd)); } } if (new NormalizedFile(relativePath).isAbsolute()) { return getRuntime().newString(relativePath); } String cwd = getRuntime().getCurrentDirectory(); if (args.length == 2 && !args[1].isNil()) { cwd = RubyString.stringValue(args[1]).getValue(); } // Something wrong we don't know the cwd... if (cwd == null) { return getRuntime().getNil(); } NormalizedFile path = new NormalizedFile(cwd, relativePath); String extractedPath; try { extractedPath = path.getCanonicalPath(); } catch (IOException e) { extractedPath = path.getAbsolutePath(); } return getRuntime().newString(extractedPath); }
public IRubyObject expand_path(IRubyObject[] args) { checkArgumentCount(args, 1, 2); String relativePath = RubyString.stringValue(args[0]).getValue(); int pathLength = relativePath.length(); if (pathLength >= 1 && relativePath.charAt(0) == '~') { // Enebo : Should ~frogger\\foo work (it doesnt in linux ruby)? int userEnd = relativePath.indexOf('/'); if (userEnd == -1) { if (pathLength == 1) { // Single '~' as whole path to expand relativePath = RubyDir.getHomeDirectoryPath(this).getValue(); } else { // No directory delimeter. Rest of string is username userEnd = pathLength; } } if (userEnd == 1) { // '~/...' as path to expand relativePath = RubyDir.getHomeDirectoryPath(this).getValue() + relativePath.substring(1); } else if (userEnd > 1){ // '~user/...' as path to expand String user = relativePath.substring(1, userEnd); IRubyObject dir = RubyDir.getHomeDirectoryPath(this, user); if (dir.isNil()) { throw getRuntime().newArgumentError("user " + user + " does not exist"); } relativePath = "" + dir + (pathLength == userEnd ? "" : relativePath.substring(userEnd)); } } if (new NormalizedFile(relativePath).isAbsolute()) { return getRuntime().newString(relativePath); } String cwd = getRuntime().getCurrentDirectory(); if (args.length == 2 && !args[1].isNil()) { cwd = RubyString.stringValue(args[1]).getValue(); } // Something wrong we don't know the cwd... if (cwd == null) { return getRuntime().getNil(); } NormalizedFile path = new NormalizedFile(cwd, relativePath); String extractedPath; try { extractedPath = path.getCanonicalPath(); } catch (IOException e) { extractedPath = path.getAbsolutePath(); } return getRuntime().newString(extractedPath); }
3,234,447
public IRubyObject expand_path(IRubyObject[] args) { checkArgumentCount(args, 1, 2); String relativePath = RubyString.stringValue(args[0]).getValue(); int pathLength = relativePath.length(); if (pathLength >= 1 && relativePath.charAt(0) == '~') { // Enebo : Should ~frogger\\foo work (it doesnt in linux ruby)? int userEnd = relativePath.indexOf('/'); if (userEnd == -1) { if (pathLength == 1) { // Single '~' as whole path to expand relativePath = RubyDir.getHomeDirectoryPath(this).getValue(); } else { // No directory delimeter. Rest of string is username userEnd = pathLength; } } if (userEnd == 1) { // '~/...' as path to expand relativePath = RubyDir.getHomeDirectoryPath(this).getValue() + relativePath.substring(1); } else if (userEnd > 1){ // '~user/...' as path to expand String user = relativePath.substring(1, userEnd); IRubyObject dir = RubyDir.getHomeDirectoryPath(this, user); if (dir.isNil()) { throw getRuntime().newArgumentError("user " + user + " does not exist"); } relativePath = "" + dir + (pathLength == userEnd ? "" : relativePath.substring(userEnd)); } } if (new NormalizedFile(relativePath).isAbsolute()) { return getRuntime().newString(relativePath); } String cwd = getRuntime().getCurrentDirectory(); if (args.length == 2 && !args[1].isNil()) { cwd = RubyString.stringValue(args[1]).getValue(); } // Something wrong we don't know the cwd... if (cwd == null) { return getRuntime().getNil(); } NormalizedFile path = new NormalizedFile(cwd, relativePath); String extractedPath; try { extractedPath = path.getCanonicalPath(); } catch (IOException e) { extractedPath = path.getAbsolutePath(); } return getRuntime().newString(extractedPath); }
public IRubyObject expand_path(IRubyObject[] args) { checkArgumentCount(args, 1, 2); String relativePath = RubyString.stringValue(args[0]).getValue(); int pathLength = relativePath.length(); if (pathLength >= 1 && relativePath.charAt(0) == '~') { // Enebo : Should ~frogger\\foo work (it doesnt in linux ruby)? int userEnd = relativePath.indexOf('/'); if (userEnd == -1) { if (pathLength == 1) { // Single '~' as whole path to expand relativePath = RubyDir.getHomeDirectoryPath(this).getValue(); } else { // No directory delimeter. Rest of string is username userEnd = pathLength; } } if (userEnd == 1) { // '~/...' as path to expand relativePath = RubyDir.getHomeDirectoryPath(this).getValue() + relativePath.substring(1); } else if (userEnd > 1){ // '~user/...' as path to expand String user = relativePath.substring(1, userEnd); IRubyObject dir = RubyDir.getHomeDirectoryPath(this, user); if (dir.isNil()) { throw getRuntime().newArgumentError("user " + user + " does not exist"); } relativePath = "" + dir + (pathLength == userEnd ? "" : relativePath.substring(userEnd)); } } if (new NormalizedFile(relativePath).isAbsolute()) { return getRuntime().newString(relativePath); } String cwd = getRuntime().getCurrentDirectory(); if (args.length == 2 && !args[1].isNil()) { cwd = RubyString.stringValue(args[1]).getValue(); } // Something wrong we don't know the cwd... if (cwd == null) { return getRuntime().getNil(); } NormalizedFile path = new NormalizedFile(cwd, relativePath); String extractedPath; try { extractedPath = path.getCanonicalPath(); } catch (IOException e) { extractedPath = path.getAbsolutePath(); } return getRuntime().newString(extractedPath); }
3,234,448
public IRubyObject expand_path(IRubyObject[] args) { checkArgumentCount(args, 1, 2); String relativePath = RubyString.stringValue(args[0]).getValue(); int pathLength = relativePath.length(); if (pathLength >= 1 && relativePath.charAt(0) == '~') { // Enebo : Should ~frogger\\foo work (it doesnt in linux ruby)? int userEnd = relativePath.indexOf('/'); if (userEnd == -1) { if (pathLength == 1) { // Single '~' as whole path to expand relativePath = RubyDir.getHomeDirectoryPath(this).getValue(); } else { // No directory delimeter. Rest of string is username userEnd = pathLength; } } if (userEnd == 1) { // '~/...' as path to expand relativePath = RubyDir.getHomeDirectoryPath(this).getValue() + relativePath.substring(1); } else if (userEnd > 1){ // '~user/...' as path to expand String user = relativePath.substring(1, userEnd); IRubyObject dir = RubyDir.getHomeDirectoryPath(this, user); if (dir.isNil()) { throw getRuntime().newArgumentError("user " + user + " does not exist"); } relativePath = "" + dir + (pathLength == userEnd ? "" : relativePath.substring(userEnd)); } } if (new NormalizedFile(relativePath).isAbsolute()) { return getRuntime().newString(relativePath); } String cwd = getRuntime().getCurrentDirectory(); if (args.length == 2 && !args[1].isNil()) { cwd = RubyString.stringValue(args[1]).getValue(); } // Something wrong we don't know the cwd... if (cwd == null) { return getRuntime().getNil(); } NormalizedFile path = new NormalizedFile(cwd, relativePath); String extractedPath; try { extractedPath = path.getCanonicalPath(); } catch (IOException e) { extractedPath = path.getAbsolutePath(); } return getRuntime().newString(extractedPath); }
public IRubyObject expand_path(IRubyObject[] args) { checkArgumentCount(args, 1, 2); String relativePath = RubyString.stringValue(args[0]).getValue(); int pathLength = relativePath.length(); if (pathLength >= 1 && relativePath.charAt(0) == '~') { // Enebo : Should ~frogger\\foo work (it doesnt in linux ruby)? int userEnd = relativePath.indexOf('/'); if (userEnd == -1) { if (pathLength == 1) { // Single '~' as whole path to expand relativePath = RubyDir.getHomeDirectoryPath(this).getValue(); } else { // No directory delimeter. Rest of string is username userEnd = pathLength; } } if (userEnd == 1) { // '~/...' as path to expand relativePath = RubyDir.getHomeDirectoryPath(this).toString() + relativePath.substring(1); } else if (userEnd > 1){ // '~user/...' as path to expand String user = relativePath.substring(1, userEnd); IRubyObject dir = RubyDir.getHomeDirectoryPath(this, user); if (dir.isNil()) { throw getRuntime().newArgumentError("user " + user + " does not exist"); } relativePath = "" + dir + (pathLength == userEnd ? "" : relativePath.substring(userEnd)); } } if (new NormalizedFile(relativePath).isAbsolute()) { return getRuntime().newString(relativePath); } String cwd = getRuntime().getCurrentDirectory(); if (args.length == 2 && !args[1].isNil()) { cwd = RubyString.stringValue(args[1]).getValue(); } // Something wrong we don't know the cwd... if (cwd == null) { return getRuntime().getNil(); } NormalizedFile path = new NormalizedFile(cwd, relativePath); String extractedPath; try { extractedPath = path.getCanonicalPath(); } catch (IOException e) { extractedPath = path.getAbsolutePath(); } return getRuntime().newString(extractedPath); }
3,234,449
public IRubyObject expand_path(IRubyObject[] args) { checkArgumentCount(args, 1, 2); String relativePath = RubyString.stringValue(args[0]).getValue(); int pathLength = relativePath.length(); if (pathLength >= 1 && relativePath.charAt(0) == '~') { // Enebo : Should ~frogger\\foo work (it doesnt in linux ruby)? int userEnd = relativePath.indexOf('/'); if (userEnd == -1) { if (pathLength == 1) { // Single '~' as whole path to expand relativePath = RubyDir.getHomeDirectoryPath(this).getValue(); } else { // No directory delimeter. Rest of string is username userEnd = pathLength; } } if (userEnd == 1) { // '~/...' as path to expand relativePath = RubyDir.getHomeDirectoryPath(this).getValue() + relativePath.substring(1); } else if (userEnd > 1){ // '~user/...' as path to expand String user = relativePath.substring(1, userEnd); IRubyObject dir = RubyDir.getHomeDirectoryPath(this, user); if (dir.isNil()) { throw getRuntime().newArgumentError("user " + user + " does not exist"); } relativePath = "" + dir + (pathLength == userEnd ? "" : relativePath.substring(userEnd)); } } if (new NormalizedFile(relativePath).isAbsolute()) { return getRuntime().newString(relativePath); } String cwd = getRuntime().getCurrentDirectory(); if (args.length == 2 && !args[1].isNil()) { cwd = RubyString.stringValue(args[1]).getValue(); } // Something wrong we don't know the cwd... if (cwd == null) { return getRuntime().getNil(); } NormalizedFile path = new NormalizedFile(cwd, relativePath); String extractedPath; try { extractedPath = path.getCanonicalPath(); } catch (IOException e) { extractedPath = path.getAbsolutePath(); } return getRuntime().newString(extractedPath); }
public IRubyObject expand_path(IRubyObject[] args) { checkArgumentCount(args, 1, 2); String relativePath = RubyString.stringValue(args[0]).getValue(); int pathLength = relativePath.length(); if (pathLength >= 1 && relativePath.charAt(0) == '~') { // Enebo : Should ~frogger\\foo work (it doesnt in linux ruby)? int userEnd = relativePath.indexOf('/'); if (userEnd == -1) { if (pathLength == 1) { // Single '~' as whole path to expand relativePath = RubyDir.getHomeDirectoryPath(this).getValue(); } else { // No directory delimeter. Rest of string is username userEnd = pathLength; } } if (userEnd == 1) { // '~/...' as path to expand relativePath = RubyDir.getHomeDirectoryPath(this).getValue() + relativePath.substring(1); } else if (userEnd > 1){ // '~user/...' as path to expand String user = relativePath.substring(1, userEnd); IRubyObject dir = RubyDir.getHomeDirectoryPath(this, user); if (dir.isNil()) { throw getRuntime().newArgumentError("user " + user + " does not exist"); } relativePath = "" + dir + (pathLength == userEnd ? "" : relativePath.substring(userEnd)); } } if (new NormalizedFile(relativePath).isAbsolute()) { return getRuntime().newString(relativePath); } String cwd = getRuntime().getCurrentDirectory(); if (args.length == 2 && !args[1].isNil()) { cwd = RubyString.stringValue(args[1]).toString(); } // Something wrong we don't know the cwd... if (cwd == null) { return getRuntime().getNil(); } NormalizedFile path = new NormalizedFile(cwd, relativePath); String extractedPath; try { extractedPath = path.getCanonicalPath(); } catch (IOException e) { extractedPath = path.getAbsolutePath(); } return getRuntime().newString(extractedPath); }
3,234,450
private IOModes getModes(IRubyObject object) { if (object instanceof RubyString) { return new IOModes(getRuntime(), ((RubyString)object).getValue()); } else if (object instanceof RubyFixnum) { return new IOModes(getRuntime(), ((RubyFixnum)object).getLongValue()); } throw getRuntime().newTypeError("Invalid type for modes"); }
private IOModes getModes(IRubyObject object) { if (object instanceof RubyString) { return new IOModes(getRuntime(), ((RubyString)object).getValue()); } else if (object instanceof RubyFixnum) { return new IOModes(getRuntime(), ((RubyFixnum)object).getLongValue()); } throw getRuntime().newTypeError("Invalid type for modes"); }
3,234,451
public RubyString join(IRubyObject[] args) { RubyArray argArray = getRuntime().newArray(args); RubyString str = argArray.join(RubyString.newString(getRuntime(), "/")); // create ruby string, cleaning out double dir separators RubyString fixedStr = RubyString.newString(getRuntime(), MULTIPLE_DIR_SEPS.matcher(str.getValue()).replaceAll("/")); fixedStr.setTaint(str.isTaint()); return fixedStr; }
public RubyString join(IRubyObject[] args) { RubyArray argArray = getRuntime().newArray(args); RubyString str = argArray.join(RubyString.newString(getRuntime(), "/")); // create ruby string, cleaning out double dir separators RubyString fixedStr = RubyString.newString(getRuntime(), MULTIPLE_DIR_SEPS.matcher(str.toString()).replaceAll("/")); fixedStr.setTaint(str.isTaint()); return fixedStr; }
3,234,452
public IRubyObject lstat(IRubyObject filename) { RubyString name = RubyString.stringValue(filename); return getRuntime().newRubyFileStat(new NormalizedFile(name.getValue())); }
public IRubyObject lstat(IRubyObject filename) { RubyString name = RubyString.stringValue(filename); return getRuntime().newRubyFileStat(new NormalizedFile(name.toString())); }
3,234,453
public IRubyObject mtime(IRubyObject filename) { RubyString name = RubyString.stringValue(filename); return getRuntime().newFixnum(new NormalizedFile(name.getValue()).lastModified()); }
public IRubyObject mtime(IRubyObject filename) { RubyString name = RubyString.stringValue(filename); return getRuntime().newFixnum(new NormalizedFile(name.toString()).lastModified()); }
3,234,454
public IRubyObject rename(IRubyObject oldName, IRubyObject newName) { RubyString oldNameString = RubyString.stringValue(oldName); RubyString newNameString = RubyString.stringValue(newName); oldNameString.checkSafeString(); newNameString.checkSafeString(); NormalizedFile oldFile = new NormalizedFile(oldNameString.getValue()); if (!oldFile.exists()) { throw getRuntime().newErrnoENOENTError("No such file: " + oldNameString.getValue()); } oldFile.renameTo(new NormalizedFile(newNameString.getValue())); return RubyFixnum.zero(getRuntime()); }
public IRubyObject rename(IRubyObject oldName, IRubyObject newName) { RubyString oldNameString = RubyString.stringValue(oldName); RubyString newNameString = RubyString.stringValue(newName); oldNameString.checkSafeString(); newNameString.checkSafeString(); NormalizedFile oldFile = new NormalizedFile(oldNameString.toString()); if (!oldFile.exists()) { throw getRuntime().newErrnoENOENTError("No such file: " + oldNameString.getValue()); } oldFile.renameTo(new NormalizedFile(newNameString.getValue())); return RubyFixnum.zero(getRuntime()); }
3,234,455
public IRubyObject rename(IRubyObject oldName, IRubyObject newName) { RubyString oldNameString = RubyString.stringValue(oldName); RubyString newNameString = RubyString.stringValue(newName); oldNameString.checkSafeString(); newNameString.checkSafeString(); NormalizedFile oldFile = new NormalizedFile(oldNameString.getValue()); if (!oldFile.exists()) { throw getRuntime().newErrnoENOENTError("No such file: " + oldNameString.getValue()); } oldFile.renameTo(new NormalizedFile(newNameString.getValue())); return RubyFixnum.zero(getRuntime()); }
public IRubyObject rename(IRubyObject oldName, IRubyObject newName) { RubyString oldNameString = RubyString.stringValue(oldName); RubyString newNameString = RubyString.stringValue(newName); oldNameString.checkSafeString(); newNameString.checkSafeString(); NormalizedFile oldFile = new NormalizedFile(oldNameString.getValue()); if (!oldFile.exists()) { throw getRuntime().newErrnoENOENTError("No such file: " + oldNameString); } oldFile.renameTo(new NormalizedFile(newNameString.getValue())); return RubyFixnum.zero(getRuntime()); }
3,234,456
public IRubyObject rename(IRubyObject oldName, IRubyObject newName) { RubyString oldNameString = RubyString.stringValue(oldName); RubyString newNameString = RubyString.stringValue(newName); oldNameString.checkSafeString(); newNameString.checkSafeString(); NormalizedFile oldFile = new NormalizedFile(oldNameString.getValue()); if (!oldFile.exists()) { throw getRuntime().newErrnoENOENTError("No such file: " + oldNameString.getValue()); } oldFile.renameTo(new NormalizedFile(newNameString.getValue())); return RubyFixnum.zero(getRuntime()); }
public IRubyObject rename(IRubyObject oldName, IRubyObject newName) { RubyString oldNameString = RubyString.stringValue(oldName); RubyString newNameString = RubyString.stringValue(newName); oldNameString.checkSafeString(); newNameString.checkSafeString(); NormalizedFile oldFile = new NormalizedFile(oldNameString.getValue()); if (!oldFile.exists()) { throw getRuntime().newErrnoENOENTError("No such file: " + oldNameString.getValue()); } oldFile.renameTo(new NormalizedFile(newNameString.toString())); return RubyFixnum.zero(getRuntime()); }
3,234,457
public IRubyObject unlink(IRubyObject[] args) { for (int i = 0; i < args.length; i++) { RubyString filename = RubyString.stringValue(args[i]); filename.checkSafeString(); NormalizedFile lToDelete = new NormalizedFile(filename.getValue()); if (!lToDelete.exists()) { throw getRuntime().newErrnoENOENTError(" No such file or directory - \"" + filename.getValue() + "\""); } if (!lToDelete.delete()) { return getRuntime().getFalse(); } } return getRuntime().newFixnum(args.length); }
public IRubyObject unlink(IRubyObject[] args) { for (int i = 0; i < args.length; i++) { RubyString filename = RubyString.stringValue(args[i]); filename.checkSafeString(); NormalizedFile lToDelete = new NormalizedFile(filename.toString()); if (!lToDelete.exists()) { throw getRuntime().newErrnoENOENTError(" No such file or directory - \"" + filename.getValue() + "\""); } if (!lToDelete.delete()) { return getRuntime().getFalse(); } } return getRuntime().newFixnum(args.length); }
3,234,458
public IRubyObject unlink(IRubyObject[] args) { for (int i = 0; i < args.length; i++) { RubyString filename = RubyString.stringValue(args[i]); filename.checkSafeString(); NormalizedFile lToDelete = new NormalizedFile(filename.getValue()); if (!lToDelete.exists()) { throw getRuntime().newErrnoENOENTError(" No such file or directory - \"" + filename.getValue() + "\""); } if (!lToDelete.delete()) { return getRuntime().getFalse(); } } return getRuntime().newFixnum(args.length); }
public IRubyObject unlink(IRubyObject[] args) { for (int i = 0; i < args.length; i++) { RubyString filename = RubyString.stringValue(args[i]); filename.checkSafeString(); NormalizedFile lToDelete = new NormalizedFile(filename.getValue()); if (!lToDelete.exists()) { throw getRuntime().newErrnoENOENTError(" No such file or directory - \"" + filename.getValue() + "\""); } if (!lToDelete.delete()) { return getRuntime().getFalse(); } } return getRuntime().newFixnum(args.length); }
3,234,459
public IRubyObject utime(IRubyObject[] args) { checkArgumentCount(args, 2, -1); // Ignore access_time argument since Java does not support it. long mtime; if (args[1] instanceof RubyTime) { mtime = ((RubyTime) args[1]).getJavaDate().getTime(); } else if (args[1] instanceof RubyNumeric) { mtime = RubyNumeric.num2long(args[1]); } else { mtime = 0; } for (int i = 2, j = args.length; i < j; i++) { RubyString filename = RubyString.stringValue(args[i]); filename.checkSafeString(); NormalizedFile fileToTouch = new NormalizedFile(filename.getValue()); if (!fileToTouch.exists()) { throw getRuntime().newErrnoENOENTError(" No such file or directory - \"" + filename.getValue() + "\""); } fileToTouch.setLastModified(mtime); } return getRuntime().newFixnum(args.length - 2); }
public IRubyObject utime(IRubyObject[] args) { checkArgumentCount(args, 2, -1); // Ignore access_time argument since Java does not support it. long mtime; if (args[1] instanceof RubyTime) { mtime = ((RubyTime) args[1]).getJavaDate().getTime(); } else if (args[1] instanceof RubyNumeric) { mtime = RubyNumeric.num2long(args[1]); } else { mtime = 0; } for (int i = 2, j = args.length; i < j; i++) { RubyString filename = RubyString.stringValue(args[i]); filename.checkSafeString(); NormalizedFile fileToTouch = new NormalizedFile(filename.toString()); if (!fileToTouch.exists()) { throw getRuntime().newErrnoENOENTError(" No such file or directory - \"" + filename.getValue() + "\""); } fileToTouch.setLastModified(mtime); } return getRuntime().newFixnum(args.length - 2); }
3,234,460
public IRubyObject utime(IRubyObject[] args) { checkArgumentCount(args, 2, -1); // Ignore access_time argument since Java does not support it. long mtime; if (args[1] instanceof RubyTime) { mtime = ((RubyTime) args[1]).getJavaDate().getTime(); } else if (args[1] instanceof RubyNumeric) { mtime = RubyNumeric.num2long(args[1]); } else { mtime = 0; } for (int i = 2, j = args.length; i < j; i++) { RubyString filename = RubyString.stringValue(args[i]); filename.checkSafeString(); NormalizedFile fileToTouch = new NormalizedFile(filename.getValue()); if (!fileToTouch.exists()) { throw getRuntime().newErrnoENOENTError(" No such file or directory - \"" + filename.getValue() + "\""); } fileToTouch.setLastModified(mtime); } return getRuntime().newFixnum(args.length - 2); }
public IRubyObject utime(IRubyObject[] args) { checkArgumentCount(args, 2, -1); // Ignore access_time argument since Java does not support it. long mtime; if (args[1] instanceof RubyTime) { mtime = ((RubyTime) args[1]).getJavaDate().getTime(); } else if (args[1] instanceof RubyNumeric) { mtime = RubyNumeric.num2long(args[1]); } else { mtime = 0; } for (int i = 2, j = args.length; i < j; i++) { RubyString filename = RubyString.stringValue(args[i]); filename.checkSafeString(); NormalizedFile fileToTouch = new NormalizedFile(filename.getValue()); if (!fileToTouch.exists()) { throw getRuntime().newErrnoENOENTError(" No such file or directory - \"" + filename + "\""); } fileToTouch.setLastModified(mtime); } return getRuntime().newFixnum(args.length - 2); }
3,234,461
public static RubyString getHomeDirectoryPath(IRubyObject recv) { RubyHash hash = (RubyHash) recv.getRuntime().getObject().getConstant("ENV"); IRubyObject home = hash.aref(recv.getRuntime().newString("HOME")); if (home == null || home.isNil()) { home = hash.aref(recv.getRuntime().newString("LOGDIR")); } if (home == null || home.isNil()) { throw recv.getRuntime().newArgumentError("HOME/LOGDIR not set"); } return (RubyString) home; }
public static RubyString getHomeDirectoryPath(IRubyObject recv) { RubyHash hash = (RubyHash) recv.getRuntime().getObject().getConstant("ENV"); IRubyObject home = hash.aref(recv.getRuntime().newString("HOME")); if (home == null || home.isNil()) { home = hash.aref(recv.getRuntime().newString("LOGDIR")); } if (home == null || home.isNil()) { throw recv.getRuntime().newArgumentError("HOME/LOGDIR not set"); } return (RubyString) home; }
3,234,462
public static IRubyObject raise(IRubyObject recv, IRubyObject[] args) { // FIXME special case in ruby // recv.checkArgumentCount(args, 0, 2); Ruby runtime = recv.getRuntime(); switch (args.length) { case 0 : IRubyObject defaultException = runtime.getGlobalVariables().get("$!"); if (defaultException.isNil()) { throw new RaiseException(runtime, runtime.getExceptions().getRuntimeError(), "", false); } throw new RaiseException((RubyException) defaultException); case 1 : if (args[0] instanceof RubyException) { throw new RaiseException((RubyException) args[0]); } throw new RaiseException(RubyException.newInstance(runtime.getExceptions().getRuntimeError(), args)); case 2 : if (args[0] == runtime.getClasses().getExceptionClass()) { throw new RaiseException((RubyException) args[0].callMethod("exception", args[1])); } RubyString string = (RubyString) args[1]; RubyException excptn = RubyException.newException(runtime, (RubyClass)args[0], string.getValue()); throw new RaiseException(excptn); default : throw new ArgumentError(runtime, "wrong number of arguments"); } }
public static IRubyObject raise(IRubyObject recv, IRubyObject[] args) { // FIXME special case in ruby // recv.checkArgumentCount(args, 0, 2); Ruby runtime = recv.getRuntime(); switch (args.length) { case 0 : IRubyObject defaultException = runtime.getGlobalVariables().get("$!"); if (defaultException.isNil()) { throw new RaiseException(runtime, runtime.getExceptions().getRuntimeError(), "", false); } throw new RaiseException((RubyException) defaultException); case 1 : if (args[0] instanceof RubyException) { throw new RaiseException((RubyException) args[0]); } throw new RaiseException(RubyException.newInstance(runtime.getExceptions().getRuntimeError(), args)); case 2 : if (args[0] == runtime.getClasses().getExceptionClass()) { throw new RaiseException((RubyException) args[0].callMethod("exception", args[1])); } RubyString string = (RubyString) args[1]; RubyException excptn = RubyException.newException(runtime, (RubyClass)args[0], string.getValue()); throw new RaiseException(excptn); default : throw new ArgumentError(runtime, "wrong number of arguments"); } }
3,234,463
public void updateDataModel(Integer start, Integer rows) { if (_dataModel == null) { _dataModel = new WFDataModel(); } try { ArticleItemBean[] articleItemBean = (ArticleItemBean[]) ArticleListBean.loadAllArticlesInFolder(new File("/Test/article/")).toArray(new ArticleItemBean[0]); int availableRows = articleItemBean.length; int nrOfRows = rows.intValue(); if (nrOfRows == 0) { nrOfRows = availableRows; } int maxRow = Math.min(start.intValue() + nrOfRows,availableRows); for (int i = start.intValue(); i < maxRow; i++) {// ListArticlesBean bean = new ListArticlesBean(String.valueOf(i), testHeadlines[i], testPublished[i]); //TODO we don't have published in the article item bean ListArticlesBean bean = new ListArticlesBean(articleItemBean[i].getHeadline(), articleItemBean[i].getHeadline(), "");// ArticleListBean a = new ArticleListBean(String.valueOf(i), articleItemBean[i].getHeadline(), articleItemBean[i].getItemType(), articleItemBean[i].getAuthor(), articleItemBean[i].getStatus()); _dataModel.set(bean, i); } _dataModel.setRowCount(availableRows); } catch (XmlException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
public void updateDataModel(Integer start, Integer rows) { if (_dataModel == null) { _dataModel = new WFDataModel(); } try { ArticleItemBean[] articleItemBean = (ArticleItemBean[]) ArticleListBean.loadAllArticlesInFolder(new File("/Test/article/")).toArray(new ArticleItemBean[0]); int availableRows = articleItemBean.length; int nrOfRows = rows.intValue(); if (nrOfRows == 0) { nrOfRows = availableRows; } int maxRow = Math.min(start.intValue() + nrOfRows,availableRows); for (int i = start.intValue(); i < maxRow; i++) {// ListArticlesBean bean = new ListArticlesBean(String.valueOf(i), testHeadlines[i], testPublished[i]); //TODO we don't have published in the article item bean ListArticlesBean bean = new ListArticlesBean(articleItemBean[i].getHeadline(), articleItemBean[i].getHeadline(), "");// ArticleListBean a = new ArticleListBean(String.valueOf(i), articleItemBean[i].getHeadline(), articleItemBean[i].getItemType(), articleItemBean[i].getAuthor(), articleItemBean[i].getStatus()); _dataModel.set(bean, i); } _dataModel.setRowCount(availableRows); } catch (XmlException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
3,234,465
private void bookmarkRoom(String serviceName, Tree serviceTree) { int selectedRow = roomsTable.getSelectedRow(); if (-1 == selectedRow) { JOptionPane.showMessageDialog(dlg, Res.getString("message.select.add.room.to.add"), Res.getString("title.group.chat"), JOptionPane.INFORMATION_MESSAGE); return; } final String roomJID = (String)roomsTable.getValueAt(selectedRow, 2) + "@" + serviceName; final String roomName = (String)roomsTable.getValueAt(selectedRow, 1); // Check to see what type of room this is. try { final RoomInfo roomInfo = MultiUserChat.getRoomInfo(SparkManager.getConnection(), roomJID); if (!roomInfo.isPersistent()) { JOptionPane.showMessageDialog(dlg, Res.getString("message.bookmark.temporary.room.error"), Res.getString("title.error"), JOptionPane.ERROR_MESSAGE); return; } } catch (XMPPException e) { return; } JiveTreeNode rootNode = (JiveTreeNode)serviceTree.getModel().getRoot(); TreePath rootPath = serviceTree.findByName(serviceTree, new String[]{rootNode.toString(), serviceName}); boolean isBookmarked = isBookmarked(roomJID); if (!isBookmarked) { JiveTreeNode node = (JiveTreeNode)serviceTree.getLastSelectedPathComponent(); if (node == null) { TreePath path = serviceTree.findByName(serviceTree, new String[]{rootNode.toString(), Conferences.getDefaultServiceName()}); node = (JiveTreeNode)path.getLastPathComponent(); } JiveTreeNode roomNode = new JiveTreeNode(roomName, false, SparkRes.getImageIcon(SparkRes.BOOKMARK_ICON)); roomNode.setAssociatedObject(roomJID); node.add(roomNode); final DefaultTreeModel model = (DefaultTreeModel)serviceTree.getModel(); model.nodeStructureChanged(node); serviceTree.expandPath(rootPath); roomsTable.setValueAt(new JLabel(SparkRes.getImageIcon(SparkRes.BOOKMARK_ICON)), selectedRow, 0); addBookmarkUI(false); } else { // Remove bookmark TreePath path = serviceTree.findByName(serviceTree, new String[]{rootNode.toString(), serviceName, roomName}); JiveTreeNode node = (JiveTreeNode)path.getLastPathComponent(); final DefaultTreeModel model = (DefaultTreeModel)serviceTree.getModel(); model.removeNodeFromParent(node); roomsTable.setValueAt(new JLabel(SparkRes.getImageIcon(SparkRes.BLANK_IMAGE)), selectedRow, 0); addBookmarkUI(true); } }
private void bookmarkRoom(String serviceName, Tree serviceTree) { int selectedRow = roomsTable.getSelectedRow(); if (-1 == selectedRow) { JOptionPane.showMessageDialog(dlg, Res.getString("message.select.add.room.to.add"), Res.getString("title.group.chat"), JOptionPane.INFORMATION_MESSAGE); return; } final String roomJID = (String)roomsTable.getValueAt(selectedRow, 2) + "@" + serviceName; final String roomName = (String)roomsTable.getValueAt(selectedRow, 1); // Check to see what type of room this is. try { final RoomInfo roomInfo = MultiUserChat.getRoomInfo(SparkManager.getConnection(), roomJID); if (!roomInfo.isPersistent()) { JOptionPane.showMessageDialog(dlg, Res.getString("message.bookmark.temporary.room.error"), Res.getString("title.error"), JOptionPane.ERROR_MESSAGE); return; } } catch (XMPPException e) { return; } JiveTreeNode rootNode = (JiveTreeNode)serviceTree.getModel().getRoot(); TreePath rootPath = serviceTree.findByName(serviceTree, new String[]{rootNode.toString(), serviceName}); boolean isBookmarked = isBookmarked(roomJID); if (!isBookmarked) { JiveTreeNode node = (JiveTreeNode)serviceTree.getLastSelectedPathComponent(); if (node == null) { TreePath path = serviceTree.findByName(serviceTree, new String[]{rootNode.toString(), Conferences.getDefaultServiceName()}); node = (JiveTreeNode)path.getLastPathComponent(); } JiveTreeNode roomNode = new JiveTreeNode(roomName, false, SparkRes.getImageIcon(SparkRes.BOOKMARK_ICON)); roomNode.setAssociatedObject(roomJID); node.add(roomNode); final DefaultTreeModel model = (DefaultTreeModel)serviceTree.getModel(); model.nodeStructureChanged(node); serviceTree.expandPath(rootPath); roomsTable.setValueAt(new JLabel(SparkRes.getImageIcon(SparkRes.BOOKMARK_ICON)), selectedRow, 0); addBookmarkUI(false); } else { // Remove bookmark TreePath path = serviceTree.findByName(serviceTree, new String[]{rootNode.toString(), serviceName, roomName}); JiveTreeNode node = (JiveTreeNode)path.getLastPathComponent(); final DefaultTreeModel model = (DefaultTreeModel)serviceTree.getModel(); model.removeNodeFromParent(node); roomsTable.setValueAt(new JLabel(SparkRes.getImageIcon(SparkRes.BLANK_IMAGE)), selectedRow, 0); addBookmarkUI(true); } }
3,234,466
public Project(Integer projectId, String view, String name, String description, org.openmicroscopy.omero.model.Group group, org.openmicroscopy.omero.model.Experimenter experimenter, Set datasets) { this.projectId = projectId; this.view = view; this.name = name; this.description = description; this.group = group; this.experimenter = experimenter; this.datasets = datasets; }
public Project(Integer projectId, String view, String name, String description, org.openmicroscopy.omero.model.Group group, org.openmicroscopy.omero.model.Experimenter experimenter, Set datasets) { this.projectId = projectId; this.view = view; this.name = name; this.description = description; this.group = group; this.experimenter = experimenter; this.datasets = datasets; }
3,234,467
public org.openmicroscopy.omero.model.Experimenter getExperimenter() { return this.experimenter; }
public Experimenter getExperimenter() { return this.experimenter; }
3,234,468
public org.openmicroscopy.omero.model.Group getGroup() { return this.group; }
public Group getGroup() { return this.group; }
3,234,469
public void setExperimenter(org.openmicroscopy.omero.model.Experimenter experimenter) { this.experimenter = experimenter; }
public void setExperimenter(Experimenter experimenter) { this.experimenter = experimenter; }
3,234,470
public void setGroup(org.openmicroscopy.omero.model.Group group) { this.group = group; }
public void setGroup(Group group) { this.group = group; }
3,234,471
public void respondMouseClick(PInputEvent event) { Point2D pos = event.getPositionRelativeTo(this); if(prevImageShape != null) { if(prevImageShape.contains(pos)) { parentThumbnail.showPreviousImage(); setImage(thumbnailImages[parentThumbnail.getMultipleImageIndex()]); setBounds(border); repaint(); return; } } if(nextImageShape != null) { if(nextImageShape.contains(pos)) { parentThumbnail.showNextImage(); setImage(thumbnailImages[parentThumbnail.getMultipleImageIndex()]); setBounds(border); repaint(); return; } } if(openIconShape != null) { if(openIconShape.contains(pos)) { BrowserEnvironment env = BrowserEnvironment.getInstance(); BrowserAgent agent = env.getBrowserAgent(); agent.loadImage(parentThumbnail); return; } } if(closeIconShape != null) { if(closeIconShape.contains(pos)) { getParent().removeChild(this); } } if(annotateIconShape != null) { if(annotateIconShape.contains(pos)) { PiccoloAction action = PiccoloActionFactory.getAnnotateImageAction(parentThumbnail, absoluteLocation); System.err.println(absoluteLocation); action.execute(); } } }
public void respondMouseClick(PInputEvent event) { Point2D pos = event.getPositionRelativeTo(this); if(prevImageShape != null) { if(prevImageShape.contains(pos)) { parentThumbnail.showPreviousImage(); setImage(thumbnailImages[parentThumbnail.getMultipleImageIndex()]); setBounds(border); repaint(); return; } } if(nextImageShape != null) { if(nextImageShape.contains(pos)) { parentThumbnail.showNextImage(); setImage(thumbnailImages[parentThumbnail.getMultipleImageIndex()]); setBounds(border); repaint(); return; } } if(openIconShape != null) { if(openIconShape.contains(pos)) { BrowserEnvironment env = BrowserEnvironment.getInstance(); BrowserAgent agent = env.getBrowserAgent(); agent.loadImage(parentThumbnail); return; } } if(closeIconShape != null) { if(closeIconShape.contains(pos)) { getParent().removeChild(this); } } if(annotateIconShape != null) { if(annotateIconShape.contains(pos)) { PiccoloAction action = PiccoloActionFactory.getAnnotateImageAction(parentThumbnail, absoluteLocation); action.execute(); } } }
3,234,472
protected int argCount(RubyObject[] args, int min, int max) { int len = args.length; if (len < min || (max > -1 && len > max)) { String msg = "Wrong number of arguments for method '" + ruby.getRubyFrame().getLastFunc() + "' in class " + getRubyClass().toName() + ". " + args.length + " is not in Range " + min + ".." + max; throw new RubyArgumentException(getRuby(), msg); } return len; }
protected int argCount(RubyObject[] args, int min, int max) { int len = args.length; if (len < min || (max > -1 && len > max)) { String msg = "Wrong number of arguments for method '" + ruby.getRubyFrame().getLastFunc() + "' in class " + getRubyClass().toName() + ". " + args.length + " is not in Range " + min + ".." + max; throw new RubyArgumentException(getRuby(), msg); } return len; }
3,234,475
public RubyObject callSuper(RubyObject[] args) { if (ruby.getRubyFrame().getLastClass() == null) { throw new NameError(ruby, "superclass method '" + ruby.getRubyFrame().getLastFunc() + "' must be enabled by enableSuper()."); } ruby.getIter().push(); RubyObject result = ruby.getNil(); try { result = ruby.getRubyFrame().getLastClass().getSuperClass().call(ruby.getRubyFrame().getSelf(), ruby.getRubyFrame().getLastFunc(), new RubyPointer(args), 3); } finally { ruby.getIter().pop(); } return result; }
public RubyObject callSuper(RubyObject[] args) { if (ruby.getRubyFrame().getLastClass() == null) { throw new NameError(ruby, "superclass method '" + ruby.getRubyFrame().getLastFunc() + "' must be enabled by enableSuper()."); } ruby.getIter().push(); RubyObject result = ruby.getNil(); try { result = ruby.getRubyFrame().getLastClass().getSuperClass().call(ruby.getRubyFrame().getSelf(), ruby.getRubyFrame().getLastFunc(), new RubyPointer(args), 3); } finally { ruby.getIter().pop(); } return result; }
3,234,476
public RubyObject callSuper(RubyObject[] args) { if (ruby.getRubyFrame().getLastClass() == null) { throw new NameError(ruby, "superclass method '" + ruby.getRubyFrame().getLastFunc() + "' must be enabled by enableSuper()."); } ruby.getIter().push(); RubyObject result = ruby.getNil(); try { result = ruby.getRubyFrame().getLastClass().getSuperClass().call(ruby.getRubyFrame().getSelf(), ruby.getRubyFrame().getLastFunc(), new RubyPointer(args), 3); } finally { ruby.getIter().pop(); } return result; }
public RubyObject callSuper(RubyObject[] args) { if (ruby.getRubyFrame().getLastClass() == null) { throw new NameError(ruby, "superclass method '" + ruby.getRubyFrame().getLastFunc() + "' must be enabled by enableSuper()."); } ruby.getIter().push(); RubyObject result = ruby.getNil(); try { result = ruby.getRubyFrame().getLastClass().getSuperClass().call(ruby.getRubyFrame().getSelf(), ruby.getRubyFrame().getLastFunc(), new RubyPointer(args), 3); } finally { ruby.getIter().pop(); } return result; }
3,234,477
public RubyObject callSuper(RubyObject[] args) { if (ruby.getRubyFrame().getLastClass() == null) { throw new NameError(ruby, "superclass method '" + ruby.getRubyFrame().getLastFunc() + "' must be enabled by enableSuper()."); } ruby.getIter().push(); RubyObject result = ruby.getNil(); try { result = ruby.getRubyFrame().getLastClass().getSuperClass().call(ruby.getRubyFrame().getSelf(), ruby.getRubyFrame().getLastFunc(), new RubyPointer(args), 3); } finally { ruby.getIter().pop(); } return result; }
public RubyObject callSuper(RubyObject[] args) { if (ruby.getRubyFrame().getLastClass() == null) { throw new NameError(ruby, "superclass method '" + ruby.getRubyFrame().getLastFunc() + "' must be enabled by enableSuper()."); } ruby.getIter().push(); RubyObject result = ruby.getNil(); try { result = ruby.getRubyFrame().getLastClass().getSuperClass().call(ruby.getRubyFrame().getSelf(), ruby.getRubyFrame().getLastFunc(), new RubyPointer(args), 3); } finally { ruby.getIter().pop(); } return result; }
3,234,478
public RubyObject callSuper(RubyObject[] args) { if (ruby.getRubyFrame().getLastClass() == null) { throw new NameError(ruby, "superclass method '" + ruby.getRubyFrame().getLastFunc() + "' must be enabled by enableSuper()."); } ruby.getIter().push(); RubyObject result = ruby.getNil(); try { result = ruby.getRubyFrame().getLastClass().getSuperClass().call(ruby.getRubyFrame().getSelf(), ruby.getRubyFrame().getLastFunc(), new RubyPointer(args), 3); } finally { ruby.getIter().pop(); } return result; }
public RubyObject callSuper(RubyObject[] args) { if (ruby.getRubyFrame().getLastClass() == null) { throw new NameError(ruby, "superclass method '" + ruby.getRubyFrame().getLastFunc() + "' must be enabled by enableSuper()."); } ruby.getIter().push(); RubyObject result = ruby.getNil(); try { result = ruby.getRubyFrame().getLastClass().getSuperClass().call( ruby.getRubyFrame().getSelf(), ruby.getRubyFrame().getLastFunc(), new RubyPointer(args), 3); } finally { ruby.getIter().pop(); } return result; }
3,234,479
public RubyObject callSuper(RubyObject[] args) { if (ruby.getRubyFrame().getLastClass() == null) { throw new NameError(ruby, "superclass method '" + ruby.getRubyFrame().getLastFunc() + "' must be enabled by enableSuper()."); } ruby.getIter().push(); RubyObject result = ruby.getNil(); try { result = ruby.getRubyFrame().getLastClass().getSuperClass().call(ruby.getRubyFrame().getSelf(), ruby.getRubyFrame().getLastFunc(), new RubyPointer(args), 3); } finally { ruby.getIter().pop(); } return result; }
public RubyObject callSuper(RubyObject[] args) { if (ruby.getRubyFrame().getLastClass() == null) { throw new NameError(ruby, "superclass method '" + ruby.getRubyFrame().getLastFunc() + "' must be enabled by enableSuper()."); } ruby.getIter().push(); RubyObject result = ruby.getNil(); try { result = ruby.getRubyFrame().getLastClass().getSuperClass().call(ruby.getRubyFrame().getSelf(), ruby.getRubyFrame().getLastFunc(), new RubyPointer(args), 3); } finally { ruby.getIter().pop(); } return result; }
3,234,480
public RubyObject callSuper(RubyObject[] args) { if (ruby.getRubyFrame().getLastClass() == null) { throw new NameError(ruby, "superclass method '" + ruby.getRubyFrame().getLastFunc() + "' must be enabled by enableSuper()."); } ruby.getIter().push(); RubyObject result = ruby.getNil(); try { result = ruby.getRubyFrame().getLastClass().getSuperClass().call(ruby.getRubyFrame().getSelf(), ruby.getRubyFrame().getLastFunc(), new RubyPointer(args), 3); } finally { ruby.getIter().pop(); } return result; }
public RubyObject callSuper(RubyObject[] args) { if (ruby.getRubyFrame().getLastClass() == null) { throw new NameError(ruby, "superclass method '" + ruby.getRubyFrame().getLastFunc() + "' must be enabled by enableSuper()."); } ruby.getIter().push(); RubyObject result = ruby.getNil(); try { result = ruby.getRubyFrame().getLastClass().getSuperClass().call(ruby.getRubyFrame().getSelf(), ruby.getRubyFrame().getLastFunc(), new RubyPointer(args), 3); } finally { ruby.getIter().pop(); } return result; }
3,234,481
public PrintStream getErrorStream() { return errorStream != null ? errorStream : System.err; }
public PrintStream getErrorStream() { return errorStream != null ? errorStream : System.err; }
3,234,482
public InputStream getInputStream() { return inputStream != null ? inputStream : System.in; }
public InputStream getInputStream() { return inputStream != null ? inputStream : System.in; }
3,234,483
public PrintStream getOutputStream() { return outputStream != null ? outputStream : System.out; }
public PrintStream getOutputStream() { return outputStream != null ? outputStream : System.out; }
3,234,484
public boolean getPrintBugs() { return printBugs; }
public boolean getPrintBugs() { return printBugs; }
3,234,485
public void loadFile(File iFile, boolean wrap) { if (iFile == null) { throw new RuntimeException("No such file to load"); } try { StringBuffer source = new StringBuffer((int) iFile.length()); BufferedReader br = new BufferedReader(new FileReader(iFile)); String line; while ((line = br.readLine()) != null) { source.append(line).append('\n'); } br.close(); loadScript(new RubyString(ruby, iFile.getPath()), new RubyString(ruby, source.toString()), wrap); } catch (IOException ioExcptn) { getErrorStream().println("Cannot read Rubyfile: \"" + iFile.getPath() + "\""); getErrorStream().println("IOEception: " + ioExcptn.getMessage()); } }
public void loadFile(File iFile, boolean wrap) { if (iFile == null) { throw new RuntimeException("No such file to load"); } try { StringBuffer source = new StringBuffer((int) iFile.length()); BufferedReader br = new BufferedReader(new FileReader(iFile)); String line; while ((line = br.readLine()) != null) { source.append(line).append('\n'); } br.close(); loadScript(new RubyString(ruby, iFile.getPath()), new RubyString(ruby, source.toString()), wrap); } catch (IOException ioExcptn) { getErrorStream().println("Cannot read Rubyfile: \"" + iFile.getPath() + "\""); getErrorStream().println("IOEception: " + ioExcptn.getMessage()); } }
3,234,486
public void loadFile(File iFile, boolean wrap) { if (iFile == null) { throw new RuntimeException("No such file to load"); } try { StringBuffer source = new StringBuffer((int) iFile.length()); BufferedReader br = new BufferedReader(new FileReader(iFile)); String line; while ((line = br.readLine()) != null) { source.append(line).append('\n'); } br.close(); loadScript(new RubyString(ruby, iFile.getPath()), new RubyString(ruby, source.toString()), wrap); } catch (IOException ioExcptn) { getErrorStream().println("Cannot read Rubyfile: \"" + iFile.getPath() + "\""); getErrorStream().println("IOEception: " + ioExcptn.getMessage()); } }
public void loadFile(File iFile, boolean wrap) { if (iFile == null) { throw new RuntimeException("No such file to load"); } try { StringBuffer source = new StringBuffer((int) iFile.length()); BufferedReader br = new BufferedReader(new FileReader(iFile)); String line; while ((line = br.readLine()) != null) { source.append(line).append('\n'); } br.close(); loadScript(new RubyString(ruby, iFile.getPath()), new RubyString(ruby, source.toString()), wrap); } catch (IOException ioExcptn) { getErrorStream().println("Cannot read Rubyfile: \"" + iFile.getPath() + "\""); getErrorStream().println("IOEception: " + ioExcptn.getMessage()); } }
3,234,487
public void loadFile(File iFile, boolean wrap) { if (iFile == null) { throw new RuntimeException("No such file to load"); } try { StringBuffer source = new StringBuffer((int) iFile.length()); BufferedReader br = new BufferedReader(new FileReader(iFile)); String line; while ((line = br.readLine()) != null) { source.append(line).append('\n'); } br.close(); loadScript(new RubyString(ruby, iFile.getPath()), new RubyString(ruby, source.toString()), wrap); } catch (IOException ioExcptn) { getErrorStream().println("Cannot read Rubyfile: \"" + iFile.getPath() + "\""); getErrorStream().println("IOEception: " + ioExcptn.getMessage()); } }
public void loadFile(File iFile, boolean wrap) { if (iFile == null) { throw new RuntimeException("No such file to load"); } try { StringBuffer source = new StringBuffer((int) iFile.length()); BufferedReader br = new BufferedReader(new FileReader(iFile)); String line; while ((line = br.readLine()) != null) { source.append(line).append('\n'); } br.close(); loadScript(new RubyString(ruby, iFile.getPath()), new RubyString(ruby, source.toString()), wrap); } catch (IOException ioExcptn) { getErrorStream().println("Cannot read Rubyfile: \"" + iFile.getPath() + "\""); getErrorStream().println("IOEception: " + ioExcptn.getMessage()); } }
3,234,488
public void loadFile(File iFile, boolean wrap) { if (iFile == null) { throw new RuntimeException("No such file to load"); } try { StringBuffer source = new StringBuffer((int) iFile.length()); BufferedReader br = new BufferedReader(new FileReader(iFile)); String line; while ((line = br.readLine()) != null) { source.append(line).append('\n'); } br.close(); loadScript(new RubyString(ruby, iFile.getPath()), new RubyString(ruby, source.toString()), wrap); } catch (IOException ioExcptn) { getErrorStream().println("Cannot read Rubyfile: \"" + iFile.getPath() + "\""); getErrorStream().println("IOEception: " + ioExcptn.getMessage()); } }
public void loadFile(File iFile, boolean wrap) { if (iFile == null) { throw new RuntimeException("No such file to load"); } try { StringBuffer source = new StringBuffer((int) iFile.length()); BufferedReader br = new BufferedReader(new FileReader(iFile)); String line; while ((line = br.readLine()) != null) { source.append(line).append('\n'); } br.close(); loadScript(new RubyString(ruby, iFile.getPath()), new RubyString(ruby, source.toString()), wrap); } catch (IOException ioExcptn) { getErrorStream().println("Cannot read Rubyfile: \"" + iFile.getPath() + "\""); getErrorStream().println("IOEception: " + ioExcptn.getMessage()); } }
3,234,489
public void loadScript(RubyString scriptName, RubyString source, boolean wrap) { RubyObject self = ruby.getRubyTopSelf(); CRefNode savedCRef = ruby.getCRef(); // TMP_PROTECT; if (wrap && ruby.getSafeLevel() >= 4) { // Check_Type(fname, T_STRING); } else { // Check_SafeStr(fname); } // volatile ID last_func; // ruby_errinfo = Qnil; /* ensure */ RubyVarmap.push(ruby); ruby.pushClass(); RubyModule wrapper = ruby.getWrapper(); ruby.setCRef(ruby.getTopCRef()); if (!wrap) { ruby.secure(4); /* should alter global state */ ruby.setRubyClass(ruby.getClasses().getObjectClass()); ruby.setWrapper(null); } else { /* load in anonymous module as toplevel */ ruby.setWrapper(RubyModule.newModule(ruby)); ruby.setRubyClass(ruby.getWrapper()); self = ruby.getRubyTopSelf().rbClone(); self.extendObject(ruby.getRubyClass()); ruby.getCRef().push(ruby.getWrapper()); } ruby.getRubyFrame().push(); ruby.getRubyFrame().setLastFunc(null); ruby.getRubyFrame().setLastClass(null); ruby.getRubyFrame().setSelf(self); ruby.getRubyFrame().setCbase(new CRefNode(ruby.getRubyClass(), null)); ruby.getScope().push(); /* default visibility is private at loading toplevel */ ruby.setActMethodScope(Constants.SCOPE_PRIVATE); String last_func = ruby.getRubyFrame().getLastFunc(); try { // RubyId last_func = ruby.getRubyFrame().getLastFunc(); // DEFER_INTS; ruby.setInEval(ruby.getInEval() + 1); ruby.getRubyParser().compileString(scriptName.getValue(), source, 0); // --- ruby.setInEval(ruby.getInEval() - 1); self.evalNode(ruby.getParserHelper().getEvalTree()); } finally { ruby.getRubyFrame().setLastFunc(last_func); /*if (ruby.getRubyScope().getFlags() == SCOPE_ALLOCA && ruby.getRubyClass() == ruby.getClasses().getObjectClass()) { if (ruby_scope->local_tbl) free(ruby_scope->local_tbl); }*/ ruby.setCRef(savedCRef); ruby.getScope().pop(); ruby.getRubyFrame().pop(); ruby.popClass(); RubyVarmap.pop(ruby); ruby.setWrapper(wrapper); } /*if (ruby_nerrs > 0) { ruby_nerrs = 0; rb_exc_raise(ruby_errinfo); }*/ }
public void loadScript(RubyString scriptName, RubyString source, boolean wrap) { RubyObject self = ruby.getRubyTopSelf(); CRefNode savedCRef = ruby.getCRef(); // TMP_PROTECT; if (wrap && ruby.getSafeLevel() >= 4) { // Check_Type(fname, T_STRING); } else { // Check_SafeStr(fname); } // volatile ID last_func; // ruby_errinfo = Qnil; /* ensure */ RubyVarmap.push(ruby); ruby.pushClass(); RubyModule wrapper = ruby.getWrapper(); ruby.setCRef(ruby.getTopCRef()); if (!wrap) { ruby.secure(4); /* should alter global state */ ruby.setRubyClass(ruby.getClasses().getObjectClass()); ruby.setWrapper(null); } else { /* load in anonymous module as toplevel */ ruby.setWrapper(RubyModule.newModule(ruby)); ruby.setRubyClass(ruby.getWrapper()); self = ruby.getRubyTopSelf().rbClone(); self.extendObject(ruby.getRubyClass()); ruby.getCRef().push(ruby.getWrapper()); } ruby.getRubyFrame().push(); ruby.getRubyFrame().setLastFunc(null); ruby.getRubyFrame().setLastClass(null); ruby.getRubyFrame().setSelf(self); ruby.getRubyFrame().setCbase(new CRefNode(ruby.getRubyClass(), null)); ruby.getScope().push(); /* default visibility is private at loading toplevel */ ruby.setActMethodScope(Constants.SCOPE_PRIVATE); String last_func = ruby.getRubyFrame().getLastFunc(); try { // RubyId last_func = ruby.getRubyFrame().getLastFunc(); // DEFER_INTS; ruby.setInEval(ruby.getInEval() + 1); ruby.getRubyParser().compileString(scriptName.getValue(), source, 0); // --- ruby.setInEval(ruby.getInEval() - 1); self.evalNode(ruby.getParserHelper().getEvalTree()); } finally { ruby.getRubyFrame().setLastFunc(last_func); /*if (ruby.getRubyScope().getFlags() == SCOPE_ALLOCA && ruby.getRubyClass() == ruby.getClasses().getObjectClass()) { if (ruby_scope->local_tbl) free(ruby_scope->local_tbl); }*/ ruby.setCRef(savedCRef); ruby.getScope().pop(); ruby.getRubyFrame().pop(); ruby.popClass(); RubyVarmap.pop(ruby); ruby.setWrapper(wrapper); } /*if (ruby_nerrs > 0) { ruby_nerrs = 0; rb_exc_raise(ruby_errinfo); }*/ }
3,234,490
public void loadScript(RubyString scriptName, RubyString source, boolean wrap) { RubyObject self = ruby.getRubyTopSelf(); CRefNode savedCRef = ruby.getCRef(); // TMP_PROTECT; if (wrap && ruby.getSafeLevel() >= 4) { // Check_Type(fname, T_STRING); } else { // Check_SafeStr(fname); } // volatile ID last_func; // ruby_errinfo = Qnil; /* ensure */ RubyVarmap.push(ruby); ruby.pushClass(); RubyModule wrapper = ruby.getWrapper(); ruby.setCRef(ruby.getTopCRef()); if (!wrap) { ruby.secure(4); /* should alter global state */ ruby.setRubyClass(ruby.getClasses().getObjectClass()); ruby.setWrapper(null); } else { /* load in anonymous module as toplevel */ ruby.setWrapper(RubyModule.newModule(ruby)); ruby.setRubyClass(ruby.getWrapper()); self = ruby.getRubyTopSelf().rbClone(); self.extendObject(ruby.getRubyClass()); ruby.getCRef().push(ruby.getWrapper()); } ruby.getRubyFrame().push(); ruby.getRubyFrame().setLastFunc(null); ruby.getRubyFrame().setLastClass(null); ruby.getRubyFrame().setSelf(self); ruby.getRubyFrame().setCbase(new CRefNode(ruby.getRubyClass(), null)); ruby.getScope().push(); /* default visibility is private at loading toplevel */ ruby.setActMethodScope(Constants.SCOPE_PRIVATE); String last_func = ruby.getRubyFrame().getLastFunc(); try { // RubyId last_func = ruby.getRubyFrame().getLastFunc(); // DEFER_INTS; ruby.setInEval(ruby.getInEval() + 1); ruby.getRubyParser().compileString(scriptName.getValue(), source, 0); // --- ruby.setInEval(ruby.getInEval() - 1); self.evalNode(ruby.getParserHelper().getEvalTree()); } finally { ruby.getRubyFrame().setLastFunc(last_func); /*if (ruby.getRubyScope().getFlags() == SCOPE_ALLOCA && ruby.getRubyClass() == ruby.getClasses().getObjectClass()) { if (ruby_scope->local_tbl) free(ruby_scope->local_tbl); }*/ ruby.setCRef(savedCRef); ruby.getScope().pop(); ruby.getRubyFrame().pop(); ruby.popClass(); RubyVarmap.pop(ruby); ruby.setWrapper(wrapper); } /*if (ruby_nerrs > 0) { ruby_nerrs = 0; rb_exc_raise(ruby_errinfo); }*/ }
public void loadScript(RubyString scriptName, RubyString source, boolean wrap) { RubyObject self = ruby.getRubyTopSelf(); CRefNode savedCRef = ruby.getCRef(); // TMP_PROTECT; if (wrap && ruby.getSafeLevel() >= 4) { // Check_Type(fname, T_STRING); } else { // Check_SafeStr(fname); } // volatile ID last_func; // ruby_errinfo = Qnil; /* ensure */ RubyVarmap.push(ruby); ruby.pushClass(); RubyModule wrapper = ruby.getWrapper(); ruby.setCRef(ruby.getTopCRef()); if (!wrap) { ruby.secure(4); /* should alter global state */ ruby.setRubyClass(ruby.getClasses().getObjectClass()); ruby.setWrapper(null); } else { /* load in anonymous module as toplevel */ ruby.setWrapper(RubyModule.newModule(ruby)); ruby.setRubyClass(ruby.getWrapper()); self = ruby.getRubyTopSelf().rbClone(); self.extendObject(ruby.getRubyClass()); ruby.getCRef().push(ruby.getWrapper()); } ruby.getRubyFrame().push(); ruby.getRubyFrame().setLastFunc(null); ruby.getRubyFrame().setLastClass(null); ruby.getRubyFrame().setSelf(self); ruby.getRubyFrame().setCbase(new CRefNode(ruby.getRubyClass(), null)); ruby.getScope().push(); /* default visibility is private at loading toplevel */ ruby.setActMethodScope(Constants.SCOPE_PRIVATE); String last_func = ruby.getRubyFrame().getLastFunc(); try { // RubyId last_func = ruby.getRubyFrame().getLastFunc(); // DEFER_INTS; ruby.setInEval(ruby.getInEval() + 1); ruby.getRubyParser().compileString(scriptName.getValue(), source, 0); // --- ruby.setInEval(ruby.getInEval() - 1); self.evalNode(ruby.getParserHelper().getEvalTree()); } finally { ruby.getRubyFrame().setLastFunc(last_func); /*if (ruby.getRubyScope().getFlags() == SCOPE_ALLOCA && ruby.getRubyClass() == ruby.getClasses().getObjectClass()) { if (ruby_scope->local_tbl) free(ruby_scope->local_tbl); }*/ ruby.setCRef(savedCRef); ruby.getScope().pop(); ruby.getRubyFrame().pop(); ruby.popClass(); RubyVarmap.pop(ruby); ruby.setWrapper(wrapper); } /*if (ruby_nerrs > 0) { ruby_nerrs = 0; rb_exc_raise(ruby_errinfo); }*/ }
3,234,491
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } RubyArray backtrace = (RubyArray)excp.funcall("backtrace"); if (backtrace.isNil()) { if (ruby.getSourceFile() != null) { getErrorStream().print(ruby.getSourceFile() + ':' + ruby.getSourceLine()); } else { getErrorStream().print(ruby.getSourceLine()); } } else if (backtrace.getLength() == 0){ printErrorPos(); } else { RubyObject mesg = backtrace.entry(0); if (mesg.isNil()) { printErrorPos(); } else { getErrorStream().print(mesg); } } RubyClass type = excp.getRubyClass(); String info = excp.toString(); if (type == ruby.getExceptions().getRuntimeError() && info.length() == 0) { getErrorStream().print(": unhandled exception\n"); } else { String path = type.getClassPath().toString(); if (info.length() == 0) { getErrorStream().print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } getErrorStream().print(": " + info); if (path != null) { getErrorStream().print(" (" + path + ")\n"); } if (tail != null) { getErrorStream().print(tail + '\n'); } } } if (!backtrace.isNil()) { RubyObject[] elements = backtrace.toJavaArray(); for (int i = 0; i < elements.length; i++) { if (elements[i] instanceof RubyString) { getErrorStream().print("\tfrom " + elements[i] + '\n'); } if (i == TRACE_HEAD && elements.length > TRACE_MAX) { getErrorStream().print("\t ... " + (elements.length - TRACE_HEAD - TRACE_TAIL) + "levels...\n"); i = elements.length - TRACE_TAIL; } } } }
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } RubyArray backtrace = (RubyArray)excp.funcall("backtrace"); if (backtrace.isNil()) { if (ruby.getSourceFile() != null) { getErrorStream().print(ruby.getSourceFile() + ':' + ruby.getSourceLine()); } else { getErrorStream().print(ruby.getSourceLine()); } } else if (backtrace.getLength() == 0){ printErrorPos(); } else { RubyObject mesg = backtrace.entry(0); if (mesg.isNil()) { printErrorPos(); } else { getErrorStream().print(mesg); } } RubyClass type = excp.getRubyClass(); String info = excp.toString(); if (type == ruby.getExceptions().getRuntimeError() && info.length() == 0) { getErrorStream().print(": unhandled exception\n"); } else { String path = type.getClassPath().toString(); if (info.length() == 0) { getErrorStream().print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } getErrorStream().print(": " + info); if (path != null) { getErrorStream().print(" (" + path + ")\n"); } if (tail != null) { getErrorStream().print(tail + '\n'); } } } if (!backtrace.isNil()) { RubyObject[] elements = backtrace.toJavaArray(); for (int i = 0; i < elements.length; i++) { if (elements[i] instanceof RubyString) { getErrorStream().print("\tfrom " + elements[i] + '\n'); } if (i == TRACE_HEAD && elements.length > TRACE_MAX) { getErrorStream().print("\t ... " + (elements.length - TRACE_HEAD - TRACE_TAIL) + "levels...\n"); i = elements.length - TRACE_TAIL; } } } }
3,234,492
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } RubyArray backtrace = (RubyArray)excp.funcall("backtrace"); if (backtrace.isNil()) { if (ruby.getSourceFile() != null) { getErrorStream().print(ruby.getSourceFile() + ':' + ruby.getSourceLine()); } else { getErrorStream().print(ruby.getSourceLine()); } } else if (backtrace.getLength() == 0){ printErrorPos(); } else { RubyObject mesg = backtrace.entry(0); if (mesg.isNil()) { printErrorPos(); } else { getErrorStream().print(mesg); } } RubyClass type = excp.getRubyClass(); String info = excp.toString(); if (type == ruby.getExceptions().getRuntimeError() && info.length() == 0) { getErrorStream().print(": unhandled exception\n"); } else { String path = type.getClassPath().toString(); if (info.length() == 0) { getErrorStream().print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } getErrorStream().print(": " + info); if (path != null) { getErrorStream().print(" (" + path + ")\n"); } if (tail != null) { getErrorStream().print(tail + '\n'); } } } if (!backtrace.isNil()) { RubyObject[] elements = backtrace.toJavaArray(); for (int i = 0; i < elements.length; i++) { if (elements[i] instanceof RubyString) { getErrorStream().print("\tfrom " + elements[i] + '\n'); } if (i == TRACE_HEAD && elements.length > TRACE_MAX) { getErrorStream().print("\t ... " + (elements.length - TRACE_HEAD - TRACE_TAIL) + "levels...\n"); i = elements.length - TRACE_TAIL; } } } }
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } RubyArray backtrace = (RubyArray)excp.funcall("backtrace"); if (backtrace.isNil()) { if (ruby.getSourceFile() != null) { getErrorStream().print(ruby.getSourceFile() + ':' + ruby.getSourceLine()); } else { getErrorStream().print(ruby.getSourceLine()); } } else if (backtrace.getLength() == 0){ printErrorPos(); } else { RubyObject mesg = backtrace.entry(0); if (mesg.isNil()) { printErrorPos(); } else { getErrorStream().print(mesg); } } RubyClass type = excp.getRubyClass(); String info = excp.toString(); if (type == ruby.getExceptions().getRuntimeError() && info.length() == 0) { getErrorStream().print(": unhandled exception\n"); } else { String path = type.getClassPath().toString(); if (info.length() == 0) { getErrorStream().print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } getErrorStream().print(": " + info); if (path != null) { getErrorStream().print(" (" + path + ")\n"); } if (tail != null) { getErrorStream().print(tail + '\n'); } } } if (!backtrace.isNil()) { RubyObject[] elements = backtrace.toJavaArray(); for (int i = 0; i < elements.length; i++) { if (elements[i] instanceof RubyString) { getErrorStream().print("\tfrom " + elements[i] + '\n'); } if (i == TRACE_HEAD && elements.length > TRACE_MAX) { getErrorStream().print("\t ... " + (elements.length - TRACE_HEAD - TRACE_TAIL) + "levels...\n"); i = elements.length - TRACE_TAIL; } } } }
3,234,493
private void printErrorPos() { if (ruby.getSourceFile() != null) { if (ruby.getRubyFrame().getLastFunc() != null) { getErrorStream().print(ruby.getSourceFile() + ':' + ruby.getSourceLine()); getErrorStream().print(":in '" + ruby.getRubyFrame().getLastFunc() + '\''); } else if (ruby.getSourceLine() != 0) { getErrorStream().print(ruby.getSourceFile() + ':' + ruby.getSourceLine()); } else { getErrorStream().print(ruby.getSourceFile()); } } }
private void printErrorPos() { if (ruby.getSourceFile() != null) { if (ruby.getRubyFrame().getLastFunc() != null) { getErrorStream().print(ruby.getSourceFile() + ':' + ruby.getSourceLine()); getErrorStream().print(":in '" + ruby.getRubyFrame().getLastFunc() + '\''); } else if (ruby.getSourceLine() != 0) { getErrorStream().print(ruby.getSourceFile() + ':' + ruby.getSourceLine()); } else { getErrorStream().print(ruby.getSourceFile()); } } }
3,234,494
public void setErrorStream(PrintStream errorStream) { this.errorStream = errorStream; }
public void setErrorStream(PrintStream errorStream) { this.errorStream = errorStream; }
3,234,495
public void setInputStream(InputStream inputStream) { this.inputStream = inputStream; }
public void setInputStream(InputStream inputStream) { this.inputStream = inputStream; }
3,234,496
public void setOutputStream(PrintStream outputStream) { this.outputStream = outputStream; }
public void setOutputStream(PrintStream outputStream) { this.outputStream = outputStream; }
3,234,497
public void setPrintBugs(boolean printBugs) { this.printBugs = printBugs; }
public void setPrintBugs(boolean printBugs) { this.printBugs = printBugs; }
3,234,498
public void initialize() { SparkManager.getChatManager().addChatRoomListener(this); final ContactList contactList = SparkManager.getWorkspace().getContactList(); final Action viewHistoryAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { ContactItem item = (ContactItem)contactList.getSelectedUsers().iterator().next(); final String jid = item.getFullJID(); showHistory(jid); } }; viewHistoryAction.putValue(Action.NAME, Res.getString("menuitem.view.contact.history ")); viewHistoryAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.HISTORY_16x16)); contactList.addContextMenuListener(new ContextMenuListener() { public void poppingUp(Object object, JPopupMenu popup) { if (object instanceof ContactItem) { popup.add(viewHistoryAction); } } public void poppingDown(JPopupMenu popup) { } public boolean handleDefaultAction(MouseEvent e) { return false; } }); SparkManager.getMainWindow().addMainWindowListener(new MainWindowListener() { public void shutdown() { persistConversations(); } public void mainWindowActivated() { } public void mainWindowDeactivated() { } }); SparkManager.getConnection().addConnectionListener(new ConnectionListener() { public void connectionClosed() { } public void connectionClosedOnError(Exception e) { persistConversations(); } }); }
public void initialize() { SparkManager.getChatManager().addChatRoomListener(this); final ContactList contactList = SparkManager.getWorkspace().getContactList(); final Action viewHistoryAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { ContactItem item = (ContactItem)contactList.getSelectedUsers().iterator().next(); final String jid = item.getFullJID(); showHistory(jid); } }; viewHistoryAction.putValue(Action.NAME, Res.getString("menuitem.view.contact.history")); viewHistoryAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.HISTORY_16x16)); contactList.addContextMenuListener(new ContextMenuListener() { public void poppingUp(Object object, JPopupMenu popup) { if (object instanceof ContactItem) { popup.add(viewHistoryAction); } } public void poppingDown(JPopupMenu popup) { } public boolean handleDefaultAction(MouseEvent e) { return false; } }); SparkManager.getMainWindow().addMainWindowListener(new MainWindowListener() { public void shutdown() { persistConversations(); } public void mainWindowActivated() { } public void mainWindowDeactivated() { } }); SparkManager.getConnection().addConnectionListener(new ConnectionListener() { public void connectionClosed() { } public void connectionClosedOnError(Exception e) { persistConversations(); } }); }
3,234,499
public void stateChanged(ChangeEvent e) { if (e.getSource() instanceof JTabbedPane) { JTabbedPane tab = (JTabbedPane) e.getSource(); Component c = tab.getSelectedComponent(); int index = tab.getSelectedIndex(); if (c instanceof DOInfo) { DOInfo info = (DOInfo) c; switch (info.getInfoType()) { case DOInfo.INFO_TYPE: model.retrieveChannelsData(); break; } view.setEditorSelectedPane(index); } else { view.setEditorSelectedPane(index); if (index == EditorUI.PROPERTIES_INDEX) { int subIndex = model.getSelectedSubPane(); if (subIndex == EditorUI.ANNOTATION_SUB_INDEX) retrieveAnnotations(); else if (subIndex == EditorUI.CLASSIFICATION_SUB_INDEX) loadClassifications(); } } } else { view.onStateChanged(model.getState() == Editor.READY); } }
publicvoidstateChanged(ChangeEvente){if(e.getSource()instanceofJTabbedPane){JTabbedPanetab=(JTabbedPane)e.getSource();Componentc=tab.getSelectedComponent();intindex=tab.getSelectedIndex();if(cinstanceofDOInfo){DOInfoinfo=(DOInfo)c;switch(info.getInfoType()){ caseDOInfo.INFO_TYPE: model.retrieveChannelsData(); break; }view.setEditorSelectedPane(index);}else{ view.setEditorSelectedPane(index);if(index==EditorUI.PROPERTIES_INDEX){ intsubIndex=model.getSelectedSubPane(); if(subIndex==EditorUI.ANNOTATION_SUB_INDEX) retrieveAnnotations(); elseif(subIndex==EditorUI.CLASSIFICATION_SUB_INDEX) loadClassifications();}}}else{ view.onStateChanged(model.getState()==Editor.READY);}}
3,234,500
public void testXMLReportValidity() throws Exception { String[] args; // Serialize the current coverage data to disk ProjectData.saveGlobalProjectData(); String dataFileName = CoverageDataFileHandler.getDefaultDataFile() .getAbsolutePath(); // Then we need to generate the XML report args = new String[] { "-f", "xml", "--datafile", dataFileName, "-o", pathToTestOutput, "-s", pathToSourceCode }; net.sourceforge.cobertura.reporting.Main.main(args); // Create a validating XML document parser DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setValidating(true); DocumentBuilder documentBuilder = factory.newDocumentBuilder(); documentBuilder.setEntityResolver(new JUnitXMLParserEntityResolver( basedir)); documentBuilder.setErrorHandler(new JUnitXMLParserErrorHandler()); // Parse the XML report InputStream inputStream = null; try { inputStream = new FileInputStream(pathToXMLReport); documentBuilder.parse(inputStream); } finally { if (inputStream != null) inputStream.close(); } }
public void testXMLReportValidity() throws Exception { String[] args; // Serialize the current coverage data to disk ProjectData.saveGlobalProjectData(); String dataFileName = CoverageDataFileHandler.getDefaultDataFile() .getAbsolutePath(); // Then we need to generate the XML report args = new String[] { "-f", "xml", "--datafile", dataFileName, "-o", pathToTestOutput, "-s", pathToSourceCode }; net.sourceforge.cobertura.reporting.Main.main(args); // Create a validating XML document parser DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setValidating(true); DocumentBuilder documentBuilder = factory.newDocumentBuilder(); documentBuilder.setEntityResolver(new JUnitXMLParserEntityResolver( basedir)); documentBuilder.setErrorHandler(new JUnitXMLParserErrorHandler()); // Parse the XML report InputStream inputStream = null; try { inputStream = new FileInputStream(pathToXMLReport); documentBuilder.parse(inputStream); } finally { if (inputStream != null) inputStream.close(); } }
3,234,502
void showAnnotations() { ExperimenterData userDetails = model.getUserDetails(); if (userDetails == null) return; Map annotations = model.getAnnotations(); if (annotations == null) return; String[] owners = new String[annotations.size()]; Iterator i = annotations.keySet().iterator(); Long id; int index = 0; ownersMap = new HashMap(); List list; ExperimenterData data; while (i.hasNext()) { id = (Long) i.next(); list = (List) annotations.get(id); if (list != null || list.size() > 0) { data = ((AnnotationData) list.get(0)).getOwner(); if (userDetails.getId() == id.intValue()) userIndex = index; String n = "Name not available"; //tmp fix try { n = data.getLastName(); } catch (Exception e) {} owners[index] = n; ownersMap.put(new Integer(index), id); index++; } } //No annotation for the current user, so allow creation. if (userIndex != -1) annotatedByList.setSelectedIndex(userIndex); setComponentsEnabled(true); formatUsersList(owners); annotatedByList.clearSelection(); annotatedByList.setSelectedIndex(userIndex); showSingleAnnotation(); }
void showAnnotations() { ExperimenterData userDetails = model.getUserDetails(); if (userDetails == null) return; Map annotations = model.getAnnotations(); if (annotations == null) return; String[] owners = new String[annotations.size()]; Iterator i = annotations.keySet().iterator(); Long id; int index = 0; ownersMap = new HashMap(); List list; ExperimenterData data; while (i.hasNext()) { id = (Long) i.next(); list = (List) annotations.get(id); if (list != null || list.size() > 0) { data = ((AnnotationData) list.get(0)).getOwner(); if (userDetails.getId() == id.intValue()) userIndex = index; String n = "Name not available"; //tmp fix try { n = data.getLastName(); } catch (Exception e) {} owners[index] = n; ownersMap.put(new Integer(index), id); index++; } } //No annotation for the current user, so allow creation. setComponentsEnabled(true); formatUsersList(owners); annotatedByList.clearSelection(); annotatedByList.setSelectedIndex(userIndex); showSingleAnnotation(); }
3,234,503
void showAnnotations() { ExperimenterData userDetails = model.getUserDetails(); if (userDetails == null) return; Map annotations = model.getAnnotations(); if (annotations == null) return; String[] owners = new String[annotations.size()]; Iterator i = annotations.keySet().iterator(); Long id; int index = 0; ownersMap = new HashMap(); List list; ExperimenterData data; while (i.hasNext()) { id = (Long) i.next(); list = (List) annotations.get(id); if (list != null || list.size() > 0) { data = ((AnnotationData) list.get(0)).getOwner(); if (userDetails.getId() == id.intValue()) userIndex = index; String n = "Name not available"; //tmp fix try { n = data.getLastName(); } catch (Exception e) {} owners[index] = n; ownersMap.put(new Integer(index), id); index++; } } //No annotation for the current user, so allow creation. if (userIndex != -1) annotatedByList.setSelectedIndex(userIndex); setComponentsEnabled(true); formatUsersList(owners); annotatedByList.clearSelection(); annotatedByList.setSelectedIndex(userIndex); showSingleAnnotation(); }
void showAnnotations() { ExperimenterData userDetails = model.getUserDetails(); if (userDetails == null) return; Map annotations = model.getAnnotations(); if (annotations == null) return; String[] owners = new String[annotations.size()]; Iterator i = annotations.keySet().iterator(); Long id; int index = 0; ownersMap = new HashMap(); List list; ExperimenterData data; while (i.hasNext()) { id = (Long) i.next(); list = (List) annotations.get(id); if (list != null || list.size() > 0) { data = ((AnnotationData) list.get(0)).getOwner(); if (userDetails.getId() == id.intValue()) userIndex = index; String n = "Name not available"; //tmp fix try { n = data.getLastName(); } catch (Exception e) {} owners[index] = n; ownersMap.put(new Integer(index), id); index++; } } //No annotation for the current user, so allow creation. if (userIndex != -1) annotatedByList.setSelectedIndex(userIndex); setComponentsEnabled(true); formatUsersList(owners); annotatedByList.clearSelection(); annotatedByList.setSelectedIndex(userIndex); showSingleAnnotation(); }
3,234,504
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,234,506
protected void setUp() { pixels = new Pixels(); pixels.setId(1L); pixels.setSizeX(1024); pixels.setSizeY(1024); pixels.setSizeZ(64); pixels.setSizeC(3); pixels.setSizeT(50); PixelsType type = new PixelsType(); pixels.setPixelsType(type); // FIXME PixelsService service = PixelsService.getInstance(); pixelBuffer = service.getPixelBuffer(pixels); }
protected void setUp() { pixels = new Pixels(); pixels.setId(1L); pixels.setSizeX(1024); pixels.setSizeY(1024); pixels.setSizeZ(64); pixels.setSizeC(3); pixels.setSizeT(50); PixelsType type = new PixelsType(); pixels.setPixelsType(type); // FIXME PixelsService service = new PixelsService(PixelsService.ROOT_DEFAULT); pixelBuffer = service.getPixelBuffer(pixels); }
3,234,508
private JPanel buildTabbedPanel(ROIAgtCtrl control, IconManager im, int sizeT, int sizeZ) { JTabbedPane tabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT); tabs.setAlignmentX(LEFT_ALIGNMENT); ResultsPerROIPane roiPane; StatsResultsPane pane; int c = 0; Icon up = im.getIcon(IconManager.UP), down = im.getIcon(IconManager.DOWN); List analysedROI = control.getAnalyzedROI(); Iterator i = analysedROI.iterator(); ScreenROI roi; ROIStats roiStats; Map results = control.getROIResults(); String[] channels = control.getAnalyzedChannels(); int channel = control.getAnalyzedChannel(0); listROIs = new String[analysedROI.size()]; while (i.hasNext()) { roi = (ScreenROI) i.next(); roiStats = (ROIStats) results.get(roi.getActualROI()); roiPane = new ResultsPerROIPane(c, manager, channels, roi.getName(), roi.getAnnotation()); pane = new StatsResultsPane(manager, roiStats, sizeT, sizeZ, channel, channels.length, up, down); roiPane.addToContainer(pane); paneMap.put(new Integer(c), pane); tabs.insertTab("ROI #"+roi.getIndex(), null, roiPane, null, c); listROIs[c] = "ROI #"+roi.getIndex(); c++; } JPanel p = new JPanel(); p.setLayout(new BorderLayout(0, 0)); p.add(tabs, BorderLayout.CENTER); return p; }
private JPanel buildTabbedPanel(ROIAgtCtrl control, IconManager im, int sizeT, int sizeZ) { JTabbedPane tabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT); tabs.setAlignmentX(LEFT_ALIGNMENT); ResultsPerROIPane roiPane; StatsResultsPane pane; int c = 0; Icon up = im.getIcon(IconManager.UP), down = im.getIcon(IconManager.DOWN); List analysedROI = control.getAnalyzedROI(); Iterator i = analysedROI.iterator(); ScreenROI roi; ROIStats roiStats; Map results = control.getROIResults(); String[] channels = control.getAnalyzedChannels(); int channel = control.getAnalyzedChannel(0); listROIs = new String[analysedROI.size()]; while (i.hasNext()) { roi = (ScreenROI) i.next(); roiStats = (ROIStats) results.get(roi.getActualROI()); roiPane = new ResultsPerROIPane(c, manager, channels, roi.getName(), roi.getAnnotation()); pane = new StatsResultsPane(manager, roiStats, sizeT, sizeZ, channel, channels.length, up, down); roiPane.addToContainer(pane); paneMap.put(new Integer(c), pane); tabs.insertTab("ROI #"+roi.getIndex(), null, roiPane, null, c); listROIs[c] = "ROI #"+roi.getIndex(); c++; } JPanel p = new JPanel(); p.setLayout(new BorderLayout(0, 0)); p.add(tabs, BorderLayout.CENTER); return p; }
3,234,510
private JPanel buildTabbedPanel(ROIAgtCtrl control, IconManager im, int sizeT, int sizeZ) { JTabbedPane tabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT); tabs.setAlignmentX(LEFT_ALIGNMENT); ResultsPerROIPane roiPane; StatsResultsPane pane; int c = 0; Icon up = im.getIcon(IconManager.UP), down = im.getIcon(IconManager.DOWN); List analysedROI = control.getAnalyzedROI(); Iterator i = analysedROI.iterator(); ScreenROI roi; ROIStats roiStats; Map results = control.getROIResults(); String[] channels = control.getAnalyzedChannels(); int channel = control.getAnalyzedChannel(0); listROIs = new String[analysedROI.size()]; while (i.hasNext()) { roi = (ScreenROI) i.next(); roiStats = (ROIStats) results.get(roi.getActualROI()); roiPane = new ResultsPerROIPane(c, manager, channels, roi.getName(), roi.getAnnotation()); pane = new StatsResultsPane(manager, roiStats, sizeT, sizeZ, channel, channels.length, up, down); roiPane.addToContainer(pane); paneMap.put(new Integer(c), pane); tabs.insertTab("ROI #"+roi.getIndex(), null, roiPane, null, c); listROIs[c] = "ROI #"+roi.getIndex(); c++; } JPanel p = new JPanel(); p.setLayout(new BorderLayout(0, 0)); p.add(tabs, BorderLayout.CENTER); return p; }
private JPanel buildTabbedPanel(ROIAgtCtrl control, IconManager im, int sizeT, int sizeZ) { JTabbedPane tabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT); tabs.setAlignmentX(LEFT_ALIGNMENT); ResultsPerROIPane roiPane; StatsResultsPane pane; int c = 0; Icon up = im.getIcon(IconManager.UP), down = im.getIcon(IconManager.DOWN); List analysedROI = control.getAnalyzedROI(); Iterator i = analysedROI.iterator(); ScreenROI roi; ROIStats roiStats; Map results = control.getROIResults(); String[] channels = control.getAnalyzedChannels(); int channel = control.getAnalyzedChannel(0); listROIs = new String[analysedROI.size()]; while (i.hasNext()) { roi = (ScreenROI) i.next(); roiStats = (ROIStats) results.get(roi.getActualROI()); roiPane = new ResultsPerROIPane(c, manager, channels, roi.getName(), roi.getAnnotation()); pane = new StatsResultsPane(manager, roiStats, sizeT, sizeZ, channel, channels.length, up, down, roiIndex, length); roiPane.addToContainer(pane); paneMap.put(new Integer(c), pane); tabs.insertTab("ROI #"+roi.getIndex(), null, roiPane, null, c); listROIs[c] = "ROI #"+roi.getIndex(); c++; } JPanel p = new JPanel(); p.setLayout(new BorderLayout(0, 0)); p.add(tabs, BorderLayout.CENTER); return p; }
3,234,511
private JPanel buildTabbedPanel(ROIAgtCtrl control, IconManager im, int sizeT, int sizeZ) { JTabbedPane tabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT); tabs.setAlignmentX(LEFT_ALIGNMENT); ResultsPerROIPane roiPane; StatsResultsPane pane; int c = 0; Icon up = im.getIcon(IconManager.UP), down = im.getIcon(IconManager.DOWN); List analysedROI = control.getAnalyzedROI(); Iterator i = analysedROI.iterator(); ScreenROI roi; ROIStats roiStats; Map results = control.getROIResults(); String[] channels = control.getAnalyzedChannels(); int channel = control.getAnalyzedChannel(0); listROIs = new String[analysedROI.size()]; while (i.hasNext()) { roi = (ScreenROI) i.next(); roiStats = (ROIStats) results.get(roi.getActualROI()); roiPane = new ResultsPerROIPane(c, manager, channels, roi.getName(), roi.getAnnotation()); pane = new StatsResultsPane(manager, roiStats, sizeT, sizeZ, channel, channels.length, up, down); roiPane.addToContainer(pane); paneMap.put(new Integer(c), pane); tabs.insertTab("ROI #"+roi.getIndex(), null, roiPane, null, c); listROIs[c] = "ROI #"+roi.getIndex(); c++; } JPanel p = new JPanel(); p.setLayout(new BorderLayout(0, 0)); p.add(tabs, BorderLayout.CENTER); return p; }
private JPanel buildTabbedPanel(ROIAgtCtrl control, IconManager im, int sizeT, int sizeZ) { JTabbedPane tabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT); tabs.setAlignmentX(LEFT_ALIGNMENT); ResultsPerROIPane roiPane; StatsResultsPane pane; int c = 0; Icon up = im.getIcon(IconManager.UP), down = im.getIcon(IconManager.DOWN); List analysedROI = control.getAnalyzedROI(); Iterator i = analysedROI.iterator(); ScreenROI roi; ROIStats roiStats; Map results = control.getROIResults(); String[] channels = control.getAnalyzedChannels(); int channel = control.getAnalyzedChannel(0); listROIs = new String[analysedROI.size()]; while (i.hasNext()) { roi = (ScreenROI) i.next(); roiStats = (ROIStats) results.get(roi.getActualROI()); roiPane = new ResultsPerROIPane(c, manager, channels, roi.getName(), roi.getAnnotation()); pane = new StatsResultsPane(manager, roiStats, sizeT, sizeZ, channel, channels.length, up, down); roiPane.addToContainer(pane); paneMap.put(new Integer(c), pane); tabs.insertTab("ROI #"+roi.getIndex(), null, roiPane, null, c); listROIs[c] = "ROI #"+roi.getIndex(); c++; } JPanel p = new JPanel(); p.setLayout(new BorderLayout(0, 0)); p.add(tabs, BorderLayout.CENTER); return p; }
3,234,512
public StatsResultsPane(ROIResultsMng mng, ROIStats stats, int sizeT, int sizeZ, int channel, int l, Icon up, Icon down) { manager = new StatsResultsPaneMng(this, mng, sizeT, sizeZ, stats, l); table = new StatsTable(up, down); table.initTable(manager.getDataToDisplay(channel)); bar = new BottomBar(manager, mng.getRegistry()); buildGUI(); }
public StatsResultsPane(ROIResultsMng mng, ROIStats stats, int sizeT, int sizeZ, int channel, int l, Icon up, Icon down, int roiIndex, int length) { manager = new StatsResultsPaneMng(this, mng, sizeT, sizeZ, stats, l); table = new StatsTable(up, down); table.initTable(manager.getDataToDisplay(channel)); bar = new BottomBar(manager, mng.getRegistry()); buildGUI(); }
3,234,513
public StatsResultsPane(ROIResultsMng mng, ROIStats stats, int sizeT, int sizeZ, int channel, int l, Icon up, Icon down) { manager = new StatsResultsPaneMng(this, mng, sizeT, sizeZ, stats, l); table = new StatsTable(up, down); table.initTable(manager.getDataToDisplay(channel)); bar = new BottomBar(manager, mng.getRegistry()); buildGUI(); }
public StatsResultsPane(ROIResultsMng mng, ROIStats stats, int sizeT, int sizeZ, int channel, int l, Icon up, Icon down) { manager = new StatsResultsPaneMng(this, mng, sizeT, sizeZ, stats, l); table = new StatsTable(up, down); table.initTable(manager.getDataToDisplay(channel)); bar = new BottomBar(manager, mng.getRegistry(), length); buildGUI(); }
3,234,514
public int read() throws IOException { return input.readChar(); }
public int read() throws IOException { return input.readUnsignedByte(); }
3,234,515
private void attachWindowListeners() { JMenu menu = view.getWindowsMenu(); menu.addMenuListener(new MenuListener() { public void menuSelected(MenuEvent e) { createWindowsMenuItems(); } /** * Required by I/F but not actually needed in our case, * no op implementation. * @see MenuListener#menuCanceled(MenuEvent) */ public void menuCanceled(MenuEvent e) {} /** * Required by I/F but not actually needed in our case, * no op implementation. * @see MenuListener#menuDeselected(MenuEvent) */ public void menuDeselected(MenuEvent e) {} }); //Listen to keyboard selection menu.addMenuKeyListener(new MenuKeyListener() { public void menuKeyReleased(MenuKeyEvent e) { createWindowsMenuItems(); } /** * Required by I/F but not actually needed in our case, * no op implementation. * @see MenuKeyListener#menuKeyPressed(MenuKeyEvent) */ public void menuKeyPressed(MenuKeyEvent e) {} /** * Required by I/F but not actually needed in our case, * no op implementation. * @see MenuKeyListener#menuKeyTyped(MenuKeyEvent) */ public void menuKeyTyped(MenuKeyEvent e) {} }); view.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); view.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { model.discard(); } public void windowDeiconified(WindowEvent e) { model.iconified(false); } public void windowIconified(WindowEvent e) { model.iconified(true); } }); view.getLoadingWindow().addPropertyChangeListener( LoadingWindow.CLOSED_PROPERTY, this); }
private void attachWindowListeners() { JMenu menu = ImViewerFactory.getWindowsMenu(); menu.addMenuListener(new MenuListener() { public void menuSelected(MenuEvent e) { createWindowsMenuItems(); } /** * Required by I/F but not actually needed in our case, * no op implementation. * @see MenuListener#menuCanceled(MenuEvent) */ public void menuCanceled(MenuEvent e) {} /** * Required by I/F but not actually needed in our case, * no op implementation. * @see MenuListener#menuDeselected(MenuEvent) */ public void menuDeselected(MenuEvent e) {} }); //Listen to keyboard selection menu.addMenuKeyListener(new MenuKeyListener() { public void menuKeyReleased(MenuKeyEvent e) { createWindowsMenuItems(); } /** * Required by I/F but not actually needed in our case, * no op implementation. * @see MenuKeyListener#menuKeyPressed(MenuKeyEvent) */ public void menuKeyPressed(MenuKeyEvent e) {} /** * Required by I/F but not actually needed in our case, * no op implementation. * @see MenuKeyListener#menuKeyTyped(MenuKeyEvent) */ public void menuKeyTyped(MenuKeyEvent e) {} }); view.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); view.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { model.discard(); } public void windowDeiconified(WindowEvent e) { model.iconified(false); } public void windowIconified(WindowEvent e) { model.iconified(true); } }); view.getLoadingWindow().addPropertyChangeListener( LoadingWindow.CLOSED_PROPERTY, this); }
3,234,516
private void createWindowsMenuItems() { Set viewers = ImViewerFactory.getViewers(); Iterator i = viewers.iterator(); JMenu menu = view.getWindowsMenu(); menu.removeAll(); ImViewer viewer; while (i.hasNext()) { viewer = (ImViewer) i.next(); //if (!(viewer == model)) menu.add(new JMenuItem(new ActivationAction(viewer))); } }
private void createWindowsMenuItems() { Set viewers = ImViewerFactory.getViewers(); Iterator i = viewers.iterator(); JMenu menu = ImViewerFactory.getWindowsMenu(); menu.removeAll(); ImViewer viewer; while (i.hasNext()) { viewer = (ImViewer) i.next(); //if (!(viewer == model)) menu.add(new JMenuItem(new ActivationAction(viewer))); } }
3,234,517
public BeanGlobalVariable(Ruby ruby, BSFDeclaredBean bean) { super(ruby, "$" + bean.name, null); this.bean = bean; }
public BeanGlobalVariable(Ruby ruby, BSFDeclaredBean bean) { super(ruby, GlobalVariable.variableName(bean.name), null); this.bean = bean; }
3,234,518
public void undeclareBean(BSFDeclaredBean bean) throws BSFException { ruby.undefineGlobalVar(bean.name); }
public void undeclareBean(BSFDeclaredBean bean) throws BSFException { ruby.undefineGlobalVar(GlobalVariable.variableName(bean.name)); }
3,234,519
protected void onSetUp() throws Exception { _q = (IQuery) applicationContext.getBean("queryService"); po = new PojoOptions().exp(1L); ids = new HashSet<Integer>(Arrays.asList(new Integer[]{1,2,3,4,5,6,250,253,249,258})); m = new HashMap(); m.put("id_list",ids); m.put("exp",po.getExperimenter()); }
protected void onSetUp() throws Exception { _q = new ServiceFactory( (OmeroContext) applicationContext ).getQueryService(); po = new PojoOptions().exp(1L); ids = new HashSet<Integer>(Arrays.asList(new Integer[]{1,2,3,4,5,6,250,253,249,258})); m = new HashMap(); m.put("id_list",ids); m.put("exp",po.getExperimenter()); }
3,234,520