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 188470 Details for
Bug 273013
MarkupViewer dependencies should be reduced if possible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch to remove dependency on o.e.ui.ide
Bug_273013.diff (text/plain), 8.12 KB, created by
Torkild Resheim
on 2011-02-07 15:06:05 EST
(
hide
)
Description:
Patch to remove dependency on o.e.ui.ide
Filename:
MIME Type:
Creator:
Torkild Resheim
Created:
2011-02-07 15:06:05 EST
Size:
8.12 KB
patch
obsolete
>diff --git a/org.eclipse.mylyn.wikitext.ui/META-INF/MANIFEST.MF b/org.eclipse.mylyn.wikitext.ui/META-INF/MANIFEST.MF >index 8c26cd6..a76c0a6 100644 >--- a/org.eclipse.mylyn.wikitext.ui/META-INF/MANIFEST.MF >+++ b/org.eclipse.mylyn.wikitext.ui/META-INF/MANIFEST.MF >@@ -11,7 +11,7 @@ Require-Bundle: org.eclipse.mylyn.wikitext.core;bundle-version="[1.4.0,1.5.0)", > org.eclipse.ui.editors, > org.eclipse.ui.workbench.texteditor, > org.eclipse.ui.views, >- org.eclipse.ui.ide;resolution:=optional, >+ org.eclipse.ui.ide, > org.eclipse.core.expressions, > org.eclipse.core.resources, > org.eclipse.help >diff --git a/org.eclipse.mylyn.wikitext.ui/src/org/eclipse/mylyn/internal/wikitext/ui/editor/IDEOpenEditorSupport.java b/org.eclipse.mylyn.wikitext.ui/src/org/eclipse/mylyn/internal/wikitext/ui/editor/IDEOpenEditorSupport.java >deleted file mode 100644 >index 177ddc9..0000000 >--- a/org.eclipse.mylyn.wikitext.ui/src/org/eclipse/mylyn/internal/wikitext/ui/editor/IDEOpenEditorSupport.java >+++ /dev/null >@@ -1,29 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 MARINTEK 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: >- * Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >- >-package org.eclipse.mylyn.internal.wikitext.ui.editor; >- >-import org.eclipse.core.resources.IFile; >-import org.eclipse.ui.IWorkbenchPage; >-import org.eclipse.ui.ide.IDE; >- >-/** >- * Uses IDE features to open a file. >- * >- * @author Torkild U. Resheim >- */ >-public class IDEOpenEditorSupport implements IOpenEditorSupport { >- >- public void openEditor(IWorkbenchPage page, IFile file) throws Exception { >- IDE.openEditor(page, file); >- } >- >-} >diff --git a/org.eclipse.mylyn.wikitext.ui/src/org/eclipse/mylyn/internal/wikitext/ui/editor/IOpenEditorSupport.java b/org.eclipse.mylyn.wikitext.ui/src/org/eclipse/mylyn/internal/wikitext/ui/editor/IOpenEditorSupport.java >deleted file mode 100644 >index 3e40b56..0000000 >--- a/org.eclipse.mylyn.wikitext.ui/src/org/eclipse/mylyn/internal/wikitext/ui/editor/IOpenEditorSupport.java >+++ /dev/null >@@ -1,29 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 MARINTEK 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: >- * Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >- >-package org.eclipse.mylyn.internal.wikitext.ui.editor; >- >-import org.eclipse.core.resources.IFile; >-import org.eclipse.mylyn.internal.wikitext.ui.editor.syntax.MarkupHyperlinkDetector; >-import org.eclipse.ui.IWorkbenchPage; >- >-/** >- * Used to decouple the bundle from org.eclipse.ui.ide. If the latter is not present the {@link NullOpenEditorSupport} >- * will be used instead of the {@link IDEOpenEditorSupport}. >- * >- * @author Torkild U. Resheim >- * @see MarkupHyperlinkDetector >- */ >-public interface IOpenEditorSupport { >- >- public void openEditor(IWorkbenchPage page, IFile file) throws Exception; >- >-} >diff --git a/org.eclipse.mylyn.wikitext.ui/src/org/eclipse/mylyn/internal/wikitext/ui/editor/NullOpenEditorSupport.java b/org.eclipse.mylyn.wikitext.ui/src/org/eclipse/mylyn/internal/wikitext/ui/editor/NullOpenEditorSupport.java >deleted file mode 100644 >index 68e3b90..0000000 >--- a/org.eclipse.mylyn.wikitext.ui/src/org/eclipse/mylyn/internal/wikitext/ui/editor/NullOpenEditorSupport.java >+++ /dev/null >@@ -1,28 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 MARINTEK 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: >- * Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >- >-package org.eclipse.mylyn.internal.wikitext.ui.editor; >- >-import org.eclipse.core.resources.IFile; >-import org.eclipse.ui.IWorkbenchPage; >- >-/** >- * Dummy feature for opening a file when we don't have IDE support. >- * >- * @author Torkild U. Resheim >- */ >-public class NullOpenEditorSupport implements IOpenEditorSupport { >- >- public void openEditor(IWorkbenchPage page, IFile file) { >- // Do nothing. We don't have IDE support. >- } >- >-} >diff --git a/org.eclipse.mylyn.wikitext.ui/src/org/eclipse/mylyn/internal/wikitext/ui/editor/syntax/MarkupHyperlinkDetector.java b/org.eclipse.mylyn.wikitext.ui/src/org/eclipse/mylyn/internal/wikitext/ui/editor/syntax/MarkupHyperlinkDetector.java >index e312312..dad8524 100644 >--- a/org.eclipse.mylyn.wikitext.ui/src/org/eclipse/mylyn/internal/wikitext/ui/editor/syntax/MarkupHyperlinkDetector.java >+++ b/org.eclipse.mylyn.wikitext.ui/src/org/eclipse/mylyn/internal/wikitext/ui/editor/syntax/MarkupHyperlinkDetector.java >@@ -7,7 +7,6 @@ > * > * Contributors: > * David Green - initial API and implementation >- * Torkild U. Resheim - Decouple from o.e.ui.ide, bug 273013 > *******************************************************************************/ > > package org.eclipse.mylyn.internal.wikitext.ui.editor.syntax; >@@ -29,7 +28,6 @@ import org.eclipse.jface.text.Region; > import org.eclipse.jface.text.hyperlink.IHyperlink; > import org.eclipse.jface.text.hyperlink.IHyperlinkDetector; > import org.eclipse.mylyn.internal.wikitext.ui.WikiTextUiPlugin; >-import org.eclipse.mylyn.internal.wikitext.ui.editor.IOpenEditorSupport; > import org.eclipse.mylyn.wikitext.core.parser.Attributes; > import org.eclipse.mylyn.wikitext.core.parser.LinkAttributes; > import org.eclipse.mylyn.wikitext.core.parser.MarkupParser; >@@ -38,7 +36,9 @@ import org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage; > import org.eclipse.osgi.util.NLS; > import org.eclipse.ui.IWorkbenchPage; > import org.eclipse.ui.IWorkbenchWindow; >+import org.eclipse.ui.PartInitException; > import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.ide.IDE; > > /** > * A hyperlink detector that can detect hyperlinks in markup source. >@@ -227,35 +227,15 @@ public class MarkupHyperlinkDetector implements IHyperlinkDetector { > return NLS.bind(Messages.MarkupHyperlinkDetector_openFileInEditor, file.getName()); > } > >- private static IOpenEditorSupport openEditorSupport; >- >- static { >- try { >- openEditorSupport = (IOpenEditorSupport) Class.forName( >- "org.eclipse.mylyn.wikitext.ui.editor.IDEOpenEditorSupport").newInstance(); //$NON-NLS-1$ >- } catch (Exception e) { >- try { >- openEditorSupport = (IOpenEditorSupport) Class.forName( >- "org.eclipse.mylyn.wikitext.ui.editor.NULLOpenEditorSupport").newInstance(); //$NON-NLS-1$ >- } catch (InstantiationException e1) { >- e1.printStackTrace(); >- } catch (IllegalAccessException e1) { >- e1.printStackTrace(); >- } catch (ClassNotFoundException e1) { >- e1.printStackTrace(); >- } >- } >- } >- > public void open() { > IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); > IWorkbenchPage activePage = window.getActivePage(); > try { >- openEditorSupport.openEditor(activePage, file); >- } catch (Exception e) { >+ IDE.openEditor(activePage, file); >+ } catch (PartInitException e) { > WikiTextUiPlugin.getDefault().log(e); >- MessageDialog.openError(window.getShell(), Messages.MarkupHyperlinkDetector_unexpectedError, >- NLS.bind(Messages.MarkupHyperlinkDetector_openException, file.getName(), e.getMessage())); >+ MessageDialog.openError(window.getShell(), Messages.MarkupHyperlinkDetector_unexpectedError, NLS.bind( >+ Messages.MarkupHyperlinkDetector_openException, file.getName(), e.getMessage())); > } > } > }
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 273013
: 188470