Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-05-14 01:48:28 -0400
committerslewis2008-05-14 01:48:28 -0400
commit1792121f81f14c634f5d87be4405bb611112d132 (patch)
tree1b59946e2e0b4deed5e9dfad20ab917a7b56cd76
parente1a1e18d4b3dc3a4904d9c0f3457d94d237d5501 (diff)
downloadorg.eclipse.ecf-1792121f81f14c634f5d87be4405bb611112d132.tar.gz
org.eclipse.ecf-1792121f81f14c634f5d87be4405bb611112d132.tar.xz
org.eclipse.ecf-1792121f81f14c634f5d87be4405bb611112d132.zip
Fix for bug 232006
-rw-r--r--framework/bundles/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomManagerView.java12
-rw-r--r--framework/bundles/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomViewerConfiguration.java3
2 files changed, 7 insertions, 8 deletions
diff --git a/framework/bundles/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomManagerView.java b/framework/bundles/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomManagerView.java
index f8e1c43a8..0b46d81ad 100644
--- a/framework/bundles/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomManagerView.java
+++ b/framework/bundles/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomManagerView.java
@@ -271,18 +271,16 @@ public class ChatRoomManagerView extends ViewPart implements IChatRoomInvitation
}
private StyledText createStyledTextWidget(Composite parent, int styles) {
+ SourceViewer result = null;
try {
- SourceViewer result = new SourceViewer(parent, null, null, true, styles);
- result.configure(new ChatRoomViewerConfiguration(EditorsUI.getPreferenceStore(), container, ChatRoomManagerView.this));
- result.setDocument(new Document());
- return result.getTextWidget();
- } catch (Exception e) {
- Activator.getDefault().getLog().log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, IStatus.WARNING, Messages.ChatRoomManagerView_WARNING_HYPERLINKING_NOT_AVAILABLE, e));
- return new StyledText(parent, styles);
+ result = new SourceViewer(parent, null, null, true, styles);
} catch (NoClassDefFoundError e) {
Activator.getDefault().getLog().log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, IStatus.WARNING, Messages.ChatRoomManagerView_WARNING_HYPERLINKING_NOT_AVAILABLE, e));
return new StyledText(parent, styles);
}
+ result.configure(new ChatRoomViewerConfiguration(EditorsUI.getPreferenceStore(), container, ChatRoomManagerView.this));
+ result.setDocument(new Document());
+ return result.getTextWidget();
}
protected void outputClear() {
diff --git a/framework/bundles/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomViewerConfiguration.java b/framework/bundles/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomViewerConfiguration.java
index 96d9423f1..a03d927da 100644
--- a/framework/bundles/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomViewerConfiguration.java
+++ b/framework/bundles/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomViewerConfiguration.java
@@ -20,7 +20,8 @@ public class ChatRoomViewerConfiguration extends TextSourceViewerConfiguration {
protected Map getHyperlinkDetectorTargets(ISourceViewer sourceViewer) {
Map hyperlinkDetectorTargets = super.getHyperlinkDetectorTargets(sourceViewer);
- hyperlinkDetectorTargets.put(container.getClass().getPackage().getName(), view);
+ if (container != null)
+ hyperlinkDetectorTargets.put(container.getClass().getPackage().getName(), view);
return hyperlinkDetectorTargets;
}

Back to the top