rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
panel.add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); panel.add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
panel.add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0)); panel.add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
public TitlePanel(String title, String description, Icon icon, boolean showDescription) { // Set the icon iconLabel.setIcon(icon); // Set the title setTitle(title); // Set the description setDescription(description); setLayout(gridBagLayout); if (showDescripti...
panel.setBackground(new Color(49, 106, 197)); titleLabel.setFont(new Font("Verdana", Font.BOLD, 13)); titleLabel.setForeground(Color.white); descriptionLabel.setFont(new Font("Verdana", 0, 10)); add(panel, new GridBagConstraints(0, 0, 1, 0, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0,...
titleLabel.setVerticalTextPosition(JLabel.CENTER); titleLabel.setFont(new Font("dialog", Font.BOLD, 14)); titleLabel.setForeground(Color.black); descriptionLabel.setFont(new Font("dialog", 0, 10)); add(panel, new GridBagConstraints(0, 0, 1, 0, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets...
public TitlePanel(String title, String description, Icon icon, boolean showDescription) { // Set the icon iconLabel.setIcon(icon); // Set the title setTitle(title); // Set the description setDescription(description); setLayout(gridBagLayout); if (showDescripti...
WebdavResource resource = slideService.getWebdavResourceAuthenticatedAsRoot(contentFolderPath);
private void makesureStandardFolderisCreated() { IWUserContext iwuc = getIWUserContext(); IWSlideService slideService = getIWSlideService(iwuc); String contentFolderPath = ArticleUtil.getContentRootPath(); String articlePath = ArticleUtil.getArticleRootPath(); try { //first make the folder: slideService.c...
body = baos.toString();
body = baos.toString("UTF-8");
protected void prettifyBody() { String body = getBody(); if(body!=null){// System.out.println("ArticleIn = "+articleIn); //Use JTidy to clean up the html Tidy tidy = new Tidy(); tidy.setXHTML(true); tidy.setXmlOut(true); tidy.setCharEncoding(Configuration.UTF8); ByteArrayInputStream bais; try { bai...
return ContentUtil.getContentRootPath();
return ContentUtil.getContentBaseFolderPath();
public static String getContentRootPath(){ return ContentUtil.getContentRootPath(); }
chatPref = (ChatPreferences)preferenceManager.getPreferenceData(ChatPreference.NAMESPACE);
public TranscriptWindow() { setEditable(false); /* Load Preferences for this instance */ PreferenceManager preferenceManager = SparkManager.getPreferenceManager(); chatPref = (ChatPreferences)preferenceManager.getPreferenceData(ChatPreference.NAMESPACE); addMouseListener(this); ...
chatPref = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE);
final LocalPreferences pref = SettingsManager.getLocalPreferences();
private String getDate(Date insertDate) { chatPref = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE); if (insertDate == null) { insertDate = new Date(); } StyleConstants.setFontFamily(styles, font.getFontName()); StyleCon...
if (chatPref.showDatesInChat()) {
if (pref.isTimeDisplayedInChat()) {
private String getDate(Date insertDate) { chatPref = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE); if (insertDate == null) { insertDate = new Date(); } StyleConstants.setFontFamily(styles, font.getFontName()); StyleCon...
from = chatPref.getNickname();
from = pref.getNickname();
public void saveTranscript(String fileName, List transcript, String headerData) { try { SimpleDateFormat formatter; File defaultSaveFile = new File(new File(Spark.getUserHome()), fileName); final JFileChooser fileChooser = new JFileChooser(defaultSaveFile); fileCho...
boolean timing = context.isTiming();
timing = Flags.PROFILE && context.isTiming();
final private void doRequest( HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { WebContext context = null; if (_problem != null) { init(); if (_problem != null) { try { resp.setContentType("text/html"); ...
context.stopTiming();
if (timing) context.stopTiming();
final private void doRequest( HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { WebContext context = null; if (_problem != null) { init(); if (_problem != null) { try { resp.setContentType("text/html"); ...
context.startTiming("WMServlet.destroyContext()");
if (timing) context.startTiming("WMServlet.destroyContext()");
final private void doRequest( HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { WebContext context = null; if (_problem != null) { init(); if (_problem != null) { try { resp.setContentType("text/html"); ...
c.startTiming("Template.write", tmpl);
if (timing) c.startTiming("Template.write", tmpl);
final protected void execute(Template tmpl, WebContext c) { Writer out = null; try { c.startTiming("Template.write", tmpl); FastWriter fw; try { HttpServletResponse resp= c.getResponse(); fw = FastWriter.getInstance( resp.getOutputStream(), r...
c.stopTiming();
if (timing) c.stopTiming();
final protected void execute(Template tmpl, WebContext c) { Writer out = null; try { c.startTiming("Template.write", tmpl); FastWriter fw; try { HttpServletResponse resp= c.getResponse(); fw = FastWriter.getInstance( resp.getOutputStream(), r...
c.startTiming("FastWriter.close()");
if (timing) c.startTiming("FastWriter.close()");
final protected void execute(Template tmpl, WebContext c) { Writer out = null; try { c.startTiming("Template.write", tmpl); FastWriter fw; try { HttpServletResponse resp= c.getResponse(); fw = FastWriter.getInstance( resp.getOutputStream(), r...
finally { c.stopTiming(); }
finally { if (timing) c.stopTiming(); }
final protected void execute(Template tmpl, WebContext c) { Writer out = null; try { c.startTiming("Template.write", tmpl); FastWriter fw; try { HttpServletResponse resp= c.getResponse(); fw = FastWriter.getInstance( resp.getOutputStream(), r...
outputFile.getParentFile().mkdirs();
File parentFile = outputFile.getParentFile(); if (parentFile != null) { parentFile.mkdirs(); }
private void addInstrumentation(File file) { if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); return; } if (!isClass(file)) { return; } if (logger.isDebugEnabled()) { logger.debug("instrumenting " + file.getAbs...
condition.signalAll();
if (!satisfied) { satisfied = true; condition.signalAll(); }
public void setSatisfied() { lock.lock(); try { condition.signalAll(); } finally { lock.unlock(); } }
return Integer.parseInt(key);
return Integer.parseInt(snum);
public int getIntegerSetting(String key) { String snum = getSetting(key); try { return Integer.parseInt(key); } catch (Exception e) { return 0; } }
if (!cMacro && Expression.isTrue(c)) { return (Block) builder.getArg(IF_BLOCK, bc); }
if (!cMacro && Expression.isTrue(c)) return builder.getArg(IF_BLOCK);
public Object build(DirectiveBuilder builder, BuildContext bc) throws BuildException { Object c = builder.getArg(IF_COND, bc); boolean cMacro = (c instanceof Macro); int elseifCount; DirectiveArgs elseArgs; DirectiveArgs[] elseifArgs = null; // If condition is static and true...
? elseArgs.getArg(ELSE_BLOCK, bc) : "";
? elseArgs.getArg(ELSE_BLOCK) : "";
public Object build(DirectiveBuilder builder, BuildContext bc) throws BuildException { Object c = builder.getArg(IF_COND, bc); boolean cMacro = (c instanceof Macro); int elseifCount; DirectiveArgs elseArgs; DirectiveArgs[] elseifArgs = null; // If condition is static and true...
elseBlock = (Block) elseifArgs[j].getArg(ELSEIF_BLOCK, bc);
public Object build(DirectiveBuilder builder, BuildContext bc) throws BuildException { Object c = builder.getArg(IF_COND, bc); boolean cMacro = (c instanceof Macro); int elseifCount; DirectiveArgs elseArgs; DirectiveArgs[] elseifArgs = null; // If condition is static and true...
if (i == 0) return elseBlock; else
if (i == 0) return elseifArgs[j].getArg(ELSEIF_BLOCK); else { elseBlock = (Block) elseifArgs[j].getArg(ELSEIF_BLOCK, bc);
public Object build(DirectiveBuilder builder, BuildContext bc) throws BuildException { Object c = builder.getArg(IF_COND, bc); boolean cMacro = (c instanceof Macro); int elseifCount; DirectiveArgs elseArgs; DirectiveArgs[] elseifArgs = null; // If condition is static and true...
elseBlock = (Block) elseArgs.getArg(ELSE_BLOCK, bc);
public Object build(DirectiveBuilder builder, BuildContext bc) throws BuildException { Object c = builder.getArg(IF_COND, bc); boolean cMacro = (c instanceof Macro); int elseifCount; DirectiveArgs elseArgs; DirectiveArgs[] elseifArgs = null; // If condition is static and true...
return elseBlock;
return elseArgs.getArg(ELSE_BLOCK); else elseBlock = (Block) elseArgs.getArg(ELSE_BLOCK, bc);
public Object build(DirectiveBuilder builder, BuildContext bc) throws BuildException { Object c = builder.getArg(IF_COND, bc); boolean cMacro = (c instanceof Macro); int elseifCount; DirectiveArgs elseArgs; DirectiveArgs[] elseifArgs = null; // If condition is static and true...
public Clazz(String longName)
private Clazz(String longName)
public Clazz(String longName) { if (longName == null) { throw new IllegalArgumentException("Class name can not be null."); } lines = new TreeMap(); packageName = ClassHelper.getPackageName(longName); name = ClassHelper.getBaseName(longName); numberOfBranches = 0; numberOfCoveredBranches = 0; numberOfCovered...
numberOfBranches = 0; numberOfCoveredBranches = 0; numberOfCoveredLines = 0; numberOfLines = 0;
public Clazz(String longName) { if (longName == null) { throw new IllegalArgumentException("Class name can not be null."); } lines = new TreeMap(); packageName = ClassHelper.getPackageName(longName); name = ClassHelper.getBaseName(longName); numberOfBranches = 0; numberOfCoveredBranches = 0; numberOfCovered...
return numberOfBranches;
return getRawCoverageData().getNumberOfValidBranches();
public int getNumberOfBranches() { return numberOfBranches; }
return numberOfCoveredBranches;
return getRawCoverageData().getNumberOfCoveredBranches();
public int getNumberOfCoveredBranches() { return numberOfCoveredBranches; }
return numberOfCoveredLines;
return getRawCoverageData().getNumberOfCoveredLines();
public int getNumberOfCoveredLines() { return numberOfCoveredLines; }
return numberOfLines;
return getRawCoverageData().getNumberOfValidLines();
public int getNumberOfLines() { return numberOfLines; }
public final void setRawCoverageData(CoverageData rawCoverageData)
private final void setRawCoverageData(CoverageData rawCoverageData)
public final void setRawCoverageData(CoverageData rawCoverageData) { this.rawCoverageData = rawCoverageData; }
Header.print(System.out);
private void addFilenames(String[] filenames) { if (filenames.length == 0) { return; } for (int i = 0; i < filenames.length; i++) { getProject().log("Adding " + filenames[i] + " to list", Project.MSG_VERBOSE); addArg(filenames[i]); } Header.print(System.out);// System.out.println("instrumenting " + f...
addArg("--basedir");
public void execute() throws BuildException { initArgs(); if (dataFile != null) { addArg("--datafile"); addArg(dataFile); } addArg("--destination"); addArg(this.destDir.getAbsolutePath()); addArg("--format"); addArg(format); if (srcDir != null) { addArg("--basedir"); addArg(srcDir); } handleFi...
Set filenames = new HashSet();
int numberOfClasses = 0;
private void handleFilesets() { Set filenames = new HashSet(); Iterator iter = fileSets.iterator(); while (iter.hasNext()) { FileSet fileSet = (FileSet)iter.next(); addArg("--basedir"); addArg(baseDir(fileSet)); filenames.addAll(Arrays.asList(getFilenames(fileSet))); } addFilenames((String[])filenames.to...
filenames.addAll(Arrays.asList(getFilenames(fileSet)));
String[] fileNames = getFilenames(fileSet); numberOfClasses += fileNames.length; addFilenames(fileNames);
private void handleFilesets() { Set filenames = new HashSet(); Iterator iter = fileSets.iterator(); while (iter.hasNext()) { FileSet fileSet = (FileSet)iter.next(); addArg("--basedir"); addArg(baseDir(fileSet)); filenames.addAll(Arrays.asList(getFilenames(fileSet))); } addFilenames((String[])filenames.to...
addFilenames((String[])filenames.toArray(new String[filenames.size()]));
private void handleFilesets() { Set filenames = new HashSet(); Iterator iter = fileSets.iterator(); while (iter.hasNext()) { FileSet fileSet = (FileSet)iter.next(); addArg("--basedir"); addArg(baseDir(fileSet)); filenames.addAll(Arrays.asList(getFilenames(fileSet))); } addFilenames((String[])filenames.to...
MacroAdapter.createMacro(elseDir) : null;
MacroAdapter.createMacro(elseDir,rc.getEncoding()) : null;
public static final Object build(BuildContext rc, Condition cond, Macro body, Object elseDir) throws BuildException { if (cond instanceof Macro) { Macro elseMacro = (elseDir != null) ? MacroAdapter.createMacro(elseDir) : null; return new IfDirective(cond, body, elseMac...
FastWriter fw = new FastWriter(os, "UTF8");
FastWriter fw = new FastWriter(os, context.getEncoding());
public Object evaluate(Context context) throws ContextException { try { ByteArrayOutputStream os = new ByteArrayOutputStream(256); FastWriter fw = new FastWriter(os, "UTF8"); write(fw,context); fw.flush(); return os.toString("UTF8"); } catch (IOException e) { ...
return os.toString("UTF8");
return os.toString(context.getEncoding());
public Object evaluate(Context context) throws ContextException { try { ByteArrayOutputStream os = new ByteArrayOutputStream(256); FastWriter fw = new FastWriter(os, "UTF8"); write(fw,context); fw.flush(); return os.toString("UTF8"); } catch (IOException e) { ...
result = CommandLineBuilder.preprocessCommandLineArguments( args);
CommandLineBuilder.preprocessCommandLineArguments( args);
public void testCommandsFileOption() throws Exception { String[] args = { "Hello", "world" }; String[] result = CommandLineBuilder.preprocessCommandLineArguments( args); assertSame( args, result); try { args = new String[]{ "Hello", "--commandsfile" }; result = CommandLineBuilder.preprocessCommandLineArgumen...
jidField = new JTextField(); ResourceUtils.resLabel(jidLabel, jidField, "&JID:"); add(jidLabel, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(jidField, new GridBagConstraints(1, 6, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstr...
public PersonalPanel() { setLayout(new GridBagLayout()); // Handle First Name JLabel firstNameLabel = new JLabel(); firstNameField = new JTextField(); ResourceUtils.resLabel(firstNameLabel, firstNameField, "&First Name:"); add(firstNameLabel, new GridBagConstraints(0, 0, 1,...
assertEscape("\u00F7","&divide;");
public void testEscaping () throws Exception { assertEscape("<B>", "&lt;B&gt;"); assertEscape("\u00f6", "&ouml;"); assertEscape("\u00a9", "&copy;"); assertEscape("\u00a3", "&pound;"); assertEscape("\u0080", "&euro;"); assertEscape("This is a test: \u0080\u0080\u0080 is b...
return "constant-property:" + _vname;
return "constant-property:" + getVariableName();
public final String toString () { return "constant-property:" + _vname; }
_vname = makeName(names).intern();
Variable (Object names[]) { _vname = makeName(names).intern(); _names = names; }
public String getVariableName ()
public synchronized String getVariableName ()
public String getVariableName () { return _vname; }
return _vname;
if (_vname == null) { _vname = makeName(_names).intern(); } return _vname;
public String getVariableName () { return _vname; }
dd.getTree().disposeTreeEditor();
tree.disposeTreeEditor();
public void finishRenameNote(Event e) { if ((e.type == SWT.KeyDown && e.keyCode == SWT.CR) || e.type == SWT.FocusOut) { dd.getTree().disposeTreeEditor(); } }
String newName = dd.getTree().getTreeEditorText(); DisplayedNote dn = dd.getTree().getSelectedNote(); dn.getNote().setName(newName);
String newName = tree.getTreeEditorText(); DisplayedNote dn = tree.getSelectedNote();
public void renameNote(Event e) { String newName = dd.getTree().getTreeEditorText(); DisplayedNote dn = dd.getTree().getSelectedNote(); dn.getNote().setName(newName); dn.setName(newName); }
protected static String getMethodDescriptor(Class clazz, String methodName) { return clazz.getCanonicalName() + SEPARATOR + methodName;
protected static String getMethodDescriptor(Class controllerClass, String methodName) { return controllerClass.getCanonicalName() + SEPARATOR + methodName;
protected static String getMethodDescriptor(Class clazz, String methodName) { return clazz.getCanonicalName() + SEPARATOR + methodName; }
note.setName(name);
public void setName(String name) { treeNode.setName(name); if (tab != null) tab.setName(name); }
bean.load(itemResourcePath);
bean.setResourcePath(itemResourcePath); bean.load();
public ContentItem loadContentItem(String itemResourcePath) { try { ArticleItemBean bean = new ArticleItemBean(); bean.setAutoCreateResource(isAutoCreateResource()); bean.load(itemResourcePath); return bean; } catch (Exception e) { e.printStackTrace(); } return null; }
return new BufferedReader(new FileReader(myFile));
return new BufferedReader(new InputStreamReader( new FileInputStream(myFile), myEncoding));
protected Reader getReader() throws IOException { return new BufferedReader(new FileReader(myFile)); }
JScrollBar sb = textScroller.getVerticalScrollBar(); sb.setValue(sb.getMaximum());
try { JScrollBar sb = textScroller.getVerticalScrollBar(); sb.setValue(sb.getMaximum()); } catch (Exception e) { Log.error(e); }
public void scrollToBottom() { if (mousePressed) { return; } int chatLength = transcriptWindow.getDocument().getLength(); transcriptWindow.setCaretPosition(chatLength); JScrollBar sb = textScroller.getVerticalScrollBar(); sb.setValue(sb.getMaximum()); }
HtmlPanelGrid p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "headline"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":")));
HtmlPanelGrid p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "headline"), WFUtil.getText(":")));
private UIComponent getEditContainer() { 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(TE...
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(WFUtil.getTextVB(bref + "teaser"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.gr...
p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "teaser"), WFUtil.getText(":")));
private UIComponent getEditContainer() { 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(TE...
p.getChildren().add(teaserArea);
p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "author"), WFUtil.getText(":")));
private UIComponent getEditContainer() { 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(TE...
p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "images"), WFUtil.getText(":")));
private UIComponent getEditContainer() { 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(TE...
p.getChildren().add(bodyArea); 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...
private UIComponent getEditContainer() { 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(TE...
p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "comment"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":")));
p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "comment"), WFUtil.getText(":")));
private UIComponent getEditContainer() { 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(TE...
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);
private UIComponent getEditContainer() { 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(TE...
HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this); p.getChildren().add(editCategoriesButton);
p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "category"), WFUtil.getText(":"))); HtmlInputText categoryInput = WFUtil.getInputText(MAIN_CATEGORY_ID, ref + "mainCategory"); if(null==categoryInput.getValue() || "".equals(categoryInput.getValue())) { categoryInput.setValue(ROOT_CATEGORY); } categoryInput.setSi...
private UIComponent getEditContainer() { 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(TE...
context.put ("OWNM", new ObjectWithNullMethod());
public void stuffContext (Context context) throws Exception { context.setEvaluationExceptionHandler ( new CrankyEvaluationExceptionHandler(_wm.getBroker())); context.put ("TestObject", new TestObject()); context.put ("NullTestObject", new NullTestObject()); context.put("enum",new T...
Collection packages;
SortedSet packages;
private void generateOverview(PackageData packageData) throws IOException { Iterator iter; String filename; if (packageData == null) { filename = "frame-summary.html"; } else { filename = "frame-summary-" + packageData.getName() + ".html"; } File file = new File(destinationDir, filename); PrintStream out...
packages = projectData.getChildren();
packages = projectData.getPackages();
private void generateOverview(PackageData packageData) throws IOException { Iterator iter; String filename; if (packageData == null) { filename = "frame-summary.html"; } else { filename = "frame-summary-" + packageData.getName() + ".html"; } File file = new File(destinationDir, filename); PrintStream out...
sourceFiles = projectData.getSourceFiles();
PackageData defaultPackage = (PackageData)projectData .getChild(""); if (defaultPackage != null) { sourceFiles = defaultPackage.getSourceFiles(); } else { sourceFiles = new TreeSet(); }
private void generateOverview(PackageData packageData) throws IOException { Iterator iter; String filename; if (packageData == null) { filename = "frame-summary.html"; } else { filename = "frame-summary-" + packageData.getName() + ".html"; } File file = new File(destinationDir, filename); PrintStream out...
Iterator iter = projectData.getChildren().iterator();
Iterator iter = projectData.getPackages().iterator();
private void generateOverviews() throws IOException { generateOverview(null); Iterator iter = projectData.getChildren().iterator(); while (iter.hasNext()) { PackageData packageData = (PackageData)iter.next(); generateOverview(packageData); } }
SortedSet sortedPackages = new TreeSet(); sortedPackages.addAll(projectData.getChildren()); Iterator iter = sortedPackages.iterator();
Iterator iter = projectData.getPackages().iterator();
private void generatePackageList() throws IOException { File file = new File(destinationDir, "frame-packages.html"); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.println("<title>Coverage Report</title>"); out .print...
Collection sourceFiles;
SortedSet sourceFiles;
private void generateSourceFileList(PackageData packageData) throws IOException { String filename; Collection sourceFiles; if (packageData == null) { filename = "frame-sourcefiles.html"; sourceFiles = projectData.getSourceFiles(); } else { filename = "frame-sourcefiles-" + packageData.getName() + ".html...
Map sortedSourceFileList = new TreeMap();
private void generateSourceFileList(PackageData packageData) throws IOException { String filename; Collection sourceFiles; if (packageData == null) { filename = "frame-sourcefiles.html"; sourceFiles = projectData.getSourceFiles(); } else { filename = "frame-sourcefiles-" + packageData.getName() + ".html...
{ SourceFileData sourceFileData = (SourceFileData)iter.next(); sortedSourceFileList.put(sourceFileData.getBaseName(), sourceFileData); } for (Iterator iter = sortedSourceFileList.values().iterator(); iter .hasNext();)
private void generateSourceFileList(PackageData packageData) throws IOException { String filename; Collection sourceFiles; if (packageData == null) { filename = "frame-sourcefiles.html"; sourceFiles = projectData.getSourceFiles(); } else { filename = "frame-sourcefiles-" + packageData.getName() + ".html...
Iterator iter = projectData.getChildren().iterator();
Iterator iter = projectData.getPackages().iterator();
private void generateSourceFileLists() throws IOException { generateSourceFileList(null); Iterator iter = projectData.getChildren().iterator(); while (iter.hasNext()) { PackageData packageData = (PackageData)iter.next(); generateSourceFileList(packageData); } }
ret.append("<td class=\"value\">" + packageData.getChildren().size()
ret.append("<td class=\"value\">" + packageData.getNumberOfChildren()
private String generateTableRowForPackage(PackageData packageData) { StringBuffer ret = new StringBuffer(); String url1 = "frame-summary-" + packageData.getName() + ".html"; String url2 = "frame-sourcefiles-" + packageData.getName() + ".html"; double lineCoverage = -1; double branchCoverage = -1; double ccn = Ut...
return getClasses().size();
return this.classes.size();
public int getNumberOfClasses() { return getClasses().size(); }
classLoader = new MultiParentClassLoader(applicationContext.getDisplayName(), urls, getClass().getClassLoader());
ClassLoader parentLoader = getClassLoader(applicationContext); classLoader = new MultiParentClassLoader(applicationContext.getDisplayName(), urls, parentLoader);
public void preprocess(SpringApplicationContext applicationContext, XmlBeanDefinitionReader reader, Document document) { // determine the classLoader ClassLoader classLoader; NodeList classpathElements = document.getDocumentElement().getElementsByTagName("classpath"); if (classpathElemen...
bean.setAutoCreateResource(isAutoCreateResource());
public ContentItem loadContentItem(String itemResourcePath) { try { ArticleItemBean bean = new ArticleItemBean(); bean.load(itemResourcePath); return bean; } catch (Exception e) { e.printStackTrace(); } return null; }
public String render (WikiPage page) throws WikiPageRenderer.RenderException { WikiData[] dataElement = page.getData(); StringBuffer sb = new StringBuffer (2048); for (int x=0; x<dataElement.length; x++) { int type = dataElement[x].getType (); String data = (String) dataElement[x].getData (); String str = null; switc...
public void render (WikiPage page, OutputStream out) throws IOException, WikiPageRenderer.RenderException { out.write (render (page).getBytes());
public String render (WikiPage page) throws WikiPageRenderer.RenderException { WikiData[] dataElement = page.getData(); StringBuffer sb = new StringBuffer (2048); for (int x=0; x<dataElement.length; x++) { int type = dataElement[x].getType (); String data = (String...
System.out.println("Context contains: helloWorld, hello, file, TestObject[] fruits, SelectList sl(fruits, 3), TestObject flipper"); System.out.println("- - - - - - - - - - - - - - - - - - - -");
public static void main(String arg[]) { Log.traceExceptions(true); Log.setLevel(Log.ALL); Log.setTarget(System.err); if (arg.length != 0) { System.out.println("Enabling log types"); Log.enableTypes(arg); } // Build a context WebMacro wm = null; Context conte...
return "</ul>";
return "</ul>\n";
protected String renderEndList() { return "</ul>"; }
return "<hr>";
return "<hr>\n";
protected String renderHorizLine() { return "<hr>"; }
return "<br>";
return "<br>\n";
protected String renderLineBreak() { return "<br>"; }
return "<br><br>";
return "<br><br>\n";
protected String renderParagraphBreak() { return "<br><br>"; }
.append ("</pre>");
.append ("</pre>\n");
protected String renderQuotedBlock(String text) { StringBuffer sb = new StringBuffer (text.length()); sb.append ("<pre>") .append (replace (replace (text, "<", "&lt;"), ">", "&gt;")) .append ("</pre>"); return sb.toString (); }
return "<ul>";
return "<ul>\n";
protected String renderStartList() { return "<ul>"; }
list.addKeyListener(this); addKeyListener(this);
list.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent keyEvent) { if (keyEvent.getKeyCode() == KeyEvent.VK_ESCAPE) { textField.requestFocus(); } } });
public JContactItemField(List items, Window parentWindow) { setLayout(new BorderLayout()); this.items = items; add(textField, BorderLayout.CENTER); textField.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent keyEvent) { char ch = keyEvent.getKey...
return null;
return block;
public static final Object build(BuildContext rc, Object name, Macro block) throws BuildException { if (name instanceof Macro) { throw new BuildException( "Profile name must be a static string, not a dynamic macro"); } if (Flags.PROFILE) { return new ProfileDirective(...
if (!_list) {
if (_list && _listType != LIST_TYPE_NORMAL) endList(); if (!_list) {
public void li() { if (!_list) { newData(); _currentData.setType(WikiDataTypes.START_LIST); _list = true; } newData(); _currentData.setType(WikiDataTypes.LI); }
_listType = LIST_TYPE_NORMAL;
public void li() { if (!_list) { newData(); _currentData.setType(WikiDataTypes.START_LIST); _list = true; } newData(); _currentData.setType(WikiDataTypes.LI); }
if (_list) { newData(); _currentData.setType(WikiDataTypes.END_LIST); _list = false; }
if (_list) endList();
public void paragraph() { finishFormatting (); if (_list) { newData(); _currentData.setType(WikiDataTypes.END_LIST); _list = false; } newData (); _currentData.setType (WikiDataTypes.PARAGRAPH_BREAK); }
personalPanel.setJID(vcard.getJabberId());
private void populateVCardUI(VCard vcard) { personalPanel.setFirstName(vcard.getFirstName()); personalPanel.setMiddleName(vcard.getMiddleName()); personalPanel.setLastName(vcard.getLastName()); personalPanel.setEmailAddress(vcard.getEmailHome()); personalPanel.setNickname(vcard.ge...
personalPanel.showJID(true);
private void showUserProfile(String jid, VCard vcard, JComponent parent) { final JTabbedPane tabbedPane = new JTabbedPane(); personalPanel = new PersonalPanel(); tabbedPane.addTab("Personal", personalPanel); businessPanel = new BusinessPanel(); tabbedPane.addTab("Business", busine...
public boolean isDefaultGroup(long groupID) throws IAdminException, UnknownException, PermissionsException
public boolean isDefaultGroup(String name) throws IAdminException, UnknownException, PermissionsException
public boolean isDefaultGroup(long groupID) throws IAdminException, UnknownException, PermissionsException { try { return (iAdmin.getDefaultGroup(currentUser).getId() == groupID); } catch(ome.conditions.ApiUsageException e) { ExceptionHandler.get().catchException(e); } return false; }
return (iAdmin.getDefaultGroup(currentUser).getId() == groupID);
return (iAdmin.getDefaultGroup(currentUser).getId() == getGroupID(name));
public boolean isDefaultGroup(long groupID) throws IAdminException, UnknownException, PermissionsException { try { return (iAdmin.getDefaultGroup(currentUser).getId() == groupID); } catch(ome.conditions.ApiUsageException e) { ExceptionHandler.get().catchException(e); } return false; }
super.encodeBegin(context);
public void encodeBegin(FacesContext context) throws IOException { if(clearOnInit) { //WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "clear"); ArticleItemBean bean = getArticleItemBean(); if(bean!=null){ bean.clear(); } } // WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "updateLocale");// updateEditButtons(); super.e...
if(isInDeleteMode()){ try { getArticleItemBean().load(); } catch (Exception e) { e.printStackTrace(); } } super.encodeBegin(context);
public void encodeBegin(FacesContext context) throws IOException { if(clearOnInit) { //WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "clear"); ArticleItemBean bean = getArticleItemBean(); if(bean!=null){ bean.clear(); } } // WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "updateLocale");// updateEditButtons(); super.e...
UIComponent categoriesUi = findComponent(WebDAVCategories.CATEGORIES_BLOCK_ID); return categoriesUi;
WebDAVCategories categoriesUI = (WebDAVCategories)findComponent(WebDAVCategories.CATEGORIES_BLOCK_ID); if(categoriesUI==null){ categoriesUI=new WebDAVCategories(); categoriesUI.setCategoriesOnParent(true); categoriesUI.setDisplaySaveButton(false); categoriesUI.setDisplayHeader(false); FacesContext context = getFace...
private UIComponent getCategoryEditor() { UIComponent categoriesUi = findComponent(WebDAVCategories.CATEGORIES_BLOCK_ID); return categoriesUi; }
IWContext iwc = IWContext.getInstance();
FacesContext context = FacesContext.getCurrentInstance(); IWContext iwc = IWContext.getIWContext(context);
public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErr...
WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); UISaveState beanSaveState = new UISaveState(); ValueBinding bindin...
WFContainer mainContainer = getMainContainer();
public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErr...
p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":")));
public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErr...
p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));
UIComponent languageText = WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":")); HtmlOutputLabel languageLabel = new HtmlOutputLabel(); languageLabel.getChildren().add(languageText); languageLabel.setFor(langDropdown.getClientId(context)); WFFormItem languageItem = new WFFormItem(); languageItem.add(lan...
public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErr...