rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
new GConstructorInfo(constructorArgs),
new GConstructorInfo(serviceFactory.getConstructorArgNames()),
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { Prope...
referenceInfos);
null);
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { Prope...
if (file.isDirectory())
if (isClass(file)) { addInstrumentationToSingleClass(file); } else if (file.isDirectory())
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...
return;
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...
if (!isClass(file))
else if (isArchive(file))
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...
return; } if (logger.isDebugEnabled()) { logger.debug("instrumenting " + file.getAbsolutePath()); } InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(true); cv = new ClassInstrumenter...
addInstrumentationToArchive(file);
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...
Pattern ignoreRegexp)
final Collection ignoreRegexs)
public ClassInstrumenter(ProjectData projectData, final ClassVisitor cv, Pattern ignoreRegexp) { super(cv); this.projectData = projectData; this.ignoreRegex = ignoreRegexp; }
this.ignoreRegex = ignoreRegexp;
this.ignoreRegexs = ignoreRegexs;
public ClassInstrumenter(ProjectData projectData, final ClassVisitor cv, Pattern ignoreRegexp) { super(cv); this.projectData = projectData; this.ignoreRegex = ignoreRegexp; }
String message = "Your connection was closed due to an error.";
String message = Res.getString("message.disconnected.error");
public void connectionClosedOnError(final Exception ex) { SwingUtilities.invokeLater(new Runnable() { public void run() { Log.error("Connection closed on error.", ex); String message = "Your connection was closed due to an error."; if (ex instanceof XMP...
message = "Your connection was closed due to the same user logging in from another location.";
message = Res.getString("message.disconnected.conflict.error");
public void connectionClosedOnError(final Exception ex) { SwingUtilities.invokeLater(new Runnable() { public void run() { Log.error("Connection closed on error.", ex); String message = "Your connection was closed due to an error."; if (ex instanceof XMP...
String message = "Your connection was closed due to an error.";
String message = Res.getString("message.disconnected.error");
public void run() { Log.error("Connection closed on error.", ex); String message = "Your connection was closed due to an error."; if (ex instanceof XMPPException) { XMPPException xmppEx = (XMPPException)ex; StreamError error ...
message = "Your connection was closed due to the same user logging in from another location.";
message = Res.getString("message.disconnected.conflict.error");
public void run() { Log.error("Connection closed on error.", ex); String message = "Your connection was closed due to an error."; if (ex instanceof XMPPException) { XMPPException xmppEx = (XMPPException)ex; StreamError error ...
p.setStatus("User has locked their workstation.");
p.setStatus(Res.getString("message.locked.workstation"));
private void setIdleListener() throws Exception { final Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { LocalPreferences localPref = SettingsManager.getLocalPreferences(); int delay = 0; if (localPref.is...
p.setStatus("Away due to idle.");
p.setStatus(Res.getString("message.away.idle"));
private void setIdleListener() throws Exception { final Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { LocalPreferences localPref = SettingsManager.getLocalPreferences(); int delay = 0; if (localPref.is...
p.setStatus("User has locked their workstation.");
p.setStatus(Res.getString("message.locked.workstation"));
public void run() { LocalPreferences localPref = SettingsManager.getLocalPreferences(); int delay = 0; if (localPref.isIdleOn()) { delay = localPref.getIdleTime() * 60000; } else { return; ...
p.setStatus("Away due to idle.");
p.setStatus(Res.getString("message.away.idle"));
public void run() { LocalPreferences localPref = SettingsManager.getLocalPreferences(); int delay = 0; if (localPref.isIdleOn()) { delay = localPref.getIdleTime() * 60000; } else { return; ...
Iterator iter = dndList.iterator();
Iterator iter = statusList.iterator();
public StatusItem getStatusItem(String label) { Iterator iter = dndList.iterator(); while (iter.hasNext()) { StatusItem item = (StatusItem)iter.next(); if (item.getText().equals(label)) { return item; } } return null; }
dumpClasses((Clazz[])pack.getClasses().toArray( new Clazz[pack.getClasses().size()]));
dumpClasses((Clazz[])pack.getClasses().toArray(new Clazz[pack.getClasses().size()])); decreaseIndentation(); println("</package>");
private void dumpPackage(Package pack) { println("<package name=\"" + pack.getName() + "\"" + " line-rate=\"" + pack.getLineCoverageRate() + "\"" + " branch-rate=\"" + pack.getBranchCoverageRate() + "\"" + ">"); increaseIndentation(); dumpClasses((Clazz[])pack.getClasses().toArray( new Clazz[pack.getClasse...
private void dumpPackages(Coverage coverage)
private void dumpPackages(CoverageReport coverage)
private void dumpPackages(Coverage coverage) { Iterator it = coverage.getPackages().iterator(); while (it.hasNext()) { dumpPackage((Package)it.next()); } }
if (numberOfLines == 0)
if (getNumberOfLines() == 0)
public double getLineCoverageRate() { if (numberOfLines == 0) { return 1; } return (double)numberOfCoveredLines / (double)numberOfLines; }
return (double)numberOfCoveredLines / (double)numberOfLines;
return (double)getNumberOfCoveredLines() / (double)getNumberOfLines();
public double getLineCoverageRate() { if (numberOfLines == 0) { return 1; } return (double)numberOfCoveredLines / (double)numberOfLines; }
if (numberOfBranches == 0)
if (getNumberOfBranches() == 0)
public double getBranchCoverageRate() { if (numberOfBranches == 0) { if (numberOfCoveredLines == 0) { return 0; } return 1; } return (double)numberOfCoveredBranches / (double)numberOfBranches; }
if (numberOfCoveredLines == 0)
if (getNumberOfCoveredLines() == 0)
public double getBranchCoverageRate() { if (numberOfBranches == 0) { if (numberOfCoveredLines == 0) { return 0; } return 1; } return (double)numberOfCoveredBranches / (double)numberOfBranches; }
return (double)numberOfCoveredBranches / (double)numberOfBranches;
return (double)getNumberOfCoveredBranches() / (double)getNumberOfBranches();
public double getBranchCoverageRate() { if (numberOfBranches == 0) { if (numberOfCoveredLines == 0) { return 0; } return 1; } return (double)numberOfCoveredBranches / (double)numberOfBranches; }
Log.error("Unable to load plugin " + name + " due to min version incompatibility.");
public Collection getPluginList(InputStream response) { final List pluginList = new ArrayList(); SAXReader saxReader = new SAXReader(); Document pluginXML = null; try { pluginXML = saxReader.read(response); } catch (DocumentException e) { Log.error(e);...
return "1.1.9.2";
return "1.1.9.3";
public static String getVersion() { return "1.1.9.2"; }
String scope = ArticleUtil.getArticleRootPath();
String scope = ArticleUtil.getArticleBaseFolderPath();
public List listArticles() throws XmlException, IOException{ List list = new ArrayList(); IWContext iwc = IWContext.getInstance(); try { String scope = ArticleUtil.getArticleRootPath(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwc,IWSlideSession.class); if(scope != null){ ...
assertStringTemplateEquals ("#if(true){ pass }", " pass ");
public void testAfterBegin () throws Exception { assertStringTemplateEquals ("#if(true)#begin \npass#end", "pass"); assertStringTemplateEquals ("#if(true)#begin \n pass#end", " pass"); assertStringTemplateEquals ("#if(true)#begin pass#end", " pass"); assertStringTemplateEquals ("#if(true)#begi...
File[] files = finder.findDirectory(packageData.getSourceFileName()); if (files.length == 0) { LOGGER.warn("No directories found for package: " + packageData.getSourceFileName()); } double ccnSum = 0; for (int i = 0; i < files.length; i++) { ccnSum += Util.getCCN(files[i], false); } double ccn = ccnSum / (double) fil...
double ccn = packageData.getCCN(finder);
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; File[] fi...
public HSV(float hs, float ss, float vs, float as)
public HSV()
public HSV(float hs, float ss, float vs, float as) { h = hs; s = ss; v = vs; a = as; }
h = hs; s = ss; v = vs; a = as;
h = 0; s = 0; v = 0; a = 0;
public HSV(float hs, float ss, float vs, float as) { h = hs; s = ss; v = vs; a = as; }
public NoteTreeNode(Tree parent, Note data) { treeItem = new TreeItem(parent, SWT.NONE);
public NoteTreeNode(NoteTreeNode parent, DisplayedNote data) { treeItem = new TreeItem(parent.treeItem, SWT.NONE);
public NoteTreeNode(Tree parent, Note data) { treeItem = new TreeItem(parent, SWT.NONE); init(data); }
if (displayedNote.getTab() != null) displayedNote.getTab().dispose();
for (TreeItem childTi : treeItem.getItems()) { ((NoteTreeNode) childTi.getData()).dispose(); }
public void dispose() { if (displayedNote.getTab() != null) displayedNote.getTab().dispose(); treeItem.dispose(); }
private void init(Note data) { this.displayedNote = new DisplayedNote(this, data);
private void init(DisplayedNote data) { displayedNote = data;
private void init(Note data) { this.displayedNote = new DisplayedNote(this, data); treeItem.setText(data.getName()); treeItem.setData(this); for (Note n : data.getChildren()) { new NoteTreeNode(treeItem, n); } }
for (Note n : data.getChildren()) { new NoteTreeNode(treeItem, n); }
private void init(Note data) { this.displayedNote = new DisplayedNote(this, data); treeItem.setText(data.getName()); treeItem.setData(this); for (Note n : data.getChildren()) { new NoteTreeNode(treeItem, n); } }
contactGroup.setVisible(true); validateTree(); repaint();
private void addContactListToWorkspace() { Workspace workspace = SparkManager.getWorkspace(); workspace.getWorkspacePane().addTab("Contacts", SparkRes.getImageIcon(SparkRes.SMALL_ALL_CHATS_IMAGE), this); //NOTRANS // Add To Contacts Menu final JMenu contactsMenu = SparkManager.getMainWin...
contactGroup.setVisible(true); validateTree(); repaint();
public void actionPerformed(ActionEvent e) { String groupName = JOptionPane.showInputDialog(getGUI(), "Name of Group:", "Add New Group", JOptionPane.QUESTION_MESSAGE); if (ModelUtil.hasLength(groupName)) { ContactGroup contactGroup = getContactGroup(groupName...
public void showRosterDialog() { showRosterDialog(SparkManager.getMainWindow());
public void showRosterDialog(JFrame parent) { TitlePanel titlePanel = new TitlePanel(Res.getString("title.add.contact"), Res.getString("message.add.contact.to.list"), null, true); JPanel mainPanel = new JPanel() { public Dimension getPreferredSize() { final Dimension size = super.getPreferredSize(); size.width = 350;...
public void showRosterDialog() { showRosterDialog(SparkManager.getMainWindow()); }
if (status != null && status.indexOf("phone") != -1) {
if (status != null && status.toLowerCase().indexOf("phone") != -1) {
public void updatePresenceIcon(Presence presence) { ChatManager chatManager = SparkManager.getChatManager(); boolean handled = chatManager.fireContactItemPresenceChanged(this, presence); if (handled) { return; } String status = presence != null ? presence.getStatus() : ...
if(numDays > 0){ buf.append(numDays + " d, "); }
public static String getTimeFromLong(long diff) { final String HOURS = "h"; final String MINUTES = "min"; final String SECONDS = "sec"; final long MS_IN_A_DAY = 1000 * 60 * 60 * 24; final long MS_IN_AN_HOUR = 1000 * 60 * 60; final long MS_IN_A_MINUTE = 1000 * 60; fin...
if (running) {
if (!running) {
public Object invoke(ObjectName objectName, String methodName) throws org.apache.geronimo.kernel.GBeanNotFoundException, org.apache.geronimo.kernel.NoSuchOperationException, Exception { boolean running = isRunning(objectName); if (running) { throw new Illega...
if (!Character.isWhitespace(s.charAt(i))) return s.substring(0, i);
if (!Character.isWhitespace(s.charAt(i))) return s.substring(0, i+1);
public static String rtrim(String s) { if (s == null) return null; for (int i = s.length() - 1; i > -1; i--) { if (!Character.isWhitespace(s.charAt(i))) return s.substring(0, i); } // if all WS return empty string return ""; }
g.getChildren().add(WFUtil.getTextVB(ref + "versionId"));
g.getChildren().add(WFUtil.getTextVB(ref + "versionName"));
private UIComponent getDetailPanel() { WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle(); HtmlPanelGrid dp = WFPanelUtil.getPlainFormPanel(1); WFComponentSelector cs = new WFComponentSelector(); cs.setId(COMPONENT_SELECTOR_ID); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(1); p.setId(NO_ART...
public FileTemplate(Broker broker, File templateFile) { super(broker); myFile = templateFile;
public FileTemplate(Broker broker, String filename) { this (broker, new File(filename), defaultEncoding(broker));
public FileTemplate(Broker broker, File templateFile) { super(broker); myFile = templateFile; }
getLog().debug( "excludedClasses" + excludedClasses );
getLog().debug( "excludedClasses[" + excludedClasses + "]");
public void execute() throws MojoExecutionException, MojoFailureException { getLog().debug( " ======= XBeanMojo settings =======" ); getLog().debug( "namespace[" + namespace + "]" ); getLog().debug( "srcDir[" + srcDir + "]" ); getLog().debug( "schema[" + schema + "]" ); getLog().d...
enum = e;
enumeration = e;
public EnumIterator (Enumeration e) { enum = e; hasNext = e.hasMoreElements(); }
break; case 0: case 4: if ((0xffffff6fffffdbffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4);
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << cur...
case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break;
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << cur...
jjAddStates(2, 3);
jjAddStates(0, 1); break; case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21;
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << cur...
case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break;
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << cur...
break; case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21;
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << cur...
break; case 0: case 4: if ((0xffffffebffffdbffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4);
private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << cur...
case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break;
private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << cur...
jjAddStates(2, 3);
jjAddStates(0, 1); break; case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21;
private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << cur...
case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break;
private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << cur...
break; case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21;
private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << cur...
jjAddStates(4, 5);
jjAddStates(2, 3);
private final int jjMoveNfa_3(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 31; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << cu...
case 1: case 0: if ((0xffffffe7ffffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break;
private final int jjMoveNfa_4(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << cur...
jjAddStates(0, 1); break; case 2: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21;
jjAddStates(4, 5);
private final int jjMoveNfa_4(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << cur...
break; case 2: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21;
private final int jjMoveNfa_4(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << cur...
if ((active0 & 0x400000L) != 0L) return 4;
private final int jjStopStringLiteralDfa_3(int pos, long active0){ switch (pos) { case 0: if ((active0 & 0x400000L) != 0L) return 4; if ((active0 & 0x804000L) != 0L) return 0; if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; re...
if ((active0 & 0xc000000L) != 0L) return 29;
private final int jjStopStringLiteralDfa_3(int pos, long active0){ switch (pos) { case 0: if ((active0 & 0x400000L) != 0L) return 4; if ((active0 & 0x804000L) != 0L) return 0; if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; re...
THEMES_DIRECTORY = new File("c:\\xtra\\themes");
private ThemeManager() { emoticonManager = EmoticonManager.getInstance(); BrowserEngineManager bem = BrowserEngineManager.instance(); //specific engine if you want and the engine you specified will return bem.setActiveEngine(BrowserEngineManager.MOZILLA); //IBrowserEngine be = bem...
Collections.sort(contactItems, itemComparator);
List<ContactItem> tempItems = getContactItems();
public synchronized void addContactItem(ContactItem item) { if (model.getSize() == 1 && model.getElementAt(0) == noContacts) { model.remove(0); } if ("Offline Group".equals(groupName)) { item.getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); item.g...
int index = contactItems.indexOf(item);
Collections.sort(tempItems, itemComparator); int index = tempItems.indexOf(item);
public synchronized void addContactItem(ContactItem item) { if (model.getSize() == 1 && model.getElementAt(0) == noContacts) { model.remove(0); } if ("Offline Group".equals(groupName)) { item.getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); item.g...
return dndList;
return statusList;
public Collection getStatusList() { return dndList; }
dndList.add(freeToChat); dndList.add(online); dndList.add(away); dndList.add(phone); dndList.add(extendedAway); dndList.add(dnd);
statusList.add(freeToChat); statusList.add(online); statusList.add(away); statusList.add(phone); statusList.add(extendedAway); statusList.add(dnd);
private void populateDndList() { final ImageIcon availableIcon = SparkRes.getImageIcon(SparkRes.GREEN_BALL); final ImageIcon awayIcon = SparkRes.getImageIcon(SparkRes.IM_AWAY); final ImageIcon dndIcon = SparkRes.getImageIcon(SparkRes.IM_DND); final ImageIcon phoneIcon = SparkRes.getImage...
Iterator statusIterator = dndList.iterator(); while (statusIterator.hasNext()) { final StatusItem statusItem = (StatusItem)statusIterator.next();
for(final StatusItem statusItem : statusList){
public void showPopup(MouseEvent e) { final JPopupMenu popup = new JPopupMenu(); List custom = CustomMessages.load(); if (custom == null) { custom = new ArrayList(); } // Build menu from dndList Iterator statusIterator = dndList.iterator(); while (statusIt...
personalPanel.showJID(false);
public void showProfile(JComponent parent) { final JTabbedPane tabbedPane = new JTabbedPane(); personalPanel = new PersonalPanel(); tabbedPane.addTab("Personal", personalPanel); businessPanel = new BusinessPanel(); tabbedPane.addTab("Business", businessPanel); homePanel = n...
Logger.logError(e.getMessage(), e);
Log.error(e.getMessage(), e);
public void messageReceived(final ChatRoom room, final Message message) { if (!SparkManager.getMainWindow().isFocused()) { SwingUtilities.invokeLater(new Runnable() { public void run() { try { String name = SparkManager.getUserManager().getU...
Logger.logError(e.getMessage(), e);
Log.error(e.getMessage(), e);
public void run() { try { String name = SparkManager.getUserManager().getUserNicknameFromJID(message.getFrom()); // Since it looks the method can return null do this in case if (name == null) { ...
Dispatcher dispatcher = new Dispatcher(this); listener = new Listener(dispatcher);
Dispatcher dispatcher = new Dispatcher(); Listener listener = new Listener(dispatcher);
public DisplayedDocument(Shell shell) { // Shell this.shell = shell; shell.setText("Koala Notes"); shell.setLayout(new FillLayout(SWT.VERTICAL)); // Document document = new Document(); Note root = new Note("root", document, ""); LinkedList<Note> roots = new LinkedList<Note>(); roots.add(root); // Liste...
dispatcher.registerController(new MainController(this)); dispatcher.registerController(new MainMenuController(this)); dispatcher.registerController(new TreeController(tree, dispatcher));
public DisplayedDocument(Shell shell) { // Shell this.shell = shell; shell.setText("Koala Notes"); shell.setLayout(new FillLayout(SWT.VERTICAL)); // Document document = new Document(); Note root = new Note("root", document, ""); LinkedList<Note> roots = new LinkedList<Note>(); roots.add(root); // Liste...
public Listener(Controllers controllers) { this.controllers = controllers;
public Listener(Dispatcher dispatcher) { this.dispatcher = dispatcher;
public Listener(Controllers controllers) { this.controllers = controllers; srcToEvtToMethod = new HashMap<Widget, HashMap<Integer, String>>(); }
assertStringTemplateEquals ("#if(true){pass}\n\n#else{fail}", "pass"); assertStringTemplateEquals ("#if(true){pass} \n \n #else{fail}", "pass"); assertStringTemplateEquals ("#if(true){pass}\n\n\n\n\n\n\n\n\n\n#else{fail}", "pass"); assertStringTemplateEquals ("#if(true){pass} \n\n \n \n\n \n \n\n \n\n ...
public void testBeforeSubdirective () throws Exception { assertStringTemplateEquals ("#if(true){pass} #else{fail}", "pass"); assertStringTemplateEquals ("#if(true){pass} \n#else{fail}", "pass"); assertStringTemplateEquals ("#if(true){pass} \n #else{fail}", "pass"); }
setLayout(new CardLayout());
setLayout(new BorderLayout());
public ContactList() { // Load Local Preferences localPreferences = SettingsManager.getLocalPreferences(); offlineGroup = new ContactGroup("Offline Group"); JToolBar toolbar = new JToolBar(); toolbar.setFloatable(false); addContactMenu = new JMenuItem("Add Contact", SparkRe...
add(treeScroller, ROSTER_PANEL);
retryPanel = new RetryPanel();
public ContactList() { // Load Local Preferences localPreferences = SettingsManager.getLocalPreferences(); offlineGroup = new ContactGroup("Offline Group"); JToolBar toolbar = new JToolBar(); toolbar.setFloatable(false); addContactMenu = new JMenuItem("Add Contact", SparkRe...
retryPanel = new RetryPanel(); add(retryPanel, RETRY_PANEL);
workspace = SparkManager.getWorkspace(); workspace.getCardPanel().add(RETRY_PANEL, retryPanel); add(mainPanel, BorderLayout.CENTER);
public ContactList() { // Load Local Preferences localPreferences = SettingsManager.getLocalPreferences(); offlineGroup = new ContactGroup("Offline Group"); JToolBar toolbar = new JToolBar(); toolbar.setFloatable(false); addContactMenu = new JMenuItem("Add Contact", SparkRe...
CardLayout cl = (CardLayout)getLayout(); cl.show(this, ROSTER_PANEL);
workspace.changeCardLayout(Workspace.WORKSPACE_PANE);
public void clientReconnected() { XMPPConnection con = SparkManager.getConnection(); if (con.isConnected()) { // Send Available status final Presence presence = SparkManager.getWorkspace().getStatusBar().getPresence(); SparkManager.getSessionManager().changePresence(pr...
CardLayout cl = (CardLayout)getLayout(); cl.show(this, RETRY_PANEL);
workspace.changeCardLayout(RETRY_PANEL);
private void reconnect(final String message, final boolean conflict) { // Show MainWindow SparkManager.getMainWindow().setVisible(true); // Flash That Window. SparkManager.getAlertManager().flashWindowStopOnFocus(SparkManager.getMainWindow()); if (reconnectListener == null) { ...
CardLayout cardLayout = (CardLayout)getLayout(); cardLayout.show(this, ROSTER_PANEL);
workspace.changeCardLayout(RETRY_PANEL);
private void removeAllUsers() { // Show reconnect panel CardLayout cardLayout = (CardLayout)getLayout(); cardLayout.show(this, ROSTER_PANEL); // Behind the scenes, move everyone to the offline group. Iterator contactGroups = new ArrayList(getContactGroups()).iterator(); whi...
version1 = version1.replaceAll(".online", "");
public boolean isGreater(String version1, String version2) { return version1.compareTo(version2) >= 1; }
setBackground(Color.black);
setBackground(Color.white);
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...
List metadataProviders = new ArrayList(2); metadataProviders.add(new GeronimoMetadataProvider()); metadataProviders.add(new PropertiesMetadataProvider()); MetadataManager metadataManager = new SimpleMetadataManager(metadataProviders);
public ObjectName load(Kernel kernel, String location) { try { LiveHashSet repositories = new LiveHashSet(kernel, "repositories", Collections.singleton(new ObjectName("*:j2eeType=Repository,*"))); repositories.start(); ConfigurationInfo configurationInfo = loadConfigurationIn...
} catch (InvalidConfigurationException e) { throw e;
public ObjectName load(Kernel kernel, String location) { try { LiveHashSet repositories = new LiveHashSet(kernel, "repositories", Collections.singleton(new ObjectName("*:j2eeType=Repository,*"))); repositories.start(); ConfigurationInfo configurationInfo = loadConfigurationIn...
public InvalidConfigurationException(String s, Throwable throwable) { super(s, throwable);
public InvalidConfigurationException() {
public InvalidConfigurationException(String s, Throwable throwable) { super(s, throwable); }
public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition);
public void visitBeanDefinition(BeanDefinition beanDefinition, Object data) throws BeansException { super.visitBeanDefinition(beanDefinition, data);
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { SpringVisitor visitor = new AbstractSpringVisitor() { public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefiniti...
parametersToConstructorArgs(rootBeanDefinition);
processParameters(rootBeanDefinition);
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { SpringVisitor visitor = new AbstractSpringVisitor() { public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefiniti...
visitor.visitBeanFactory(beanFactory);
visitor.visitBeanFactory(beanFactory, null);
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { SpringVisitor visitor = new AbstractSpringVisitor() { public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefiniti...
public ObjectNameBuilder(MetadataManager metadataManager, String domainName, String serverName, String applicationName) {
public ObjectNameBuilder(MetadataManager metadataManager, String domainName, String serverName, String moduleName) {
public ObjectNameBuilder(MetadataManager metadataManager, String domainName, String serverName, String applicationName) { this.metadataManager = metadataManager; this.domainName = domainName; this.serverName = serverName; this.applicationName = applicationName; }
this.applicationName = applicationName;
this.moduleName = moduleName;
public ObjectNameBuilder(MetadataManager metadataManager, String domainName, String serverName, String applicationName) { this.metadataManager = metadataManager; this.domainName = domainName; this.serverName = serverName; this.applicationName = applicationName; }
public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition);
public void visitBeanDefinition(BeanDefinition beanDefinition, Object data) throws BeansException { super.visitBeanDefinition(beanDefinition, data);
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { SpringVisitor visitor = new AbstractSpringVisitor() { public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefiniti...
visitor.visitBeanFactory(beanFactory);
visitor.visitBeanFactory(beanFactory, null);
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { SpringVisitor visitor = new AbstractSpringVisitor() { public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefiniti...
add(textLabel, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(3, 2, 3, 5), 0, 0));
add(textLabel, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(3, 2, 3, 10), 0, 0));
public SparkTab(Icon icon, String text) { setLayout(new GridBagLayout()); selectedBorderColor = new Color(173, 0, 0); // setBackground(backgroundColor); this.actualText = text; iconLabel = new JLabel(icon); iconLabel.setOpaque(false); textLabel = new JLabel(text); ...
_log.warning ("TemplateProvider: Template not found: " + fileName, npe);
_log.warning ("TemplateProvider: Template not found: " + fileName);
final public Template getTemplate(String fileName) { File tFile = findTemplate (fileName); Template t = null; try { t = new FileTemplate (_broker, tFile); t.parse (); _lastModifiedCache.put (fileName, new Long (tFile.lastModified())); return t; } catch (Null...
if (_templatePath == null) { _log.error("TemplatePath not specified in properties"); _templatePath = ""; }
public void init(Broker b, Settings config) throws InitException { super.init(b,config); _broker = b; _log = b.getLog("resource", "Object loading and caching"); try { _cacheDuration = config.getIntegerSetting("TemplateExpireTime", 0); _templatePath = config.getSetting("TemplateP...
public int getIntegerSetting(String key, int defaultValue) { if (containsKey(key)) { return getIntegerSetting(key); } else { return defaultValue;
public int getIntegerSetting(String key) { String snum = getSetting(key); try { return Integer.parseInt(snum); } catch (Exception e) { return 0;
public int getIntegerSetting(String key, int defaultValue) { if (containsKey(key)) { return getIntegerSetting(key); } else { return defaultValue; } }
setBackground(Color.white);
setBackground(Color.black);
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...
titleLabel.setFont(new Font("Verdana", Font.BOLD, 11)); descriptionLabel.setFont(new Font("Verdana", 0, 10));
titleLabel.setFont(new Font("dialog", Font.BOLD, 11)); descriptionLabel.setFont(new Font("dialog", 0, 10));
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...
final JPanel panel = new JPanel();
final JPanel panel = new ImagePanel();
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...