Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2010-07-29 09:53:53 +0000
committerDani Megert2010-07-29 09:53:53 +0000
commit0b73d68f9ffdb613fa6ce966ecff2dbacc1f6291 (patch)
treeeed1ad6504ead9c40c6c9154000868550ba96a52 /org.eclipse.ui.workbench.texteditor
parentbcdf2c98f60eed52999d2614bb7fcfe1e1cf49a6 (diff)
downloadeclipse.platform.text-0b73d68f9ffdb613fa6ce966ecff2dbacc1f6291.tar.gz
eclipse.platform.text-0b73d68f9ffdb613fa6ce966ecff2dbacc1f6291.tar.xz
eclipse.platform.text-0b73d68f9ffdb613fa6ce966ecff2dbacc1f6291.zip
Committed Raksha's patch to fix bug 78522: [navigation] All Ctrl+Click link targets should also be available under one command/action
Diffstat (limited to 'org.eclipse.ui.workbench.texteditor')
-rw-r--r--org.eclipse.ui.workbench.texteditor/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.ui.workbench.texteditor/plugin.properties4
-rw-r--r--org.eclipse.ui.workbench.texteditor/plugin.xml6
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java6
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConstructedEditorMessages.properties7
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java7
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionConstants.java8
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionDefinitionIds.java8
8 files changed, 45 insertions, 3 deletions
diff --git a/org.eclipse.ui.workbench.texteditor/META-INF/MANIFEST.MF b/org.eclipse.ui.workbench.texteditor/META-INF/MANIFEST.MF
index 59f5a96e349..55740bcf144 100644
--- a/org.eclipse.ui.workbench.texteditor/META-INF/MANIFEST.MF
+++ b/org.eclipse.ui.workbench.texteditor/META-INF/MANIFEST.MF
@@ -24,7 +24,7 @@ Require-Bundle:
org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.compare.core;bundle-version="[3.5.0,4.0.0)",
org.eclipse.core.expressions;bundle-version="[3.4.100,4.0.0)",
- org.eclipse.jface.text;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.jface.text;bundle-version="[3.6.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.5.0,4.0.0)"
Bundle-RequiredExecutionEnvironment: J2SE-1.4
Import-Package: com.ibm.icu.text
diff --git a/org.eclipse.ui.workbench.texteditor/plugin.properties b/org.eclipse.ui.workbench.texteditor/plugin.properties
index ef405db7628..10cb9cf73d5 100644
--- a/org.eclipse.ui.workbench.texteditor/plugin.properties
+++ b/org.eclipse.ui.workbench.texteditor/plugin.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation 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
@@ -171,6 +171,8 @@ command.recenter.description = Recenter the window based on the cursor
command.recenter.name = Recenter
command.joinLines.description = Join lines of text
command.joinLines.name = Join Lines
+command.openHyperlink.name= Open Hyperlink
+command.openHyperlink.description= Opens the hyperlink at the caret location or opens a chooser if more than one hyperlink is available
SpellingEngine= Spelling Engine
diff --git a/org.eclipse.ui.workbench.texteditor/plugin.xml b/org.eclipse.ui.workbench.texteditor/plugin.xml
index a6cc1e103c4..8456ef0541f 100644
--- a/org.eclipse.ui.workbench.texteditor/plugin.xml
+++ b/org.eclipse.ui.workbench.texteditor/plugin.xml
@@ -435,6 +435,12 @@
categoryId="org.eclipse.ui.category.textEditor"
id="org.eclipse.ui.edit.text.showInformation">
</command>
+ <command
+ name="%command.openHyperlink.name"
+ description="%command.openHyperlink.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.open.hyperlink">
+ </command>
</extension>
<extension
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
index 459384fa3a7..1f80df0acf1 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
@@ -144,6 +144,7 @@ import org.eclipse.jface.text.TabsToSpacesConverter;
import org.eclipse.jface.text.TextEvent;
import org.eclipse.jface.text.TextSelection;
import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.jface.text.hyperlink.HyperlinkManager;
import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
import org.eclipse.jface.text.information.IInformationProvider;
import org.eclipse.jface.text.information.IInformationProviderExtension2;
@@ -5752,6 +5753,11 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
action.setActionDefinitionId(ITextEditorActionDefinitionIds.BLOCK_SELECTION_MODE);
setAction(ITextEditorActionConstants.BLOCK_SELECTION_MODE, action);
+ action= new TextOperationAction(EditorMessages.getBundleForConstructedKeys(), "Editor.OpenHyperlink.", this, HyperlinkManager.OPEN_HYPERLINK); //$NON-NLS-1$;
+ action.setHelpContextId(IAbstractTextEditorHelpContextIds.OPEN_HYPERLINK_ACTION);
+ action.setActionDefinitionId(ITextEditorActionDefinitionIds.OPEN_HYPERLINK);
+ setAction(ITextEditorActionConstants.OPEN_HYPERLINK, action);
+
PropertyDialogAction openProperties= new PropertyDialogAction(
new IShellProvider() {
public Shell getShell() {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConstructedEditorMessages.properties b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConstructedEditorMessages.properties
index 602c139be60..cab744bc9f8 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConstructedEditorMessages.properties
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConstructedEditorMessages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation 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
@@ -244,3 +244,8 @@ Editor.ToggleBlockSelectionMode.label= Toggle Block Selection Mode
Editor.ToggleBlockSelectionMode.description= Enable block / column selection in the current text editor
Editor.ToggleBlockSelectionMode.image=
Editor.ToggleBlockSelectionMode.tooltip= Toggle Block Selection Mode
+
+Editor.OpenHyperlink.label= Open Hyperlin&k
+Editor.OpenHyperlink.tooltip= Open Hyperlink
+Editor.OpenHyperlink.image=
+Editor.OpenHyperlink.description= Opens the hyperlink at the caret location or opens a chooser if more than one hyperlink is available
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java
index f7638c6784a..57b59d5cc98 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java
@@ -395,4 +395,11 @@ public interface IAbstractTextEditorHelpContextIds {
* @since 3.5
*/
String BLOCK_SELECTION_MODE_ACTION= PREFIX + "block_selection_mode" + ACTION_POSTFIX; //$NON-NLS-1$
+
+ /**
+ * Help context id for the open hyperlink action.
+ * Value: <code>"org.eclipse.ui.open_hyperlink_action_context"</code>
+ * @since 3.7
+ */
+ String OPEN_HYPERLINK_ACTION= PREFIX + "open_hyperlink" + ACTION_POSTFIX; //$NON-NLS-1$
}
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionConstants.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionConstants.java
index b3662778407..e5e5bfde276 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionConstants.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionConstants.java
@@ -688,4 +688,12 @@ public interface ITextEditorActionConstants extends IWorkbenchActionConstants {
* @since 3.6
*/
public static final String SHOW_RULER_ANNOTATION_INFORMATION= "ShowRulerAnnotationInformation"; //$NON-NLS-1$
+
+ /**
+ * Name of the action to open the hyperlink at the caret location or to display a chooser
+ * if more than one hyperlink is available.
+ * Value: <code>"OpenHyperlink"</code>
+ * @since 3.7
+ */
+ public static String OPEN_HYPERLINK= "OpenHyperlink"; //$NON-NLS-1$
}
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionDefinitionIds.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionDefinitionIds.java
index e25d1f37be8..641eebb6fb6 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionDefinitionIds.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionDefinitionIds.java
@@ -593,4 +593,12 @@ public interface ITextEditorActionDefinitionIds extends IWorkbenchActionDefiniti
* @since 3.6
*/
public static final String SHOW_RULER_ANNOTATION_INFORMATION_ID= "org.eclipse.ui.edit.text.showRulerAnnotationInformation"; //$NON-NLS-1$
+
+ /**
+ * Command ID of the command to open the hyperlink at the caret location or to display a chooser
+ * if more than one hyperlink is available.
+ * Value: <code>"org.eclipse.ui.edit.text.open.hyperlink"</code>
+ * @since 3.7
+ */
+ public static final String OPEN_HYPERLINK= "org.eclipse.ui.edit.text.open.hyperlink"; //$NON-NLS-1$
}

Back to the top