rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
|
---|---|---|
contextMenu = new TreeContextMenu(shell, tree, l); | contextMenu = new TreeContextMenu(tree, l); | public NoteTree(Shell shell, Composite parent, Listener l) { // Tree and context menu. tree = new Tree(parent, SWT.MULTI); contextMenu = new TreeContextMenu(shell, tree, l); // Text editor for renaming tree nodes. treeEditor = new TreeEditor(tree); treeEditor.grabHorizontal = true; treeEditor.minimumWidth = 50; // Events. this.l = l; l.mapEvent(tree, SWT.MouseDoubleClick, MainController.DISPLAY_TAB); } |
public TreeContextMenu(Shell shell, Control parent, Listener l) { | public TreeContextMenu(Control parent, Listener l) { | public TreeContextMenu(Shell shell, Control parent, Listener l) { // menu menu = new Menu(shell, SWT.POP_UP); l.mapEvent(menu, SWT.Show, TreeContextMenuController.INITIALISE_MENU); parent.setMenu(menu); // menu items addNote = createMenuItem(menu, "Add Note", l, TreeContextMenuController.ADD_NOTE); removeNotes = createMenuItem(menu, "Remove Notes", l, TreeContextMenuController.REMOVE_NOTES); renameNote = createMenuItem(menu, "Rename Note", l, TreeContextMenuController.RENAME_NOTE); } |
menu = new Menu(shell, SWT.POP_UP); | menu = new Menu(parent); | public TreeContextMenu(Shell shell, Control parent, Listener l) { // menu menu = new Menu(shell, SWT.POP_UP); l.mapEvent(menu, SWT.Show, TreeContextMenuController.INITIALISE_MENU); parent.setMenu(menu); // menu items addNote = createMenuItem(menu, "Add Note", l, TreeContextMenuController.ADD_NOTE); removeNotes = createMenuItem(menu, "Remove Notes", l, TreeContextMenuController.REMOVE_NOTES); renameNote = createMenuItem(menu, "Rename Note", l, TreeContextMenuController.RENAME_NOTE); } |
CoverageDataFileHandler.setDefaultDataFile(args[++i]); | dataFile = new File(args[++i]); | private void parseArguments(String[] args) { // Parse our parameters Collection locations = new Vector(); for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) baseDir = new File(args[++i]); else if (args[i].equals("--datafile")) CoverageDataFileHandler.setDefaultDataFile(args[++i]); else if (args[i].equals("--destination")) destinationDirectory = new File(args[++i]); else if (args[i].equals("--ignore")) { String regex = args[++i]; try { Perl5Compiler pc = new Perl5Compiler(); this.ignoreRegexp = pc.compile(regex); } catch (MalformedPatternException e) { logger.warn("The regular expression " + regex + " is invalid: " + e.getLocalizedMessage()); } } else locations.add(args[i]); } // Load coverage data, instrument classes, save coverage data projectData = ProjectData.getGlobalProjectData(); Iterator iter = locations.iterator(); while (iter.hasNext()) addInstrumentation((String)iter.next()); ProjectData.saveGlobalProjectData(); } |
projectData = ProjectData.getGlobalProjectData(); | projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) projectData = new ProjectData(); | private void parseArguments(String[] args) { // Parse our parameters Collection locations = new Vector(); for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) baseDir = new File(args[++i]); else if (args[i].equals("--datafile")) CoverageDataFileHandler.setDefaultDataFile(args[++i]); else if (args[i].equals("--destination")) destinationDirectory = new File(args[++i]); else if (args[i].equals("--ignore")) { String regex = args[++i]; try { Perl5Compiler pc = new Perl5Compiler(); this.ignoreRegexp = pc.compile(regex); } catch (MalformedPatternException e) { logger.warn("The regular expression " + regex + " is invalid: " + e.getLocalizedMessage()); } } else locations.add(args[i]); } // Load coverage data, instrument classes, save coverage data projectData = ProjectData.getGlobalProjectData(); Iterator iter = locations.iterator(); while (iter.hasNext()) addInstrumentation((String)iter.next()); ProjectData.saveGlobalProjectData(); } |
ProjectData.saveGlobalProjectData(); | CoverageDataFileHandler.saveCoverageData(projectData, dataFile); | private void parseArguments(String[] args) { // Parse our parameters Collection locations = new Vector(); for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) baseDir = new File(args[++i]); else if (args[i].equals("--datafile")) CoverageDataFileHandler.setDefaultDataFile(args[++i]); else if (args[i].equals("--destination")) destinationDirectory = new File(args[++i]); else if (args[i].equals("--ignore")) { String regex = args[++i]; try { Perl5Compiler pc = new Perl5Compiler(); this.ignoreRegexp = pc.compile(regex); } catch (MalformedPatternException e) { logger.warn("The regular expression " + regex + " is invalid: " + e.getLocalizedMessage()); } } else locations.add(args[i]); } // Load coverage data, instrument classes, save coverage data projectData = ProjectData.getGlobalProjectData(); Iterator iter = locations.iterator(); while (iter.hasNext()) addInstrumentation((String)iter.next()); ProjectData.saveGlobalProjectData(); } |
ContactList contactList = SparkManager.getWorkspace().getContactList(); | final ContactList contactList = SparkManager.getWorkspace().getContactList(); | public void run() { ContactList contactList = SparkManager.getWorkspace().getContactList(); ChatRoom chatRoom = null; try { chatRoom = getChatContainer().getChatRoom(StringUtils.parseBareAddress(from)); if (chatRoom != null && chatRoom instanceof ChatRoomImpl) { ((ChatRoomImpl)chatRoom).showTyping(false); } } catch (ChatRoomNotFoundException e) { } contactList.useDefaults(from); customList.remove(StringUtils.parseBareAddress(from)); } |
((ChatRoomImpl)chatRoom).showTyping(false); | ((ChatRoomImpl)chatRoom).showTyping(true); | public void run() { ContactList contactList = SparkManager.getWorkspace().getContactList(); ChatRoom chatRoom = null; try { chatRoom = getChatContainer().getChatRoom(StringUtils.parseBareAddress(from)); if (chatRoom != null && chatRoom instanceof ChatRoomImpl) { ((ChatRoomImpl)chatRoom).showTyping(false); } } catch (ChatRoomNotFoundException e) { } contactList.useDefaults(from); customList.remove(StringUtils.parseBareAddress(from)); } |
contactList.useDefaults(from); customList.remove(StringUtils.parseBareAddress(from)); | contactList.setIconFor(from, SparkRes.getImageIcon(SparkRes.SMALL_MESSAGE_EDIT_IMAGE)); customList.add(StringUtils.parseBareAddress(from)); | public void run() { ContactList contactList = SparkManager.getWorkspace().getContactList(); ChatRoom chatRoom = null; try { chatRoom = getChatContainer().getChatRoom(StringUtils.parseBareAddress(from)); if (chatRoom != null && chatRoom instanceof ChatRoomImpl) { ((ChatRoomImpl)chatRoom).showTyping(false); } } catch (ChatRoomNotFoundException e) { } contactList.useDefaults(from); customList.remove(StringUtils.parseBareAddress(from)); } |
return new Object[4]; | return new Object[6]; | public Object[] getSelectItemListArray() { return new Object[4]; } |
values.add(getLocaleIdAsString()); values.add(getStatus()); | public Object[] getValues() {// "Headline", "Published", "Author", "Status" List values = new ArrayList(); values.add(getHeadline()); values.add(getAuthor()); values.add(getSource()); values.add(getCreationDate()); return values.toArray(new Object[values.size()]); } |
|
checkRoomsForTimeout(); | private ChatManager() { chatContainer = new ChatContainer(); // Add a Message Handler SparkManager.getMessageEventManager().addMessageEventNotificationListener(this); SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(final Packet packet) { if (customList.contains(StringUtils.parseBareAddress(packet.getFrom()))) { cancelledNotification(packet.getFrom(), ""); } } }, new PacketTypeFilter(Message.class)); // Start timeout checkRoomsForTimeout(); } |
|
this.sourceFiles.put(classData.getSourceFileName(), packageData.getChild(classData.getSourceFileName())); | public void addClassData(ClassData classData) { String packageName = classData.getPackageName(); PackageData packageData = (PackageData)children.get(packageName); if (packageData == null) { packageData = new PackageData(packageName); // Each key is a package name, stored as an String object. // Each value is information about the package, stored as a PackageData object. this.children.put(packageName, packageData); } packageData.addClassData(classData); this.classes.put(classData.getName(), classData); } |
|
public SortedSet getSourceFiles() | public Collection getSourceFiles() | public SortedSet getSourceFiles() { SortedSet sourceFiles = new TreeSet(); Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { PackageData packageData = (PackageData)iter.next(); sourceFiles.addAll(packageData.getSourceFiles()); } return sourceFiles; } |
SortedSet sourceFiles = new TreeSet(); Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { PackageData packageData = (PackageData)iter.next(); sourceFiles.addAll(packageData.getSourceFiles()); } return sourceFiles; | return this.sourceFiles.values(); | public SortedSet getSourceFiles() { SortedSet sourceFiles = new TreeSet(); Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { PackageData packageData = (PackageData)iter.next(); sourceFiles.addAll(packageData.getSourceFiles()); } return sourceFiles; } |
File dataFile = CoverageDataFileHandler.getDefaultDataFile(); if (dataFile.isFile()) { globalProjectData = CoverageDataFileHandler .loadCoverageData(dataFile); } if (globalProjectData == null) { System.out.println("Cobertura: Coverage data file " + dataFile.getAbsolutePath() + " either does not exist or is not readable. Creating a new data file."); globalProjectData = new ProjectData(); } if( System.getProperty("catalina.home")!=null) { saveGlobalProjectData(); ClassData.class.toString(); CoverageData.class.toString(); CoverageDataContainer.class.toString(); HasBeenInstrumented.class.toString(); LineData.class.toString(); PackageData.class.toString(); SourceFileData.class.toString(); } saveTimer = new SaveTimer(); Runtime.getRuntime().addShutdownHook(new Thread(saveTimer)); | initialize(); globalProjectData = new ProjectData(); | public static ProjectData getGlobalProjectData() { if (globalProjectData != null) return globalProjectData; File dataFile = CoverageDataFileHandler.getDefaultDataFile(); // Read projectData from the serialized file. if (dataFile.isFile()) { //System.out.println("Cobertura: Loading global project data from " + dataFile.getAbsolutePath()); globalProjectData = CoverageDataFileHandler .loadCoverageData(dataFile); } if (globalProjectData == null) { // We could not read from the serialized file, so create a new object. System.out.println("Cobertura: Coverage data file " + dataFile.getAbsolutePath() + " either does not exist or is not readable. Creating a new data file."); globalProjectData = new ProjectData(); } // Hack for Tomcat - by saving project data right now we force loading // of classes involved in this process (like ObjectOutputStream) // so that it won't be necessary to load them on JVM shutdown if( System.getProperty("catalina.home")!=null) { saveGlobalProjectData(); // Additionaly force loading of other classes that might be not loaded // becouse saved project data was empty ClassData.class.toString(); CoverageData.class.toString(); CoverageDataContainer.class.toString(); HasBeenInstrumented.class.toString(); LineData.class.toString(); PackageData.class.toString(); SourceFileData.class.toString(); } // Add a hook to save the data when the JVM exits saveTimer = new SaveTimer(); Runtime.getRuntime().addShutdownHook(new Thread(saveTimer)); // Possibly also save the coverage data every x seconds? //Timer timer = new Timer(true); //timer.schedule(saveTimer, 100); return globalProjectData; } |
ProjectData projectData = getGlobalProjectData(); synchronized (projectData) | ProjectData projectDataToSave = globalProjectData; globalProjectData = new ProjectData(); try | public static void saveGlobalProjectData() { ProjectData projectData = getGlobalProjectData(); synchronized (projectData) { CoverageDataFileHandler.saveCoverageData(projectData, CoverageDataFileHandler.getDefaultDataFile()); } } |
CoverageDataFileHandler.saveCoverageData(projectData, CoverageDataFileHandler.getDefaultDataFile()); | Thread.sleep(1000); | public static void saveGlobalProjectData() { ProjectData projectData = getGlobalProjectData(); synchronized (projectData) { CoverageDataFileHandler.saveCoverageData(projectData, CoverageDataFileHandler.getDefaultDataFile()); } } |
catch (InterruptedException e) { } File dataFile = CoverageDataFileHandler.getDefaultDataFile(); FileLocker lock = new FileLocker(dataFile); if (lock.lock()) { ProjectData datafileProjectData = loadCoverageDataFromDatafile(dataFile); if (datafileProjectData == null) { datafileProjectData = projectDataToSave; } else { datafileProjectData.merge(projectDataToSave); } CoverageDataFileHandler.saveCoverageData(datafileProjectData, dataFile); } lock.release(); | public static void saveGlobalProjectData() { ProjectData projectData = getGlobalProjectData(); synchronized (projectData) { CoverageDataFileHandler.saveCoverageData(projectData, CoverageDataFileHandler.getDefaultDataFile()); } } |
|
mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); | p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); | public UIComponent getEditContainer() { WFUtilArticle localizer = WFUtilArticle.getWFUtilArticle(); String ref = ARTICLE_ITEM_BEAN_ID + ".";// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(40); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "440px", "30px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(22); p.getChildren().add(authorInput); p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "100%", "400px"); bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); bodyArea.setAllowFontSelection(false); HtmlCommandButton editButton = localizer.getButtonVB(EDIT_HTML_ID, "edit"); editButton.setOnclick("wurl='htmlarea/webface/htmledit.jsp?" + PREVIEW_ARTICLE_ITEM_ID + "='+this.tabindex;window.open(wurl,'Edit','height=450,width=600,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no');return false;"); p.getChildren().add(WFUtil.group(WFUtil.group(bodyArea, WFUtil.getBreak()), editButton));/* WFContainer imageContainer = new WFContainer(); imageContainer.add(WFUtil.getButtonVB(ADD_IMAGE_ID, bref + "add_image", this)); imageContainer.add(WFUtil.getBreak()); imageContainer.add(getImageList()); p.getChildren().add(imageContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "source"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "main_category"), WFUtil.getText(":"))); HtmlInputTextarea sourceArea = WFUtil.getTextArea(SOURCE_ID, ref + "source", "440px", "30px"); p.getChildren().add(sourceArea); HtmlSelectOneMenu mainCategoryMenu = WFUtil.getSelectOneMenu(MAIN_CATEGORY_ID, ref + "categories", ref + "mainCategoryId"); p.getChildren().add(mainCategoryMenu); */ mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/ p.getChildren().add(WFUtil.getText(" ")); UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": ")); t.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(t); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(localizer.getHeaderTextVB("current_version"), WFUtil.getTextVB(ref + "versionId") )); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "400px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); p.getChildren().add(WFUtil.group(localizer.getTextVB("category"), WFUtil.getText(":"))); HtmlInputText categoryInput = WFUtil.getInputText(MAIN_CATEGORY_ID, ref + "mainCategory"); if(null==categoryInput.getValue() || "".equals(categoryInput.getValue())) { categoryInput.setValue(ROOT_CATEGORY); } categoryInput.setSize(40); p.getChildren().add(categoryInput); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); WFComponentSelector editorSelector = new WFComponentSelector(); editorSelector.setId(EDITOR_SELECTOR_ID); editorSelector.add(mainContainer); editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); FileUploadForm f = new FileUploadForm(); f.setId(FILE_UPLOAD_FORM_ID); editorSelector.add(f); editorSelector.add(getRelatedContentItemsContainer()); editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); return editorSelector; } |
p = WFPanelUtil.getPlainFormPanel(1); | public UIComponent getEditContainer() { WFUtilArticle localizer = WFUtilArticle.getWFUtilArticle(); String ref = ARTICLE_ITEM_BEAN_ID + ".";// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(40); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "440px", "30px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(22); p.getChildren().add(authorInput); p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "100%", "400px"); bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); bodyArea.setAllowFontSelection(false); HtmlCommandButton editButton = localizer.getButtonVB(EDIT_HTML_ID, "edit"); editButton.setOnclick("wurl='htmlarea/webface/htmledit.jsp?" + PREVIEW_ARTICLE_ITEM_ID + "='+this.tabindex;window.open(wurl,'Edit','height=450,width=600,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no');return false;"); p.getChildren().add(WFUtil.group(WFUtil.group(bodyArea, WFUtil.getBreak()), editButton));/* WFContainer imageContainer = new WFContainer(); imageContainer.add(WFUtil.getButtonVB(ADD_IMAGE_ID, bref + "add_image", this)); imageContainer.add(WFUtil.getBreak()); imageContainer.add(getImageList()); p.getChildren().add(imageContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "source"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "main_category"), WFUtil.getText(":"))); HtmlInputTextarea sourceArea = WFUtil.getTextArea(SOURCE_ID, ref + "source", "440px", "30px"); p.getChildren().add(sourceArea); HtmlSelectOneMenu mainCategoryMenu = WFUtil.getSelectOneMenu(MAIN_CATEGORY_ID, ref + "categories", ref + "mainCategoryId"); p.getChildren().add(mainCategoryMenu); */ mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/ p.getChildren().add(WFUtil.getText(" ")); UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": ")); t.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(t); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(localizer.getHeaderTextVB("current_version"), WFUtil.getTextVB(ref + "versionId") )); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "400px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); p.getChildren().add(WFUtil.group(localizer.getTextVB("category"), WFUtil.getText(":"))); HtmlInputText categoryInput = WFUtil.getInputText(MAIN_CATEGORY_ID, ref + "mainCategory"); if(null==categoryInput.getValue() || "".equals(categoryInput.getValue())) { categoryInput.setValue(ROOT_CATEGORY); } categoryInput.setSize(40); p.getChildren().add(categoryInput); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); WFComponentSelector editorSelector = new WFComponentSelector(); editorSelector.setId(EDITOR_SELECTOR_ID); editorSelector.add(mainContainer); editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); FileUploadForm f = new FileUploadForm(); f.setId(FILE_UPLOAD_FORM_ID); editorSelector.add(f); editorSelector.add(getRelatedContentItemsContainer()); editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); return editorSelector; } |
|
p.getChildren().add(WFUtil.getText(" ")); UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": ")); t.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(t); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(localizer.getHeaderTextVB("current_version"), WFUtil.getTextVB(ref + "versionId") )); | p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionId")); | public UIComponent getEditContainer() { WFUtilArticle localizer = WFUtilArticle.getWFUtilArticle(); String ref = ARTICLE_ITEM_BEAN_ID + ".";// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(40); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "440px", "30px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(22); p.getChildren().add(authorInput); p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "100%", "400px"); bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); bodyArea.setAllowFontSelection(false); HtmlCommandButton editButton = localizer.getButtonVB(EDIT_HTML_ID, "edit"); editButton.setOnclick("wurl='htmlarea/webface/htmledit.jsp?" + PREVIEW_ARTICLE_ITEM_ID + "='+this.tabindex;window.open(wurl,'Edit','height=450,width=600,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no');return false;"); p.getChildren().add(WFUtil.group(WFUtil.group(bodyArea, WFUtil.getBreak()), editButton));/* WFContainer imageContainer = new WFContainer(); imageContainer.add(WFUtil.getButtonVB(ADD_IMAGE_ID, bref + "add_image", this)); imageContainer.add(WFUtil.getBreak()); imageContainer.add(getImageList()); p.getChildren().add(imageContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "source"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "main_category"), WFUtil.getText(":"))); HtmlInputTextarea sourceArea = WFUtil.getTextArea(SOURCE_ID, ref + "source", "440px", "30px"); p.getChildren().add(sourceArea); HtmlSelectOneMenu mainCategoryMenu = WFUtil.getSelectOneMenu(MAIN_CATEGORY_ID, ref + "categories", ref + "mainCategoryId"); p.getChildren().add(mainCategoryMenu); */ mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/ p.getChildren().add(WFUtil.getText(" ")); UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": ")); t.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(t); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(localizer.getHeaderTextVB("current_version"), WFUtil.getTextVB(ref + "versionId") )); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "400px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); p.getChildren().add(WFUtil.group(localizer.getTextVB("category"), WFUtil.getText(":"))); HtmlInputText categoryInput = WFUtil.getInputText(MAIN_CATEGORY_ID, ref + "mainCategory"); if(null==categoryInput.getValue() || "".equals(categoryInput.getValue())) { categoryInput.setValue(ROOT_CATEGORY); } categoryInput.setSize(40); p.getChildren().add(categoryInput); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); WFComponentSelector editorSelector = new WFComponentSelector(); editorSelector.setId(EDITOR_SELECTOR_ID); editorSelector.add(mainContainer); editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); FileUploadForm f = new FileUploadForm(); f.setId(FILE_UPLOAD_FORM_ID); editorSelector.add(f); editorSelector.add(getRelatedContentItemsContainer()); editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); return editorSelector; } |
p = WFPanelUtil.getFormPanel(2); | public UIComponent getEditContainer() { WFUtilArticle localizer = WFUtilArticle.getWFUtilArticle(); String ref = ARTICLE_ITEM_BEAN_ID + ".";// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(40); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "440px", "30px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(22); p.getChildren().add(authorInput); p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "100%", "400px"); bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); bodyArea.setAllowFontSelection(false); HtmlCommandButton editButton = localizer.getButtonVB(EDIT_HTML_ID, "edit"); editButton.setOnclick("wurl='htmlarea/webface/htmledit.jsp?" + PREVIEW_ARTICLE_ITEM_ID + "='+this.tabindex;window.open(wurl,'Edit','height=450,width=600,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no');return false;"); p.getChildren().add(WFUtil.group(WFUtil.group(bodyArea, WFUtil.getBreak()), editButton));/* WFContainer imageContainer = new WFContainer(); imageContainer.add(WFUtil.getButtonVB(ADD_IMAGE_ID, bref + "add_image", this)); imageContainer.add(WFUtil.getBreak()); imageContainer.add(getImageList()); p.getChildren().add(imageContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "source"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "main_category"), WFUtil.getText(":"))); HtmlInputTextarea sourceArea = WFUtil.getTextArea(SOURCE_ID, ref + "source", "440px", "30px"); p.getChildren().add(sourceArea); HtmlSelectOneMenu mainCategoryMenu = WFUtil.getSelectOneMenu(MAIN_CATEGORY_ID, ref + "categories", ref + "mainCategoryId"); p.getChildren().add(mainCategoryMenu); */ mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/ p.getChildren().add(WFUtil.getText(" ")); UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": ")); t.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(t); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(localizer.getHeaderTextVB("current_version"), WFUtil.getTextVB(ref + "versionId") )); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "400px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); p.getChildren().add(WFUtil.group(localizer.getTextVB("category"), WFUtil.getText(":"))); HtmlInputText categoryInput = WFUtil.getInputText(MAIN_CATEGORY_ID, ref + "mainCategory"); if(null==categoryInput.getValue() || "".equals(categoryInput.getValue())) { categoryInput.setValue(ROOT_CATEGORY); } categoryInput.setSize(40); p.getChildren().add(categoryInput); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); WFComponentSelector editorSelector = new WFComponentSelector(); editorSelector.setId(EDITOR_SELECTOR_ID); editorSelector.add(mainContainer); editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); FileUploadForm f = new FileUploadForm(); f.setId(FILE_UPLOAD_FORM_ID); editorSelector.add(f); editorSelector.add(getRelatedContentItemsContainer()); editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); return editorSelector; } |
|
mainContainer.add(p); | public UIComponent getEditContainer() { WFUtilArticle localizer = WFUtilArticle.getWFUtilArticle(); String ref = ARTICLE_ITEM_BEAN_ID + ".";// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(40); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "440px", "30px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(22); p.getChildren().add(authorInput); p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "100%", "400px"); bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); bodyArea.setAllowFontSelection(false); HtmlCommandButton editButton = localizer.getButtonVB(EDIT_HTML_ID, "edit"); editButton.setOnclick("wurl='htmlarea/webface/htmledit.jsp?" + PREVIEW_ARTICLE_ITEM_ID + "='+this.tabindex;window.open(wurl,'Edit','height=450,width=600,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no');return false;"); p.getChildren().add(WFUtil.group(WFUtil.group(bodyArea, WFUtil.getBreak()), editButton));/* WFContainer imageContainer = new WFContainer(); imageContainer.add(WFUtil.getButtonVB(ADD_IMAGE_ID, bref + "add_image", this)); imageContainer.add(WFUtil.getBreak()); imageContainer.add(getImageList()); p.getChildren().add(imageContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "source"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "main_category"), WFUtil.getText(":"))); HtmlInputTextarea sourceArea = WFUtil.getTextArea(SOURCE_ID, ref + "source", "440px", "30px"); p.getChildren().add(sourceArea); HtmlSelectOneMenu mainCategoryMenu = WFUtil.getSelectOneMenu(MAIN_CATEGORY_ID, ref + "categories", ref + "mainCategoryId"); p.getChildren().add(mainCategoryMenu); */ mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/ p.getChildren().add(WFUtil.getText(" ")); UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": ")); t.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(t); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(localizer.getHeaderTextVB("current_version"), WFUtil.getTextVB(ref + "versionId") )); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "400px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); p.getChildren().add(WFUtil.group(localizer.getTextVB("category"), WFUtil.getText(":"))); HtmlInputText categoryInput = WFUtil.getInputText(MAIN_CATEGORY_ID, ref + "mainCategory"); if(null==categoryInput.getValue() || "".equals(categoryInput.getValue())) { categoryInput.setValue(ROOT_CATEGORY); } categoryInput.setSize(40); p.getChildren().add(categoryInput); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); WFComponentSelector editorSelector = new WFComponentSelector(); editorSelector.setId(EDITOR_SELECTOR_ID); editorSelector.add(mainContainer); editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); FileUploadForm f = new FileUploadForm(); f.setId(FILE_UPLOAD_FORM_ID); editorSelector.add(f); editorSelector.add(getRelatedContentItemsContainer()); editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); return editorSelector; } |
|
HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, "save", this); | HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save"); | public UIComponent getEditContainer() { WFUtilArticle localizer = WFUtilArticle.getWFUtilArticle(); String ref = ARTICLE_ITEM_BEAN_ID + ".";// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(40); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "440px", "30px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(22); p.getChildren().add(authorInput); p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "100%", "400px"); bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); bodyArea.setAllowFontSelection(false); HtmlCommandButton editButton = localizer.getButtonVB(EDIT_HTML_ID, "edit"); editButton.setOnclick("wurl='htmlarea/webface/htmledit.jsp?" + PREVIEW_ARTICLE_ITEM_ID + "='+this.tabindex;window.open(wurl,'Edit','height=450,width=600,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no');return false;"); p.getChildren().add(WFUtil.group(WFUtil.group(bodyArea, WFUtil.getBreak()), editButton));/* WFContainer imageContainer = new WFContainer(); imageContainer.add(WFUtil.getButtonVB(ADD_IMAGE_ID, bref + "add_image", this)); imageContainer.add(WFUtil.getBreak()); imageContainer.add(getImageList()); p.getChildren().add(imageContainer); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "source"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "main_category"), WFUtil.getText(":"))); HtmlInputTextarea sourceArea = WFUtil.getTextArea(SOURCE_ID, ref + "source", "440px", "30px"); p.getChildren().add(sourceArea); HtmlSelectOneMenu mainCategoryMenu = WFUtil.getSelectOneMenu(MAIN_CATEGORY_ID, ref + "categories", ref + "mainCategoryId"); p.getChildren().add(mainCategoryMenu); */ mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/ p.getChildren().add(WFUtil.getText(" ")); UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": ")); t.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(t); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(localizer.getHeaderTextVB("current_version"), WFUtil.getTextVB(ref + "versionId") )); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "400px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); mainContainer.add(p); mainContainer.add(WFUtil.getBreak()); p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); p.getChildren().add(WFUtil.group(localizer.getTextVB("category"), WFUtil.getText(":"))); HtmlInputText categoryInput = WFUtil.getInputText(MAIN_CATEGORY_ID, ref + "mainCategory"); if(null==categoryInput.getValue() || "".equals(categoryInput.getValue())) { categoryInput.setValue(ROOT_CATEGORY); } categoryInput.setSize(40); p.getChildren().add(categoryInput); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); WFComponentSelector editorSelector = new WFComponentSelector(); editorSelector.setId(EDITOR_SELECTOR_ID); editorSelector.add(mainContainer); editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); FileUploadForm f = new FileUploadForm(); f.setId(FILE_UPLOAD_FORM_ID); editorSelector.add(f); editorSelector.add(getRelatedContentItemsContainer()); editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); return editorSelector; } |
controllers = new Controllers(this); listener = new Listener(controllers); | Dispatcher dispatcher = new Dispatcher(this); listener = new Listener(dispatcher); | public DisplayedDocument(Shell shell) { // Shell this.shell = shell; shell.setText("Koala Notes"); shell.setLayout(new FillLayout(SWT.VERTICAL)); // Document Note root = new Note("root", null, ""); document = new Document(root); // Controllers controllers = new Controllers(this); // Listener listener = new Listener(controllers); // Menu mainMenu = new MainMenu(shell, listener); // SashForm SashForm sashForm = new SashForm(shell, SWT.HORIZONTAL); // Tree tree = new NoteTree(shell, sashForm, listener); tree.loadTree(root); tree.init(); // TabFolder tabFolder = new NoteTabFolder(sashForm, listener); sashForm.setWeights(new int[] {20, 80}); } |
tree = new NoteTree(shell, sashForm, listener); | tree = new NoteTree(sashForm, listener); | public DisplayedDocument(Shell shell) { // Shell this.shell = shell; shell.setText("Koala Notes"); shell.setLayout(new FillLayout(SWT.VERTICAL)); // Document Note root = new Note("root", null, ""); document = new Document(root); // Controllers controllers = new Controllers(this); // Listener listener = new Listener(controllers); // Menu mainMenu = new MainMenu(shell, listener); // SashForm SashForm sashForm = new SashForm(shell, SWT.HORIZONTAL); // Tree tree = new NoteTree(shell, sashForm, listener); tree.loadTree(root); tree.init(); // TabFolder tabFolder = new NoteTabFolder(sashForm, listener); sashForm.setWeights(new int[] {20, 80}); } |
assertTrue(new File(jsDir, "percentagesorttype.js").isFile()); | assertTrue(new File(jsDir, "customsorttypes.js").isFile()); | public static void testCopy() throws IOException { CopyFiles.copy(tmpDir); assertTrue(new File(tmpDir, "help.html").isFile()); assertTrue(new File(tmpDir, "index.html").isFile()); File cssDir = new File(tmpDir, "css"); assertTrue(cssDir.isDirectory()); assertTrue(new File(cssDir, "help.css").isFile()); assertTrue(new File(cssDir, "main.css").isFile()); assertTrue(new File(cssDir, "sortabletable.css").isFile()); assertTrue(new File(cssDir, "source-viewer.css").isFile()); assertTrue(new File(cssDir, "tooltip.css").isFile()); File imagesDir = new File(tmpDir, "images"); assertTrue(imagesDir.isDirectory()); assertTrue(new File(imagesDir, "blank.png").isFile()); assertTrue(new File(imagesDir, "downsimple.png").isFile()); assertTrue(new File(imagesDir, "upsimple.png").isFile()); File jsDir = new File(tmpDir, "js"); assertTrue(jsDir.isDirectory()); assertTrue(new File(jsDir, "percentagesorttype.js").isFile()); assertTrue(new File(jsDir, "popup.js").isFile()); assertTrue(new File(jsDir, "sortabletable.js").isFile()); assertTrue(new File(jsDir, "stringbuilder.js").isFile()); } |
private void addInstrumentation(File file) | private void addInstrumentation(FileInfo fileInfo) | private void addInstrumentation(File file) { if (isClass(file)) { addInstrumentationToSingleClass(file); } else if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); } } |
if (isClass(file)) | if (fileInfo.isClass() && shouldInstrument(fileInfo.pathname)) | private void addInstrumentation(File file) { if (isClass(file)) { addInstrumentationToSingleClass(file); } else if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); } } |
addInstrumentationToSingleClass(file); | addInstrumentationToSingleClass(fileInfo); | private void addInstrumentation(File file) { if (isClass(file)) { addInstrumentationToSingleClass(file); } else if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); } } |
else if (file.isDirectory()) | else if (fileInfo.isDirectory()) | private void addInstrumentation(File file) { if (isClass(file)) { addInstrumentationToSingleClass(file); } else if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); } } |
File[] contents = file.listFiles(); | String[] contents = fileInfo.list(); | private void addInstrumentation(File file) { if (isClass(file)) { addInstrumentationToSingleClass(file); } else if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); } } |
addInstrumentation(contents[i]); | { File relativeFile = new File(fileInfo.pathname, contents[i]); FileInfo relativeFileInfo = new FileInfo(fileInfo.baseDir, relativeFile.toString()); addInstrumentation(relativeFileInfo); } | private void addInstrumentation(File file) { if (isClass(file)) { addInstrumentationToSingleClass(file); } else if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); } } |
if (isClass(entry)) | if (isClass(entry) && shouldInstrument(entry.getName())) | private void addInstrumentationToArchive(ZipInputStream archive, ZipOutputStream output) throws Exception { ZipEntry entry; while ((entry = archive.getNextEntry()) != null) { try { ZipEntry outputEntry = new ZipEntry(entry.getName()); output.putNextEntry(outputEntry); // Read current entry byte[] entryBytes = IOUtil .createByteArrayFromInputStream(archive); // Check if we have class file if (isClass(entry)) { // Instrument class ClassReader cr = new ClassReader(entryBytes); ClassWriter cw = new ClassWriter(true); ClassInstrumenter cv = new ClassInstrumenter(projectData, cw, ignoreRegexes); cr.accept(cv, CustomAttribute.getExtraAttributes(), false); // If class was instrumented, get bytes that define the // class if (cv.isInstrumented()) { logger.debug("Putting instrumented entry: " + entry.getName()); entryBytes = cw.toByteArray(); } } // Add entry to the output output.write(entryBytes); output.closeEntry(); archive.closeEntry(); } catch (Exception e) { logger.warn("Problems with archive entry: " + entry); throw e; } output.flush(); } } |
private static boolean isClass(File file) | private static boolean isClass(ZipEntry entry) | private static boolean isClass(File file) { return file.getName().endsWith(".class"); } |
return file.getName().endsWith(".class"); | return entry.getName().endsWith(".class"); | private static boolean isClass(File file) { return file.getName().endsWith(".class"); } |
String regex = args[++i]; try { Perl5Compiler pc = new Perl5Compiler(); this.ignoreRegexes.add(pc.compile(regex)); } catch (MalformedPatternException e) { logger.warn("The regular expression " + regex + " is invalid: " + e.getLocalizedMessage()); } | addRegex(ignoreRegexes, args[++i]); | private void parseArguments(String[] args) { File dataFile = CoverageDataFileHandler.getDefaultDataFile(); // Parse our parameters List filePaths = new ArrayList(); String baseDir = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) baseDir = args[++i]; else if (args[i].equals("--datafile")) dataFile = new File(args[++i]); else if (args[i].equals("--destination")) destinationDirectory = new File(args[++i]); else if (args[i].equals("--ignore")) { String regex = args[++i]; try { Perl5Compiler pc = new Perl5Compiler(); this.ignoreRegexes.add(pc.compile(regex)); } catch (MalformedPatternException e) { logger.warn("The regular expression " + regex + " is invalid: " + e.getLocalizedMessage()); } } else { filePaths.add(new File(baseDir, args[i])); } } // Load coverage data if (dataFile.isFile()) projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) projectData = new ProjectData(); // Instrument classes System.out.println("Instrumenting " + filePaths.size() + " " + (filePaths.size() == 1 ? "class" : "classes") + (destinationDirectory != null ? " to " + destinationDirectory.getAbsoluteFile() : "")); Iterator iter = filePaths.iterator(); while (iter.hasNext()) { File file = (File)iter.next(); if (isArchive(file)) { addInstrumentationToArchive(file); } else { addInstrumentation(file); } } // Save coverage data CoverageDataFileHandler.saveCoverageData(projectData, dataFile); } |
else { filePaths.add(new File(baseDir, args[i])); | else if (args[i].equals("--includeClasses")) { addRegex(includeClassesRegexes, args[++i]); } else if (args[i].equals("--excludeClasses")) { addRegex(excludeClassesRegexes, args[++i]); } else { FileInfo fileInfo = new FileInfo(baseDir, args[i]); filePaths.add(fileInfo); | private void parseArguments(String[] args) { File dataFile = CoverageDataFileHandler.getDefaultDataFile(); // Parse our parameters List filePaths = new ArrayList(); String baseDir = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) baseDir = args[++i]; else if (args[i].equals("--datafile")) dataFile = new File(args[++i]); else if (args[i].equals("--destination")) destinationDirectory = new File(args[++i]); else if (args[i].equals("--ignore")) { String regex = args[++i]; try { Perl5Compiler pc = new Perl5Compiler(); this.ignoreRegexes.add(pc.compile(regex)); } catch (MalformedPatternException e) { logger.warn("The regular expression " + regex + " is invalid: " + e.getLocalizedMessage()); } } else { filePaths.add(new File(baseDir, args[i])); } } // Load coverage data if (dataFile.isFile()) projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) projectData = new ProjectData(); // Instrument classes System.out.println("Instrumenting " + filePaths.size() + " " + (filePaths.size() == 1 ? "class" : "classes") + (destinationDirectory != null ? " to " + destinationDirectory.getAbsoluteFile() : "")); Iterator iter = filePaths.iterator(); while (iter.hasNext()) { File file = (File)iter.next(); if (isArchive(file)) { addInstrumentationToArchive(file); } else { addInstrumentation(file); } } // Save coverage data CoverageDataFileHandler.saveCoverageData(projectData, dataFile); } |
+ (filePaths.size() == 1 ? "class" : "classes") | + (filePaths.size() == 1 ? "file" : "files") | private void parseArguments(String[] args) { File dataFile = CoverageDataFileHandler.getDefaultDataFile(); // Parse our parameters List filePaths = new ArrayList(); String baseDir = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) baseDir = args[++i]; else if (args[i].equals("--datafile")) dataFile = new File(args[++i]); else if (args[i].equals("--destination")) destinationDirectory = new File(args[++i]); else if (args[i].equals("--ignore")) { String regex = args[++i]; try { Perl5Compiler pc = new Perl5Compiler(); this.ignoreRegexes.add(pc.compile(regex)); } catch (MalformedPatternException e) { logger.warn("The regular expression " + regex + " is invalid: " + e.getLocalizedMessage()); } } else { filePaths.add(new File(baseDir, args[i])); } } // Load coverage data if (dataFile.isFile()) projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) projectData = new ProjectData(); // Instrument classes System.out.println("Instrumenting " + filePaths.size() + " " + (filePaths.size() == 1 ? "class" : "classes") + (destinationDirectory != null ? " to " + destinationDirectory.getAbsoluteFile() : "")); Iterator iter = filePaths.iterator(); while (iter.hasNext()) { File file = (File)iter.next(); if (isArchive(file)) { addInstrumentationToArchive(file); } else { addInstrumentation(file); } } // Save coverage data CoverageDataFileHandler.saveCoverageData(projectData, dataFile); } |
while (iter.hasNext()) { File file = (File)iter.next(); if (isArchive(file)) { addInstrumentationToArchive(file); } else { addInstrumentation(file); | while (iter.hasNext()) { FileInfo fileInfo = (FileInfo)iter.next(); if (fileInfo.isArchive()) { addInstrumentationToArchive(fileInfo); } else { addInstrumentation(fileInfo); | private void parseArguments(String[] args) { File dataFile = CoverageDataFileHandler.getDefaultDataFile(); // Parse our parameters List filePaths = new ArrayList(); String baseDir = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) baseDir = args[++i]; else if (args[i].equals("--datafile")) dataFile = new File(args[++i]); else if (args[i].equals("--destination")) destinationDirectory = new File(args[++i]); else if (args[i].equals("--ignore")) { String regex = args[++i]; try { Perl5Compiler pc = new Perl5Compiler(); this.ignoreRegexes.add(pc.compile(regex)); } catch (MalformedPatternException e) { logger.warn("The regular expression " + regex + " is invalid: " + e.getLocalizedMessage()); } } else { filePaths.add(new File(baseDir, args[i])); } } // Load coverage data if (dataFile.isFile()) projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) projectData = new ProjectData(); // Instrument classes System.out.println("Instrumenting " + filePaths.size() + " " + (filePaths.size() == 1 ? "class" : "classes") + (destinationDirectory != null ? " to " + destinationDirectory.getAbsoluteFile() : "")); Iterator iter = filePaths.iterator(); while (iter.hasNext()) { File file = (File)iter.next(); if (isArchive(file)) { addInstrumentationToArchive(file); } else { addInstrumentation(file); } } // Save coverage data CoverageDataFileHandler.saveCoverageData(projectData, dataFile); } |
public LogFile(String file, String format, Properties levels, boolean trace) | public LogFile(String file, String format, String defaultLevel, Properties levels, boolean trace) | public LogFile(String file, String format, Properties levels, boolean trace) throws IOException { this(((file != null) ? new PrintStream(new FileOutputStream(file,true)) : System.err), format, levels, trace); } |
this(((file != null) ? | this(file, ((file != null) ? | public LogFile(String file, String format, Properties levels, boolean trace) throws IOException { this(((file != null) ? new PrintStream(new FileOutputStream(file,true)) : System.err), format, levels, trace); } |
format, levels, trace); | format, defaultLevel, levels, trace); | public LogFile(String file, String format, Properties levels, boolean trace) throws IOException { this(((file != null) ? new PrintStream(new FileOutputStream(file,true)) : System.err), format, levels, trace); } |
level = (String) _levels.getProperty("*"); | level = _defaultLevel; | public void attach(LogSource l) { String name = l.getName(); String level = _levels.getProperty(name); if (level == null) { level = (String) _levels.getProperty("*"); } l.addTarget(this, level); } |
if (!name.startsWith("/")) name = "/" + name; | public URL getResource(String name) { try { URL u = _servletContext.getResource(name); if (u != null && u.getProtocol().equals("file")) { File f = new File(u.getFile()); if (!f.exists()) u = null; } if (u == null) u = _servletClassLoader.getResource(name); if (u == null) u = super.getResource(name); return u; } catch (MalformedURLException e) { _log.warning("MalformedURLException caught in " + "ServletBroker.getResource for " + name); return null; } } |
|
bookmarkButton.setToolTipText("View Bookmarks"); | bookmarkButton.setToolTipText(Res.getString("title.view.bookmarks")); | public void initialize() { final SwingWorker bookmarkThreadWorker = new SwingWorker() { public Object construct() { // Register own provider for simpler implementation. PrivateDataManager.addPrivateDataProvider("storage", "storage:bookmarks", new Bookmarks.Provider()); PrivateDataManager manager = new PrivateDataManager(SparkManager.getConnection()); Bookmarks bookmarks = null; try { bookmarks = (Bookmarks)manager.getPrivateData("storage", "storage:bookmarks"); } catch (XMPPException e) { Log.error(e); } return bookmarks; } public void finished() { final Bookmarks bookmarks = (Bookmarks)get(); final JPopupMenu popup = new JPopupMenu(); if (bookmarks != null) { // Add to status bar final JPanel commandPanel = SparkManager.getWorkspace().getStatusBar().getCommandPanel(); final RolloverButton bookmarkButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.BOOKMARK_ICON)); bookmarkButton.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent mouseEvent) { popup.show(bookmarkButton, mouseEvent.getX(), mouseEvent.getY()); } }); bookmarkButton.setToolTipText("View Bookmarks"); commandPanel.add(bookmarkButton); SparkManager.getWorkspace().getStatusBar().invalidate(); SparkManager.getWorkspace().getStatusBar().validate(); SparkManager.getWorkspace().getStatusBar().repaint(); Collection bookmarkedConferences = bookmarks.getBookmarkedConferences(); final Collection bookmarkedLinks = bookmarks.getBookmarkedURLS(); final Iterator bookmarkLinks = bookmarkedLinks.iterator(); while (bookmarkLinks.hasNext()) { final BookmarkedURL link = (BookmarkedURL)bookmarkLinks.next(); Action urlAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { try { BrowserLauncher.openURL(link.getURL()); } catch (IOException e) { Log.error(e); } } }; urlAction.putValue(Action.NAME, link.getName()); urlAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.LINK_16x16)); popup.add(urlAction); } final Iterator bookmarkConferences = bookmarkedConferences.iterator(); while (bookmarkConferences.hasNext()) { final BookmarkedConference conferences = (BookmarkedConference)bookmarkConferences.next(); Action conferenceAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { SwingWorker worker = new SwingWorker() { public Object construct() { try { Thread.sleep(10); } catch (InterruptedException e1) { Log.error(e1); } return "ok"; } public void finished() { ConferenceUtils.autoJoinConferenceRoom(conferences.getName(), conferences.getJid(), conferences.getPassword()); } }; worker.start(); } }; conferenceAction.putValue(Action.NAME, conferences.getName()); conferenceAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.CONFERENCE_IMAGE_16x16)); popup.add(conferenceAction); } } } }; bookmarkThreadWorker.start(); } |
bookmarkButton.setToolTipText("View Bookmarks"); | bookmarkButton.setToolTipText(Res.getString("title.view.bookmarks")); | public void finished() { final Bookmarks bookmarks = (Bookmarks)get(); final JPopupMenu popup = new JPopupMenu(); if (bookmarks != null) { // Add to status bar final JPanel commandPanel = SparkManager.getWorkspace().getStatusBar().getCommandPanel(); final RolloverButton bookmarkButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.BOOKMARK_ICON)); bookmarkButton.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent mouseEvent) { popup.show(bookmarkButton, mouseEvent.getX(), mouseEvent.getY()); } }); bookmarkButton.setToolTipText("View Bookmarks"); commandPanel.add(bookmarkButton); SparkManager.getWorkspace().getStatusBar().invalidate(); SparkManager.getWorkspace().getStatusBar().validate(); SparkManager.getWorkspace().getStatusBar().repaint(); Collection bookmarkedConferences = bookmarks.getBookmarkedConferences(); final Collection bookmarkedLinks = bookmarks.getBookmarkedURLS(); final Iterator bookmarkLinks = bookmarkedLinks.iterator(); while (bookmarkLinks.hasNext()) { final BookmarkedURL link = (BookmarkedURL)bookmarkLinks.next(); Action urlAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { try { BrowserLauncher.openURL(link.getURL()); } catch (IOException e) { Log.error(e); } } }; urlAction.putValue(Action.NAME, link.getName()); urlAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.LINK_16x16)); popup.add(urlAction); } final Iterator bookmarkConferences = bookmarkedConferences.iterator(); while (bookmarkConferences.hasNext()) { final BookmarkedConference conferences = (BookmarkedConference)bookmarkConferences.next(); Action conferenceAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { SwingWorker worker = new SwingWorker() { public Object construct() { try { Thread.sleep(10); } catch (InterruptedException e1) { Log.error(e1); } return "ok"; } public void finished() { ConferenceUtils.autoJoinConferenceRoom(conferences.getName(), conferences.getJid(), conferences.getPassword()); } }; worker.start(); } }; conferenceAction.putValue(Action.NAME, conferences.getName()); conferenceAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.CONFERENCE_IMAGE_16x16)); popup.add(conferenceAction); } } } |
throw new PropertyException("No method to set \"" + _vname + | throw new PropertyException("No method to set \"" + getVariableName() + | public final void setValue (Context context, Object newValue) throws PropertyException { if (!context.set(_names, newValue)) { throw new PropertyException("No method to set \"" + _vname + "\" to type " + ((newValue == null) ? "null" : newValue.getClass().toString()) + " in supplied context (" + context.getClass() + ")"); } } |
return "global:" + _vname; | return "global:" + getVariableName(); | public final String toString () { return "global:" + _vname; } |
TitlePanel titlePanel = new TitlePanel(Res.getString("title.add.contact.group"), Res.getString("message.add.contact.to.list"), SparkRes.getImageIcon(SparkRes.USER1_32x32), true); | TitlePanel titlePanel = new TitlePanel(Res.getString("title.add.contact"), Res.getString("message.add.contact.to.list"), SparkRes.getImageIcon(SparkRes.USER1_32x32), true); | public void showRosterDialog(JFrame parent) { TitlePanel titlePanel = new TitlePanel(Res.getString("title.add.contact.group"), Res.getString("message.add.contact.to.list"), SparkRes.getImageIcon(SparkRes.USER1_32x32), true); JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); mainPanel.add(titlePanel, BorderLayout.NORTH); Object[] options = { Res.getString("add"), Res.getString("cancel") }; pane = new JOptionPane(panel, -1, 2, null, options, options[0]); mainPanel.add(pane, BorderLayout.CENTER); dialog = new JDialog(parent, Res.getString("title.add.contact"), true); dialog.pack(); dialog.setContentPane(mainPanel); dialog.setSize(350, 250); dialog.setLocationRelativeTo(parent); pane.addPropertyChangeListener(this); dialog.setVisible(true); dialog.toFront(); dialog.requestFocus(); jidField.requestFocus(); } |
return pathname.endsWith(".jar") || pathname.endsWith(".zip") || pathname.endsWith(".war") || pathname.endsWith(".ear") || pathname.endsWith(".sar"); | return ArchiveUtil.isArchive(pathname); | boolean isArchive() { if (!isFile()) { return false; } return pathname.endsWith(".jar") || pathname.endsWith(".zip") || pathname.endsWith(".war") || pathname.endsWith(".ear") || pathname.endsWith(".sar"); } |
in.close(); | if (in != null) in.close(); | public void parse() throws IOException, TemplateException { if (!_parsed) { Block newContent = null; Map newParameters = null; Map newMacros = null; Reader in = null; try { Parser parser = getParser(); in = getReader(); BlockBuilder bb = parser.parseBlock(getName(), in); in.close(); BuildContext bc = new BuildContext(_broker); newParameters = bc.getMap(); newMacros = bc.getMacros(); newContent = (Block) bb.build(bc); } catch (BuildException be) { newContent = null; _log.error("Template contained invalid data", be); throw be; } catch (IOException e) { newContent = null; // don't let the old one survive _log.error("Template: Could not read template: " + this); throw e; } catch (Exception e) { _log.error("Error parsing template: " + this, e); throw new BuildException("Error parsing template: " + this, e); } finally { try { in.close(); } catch (Exception e) { } _parameters = newParameters; _content = newContent; _macros = newMacros; _parsed = true; } } else { _log.debug("Ignoring parse request on already parsed template " + this); } } |
return getTemplate(templateName); | Template t = getTemplate(templateName); return t; | public Template handle(WebContext context) throws HandlerException { Object output = new Object(); String templateName; // get the form variables output = (String) context.getForm("loadFile"); name = (String) context.getForm("name"); email = (String) context.getForm("email"); comment = (String) context.getForm("comment"); if (output == null) { output = "form.wm"; templateName = "form.wm"; } if (name == null) { name = "<!-- form variable 'name' not defined -->"; } if (email == null) { email = "<!-- form variable 'email' not defined -->"; } if (comment == null) { comment = "<!-- form variable 'comment' not defined -->"; } // verifying for submissions if (output.equals("verify")) { myGuestEntry = new GuestEntry(name, email, comment); book.addElement(myGuestEntry); context.put("registry", book); templateName = "verify.wm"; // for guest book view } else if (output.equals("allguest")) { context.put("registry",book); templateName = "allguest.wm"; // default } else { templateName = "form.wm"; } // return the appropriate template try { return getTemplate(templateName); } catch (Exception e) { throw new HandlerException("Could not locate template: " + templateName); } } |
return null; | return "RecentChanges"; | public String getWikiPageName(WikiSystem wiki, WebContext wc) { return null; } |
LocalPreferences localPref = SettingsManager.getLocalPreferences(); if (localPref.isIdleOn()) { int delay = localPref.getIdleTime() * 60000; if (Spark.isWindows()) { try { setIdleListener(delay); } catch (Exception e) { Log.error(e); } | if (Spark.isWindows()) { try { setIdleListener(); } catch (Exception e) { Log.error(e); | public void initializeSession(XMPPConnection connection, String username, String password) { this.connection = connection; this.username = username; this.password = password; this.userBareAddress = StringUtils.parseBareAddress(connection.getUser()); // create workgroup session personalDataManager = new PrivateDataManager(getConnection()); LocalPreferences localPref = SettingsManager.getLocalPreferences(); // Start Idle listener if (localPref.isIdleOn()) { int delay = localPref.getIdleTime() * 60000; if (Spark.isWindows()) { try { setIdleListener(delay); } catch (Exception e) { Log.error(e); } } } // Discover items discoverItems(); ProviderManager.addExtensionProvider("event", "http://jabber.org/protocol/disco#info", new Features.Provider()); } |
private void setIdleListener(final long mill) throws Exception { | private void setIdleListener() throws Exception { | private void setIdleListener(final long mill) throws Exception { final Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { long idleTime = SystemInfo.getSessionIdleTime(); boolean isLocked = SystemInfo.isSessionLocked(); if (idleTime > mill) { try { // Handle if spark is not connected to the server. if (SparkManager.getConnection() == null || !SparkManager.getConnection().isConnected()) { return; } // Change Status Workspace workspace = SparkManager.getWorkspace(); Presence presence = workspace.getStatusBar().getPresence(); if (workspace != null && presence.getMode() == Presence.Mode.available) { unavaliable = true; StatusItem away = workspace.getStatusBar().getStatusItem("Away"); Presence p = away.getPresence(); if (isLocked) { p.setStatus("User has locked their workstation."); } else { p.setStatus("Away due to idle."); } previousPriority = presence.getPriority(); p.setPriority(0); SparkManager.getSessionManager().changePresence(p); } } catch (Exception e) { Log.error("Error with IDLE status.", e); timer.cancel(); } } else { if (unavaliable) { setAvailableIfActive(); } } } }, 1000, 1000); } |
if (idleTime > mill) { | if (idleTime > delay) { | private void setIdleListener(final long mill) throws Exception { final Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { long idleTime = SystemInfo.getSessionIdleTime(); boolean isLocked = SystemInfo.isSessionLocked(); if (idleTime > mill) { try { // Handle if spark is not connected to the server. if (SparkManager.getConnection() == null || !SparkManager.getConnection().isConnected()) { return; } // Change Status Workspace workspace = SparkManager.getWorkspace(); Presence presence = workspace.getStatusBar().getPresence(); if (workspace != null && presence.getMode() == Presence.Mode.available) { unavaliable = true; StatusItem away = workspace.getStatusBar().getStatusItem("Away"); Presence p = away.getPresence(); if (isLocked) { p.setStatus("User has locked their workstation."); } else { p.setStatus("Away due to idle."); } previousPriority = presence.getPriority(); p.setPriority(0); SparkManager.getSessionManager().changePresence(p); } } catch (Exception e) { Log.error("Error with IDLE status.", e); timer.cancel(); } } else { if (unavaliable) { setAvailableIfActive(); } } } }, 1000, 1000); } |
if (idleTime > mill) { | if (idleTime > delay) { | public void run() { long idleTime = SystemInfo.getSessionIdleTime(); boolean isLocked = SystemInfo.isSessionLocked(); if (idleTime > mill) { try { // Handle if spark is not connected to the server. if (SparkManager.getConnection() == null || !SparkManager.getConnection().isConnected()) { return; } // Change Status Workspace workspace = SparkManager.getWorkspace(); Presence presence = workspace.getStatusBar().getPresence(); if (workspace != null && presence.getMode() == Presence.Mode.available) { unavaliable = true; StatusItem away = workspace.getStatusBar().getStatusItem("Away"); Presence p = away.getPresence(); if (isLocked) { p.setStatus("User has locked their workstation."); } else { p.setStatus("Away due to idle."); } previousPriority = presence.getPriority(); p.setPriority(0); SparkManager.getSessionManager().changePresence(p); } } catch (Exception e) { Log.error("Error with IDLE status.", e); timer.cancel(); } } else { if (unavaliable) { setAvailableIfActive(); } } } |
super(displayedDocument); | this.dd = displayedDocument; | public MainController(DisplayedDocument displayedDocument) { super(displayedDocument); } |
public FileSystemXmlApplicationContext(String[] configLocations, boolean refresh, List xmlPreprocessors) throws BeansException { this(configLocations, refresh, null, xmlPreprocessors); | public FileSystemXmlApplicationContext(String configLocation) throws BeansException { this(new String[] {configLocation}, true, null, Collections.EMPTY_LIST); | public FileSystemXmlApplicationContext(String[] configLocations, boolean refresh, List xmlPreprocessors) throws BeansException { this(configLocations, refresh, null, xmlPreprocessors); } |
try { Object ret = invoke(iteratorMethod, instance, null); if (ret instanceof Iterator) { return (Iterator) ret; } else if (ret instanceof Enumeration) { return new EnumIterator((Enumeration) ret); } else if (ret instanceof Object[]) { return new ArrayIterator((Object[]) ret); } | Object ret = invoke(iteratorMethod, instance, null); if (ret instanceof Iterator) { return (Iterator) ret; | public Iterator findIterator(Object instance) throws PropertyException { if (iteratorMethod != null) { try { Object ret = invoke(iteratorMethod, instance, null); if (ret instanceof Iterator) { return (Iterator) ret; } else if (ret instanceof Enumeration) { return new EnumIterator((Enumeration) ret); } else if (ret instanceof Object[]) { return new ArrayIterator((Object[]) ret); } } catch (NoSuchMethodException e) { throw new PropertyException("Error in PropertyOperator!", e); } } throw new PropertyException(instance + " is not a list", null); } |
catch (NoSuchMethodException e) { throw new PropertyException("Error in PropertyOperator!", e); | else if (ret instanceof Enumeration) { return new EnumIterator((Enumeration) ret); } else if (ret instanceof Object[]) { return new ArrayIterator((Object[]) ret); | public Iterator findIterator(Object instance) throws PropertyException { if (iteratorMethod != null) { try { Object ret = invoke(iteratorMethod, instance, null); if (ret instanceof Iterator) { return (Iterator) ret; } else if (ret instanceof Enumeration) { return new EnumIterator((Enumeration) ret); } else if (ret instanceof Object[]) { return new ArrayIterator((Object[]) ret); } } catch (NoSuchMethodException e) { throw new PropertyException("Error in PropertyOperator!", e); } } throw new PropertyException(instance + " is not a list", null); } |
throws PropertyException, NoSuchMethodException { | throws PropertyException { | static Object invoke(Method meth, Object instance, Object[] args) throws PropertyException, NoSuchMethodException { try { Object obj = meth.invoke(instance, args); // if the method's return type is void return the VoidMacro // instance, instead of the 'null' we used to return here // otherwise, just return whatever the method returned if (obj == null && meth.getReturnType() == java.lang.Void.TYPE) return org.webmacro.engine.VoidMacro.instance; else return obj; } catch (IllegalAccessException e) { throw new PropertyException( "You don't have permission to access the requested method (" + meth + " in class " + instance.getClass() + " on object " + instance + "). Private/protected/package access " + " values cannot be accessed via property introspection.", e); } catch (IllegalArgumentException e) { throw new PropertyException( "Some kind of error occurred processing your request: this " + "indicates a failure in PropertyOperator.java that should be " + "reported: attempt to access method " + meth + " on object " + instance + " with " + args.length + " parameters " + " threw an exception: " + e, e); } catch (InvocationTargetException e) { // if this is a wrapped UndefinedVariableException, unwrap and rethrow it if (e.getTargetException() instanceof PropertyException.UndefinedVariableException) throw (PropertyException) e.getTargetException(); throw new PropertyException( "Attempt to invoke method " + meth + " on object " + instance + " of " + instance.getClass() + " raised an exception: " + e.getTargetException(), e.getTargetException()); } catch (NullPointerException e) { throw new PropertyException( "NullPointerException thrown from method " + meth + " on object " + instance + " -- most likely you have attempted " + "to use an undefined value, or a failure in that method.", e); } } |
while (enum.hasMoreElements()) | if (enum.hasMoreElements()) | public boolean accept(WikiSystem wiki, WebContext wc, WikiUser user) { Enumeration enum = wc.getRequest().getParameterNames(); // don't accept if we have request parameters while (enum.hasMoreElements()) return false; // and then only accept if this is a get request return wc.getRequest().getMethod().equalsIgnoreCase("GET"); } |
String template = props.getProperty (page.getTitle()); return template == null ? props.getProperty ("ViewPageAction.Template") : template; | String template = props.getProperty ("ViewPageAction.Template"); if (page != null) { template = props.getProperty (page.getTitle()); } return template; | public String getTemplateName(WikiSystem wiki, WikiPage page) { Properties props = wiki.getProperties(); String template = props.getProperty (page.getTitle()); return template == null ? props.getProperty ("ViewPageAction.Template") : template; } |
return Servlet22Broker.getBroker(s); | b = Servlet22Broker.getBroker(s); | public static Broker getBroker(Servlet s) throws InitException { int minorVersion, majorVersion; ServletContext sc = s.getServletConfig().getServletContext(); try { majorVersion = sc.getMajorVersion(); minorVersion = sc.getMinorVersion(); } catch (NoSuchMethodError e) { majorVersion = 2; minorVersion = 0; } if (majorVersion > 2 || (majorVersion == 2 && minorVersion >= 2)) return Servlet22Broker.getBroker(s); else return Servlet20Broker.getBroker(s); } |
return Servlet20Broker.getBroker(s); | b = Servlet20Broker.getBroker(s); b.startClient(); return b; | public static Broker getBroker(Servlet s) throws InitException { int minorVersion, majorVersion; ServletContext sc = s.getServletConfig().getServletContext(); try { majorVersion = sc.getMajorVersion(); minorVersion = sc.getMinorVersion(); } catch (NoSuchMethodError e) { majorVersion = 2; minorVersion = 0; } if (majorVersion > 2 || (majorVersion == 2 && minorVersion >= 2)) return Servlet22Broker.getBroker(s); else return Servlet20Broker.getBroker(s); } |
if (ch == '=' || ch == '\'' || ch == '\"' | if (ch == '=' || ch == '\'' || ch == '\"' || ch == ':' | final public boolean directiveOk() { if (size() == 0 || size() == literalMark) return true; else { Object o = elementAt(size() - 1); if (!(o instanceof String)) return true; else { String s = (String) o; char ch = s.charAt(s.length()-1); if (ch == '=' || ch == '\'' || ch == '\"' || Character.isLetterOrDigit(ch)) return false; } } return true; } |
b.startClient(); | public static Broker getBroker() throws InitException { try { Broker b = findBroker(WEBMACRO_PROPERTIES); if (b == null) { b = new Broker(); register(WEBMACRO_PROPERTIES, b); } return b; } catch (InitException e) { Log log = LogSystem.getSystemLog("wm"); log.error("Failed to initialize WebMacro with default config"); throw e; } } |
|
_log.info("stopping clock"); Clock.stopClient(); | synchronized public void shutdown() { _log.notice("shutting down"); Enumeration e = _providers.elements(); while (e.hasMoreElements()) { Provider pr = (Provider) e.nextElement(); _log.info("stopping: " + pr); pr.destroy(); } _providers.clear(); _ls.flush(); } |
|
e1.printStackTrace(); | Log.error(e1); | public void actionPerformed(ActionEvent e) { try { File file = new File(transfer.getFilePath()); transfer = transferManager.createOutgoingFileTransfer(fullJID); transfer.sendFile(file, "Sending"); } catch (XMPPException e1) { e1.printStackTrace(); } sendFile(transfer, transferManager, fullJID, nickname); } |
return null; | return Collections.EMPTY_LIST; | private List fireServiceNotificationError(ServiceMonitor serviceMonitor, ServiceEvent serviceEvent, Throwable throwable) { try { kernelMonitor.serviceNotificationError(serviceMonitor, serviceEvent, throwable); } catch (RuntimeException ignored) { // ignore - we did our best to notify the world } catch (KernelErrorsError e) { return e.getErrors(); } catch (Error e) { return Collections.singletonList(e); } return null; } |
final JContactItemField contactField = new JContactItemField(new ArrayList(contacts)); | final JWindow frame = new JWindow(parent); final JContactItemField contactField = new JContactItemField(new ArrayList(contacts), frame); | public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (groups.hasNext()) { ContactGroup group = (ContactGroup)groups.next(); Iterator contactItems = group.getContactItems().iterator(); while (contactItems.hasNext()) { ContactItem item = (ContactItem)contactItems.next(); if (contactMap.get(item.getNickname()) == null) { contacts.add(item); contactMap.put(item.getNickname(), item); } } } final JContactItemField contactField = new JContactItemField(new ArrayList(contacts)); final JFrame frame = new JFrame(); frame.setUndecorated(true); JPanel layoutPanel = new JPanel(); layoutPanel.setLayout(new GridBagLayout()); frame.getContentPane().setLayout(new BorderLayout()); JLabel enterLabel = new JLabel(Res.getString("label.contact.to.find")); enterLabel.setFont(new Font("dialog", Font.BOLD, 10)); layoutPanel.add(enterLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 5), 0, 0)); layoutPanel.add(contactField, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 200, 0)); layoutPanel.setBorder(BorderFactory.createBevelBorder(0)); frame.getContentPane().add(layoutPanel); frame.pack(); frame.setLocationRelativeTo(parent); frame.setVisible(true); frame.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent keyEvent) { if (keyEvent.getKeyChar() == KeyEvent.VK_ESCAPE) { frame.dispose(); } } }); contactField.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent keyEvent) { if (keyEvent.getKeyChar() == KeyEvent.VK_ENTER) { if (ModelUtil.hasLength(contactField.getText())) { ContactItem item = (ContactItem)contactMap.get(contactField.getText()); if (item != null) { SparkManager.getChatManager().activateChat(item.getFullJID(), item.getNickname()); frame.dispose(); } } } else if (keyEvent.getKeyChar() == KeyEvent.VK_ESCAPE) { frame.dispose(); } } }); contactField.setText(contact); } |
final JFrame frame = new JFrame(); frame.setUndecorated(true); | public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (groups.hasNext()) { ContactGroup group = (ContactGroup)groups.next(); Iterator contactItems = group.getContactItems().iterator(); while (contactItems.hasNext()) { ContactItem item = (ContactItem)contactItems.next(); if (contactMap.get(item.getNickname()) == null) { contacts.add(item); contactMap.put(item.getNickname(), item); } } } final JContactItemField contactField = new JContactItemField(new ArrayList(contacts)); final JFrame frame = new JFrame(); frame.setUndecorated(true); JPanel layoutPanel = new JPanel(); layoutPanel.setLayout(new GridBagLayout()); frame.getContentPane().setLayout(new BorderLayout()); JLabel enterLabel = new JLabel(Res.getString("label.contact.to.find")); enterLabel.setFont(new Font("dialog", Font.BOLD, 10)); layoutPanel.add(enterLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 5), 0, 0)); layoutPanel.add(contactField, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 200, 0)); layoutPanel.setBorder(BorderFactory.createBevelBorder(0)); frame.getContentPane().add(layoutPanel); frame.pack(); frame.setLocationRelativeTo(parent); frame.setVisible(true); frame.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent keyEvent) { if (keyEvent.getKeyChar() == KeyEvent.VK_ESCAPE) { frame.dispose(); } } }); contactField.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent keyEvent) { if (keyEvent.getKeyChar() == KeyEvent.VK_ENTER) { if (ModelUtil.hasLength(contactField.getText())) { ContactItem item = (ContactItem)contactMap.get(contactField.getText()); if (item != null) { SparkManager.getChatManager().activateChat(item.getFullJID(), item.getNickname()); frame.dispose(); } } } else if (keyEvent.getKeyChar() == KeyEvent.VK_ESCAPE) { frame.dispose(); } } }); contactField.setText(contact); } |
|
if (jj_2_12(2)) { | if (jj_2_11(2)) { | final public Object AExpression() throws ParseException { Object e, e2; Token op; e = Factor(); label_8: while (true) { if (jj_2_12(2)) { ; } else { break label_8; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[59] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OP_PLUS: op = jj_consume_token(OP_PLUS); break; case OP_MINUS: op = jj_consume_token(OP_MINUS); break; default: jj_la1[60] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[61] = jj_gen; ; } e2 = Factor(); if (op.kind == OP_PLUS) e = new Expression.AddBuilder(e, e2); else if (op.kind == OP_MINUS) e = new Expression.SubtractBuilder(e, e2); else {if (true) throw new ParseException("internal parser error in AExpression()");} } {if (true) return e;} throw new Error("Missing return statement in function"); } |
jj_la1[59] = jj_gen; | jj_la1[58] = jj_gen; | final public Object AExpression() throws ParseException { Object e, e2; Token op; e = Factor(); label_8: while (true) { if (jj_2_12(2)) { ; } else { break label_8; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[59] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OP_PLUS: op = jj_consume_token(OP_PLUS); break; case OP_MINUS: op = jj_consume_token(OP_MINUS); break; default: jj_la1[60] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[61] = jj_gen; ; } e2 = Factor(); if (op.kind == OP_PLUS) e = new Expression.AddBuilder(e, e2); else if (op.kind == OP_MINUS) e = new Expression.SubtractBuilder(e, e2); else {if (true) throw new ParseException("internal parser error in AExpression()");} } {if (true) return e;} throw new Error("Missing return statement in function"); } |
jj_la1[60] = jj_gen; | jj_la1[59] = jj_gen; | final public Object AExpression() throws ParseException { Object e, e2; Token op; e = Factor(); label_8: while (true) { if (jj_2_12(2)) { ; } else { break label_8; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[59] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OP_PLUS: op = jj_consume_token(OP_PLUS); break; case OP_MINUS: op = jj_consume_token(OP_MINUS); break; default: jj_la1[60] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[61] = jj_gen; ; } e2 = Factor(); if (op.kind == OP_PLUS) e = new Expression.AddBuilder(e, e2); else if (op.kind == OP_MINUS) e = new Expression.SubtractBuilder(e, e2); else {if (true) throw new ParseException("internal parser error in AExpression()");} } {if (true) return e;} throw new Error("Missing return statement in function"); } |
jj_la1[61] = jj_gen; | jj_la1[60] = jj_gen; | final public Object AExpression() throws ParseException { Object e, e2; Token op; e = Factor(); label_8: while (true) { if (jj_2_12(2)) { ; } else { break label_8; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[59] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OP_PLUS: op = jj_consume_token(OP_PLUS); break; case OP_MINUS: op = jj_consume_token(OP_MINUS); break; default: jj_la1[60] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[61] = jj_gen; ; } e2 = Factor(); if (op.kind == OP_PLUS) e = new Expression.AddBuilder(e, e2); else if (op.kind == OP_MINUS) e = new Expression.SubtractBuilder(e, e2); else {if (true) throw new ParseException("internal parser error in AExpression()");} } {if (true) return e;} throw new Error("Missing return statement in function"); } |
if (jj_2_14(2)) { | if (jj_2_13(2)) { | final public Object AndExpression() throws ParseException { Object e, e2; e = CExpression(); label_9: while (true) { if (jj_2_14(2)) { ; } else { break label_9; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[65] = jj_gen; ; } jj_consume_token(OP_AND); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[66] = jj_gen; ; } e2 = CExpression(); e = new Expression.AndBuilder(e, e2); } {if (true) return e;} throw new Error("Missing return statement in function"); } |
jj_la1[65] = jj_gen; | jj_la1[64] = jj_gen; | final public Object AndExpression() throws ParseException { Object e, e2; e = CExpression(); label_9: while (true) { if (jj_2_14(2)) { ; } else { break label_9; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[65] = jj_gen; ; } jj_consume_token(OP_AND); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[66] = jj_gen; ; } e2 = CExpression(); e = new Expression.AndBuilder(e, e2); } {if (true) return e;} throw new Error("Missing return statement in function"); } |
jj_la1[66] = jj_gen; | jj_la1[65] = jj_gen; | final public Object AndExpression() throws ParseException { Object e, e2; e = CExpression(); label_9: while (true) { if (jj_2_14(2)) { ; } else { break label_9; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[65] = jj_gen; ; } jj_consume_token(OP_AND); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[66] = jj_gen; ; } e2 = CExpression(); e = new Expression.AndBuilder(e, e2); } {if (true) return e;} throw new Error("Missing return statement in function"); } |
jj_la1[38] = jj_gen; | jj_la1[37] = jj_gen; | final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[38] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[39] = jj_gen; ; } list.addElement(e); label_5: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[40] = jj_gen; break label_5; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[41] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[42] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[43] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); } |
jj_la1[39] = jj_gen; | jj_la1[38] = jj_gen; | final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[38] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[39] = jj_gen; ; } list.addElement(e); label_5: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[40] = jj_gen; break label_5; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[41] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[42] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[43] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); } |
jj_la1[40] = jj_gen; | jj_la1[39] = jj_gen; | final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[38] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[39] = jj_gen; ; } list.addElement(e); label_5: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[40] = jj_gen; break label_5; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[41] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[42] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[43] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); } |
jj_la1[41] = jj_gen; | jj_la1[40] = jj_gen; | final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[38] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[39] = jj_gen; ; } list.addElement(e); label_5: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[40] = jj_gen; break label_5; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[41] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[42] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[43] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); } |
jj_la1[42] = jj_gen; | jj_la1[41] = jj_gen; | final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[38] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[39] = jj_gen; ; } list.addElement(e); label_5: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[40] = jj_gen; break label_5; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[41] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[42] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[43] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); } |
jj_la1[43] = jj_gen; | jj_la1[42] = jj_gen; | final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case SQUOTE: case NULL: case TRUE: case FALSE: case UNDEFINED: case WS: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[38] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[39] = jj_gen; ; } list.addElement(e); label_5: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[40] = jj_gen; break label_5; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[41] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[42] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[43] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); } |
if (jj_2_23(2147483647)) { | if (jj_2_22(2147483647)) { | final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(templateName); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case END: case BEGIN: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[84] = jj_gen; break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case END: case BEGIN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[85] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[86] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[87] = jj_gen; ; } label_14: while (true) { if (jj_2_21(1)) { ; } else { break label_14; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case RBRACE: case LBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[88] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[89] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case END: jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[90] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); } |
jj_la1[84] = jj_gen; | jj_la1[83] = jj_gen; | final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(templateName); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case END: case BEGIN: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[84] = jj_gen; break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case END: case BEGIN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[85] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[86] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[87] = jj_gen; ; } label_14: while (true) { if (jj_2_21(1)) { ; } else { break label_14; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case RBRACE: case LBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[88] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[89] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case END: jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[90] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); } |
jj_la1[85] = jj_gen; | jj_la1[84] = jj_gen; | final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(templateName); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case END: case BEGIN: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[84] = jj_gen; break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case END: case BEGIN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[85] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[86] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[87] = jj_gen; ; } label_14: while (true) { if (jj_2_21(1)) { ; } else { break label_14; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case RBRACE: case LBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[88] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[89] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case END: jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[90] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); } |
jj_la1[86] = jj_gen; | jj_la1[85] = jj_gen; | final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(templateName); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case END: case BEGIN: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[84] = jj_gen; break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case END: case BEGIN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[85] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[86] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[87] = jj_gen; ; } label_14: while (true) { if (jj_2_21(1)) { ; } else { break label_14; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case RBRACE: case LBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[88] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[89] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case END: jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[90] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); } |
jj_la1[87] = jj_gen; | jj_la1[86] = jj_gen; | final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(templateName); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case END: case BEGIN: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[84] = jj_gen; break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case END: case BEGIN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[85] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[86] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[87] = jj_gen; ; } label_14: while (true) { if (jj_2_21(1)) { ; } else { break label_14; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case RBRACE: case LBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[88] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[89] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case END: jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[90] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); } |
if (jj_2_21(1)) { | if (jj_2_20(1)) { | final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(templateName); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case END: case BEGIN: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[84] = jj_gen; break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case END: case BEGIN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[85] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[86] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[87] = jj_gen; ; } label_14: while (true) { if (jj_2_21(1)) { ; } else { break label_14; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case RBRACE: case LBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[88] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[89] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case END: jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[90] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); } |
jj_la1[88] = jj_gen; | jj_la1[87] = jj_gen; | final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(templateName); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case END: case BEGIN: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[84] = jj_gen; break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case END: case BEGIN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[85] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[86] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[87] = jj_gen; ; } label_14: while (true) { if (jj_2_21(1)) { ; } else { break label_14; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case RBRACE: case LBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[88] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[89] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case END: jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[90] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); } |
jj_la1[89] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { | jj_la1[88] = jj_gen; if (jj_2_21(2147483647) && (lookahead_not_breaking_subd())) { | final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(templateName); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case END: case BEGIN: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[84] = jj_gen; break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case END: case BEGIN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[85] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[86] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[87] = jj_gen; ; } label_14: while (true) { if (jj_2_21(1)) { ; } else { break label_14; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case RBRACE: case LBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[88] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[89] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case END: jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[90] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); } |
jj_la1[90] = jj_gen; | jj_la1[89] = jj_gen; | final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(templateName); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case END: case BEGIN: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[84] = jj_gen; break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case END: case BEGIN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[85] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[86] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[87] = jj_gen; ; } label_14: while (true) { if (jj_2_21(1)) { ; } else { break label_14; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case RBRACE: case LBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[88] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[89] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case END: jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[90] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); } |
if (jj_2_13(2)) { | if (jj_2_12(2)) { | final public Object CExpression() throws ParseException { // Note that CExpression is a little different from other binary // expression rules, as we don't want to accept a == b == c // Thanks to Aldona Majorek for pointing this out Object e1, e2=null; Token op=null; e1 = AExpression(); if (jj_2_13(2)) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[63] = jj_gen; ; } op = RelOp(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[64] = jj_gen; ; } e2 = AExpression(); } else { ; } if (op == null) {if (true) return e1;} else switch (op.kind) { case OP_EQ: {if (true) return new Expression.CompareEqBuilder(e1, e2);} case OP_SET: {if (true) return new Expression.CompareEqBuilder(e1, e2);} case OP_NE: {if (true) return new Expression.CompareNeBuilder(e1, e2);} case OP_GT: {if (true) return new Expression.CompareGtBuilder(e1, e2);} case OP_GE: {if (true) return new Expression.CompareGeBuilder(e1, e2);} case OP_LE: {if (true) return new Expression.CompareLeBuilder(e1, e2);} case OP_LT: {if (true) return new Expression.CompareLtBuilder(e1, e2);} default: {if (true) throw new ParseException("internal parser error in CExpression()");} } throw new Error("Missing return statement in function"); } |
jj_la1[63] = jj_gen; | jj_la1[62] = jj_gen; | final public Object CExpression() throws ParseException { // Note that CExpression is a little different from other binary // expression rules, as we don't want to accept a == b == c // Thanks to Aldona Majorek for pointing this out Object e1, e2=null; Token op=null; e1 = AExpression(); if (jj_2_13(2)) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[63] = jj_gen; ; } op = RelOp(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[64] = jj_gen; ; } e2 = AExpression(); } else { ; } if (op == null) {if (true) return e1;} else switch (op.kind) { case OP_EQ: {if (true) return new Expression.CompareEqBuilder(e1, e2);} case OP_SET: {if (true) return new Expression.CompareEqBuilder(e1, e2);} case OP_NE: {if (true) return new Expression.CompareNeBuilder(e1, e2);} case OP_GT: {if (true) return new Expression.CompareGtBuilder(e1, e2);} case OP_GE: {if (true) return new Expression.CompareGeBuilder(e1, e2);} case OP_LE: {if (true) return new Expression.CompareLeBuilder(e1, e2);} case OP_LT: {if (true) return new Expression.CompareLtBuilder(e1, e2);} default: {if (true) throw new ParseException("internal parser error in CExpression()");} } throw new Error("Missing return statement in function"); } |
jj_la1[64] = jj_gen; | jj_la1[63] = jj_gen; | final public Object CExpression() throws ParseException { // Note that CExpression is a little different from other binary // expression rules, as we don't want to accept a == b == c // Thanks to Aldona Majorek for pointing this out Object e1, e2=null; Token op=null; e1 = AExpression(); if (jj_2_13(2)) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[63] = jj_gen; ; } op = RelOp(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[64] = jj_gen; ; } e2 = AExpression(); } else { ; } if (op == null) {if (true) return e1;} else switch (op.kind) { case OP_EQ: {if (true) return new Expression.CompareEqBuilder(e1, e2);} case OP_SET: {if (true) return new Expression.CompareEqBuilder(e1, e2);} case OP_NE: {if (true) return new Expression.CompareNeBuilder(e1, e2);} case OP_GT: {if (true) return new Expression.CompareGtBuilder(e1, e2);} case OP_GE: {if (true) return new Expression.CompareGeBuilder(e1, e2);} case OP_LE: {if (true) return new Expression.CompareLeBuilder(e1, e2);} case OP_LT: {if (true) return new Expression.CompareLtBuilder(e1, e2);} default: {if (true) throw new ParseException("internal parser error in CExpression()");} } throw new Error("Missing return statement in function"); } |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.