bugged
stringlengths 6
599k
| fixed
stringlengths 10
599k
| __index_level_0__
int64 0
1.13M
|
|---|---|---|
public void write(String s) throws IOException { this.write(s,0,s.length()); }
|
public void write(int b) throws IOException { this.write(s,0,s.length()); }
| 1,122,281
|
public void write(String s) throws IOException { this.write(s,0,s.length()); }
|
public void write(String s) throws IOException { if ((_cpos + 1) > CSIZE) cflush(); _cbuf[_cpos] = (char) b; _cpos++; }
| 1,122,282
|
private UIComponent getSearchPanel() { String ref = LIST_ARTICLES_BEAN_ID + "."; String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(SEARCH_PUBLISHED_FROM_ID); em.addErrorMessage(SEARCH_PUBLISHED_TO_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getFormPanel(3); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "published_from"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "published_to"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "category"), WFUtil.getText(":"))); HtmlInputText searchPublishedFromInput = WFUtil.getInputText(SEARCH_PUBLISHED_FROM_ID, ref + "searchPublishedFrom"); searchPublishedFromInput.setSize(20); searchPublishedFromInput.setConverter(new WFDateConverter()); p.getChildren().add(searchPublishedFromInput); HtmlInputText searchPublishedToInput = WFUtil.getInputText(SEARCH_PUBLISHED_TO_ID, ref + "searchPublishedTo"); searchPublishedToInput.setSize(20); searchPublishedToInput.setConverter(new WFDateConverter()); p.getChildren().add(searchPublishedToInput); HtmlSelectOneMenu searchCategoryMenu = WFUtil.getSelectOneMenu(SEARCH_CATEGORY_ID, ref + "categories", ref + "searchCategoryId"); searchCategoryMenu.setConverter(new IntegerConverter()); p.getChildren().add(searchCategoryMenu); mainContainer.add(p); mainContainer.add(WFUtil.getText(" ")); p = WFPanelUtil.getPlainFormPanel(1); p.getChildren().add(WFUtil.getButtonVB(LIST_BUTTON_ID, bref + "list", this)); mainContainer.add(p); return mainContainer; }
|
private UIComponent getSearchPanel() { String ref = LIST_ARTICLES_BEAN_ID + "."; String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(SEARCH_PUBLISHED_FROM_ID); em.addErrorMessage(SEARCH_PUBLISHED_TO_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getFormPanel(3); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "published_from"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "published_to"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "category"), WFUtil.getText(":"))); HtmlInputText searchPublishedFromInput = WFUtil.getInputText(SEARCH_PUBLISHED_FROM_ID, ref + "searchPublishedFrom"); searchPublishedFromInput.setSize(20); searchPublishedFromInput.setConverter(new WFDateConverter()); p.getChildren().add(searchPublishedFromInput); HtmlInputText searchPublishedToInput = WFUtil.getInputText(SEARCH_PUBLISHED_TO_ID, ref + "searchPublishedTo"); searchPublishedToInput.setSize(20); searchPublishedToInput.setConverter(new WFDateConverter()); p.getChildren().add(searchPublishedToInput); HtmlSelectOneMenu searchCategoryMenu = WFUtil.getSelectOneMenu(SEARCH_CATEGORY_ID, ref + "categories", ref + "searchCategoryId"); searchCategoryMenu.setConverter(new IntegerConverter()); p.getChildren().add(searchCategoryMenu); mainContainer.add(p); mainContainer.add(WFUtil.getText(" ")); p = WFPanelUtil.getPlainFormPanel(1); p.getChildren().add(WFUtil.getButtonVB(LIST_BUTTON_ID, bref + "list", this)); mainContainer.add(p); return mainContainer; }
| 1,122,284
|
private UIComponent getViewArticlePanel() { String ref = ARTICLE_ITEM_BEAN_ID + "."; String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer c = new WFContainer(); c.setStyleAttribute("padding", "10px"); c.setId(VIEW_ARTICLE_PANEL_ID); c.add(WFUtil.getTextVB(ref + "case.publishedFromDate")); c.add(new WFPlainOutputText(" ")); HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "localeId"); localeMenu.setOnchange("document.forms[0].submit();"); c.add(localeMenu); c.add(WFUtil.getBreak(2)); c.add(WFUtil.getLinkVB("", ref + "headline", null)); c.add(WFUtil.getBreak(2)); WFPlainOutputText t = new WFPlainOutputText(); WFUtil.setValueBinding(t, "value", ref + "body"); c.add(t); c.add(WFUtil.getBreak(2)); c.add(WFUtil.getButtonVB(VIEW_ARTICLE_BACK_BUTTON_ID, bref + "back", this)); return c; }
|
private UIComponent getViewArticlePanel() { String ref = ARTICLE_ITEM_BEAN_ID + "."; String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer c = new WFContainer(); c.setStyleAttribute("padding", "10px"); c.setId(VIEW_ARTICLE_PANEL_ID); c.add(WFUtil.getTextVB(ref + "case.publishedFromDate")); c.add(new WFPlainOutputText(" ")); HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "localeId"); localeMenu.setOnchange("document.forms[0].submit();"); c.add(localeMenu); c.add(WFUtil.getBreak(2)); c.add(WFUtil.getLinkVB("", ref + "headline", null)); c.add(WFUtil.getBreak(2)); WFPlainOutputText t = new WFPlainOutputText(); WFUtil.setValueBinding(t, "value", ref + "body"); c.add(t); c.add(WFUtil.getBreak(2)); c.add(WFUtil.getButtonVB(VIEW_ARTICLE_BACK_BUTTON_ID, bref + "back", this)); return c; }
| 1,122,285
|
public void processAction(ActionEvent event) { if (event.getComponent().getId().equals(LIST_BUTTON_ID)) { WFUtil.invoke(LIST_ARTICLES_BEAN_ID, "list"); return; } else if (event.getComponent().getId().equals(VIEW_ARTICLE_BACK_BUTTON_ID)) { WFComponentSelector cs = (WFComponentSelector) event.getComponent().findComponent(DISPLAY_SELECTOR_ID); cs.setSelectedId(LIST_PANEL_ID, true); cs.setSelectedId(VIEW_ARTICLE_PANEL_ID, false); return; } UIComponent link = event.getComponent(); String id = WFUtil.getParameter(link, "id"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "clear"); ContentItemCase caze = new ContentItemCaseBean(); caze.setPublishedFromDate(new Date()); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setCase", caze); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLocaleId", "en"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setHeadline", "Electronic Reykjavik Up-And-Running (id = " + id + ")"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setTeaser", "Teaser"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setBody", "The first 24/7 service offered by Reykjavik Municipality as part of the Electronic Reykjavik " + "concept, was launched on May 25th., as planned. Now all applications and administration " + "processes regarding Music school applications and internal student registration are " + "implemented in the IdegaWeb eGOV solution.<br/><br/>" + "All applications are submitted through the Citizen Account to the Music schools. "+ "The schools use the system to process the applications. "+ "In the Citizen Account users can see the status of cases and applications, " + "view messages and communicate with the Music school administrators.<br/><br/>" + "For more information, you can access the website of Reykjavik <a href=\"#\">here</a>. " + "Click on the icon for Electronic Reykjavik (Rafrn Reykjavik) or go directly to the portal " + "<a href=\"#\">here</a>."); 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, "setStatus", ContentItemCase.STATUS_PUBLISHED); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setMainCategoryId", new Integer(3)); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLocaleId", "sv"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setHeadline", "Electronic Rykjavik klar"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setBody", "Den frsta 24-timmarsmyndigheten fr Reykjaviks kommun igng."); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLocaleId", "en"); WFComponentSelector cs = (WFComponentSelector) event.getComponent().getParent().getParent().getParent().findComponent(DISPLAY_SELECTOR_ID); cs.setSelectedId(LIST_PANEL_ID, false); cs.setSelectedId(VIEW_ARTICLE_PANEL_ID, true); }
|
public void processAction(ActionEvent event) { if (event.getComponent().getId().equals(LIST_BUTTON_ID)) { WFUtil.invoke(LIST_ARTICLES_BEAN_ID, "list"); return; } else if (event.getComponent().getId().equals(VIEW_ARTICLE_BACK_BUTTON_ID)) { WFComponentSelector cs = (WFComponentSelector) event.getComponent().findComponent(DISPLAY_SELECTOR_ID); cs.setSelectedId(LIST_PANEL_ID, true); cs.setSelectedId(VIEW_ARTICLE_PANEL_ID, false); return; } UIComponent link = event.getComponent(); String id = WFUtil.getParameter(link, "id"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "clear"); ContentItemCase caze = new ContentItemCaseBean(); caze.setPublishedFromDate(new Date()); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setCase", caze); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLocaleId", "en"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setHeadline", "Electronic Reykjavik Up-And-Running (id = " + id + ")"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setTeaser", "Teaser"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setBody", "The first 24/7 service offered by Reykjavik Municipality as part of the Electronic Reykjavik " + "concept, was launched on May 25th., as planned. Now all applications and administration " + "processes regarding Music school applications and internal student registration are " + "implemented in the IdegaWeb eGOV solution.<br/><br/>" + "All applications are submitted through the Citizen Account to the Music schools. "+ "The schools use the system to process the applications. "+ "In the Citizen Account users can see the status of cases and applications, " + "view messages and communicate with the Music school administrators.<br/><br/>" + "For more information, you can access the website of Reykjavik <a href=\"#\">here</a>. " + "Click on the icon for Electronic Reykjavik (Rafrn Reykjavik) or go directly to the portal " + "<a href=\"#\">here</a>."); 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, "setStatus", ContentItemCase.STATUS_PUBLISHED); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setMainCategoryId", new Integer(3)); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLocaleId", "sv"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setHeadline", "Electronic Rykjavik klar"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setBody", "Den frsta 24-timmarsmyndigheten fr Reykjaviks kommun igng."); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLocaleId", "en"); WFComponentSelector cs = (WFComponentSelector) event.getComponent().getParent().getParent().getParent().findComponent(DISPLAY_SELECTOR_ID); cs.setSelectedId(LIST_PANEL_ID, false); cs.setSelectedId(VIEW_ARTICLE_PANEL_ID, true); }
| 1,122,286
|
public void processAction(ActionEvent event) { if (event.getComponent().getId().equals(LIST_BUTTON_ID)) { WFUtil.invoke(LIST_ARTICLES_BEAN_ID, "list"); return; } else if (event.getComponent().getId().equals(VIEW_ARTICLE_BACK_BUTTON_ID)) { WFComponentSelector cs = (WFComponentSelector) event.getComponent().findComponent(DISPLAY_SELECTOR_ID); cs.setSelectedId(LIST_PANEL_ID, true); cs.setSelectedId(VIEW_ARTICLE_PANEL_ID, false); return; } UIComponent link = event.getComponent(); String id = WFUtil.getParameter(link, "id"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "clear"); ContentItemCase caze = new ContentItemCaseBean(); caze.setPublishedFromDate(new Date()); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setCase", caze); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLocaleId", "en"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setHeadline", "Electronic Reykjavik Up-And-Running (id = " + id + ")"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setTeaser", "Teaser"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setBody", "The first 24/7 service offered by Reykjavik Municipality as part of the Electronic Reykjavik " + "concept, was launched on May 25th., as planned. Now all applications and administration " + "processes regarding Music school applications and internal student registration are " + "implemented in the IdegaWeb eGOV solution.<br/><br/>" + "All applications are submitted through the Citizen Account to the Music schools. "+ "The schools use the system to process the applications. "+ "In the Citizen Account users can see the status of cases and applications, " + "view messages and communicate with the Music school administrators.<br/><br/>" + "For more information, you can access the website of Reykjavik <a href=\"#\">here</a>. " + "Click on the icon for Electronic Reykjavik (Rafrn Reykjavik) or go directly to the portal " + "<a href=\"#\">here</a>."); 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, "setStatus", ContentItemCase.STATUS_PUBLISHED); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setMainCategoryId", new Integer(3)); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLocaleId", "sv"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setHeadline", "Electronic Rykjavik klar"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setBody", "Den frsta 24-timmarsmyndigheten fr Reykjaviks kommun igng."); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLocaleId", "en"); WFComponentSelector cs = (WFComponentSelector) event.getComponent().getParent().getParent().getParent().findComponent(DISPLAY_SELECTOR_ID); cs.setSelectedId(LIST_PANEL_ID, false); cs.setSelectedId(VIEW_ARTICLE_PANEL_ID, true); }
|
public void processAction(ActionEvent event) { if (event.getComponent().getId().equals(LIST_BUTTON_ID)) { WFUtil.invoke(LIST_ARTICLES_BEAN_ID, "list"); return; } else if (event.getComponent().getId().equals(VIEW_ARTICLE_BACK_BUTTON_ID)) { WFComponentSelector cs = (WFComponentSelector) event.getComponent().findComponent(DISPLAY_SELECTOR_ID); cs.setSelectedId(LIST_PANEL_ID, true); cs.setSelectedId(VIEW_ARTICLE_PANEL_ID, false); return; } UIComponent link = event.getComponent(); String id = WFUtil.getParameter(link, "id"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "clear"); ContentItemCase caze = new ContentItemCaseBean(); caze.setPublishedFromDate(new Date()); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setCase", caze); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLocaleId", "en"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setHeadline", "Electronic Reykjavik Up-And-Running (id = " + id + ")"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setTeaser", "Teaser"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setBody", "The first 24/7 service offered by Reykjavik Municipality as part of the Electronic Reykjavik " + "concept, was launched on May 25th., as planned. Now all applications and administration " + "processes regarding Music school applications and internal student registration are " + "implemented in the IdegaWeb eGOV solution.<br/><br/>" + "All applications are submitted through the Citizen Account to the Music schools. "+ "The schools use the system to process the applications. "+ "In the Citizen Account users can see the status of cases and applications, " + "view messages and communicate with the Music school administrators.<br/><br/>" + "For more information, you can access the website of Reykjavik <a href=\"#\">here</a>. " + "Click on the icon for Electronic Reykjavik (Rafrn Reykjavik) or go directly to the portal " + "<a href=\"#\">here</a>."); 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, "setStatus", ContentItemCase.STATUS_PUBLISHED); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setMainCategoryId", new Integer(3)); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLocaleId", "sv"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setHeadline", "Electronic Rykjavik klar"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setBody", "Den frsta 24-timmarsmyndigheten fr Reykjaviks kommun igng."); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLocaleId", "en"); WFComponentSelector cs = (WFComponentSelector) event.getComponent().getParent().getParent().getParent().findComponent(DISPLAY_SELECTOR_ID); cs.setSelectedId(LIST_PANEL_ID, false); cs.setSelectedId(VIEW_ARTICLE_PANEL_ID, true); }
| 1,122,287
|
public DisplayedDocument(Shell shell, Dispatcher dispatcher) { // Shell this.shell = shell; shell.setText("Koala Notes"); shell.setLayout(new FillLayout(SWT.VERTICAL)); // Document document = new Document(); Note root = new Note("root", document, ""); // SashForm SashForm sashForm = new SashForm(shell, SWT.HORIZONTAL); // Tree and DisplayedNotes this.displayedNotes = new LinkedList<DisplayedNote>(); tree = new NoteTree(sashForm, dispatcher); new DisplayedNote(this, tree, root); // TabFolder tabFolder = new NoteTabFolder(sashForm); // Finish SashForm sashForm.setWeights(new int[] {20, 80}); // Action Groups actionGroups = new LinkedList<ActionGroup>(); actionGroups.add(new FileActionGroup(dispatcher, document)); actionGroups.add(new NoteActionGroup(dispatcher, tree)); // Menu Bar and Tree Context Menu MenuManager menuBar = new MenuManager(); MenuManager treeContextMenu = new MenuManager(); for (ActionGroup ag : actionGroups) { ag.populateMenuBar(menuBar); ag.populateTreeContextMenu(treeContextMenu); } tree.setContextMenu(treeContextMenu); shell.setMenuBar(menuBar.createMenuBar((Decorations) shell)); // Controllers new FileMenuController(dispatcher, this); new NoteMenuController(dispatcher, this); new MainController(dispatcher, this); new TreeController(dispatcher, tree); }
|
public DisplayedDocument(Shell shell, Dispatcher dispatcher) { // Shell this.shell = shell; shell.setText("Koala Notes"); shell.setLayout(new FillLayout(SWT.VERTICAL)); // Document document = new Document(); Note root = new Note("root", document, ""); // SashForm SashForm sashForm = new SashForm(shell, SWT.HORIZONTAL); // Tree and DisplayedNotes this.displayedNotes = new LinkedList<DisplayedNote>(); tree = new NoteTree(sashForm, dispatcher); new DisplayedNote(this, tree, root); // TabFolder tabFolder = new NoteTabFolder(sashForm); // Finish SashForm sashForm.setWeights(new int[] {20, 80}); // Action Groups actionGroups = new LinkedList<ActionGroup>(); actionGroups.add(new FileActionGroup(dispatcher, document)); actionGroups.add(new NoteActionGroup(dispatcher, tree)); // Menu Bar and Tree Context Menu MenuManager menuBar = new MenuManager(); MenuManager treeContextMenu = new MenuManager(); for (ActionGroup ag : actionGroups) { ag.populateMenuBar(menuBar); ag.populateTreeContextMenu(treeContextMenu); } tree.setContextMenu(treeContextMenu); shell.setMenuBar(menuBar.createMenuBar((Decorations) shell)); // Controllers new FileMenuController(dispatcher, this); new NoteMenuController(dispatcher, this); new MainController(dispatcher, this); new TreeController(dispatcher, tree); }
| 1,122,288
|
public DisplayedDocument(Shell shell, Dispatcher dispatcher) { // Shell this.shell = shell; shell.setText("Koala Notes"); shell.setLayout(new FillLayout(SWT.VERTICAL)); // Document document = new Document(); Note root = new Note("root", document, ""); // SashForm SashForm sashForm = new SashForm(shell, SWT.HORIZONTAL); // Tree and DisplayedNotes this.displayedNotes = new LinkedList<DisplayedNote>(); tree = new NoteTree(sashForm, dispatcher); new DisplayedNote(this, tree, root); // TabFolder tabFolder = new NoteTabFolder(sashForm); // Finish SashForm sashForm.setWeights(new int[] {20, 80}); // Action Groups actionGroups = new LinkedList<ActionGroup>(); actionGroups.add(new FileActionGroup(dispatcher, document)); actionGroups.add(new NoteActionGroup(dispatcher, tree)); // Menu Bar and Tree Context Menu MenuManager menuBar = new MenuManager(); MenuManager treeContextMenu = new MenuManager(); for (ActionGroup ag : actionGroups) { ag.populateMenuBar(menuBar); ag.populateTreeContextMenu(treeContextMenu); } tree.setContextMenu(treeContextMenu); shell.setMenuBar(menuBar.createMenuBar((Decorations) shell)); // Controllers new FileMenuController(dispatcher, this); new NoteMenuController(dispatcher, this); new MainController(dispatcher, this); new TreeController(dispatcher, tree); }
|
public DisplayedDocument(Shell shell, Dispatcher dispatcher) { // Shell this.shell = shell; shell.setText("Koala Notes"); shell.setLayout(new FillLayout(SWT.VERTICAL)); // Document document = new Document(); Note root = new Note("root", document, ""); // SashForm SashForm sashForm = new SashForm(shell, SWT.HORIZONTAL); // Tree and DisplayedNotes this.displayedNotes = new LinkedList<DisplayedNote>(); tree = new NoteTree(sashForm, dispatcher); new DisplayedNote(this, tree, root); // TabFolder tabFolder = new NoteTabFolder(sashForm); // Finish SashForm sashForm.setWeights(new int[] {20, 80}); // Action Groups actionGroups = new LinkedList<ActionGroup>(); actionGroups.add(new FileActionGroup(dispatcher, document)); actionGroups.add(new NoteActionGroup(dispatcher, tree)); // Menu Bar and Tree Context Menu MenuManager menuBar = new MenuManager(); MenuManager treeContextMenu = new MenuManager(); for (ActionGroup ag : actionGroups) { ag.populateMenuBar(menuBar); ag.populateTreeContextMenu(treeContextMenu); } tree.setContextMenu(treeContextMenu); shell.setMenuBar(menuBar.createMenuBar((Decorations) shell)); // Controllers new FileMenuController(dispatcher, this); new NoteMenuController(dispatcher, this); new MainController(dispatcher, this); new TreeController(dispatcher, tree); }
| 1,122,289
|
public NoteTree(Composite parent, Dispatcher d) { // Tree and context menu. tree = new Tree(parent, SWT.MULTI); // Text editor for renaming tree nodes. treeEditor = new TreeEditor(tree); treeEditor.grabHorizontal = true; treeEditor.minimumWidth = 50; // Events. tree.addListener(SWT.MouseDoubleClick, new Listener(d, MainController.DISPLAY_TAB)); Listener contextChangedListener = new Listener(d, MainController.CONTEXT_CHANGED); tree.addListener(SWT.FocusIn, contextChangedListener); tree.addListener(SWT.Selection, contextChangedListener); }
|
public NoteTree(Composite parent, Dispatcher d) { // Tree and context menu. tree = new Tree(parent, SWT.MULTI); // Text editor for renaming tree nodes. treeEditor = new TreeEditor(tree); treeEditor.grabHorizontal = true; treeEditor.minimumWidth = 50; // Events. tree.addListener(SWT.MouseDoubleClick, new Listener(d, MainController.DISPLAY_TAB)); tree.addListener(SWT.FocusIn, contextChangedListener); tree.addListener(SWT.Selection, contextChangedListener); }
| 1,122,290
|
public TreeController(DisplayedDocument displayedDocument) { super(displayedDocument); }
|
public TreeController(DisplayedDocument displayedDocument) { super(displayedDocument); }
| 1,122,293
|
public static long getUrlLastModified(URL u) { String protocol = u.getProtocol(); if (protocol.equals("file")) { // We're going to use the File mechanism instead File f = new File(u.getFile()); return f.lastModified(); } else if (protocol.equals("jar")) { // We'll extract the jar source and recurse String source = u.getFile(); int lastIndex = source.lastIndexOf("!"); if (lastIndex > 0) source = source.substring(lastIndex); try { return getUrlLastModified(new URL(source)); } catch (MalformedURLException e) { return 0; } } else { // Ask the URL, maybe it knows try { URLConnection uc = u.openConnection(); uc.connect(); return uc.getLastModified(); } catch (IOException e) { return 0; } } }
|
public static long getUrlLastModified(URL u) { String protocol = u.getProtocol(); if (protocol.equals("file")) { // We're going to use the File mechanism instead File f = new File(u.getFile()); return f.lastModified(); } else if (protocol.equals("jar")) { // We'll extract the jar source and recurse String source = u.getFile(); int lastIndex = source.lastIndexOf("!"); if (lastIndex > 0) source = source.substring(0, lastIndex); try { return getUrlLastModified(new URL(source)); } catch (MalformedURLException e) { return 0; } } else { // Ask the URL, maybe it knows try { URLConnection uc = u.openConnection(); uc.connect(); return uc.getLastModified(); } catch (IOException e) { return 0; } } }
| 1,122,294
|
public static void copy(File destinationDir) throws IOException { File cssOutputDir = new File(destinationDir, "css"); File imagesOutputDir = new File(destinationDir, "images"); File jsOutputDir = new File(destinationDir, "js"); destinationDir.mkdirs(); cssOutputDir.mkdir(); imagesOutputDir.mkdir(); jsOutputDir.mkdir(); copyResourceFromJar("help.css", cssOutputDir); copyResourceFromJar("main.css", cssOutputDir); copyResourceFromJar("sortabletable.css", cssOutputDir); copyResourceFromJar("source-viewer.css", cssOutputDir); copyResourceFromJar("tooltip.css", cssOutputDir); copyResourceFromJar("blank.png", imagesOutputDir); copyResourceFromJar("downsimple.png", imagesOutputDir); copyResourceFromJar("upsimple.png", imagesOutputDir); //copyResourceFromJar("numberksorttype.js", jsOutputDir); copyResourceFromJar("percentagesorttype.js", jsOutputDir); copyResourceFromJar("popup.js", jsOutputDir); copyResourceFromJar("sortabletable.js", jsOutputDir); copyResourceFromJar("stringbuilder.js", jsOutputDir); //copyResourceFromJar("uscurrencysorttype.js", jsOutputDir); copyResourceFromJar("help.html", destinationDir); copyResourceFromJar("index.html", destinationDir); }
|
public static void copy(File destinationDir) throws IOException { File cssOutputDir = new File(destinationDir, "css"); File imagesOutputDir = new File(destinationDir, "images"); File jsOutputDir = new File(destinationDir, "js"); destinationDir.mkdirs(); cssOutputDir.mkdir(); imagesOutputDir.mkdir(); jsOutputDir.mkdir(); copyResourceFromJar("help.css", cssOutputDir); copyResourceFromJar("main.css", cssOutputDir); copyResourceFromJar("sortabletable.css", cssOutputDir); copyResourceFromJar("source-viewer.css", cssOutputDir); copyResourceFromJar("tooltip.css", cssOutputDir); copyResourceFromJar("blank.png", imagesOutputDir); copyResourceFromJar("downsimple.png", imagesOutputDir); copyResourceFromJar("upsimple.png", imagesOutputDir); //copyResourceFromJar("numberksorttype.js", jsOutputDir); copyResourceFromJar("customsorttypes.js", jsOutputDir); copyResourceFromJar("popup.js", jsOutputDir); copyResourceFromJar("sortabletable.js", jsOutputDir); copyResourceFromJar("stringbuilder.js", jsOutputDir); //copyResourceFromJar("uscurrencysorttype.js", jsOutputDir); copyResourceFromJar("help.html", destinationDir); copyResourceFromJar("index.html", destinationDir); }
| 1,122,295
|
private static Vector getListOfFiles(File file, boolean recursive) { Vector ret = new Vector(); if (file.isFile()) { ret.add(file.getAbsolutePath()); } else if (file.isDirectory()) { File[] files = file.listFiles(new FileFilter() { public boolean accept(File pathname) { return pathname.getAbsolutePath().endsWith(".java"); } }); for (int i = 0; i < files.length; i++) { if (recursive) { ret.addAll(getListOfFiles(files[i], true)); } else { if (files[i].isFile()) { ret.add(files[i].getAbsolutePath()); } } } } return ret; }
|
private static Vector getListOfFiles(File file, boolean recursive) { Vector ret = new Vector(); if (file.isFile()) { ret.add(file.getAbsolutePath()); } else if (file.isDirectory()) { File[] files = file.listFiles(new FileFilter() { public boolean accept(File pathname) { return pathname.getAbsolutePath().endsWith(".java"); } }); for (int i = 0; i < files.length; i++) { if (recursive) { ret.addAll(getListOfFiles(files[i], true)); } else { if (files[i].isFile()) { ret.add(files[i].getAbsolutePath()); } } } } return ret; }
| 1,122,297
|
public boolean accept(File pathname) { return pathname.getAbsolutePath().endsWith(".java"); }
|
public boolean accept(File pathname) { return pathname.getAbsolutePath().endsWith(".java"); }
| 1,122,298
|
public boolean waitForUnsatisfiedConditions(ServiceName serviceName, Set conditions) throws UnsatisfiedConditionsException { throw new UnsatisfiedConditionsException("Unsatisfied start conditions", serviceName, conditions); }
|
public boolean waitForUnsatisfiedConditions(ServiceName serviceName, Set conditions) throws UnsatisfiedConditionsException { throw new UnsatisfiedConditionsException("Unsatisfied stop conditions", serviceName, conditions); }
| 1,122,299
|
public ForcedStopException(ServiceName serviceName, Set unsatisfiedConditions) { super("Forced stop and ignored unsatisfied conditons:" + " serviceName=" + serviceName + ", unsatisfiedConditions=" + unsatisfiedConditions); this.serviceName = serviceName; this.unsatisfiedConditions = unsatisfiedConditions; }
|
public ForcedStopException(ServiceName serviceName, Set unsatisfiedConditions) { super("Forced stop and ignored unsatisfied conditons:" + " serviceName=" + serviceName + ", unsatisfiedConditions=" + unsatisfiedConditions); this.serviceName = serviceName; this.unsatisfiedConditions = Collections.unmodifiableSet(unsatisfiedConditions); }
| 1,122,300
|
public UnsatisfiedConditionsException(String message, ServiceName serviceName, Set unsatisfiedConditions) { super(message + ": serviceName=" + serviceName + ": unsatisfiedConditions=" + unsatisfiedConditions); this.serviceName = serviceName; this.unsatisfiedConditions = unsatisfiedConditions; }
|
public UnsatisfiedConditionsException(String message, ServiceName serviceName, Set unsatisfiedConditions) { super(message + ": serviceName=" + serviceName + ": unsatisfiedConditions=" + unsatisfiedConditions); this.serviceName = serviceName; this.unsatisfiedConditions = Collections.unmodifiableSet(unsatisfiedConditions); }
| 1,122,301
|
public Main(String[] args) throws IOException { Copyright.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[1] = new LongOpt("line", LongOpt.REQUIRED_ARGUMENT, null, 'l'); longOpts[2] = new LongOpt("directory", LongOpt.REQUIRED_ARGUMENT, null, 'd'); longOpts[3] = new LongOpt("regex", LongOpt.REQUIRED_ARGUMENT, null, 'r'); Getopt g = new Getopt(getClass().getName(), args, ":b:l:d:r:", longOpts); int c; double branchCoverageRate = 0.8; double lineCoverageRate = 0.7; while ((c = g.getopt()) != -1) { switch (c) { case 'b': branchCoverageRate = inRangeAndDivideByOneHundred(g .getOptarg()); break; case 'l': lineCoverageRate = inRangeAndDivideByOneHundred(g .getOptarg()); break; case 'd': setInstrumentationDirectory(new File(g.getOptarg())); break; case 'r': setMinimumCoverageRate(g.getOptarg()); break; } } minimumCoverageRate = new CoverageRate(lineCoverageRate, branchCoverageRate); if (logger.isInfoEnabled()) { logger.info("instrumentation directory: " + instrumentationDirectory); } merge(loadInstrumentation(new FileInputStream(new File( instrumentationDirectory, InstrumentationPersistence.FILE_NAME)))); if (logger.isInfoEnabled()) { logger .info("instrumentation has " + keySet().size() + " entries"); } Iterator i = keySet().iterator(); while (i.hasNext()) { String key = (String)i.next(); CoverageRate coverageRate = findMinimumCoverageRate(key); CoverageData instrumentation = getInstrumentation(key); if (logger.isInfoEnabled()) { StringBuffer sb = new StringBuffer(); sb.append(key); sb.append(", line: "); sb.append(percentage(instrumentation.getLineCoverageRate())); sb.append("% ("); sb.append(percentage(coverageRate.getLineCoverageRate())); sb.append("%), branch: "); sb .append(percentage(instrumentation .getBranchCoverageRate())); sb.append("% ("); sb.append(percentage(coverageRate.getBranchCoverageRate())); sb.append("%)"); logger.info(sb.toString()); } if (instrumentation.getLineCoverageRate() < coverageRate .getLineCoverageRate()) { StringBuffer sb = new StringBuffer(); sb.append(key); sb.append(" line coverage rate of: "); sb.append(percentage(instrumentation.getLineCoverageRate())); sb.append("% (required: "); sb.append(percentage(coverageRate.getLineCoverageRate())); sb.append("%)"); System.out.println(sb.toString()); } if (instrumentation.getBranchCoverageRate() < coverageRate .getBranchCoverageRate()) { StringBuffer sb = new StringBuffer(); sb.append(key); sb.append(" branch coverage rate of: "); sb .append(percentage(instrumentation .getBranchCoverageRate())); sb.append("% (required: "); sb.append(percentage(coverageRate.getBranchCoverageRate())); sb.append("%)"); System.out.println(sb.toString()); } } }
|
public Main(String[] args) throws IOException { Header.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[1] = new LongOpt("line", LongOpt.REQUIRED_ARGUMENT, null, 'l'); longOpts[2] = new LongOpt("directory", LongOpt.REQUIRED_ARGUMENT, null, 'd'); longOpts[3] = new LongOpt("regex", LongOpt.REQUIRED_ARGUMENT, null, 'r'); Getopt g = new Getopt(getClass().getName(), args, ":b:l:d:r:", longOpts); int c; double branchCoverageRate = 0.8; double lineCoverageRate = 0.7; while ((c = g.getopt()) != -1) { switch (c) { case 'b': branchCoverageRate = inRangeAndDivideByOneHundred(g .getOptarg()); break; case 'l': lineCoverageRate = inRangeAndDivideByOneHundred(g .getOptarg()); break; case 'd': setInstrumentationDirectory(new File(g.getOptarg())); break; case 'r': setMinimumCoverageRate(g.getOptarg()); break; } } minimumCoverageRate = new CoverageRate(lineCoverageRate, branchCoverageRate); if (logger.isInfoEnabled()) { logger.info("instrumentation directory: " + instrumentationDirectory); } merge(loadInstrumentation(new FileInputStream(new File( instrumentationDirectory, InstrumentationPersistence.FILE_NAME)))); if (logger.isInfoEnabled()) { logger .info("instrumentation has " + keySet().size() + " entries"); } Iterator i = keySet().iterator(); while (i.hasNext()) { String key = (String)i.next(); CoverageRate coverageRate = findMinimumCoverageRate(key); CoverageData instrumentation = getInstrumentation(key); if (logger.isInfoEnabled()) { StringBuffer sb = new StringBuffer(); sb.append(key); sb.append(", line: "); sb.append(percentage(instrumentation.getLineCoverageRate())); sb.append("% ("); sb.append(percentage(coverageRate.getLineCoverageRate())); sb.append("%), branch: "); sb .append(percentage(instrumentation .getBranchCoverageRate())); sb.append("% ("); sb.append(percentage(coverageRate.getBranchCoverageRate())); sb.append("%)"); logger.info(sb.toString()); } if (instrumentation.getLineCoverageRate() < coverageRate .getLineCoverageRate()) { StringBuffer sb = new StringBuffer(); sb.append(key); sb.append(" line coverage rate of: "); sb.append(percentage(instrumentation.getLineCoverageRate())); sb.append("% (required: "); sb.append(percentage(coverageRate.getLineCoverageRate())); sb.append("%)"); System.out.println(sb.toString()); } if (instrumentation.getBranchCoverageRate() < coverageRate .getBranchCoverageRate()) { StringBuffer sb = new StringBuffer(); sb.append(key); sb.append(" branch coverage rate of: "); sb .append(percentage(instrumentation .getBranchCoverageRate())); sb.append("% (required: "); sb.append(percentage(coverageRate.getBranchCoverageRate())); sb.append("%)"); System.out.println(sb.toString()); } } }
| 1,122,303
|
public SpringServiceFactory(RootBeanDefinition beanDefinition, Map objectNameMap) throws Exception { this.beanDefinition = beanDefinition; this.objectNameMap = objectNameMap; extractDependencies(beanDefinition); }
|
public SpringServiceFactory(RootBeanDefinition beanDefinition, Map objectNameMap) throws Exception { this.beanDefinition = beanDefinition; this.objectNameMap = objectNameMap; dependencies = SpringUtil.extractDependencies(beanDefinition, objectNameMap); }
| 1,122,304
|
public Object createService(final ServiceContext serviceContext) throws Exception { Object service = null; try { ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); ServiceContext oldServiceContext = ServiceContextThreadLocal.get(); try { Thread.currentThread().setContextClassLoader(serviceContext.getClassLoader()); ServiceContextThreadLocal.set(serviceContext); ApplicationContext parent = new ApplicationContext() { public ApplicationContext getParent() { throw new UnsupportedOperationException(); } public String getDisplayName() { throw new UnsupportedOperationException(); } public long getStartupDate() { throw new UnsupportedOperationException(); } public void publishEvent(ApplicationEvent event) {// throw new UnsupportedOperationException(); } public boolean containsBeanDefinition(String beanName) { throw new UnsupportedOperationException(); } public int getBeanDefinitionCount() { throw new UnsupportedOperationException(); } public String[] getBeanDefinitionNames() { throw new UnsupportedOperationException(); } public String[] getBeanDefinitionNames(Class type) { throw new UnsupportedOperationException(); } public String[] getBeanNamesForType(Class type) { throw new UnsupportedOperationException(); } public String[] getBeanNamesForType(Class type, boolean includePrototypes, boolean includeFactoryBeans) { throw new UnsupportedOperationException(); } public Map getBeansOfType(Class type) throws BeansException { throw new UnsupportedOperationException(); } public Map getBeansOfType(Class type, boolean includePrototypes, boolean includeFactoryBeans) throws BeansException { throw new UnsupportedOperationException(); } public Object getBean(String name) throws BeansException { throw new UnsupportedOperationException(); } public Object getBean(String name, Class requiredType) throws BeansException { ObjectName objectName = null; try { objectName = getObjectName(name); } catch (MalformedObjectNameException e) { throw (NoSuchBeanDefinitionException) new NoSuchBeanDefinitionException(name, "Could not create an objectname for the specified name").initCause(e); } try { Object service = serviceContext.getKernel().getService(objectName); return service; } catch (Exception e) { throw (NoSuchBeanDefinitionException) new NoSuchBeanDefinitionException(name, "Kernel threw an exception").initCause(e); } } public boolean containsBean(String name) { throw new UnsupportedOperationException(); } public boolean isSingleton(String name) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException(); } public Class getType(String name) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException(); } public String[] getAliases(String name) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException(); } public BeanFactory getParentBeanFactory() { throw new UnsupportedOperationException(); } public String getMessage(String code, Object[] args, String defaultMessage, Locale locale) { throw new UnsupportedOperationException(); } public String getMessage(String code, Object[] args, Locale locale) throws NoSuchMessageException { throw new UnsupportedOperationException(); } public String getMessage(MessageSourceResolvable resolvable, Locale locale) throws NoSuchMessageException { throw new UnsupportedOperationException(); } public Resource[] getResources(String locationPattern) { throw new UnsupportedOperationException(); } public Resource getResource(String location) { throw new UnsupportedOperationException(); } }; applicationContext = new GenericApplicationContext(parent); applicationContext.registerBeanDefinition(serviceContext.getObjectName(), beanDefinition); applicationContext.refresh(); service = applicationContext.getBean(serviceContext.getObjectName()); } finally { Thread.currentThread().setContextClassLoader(oldClassLoader); ServiceContextThreadLocal.set(oldServiceContext); } } catch (Throwable t) { applicationContext = null; if (t instanceof Exception) { throw (Exception) t; } else if (t instanceof Error) { throw (Error) t; } else { throw new Error(t); } } return service; }
|
public Object createService(final ServiceContext serviceContext) throws Exception { Object service = null; try { ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); ServiceContext oldServiceContext = ServiceContextThreadLocal.get(); try { Thread.currentThread().setContextClassLoader(serviceContext.getClassLoader()); ServiceContextThreadLocal.set(serviceContext); ApplicationContext parent = new ApplicationContext() { public ApplicationContext getParent() { throw new UnsupportedOperationException(); } public String getDisplayName() { throw new UnsupportedOperationException(); } public long getStartupDate() { throw new UnsupportedOperationException(); } public void publishEvent(ApplicationEvent event) {// throw new UnsupportedOperationException(); } public boolean containsBeanDefinition(String beanName) { throw new UnsupportedOperationException(); } public int getBeanDefinitionCount() { throw new UnsupportedOperationException(); } public String[] getBeanDefinitionNames() { throw new UnsupportedOperationException(); } public String[] getBeanDefinitionNames(Class type) { throw new UnsupportedOperationException(); } public String[] getBeanNamesForType(Class type) { throw new UnsupportedOperationException(); } public String[] getBeanNamesForType(Class type, boolean includePrototypes, boolean includeFactoryBeans) { throw new UnsupportedOperationException(); } public Map getBeansOfType(Class type) throws BeansException { throw new UnsupportedOperationException(); } public Map getBeansOfType(Class type, boolean includePrototypes, boolean includeFactoryBeans) throws BeansException { throw new UnsupportedOperationException(); } public Object getBean(String name) throws BeansException { throw new UnsupportedOperationException(); } public Object getBean(String name, Class requiredType) throws BeansException { ObjectName objectName = null; try { objectName = SpringUtil.getObjectName(objectNameMap, name); } catch (MalformedObjectNameException e) { throw (NoSuchBeanDefinitionException) new NoSuchBeanDefinitionException(name, "Could not create an objectname for the specified name").initCause(e); } try { Object service = serviceContext.getKernel().getService(objectName); return service; } catch (Exception e) { throw (NoSuchBeanDefinitionException) new NoSuchBeanDefinitionException(name, "Kernel threw an exception").initCause(e); } } public boolean containsBean(String name) { throw new UnsupportedOperationException(); } public boolean isSingleton(String name) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException(); } public Class getType(String name) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException(); } public String[] getAliases(String name) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException(); } public BeanFactory getParentBeanFactory() { throw new UnsupportedOperationException(); } public String getMessage(String code, Object[] args, String defaultMessage, Locale locale) { throw new UnsupportedOperationException(); } public String getMessage(String code, Object[] args, Locale locale) throws NoSuchMessageException { throw new UnsupportedOperationException(); } public String getMessage(MessageSourceResolvable resolvable, Locale locale) throws NoSuchMessageException { throw new UnsupportedOperationException(); } public Resource[] getResources(String locationPattern) { throw new UnsupportedOperationException(); } public Resource getResource(String location) { throw new UnsupportedOperationException(); } }; applicationContext = new GenericApplicationContext(parent); applicationContext.registerBeanDefinition(serviceContext.getObjectName(), beanDefinition); applicationContext.refresh(); service = applicationContext.getBean(serviceContext.getObjectName()); } finally { Thread.currentThread().setContextClassLoader(oldClassLoader); ServiceContextThreadLocal.set(oldServiceContext); } } catch (Throwable t) { applicationContext = null; if (t instanceof Exception) { throw (Exception) t; } else if (t instanceof Error) { throw (Error) t; } else { throw new Error(t); } } return service; }
| 1,122,305
|
void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException;
|
void visitBeanDefinition(String beanName, BeanDefinition beanDefinition, Object data) throws BeansException;
| 1,122,306
|
public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { visitConstructorArgumentValues(beanDefinition.getConstructorArgumentValues()); visitMutablePropertyValues(beanDefinition.getPropertyValues()); }
|
public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { visitConstructorArgumentValues(beanDefinition.getConstructorArgumentValues()); visitMutablePropertyValues(beanDefinition.getPropertyValues()); }
| 1,122,307
|
public void visitRuntimeBeanReference(RuntimeBeanReference beanReference) throws BeansException { }
|
public void visitRuntimeBeanReference(RuntimeBeanReference beanReference, Object data) throws BeansException { }
| 1,122,308
|
public Collection<ChatRoom> getStaleChatRooms() { final List<ChatRoom> staleRooms = new ArrayList<ChatRoom>(); for (ChatRoom chatRoom : getChatRooms()) { long lastActivity = chatRoom.getLastActivity(); long currentTime = System.currentTimeMillis(); long diff = currentTime - lastActivity; int minutes = (int)(diff / (60 * 1000F)); LocalPreferences pref = SettingsManager.getLocalPreferences(); int timeoutMinutes = pref.getChatLengthDefaultTimeout(); try { ChatRoom activeChatRoom = getActiveChatRoom(); if (activeChatRoom == chatRoom) { continue; } } catch (ChatRoomNotFoundException e) { } if (timeoutMinutes <= minutes) { staleRooms.add(chatRoom); } } return staleRooms; }
|
public Collection<ChatRoom> getStaleChatRooms() { final List<ChatRoom> staleRooms = new ArrayList<ChatRoom>(); for (ChatRoom chatRoom : getChatRooms()) { long lastActivity = chatRoom.getLastActivity(); long currentTime = System.currentTimeMillis(); long diff = currentTime - lastActivity; int minutes = (int)(diff / (60 * 1000F)); LocalPreferences pref = SettingsManager.getLocalPreferences(); int timeoutMinutes = pref.getChatLengthDefaultTimeout(); try { ChatRoom activeChatRoom = getActiveChatRoom(); if (activeChatRoom == chatRoom) { continue; } } catch (ChatRoomNotFoundException e) { } if (timeoutMinutes <= minutes) { staleRooms.add(chatRoom); } } return staleRooms; }
| 1,122,310
|
public void useTabDefault(final ChatRoom room) { final int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); Font font = titleLabel.getFont(); titleLabel.setForeground(Color.black); Font newFont = font.deriveFont(Font.PLAIN); titleLabel.setFont(newFont); titleLabel.validate(); titleLabel.repaint(); } }
|
public void useTabDefault(final ChatRoom room) { final int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); titleLabel.setForeground(Color.black); Font newFont = font.deriveFont(Font.PLAIN); titleLabel.setFont(newFont); titleLabel.validate(); titleLabel.repaint(); } }
| 1,122,312
|
public void useTabDefault(final ChatRoom room) { final int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); Font font = titleLabel.getFont(); titleLabel.setForeground(Color.black); Font newFont = font.deriveFont(Font.PLAIN); titleLabel.setFont(newFont); titleLabel.validate(); titleLabel.repaint(); } }
|
public void useTabDefault(final ChatRoom room) { final int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); Font font = titleLabel.getFont(); titleLabel.setForeground(Color.black); Font newFont = font.deriveFont(Font.PLAIN); titleLabel.setFont(newFont); titleLabel.validate(); titleLabel.repaint(); } }
| 1,122,313
|
public KernelErrorsError(List errors) { assert errors != null : "errors is null"; assert !errors.isEmpty() : "errors is empty"; assert assertAllErrors(errors); this.errors = Collections.unmodifiableList(errors); }
|
public KernelErrorsError(List errors) { assert errors != null : "errors is null"; assert !errors.isEmpty() : "errors is empty"; assert assertAllErrors(errors); this.errors = Collections.unmodifiableList(errors); }
| 1,122,314
|
protected Java getJava() { if (java == null) { java = (Java)getProject().createTask("java"); java.setTaskName(getTaskName()); java.setClassname(getClassName()); java.setFork(true); java.setDir(getProject().getBaseDir()); /** * We replace %20 with a space character because, for some * reason, when we call Cobertura from within CruiseControl, * the classpath here contains %20's instead of spaces. I * don't know if this is our problem, or CruiseControl, or * ant, but this seems to fix it. --Mark */ if (getClass().getClassLoader() instanceof AntClassLoader) { String classpath = ((AntClassLoader)getClass() .getClassLoader()).getClasspath(); createClasspath().setPath( StringUtil.replaceAll(classpath, "%20", " ")); } else if (getClass().getClassLoader() instanceof URLClassLoader) { URL[] earls = ((URLClassLoader)getClass().getClassLoader()) .getURLs(); for (int i = 0; i < earls.length; i++) { String classpath = earls[i].getFile(); createClasspath().setPath( StringUtil.replaceAll(classpath, "%20", " ")); } } } return java; }
|
protected Java getJava() { if (java == null) { java = (Java)getProject().createTask("java"); java.setTaskName(getTaskName()); java.setClassname(getClassName()); java.setFork(true); java.setDir(getProject().getBaseDir()); /** * We replace %20 with a space character because, for some * reason, when we call Cobertura from within CruiseControl, * the classpath here contains %20's instead of spaces. I * don't know if this is our problem, or CruiseControl, or * ant, but this seems to fix it. --Mark */ if (getClass().getClassLoader() instanceof AntClassLoader) { String classpath = ((AntClassLoader)getClass() .getClassLoader()).getClasspath(); createClasspath().setPath( StringUtil.replaceAll(classpath, "%20", " ")); } else if (getClass().getClassLoader() instanceof URLClassLoader) { URL[] earls = ((URLClassLoader)getClass().getClassLoader()) .getURLs(); for (int i = 0; i < earls.length; i++) { String classpath = (new File(earls[i].getFile())).getAbsolutePath(); createClasspath().setPath( StringUtil.replaceAll(classpath, "%20", " ")); } } } return java; }
| 1,122,316
|
public ComponentMap(Settings initProps) { _config = initProps; }
|
public ComponentMap(Settings initProps) { _config = initProps; }
| 1,122,318
|
public void load(String namelist, String suffix) { load(tokenize(namelist), suffix); }
|
public void load(String namelist, String suffix) { load(tokenize(namelist), suffix); }
| 1,122,319
|
public static void main(String arg[]) { try { EncodingCache ec = new EncodingCache("UTF8", 11, 3); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String s; while ((s = in.readLine()) != null) { s = s.intern(); System.out.print("Encoding string: " + s + " --> ["); System.out.write( ec.getEncoding(s) ); System.out.println("]"); } } catch (Exception e) { e.printStackTrace(); } }
|
public static void main(String arg[]) { try { EncodingCache ec = new EncodingCache("UTF16-LE", 11, 3); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String s; while ((s = in.readLine()) != null) { s = s.intern(); System.out.print("Encoding string: " + s + " --> ["); System.out.write( ec.getEncoding(s) ); System.out.println("]"); } } catch (Exception e) { e.printStackTrace(); } }
| 1,122,320
|
public static void main(String arg[]) { try { EncodingCache ec = new EncodingCache("UTF8", 11, 3); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String s; while ((s = in.readLine()) != null) { s = s.intern(); System.out.print("Encoding string: " + s + " --> ["); System.out.write( ec.getEncoding(s) ); System.out.println("]"); } } catch (Exception e) { e.printStackTrace(); } }
|
public static void main(String arg[]) { try { EncodingCache ec = new EncodingCache("UTF8", 11, 3); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String s; while ((s = in.readLine()) != null) { s = s.intern(); System.out.print("Encoding string: " + s + " --> ["); System.out.write( ec.getEncoding(s) ); System.out.println("]"); } } catch (Exception e) { e.printStackTrace(); } }
| 1,122,321
|
public TreeContextMenuController(DisplayedDocument displayedDocument) { super(displayedDocument); }
|
public TreeContextMenuController(DisplayedDocument displayedDocument) { super(displayedDocument); }
| 1,122,322
|
protected Method getMethod(String methodDescriptor) { String className = getClass().getCanonicalName(); if (!methodDescriptor.startsWith(className)) return null; int separator = className.length(); try { return getClass().getMethod(methodDescriptor.substring(separator + 1), METHOD_ARGS); } catch (NoSuchMethodException ex) { return null; } }
|
protected Method getMethod(String methodDescriptor) { String className = getClass().getCanonicalName(); if (!methodDescriptor.startsWith(className)) return null; int separator = className.length(); try { return getClass().getMethod(methodDescriptor.substring(separator + 1), METHOD_ARGS); } catch (NoSuchMethodException ex) { return null; } }
| 1,122,323
|
IncludeDirective(Object fileName) { _fileName = fileName; }
|
IncludeDirective(Macro fileName) { _fileName = fileName; }
| 1,122,324
|
public static Object build(BuildContext rc, Object target) { IncludeDirective id = new IncludeDirective(target); if (! (target instanceof Macro)) { try { return (id.evaluate(null)); } catch (Exception e) { // try again at runtime } } return id; }
|
public static Object build(BuildContext rc, Object target) { IncludeDirective id = new IncludeDirective(target); if (! (target instanceof Macro)) { try { return (id.evaluate(null)); } catch (Exception e) { // try again at runtime } } return id; }
| 1,122,325
|
public static Object build(BuildContext rc, Object target) { IncludeDirective id = new IncludeDirective(target); if (! (target instanceof Macro)) { try { return (id.evaluate(null)); } catch (Exception e) { // try again at runtime } } return id; }
|
public static Object build(BuildContext rc, Object target) { IncludeDirective id = new IncludeDirective(target); if (! (target instanceof Macro)) { try { return (id.evaluate(null)); } catch (Exception e) { // try again at runtime } } return id; }
| 1,122,326
|
public static Object build(BuildContext rc, Object target) { IncludeDirective id = new IncludeDirective(target); if (! (target instanceof Macro)) { try { return (id.evaluate(null)); } catch (Exception e) { // try again at runtime } } return id; }
|
public static Object build(BuildContext rc, Object target) { IncludeDirective id = new IncludeDirective(target); if (! (target instanceof Macro)) { try { return (id.evaluate(null)); } catch (Exception e) { // try again at runtime } } return id; }
| 1,122,327
|
public static Object build(BuildContext rc, Object target) { IncludeDirective id = new IncludeDirective(target); if (! (target instanceof Macro)) { try { return (id.evaluate(null)); } catch (Exception e) { // try again at runtime } } return id; }
|
public static Object build(BuildContext rc, Object target) { IncludeDirective id = new IncludeDirective(target); if (! (target instanceof Macro)) { try { return (id.evaluate(null)); } catch (Exception e) { // try again at runtime } } return id; }
| 1,122,328
|
final public Object evaluate(Context context) throws InvalidContextException { Object fname = null; try { fname = (_fileName instanceof Macro) ? ((Macro) _fileName).evaluate(context) : _fileName; if (fname == null) { throw new InvalidContextException("Attempt to include " + _fileName + " which evaluates to null"); } return context.getBroker().getValue("url",fname.toString()); } catch (NotFoundException e) { throw new InvalidContextException("Attempt to include " + _fileName + " which evaluates to the non-existant " + fname + ": " + e); } catch (InvalidTypeException e) { throw new InvalidContextException("Attempt to load URLs failed " + " broker does not have a URL provider:" + e); } }
|
final public Object evaluate(Context context) throws InvalidContextException { Object fname = _fileName.evaluate(context); if (fname == null) { throw new InvalidContextException( "#include could not resolve filename: " + "target argument resolved to a null."); } try { fname = (_fileName instanceof Macro) ? ((Macro) _fileName).evaluate(context) : _fileName; if (fname == null) { throw new InvalidContextException("Attempt to include " + _fileName + " which evaluates to null"); } return context.getBroker().getValue("url",fname.toString()); } catch (NotFoundException e) { throw new InvalidContextException("Attempt to include " + _fileName + " which evaluates to the non-existant " + fname + ": " + e); } catch (InvalidTypeException e) { throw new InvalidContextException("Attempt to load URLs failed " + " broker does not have a URL provider:" + e); } }
| 1,122,329
|
final public Object evaluate(Context context) throws InvalidContextException { Object fname = null; try { fname = (_fileName instanceof Macro) ? ((Macro) _fileName).evaluate(context) : _fileName; if (fname == null) { throw new InvalidContextException("Attempt to include " + _fileName + " which evaluates to null"); } return context.getBroker().getValue("url",fname.toString()); } catch (NotFoundException e) { throw new InvalidContextException("Attempt to include " + _fileName + " which evaluates to the non-existant " + fname + ": " + e); } catch (InvalidTypeException e) { throw new InvalidContextException("Attempt to load URLs failed " + " broker does not have a URL provider:" + e); } }
|
final public Object evaluate(Context context) throws InvalidContextException { Object fname = null; try { fname = (_fileName instanceof Macro) ? ((Macro) _fileName).evaluate(context) : _fileName; if (fname == null) { throw new InvalidContextException("Attempt to include " + _fileName + " which evaluates to null"); } return context.getBroker().getValue("url",fname.toString()); } catch (NotFoundException e) { throw new InvalidContextException("Attempt to include " + _fileName + " which evaluates to the non-existant " + fname + ": " + e); } catch (InvalidTypeException e) { throw new InvalidContextException("Attempt to load URLs failed " + " broker does not have a URL provider:" + e); } }
| 1,122,330
|
public void commit() { LocalPreferences pref = SettingsManager.getLocalPreferences(); pref.setTimeDisplayedInChat(panel.getShowTime()); pref.setSpellCheckerEnabled(!panel.isSpellCheckerOn()); pref.setChatRoomNotifications(!panel.isGroupChatNotificationsOn()); pref.setHideChatHistory(panel.isChatHistoryHidden()); SettingsManager.saveSettings(); // Do not commit if not changed. if (ModelUtil.hasLength(panel.getPassword()) && ModelUtil.hasLength(panel.getConfirmationPassword())) { try { SparkManager.getConnection().getAccountManager().changePassword(panel.getPassword()); } catch (XMPPException passwordEx) { JOptionPane.showMessageDialog(SparkManager.getMainWindow(), "Unable to change password. Please see your server admin.", "Password Change Error", JOptionPane.ERROR_MESSAGE); Log.error("Unable to change password", passwordEx); } } }
|
public void commit() { LocalPreferences pref = SettingsManager.getLocalPreferences(); pref.setTimeDisplayedInChat(panel.getShowTime()); pref.setSpellCheckerEnabled(!panel.isSpellCheckerOn()); pref.setChatRoomNotifications(!panel.isGroupChatNotificationsOn()); pref.setHideChatHistory(panel.isChatHistoryHidden()); SettingsManager.saveSettings(); // Do not commit if not changed. if (ModelUtil.hasLength(panel.getPassword()) && ModelUtil.hasLength(panel.getConfirmationPassword())) { try { SparkManager.getConnection().getAccountManager().changePassword(panel.getPassword()); } catch (XMPPException passwordEx) { JOptionPane.showMessageDialog(SparkManager.getMainWindow(), "Unable to change password. Please see your server admin.", "Password Change Error", JOptionPane.ERROR_MESSAGE); Log.error("Unable to change password", passwordEx); } } }
| 1,122,331
|
public RubyFile(IRuby runtime, String path, final Reader reader) { this(runtime, path, new InputStream() { public int read() throws IOException { return reader.read(); } }); }
|
public RubyFile(IRuby runtime, String path, final Reader reader) { this(runtime, path, new InputStream() { public int read() throws IOException { return reader.read(); } }); }
| 1,122,332
|
public void execute() throws BuildException { initArgs(); if (toDir != null) { addArg("-d"); addArg(toDir.toString()); } // TODO: ignoreRegex.setRegex() is never called if (ignoreRegex != null) { addArg("-ignore"); addArg(ignoreRegex.getRegex()); } Set filenames = new HashSet(); Iterator i = fileSets.iterator(); while (i.hasNext()) { FileSet fileSet = (FileSet)i.next(); addArg("-basedir"); addArg(baseDir(fileSet)); filenames.addAll(Arrays.asList(getFilenames(fileSet))); } coverage((String[])filenames.toArray(new String[filenames.size()])); unInitArgs(); }
|
public void execute() throws BuildException { initArgs(); if (toDir != null) { addArg("--destination"); addArg(toDir.toString()); } // TODO: ignoreRegex.setRegex() is never called if (ignoreRegex != null) { addArg("-ignore"); addArg(ignoreRegex.getRegex()); } Set filenames = new HashSet(); Iterator i = fileSets.iterator(); while (i.hasNext()) { FileSet fileSet = (FileSet)i.next(); addArg("-basedir"); addArg(baseDir(fileSet)); filenames.addAll(Arrays.asList(getFilenames(fileSet))); } coverage((String[])filenames.toArray(new String[filenames.size()])); unInitArgs(); }
| 1,122,333
|
public void execute() throws BuildException { initArgs(); if (toDir != null) { addArg("-d"); addArg(toDir.toString()); } // TODO: ignoreRegex.setRegex() is never called if (ignoreRegex != null) { addArg("-ignore"); addArg(ignoreRegex.getRegex()); } Set filenames = new HashSet(); Iterator i = fileSets.iterator(); while (i.hasNext()) { FileSet fileSet = (FileSet)i.next(); addArg("-basedir"); addArg(baseDir(fileSet)); filenames.addAll(Arrays.asList(getFilenames(fileSet))); } coverage((String[])filenames.toArray(new String[filenames.size()])); unInitArgs(); }
|
public void execute() throws BuildException { initArgs(); if (toDir != null) { addArg("-d"); addArg(toDir.toString()); } // TODO: ignoreRegex.setRegex() is never called if (ignoreRegex != null) { addArg("--ignore"); addArg(ignoreRegex.getRegex()); } Set filenames = new HashSet(); Iterator i = fileSets.iterator(); while (i.hasNext()) { FileSet fileSet = (FileSet)i.next(); addArg("-basedir"); addArg(baseDir(fileSet)); filenames.addAll(Arrays.asList(getFilenames(fileSet))); } coverage((String[])filenames.toArray(new String[filenames.size()])); unInitArgs(); }
| 1,122,334
|
public void execute() throws BuildException { initArgs(); if (toDir != null) { addArg("-d"); addArg(toDir.toString()); } // TODO: ignoreRegex.setRegex() is never called if (ignoreRegex != null) { addArg("-ignore"); addArg(ignoreRegex.getRegex()); } Set filenames = new HashSet(); Iterator i = fileSets.iterator(); while (i.hasNext()) { FileSet fileSet = (FileSet)i.next(); addArg("-basedir"); addArg(baseDir(fileSet)); filenames.addAll(Arrays.asList(getFilenames(fileSet))); } coverage((String[])filenames.toArray(new String[filenames.size()])); unInitArgs(); }
|
public void execute() throws BuildException { initArgs(); if (toDir != null) { addArg("-d"); addArg(toDir.toString()); } // TODO: ignoreRegex.setRegex() is never called if (ignoreRegex != null) { addArg("-ignore"); addArg(ignoreRegex.getRegex()); } Set filenames = new HashSet(); Iterator i = fileSets.iterator(); while (i.hasNext()) { FileSet fileSet = (FileSet)i.next(); addArg("--basedir"); addArg(baseDir(fileSet)); filenames.addAll(Arrays.asList(getFilenames(fileSet))); } coverage((String[])filenames.toArray(new String[filenames.size()])); unInitArgs(); }
| 1,122,335
|
public Object get(Object key) { int hash = (System.identityHashCode(key) & 0x7FFFFFFF) % tab.length; Node last = null; Object nodeKey; synchronized (locks[hash]) { Node node = tab[hash]; while (node != null) { if (node.get() == key) { if (last != null) { last.next = node.next; node.next = tab[hash]; tab[hash] = node; } return node.value; } last = node; node = node.next; } } return null; }
|
public Object get(Object key) { int hash = (System.identityHashCode(key) & 0x7FFFFFFF) % tab.length; Node last = null; synchronized (locks[hash]) { Node node = tab[hash]; while (node != null) { if (node.get() == key) { if (last != null) { last.next = node.next; node.next = tab[hash]; tab[hash] = node; } return node.value; } last = node; node = node.next; } } return null; }
| 1,122,336
|
public void put(Object key, Object value) { processQueue(); if (key == null) { return; } if (value == null) { remove(key); return; } int hash = (System.identityHashCode(key) & 0x7FFFFFFF) % tab.length; boolean found = false; synchronized (locks[hash]) { Node node = tab[hash]; while (node != null) { if (node.get() == key) { node.value = value; return; } node = node.next; } node = new Node(key, queue); node.value = value; node.next = tab[hash]; tab[hash] = node; } }
|
public void put(Object key, Object value) { processQueue(); if (key == null) { return; } if (value == null) { remove(key); return; } int hash = (System.identityHashCode(key) & 0x7FFFFFFF) % tab.length; synchronized (locks[hash]) { Node node = tab[hash]; while (node != null) { if (node.get() == key) { node.value = value; return; } node = node.next; } node = new Node(key, queue); node.value = value; node.next = tab[hash]; tab[hash] = node; } }
| 1,122,337
|
public void afterPropertiesSet() throws Exception { if (classLoader == null) { classLoader = getClass().getClassLoader(); } if (directory == null) { log.warn("No directory specified so using current directory"); directory = new File("."); } directory = directory.getAbsoluteFile(); log.info("Starting to load components from: " + directory); // lets load the deployment processDirectory(classLoader, "", directory); }
|
public void afterPropertiesSet() throws Exception { if (classLoader == null) { classLoader = getClass().getClassLoader(); } if (baseDir == null) { log.warn("No directory specified so using current directory"); directory = new File("."); } directory = directory.getAbsoluteFile(); log.info("Starting to load components from: " + directory); // lets load the deployment processDirectory(classLoader, "", directory); }
| 1,122,338
|
public void afterPropertiesSet() throws Exception { if (classLoader == null) { classLoader = getClass().getClassLoader(); } if (directory == null) { log.warn("No directory specified so using current directory"); directory = new File("."); } directory = directory.getAbsoluteFile(); log.info("Starting to load components from: " + directory); // lets load the deployment processDirectory(classLoader, "", directory); }
|
public void afterPropertiesSet() throws Exception { if (classLoader == null) { classLoader = getClass().getClassLoader(); } if (directory == null) { log.warn("No directory specified so using current directory"); baseDir = new File("."); } directory = directory.getAbsoluteFile(); log.info("Starting to load components from: " + directory); // lets load the deployment processDirectory(classLoader, "", directory); }
| 1,122,339
|
public void afterPropertiesSet() throws Exception { if (classLoader == null) { classLoader = getClass().getClassLoader(); } if (directory == null) { log.warn("No directory specified so using current directory"); directory = new File("."); } directory = directory.getAbsoluteFile(); log.info("Starting to load components from: " + directory); // lets load the deployment processDirectory(classLoader, "", directory); }
|
public void afterPropertiesSet() throws Exception { if (classLoader == null) { classLoader = getClass().getClassLoader(); } if (directory == null) { log.warn("No directory specified so using current directory"); directory = new File("."); } directory = directory.getAbsoluteFile(); log.info("Starting to load components from: " + directory); // lets load the deployment processDirectory(classLoader, "", directory); }
| 1,122,340
|
public void afterPropertiesSet() throws Exception { if (classLoader == null) { classLoader = getClass().getClassLoader(); } if (directory == null) { log.warn("No directory specified so using current directory"); directory = new File("."); } directory = directory.getAbsoluteFile(); log.info("Starting to load components from: " + directory); // lets load the deployment processDirectory(classLoader, "", directory); }
|
public void afterPropertiesSet() throws Exception { if (classLoader == null) { classLoader = getClass().getClassLoader(); } if (directory == null) { log.warn("No directory specified so using current directory"); directory = new File("."); } directory = directory.getAbsoluteFile(); log.info("Starting to load components from: " + directory); // lets load the deployment processDirectory("", classLoader, applicationContext, baseDir); }
| 1,122,341
|
protected void createServiceForFile(String name, File file, ClassLoader classLoader) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { String fileName = file.getName(); ServiceFactory serviceFactory = null; if (fileName.equalsIgnoreCase("spring.xml") || fileName.equalsIgnoreCase("xbean.xml")) { serviceFactory = createSpringService(name, file, classLoader); } else { log.info("Ignoring file: " + fileName + " in directory: " + file.getParent()); } if (serviceFactory != null) { log.info("Registering spring services service: " + name + " from: " + file.getAbsolutePath() + " into the Kernel"); kernel.registerService(new StringServiceName(name), serviceFactory, classLoader); } }
|
protected void createServiceForFile(String name, File file, ClassLoader classLoader) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { String fileName = file.getName(); ServiceFactory serviceFactory = null; if (fileName.equalsIgnoreCase("spring.xml") || fileName.equalsIgnoreCase("xbean.xml")) { serviceFactory = createSpringService(name, file, classLoader); } else { log.info("Ignoring file: " + fileName + " in directory: " + file.getParent()); } if (serviceFactory != null) { log.info("Registering spring services service: " + name + " from: " + file.getAbsolutePath() + " into the Kernel"); kernel.registerService(new StringServiceName(name), serviceFactory, classLoader); } }
| 1,122,342
|
protected void createServiceForFile(String name, File file, ClassLoader classLoader) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { String fileName = file.getName(); ServiceFactory serviceFactory = null; if (fileName.equalsIgnoreCase("spring.xml") || fileName.equalsIgnoreCase("xbean.xml")) { serviceFactory = createSpringService(name, file, classLoader); } else { log.info("Ignoring file: " + fileName + " in directory: " + file.getParent()); } if (serviceFactory != null) { log.info("Registering spring services service: " + name + " from: " + file.getAbsolutePath() + " into the Kernel"); kernel.registerService(new StringServiceName(name), serviceFactory, classLoader); } }
|
protected void createServiceForFile(String name, File file, ClassLoader classLoader) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { String fileName = file.getName(); ServiceFactory serviceFactory = null; if (fileName.equalsIgnoreCase("spring.xml") || fileName.equalsIgnoreCase("xbean.xml")) { serviceFactory = createSpringService(name, file, classLoader); } else { log.info("Ignoring file: " + fileName + " in directory: " + file.getParent()); } if (serviceFactory != null) { log.info("Registering spring services service: " + name + " from: " + file.getAbsolutePath() + " into the Kernel"); kernel.registerService(new StringServiceName(name), serviceFactory, classLoader); } }
| 1,122,343
|
protected void processDirectory(ClassLoader classLoader, String parentName, File directory) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { File[] files = directory.listFiles(); if (files == null) { return; } // lets create a new classloader... for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { classLoader = createChildClassLoader(parentName, file, classLoader); } } // now lets recurse through files or directories for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { continue; } String name = getChildName(parentName, file); if (file.isDirectory()) { processDirectory(classLoader, name, file); } else { createServiceForFile(name, file, classLoader); } } }
|
protected void processDirectory(ClassLoader classLoader, String parentName, File directory) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { File[] files = directory.listFiles(); if (files == null) { return; } // lets create a new classloader... for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { classLoader = createChildClassLoader(parentName, file, classLoader); } } // now lets recurse through files or directories for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { continue; } String name = getChildName(parentName, file); if (file.isDirectory()) { processDirectory(classLoader, name, file); } else { createServiceForFile(name, file, classLoader); } } }
| 1,122,344
|
protected void processDirectory(ClassLoader classLoader, String parentName, File directory) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { File[] files = directory.listFiles(); if (files == null) { return; } // lets create a new classloader... for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { classLoader = createChildClassLoader(parentName, file, classLoader); } } // now lets recurse through files or directories for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { continue; } String name = getChildName(parentName, file); if (file.isDirectory()) { processDirectory(classLoader, name, file); } else { createServiceForFile(name, file, classLoader); } } }
|
protected void processDirectory(ClassLoader classLoader, String parentName, File directory) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { File[] files = directory.listFiles(); if (files == null) { return; } // lets create a new classloader... for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { classLoader = createChildClassLoader(parentName, file, classLoader); } } // now lets recurse through files or directories for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { continue; } String name = getChildName(parentName, file); if (file.isDirectory()) { processDirectory(classLoader, name, file); } else { createServiceForFile(name, file, classLoader); } } }
| 1,122,345
|
protected void processDirectory(ClassLoader classLoader, String parentName, File directory) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { File[] files = directory.listFiles(); if (files == null) { return; } // lets create a new classloader... for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { classLoader = createChildClassLoader(parentName, file, classLoader); } } // now lets recurse through files or directories for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { continue; } String name = getChildName(parentName, file); if (file.isDirectory()) { processDirectory(classLoader, name, file); } else { createServiceForFile(name, file, classLoader); } } }
|
protected void processDirectory(ClassLoader classLoader, String parentName, File directory) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { File[] files = directory.listFiles(); if (files == null) { return; } // lets create a new classloader... for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { classLoader = createChildClassLoader(parentName, file, classLoader); } } // now lets recurse through files or directories for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { continue; } String name = getChildName(parentName, file); if (file.isDirectory()) { processDirectory(classLoader, name, file); } else { createServiceForFile(name, file, classLoader); } } }
| 1,122,346
|
public void run() { try { processDirectory(classLoader, "", directory); } catch (Exception e) { log.error("Failed to deploy services: " + e, e); } }
|
public void run() { try { String name = ""; if (applicationContext != null) { name = applicationContext.getDisplayName(); } processDirectory(name, classLoader, applicationContext, baseDir); } catch (Exception e) { log.error("Failed to deploy services: " + e, e); } }
| 1,122,347
|
public Wiki(String propertiesFilename) throws Exception { if (propertiesFilename == null) propertiesFilename = DEFAULT_PROPERTIES; create(propertiesFilename); _dateStarted = new Date(); }
|
public Wiki(String propertiesFilename) throws Exception { if (propertiesFilename == null) propertiesFilename = DEFAULT_PROPERTIES; create(propertiesFilename); _dateStarted = new Date(); }
| 1,122,348
|
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[] { "--format", "xml", "--datafile", dataFileName, "--destination", PATH_TO_TEST_OUTPUT, PATH_TO_SOURCE_CODE }; net.sourceforge.cobertura.reporting.Main.main(args); JUnitXMLHelper.validate(new File(PATH_TO_XML_REPORT)); }
|
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[] { "--format", "xml", "--datafile", dataFileName, "--destination", PATH_TO_TEST_OUTPUT, PATH_TO_SOURCE_CODE }; net.sourceforge.cobertura.reporting.Main.main(args); JUnitXMLHelper.readXmlFile(new File(PATH_TO_XML_REPORT), true); }
| 1,122,349
|
public void testXMLReportWithNonSourceLines() throws Exception { ProjectData projectData = new ProjectData(); // Adding line to the project data that hasn't been yet marked as source line ClassData cd = projectData.getOrCreateClassData(XMLReport.class.getName()); cd.touch(7777); File reportDir = File.createTempFile("XMLReportTest", ""); reportDir.delete(); reportDir.mkdir(); FileFinder fileFinder = new FileFinder(); ComplexityCalculator complexity = new ComplexityCalculator(fileFinder); new XMLReport(projectData, reportDir, fileFinder, complexity); File coverageFile = new File(reportDir, "coverage.xml"); JUnitXMLHelper.validate(coverageFile); coverageFile.delete(); reportDir.delete(); }
|
public void testXMLReportWithNonSourceLines() throws Exception { ProjectData projectData = new ProjectData(); // Adding line to the project data that hasn't been yet marked as source line ClassData cd = projectData.getOrCreateClassData(XMLReport.class.getName()); cd.touch(7777); File reportDir = File.createTempFile("XMLReportTest", ""); reportDir.delete(); reportDir.mkdir(); FileFinder fileFinder = new FileFinder(); ComplexityCalculator complexity = new ComplexityCalculator(fileFinder); new XMLReport(projectData, reportDir, fileFinder, complexity); File coverageFile = new File(reportDir, "coverage.xml"); JUnitXMLHelper.readXmlFile(coverageFile, true); coverageFile.delete(); reportDir.delete(); }
| 1,122,350
|
public ClassData getOrCreateClassData(String name) { boolean done = fullClassNames.contains(name); ClassData classData = new ClassData(name); if (!done) { addClassData(classData); fullClassNames.add(name); } else { classData = getClassData(name); } return classData; }
|
public ClassData getOrCreateClassData(String name) { boolean done = fullClassNames.contains(name); ClassData classData = new ClassData(name); if (!done) { addClassData(classData); fullClassNames.add(name); } else { classData = getClassData(name); } return classData; }
| 1,122,351
|
public ClassData getOrCreateClassData(String name) { boolean done = fullClassNames.contains(name); ClassData classData = new ClassData(name); if (!done) { addClassData(classData); fullClassNames.add(name); } else { classData = getClassData(name); } return classData; }
|
public ClassData getOrCreateClassData(String name) { boolean done = fullClassNames.contains(name); ClassData classData = new ClassData(name); if (!done) { addClassData(classData); fullClassNames.add(name); } else { classData = getClassData(name); } return classData; }
| 1,122,352
|
public XMLReport(Coverage coverage, File outputDir, File sourceDirectory) throws IOException { pw = new PrintWriter(new FileWriter(new File(outputDir, "coverage.xml"))); try { println("<?xml version=\"1.0\"?>"); if (sourceDirectory == null) { println("<coverage>"); } else { println("<coverage src=\"" + sourceDirectory + "\">"); } increaseIndentation(); dumpPackages(coverage); decreaseIndentation(); println("</coverage>"); } finally { pw.close(); } }
|
public XMLReport(CoverageReport coverage, File outputDir, File sourceDirectory) throws IOException { pw = new PrintWriter(new FileWriter(new File(outputDir, "coverage.xml"))); try { println("<?xml version=\"1.0\"?>"); if (sourceDirectory == null) { println("<coverage>"); } else { println("<coverage src=\"" + sourceDirectory + "\">"); } increaseIndentation(); dumpPackages(coverage); decreaseIndentation(); println("</coverage>"); } finally { pw.close(); } }
| 1,122,353
|
public boolean isInstanceOf(Object obj, String className) { try { return (obj != null && className != null) && (obj.getClass().isAssignableFrom( context.getBroker().classForName(className))); } catch (ClassNotFoundException cnfe) { context.getBroker().getLog("VariableTool") .error ("VariableTool could not locate the class: /" + className + "/"); } catch (Exception e) { context.getBroker().getLog("VariableTool") .error ("An unexpected exception occured", e); } return false; }
|
public boolean isInstanceOf(Object obj, String className) { try { return (obj != null && className != null) && (obj.getClass().isAssignableFrom( context.getBroker().classForName(className))); } catch (ClassNotFoundException cnfe) { context.getBroker().getLog("VariableTool") .error ("VariableTool could not locate the class: /" + className + "/"); } catch (Exception e) { context.getBroker().getLog("VariableTool") .error ("An unexpected exception occured", e); } return false; }
| 1,122,354
|
private final int jjMoveStringLiteralDfa0_3(){ switch(curChar) { case 34: return jjStopAtPos(0, 24); case 35: return jjStartNfaWithStates_3(0, 23, 0); case 36: return jjStopAtPos(0, 20); case 39: return jjStopAtPos(0, 25); case 40: return jjStopAtPos(0, 31); case 41: return jjStopAtPos(0, 32); case 42: return jjStopAtPos(0, 45); case 43: return jjStopAtPos(0, 43); case 44: return jjStopAtPos(0, 50); case 45: return jjStopAtPos(0, 44); case 46: return jjStopAtPos(0, 35); case 47: return jjStopAtPos(0, 46); case 59: return jjStopAtPos(0, 51); case 60: jjmatchedKind = 36; return jjMoveStringLiteralDfa1_3(0x2000000000L); case 61: jjmatchedKind = 41; return jjMoveStringLiteralDfa1_3(0x10000000000L); case 62: jjmatchedKind = 38; return jjMoveStringLiteralDfa1_3(0x8000000000L); case 91: return jjStopAtPos(0, 33); case 92: return jjStartNfaWithStates_3(0, 22, 4); case 93: return jjStopAtPos(0, 34); case 102: return jjMoveStringLiteralDfa1_3(0x10000000L); case 110: return jjMoveStringLiteralDfa1_3(0x4000000L); case 116: return jjMoveStringLiteralDfa1_3(0x8000000L); default : return jjMoveNfa_3(2, 0); }}
|
private final int jjMoveStringLiteralDfa0_3(){ switch(curChar) { case 34: return jjStopAtPos(0, 24); case 35: jjmatchedKind = 23; return jjMoveStringLiteralDfa1_3(0x4000L); case 36: return jjStopAtPos(0, 20); case 39: return jjStopAtPos(0, 25); case 40: return jjStopAtPos(0, 31); case 41: return jjStopAtPos(0, 32); case 42: return jjStopAtPos(0, 45); case 43: return jjStopAtPos(0, 43); case 44: return jjStopAtPos(0, 50); case 45: return jjStopAtPos(0, 44); case 46: return jjStopAtPos(0, 35); case 47: return jjStopAtPos(0, 46); case 59: return jjStopAtPos(0, 51); case 60: jjmatchedKind = 36; return jjMoveStringLiteralDfa1_3(0x2000000000L); case 61: jjmatchedKind = 41; return jjMoveStringLiteralDfa1_3(0x10000000000L); case 62: jjmatchedKind = 38; return jjMoveStringLiteralDfa1_3(0x8000000000L); case 91: return jjStopAtPos(0, 33); case 92: return jjStartNfaWithStates_3(0, 22, 4); case 93: return jjStopAtPos(0, 34); case 102: return jjMoveStringLiteralDfa1_3(0x10000000L); case 110: return jjMoveStringLiteralDfa1_3(0x4000000L); case 116: return jjMoveStringLiteralDfa1_3(0x8000000L); default : return jjMoveNfa_3(2, 0); }}
| 1,122,355
|
private final int jjMoveStringLiteralDfa0_4(){ switch(curChar) { case 35: jjmatchedKind = 23; return jjMoveStringLiteralDfa1_4(0x23000L); case 36: return jjStopAtPos(0, 20); case 92: return jjStartNfaWithStates_4(0, 22, 2); case 123: return jjStopAtPos(0, 14); case 125: return jjStopAtPos(0, 15); default : return jjMoveNfa_4(1, 0); }}
|
private final int jjMoveStringLiteralDfa0_4(){ switch(curChar) { case 35: jjmatchedKind = 23; return jjMoveStringLiteralDfa1_4(0x26000L); case 36: return jjStopAtPos(0, 20); case 92: return jjStartNfaWithStates_4(0, 22, 2); case 123: return jjStopAtPos(0, 14); case 125: return jjStopAtPos(0, 15); default : return jjMoveNfa_4(1, 0); }}
| 1,122,357
|
private final int jjMoveStringLiteralDfa0_4(){ switch(curChar) { case 35: jjmatchedKind = 23; return jjMoveStringLiteralDfa1_4(0x23000L); case 36: return jjStopAtPos(0, 20); case 92: return jjStartNfaWithStates_4(0, 22, 2); case 123: return jjStopAtPos(0, 14); case 125: return jjStopAtPos(0, 15); default : return jjMoveNfa_4(1, 0); }}
|
private final int jjMoveStringLiteralDfa0_4(){ switch(curChar) { case 35: jjmatchedKind = 23; return jjMoveStringLiteralDfa1_4(0x23000L); case 36: return jjStopAtPos(0, 20); case 92: return jjStartNfaWithStates_4(0, 22, 2); case 123: return jjStopAtPos(0, 15); case 125: return jjStopAtPos(0, 15); default : return jjMoveNfa_4(1, 0); }}
| 1,122,358
|
private final int jjMoveStringLiteralDfa0_4(){ switch(curChar) { case 35: jjmatchedKind = 23; return jjMoveStringLiteralDfa1_4(0x23000L); case 36: return jjStopAtPos(0, 20); case 92: return jjStartNfaWithStates_4(0, 22, 2); case 123: return jjStopAtPos(0, 14); case 125: return jjStopAtPos(0, 15); default : return jjMoveNfa_4(1, 0); }}
|
private final int jjMoveStringLiteralDfa0_4(){ switch(curChar) { case 35: jjmatchedKind = 23; return jjMoveStringLiteralDfa1_4(0x23000L); case 36: return jjStopAtPos(0, 20); case 92: return jjStartNfaWithStates_4(0, 22, 2); case 123: return jjStopAtPos(0, 14); case 125: return jjStopAtPos(0, 12); default : return jjMoveNfa_4(1, 0); }}
| 1,122,359
|
private final int jjMoveStringLiteralDfa1_4(long active0){ try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_4(0, active0); return 1; } switch(curChar) { case 35: if ((active0 & 0x20000L) != 0L) return jjStopAtPos(1, 17); break; case 98: return jjMoveStringLiteralDfa2_4(active0, 0x1000L); case 101: return jjMoveStringLiteralDfa2_4(active0, 0x2000L); default : break; } return jjStartNfa_4(0, active0);}
|
private final int jjMoveStringLiteralDfa1_4(long active0){ try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_4(0, active0); return 1; } switch(curChar) { case 35: if ((active0 & 0x20000L) != 0L) return jjStopAtPos(1, 17); break; case 98: return jjMoveStringLiteralDfa2_4(active0, 0x4000L); case 101: return jjMoveStringLiteralDfa2_4(active0, 0x2000L); default : break; } return jjStartNfa_4(0, active0);}
| 1,122,361
|
private final int jjMoveStringLiteralDfa2_4(long old0, long active0){ if (((active0 &= old0)) == 0L) return jjStartNfa_4(0, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_4(1, active0); return 2; } switch(curChar) { case 101: return jjMoveStringLiteralDfa3_4(active0, 0x1000L); case 110: return jjMoveStringLiteralDfa3_4(active0, 0x2000L); default : break; } return jjStartNfa_4(1, active0);}
|
private final int jjMoveStringLiteralDfa2_4(long old0, long active0){ if (((active0 &= old0)) == 0L) return jjStartNfa_4(0, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_4(1, active0); return 2; } switch(curChar) { case 101: return jjMoveStringLiteralDfa3_4(active0, 0x4000L); case 110: return jjMoveStringLiteralDfa3_4(active0, 0x2000L); default : break; } return jjStartNfa_4(1, active0);}
| 1,122,363
|
private final int jjMoveStringLiteralDfa3_4(long old0, long active0){ if (((active0 &= old0)) == 0L) return jjStartNfa_4(1, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_4(2, active0); return 3; } switch(curChar) { case 100: if ((active0 & 0x2000L) != 0L) return jjStopAtPos(3, 13); break; case 103: return jjMoveStringLiteralDfa4_4(active0, 0x1000L); default : break; } return jjStartNfa_4(2, active0);}
|
private final int jjMoveStringLiteralDfa3_4(long old0, long active0){ if (((active0 &= old0)) == 0L) return jjStartNfa_4(1, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_4(2, active0); return 3; } switch(curChar) { case 100: if ((active0 & 0x2000L) != 0L) return jjStopAtPos(3, 13); break; case 103: return jjMoveStringLiteralDfa4_4(active0, 0x4000L); default : break; } return jjStartNfa_4(2, active0);}
| 1,122,365
|
private final int jjMoveStringLiteralDfa4_4(long old0, long active0){ if (((active0 &= old0)) == 0L) return jjStartNfa_4(2, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_4(3, active0); return 4; } switch(curChar) { case 105: return jjMoveStringLiteralDfa5_4(active0, 0x1000L); default : break; } return jjStartNfa_4(3, active0);}
|
private final int jjMoveStringLiteralDfa4_4(long old0, long active0){ if (((active0 &= old0)) == 0L) return jjStartNfa_4(2, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_4(3, active0); return 4; } switch(curChar) { case 105: return jjMoveStringLiteralDfa5_4(active0, 0x4000L); default : break; } return jjStartNfa_4(3, active0);}
| 1,122,367
|
private final int jjMoveStringLiteralDfa5_4(long old0, long active0){ if (((active0 &= old0)) == 0L) return jjStartNfa_4(3, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_4(4, active0); return 5; } switch(curChar) { case 110: if ((active0 & 0x1000L) != 0L) return jjStopAtPos(5, 12); break; default : break; } return jjStartNfa_4(4, active0);}
|
private final int jjMoveStringLiteralDfa5_4(long old0, long active0){ if (((active0 &= old0)) == 0L) return jjStartNfa_4(3, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_4(4, active0); return 5; } switch(curChar) { case 110: if ((active0 & 0x1000L) != 0L) return jjStopAtPos(5, 12); break; default : break; } return jjStartNfa_4(4, active0);}
| 1,122,368
|
private final int jjStopStringLiteralDfa_3(int pos, long active0){ switch (pos) { case 0: if ((active0 & 0x800000L) != 0L) return 0; if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; return 29; } if ((active0 & 0x3000000000L) != 0L) return 13; if ((active0 & 0x400000L) != 0L) return 4; return -1; case 1: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 1; return 29; } return -1; case 2: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 2; return 29; } return -1; case 3: if ((active0 & 0xc000000L) != 0L) return 29; if ((active0 & 0x10000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 3; return 29; } return -1; default : return -1; }}
|
private final int jjStopStringLiteralDfa_3(int pos, long active0){ switch (pos) { case 0: if ((active0 & 0x804000L) != 0L) return 0; if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; return 29; } if ((active0 & 0x3000000000L) != 0L) return 13; if ((active0 & 0x400000L) != 0L) return 4; return -1; case 1: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 1; return 29; } return -1; case 2: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 2; return 29; } return -1; case 3: if ((active0 & 0xc000000L) != 0L) return 29; if ((active0 & 0x10000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 3; return 29; } return -1; default : return -1; }}
| 1,122,369
|
public NoteTab(final CTabFolder parent, Listener l, DisplayedNote displayedNote) { this.displayedNote = displayedNote; tabItem = new CTabItem(parent, SWT.NONE); tabItem.setText(displayedNote.getName()); tabItem.setData(this); tabItem.addDisposeListener(this); text = new Text(parent, SWT.MULTI | SWT.WRAP); text.setText(displayedNote.getNote().getText()); tabItem.setControl(text); displayedNote.setTab(this); select(); }
|
public NoteTab(final CTabFolder parent, Listener l, DisplayedNote displayedNote) { this.displayedNote = displayedNote; tabItem = new CTabItem(parent, SWT.NONE); tabItem.setText(displayedNote.getName()); tabItem.setData(this); tabItem.addDisposeListener(this); text = new Text(parent, SWT.MULTI | SWT.WRAP); text.setText(displayedNote.getNote().getText()); tabItem.setControl(text); select(); }
| 1,122,371
|
public void widgetDisposed(DisposeEvent e) { text.dispose(); displayedNote.setTab(null); }
|
public void widgetDisposed(DisposeEvent e) { text.dispose(); displayedNote.tabDisposed(); }
| 1,122,372
|
LoginPanel() { //setBorder(BorderFactory.createTitledBorder("Sign In Now")); ResourceUtils.resButton(savePasswordBox, Res.getString("checkbox.save.password")); ResourceUtils.resButton(autoLoginBox, Res.getString("checkbox.auto.login")); ResourceUtils.resLabel(serverLabel, serverField, Res.getString("label.server")); ResourceUtils.resButton(createAccountButton, Res.getString("label.accounts")); savePasswordBox.setOpaque(false); autoLoginBox.setOpaque(false); setLayout(GRIDBAGLAYOUT); add(usernameLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(15, 5, 5, 5), 0, 0)); add(usernameField, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(15, 5, 5, 5), 0, 0)); add(passwordField, new GridBagConstraints(1, 2, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(passwordLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 5, 0)); // Add Server Field Properties add(serverField, new GridBagConstraints(1, 4, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(serverLabel, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 5, 0)); add(savePasswordBox, new GridBagConstraints(1, 5, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(autoLoginBox, new GridBagConstraints(1, 6, 2, 1, 1.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); // Add button but disable the login button initially savePasswordBox.addActionListener(this); autoLoginBox.addActionListener(this); buttonPanel.add(quitButton, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 0), 0, 0)); if (!"true".equals(Default.getString(Default.ACCOUNT_DISABLED))) { buttonPanel.add(createAccountButton, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 0), 0, 0)); } buttonPanel.add(connectionButton, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 0), 0, 0)); buttonPanel.add(loginButton, new GridBagConstraints(3, 0, 4, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 0), 0, 0)); cardPanel.add(buttonPanel, BUTTON_PANEL); cardPanel.setOpaque(false); buttonPanel.setOpaque(false); progressBar.setHorizontalAlignment(JLabel.CENTER); cardPanel.add(progressBar, PROGRESS_BAR); add(cardPanel, new GridBagConstraints(0, 7, 4, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); loginButton.setEnabled(false); // Add KeyListener usernameField.addKeyListener(this); passwordField.addKeyListener(this); serverField.addKeyListener(this); passwordField.addFocusListener(this); usernameField.addFocusListener(this); serverField.addFocusListener(this); // Add ActionListener quitButton.addActionListener(this); loginButton.addActionListener(this); connectionButton.addActionListener(this); // Make same size GraphicUtils.makeSameSize(new JComponent[]{usernameField, passwordField}); // Set progress bar description progressBar.setText(SparkRes.getString(SparkRes.LOGIN_DIALOG_AUTHENTICATING)); //progressBar.setStringPainted(true); // Set Resources ResourceUtils.resLabel(usernameLabel, usernameField, SparkRes.getString(SparkRes.LOGIN_DIALOG_USERNAME)); ResourceUtils.resLabel(passwordLabel, passwordField, SparkRes.getString(SparkRes.LOGIN_DIALOG_PASSWORD)); ResourceUtils.resButton(quitButton, SparkRes.getString(SparkRes.LOGIN_DIALOG_QUIT)); ResourceUtils.resButton(loginButton, SparkRes.getString(SparkRes.LOGIN_DIALOG_LOGIN)); ResourceUtils.resButton(connectionButton, Res.getString("button.advanced")); // Load previous instances String userProp = localPref.getUsername(); String serverProp = localPref.getServer(); if (userProp != null && serverProp != null) { usernameField.setText(userProp); serverField.setText(serverProp); } // Check Settings if (localPref.isSavePassword()) { String encryptedPassword = localPref.getPassword(); if (encryptedPassword != null) { String password = Encryptor.decrypt(encryptedPassword); passwordField.setText(password); } savePasswordBox.setSelected(true); loginButton.setEnabled(true); } autoLoginBox.setSelected(localPref.isAutoLogin()); if (autoLoginBox.isSelected()) { savePasswordBox.setEnabled(false); autoLoginBox.setEnabled(false); validateLogin(); return; } // Handle arguments String username = Spark.getArgumentValue("username"); String password = Spark.getArgumentValue("password"); String server = Spark.getArgumentValue("server"); if (username != null) { usernameField.setText(username); } if (password != null) { passwordField.setText(password); } if (server != null) { serverField.setText(server); } if (username != null && server != null && password != null) { savePasswordBox.setEnabled(false); autoLoginBox.setEnabled(false); validateLogin(); } createAccountButton.addActionListener(this); final String lockedDownURL = Default.getString(Default.HOST_NAME); if (ModelUtil.hasLength(lockedDownURL)) { serverField.setEnabled(false); serverField.setText(lockedDownURL); } }
|
LoginPanel() { //setBorder(BorderFactory.createTitledBorder("Sign In Now")); ResourceUtils.resButton(savePasswordBox, Res.getString("checkbox.save.password")); ResourceUtils.resButton(autoLoginBox, Res.getString("checkbox.auto.login")); ResourceUtils.resLabel(serverLabel, serverField, Res.getString("label.server")); ResourceUtils.resButton(createAccountButton, Res.getString("label.accounts")); savePasswordBox.setOpaque(false); autoLoginBox.setOpaque(false); setLayout(GRIDBAGLAYOUT); add(usernameLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(15, 5, 5, 5), 0, 0)); add(usernameField, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(15, 5, 5, 5), 0, 0)); add(passwordField, new GridBagConstraints(1, 2, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(passwordLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 5, 0)); // Add Server Field Properties add(serverField, new GridBagConstraints(1, 4, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(serverLabel, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 5, 0)); add(savePasswordBox, new GridBagConstraints(1, 5, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(autoLoginBox, new GridBagConstraints(1, 6, 2, 1, 1.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); // Add button but disable the login button initially savePasswordBox.addActionListener(this); autoLoginBox.addActionListener(this); buttonPanel.add(quitButton, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 0), 0, 0)); if (!"true".equals(Default.getString(Default.ACCOUNT_DISABLED))) { buttonPanel.add(createAccountButton, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 0), 0, 0)); } buttonPanel.add(connectionButton, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 0), 0, 0)); buttonPanel.add(loginButton, new GridBagConstraints(3, 0, 4, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 0), 0, 0)); cardPanel.add(buttonPanel, BUTTON_PANEL); cardPanel.setOpaque(false); buttonPanel.setOpaque(false); progressBar.setHorizontalAlignment(JLabel.CENTER); cardPanel.add(progressBar, PROGRESS_BAR); add(cardPanel, new GridBagConstraints(0, 7, 4, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); loginButton.setEnabled(false); // Add KeyListener usernameField.addKeyListener(this); passwordField.addKeyListener(this); serverField.addKeyListener(this); passwordField.addFocusListener(this); usernameField.addFocusListener(this); serverField.addFocusListener(this); // Add ActionListener quitButton.addActionListener(this); loginButton.addActionListener(this); connectionButton.addActionListener(this); // Make same size GraphicUtils.makeSameSize(new JComponent[]{usernameField, passwordField}); // Set progress bar description progressBar.setText(SparkRes.getString(SparkRes.LOGIN_DIALOG_AUTHENTICATING)); //progressBar.setStringPainted(true); // Set Resources ResourceUtils.resLabel(usernameLabel, usernameField, SparkRes.getString(SparkRes.LOGIN_DIALOG_USERNAME)); ResourceUtils.resLabel(passwordLabel, passwordField, SparkRes.getString(SparkRes.LOGIN_DIALOG_PASSWORD)); ResourceUtils.resButton(quitButton, SparkRes.getString(SparkRes.LOGIN_DIALOG_QUIT)); ResourceUtils.resButton(loginButton, SparkRes.getString(SparkRes.LOGIN_DIALOG_LOGIN)); ResourceUtils.resButton(connectionButton, Res.getString("button.advanced")); // Load previous instances String userProp = localPref.getUsername(); String serverProp = localPref.getServer(); if (userProp != null && serverProp != null) { usernameField.setText(userProp); serverField.setText(serverProp); } // Check Settings if (localPref.isSavePassword()) { String encryptedPassword = localPref.getPassword(); if (encryptedPassword != null) { String password = Encryptor.decrypt(encryptedPassword); passwordField.setText(password); } savePasswordBox.setSelected(true); loginButton.setEnabled(true); } autoLoginBox.setSelected(localPref.isAutoLogin()); if (autoLoginBox.isSelected()) { savePasswordBox.setEnabled(false); autoLoginBox.setEnabled(false); validateLogin(); return; } // Handle arguments String username = Spark.getArgumentValue("username"); String password = Spark.getArgumentValue("password"); String server = Spark.getArgumentValue("server"); if (username != null) { usernameField.setText(username); } if (password != null) { passwordField.setText(password); } if (server != null) { serverField.setText(server); } if (username != null && server != null && password != null) { savePasswordBox.setEnabled(false); autoLoginBox.setEnabled(false); validateLogin(); } createAccountButton.addActionListener(this); final String lockedDownURL = Default.getString(Default.HOST_NAME); if (ModelUtil.hasLength(lockedDownURL)) { serverField.setEnabled(false); serverField.setText(lockedDownURL); } }
| 1,122,373
|
LoginPanel() { //setBorder(BorderFactory.createTitledBorder("Sign In Now")); ResourceUtils.resButton(savePasswordBox, Res.getString("checkbox.save.password")); ResourceUtils.resButton(autoLoginBox, Res.getString("checkbox.auto.login")); ResourceUtils.resLabel(serverLabel, serverField, Res.getString("label.server")); ResourceUtils.resButton(createAccountButton, Res.getString("label.accounts")); savePasswordBox.setOpaque(false); autoLoginBox.setOpaque(false); setLayout(GRIDBAGLAYOUT); add(usernameLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(15, 5, 5, 5), 0, 0)); add(usernameField, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(15, 5, 5, 5), 0, 0)); add(passwordField, new GridBagConstraints(1, 2, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(passwordLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 5, 0)); // Add Server Field Properties add(serverField, new GridBagConstraints(1, 4, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(serverLabel, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 5, 0)); add(savePasswordBox, new GridBagConstraints(1, 5, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(autoLoginBox, new GridBagConstraints(1, 6, 2, 1, 1.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); // Add button but disable the login button initially savePasswordBox.addActionListener(this); autoLoginBox.addActionListener(this); buttonPanel.add(quitButton, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 0), 0, 0)); if (!"true".equals(Default.getString(Default.ACCOUNT_DISABLED))) { buttonPanel.add(createAccountButton, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 0), 0, 0)); } buttonPanel.add(connectionButton, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 0), 0, 0)); buttonPanel.add(loginButton, new GridBagConstraints(3, 0, 4, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 0), 0, 0)); cardPanel.add(buttonPanel, BUTTON_PANEL); cardPanel.setOpaque(false); buttonPanel.setOpaque(false); progressBar.setHorizontalAlignment(JLabel.CENTER); cardPanel.add(progressBar, PROGRESS_BAR); add(cardPanel, new GridBagConstraints(0, 7, 4, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); loginButton.setEnabled(false); // Add KeyListener usernameField.addKeyListener(this); passwordField.addKeyListener(this); serverField.addKeyListener(this); passwordField.addFocusListener(this); usernameField.addFocusListener(this); serverField.addFocusListener(this); // Add ActionListener quitButton.addActionListener(this); loginButton.addActionListener(this); connectionButton.addActionListener(this); // Make same size GraphicUtils.makeSameSize(new JComponent[]{usernameField, passwordField}); // Set progress bar description progressBar.setText(SparkRes.getString(SparkRes.LOGIN_DIALOG_AUTHENTICATING)); //progressBar.setStringPainted(true); // Set Resources ResourceUtils.resLabel(usernameLabel, usernameField, SparkRes.getString(SparkRes.LOGIN_DIALOG_USERNAME)); ResourceUtils.resLabel(passwordLabel, passwordField, SparkRes.getString(SparkRes.LOGIN_DIALOG_PASSWORD)); ResourceUtils.resButton(quitButton, SparkRes.getString(SparkRes.LOGIN_DIALOG_QUIT)); ResourceUtils.resButton(loginButton, SparkRes.getString(SparkRes.LOGIN_DIALOG_LOGIN)); ResourceUtils.resButton(connectionButton, Res.getString("button.advanced")); // Load previous instances String userProp = localPref.getUsername(); String serverProp = localPref.getServer(); if (userProp != null && serverProp != null) { usernameField.setText(userProp); serverField.setText(serverProp); } // Check Settings if (localPref.isSavePassword()) { String encryptedPassword = localPref.getPassword(); if (encryptedPassword != null) { String password = Encryptor.decrypt(encryptedPassword); passwordField.setText(password); } savePasswordBox.setSelected(true); loginButton.setEnabled(true); } autoLoginBox.setSelected(localPref.isAutoLogin()); if (autoLoginBox.isSelected()) { savePasswordBox.setEnabled(false); autoLoginBox.setEnabled(false); validateLogin(); return; } // Handle arguments String username = Spark.getArgumentValue("username"); String password = Spark.getArgumentValue("password"); String server = Spark.getArgumentValue("server"); if (username != null) { usernameField.setText(username); } if (password != null) { passwordField.setText(password); } if (server != null) { serverField.setText(server); } if (username != null && server != null && password != null) { savePasswordBox.setEnabled(false); autoLoginBox.setEnabled(false); validateLogin(); } createAccountButton.addActionListener(this); final String lockedDownURL = Default.getString(Default.HOST_NAME); if (ModelUtil.hasLength(lockedDownURL)) { serverField.setEnabled(false); serverField.setText(lockedDownURL); } }
|
LoginPanel() { //setBorder(BorderFactory.createTitledBorder("Sign In Now")); ResourceUtils.resButton(savePasswordBox, Res.getString("checkbox.save.password")); ResourceUtils.resButton(autoLoginBox, Res.getString("checkbox.auto.login")); ResourceUtils.resLabel(serverLabel, serverField, Res.getString("label.server")); ResourceUtils.resButton(createAccountButton, Res.getString("label.accounts")); savePasswordBox.setOpaque(false); autoLoginBox.setOpaque(false); setLayout(GRIDBAGLAYOUT); add(usernameLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(15, 5, 5, 5), 0, 0)); add(usernameField, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(15, 5, 5, 5), 0, 0)); add(passwordField, new GridBagConstraints(1, 2, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(passwordLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 5, 0)); // Add Server Field Properties add(serverField, new GridBagConstraints(1, 4, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(serverLabel, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 5, 0)); add(savePasswordBox, new GridBagConstraints(1, 5, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(autoLoginBox, new GridBagConstraints(1, 6, 2, 1, 1.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); // Add button but disable the login button initially savePasswordBox.addActionListener(this); autoLoginBox.addActionListener(this); buttonPanel.add(quitButton, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 0), 0, 0)); if (!"true".equals(Default.getString(Default.ACCOUNT_DISABLED))) { buttonPanel.add(createAccountButton, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 0), 0, 0)); } buttonPanel.add(connectionButton, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 0), 0, 0)); buttonPanel.add(loginButton, new GridBagConstraints(3, 0, 4, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 0), 0, 0)); cardPanel.add(buttonPanel, BUTTON_PANEL); cardPanel.setOpaque(false); buttonPanel.setOpaque(false); progressBar.setHorizontalAlignment(JLabel.CENTER); cardPanel.add(progressBar, PROGRESS_BAR); add(cardPanel, new GridBagConstraints(0, 7, 4, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); loginButton.setEnabled(false); // Add KeyListener usernameField.addKeyListener(this); passwordField.addKeyListener(this); serverField.addKeyListener(this); passwordField.addFocusListener(this); usernameField.addFocusListener(this); serverField.addFocusListener(this); // Add ActionListener quitButton.addActionListener(this); loginButton.addActionListener(this); connectionButton.addActionListener(this); // Make same size GraphicUtils.makeSameSize(new JComponent[]{usernameField, passwordField}); // Set progress bar description progressBar.setText(SparkRes.getString(SparkRes.LOGIN_DIALOG_AUTHENTICATING)); //progressBar.setStringPainted(true); // Set Resources ResourceUtils.resLabel(usernameLabel, usernameField, SparkRes.getString(SparkRes.LOGIN_DIALOG_USERNAME)); ResourceUtils.resLabel(passwordLabel, passwordField, SparkRes.getString(SparkRes.LOGIN_DIALOG_PASSWORD)); ResourceUtils.resButton(quitButton, SparkRes.getString(SparkRes.LOGIN_DIALOG_QUIT)); ResourceUtils.resButton(loginButton, Res.getString("title.login")); ResourceUtils.resButton(connectionButton, Res.getString("button.advanced")); // Load previous instances String userProp = localPref.getUsername(); String serverProp = localPref.getServer(); if (userProp != null && serverProp != null) { usernameField.setText(userProp); serverField.setText(serverProp); } // Check Settings if (localPref.isSavePassword()) { String encryptedPassword = localPref.getPassword(); if (encryptedPassword != null) { String password = Encryptor.decrypt(encryptedPassword); passwordField.setText(password); } savePasswordBox.setSelected(true); loginButton.setEnabled(true); } autoLoginBox.setSelected(localPref.isAutoLogin()); if (autoLoginBox.isSelected()) { savePasswordBox.setEnabled(false); autoLoginBox.setEnabled(false); validateLogin(); return; } // Handle arguments String username = Spark.getArgumentValue("username"); String password = Spark.getArgumentValue("password"); String server = Spark.getArgumentValue("server"); if (username != null) { usernameField.setText(username); } if (password != null) { passwordField.setText(password); } if (server != null) { serverField.setText(server); } if (username != null && server != null && password != null) { savePasswordBox.setEnabled(false); autoLoginBox.setEnabled(false); validateLogin(); } createAccountButton.addActionListener(this); final String lockedDownURL = Default.getString(Default.HOST_NAME); if (ModelUtil.hasLength(lockedDownURL)) { serverField.setEnabled(false); serverField.setText(lockedDownURL); } }
| 1,122,374
|
public String getUsername() { return usernameField.getText(); }
|
public String getUsername() { return StringUtils.escapeNode(usernameField.getText().toLowerCase()); }
| 1,122,375
|
public final Object build(BuildContext rc) throws BuildException { // collect the arguments Object args[] = new Object[_buildArgs]; { int i = 0; args[i++] = rc; if ( hasCondition() ) { Object cond = (_condition instanceof Builder) ? ((Builder) _condition).build(rc) : _condition; if (cond instanceof Condition) { args[i++] = cond; } else { args[i++] = new ConstantCondition(cond); } } if ( hasTarget() ) { args[i++] = _target; } if ( hasArguments() ) { args[i++] = getArguments(rc); } if ( isContainer() ) { args[i++] = _contents; } if ( isParser() ) { args[i++] = _text; } if ( isMulti() ) { args[i++] = _dependent; } } // build the arguments for (int i = 0; i < args.length; i++) { Object arg = args[i]; if ((arg != null) && (arg instanceof Builder)) { args[i] = ((Builder) arg).build(rc); } } // build the directive Object self; try { self = _build.invoke(null,args); } catch (InvocationTargetException e) { Throwable t = e.getTargetException(); if (t instanceof BuildException) { throw (BuildException) t; } else { throw new BuildException("dependent: " + e); } } catch (Exception e) { throw new BuildException("dependent: " + e); } return self; }
|
public final Object build(BuildContext rc) throws BuildException { // collect the arguments Object args[] = new Object[_buildArgs]; { int i = 0; args[i++] = rc; if ( hasCondition() ) { Object cond = (_condition instanceof Builder) ? ((Builder) _condition).build(rc) : _condition; if (cond instanceof Condition) { args[i++] = cond; } else { args[i++] = new ConstantCondition(cond); } } if ( hasTarget() ) { args[i++] = _target; } if ( hasArguments() ) { args[i++] = getArguments(rc); } if ( isContainer() ) { args[i++] = _contents; } if ( isParser() ) { args[i++] = _text; } if ( isMulti() ) { args[i++] = _dependent; } } // build the arguments for (int i = 0; i < args.length; i++) { Object arg = args[i]; if ((arg != null) && (arg instanceof Builder)) { args[i] = ((Builder) arg).build(rc); } } // build the directive Object self; try { self = _build.invoke(null,args); } catch (InvocationTargetException e) { Throwable t = e.getTargetException(); if (t instanceof BuildException) { throw (BuildException) t; } else { Engine.log.exception(t); throw new BuildException("failure during build: " + t); } } catch (Exception e) { Engine.log.exception(t); throw new BuildException("failure during build: " + t); } return self; }
| 1,122,376
|
public final Object build(BuildContext rc) throws BuildException { // collect the arguments Object args[] = new Object[_buildArgs]; { int i = 0; args[i++] = rc; if ( hasCondition() ) { Object cond = (_condition instanceof Builder) ? ((Builder) _condition).build(rc) : _condition; if (cond instanceof Condition) { args[i++] = cond; } else { args[i++] = new ConstantCondition(cond); } } if ( hasTarget() ) { args[i++] = _target; } if ( hasArguments() ) { args[i++] = getArguments(rc); } if ( isContainer() ) { args[i++] = _contents; } if ( isParser() ) { args[i++] = _text; } if ( isMulti() ) { args[i++] = _dependent; } } // build the arguments for (int i = 0; i < args.length; i++) { Object arg = args[i]; if ((arg != null) && (arg instanceof Builder)) { args[i] = ((Builder) arg).build(rc); } } // build the directive Object self; try { self = _build.invoke(null,args); } catch (InvocationTargetException e) { Throwable t = e.getTargetException(); if (t instanceof BuildException) { throw (BuildException) t; } else { throw new BuildException("dependent: " + e); } } catch (Exception e) { throw new BuildException("dependent: " + e); } return self; }
|
public final Object build(BuildContext rc) throws BuildException { // collect the arguments Object args[] = new Object[_buildArgs]; { int i = 0; args[i++] = rc; if ( hasCondition() ) { Object cond = (_condition instanceof Builder) ? ((Builder) _condition).build(rc) : _condition; if (cond instanceof Condition) { args[i++] = cond; } else { args[i++] = new ConstantCondition(cond); } } if ( hasTarget() ) { args[i++] = _target; } if ( hasArguments() ) { args[i++] = getArguments(rc); } if ( isContainer() ) { args[i++] = _contents; } if ( isParser() ) { args[i++] = _text; } if ( isMulti() ) { args[i++] = _dependent; } } // build the arguments for (int i = 0; i < args.length; i++) { Object arg = args[i]; if ((arg != null) && (arg instanceof Builder)) { args[i] = ((Builder) arg).build(rc); } } // build the directive Object self; try { self = _build.invoke(null,args); } catch (InvocationTargetException e) { Throwable t = e.getTargetException(); if (t instanceof BuildException) { throw (BuildException) t; } else { throw new BuildException("failed to build: " + e); } } catch (Exception e) { throw new BuildException("failed to build: " + e); } return self; }
| 1,122,377
|
private void dumpClasses(SourceFileData sourceFileData) { Iterator it = sourceFileData.getChildren().iterator(); while (it.hasNext()) { dumpClass((ClassData)it.next()); } }
|
private void dumpClasses(SourceFileData sourceFileData) { Iterator it = sourceFileData.getClasses().iterator(); while (it.hasNext()) { dumpClass((ClassData)it.next()); } }
| 1,122,378
|
private void dumpLines(ClassData classData) { dumpLines(classData.getChildren()); }
|
private void dumpLines(ClassData classData) { dumpLines(classData.getLines()); }
| 1,122,379
|
private void dumpPackages(ProjectData projectData) { println("<packages>"); increaseIndentation(); Iterator it = projectData.getChildren().iterator(); while (it.hasNext()) { dumpPackage((PackageData)it.next()); } decreaseIndentation(); println("</packages>"); }
|
private void dumpPackages(ProjectData projectData) { println("<packages>"); increaseIndentation(); Iterator it = projectData.getPackages().iterator(); while (it.hasNext()) { dumpPackage((PackageData)it.next()); } decreaseIndentation(); println("</packages>"); }
| 1,122,380
|
private void dumpSourceFiles(PackageData packageData) { println("<classes>"); increaseIndentation(); Iterator it = packageData.getChildren().iterator(); while (it.hasNext()) { dumpClasses((SourceFileData)it.next()); } decreaseIndentation(); println("</classes>"); }
|
private void dumpSourceFiles(PackageData packageData) { println("<classes>"); increaseIndentation(); Iterator it = packageData.getSourceFiles().iterator(); while (it.hasNext()) { dumpClasses((SourceFileData)it.next()); } decreaseIndentation(); println("</classes>"); }
| 1,122,381
|
public org.apache.geronimo.gbean.GBeanData getGBeanData(ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException{ ServiceFactory serviceFactory = getServiceFactory(name); if (serviceFactory instanceof GeronimoServiceFactory) { GeronimoServiceFactory geronimoServiceFactory = null; geronimoServiceFactory = (GeronimoServiceFactory) serviceFactory; return GeronimoUtil.createGBeanData(geronimoServiceFactory.getGBeanDefinition()); } return createGBeanData(name); }
|
public org.apache.geronimo.gbean.GBeanData getGBeanData(ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException{ ServiceFactory serviceFactory = getServiceFactory(name); if (serviceFactory instanceof GeronimoServiceFactory) { GeronimoServiceFactory geronimoServiceFactory = null; geronimoServiceFactory = (GeronimoServiceFactory) serviceFactory; return GeronimoUtil.createGBeanData(geronimoServiceFactory.getGBeanDefinition()); } return createGBeanData(name); }
| 1,122,383
|
public org.apache.geronimo.gbean.GBeanData getGBeanData(ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException{ ServiceFactory serviceFactory = getServiceFactory(name); if (serviceFactory instanceof GeronimoServiceFactory) { GeronimoServiceFactory geronimoServiceFactory = null; geronimoServiceFactory = (GeronimoServiceFactory) serviceFactory; return GeronimoUtil.createGBeanData(geronimoServiceFactory.getGBeanDefinition()); } return createGBeanData(name); }
|
public org.apache.geronimo.gbean.GBeanData getGBeanData(ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException{ ServiceFactory serviceFactory = getServiceFactory(name); if (serviceFactory instanceof GeronimoServiceFactory) { GeronimoServiceFactory geronimoServiceFactory = null; geronimoServiceFactory = (GeronimoServiceFactory) serviceFactory; return GeronimoUtil.createGBeanData(objectName, geronimoServiceFactory); } return createGBeanData(name); }
| 1,122,384
|
public org.apache.geronimo.gbean.GBeanData getGBeanData(ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException{ ServiceFactory serviceFactory = getServiceFactory(name); if (serviceFactory instanceof GeronimoServiceFactory) { GeronimoServiceFactory geronimoServiceFactory = null; geronimoServiceFactory = (GeronimoServiceFactory) serviceFactory; return GeronimoUtil.createGBeanData(geronimoServiceFactory.getGBeanDefinition()); } return createGBeanData(name); }
|
public org.apache.geronimo.gbean.GBeanData getGBeanData(ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException{ ServiceFactory serviceFactory = getServiceFactory(name); if (serviceFactory instanceof GeronimoServiceFactory) { GeronimoServiceFactory geronimoServiceFactory = null; geronimoServiceFactory = (GeronimoServiceFactory) serviceFactory; return GeronimoUtil.createGBeanData(geronimoServiceFactory.getGBeanDefinition()); } return createGBeanData(objectName); }
| 1,122,385
|
public org.apache.geronimo.gbean.GBeanInfo getGBeanInfo(ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException { ServiceFactory serviceFactory = getServiceFactory(name); if (serviceFactory instanceof GeronimoServiceFactory) { GeronimoServiceFactory geronimoServiceFactory = (GeronimoServiceFactory) serviceFactory; return GeronimoUtil.createGBeanInfo(geronimoServiceFactory.getGBeanDefinition()); } return createGBeanInfo(name); }
|
public org.apache.geronimo.gbean.GBeanInfo getGBeanInfo(ObjectName name) throws org.apache.geronimo.kernel.GBeanNotFoundException { ServiceFactory serviceFactory = getServiceFactory(name); if (serviceFactory instanceof GeronimoServiceFactory) { GeronimoServiceFactory geronimoServiceFactory = (GeronimoServiceFactory) serviceFactory; return GeronimoUtil.createGBeanInfo(geronimoServiceFactory); } return createGBeanInfo(name); }
| 1,122,386
|
public void loadGBean(org.apache.geronimo.gbean.GBeanData gbeanData, ClassLoader classLoader) throws org.apache.geronimo.kernel.GBeanAlreadyExistsException { ObjectName objectName = gbeanData.getName(); GBeanDefinition geronimoBeanDefinition = GeronimoUtil.createGeronimoBeanDefinition(gbeanData, classLoader); GeronimoServiceFactory geronimoServiceFactory = new GeronimoServiceFactory(proxyManager, geronimoBeanDefinition); try { kernel.loadService(objectName, geronimoServiceFactory, classLoader); } catch (ServiceAlreadyExistsException e) { throw new org.apache.geronimo.kernel.GBeanAlreadyExistsException(e); } }
|
public void loadGBean(org.apache.geronimo.gbean.GBeanData gbeanData, ClassLoader classLoader) throws org.apache.geronimo.kernel.GBeanAlreadyExistsException { ObjectName objectName = gbeanData.getName(); GBeanDefinition geronimoBeanDefinition = GeronimoUtil.createGeronimoBeanDefinition(gbeanData, classLoader); GeronimoServiceFactory geronimoServiceFactory = new GeronimoServiceFactory(proxyManager, geronimoBeanDefinition); try { kernel.loadService(objectName, geronimoServiceFactory, classLoader); } catch (ServiceAlreadyExistsException e) { throw new org.apache.geronimo.kernel.GBeanAlreadyExistsException(e); } }
| 1,122,387
|
public static GBeanData createGBeanData(GBeanDefinition gBeanDefinition) { GBeanData gbeanData = new GBeanData(gBeanDefinition.getObjectName(), createGBeanInfo(gBeanDefinition)); gbeanData.setAttribute("gbeanEnabled", Boolean.valueOf(gBeanDefinition.isEnabled())); // add the normal properties PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; gbeanData.setAttribute(propertyValue.getName(), propertyValue.getValue()); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; gbeanData.setAttribute(dynamicPropertyValue.getName(), dynamicPropertyValue.getValue()); } // add the constructor arguments for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { int index = ((Integer) entry.getKey()).intValue(); constructorArgName = "constructor-argument-" + index; } gbeanData.setAttribute(constructorArgName, valueHolder.getValue()); } // add the dependencies String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { String dependencyString = dependsOn[i]; Map map = stringToDependency(dependencyString); Map.Entry entry = ((Map.Entry) map.entrySet().iterator().next()); String dependencyName = (String) entry.getKey(); Set patterns = (Set) entry.getValue(); gbeanData.setReferencePatterns(dependencyName, patterns); } return gbeanData; }
|
public static GBeanData createGBeanData(GBeanDefinition gBeanDefinition) { GBeanData gbeanData = new GBeanData(gBeanDefinition.getObjectName(), createGBeanInfo(gBeanDefinition)); gbeanData.setAttribute("gbeanEnabled", Boolean.valueOf(gBeanDefinition.isEnabled())); // add the normal properties PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; gbeanData.setAttribute(propertyValue.getName(), propertyValue.getValue()); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; gbeanData.setAttribute(dynamicPropertyValue.getName(), dynamicPropertyValue.getValue()); } // add the constructor arguments for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { int index = ((Integer) entry.getKey()).intValue(); constructorArgName = "constructor-argument-" + index; } gbeanData.setAttribute(constructorArgName, valueHolder.getValue()); } // add the dependencies String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { String dependencyString = dependsOn[i]; Map map = stringToDependency(dependencyString); Map.Entry entry = ((Map.Entry) map.entrySet().iterator().next()); String dependencyName = (String) entry.getKey(); Set patterns = (Set) entry.getValue(); gbeanData.setReferencePatterns(dependencyName, patterns); } return gbeanData; }
| 1,122,389
|
public static GBeanData createGBeanData(GBeanDefinition gBeanDefinition) { GBeanData gbeanData = new GBeanData(gBeanDefinition.getObjectName(), createGBeanInfo(gBeanDefinition)); gbeanData.setAttribute("gbeanEnabled", Boolean.valueOf(gBeanDefinition.isEnabled())); // add the normal properties PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; gbeanData.setAttribute(propertyValue.getName(), propertyValue.getValue()); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; gbeanData.setAttribute(dynamicPropertyValue.getName(), dynamicPropertyValue.getValue()); } // add the constructor arguments for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { int index = ((Integer) entry.getKey()).intValue(); constructorArgName = "constructor-argument-" + index; } gbeanData.setAttribute(constructorArgName, valueHolder.getValue()); } // add the dependencies String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { String dependencyString = dependsOn[i]; Map map = stringToDependency(dependencyString); Map.Entry entry = ((Map.Entry) map.entrySet().iterator().next()); String dependencyName = (String) entry.getKey(); Set patterns = (Set) entry.getValue(); gbeanData.setReferencePatterns(dependencyName, patterns); } return gbeanData; }
|
public static GBeanData createGBeanData(GBeanDefinition gBeanDefinition) { GBeanData gbeanData = new GBeanData(gBeanDefinition.getObjectName(), createGBeanInfo(gBeanDefinition)); gbeanData.setAttribute("gbeanEnabled", Boolean.valueOf(gBeanDefinition.isEnabled())); // add the normal properties PropertyValue[] properties = beanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; gbeanData.setAttribute(propertyValue.getName(), propertyValue.getValue()); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; gbeanData.setAttribute(dynamicPropertyValue.getName(), dynamicPropertyValue.getValue()); } // add the constructor arguments for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { int index = ((Integer) entry.getKey()).intValue(); constructorArgName = "constructor-argument-" + index; } gbeanData.setAttribute(constructorArgName, valueHolder.getValue()); } // add the dependencies String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { String dependencyString = dependsOn[i]; Map map = stringToDependency(dependencyString); Map.Entry entry = ((Map.Entry) map.entrySet().iterator().next()); String dependencyName = (String) entry.getKey(); Set patterns = (Set) entry.getValue(); gbeanData.setReferencePatterns(dependencyName, patterns); } return gbeanData; }
| 1,122,390
|
public static GBeanData createGBeanData(GBeanDefinition gBeanDefinition) { GBeanData gbeanData = new GBeanData(gBeanDefinition.getObjectName(), createGBeanInfo(gBeanDefinition)); gbeanData.setAttribute("gbeanEnabled", Boolean.valueOf(gBeanDefinition.isEnabled())); // add the normal properties PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; gbeanData.setAttribute(propertyValue.getName(), propertyValue.getValue()); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; gbeanData.setAttribute(dynamicPropertyValue.getName(), dynamicPropertyValue.getValue()); } // add the constructor arguments for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { int index = ((Integer) entry.getKey()).intValue(); constructorArgName = "constructor-argument-" + index; } gbeanData.setAttribute(constructorArgName, valueHolder.getValue()); } // add the dependencies String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { String dependencyString = dependsOn[i]; Map map = stringToDependency(dependencyString); Map.Entry entry = ((Map.Entry) map.entrySet().iterator().next()); String dependencyName = (String) entry.getKey(); Set patterns = (Set) entry.getValue(); gbeanData.setReferencePatterns(dependencyName, patterns); } return gbeanData; }
|
public static GBeanData createGBeanData(GBeanDefinition gBeanDefinition) { GBeanData gbeanData = new GBeanData(gBeanDefinition.getObjectName(), createGBeanInfo(gBeanDefinition)); gbeanData.setAttribute("gbeanEnabled", Boolean.valueOf(gBeanDefinition.isEnabled())); // add the normal properties PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; if (persistentProperties.contains(propertyValue.getName())) { gbeanData.setAttribute(propertyValue.getName(), propertyValue.getValue()); } } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; gbeanData.setAttribute(dynamicPropertyValue.getName(), dynamicPropertyValue.getValue()); } // add the constructor arguments for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { int index = ((Integer) entry.getKey()).intValue(); constructorArgName = "constructor-argument-" + index; } gbeanData.setAttribute(constructorArgName, valueHolder.getValue()); } // add the dependencies String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { String dependencyString = dependsOn[i]; Map map = stringToDependency(dependencyString); Map.Entry entry = ((Map.Entry) map.entrySet().iterator().next()); String dependencyName = (String) entry.getKey(); Set patterns = (Set) entry.getValue(); gbeanData.setReferencePatterns(dependencyName, patterns); } return gbeanData; }
| 1,122,391
|
public static GBeanData createGBeanData(GBeanDefinition gBeanDefinition) { GBeanData gbeanData = new GBeanData(gBeanDefinition.getObjectName(), createGBeanInfo(gBeanDefinition)); gbeanData.setAttribute("gbeanEnabled", Boolean.valueOf(gBeanDefinition.isEnabled())); // add the normal properties PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; gbeanData.setAttribute(propertyValue.getName(), propertyValue.getValue()); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; gbeanData.setAttribute(dynamicPropertyValue.getName(), dynamicPropertyValue.getValue()); } // add the constructor arguments for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { int index = ((Integer) entry.getKey()).intValue(); constructorArgName = "constructor-argument-" + index; } gbeanData.setAttribute(constructorArgName, valueHolder.getValue()); } // add the dependencies String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { String dependencyString = dependsOn[i]; Map map = stringToDependency(dependencyString); Map.Entry entry = ((Map.Entry) map.entrySet().iterator().next()); String dependencyName = (String) entry.getKey(); Set patterns = (Set) entry.getValue(); gbeanData.setReferencePatterns(dependencyName, patterns); } return gbeanData; }
|
public static GBeanData createGBeanData(GBeanDefinition gBeanDefinition) { GBeanData gbeanData = new GBeanData(gBeanDefinition.getObjectName(), createGBeanInfo(gBeanDefinition)); gbeanData.setAttribute("gbeanEnabled", Boolean.valueOf(gBeanDefinition.isEnabled())); // add the normal properties PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; gbeanData.setAttribute(propertyValue.getName(), propertyValue.getValue()); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; gbeanData.setAttribute(dynamicPropertyValue.getName(), dynamicPropertyValue.getValue()); } // add the constructor arguments for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { int index = ((Integer) entry.getKey()).intValue(); constructorArgName = "constructor-argument-" + index; } gbeanData.setAttribute(constructorArgName, valueHolder.getValue()); } // add the dependencies String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { String dependencyString = dependsOn[i]; Map map = stringToDependency(dependencyString); Map.Entry entry = ((Map.Entry) map.entrySet().iterator().next()); String dependencyName = (String) entry.getKey(); Set patterns = (Set) entry.getValue(); gbeanData.setReferencePatterns(dependencyName, patterns); } return gbeanData; }
| 1,122,392
|
public static GBeanData createGBeanData(GBeanDefinition gBeanDefinition) { GBeanData gbeanData = new GBeanData(gBeanDefinition.getObjectName(), createGBeanInfo(gBeanDefinition)); gbeanData.setAttribute("gbeanEnabled", Boolean.valueOf(gBeanDefinition.isEnabled())); // add the normal properties PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; gbeanData.setAttribute(propertyValue.getName(), propertyValue.getValue()); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; gbeanData.setAttribute(dynamicPropertyValue.getName(), dynamicPropertyValue.getValue()); } // add the constructor arguments for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { int index = ((Integer) entry.getKey()).intValue(); constructorArgName = "constructor-argument-" + index; } gbeanData.setAttribute(constructorArgName, valueHolder.getValue()); } // add the dependencies String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { String dependencyString = dependsOn[i]; Map map = stringToDependency(dependencyString); Map.Entry entry = ((Map.Entry) map.entrySet().iterator().next()); String dependencyName = (String) entry.getKey(); Set patterns = (Set) entry.getValue(); gbeanData.setReferencePatterns(dependencyName, patterns); } return gbeanData; }
|
public static GBeanData createGBeanData(GBeanDefinition gBeanDefinition) { GBeanData gbeanData = new GBeanData(gBeanDefinition.getObjectName(), createGBeanInfo(gBeanDefinition)); gbeanData.setAttribute("gbeanEnabled", Boolean.valueOf(gBeanDefinition.isEnabled())); // add the normal properties PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; gbeanData.setAttribute(propertyValue.getName(), propertyValue.getValue()); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; gbeanData.setAttribute(dynamicPropertyValue.getName(), dynamicPropertyValue.getValue()); } // add the constructor arguments for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { int index = ((Integer) entry.getKey()).intValue(); constructorArgName = "constructor-argument-" + index; } gbeanData.setAttribute(constructorArgName, valueHolder.getValue()); } // add the dependencies String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { String dependencyString = dependsOn[i]; Map map = stringToDependency(dependencyString); Map.Entry entry = ((Map.Entry) map.entrySet().iterator().next()); String dependencyName = (String) entry.getKey(); Set patterns = (Set) entry.getValue(); gbeanData.setReferencePatterns(dependencyName, patterns); } return gbeanData; }
| 1,122,393
|
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; attributeInfos.add(new GAttributeInfo(propertyValue.getName(), "java.lang.Object", true, null, null)); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; attributeInfos.add(new DynamicGAttributeInfo(dynamicPropertyValue.getName(), "java.lang.Object", true, true, true)); } // add the constructor arguments int maxIndex = -1; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().keySet().iterator(); iterator.hasNext();) { int index = ((Integer) iterator.next()).intValue(); if (index > maxIndex) maxIndex = index; } String[] constructorArgs = new String[maxIndex + 1]; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); int index = ((Integer) entry.getKey()).intValue(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { constructorArgName = "constructor-argument-" + index; } attributeInfos.add(new GAttributeInfo(constructorArgName, valueHolder.getType(), true, null, null)); constructorArgs[index] = constructorArgName; } // add the dependencies Set referenceInfos = new HashSet(); String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { Map map = stringToDependency(dependsOn[i]); String dependencyName = (String) map.keySet().iterator().next(); referenceInfos.add(new GReferenceInfo("@" + dependencyName, DependencyOnly.class.getName(), DependencyOnly.class.getName(), null, null)); } return new GBeanInfo(gBeanDefinition.getBeanClassName(), "GBean", attributeInfos, new GConstructorInfo(constructorArgs), Collections.EMPTY_SET, referenceInfos); }
|
public static GBeanInfo createGBeanInfo(GeronimoServiceFactory serviceFactory) { RootBeanDefinition beanDefinition = serviceFactory.getBeanDefinition(); Set persistentProperties = serviceFactory.getPersistentProperties(); // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; attributeInfos.add(new GAttributeInfo(propertyValue.getName(), "java.lang.Object", true, null, null)); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; attributeInfos.add(new DynamicGAttributeInfo(dynamicPropertyValue.getName(), "java.lang.Object", true, true, true)); } // add the constructor arguments int maxIndex = -1; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().keySet().iterator(); iterator.hasNext();) { int index = ((Integer) iterator.next()).intValue(); if (index > maxIndex) maxIndex = index; } String[] constructorArgs = new String[maxIndex + 1]; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); int index = ((Integer) entry.getKey()).intValue(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { constructorArgName = "constructor-argument-" + index; } attributeInfos.add(new GAttributeInfo(constructorArgName, valueHolder.getType(), true, null, null)); constructorArgs[index] = constructorArgName; } // add the dependencies Set referenceInfos = new HashSet(); String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { Map map = stringToDependency(dependsOn[i]); String dependencyName = (String) map.keySet().iterator().next(); referenceInfos.add(new GReferenceInfo("@" + dependencyName, DependencyOnly.class.getName(), DependencyOnly.class.getName(), null, null)); } return new GBeanInfo(gBeanDefinition.getBeanClassName(), "GBean", attributeInfos, new GConstructorInfo(constructorArgs), Collections.EMPTY_SET, referenceInfos); }
| 1,122,394
|
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; attributeInfos.add(new GAttributeInfo(propertyValue.getName(), "java.lang.Object", true, null, null)); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; attributeInfos.add(new DynamicGAttributeInfo(dynamicPropertyValue.getName(), "java.lang.Object", true, true, true)); } // add the constructor arguments int maxIndex = -1; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().keySet().iterator(); iterator.hasNext();) { int index = ((Integer) iterator.next()).intValue(); if (index > maxIndex) maxIndex = index; } String[] constructorArgs = new String[maxIndex + 1]; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); int index = ((Integer) entry.getKey()).intValue(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { constructorArgName = "constructor-argument-" + index; } attributeInfos.add(new GAttributeInfo(constructorArgName, valueHolder.getType(), true, null, null)); constructorArgs[index] = constructorArgName; } // add the dependencies Set referenceInfos = new HashSet(); String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { Map map = stringToDependency(dependsOn[i]); String dependencyName = (String) map.keySet().iterator().next(); referenceInfos.add(new GReferenceInfo("@" + dependencyName, DependencyOnly.class.getName(), DependencyOnly.class.getName(), null, null)); } return new GBeanInfo(gBeanDefinition.getBeanClassName(), "GBean", attributeInfos, new GConstructorInfo(constructorArgs), Collections.EMPTY_SET, referenceInfos); }
|
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = beanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; attributeInfos.add(new GAttributeInfo(propertyValue.getName(), "java.lang.Object", true, null, null)); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; attributeInfos.add(new DynamicGAttributeInfo(dynamicPropertyValue.getName(), "java.lang.Object", true, true, true)); } // add the constructor arguments int maxIndex = -1; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().keySet().iterator(); iterator.hasNext();) { int index = ((Integer) iterator.next()).intValue(); if (index > maxIndex) maxIndex = index; } String[] constructorArgs = new String[maxIndex + 1]; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); int index = ((Integer) entry.getKey()).intValue(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { constructorArgName = "constructor-argument-" + index; } attributeInfos.add(new GAttributeInfo(constructorArgName, valueHolder.getType(), true, null, null)); constructorArgs[index] = constructorArgName; } // add the dependencies Set referenceInfos = new HashSet(); String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { Map map = stringToDependency(dependsOn[i]); String dependencyName = (String) map.keySet().iterator().next(); referenceInfos.add(new GReferenceInfo("@" + dependencyName, DependencyOnly.class.getName(), DependencyOnly.class.getName(), null, null)); } return new GBeanInfo(gBeanDefinition.getBeanClassName(), "GBean", attributeInfos, new GConstructorInfo(constructorArgs), Collections.EMPTY_SET, referenceInfos); }
| 1,122,395
|
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; attributeInfos.add(new GAttributeInfo(propertyValue.getName(), "java.lang.Object", true, null, null)); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; attributeInfos.add(new DynamicGAttributeInfo(dynamicPropertyValue.getName(), "java.lang.Object", true, true, true)); } // add the constructor arguments int maxIndex = -1; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().keySet().iterator(); iterator.hasNext();) { int index = ((Integer) iterator.next()).intValue(); if (index > maxIndex) maxIndex = index; } String[] constructorArgs = new String[maxIndex + 1]; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); int index = ((Integer) entry.getKey()).intValue(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { constructorArgName = "constructor-argument-" + index; } attributeInfos.add(new GAttributeInfo(constructorArgName, valueHolder.getType(), true, null, null)); constructorArgs[index] = constructorArgName; } // add the dependencies Set referenceInfos = new HashSet(); String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { Map map = stringToDependency(dependsOn[i]); String dependencyName = (String) map.keySet().iterator().next(); referenceInfos.add(new GReferenceInfo("@" + dependencyName, DependencyOnly.class.getName(), DependencyOnly.class.getName(), null, null)); } return new GBeanInfo(gBeanDefinition.getBeanClassName(), "GBean", attributeInfos, new GConstructorInfo(constructorArgs), Collections.EMPTY_SET, referenceInfos); }
|
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; String propertyName = propertyValue.getName(); attributeInfos.add(new GAttributeInfo(propertyName, "java.lang.Object", true, null, null)); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; attributeInfos.add(new DynamicGAttributeInfo(dynamicPropertyValue.getName(), "java.lang.Object", true, true, true)); } // add the constructor arguments int maxIndex = -1; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().keySet().iterator(); iterator.hasNext();) { int index = ((Integer) iterator.next()).intValue(); if (index > maxIndex) maxIndex = index; } String[] constructorArgs = new String[maxIndex + 1]; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); int index = ((Integer) entry.getKey()).intValue(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { constructorArgName = "constructor-argument-" + index; } attributeInfos.add(new GAttributeInfo(constructorArgName, valueHolder.getType(), true, null, null)); constructorArgs[index] = constructorArgName; } // add the dependencies Set referenceInfos = new HashSet(); String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { Map map = stringToDependency(dependsOn[i]); String dependencyName = (String) map.keySet().iterator().next(); referenceInfos.add(new GReferenceInfo("@" + dependencyName, DependencyOnly.class.getName(), DependencyOnly.class.getName(), null, null)); } return new GBeanInfo(gBeanDefinition.getBeanClassName(), "GBean", attributeInfos, new GConstructorInfo(constructorArgs), Collections.EMPTY_SET, referenceInfos); }
| 1,122,396
|
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; attributeInfos.add(new GAttributeInfo(propertyValue.getName(), "java.lang.Object", true, null, null)); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; attributeInfos.add(new DynamicGAttributeInfo(dynamicPropertyValue.getName(), "java.lang.Object", true, true, true)); } // add the constructor arguments int maxIndex = -1; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().keySet().iterator(); iterator.hasNext();) { int index = ((Integer) iterator.next()).intValue(); if (index > maxIndex) maxIndex = index; } String[] constructorArgs = new String[maxIndex + 1]; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); int index = ((Integer) entry.getKey()).intValue(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { constructorArgName = "constructor-argument-" + index; } attributeInfos.add(new GAttributeInfo(constructorArgName, valueHolder.getType(), true, null, null)); constructorArgs[index] = constructorArgName; } // add the dependencies Set referenceInfos = new HashSet(); String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { Map map = stringToDependency(dependsOn[i]); String dependencyName = (String) map.keySet().iterator().next(); referenceInfos.add(new GReferenceInfo("@" + dependencyName, DependencyOnly.class.getName(), DependencyOnly.class.getName(), null, null)); } return new GBeanInfo(gBeanDefinition.getBeanClassName(), "GBean", attributeInfos, new GConstructorInfo(constructorArgs), Collections.EMPTY_SET, referenceInfos); }
|
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; attributeInfos.add(new GAttributeInfo(propertyValue.getName(), "java.lang.Object", persistentProperties.contains(propertyName), null, null)); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; attributeInfos.add(new DynamicGAttributeInfo(dynamicPropertyValue.getName(), "java.lang.Object", persistentProperties.contains(propertyName), persistentProperties.contains(propertyName), true)); } // add the constructor arguments int maxIndex = -1; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().keySet().iterator(); iterator.hasNext();) { int index = ((Integer) iterator.next()).intValue(); if (index > maxIndex) maxIndex = index; } String[] constructorArgs = new String[maxIndex + 1]; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); int index = ((Integer) entry.getKey()).intValue(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { constructorArgName = "constructor-argument-" + index; } attributeInfos.add(new GAttributeInfo(constructorArgName, valueHolder.getType(), persistentProperties.contains(propertyName), null, null)); constructorArgs[index] = constructorArgName; } // add the dependencies Set referenceInfos = new HashSet(); String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { Map map = stringToDependency(dependsOn[i]); String dependencyName = (String) map.keySet().iterator().next(); referenceInfos.add(new GReferenceInfo("@" + dependencyName, DependencyOnly.class.getName(), DependencyOnly.class.getName(), null, null)); } return new GBeanInfo(gBeanDefinition.getBeanClassName(), "GBean", attributeInfos, new GConstructorInfo(constructorArgs), Collections.EMPTY_SET, referenceInfos); }
| 1,122,397
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.