rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
buf.append("<prompt>derek.demoro@hotmail.com</prompt>");
buf.append("<prompt>" + username + "</prompt>");
public String getChildElementXML() { StringBuffer buf = new StringBuffer(); buf.append("<query xmlns=\"" + NAMESPACE + "\">"); buf.append("<prompt>derek.demoro@hotmail.com</prompt>"); buf.append("</query>"); return buf.toString(); }
dd.getMenuBar().updateAll(true); dd.getTreeContextMenu().updateAll(true);
public void contextChanged(Event e) { List<ActionGroup> actionGroups = dd.getActionGroups(); for (ActionGroup ag : actionGroups) { ag.update(); } }
srcToEvtToMethod.remove(source);
HashMap<Integer, String> evtToMethod = srcToEvtToMethod.get(source); if (evtToMethod != null) { Set<Integer> eventTypes = evtToMethod.keySet(); for (Integer eventType : eventTypes) { source.removeListener(eventType, this); } srcToEvtToMethod.remove(source); }
public void removeMappingFor(Widget source) { srcToEvtToMethod.remove(source); }
this.roomTitle = participantNickname + " - Started " + formatter.format(new Date());
this.roomTitle = participantNickname;
public ChatRoomImpl(final String participantJID, String participantNickname, String title) { this.participantJID = participantJID; this.participantNickname = participantNickname; AndFilter presenceFilter = new AndFilter(new PacketTypeFilter(Presence.class), new FromContainsFilter(this.participa...
System.out.println("Return CLASS: " + returnType); System.out.println("Iterator CLASS: " + Iterator.class);
private PropertyOperator(final Class target) throws SecurityException, PropertyException { if (_debug) { _log.debug("new PropertyOperator(" + target + ")"); } Accessor acc; // introspect fields first Field[] fields = target.getFields(); for (int i = 0; i < fields.le...
char ch = (char) ((String) o).charAt(0);
char ch = s.charAt(0);
public static Character toChar(Object o) throws org.webmacro.PropertyException { Character c = null; if (o == null || o == "") return null; if (o instanceof Character) return (Character) o; if (o instanceof Number) { try { c = new Character((char) ((Number) o).intValue()); ...
+ o + ((o == null) ? "." : " of type " + o.getClass().getName()));
+ o + " of type " + o.getClass().getName());
public static Character toChar(Object o) throws org.webmacro.PropertyException { Character c = null; if (o == null || o == "") return null; if (o instanceof Character) return (Character) o; if (o instanceof Number) { try { c = new Character((char) ((Number) o).intValue()); ...
return t;
try { return t.evaluateAsString(bc); } catch (PropertyException e) { return ""; }
public final Object build (DirectiveBuilder builder, BuildContext bc) throws BuildException { Broker broker = bc.getBroker(); _log = bc.getLog("IncludeDirective"); // build configuration key names, since they're based // on the configured name of this directive _directiveName =...
public Collection getClasses()
public SortedSet getClasses()
public Collection getClasses() { Collection classes = new TreeSet(); Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { SourceFileData sourceFileData = (SourceFileData)iter.next(); classes.addAll(sourceFileData.getChildren()); } return classes; }
Collection classes = new TreeSet();
SortedSet classes = new TreeSet();
public Collection getClasses() { Collection classes = new TreeSet(); Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { SourceFileData sourceFileData = (SourceFileData)iter.next(); classes.addAll(sourceFileData.getChildren()); } return classes; }
articleItem.load(new File("/Test/article/"+id+".xml"));
articleItem.load(id);
public void processAction(ActionEvent event) { if (event.getComponent().getId().equals(LIST_BUTTON_ID)) { WFUtil.invoke(LIST_ARTICLES_BEAN_ID, "list"); return; } else if (event.getComponent().getId().equals(VIEW_ARTICLE_BACK_BUTTON_ID)) { WFComponentSelector cs = (WFComponentSelector) event.getComponent().find...
WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setHeadline", notNull(articleItem.getHeadline())+" (id = " + id + ")");
WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setHeadline", notNull(articleItem.getHeadline()));
public void processAction(ActionEvent event) { if (event.getComponent().getId().equals(LIST_BUTTON_ID)) { WFUtil.invoke(LIST_ARTICLES_BEAN_ID, "list"); return; } else if (event.getComponent().getId().equals(VIEW_ARTICLE_BACK_BUTTON_ID)) { WFComponentSelector cs = (WFComponentSelector) event.getComponent().find...
WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setAuthor", notNull(articleItem.getAuthor())); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setMainCategory", notNull(articleItem.getMainCategory()));
public void processAction(ActionEvent event) { if (event.getComponent().getId().equals(LIST_BUTTON_ID)) { WFUtil.invoke(LIST_ARTICLES_BEAN_ID, "list"); return; } else if (event.getComponent().getId().equals(VIEW_ARTICLE_BACK_BUTTON_ID)) { WFComponentSelector cs = (WFComponentSelector) event.getComponent().find...
for (int i = 0, size = attributes.getLength(); i < size; i++) { Attr attribute = (Attr) attributes.item(i); String uri = attribute.getNamespaceURI(); String localName = attribute.getLocalName(); if (localName == null || localName.equals("xmlns") || localName.startsWith("xmlns:")) { continue; } if (!isEmpty(uri) && ur...
protected void addAttributeProperties(BeanDefinitionHolder definition, MappingMetaData metadata, String className, Element element) { NamedNodeMap attributes = element.getAttributes(); for (int i = 0, size = attributes.getLength(); i < size; i++) { Attr attribute = (Attr) attribu...
String localName = attribute.getName();
String localName = attribute.getLocalName();
protected void addAttributeProperty(BeanDefinitionHolder definition, MappingMetaData metadata, Element element, Attr attribute) { String localName = attribute.getName(); String value = attribute.getValue(); addProperty(definition, metadata, element, localName, value); }
Element answer = element.getOwnerDocument().createElement(getLocalName(element));
Element answer = element.getOwnerDocument().createElementNS(element.getNamespaceURI(), element.getNodeName());
protected Element cloneElement(Element element) { Element answer = element.getOwnerDocument().createElement(getLocalName(element)); NamedNodeMap attributes = element.getAttributes(); for (int i = 0, size = attributes.getLength(); i < size; i++) { Attr attribute = (Attr) attributes.it...
if (log == null) log = new StringBuffer();
protected void add(String component, String suffix) { String key = null; String name = component; int eqIdx = component.indexOf('='); if (eqIdx != -1) { key = component.substring(0, eqIdx); name = component.substring(eqIdx + 1); } Class c; try { c = Class.fo...
names[start] + " on object " + instance + " of "
fillInName(names, start) + " on object " + instance + " of "
public Object getProperty(final Context context, final Object instance, final Object[] names, int start, int end) throws PropertyException { String prop; Object nextProp = null; Accessor acc = null; ...
getArticleItemBean().clear();
ArticleItemBean bean = getArticleItemBean(); if(bean!=null){ bean.clear(); }
protected void initializeContent() { setId(EDIT_ARTICLE_BLOCK_ID); if(clearOnInit){ getArticleItemBean().clear(); } // WFUtil.invoke(EDIT_ARTICLES_BEAN_ID, "setArticleLinkListener", this, ActionListener.class); add(getEditContainer()); }
final JWindow frame = new JWindow(parent); final JContactItemField contactField = new JContactItemField(new ArrayList(contacts), frame);
window = new JWindow(parent); final JContactItemField contactField = new JContactItemField(new ArrayList(contacts));
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 (g...
frame.getContentPane().setLayout(new BorderLayout());
window.setLayout(new BorderLayout());
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 (g...
frame.getContentPane().add(layoutPanel);
window.add(layoutPanel);
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 (g...
frame.pack();
window.pack();
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 (g...
frame.setLocationRelativeTo(parent); frame.setVisible(true);
window.setLocationRelativeTo(parent); window.setVisible(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 (g...
frame.addKeyListener(new KeyAdapter() {
window.addKeyListener(new KeyAdapter() {
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 (g...
frame.dispose();
window.dispose();
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 (g...
frame.dispose();
window.dispose();
public void keyPressed(KeyEvent keyEvent) { if (keyEvent.getKeyChar() == KeyEvent.VK_ESCAPE) { frame.dispose(); } }
frame.dispose();
window.dispose();
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 !...
public void visitBeanFactory(ConfigurableListableBeanFactory beanRegistry) throws BeansException {
public void visitBeanFactory(ConfigurableListableBeanFactory beanRegistry, Object data) throws BeansException {
public void visitBeanFactory(ConfigurableListableBeanFactory beanRegistry) throws BeansException { String[] beanNames = beanRegistry.getBeanDefinitionNames(); for (int i = 0; i < beanNames.length; i++) { String beanName = beanNames[i]; visitBeanDefinition(beanName, beanRegistry.g...
visitBeanDefinition(beanName, beanRegistry.getBeanDefinition(beanName));
visitBeanDefinition(beanName, beanRegistry.getBeanDefinition(beanName), data);
public void visitBeanFactory(ConfigurableListableBeanFactory beanRegistry) throws BeansException { String[] beanNames = beanRegistry.getBeanDefinitionNames(); for (int i = 0; i < beanNames.length; i++) { String beanName = beanNames[i]; visitBeanDefinition(beanName, beanRegistry.g...
public void visitCollection(Collection collection) throws BeansException {
public void visitCollection(Collection collection, Object data) throws BeansException {
public void visitCollection(Collection collection) throws BeansException { for (Iterator iterator = collection.iterator(); iterator.hasNext();) { visitNext(iterator.next()); } }
visitNext(iterator.next());
visitNext(iterator.next(), data);
public void visitCollection(Collection collection) throws BeansException { for (Iterator iterator = collection.iterator(); iterator.hasNext();) { visitNext(iterator.next()); } }
public void visitConstructorArgumentValues(ConstructorArgumentValues constructorArgumentValues) throws BeansException {
public void visitConstructorArgumentValues(ConstructorArgumentValues constructorArgumentValues, Object data) throws BeansException {
public void visitConstructorArgumentValues(ConstructorArgumentValues constructorArgumentValues) throws BeansException { Map indexedArgumentValues = constructorArgumentValues.getIndexedArgumentValues(); for (Iterator iterator = indexedArgumentValues.values().iterator(); iterator.hasNext();) { ...
visitConstructorArgumentValues((ConstructorArgumentValues.ValueHolder) iterator.next());
visitConstructorArgumentValue((ConstructorArgumentValues.ValueHolder) iterator.next(), data);
public void visitConstructorArgumentValues(ConstructorArgumentValues constructorArgumentValues) throws BeansException { Map indexedArgumentValues = constructorArgumentValues.getIndexedArgumentValues(); for (Iterator iterator = indexedArgumentValues.values().iterator(); iterator.hasNext();) { ...
Set genericArgumentValues = constructorArgumentValues.getGenericArgumentValues();
List genericArgumentValues = constructorArgumentValues.getGenericArgumentValues();
public void visitConstructorArgumentValues(ConstructorArgumentValues constructorArgumentValues) throws BeansException { Map indexedArgumentValues = constructorArgumentValues.getIndexedArgumentValues(); for (Iterator iterator = indexedArgumentValues.values().iterator(); iterator.hasNext();) { ...
public void visitMap(Map map) throws BeansException {
public void visitMap(Map map, Object data) throws BeansException {
public void visitMap(Map map) throws BeansException { for (Iterator iterator = map.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); visitNext(entry.getKey()); visitNext(entry.getValue()); } }
visitNext(entry.getKey()); visitNext(entry.getValue());
visitNext(entry.getKey(), data); visitNext(entry.getValue(), data);
public void visitMap(Map map) throws BeansException { for (Iterator iterator = map.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); visitNext(entry.getKey()); visitNext(entry.getValue()); } }
public void visitMutablePropertyValues(MutablePropertyValues propertyValues) throws BeansException {
public void visitMutablePropertyValues(MutablePropertyValues propertyValues, Object data) throws BeansException {
public void visitMutablePropertyValues(MutablePropertyValues propertyValues) throws BeansException { PropertyValue[] values = propertyValues.getPropertyValues(); for (int i = 0; i < values.length; i++) { visitPropertyValue(values[i]); } }
visitPropertyValue(values[i]);
visitPropertyValue(values[i], data);
public void visitMutablePropertyValues(MutablePropertyValues propertyValues) throws BeansException { PropertyValue[] values = propertyValues.getPropertyValues(); for (int i = 0; i < values.length; i++) { visitPropertyValue(values[i]); } }
protected void visitNext(Object value) throws BeansException {
protected void visitNext(Object value, Object data) throws BeansException {
protected void visitNext(Object value) throws BeansException { if (value == null) { return; } if (value instanceof ConfigurableListableBeanFactory) { visitBeanFactory((ConfigurableListableBeanFactory) value); } else if (value instanceof BeanDefinition) { ...
visitBeanFactory((ConfigurableListableBeanFactory) value);
visitBeanFactory((ConfigurableListableBeanFactory) value, data); } else if (value instanceof BeanDefinitionHolder) { visitBeanDefinitionHolder((BeanDefinitionHolder) value, data);
protected void visitNext(Object value) throws BeansException { if (value == null) { return; } if (value instanceof ConfigurableListableBeanFactory) { visitBeanFactory((ConfigurableListableBeanFactory) value); } else if (value instanceof BeanDefinition) { ...
visitBeanDefinition((BeanDefinition) value);
visitBeanDefinition((BeanDefinition) value, data);
protected void visitNext(Object value) throws BeansException { if (value == null) { return; } if (value instanceof ConfigurableListableBeanFactory) { visitBeanFactory((ConfigurableListableBeanFactory) value); } else if (value instanceof BeanDefinition) { ...
visitConstructorArgumentValues((ConstructorArgumentValues) value);
visitConstructorArgumentValues((ConstructorArgumentValues) value, data);
protected void visitNext(Object value) throws BeansException { if (value == null) { return; } if (value instanceof ConfigurableListableBeanFactory) { visitBeanFactory((ConfigurableListableBeanFactory) value); } else if (value instanceof BeanDefinition) { ...
visitConstructorArgumentValues((ConstructorArgumentValues.ValueHolder) value);
visitConstructorArgumentValue((ConstructorArgumentValues.ValueHolder) value, data);
protected void visitNext(Object value) throws BeansException { if (value == null) { return; } if (value instanceof ConfigurableListableBeanFactory) { visitBeanFactory((ConfigurableListableBeanFactory) value); } else if (value instanceof BeanDefinition) { ...
visitMutablePropertyValues((MutablePropertyValues) value);
visitMutablePropertyValues((MutablePropertyValues) value, data);
protected void visitNext(Object value) throws BeansException { if (value == null) { return; } if (value instanceof ConfigurableListableBeanFactory) { visitBeanFactory((ConfigurableListableBeanFactory) value); } else if (value instanceof BeanDefinition) { ...
visitPropertyValue((PropertyValue) value);
visitPropertyValue((PropertyValue) value, data);
protected void visitNext(Object value) throws BeansException { if (value == null) { return; } if (value instanceof ConfigurableListableBeanFactory) { visitBeanFactory((ConfigurableListableBeanFactory) value); } else if (value instanceof BeanDefinition) { ...
visitRuntimeBeanReference((RuntimeBeanReference) value);
visitRuntimeBeanReference((RuntimeBeanReference) value, data);
protected void visitNext(Object value) throws BeansException { if (value == null) { return; } if (value instanceof ConfigurableListableBeanFactory) { visitBeanFactory((ConfigurableListableBeanFactory) value); } else if (value instanceof BeanDefinition) { ...
visitMap((Map) value);
visitMap((Map) value, data);
protected void visitNext(Object value) throws BeansException { if (value == null) { return; } if (value instanceof ConfigurableListableBeanFactory) { visitBeanFactory((ConfigurableListableBeanFactory) value); } else if (value instanceof BeanDefinition) { ...
visitCollection((Collection) value);
visitCollection((Collection) value, data);
protected void visitNext(Object value) throws BeansException { if (value == null) { return; } if (value instanceof ConfigurableListableBeanFactory) { visitBeanFactory((ConfigurableListableBeanFactory) value); } else if (value instanceof BeanDefinition) { ...
visitObject(value);
visitObject(value, data);
protected void visitNext(Object value) throws BeansException { if (value == null) { return; } if (value instanceof ConfigurableListableBeanFactory) { visitBeanFactory((ConfigurableListableBeanFactory) value); } else if (value instanceof BeanDefinition) { ...
public void visitObject(Object value) throws BeansException {
public void visitObject(Object value, Object data) throws BeansException {
public void visitObject(Object value) throws BeansException { }
public void visitPropertyValue(PropertyValue propertyValue) throws BeansException { visitNext(propertyValue.getValue());
public void visitPropertyValue(PropertyValue propertyValue, Object data) throws BeansException { visitNext(propertyValue.getValue(), data);
public void visitPropertyValue(PropertyValue propertyValue) throws BeansException { visitNext(propertyValue.getValue()); }
TransportManager.registerUser(SparkManager.getConnection(), serviceName, username, password);
TransportUtils.registerUser(SparkManager.getConnection(), serviceName, username, password);
public void actionPerformed(ActionEvent e) { String username = getScreenName(); String password = getPassword(); if (!ModelUtil.hasLength(username) || !ModelUtil.hasLength(password)) { JOptionPane.showMessageDialog(this, Res.getString("message.username.password.error"), Res.getString...
new XmlMetadataGenerator(this, outputDir.getAbsolutePath(), schema), new DocumentationGenerator(this, schema), new XsdGenerator(this, schema)
new XmlMetadataGenerator(outputDir.getAbsolutePath(), schema), new DocumentationGenerator(schema), new XsdGenerator(schema), new WikiDocumentationGenerator(schema),
public void execute() throws MojoExecutionException, MojoFailureException { getLog().debug( " ======= XBeanMojo settings =======" ); getLog().debug( "namespace[" + namespace + "]" ); getLog().debug( "srcDir[" + srcDir + "]" ); getLog().debug( "schema[" + schema + "]" ); getLog().d...
}
} for (Iterator iter = generatorPlugins.iterator(); iter.hasNext();) { GeneratorPlugin plugin = (GeneratorPlugin) iter.next(); plugin.setLog(this); plugin.generate(namespaceMapping); }
public void execute() throws MojoExecutionException, MojoFailureException { getLog().debug( " ======= XBeanMojo settings =======" ); getLog().debug( "namespace[" + namespace + "]" ); getLog().debug( "srcDir[" + srcDir + "]" ); getLog().debug( "schema[" + schema + "]" ); getLog().d...
List<Element> es = (List<Element>) el.getChildren(); for (Element childElement : es) { createNoteFromElement(childElement, n);
List es = el.getChildren(); for (Object childElement : es) { createNoteFromElement((Element) childElement, n);
private Note createNoteFromElement(Element el, Note parent) { if (!el.getName().equals("note")) { throw new KoalaException("Koala Notes could not build a document from file '" + file.getName() + "': expected a note element but got a " + el.getName() + "."); } ...
sb.append(_content[i].toString());
sb.append(_content[i] == null ? "null" : _content[i].toString());
public String toString() { StringBuffer sb = new StringBuffer(); sb.append("("); for (int i = 0; i < _content.length; i++) { if (i != 0) { sb.append(", "); } sb.append(_content[i].toString()); } sb.append(")"); return sb.toString(); }
boolean[] la1tokens = new boolean[33]; for (int i = 0; i < 33; i++) {
boolean[] la1tokens = new boolean[35]; for (int i = 0; i < 35; i++) {
final public ParseException generateParseException() { jj_expentries.removeAllElements(); boolean[] la1tokens = new boolean[33]; for (int i = 0; i < 33; i++) { la1tokens[i] = false; } if (jj_kind >= 0) { la1tokens[jj_kind] = true; jj_kind = -1; } for (int i = 0; i < 2; i++) { ...
for (int i = 0; i < 33; i++) {
for (int i = 0; i < 35; i++) {
final public ParseException generateParseException() { jj_expentries.removeAllElements(); boolean[] la1tokens = new boolean[33]; for (int i = 0; i < 33; i++) { la1tokens[i] = false; } if (jj_kind >= 0) { la1tokens[jj_kind] = true; jj_kind = -1; } for (int i = 0; i < 2; i++) { ...
break; case LI: t = jj_consume_token(LI); builder.li();
final public WikiPage parse(WikiPageBuilder builder) throws ParseException { Token t; label_1: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case QUOTED_BLOCK: case BOLD: case UNDERLINE: case ITALIC: case LT: case GT: c...
ChatPreferences chatPref = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE); chatRoom.create(chatPref.getNickname());
LocalPreferences pref = SettingsManager.getLocalPreferences(); chatRoom.create(pref.getNickname());
public ChatRoom createConferenceRoom(String roomName, String serviceName) { final MultiUserChat chatRoom = new MultiUserChat(SparkManager.getConnection(), roomName + "@" + serviceName); final GroupChatRoom room = new GroupChatRoom(chatRoom); try { ChatPreferences chatPref = (ChatPref...
public JContactItemField(List items) {
public JContactItemField(List items, Window parentWindow) {
public JContactItemField(List items) { setLayout(new BorderLayout()); this.items = items; add(textField, BorderLayout.CENTER); textField.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent keyEvent) { char ch = keyEvent.getKeyChar(); ...
popup = new JWindow(new JFrame());
list.addKeyListener(this); addKeyListener(this); popup = new JWindow(parentWindow);
public JContactItemField(List items) { setLayout(new BorderLayout()); this.items = items; add(textField, BorderLayout.CENTER); textField.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent keyEvent) { char ch = keyEvent.getKeyChar(); ...
pref.setHideChatHistory(panel.isChatHistoryHidden());
pref.setChatHistoryEnabled(!panel.isChatHistoryHidden());
public void commit() { LocalPreferences pref = SettingsManager.getLocalPreferences(); pref.setTimeDisplayedInChat(panel.getShowTime()); pref.setSpellCheckerEnabled(panel.isSpellCheckerOn()); pref.setChatRoomNotifications(panel.isGroupChatNotificationsOn()); pref.setHideChatHistory...
boolean chatHistoryHidden = pref.isHideChatHistory();
boolean chatHistoryHidden = !pref.isChatHistoryEnabled();
public void load() { SwingWorker thread = new SwingWorker() { LocalPreferences pref; public Object construct() { pref = SettingsManager.getLocalPreferences(); return pref; } public void finished() { String nickname = pre...
boolean chatHistoryHidden = pref.isHideChatHistory();
boolean chatHistoryHidden = !pref.isChatHistoryEnabled();
public void finished() { String nickname = pref.getDefaultNickname(); if (nickname == null) { nickname = SparkManager.getSessionManager().getUsername(); } boolean showTime = pref.isTimeDisplayedInChat(); boolean sp...
LOG_DIRECTORY = new File(workingDir, "logs").getAbsoluteFile();
if (!Spark.isWindows()) { LOG_DIRECTORY = new File(USER_HOME, "/Spark/logs").getAbsoluteFile(); } else { LOG_DIRECTORY = new File(workingDir, "logs").getAbsoluteFile(); }
public static void main(final String[] args) { /* * EnhancedDebuggerWindow.PERSISTED_DEBUGGER = true; * EnhancedDebuggerWindow.MAX_TABLE_ROWS = 10; * XMPPConnection.DEBUG_ENABLED = true; */ String current = System.getProperty("java.library.path"); String classPath = ...
public HTMLReport(Coverage coverage, File outputDir, File sourceDir)
public HTMLReport(CoverageReport coverage, File outputDir, File sourceDir)
public HTMLReport(Coverage coverage, File outputDir, File sourceDir) throws Exception { this.outputDir = outputDir; this.sourceDir = sourceDir; this.coverage = coverage; removeNonexistantClasses(); CopyFiles.copy(outputDir); generatePackageList(); generateClassLists(); generateOverviews(); generateSourceFil...
Block b = (Block) bb.build(new BuildContext(broker));
bb.build(new BuildContext(broker));
public static void parseTemplate(String name, Reader in) { try { Builder bb = parser.parseBlock(name, in); Block b = (Block) bb.build(new BuildContext(broker)); } catch (Exception e) { System.err.println("Exception parsing template " + name + "\n" + e); } }
titleLabel.setFont(new Font("Verdana", Font.BOLD, 11));
titleLabel.setFont(new Font("Dialog", Font.BOLD, 11));
public SendMessage() { setLayout(new GridBagLayout()); setBackground(new Color(250, 249, 242)); add(imageLabel, new GridBagConstraints(0, 0, 1, 3, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(1, 0,...
cancelButton.setText("Cancel"); retryButton.setText("Retry");
cancelButton.setText(Res.getString("cancel")); retryButton.setText(Res.getString("retry"));
public SendMessage() { setLayout(new GridBagLayout()); setBackground(new Color(250, 249, 242)); add(imageLabel, new GridBagConstraints(0, 0, 1, 3, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(1, 0,...
cancelButton.setFont(new Font("Verdana", Font.BOLD, 10));
cancelButton.setFont(new Font("Dialog", Font.BOLD, 10));
public SendMessage() { setLayout(new GridBagLayout()); setBackground(new Color(250, 249, 242)); add(imageLabel, new GridBagConstraints(0, 0, 1, 3, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(1, 0,...
retryButton.setFont(new Font("Verdana", Font.BOLD, 10));
retryButton.setFont(new Font("Dialog", Font.BOLD, 10));
public SendMessage() { setLayout(new GridBagLayout()); setBackground(new Color(250, 249, 242)); add(imageLabel, new GridBagConstraints(0, 0, 1, 3, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(1, 0,...
label.setToolTipText("Click to open");
label.setToolTipText(Res.getString("message.click.to.open"));
private void makeClickable(final JLabel label) { label.setToolTipText("Click to open"); label.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { openFile(fileToSend); } public void mouseEntered(MouseEvent e) { l...
titleLabel.setText("Waiting for " + contactItem.getNickname() + " to accept file transfer.");
titleLabel.setText(Res.getString("message.transfer.waiting.on.user", contactItem.getNickname()));
public void sendFile(final OutgoingFileTransfer transfer, FileTransferManager transferManager, final String jid, final String nickname) { this.transferManager = transferManager; cancelButton.setVisible(true); retryButton.setVisible(false); this.fullJID = jid; this.nickname = nickn...
if (status == Status.ERROR || status == Status.COMPLETE || status == Status.CANCLED || status == Status.REFUSED) {
if (status == Status.error || status == Status.complete || status == Status.cancelled || status == Status.refused) {
public void sendFile(final OutgoingFileTransfer transfer, FileTransferManager transferManager, final String jid, final String nickname) { this.transferManager = transferManager; cancelButton.setVisible(true); retryButton.setVisible(false); this.fullJID = jid; this.nickname = nickn...
if (status == Status.ERROR || status == Status.COMPLETE || status == Status.CANCLED || status == Status.REFUSED) {
if (status == Status.error || status == Status.complete || status == Status.cancelled || status == Status.refused) {
public Object construct() { while (true) { try { Thread.sleep(10); FileTransfer.Status status = transfer.getStatus(); if (status == Status.ERROR || status == Status.COMPLETE || s...
if (status == Status.NEGOTIATING_STREAM) { titleLabel.setText("Negotiating file transfer with " + nickname + ". Please wait...");
if (status == Status.negotiating_stream) { titleLabel.setText(Res.getString("message.negotiation.file.transfer", nickname));
private void updateBar(final OutgoingFileTransfer transfer, String nickname) { FileTransfer.Status status = transfer.getStatus(); if (status == Status.NEGOTIATING_STREAM) { titleLabel.setText("Negotiating file transfer with " + nickname + ". Please wait..."); } else if (status...
else if (status == Status.ERROR) {
else if (status == Status.error) {
private void updateBar(final OutgoingFileTransfer transfer, String nickname) { FileTransfer.Status status = transfer.getStatus(); if (status == Status.NEGOTIATING_STREAM) { titleLabel.setText("Negotiating file transfer with " + nickname + ". Please wait..."); } else if (status...
titleLabel.setText("You were unable to send the file to " + nickname);
titleLabel.setText(Res.getString("message.unable.to.send.file", nickname));
private void updateBar(final OutgoingFileTransfer transfer, String nickname) { FileTransfer.Status status = transfer.getStatus(); if (status == Status.NEGOTIATING_STREAM) { titleLabel.setText("Negotiating file transfer with " + nickname + ". Please wait..."); } else if (status...
else if (status == Status.IN_PROGRESS) { titleLabel.setText("Sending a file to " + nickname);
else if (status == Status.in_progress) { titleLabel.setText(Res.getString("message.sending.file.to", nickname));
private void updateBar(final OutgoingFileTransfer transfer, String nickname) { FileTransfer.Status status = transfer.getStatus(); if (status == Status.NEGOTIATING_STREAM) { titleLabel.setText("Negotiating file transfer with " + nickname + ". Please wait..."); } else if (status...
else if (status == Status.COMPLETE) {
else if (status == Status.complete) {
private void updateBar(final OutgoingFileTransfer transfer, String nickname) { FileTransfer.Status status = transfer.getStatus(); if (status == Status.NEGOTIATING_STREAM) { titleLabel.setText("Negotiating file transfer with " + nickname + ". Please wait..."); } else if (status...
titleLabel.setText("You have sent a file to " + nickname + ".");
titleLabel.setText(Res.getString("message.you.have.sent", nickname));
private void updateBar(final OutgoingFileTransfer transfer, String nickname) { FileTransfer.Status status = transfer.getStatus(); if (status == Status.NEGOTIATING_STREAM) { titleLabel.setText("Negotiating file transfer with " + nickname + ". Please wait..."); } else if (status...
else if (status == Status.CANCLED) {
else if (status == Status.cancelled) {
private void updateBar(final OutgoingFileTransfer transfer, String nickname) { FileTransfer.Status status = transfer.getStatus(); if (status == Status.NEGOTIATING_STREAM) { titleLabel.setText("Negotiating file transfer with " + nickname + ". Please wait..."); } else if (status...
titleLabel.setText("You have cancelled the file transfer.");
titleLabel.setText(Res.getString("message.file.transfer.canceled"));
private void updateBar(final OutgoingFileTransfer transfer, String nickname) { FileTransfer.Status status = transfer.getStatus(); if (status == Status.NEGOTIATING_STREAM) { titleLabel.setText("Negotiating file transfer with " + nickname + ". Please wait..."); } else if (status...
else if (status == Status.REFUSED) {
else if (status == Status.refused) {
private void updateBar(final OutgoingFileTransfer transfer, String nickname) { FileTransfer.Status status = transfer.getStatus(); if (status == Status.NEGOTIATING_STREAM) { titleLabel.setText("Negotiating file transfer with " + nickname + ". Please wait..."); } else if (status...
titleLabel.setText(nickname + " did not accept the file transfer.");
titleLabel.setText(Res.getString("message.file.transfer.rejected", nickname));
private void updateBar(final OutgoingFileTransfer transfer, String nickname) { FileTransfer.Status status = transfer.getStatus(); if (status == Status.NEGOTIATING_STREAM) { titleLabel.setText("Negotiating file transfer with " + nickname + ". Please wait..."); } else if (status...
context = new Context(null);
context = wm.getContext();
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...
private void ensureLocalCapacity(int size) { if (count < 0 || buffer[count] != null) { count++; offset[count] = localPos; length[count] = 0; if (count >= buffer.length) { increaseCapacity(); } } if ((localPos + size) >= local.length) { char[] tmpLocal = new char[local.length * 2 + size];
private void ensureLocalCapacity(int len) { if ((localPos + len) >= local.length) { char[] tmpLocal = new char[local.length * 2 + len];
private void ensureLocalCapacity(int size) { if (count < 0 || buffer[count] != null) { count++; offset[count] = localPos; length[count] = 0; if (count >= buffer.length) { increaseCapacity(); } } if ((localPos + size) >= local.length) { char[] ...
for (int i = 0; i < arg.length; i++) { qw.write(arg[i],1,arg[i].length() - 2); qw.write(' '); qw.write(cary,7,6); } System.out.println("Count: " + qw.count); System.out.println("- - - - Output - - - -"); System.out.println(qw.toString()); qw.reset(); }
for (int l = 0; l < 20; l++) { for (int i = 0; i < arg.length; i++) { qw.write(new String(arg[i])); qw.write(new String(arg[i]),0,arg[i].length()); qw.write(' '); qw.write(cary,7,6); } System.out.println("\ncount: " + qw.count); System.out.println("buffer: " + qw.buffer.length); System.out.println("local: " + qw.local....
public static void main(String arg[]) throws Exception { QueueWriter qw = new QueueWriter(3); char cary[] = "Hello, brave new world".toCharArray(); for (int j = 0; j < 2; j++) { for (int i = 0; i < arg.length; i++) { qw.write(arg[i],1,arg[i].length() - 2); // qw.write(arg...
boolean moderated = wc.getForm ("MODERATED").equals ("true");
boolean moderated = wc.getForm ("MODERATED") != null && wc.getForm("MODERATED").equals ("true");
protected WikiPage createNewPage (WikiSystem wiki, WebContext wc, WikiUser user) throws Exception { // get the page elements from the request String editor = user.getIdentifier(); String text = wc.getForm ("TEXT"); boolean moderated = wc.getForm ("MODERATED").equals ("true"); Stri...
if (jid.indexOf("@") == -1) { jid = jid + "@" + item.getTransport().getServiceName(); String nickname = nicknameField.getText(); String group = (String)groupBox.getSelectedItem(); addEntry(jid, nickname, group);
try { jid = Gateway.getJID(transport.getServiceName(), jid);
private void addEntry() { Transport transport = null; AccountItem item = null; if (publicBox.isSelected()) { item = (AccountItem)accounts.getSelectedItem(); transport = item.getTransport(); } if (transport == null) { String jid = jidField.getText()...
catch (XMPPException e) { Log.error(e); } String nickname = nicknameField.getText(); String group = (String)groupBox.getSelectedItem(); addEntry(jid, nickname, group);
private void addEntry() { Transport transport = null; AccountItem item = null; if (publicBox.isSelected()) { item = (AccountItem)accounts.getSelectedItem(); transport = item.getTransport(); } if (transport == null) { String jid = jidField.getText()...
Log.error("Unable to find status item for status - " + text);
public void showPopup(MouseEvent e) { final JPopupMenu popup = new JPopupMenu(); List custom = CustomMessages.load(); if (custom == null) { custom = new ArrayList(); } // Build menu from StatusList for(final StatusItem statusItem : statusList){ final A...
Log.error("Unable to find status item for status - " + text);
public void actionPerformed(ActionEvent actionEvent) { final String text = statusItem.getText(); final StatusItem si = getStatusItem(text); if (si == null) { // Custom status return; ...
Log.error("Unable to find status item for status - " + text);
public void actionPerformed(ActionEvent actionEvent) { final String text = mainStatusItem.getText(); final StatusItem si = getStatusItem(text); if (si == null) { //...
return start + ((int) (1000000.0 * java.lang.Math.random()) % end);
return start + (int) (end *java.lang.Math.random()/(Integer.MAX_VALUE+1.0));
public static final int random(int start, int end) { return start + ((int) (1000000.0 * java.lang.Math.random()) % end); }
URL groovyJar = new URL("http: systemClassPath.addJarToPath(groovyJar); try { systemClassLoader.loadClass("groovy.lang.GroovyShell"); } catch (ClassNotFoundException e) { fail("Class already exists"); }
public void testAddJarToPath() throws Exception { SystemClassPath systemClassPath = new SystemClassPath(); ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader(); try { systemClassLoader.loadClass("groovy.lang.GroovyShell"); fail("Class already exists"); ...
r = load(query); if (r != null) { _cache.put(query,r);
synchronized(_writeLocks[ query.hashCode() % _writeLocks.length]) {
public Object get(final String query) throws NotFoundException { TimedReference r; try { r = (TimedReference) _cache.get(query); } catch (NullPointerException e) { throw new NotFoundException(this + " is not initialized", e); } Object o = null; if (r != null) { ...
try { _log.debug("cached: " + query + " for " + r.getTimeout()); _tl.scheduleTime( new Runnable() { public void run() { _cache.remove(query); _log.debug("cache expired: " + query); } }, r.getTimeout()); } catch (Exception e) { _log.error("CachingProvider caught an exception", e);
if (o == null) { r = load(query); if (r != null) { _cache.put(query,r); } o = r.get(); try { _log.debug("cached: " + query + " for " + r.getTimeout()); _tl.scheduleTime( new Runnable() { public void run() { _cache.remove(query); _log.debug("cache expired: " + query); } }, r.getTimeout()); } catch (Exception e) { _log.e...
public Object get(final String query) throws NotFoundException { TimedReference r; try { r = (TimedReference) _cache.get(query); } catch (NullPointerException e) { throw new NotFoundException(this + " is not initialized", e); } Object o = null; if (r != null) { ...