Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 95471 Details for
Bug 197991
[IRC] Add hyperlink support for the word 'bug <#>'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch Updated
197991.diff (text/plain), 24.96 KB, created by
Abner Ballardo
on 2008-04-10 00:18:19 EDT
(
hide
)
Description:
Patch Updated
Filename:
MIME Type:
Creator:
Abner Ballardo
Created:
2008-04-10 00:18:19 EDT
Size:
24.96 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ecf.mylyn.ui >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.mylyn.ui/META-INF/MANIFEST.MF,v >retrieving revision 1.1 >diff -u -r1.1 MANIFEST.MF >--- META-INF/MANIFEST.MF 12 Nov 2007 21:58:39 -0000 1.1 >+++ META-INF/MANIFEST.MF 10 Apr 2008 04:11:17 -0000 >@@ -15,6 +15,8 @@ > org.eclipse.mylyn.tasks.ui, > org.eclipse.ecf.presence.ui, > org.eclipse.mylyn.context.core, >- org.eclipse.ui.forms >+ org.eclipse.ui.forms, >+ org.eclipse.ui.workbench.texteditor, >+ org.eclipse.jface.text > Bundle-RequiredExecutionEnvironment: J2SE-1.4 > Eclipse-LazyStart: true >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.mylyn.ui/plugin.properties,v >retrieving revision 1.1 >diff -u -r1.1 plugin.properties >--- plugin.properties 12 Nov 2007 21:58:39 -0000 1.1 >+++ plugin.properties 10 Apr 2008 04:11:17 -0000 >@@ -11,3 +11,5 @@ > > plugin.name = ECF Mylyn Integration > provider.name = Eclipse.org >+ >+BugHyperlinkDetector = Bug >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.mylyn.ui/plugin.xml,v >retrieving revision 1.1 >diff -u -r1.1 plugin.xml >--- plugin.xml 12 Nov 2007 21:58:40 -0000 1.1 >+++ plugin.xml 10 Apr 2008 04:11:17 -0000 >@@ -40,4 +40,14 @@ > </dynamic> > </menuContribution> > </extension> >+ <extension >+ point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors"> >+ <hyperlinkDetector >+ activate="true" >+ class="org.eclipse.ecf.internal.mylyn.ui.hyperlink.BugHyperlinkDetector" >+ id="org.eclipse.ecf.internal.provider.irc.container" >+ name="%BugHyperlinkDetector" >+ targetId="org.eclipse.ecf.presence"> >+ </hyperlinkDetector> >+ </extension> > </plugin> >Index: src/org/eclipse/ecf/internal/mylyn/ui/Activator.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.mylyn.ui/src/org/eclipse/ecf/internal/mylyn/ui/Activator.java,v >retrieving revision 1.1 >diff -u -r1.1 Activator.java >--- src/org/eclipse/ecf/internal/mylyn/ui/Activator.java 12 Nov 2007 21:58:39 -0000 1.1 >+++ src/org/eclipse/ecf/internal/mylyn/ui/Activator.java 10 Apr 2008 04:11:18 -0000 >@@ -34,7 +34,7 @@ > > public class Activator extends AbstractUIPlugin implements IChannelListener, ServiceListener { > >- static final String PLUGIN_ID = "org.eclipse.ecf.mylyn.ui"; //$NON-NLS-1$ >+ public static final String PLUGIN_ID = "org.eclipse.ecf.mylyn.ui"; //$NON-NLS-1$ > > private static Activator plugin; > >Index: src/org/eclipse/ecf/internal/mylyn/ui/hyperlink/BugHyperlinkDetector.java >=================================================================== >RCS file: src/org/eclipse/ecf/internal/mylyn/ui/hyperlink/BugHyperlinkDetector.java >diff -N src/org/eclipse/ecf/internal/mylyn/ui/hyperlink/BugHyperlinkDetector.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ecf/internal/mylyn/ui/hyperlink/BugHyperlinkDetector.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,97 @@ >+/**************************************************************************** >+ * Copyright (c) 2007 Composent, Inc. and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Composent, Inc. - initial API and implementation >+ * Abner Ballardo <modlost@modlost.net> - bug 197991 >+ *****************************************************************************/ >+package org.eclipse.ecf.internal.mylyn.ui.hyperlink; >+ >+import java.util.*; >+import org.eclipse.jface.text.*; >+import org.eclipse.jface.text.hyperlink.IHyperlink; >+import org.eclipse.mylyn.tasks.core.TaskRepository; >+import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; >+ >+public class BugHyperlinkDetector extends org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector { >+ private static final String BUGZILLA_CONNECTOR_KIND = "bugzilla"; //$NON-NLS-1$ >+ public static final String DEFAULT_PREFIX = "bug #"; //$NON-NLS-1$ >+ public static final String DEFAULT_ENDDELIMITERS = " \t\n\r\f<>"; //$NON-NLS-1$ >+ >+ /* >+ * (non-Javadoc) >+ * >+ * @see org.eclipse.jface.text.hyperlink.IHyperlinkDetector#detectHyperlinks(org.eclipse.jface.text.ITextViewer, >+ * org.eclipse.jface.text.IRegion, boolean) >+ */ >+ public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) { >+ if (region == null || textViewer == null) >+ return null; >+ >+ IDocument document = textViewer.getDocument(); >+ if (document == null) >+ return null; >+ >+ int offset = region.getOffset(); >+ >+ IRegion lineInfo; >+ String line; >+ try { >+ lineInfo = document.getLineInformationOfOffset(offset); >+ line = document.get(lineInfo.getOffset(), lineInfo.getLength()); >+ } catch (BadLocationException ex) { >+ return null; >+ } >+ >+ Region detectedRegion = detectRegion(lineInfo, line, offset - lineInfo.getOffset()); >+ >+ if (detectedRegion == null) >+ return null; >+ >+ int detectedOffset = detectedRegion.getOffset() - lineInfo.getOffset(); >+ >+ return createHyperLinksForBug(line.substring(detectedOffset, detectedOffset + detectedRegion.getLength()), detectedRegion); >+ >+ } >+ >+ private Region detectRegion(IRegion lineInfo, String fromLine, int offsetInLine) { >+ int resultLength = 0; >+ >+ int separatorOffset = fromLine.indexOf(DEFAULT_PREFIX); >+ while (separatorOffset >= 0) { >+ StringTokenizer tokenizer = new StringTokenizer(fromLine.substring(separatorOffset + DEFAULT_PREFIX.length()), DEFAULT_ENDDELIMITERS, false); >+ if (!tokenizer.hasMoreTokens()) >+ return null; >+ >+ resultLength = tokenizer.nextToken().length() + DEFAULT_PREFIX.length(); >+ if (offsetInLine >= separatorOffset && offsetInLine <= separatorOffset + resultLength) >+ break; >+ >+ separatorOffset = fromLine.indexOf(DEFAULT_PREFIX, separatorOffset + 1); >+ } >+ >+ if (separatorOffset < 0) >+ return null; >+ >+ return new Region(lineInfo.getOffset() + separatorOffset, resultLength); >+ } >+ >+ private IHyperlink[] createHyperLinksForBug(String bug, Region region) { >+ List allRepositories = TasksUiPlugin.getRepositoryManager().getAllRepositories(); >+ Vector urls = new Vector(); >+ >+ for (Iterator ite = allRepositories.iterator(); ite.hasNext();) { >+ TaskRepository repository = (TaskRepository) ite.next(); >+ >+ if (repository.getConnectorKind().equals(BUGZILLA_CONNECTOR_KIND)) { >+ urls.add(new BugzillaBugHyperlink(repository, bug, region)); >+ } >+ } >+ >+ return (IHyperlink[]) urls.toArray(new IHyperlink[0]); >+ } >+} >Index: src/org/eclipse/ecf/internal/mylyn/ui/hyperlink/BugzillaBugHyperlink.java >=================================================================== >RCS file: src/org/eclipse/ecf/internal/mylyn/ui/hyperlink/BugzillaBugHyperlink.java >diff -N src/org/eclipse/ecf/internal/mylyn/ui/hyperlink/BugzillaBugHyperlink.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ecf/internal/mylyn/ui/hyperlink/BugzillaBugHyperlink.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,70 @@ >+/**************************************************************************** >+ * Copyright (c) 2007 Composent, Inc. and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Composent, Inc. - initial API and implementation >+ * Abner Ballardo <modlost@modlost.net> - bug 197991 >+ *****************************************************************************/ >+package org.eclipse.ecf.internal.mylyn.ui.hyperlink; >+ >+import java.net.URL; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.ecf.internal.mylyn.ui.Activator; >+import org.eclipse.ecf.internal.mylyn.ui.Messages; >+import org.eclipse.jface.text.IRegion; >+import org.eclipse.jface.text.hyperlink.IHyperlink; >+import org.eclipse.mylyn.tasks.core.TaskRepository; >+import org.eclipse.osgi.util.NLS; >+import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.browser.IWebBrowser; >+import org.eclipse.ui.browser.IWorkbenchBrowserSupport; >+ >+public class BugzillaBugHyperlink implements IHyperlink { >+ private static final String CGI_QUERY = "/show_bug.cgi?id="; //$NON-NLS-1$ >+ >+ private IRegion region; >+ >+ private String bug; >+ >+ private TaskRepository repository; >+ >+ public BugzillaBugHyperlink(TaskRepository repository, String bug, IRegion region) { >+ this.repository = repository; >+ this.region = region; >+ this.bug = bug; >+ } >+ >+ public IRegion getHyperlinkRegion() { >+ return this.region; >+ } >+ >+ public String getHyperlinkText() { >+ return NLS.bind(Messages.BugHyperlink_HYPERLINK_LABEL, repository.getRepositoryLabel(), bug); >+ } >+ >+ public String getTypeLabel() { >+ return NLS.bind(Messages.BugHyperlink_HYPERLINK_LABEL, repository.getRepositoryLabel()); >+ } >+ >+ public void open() { >+ IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport(); >+ >+ IWebBrowser browser; >+ try { >+ StringBuffer sb = new StringBuffer(repository.getUrl()); >+ sb.append(CGI_QUERY); >+ sb.append(bug.substring(BugHyperlinkDetector.DEFAULT_PREFIX.length())); >+ >+ URL webUrl = new URL(sb.toString()); >+ browser = browserSupport.createBrowser(IWorkbenchBrowserSupport.AS_EDITOR | IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR, repository.getConnectorKind(), bug, bug); >+ browser.openURL(webUrl); >+ } catch (Exception e) { >+ Activator.getDefault().getLog().log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, Messages.BugHyperlink_CANNOT_OPEN_BROWSER, e)); >+ } >+ } >+} >Index: src/org/eclipse/ecf/internal/mylyn/ui/messages.properties >=================================================================== >RCS file: src/org/eclipse/ecf/internal/mylyn/ui/messages.properties >diff -N src/org/eclipse/ecf/internal/mylyn/ui/messages.properties >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ecf/internal/mylyn/ui/messages.properties 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,18 @@ >+################################################################################ >+# Copyright (c) 2007 Composent, Inc. and others. >+# All rights reserved. This program and the accompanying materials >+# are made available under the terms of the Eclipse Public License v1.0 >+# which accompanies this distribution, and is available at >+# http://www.eclipse.org/legal/epl-v10.html >+# >+# Contributors: >+# Composent, Inc. - initial API and implementation >+# Abner Ballardo <modlost@modlost.net> - bug 197991 >+################################################################################ >+ >+########################## >+# Messages for EN locale # >+########################## >+ >+BugHyperlink_HYPERLINK_LABEL=Open {0} {1} >+BugHyperlink_CANNOT_OPEN_BROWSER=Cannot open browser >Index: src/org/eclipse/ecf/internal/mylyn/ui/Messages.java >=================================================================== >RCS file: src/org/eclipse/ecf/internal/mylyn/ui/Messages.java >diff -N src/org/eclipse/ecf/internal/mylyn/ui/Messages.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ecf/internal/mylyn/ui/Messages.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/**************************************************************************** >+ * Copyright (c) 2007 Composent, Inc. and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Composent, Inc. - initial API and implementation >+ * Abner Ballardo <modlost@modlost.net> - bug 197991 >+ *****************************************************************************/ >+package org.eclipse.ecf.internal.mylyn.ui; >+ >+import org.eclipse.osgi.util.NLS; >+ >+public class Messages { >+ private static final String BUNDLE_NAME = "org.eclipse.ecf.internal.mylyn.ui.messages"; //$NON-NLS-1$ >+ >+ public static String BugHyperlink_CANNOT_OPEN_BROWSER; >+ >+ public static String BugHyperlink_HYPERLINK_LABEL; >+ >+ public static String ChangePasswordDialog_CHANGE_PASSWORD; >+ >+ static { >+ NLS.initializeMessages(BUNDLE_NAME, Messages.class); >+ } >+ >+} >#P org.eclipse.ecf.provider.irc.ui >Index: src/org/eclipse/ecf/internal/irc/ui/hyperlink/IRCChannelHyperlink.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/hyperlink/IRCChannelHyperlink.java,v >retrieving revision 1.2 >diff -u -r1.2 IRCChannelHyperlink.java >--- src/org/eclipse/ecf/internal/irc/ui/hyperlink/IRCChannelHyperlink.java 2 Apr 2008 05:56:27 -0000 1.2 >+++ src/org/eclipse/ecf/internal/irc/ui/hyperlink/IRCChannelHyperlink.java 10 Apr 2008 04:11:19 -0000 >@@ -10,21 +10,19 @@ > ******************************************************************************/ > package org.eclipse.ecf.internal.irc.ui.hyperlink; > >+import org.eclipse.ecf.internal.irc.ui.Messages; > import org.eclipse.ecf.presence.chatroom.IChatRoomManager; > import org.eclipse.ecf.presence.ui.chatroom.ChatRoomManagerView; > import org.eclipse.jface.text.IRegion; > import org.eclipse.jface.text.Region; > import org.eclipse.jface.text.hyperlink.IHyperlink; >+import org.eclipse.osgi.util.NLS; > > public class IRCChannelHyperlink implements IHyperlink { > private final Region region; > > private final String channel; > >- private String typeLabel; >- >- private String hyperlinkText; >- > private final ChatRoomManagerView view; > > public IRCChannelHyperlink(ChatRoomManagerView view, String channel, Region region) { >@@ -38,11 +36,11 @@ > } > > public String getHyperlinkText() { >- return this.hyperlinkText; >+ return NLS.bind(Messages.IRCChannelHyperlink_HYPERLINK_LABEL, channel); > } > > public String getTypeLabel() { >- return this.typeLabel; >+ return NLS.bind(Messages.IRCChannelHyperlink_HYPERLINK_LABEL, channel); > } > > public void open() { >Index: src/org/eclipse/ecf/internal/irc/ui/messages.properties >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/messages.properties,v >retrieving revision 1.5 >diff -u -r1.5 messages.properties >--- src/org/eclipse/ecf/internal/irc/ui/messages.properties 24 Mar 2008 05:45:59 -0000 1.5 >+++ src/org/eclipse/ecf/internal/irc/ui/messages.properties 10 Apr 2008 04:11:19 -0000 >@@ -30,3 +30,5 @@ > IRCConnectWizardPage_CONNECTID_DEFAULT=ecfuser{0}@irc.freenode.net/#eclipse > > IRCConnectWizard_WIZARD_TITLE=New IRC Connection >+ >+IRCChannelHyperlink_HYPERLINK_LABEL=Open {0} channel >\ No newline at end of file >Index: src/org/eclipse/ecf/internal/irc/ui/Messages.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/Messages.java,v >retrieving revision 1.5 >diff -u -r1.5 Messages.java >--- src/org/eclipse/ecf/internal/irc/ui/Messages.java 24 Mar 2008 05:45:59 -0000 1.5 >+++ src/org/eclipse/ecf/internal/irc/ui/Messages.java 10 Apr 2008 04:11:19 -0000 >@@ -35,6 +35,7 @@ > public static String IRCUI_JOIN_COMMAND; > public static String IRCUI_PART_COMMAND; > public static String IRCUI_QUIT_COMMAND; >+ public static String IRCChannelHyperlink_HYPERLINK_LABEL; > > public static String IRCConnectWizard_WIZARD_TITLE; > >#P org.eclipse.ecf.presence.ui >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.presence.ui/plugin.properties,v >retrieving revision 1.8 >diff -u -r1.8 plugin.properties >--- plugin.properties 22 Mar 2008 17:38:49 -0000 1.8 >+++ plugin.properties 10 Apr 2008 04:11:21 -0000 >@@ -44,4 +44,4 @@ > colorDefinition.sentMessagesColor.description = Color of messages sent by local user. > > Chats=Chats >- >+PresenceEditorsTarget=ECF Presence Editors >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.presence.ui/plugin.xml,v >retrieving revision 1.25 >diff -u -r1.25 plugin.xml >--- plugin.xml 22 Mar 2008 17:38:49 -0000 1.25 >+++ plugin.xml 10 Apr 2008 04:11:22 -0000 >@@ -298,4 +298,11 @@ > </colorDefinition> > > </extension> >+ <extension >+ point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectorTargets"> >+ <target >+ id="org.eclipse.ecf.presence" >+ name="%PresenceEditorsTarget"> >+ </target> >+ </extension> > </plugin> >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.presence.ui/META-INF/MANIFEST.MF,v >retrieving revision 1.42 >diff -u -r1.42 MANIFEST.MF >--- META-INF/MANIFEST.MF 23 Feb 2008 04:23:28 -0000 1.42 >+++ META-INF/MANIFEST.MF 10 Apr 2008 04:11:22 -0000 >@@ -11,7 +11,9 @@ > org.eclipse.ecf.presence, > org.eclipse.ecf.ui, > org.eclipse.ui, >- org.eclipse.ui.forms >+ org.eclipse.ui.forms, >+ org.eclipse.jface.text, >+ org.eclipse.ui.workbench.texteditor > Eclipse-LazyStart: true > Export-Package: org.eclipse.ecf.internal.presence.ui;x-internal:=true, > org.eclipse.ecf.internal.presence.ui.dialogs;x-internal:=true, >Index: src/org/eclipse/ecf/internal/presence/ui/messages.properties >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/internal/presence/ui/messages.properties,v >retrieving revision 1.28 >diff -u -r1.28 messages.properties >--- src/org/eclipse/ecf/internal/presence/ui/messages.properties 3 Sep 2007 03:39:06 -0000 1.28 >+++ src/org/eclipse/ecf/internal/presence/ui/messages.properties 10 Apr 2008 04:11:22 -0000 >@@ -145,4 +145,5 @@ > MessageRenderer_DEFAULT_DATETIME_FORMAT=({0}) > > ChatRoomPreferencePage_CHATROOM_SHOW_USER_PRESENCE_TEXT=&Show user entry messages >- >\ No newline at end of file >+ >+ChatRoomViewerConfiguration_WARNING_MULTIHYPERLINK_NOT_AVAILABLE=Multihyperlink not available. Multihyperlinking will be disabled. >\ No newline at end of file >Index: src/org/eclipse/ecf/internal/presence/ui/Messages.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/internal/presence/ui/Messages.java,v >retrieving revision 1.26 >diff -u -r1.26 Messages.java >--- src/org/eclipse/ecf/internal/presence/ui/Messages.java 3 Sep 2007 03:39:06 -0000 1.26 >+++ src/org/eclipse/ecf/internal/presence/ui/Messages.java 10 Apr 2008 04:11:22 -0000 >@@ -17,7 +17,7 @@ > public class Messages extends NLS { > > private static final String BUNDLE_NAME = "org.eclipse.ecf.internal.presence.ui.messages"; //$NON-NLS-1$ >- >+ > public static String ChangePasswordDialog_1; > > public static String ChangePasswordDialog_CHANGE_PASSWORD; >@@ -38,13 +38,13 @@ > public static String ChatRoomManagerView_CLEAR_TEXT; > > public static String ChatRoomManagerView_CLEAR_TOOLTIP; >- >+ > public static String ChatRoomManagerView_PASTE_TEXT; >- >+ > public static String ChatRoomManagerView_PASTE_TOOLTIP; >- >+ > public static String ChatRoomManagerView_CLEAR_CONFIRM_TITLE; >- >+ > public static String ChatRoomManagerView_CLEAR_CONFIRM_MESSAGE; > > public static String ChatRoomManagerView_CLOSE_CHAT_ROOM_MESSAGE; >@@ -68,11 +68,11 @@ > public static String ChatRoomManagerView_DEFAULT_USER; > > public static String ChatRoomManagerView_ENTERED_MESSAGE; >- >+ > public static String ChatRoomManagerView_LEFT_MESSAGE; > > public static String ChatRoomManagerView_JOIN_COMMAND; >- >+ > public static String ChatRoomManagerView_MESSAGE; > > public static String ChatRoomManagerView_NOT_CONNECTED_MESSAGE; >@@ -80,7 +80,7 @@ > public static String ChatRoomManagerView_NOT_CONNECTED_TITLE; > > public static String ChatRoomManagerView_QUIT_COMMAND; >- >+ > public static String ChatRoomManagerView_PART_COMMAND; > > public static String ChatRoomManagerView_SELECT_ALL_TEXT; >@@ -97,6 +97,8 @@ > > public static String ChatRoomManagerView_USERS_IN_CHAT_ROOM; > >+ public static String ChatRoomViewerConfiguration_WARNING_MULTIHYPERLINK_NOT_AVAILABLE; >+ > public static String ChatRoomSelectionDialog_ACCOUNT_COLUMN; > > public static String ChatRoomSelectionDialog_DESCRIPTION_COLUMN; >@@ -201,7 +203,7 @@ > public static String MessagesView_TypingNotification; > public static String MessagesView_Copy; > public static String MessagesView_SelectAll; >- >+ > public static String AddContactDialog_DialogTitle; > public static String AddContactDialog_UserID; > public static String AddContactDialog_Alias; >@@ -220,25 +222,25 @@ > public static String ReceiveAuthorizeRequestDialog_TO_BUDDY_LIST; > > public static String ReceiveAuthorizeRequestDialog_WOULD_LIKE_TO_ADD; >- >+ > public static String RosterWorkbenchAdapterFactory_Mode; > public static String RosterWorkbenchAdapterFactory_Type; > public static String RosterWorkbenchAdapterFactory_Account; > public static String RosterWorkbenchAdapterFactory_Disconnected; > public static String RosterWorkbenchAdapterFactory_GroupLabel; >- >+ > public static String BrowseDialog_title; > public static String BrowseDialog_scanning; > public static String BrowseDialog_message; >- >+ > public static String ToggleOnlineOnlyAction_title; > > public static String MessageRenderer_DEFAULT_DATE_FORMAT; > public static String MessageRenderer_DEFAULT_DATETIME_FORMAT; > public static String MessageRenderer_DEFAULT_TIME_FORMAT; >- >+ > public static String ChatRoomPreferencePage_CHATROOM_SHOW_USER_PRESENCE_TEXT; >- >+ > static { > NLS.initializeMessages(BUNDLE_NAME, Messages.class); > } >Index: src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomViewerConfiguration.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomViewerConfiguration.java,v >retrieving revision 1.1 >diff -u -r1.1 ChatRoomViewerConfiguration.java >--- src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomViewerConfiguration.java 31 Mar 2008 17:25:13 -0000 1.1 >+++ src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomViewerConfiguration.java 10 Apr 2008 04:11:22 -0000 >@@ -1,27 +1,48 @@ > package org.eclipse.ecf.presence.ui.chatroom; > > import java.util.Map; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.ecf.internal.presence.ui.Activator; >+import org.eclipse.ecf.internal.presence.ui.Messages; > import org.eclipse.ecf.presence.chatroom.IChatRoomContainer; > import org.eclipse.jface.preference.IPreferenceStore; >+import org.eclipse.jface.text.hyperlink.IHyperlinkPresenter; >+import org.eclipse.jface.text.hyperlink.MultipleHyperlinkPresenter; > import org.eclipse.jface.text.source.ISourceViewer; > import org.eclipse.ui.editors.text.TextSourceViewerConfiguration; > > public class ChatRoomViewerConfiguration extends TextSourceViewerConfiguration { > >+ private static final String DEFAULT_PRESENCE_TARGET = "org.eclipse.ecf.presence"; //$NON-NLS-1$ >+ > private IChatRoomContainer container; > > private ChatRoomManagerView view; > >+ private IPreferenceStore preferenceStore; >+ > public ChatRoomViewerConfiguration(IPreferenceStore preferenceStore, IChatRoomContainer container, ChatRoomManagerView view) { > super(preferenceStore); >+ this.preferenceStore = preferenceStore; > this.container = container; > this.view = view; > } > > protected Map getHyperlinkDetectorTargets(ISourceViewer sourceViewer) { > Map hyperlinkDetectorTargets = super.getHyperlinkDetectorTargets(sourceViewer); >+ hyperlinkDetectorTargets.put(DEFAULT_PRESENCE_TARGET, null); > hyperlinkDetectorTargets.put(container.getClass().getPackage().getName(), view); > > return hyperlinkDetectorTargets; > } >+ >+ public IHyperlinkPresenter getHyperlinkPresenter(ISourceViewer sourceViewer) { >+ try { >+ return new MultipleHyperlinkPresenter(preferenceStore); >+ } catch (NoClassDefFoundError e) { >+ Activator.getDefault().getLog().log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, Messages.ChatRoomViewerConfiguration_WARNING_MULTIHYPERLINK_NOT_AVAILABLE, e)); >+ } >+ return super.getHyperlinkPresenter(sourceViewer); >+ } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 197991
:
74836
|
74848
|
74849
|
94483
|
95000
|
95001
| 95471