Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Maetzel2003-11-06 09:03:01 +0000
committerKai Maetzel2003-11-06 09:03:01 +0000
commitdd5c35e242fba6655845ee56fcb8628169fd1a6d (patch)
treed4ab4d1c65744b898c26a2deff6769ed306d4887
parent825ff6c29f4434deeb73d96a652ffad4ac6ba001 (diff)
downloadeclipse.platform.text-dd5c35e242fba6655845ee56fcb8628169fd1a6d.tar.gz
eclipse.platform.text-dd5c35e242fba6655845ee56fcb8628169fd1a6d.tar.xz
eclipse.platform.text-dd5c35e242fba6655845ee56fcb8628169fd1a6d.zip
RCP changes
-rw-r--r--org.eclipse.core.filebuffers/.classpath14
-rw-r--r--org.eclipse.core.filebuffers/plugin.xml1
-rw-r--r--org.eclipse.jface.text/.classpath18
-rw-r--r--org.eclipse.text/.classpath10
-rw-r--r--org.eclipse.text/.project2
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java6
-rw-r--r--org.eclipse.ui.editors/.classpath31
-rw-r--r--org.eclipse.ui.editors/.project2
-rw-r--r--org.eclipse.ui.editors/build.properties3
-rw-r--r--org.eclipse.ui.editors/extensions/org/eclipse/ui/internal/SystemSummaryDocumentProvider.java370
-rw-r--r--org.eclipse.ui.editors/extensions/org/eclipse/ui/internal/SystemSummaryEditor.java168
-rw-r--r--org.eclipse.ui.editors/extensions/org/eclipse/ui/internal/SystemSummaryMessages.java64
-rw-r--r--org.eclipse.ui.editors/extensions/org/eclipse/ui/internal/SystemSummaryMessages.properties56
-rw-r--r--org.eclipse.ui.editors/icons/full/ctool16/next_nav.gif (renamed from org.eclipse.ui.workbench.texteditor/icons/full/ctool16/next_nav.gif)bin105 -> 105 bytes
-rw-r--r--org.eclipse.ui.editors/icons/full/ctool16/prev_nav.gif (renamed from org.eclipse.ui.workbench.texteditor/icons/full/ctool16/prev_nav.gif)bin132 -> 132 bytes
-rw-r--r--org.eclipse.ui.editors/icons/full/dtool16/next_nav.gif (renamed from org.eclipse.ui.workbench.texteditor/icons/full/dtool16/next_nav.gif)bin82 -> 82 bytes
-rw-r--r--org.eclipse.ui.editors/icons/full/dtool16/prev_nav.gif (renamed from org.eclipse.ui.workbench.texteditor/icons/full/dtool16/prev_nav.gif)bin82 -> 82 bytes
-rw-r--r--org.eclipse.ui.editors/icons/full/etool16/next_nav.gif (renamed from org.eclipse.ui.workbench.texteditor/icons/full/etool16/next_nav.gif)bin101 -> 101 bytes
-rw-r--r--org.eclipse.ui.editors/icons/full/etool16/prev_nav.gif (renamed from org.eclipse.ui.workbench.texteditor/icons/full/etool16/prev_nav.gif)bin102 -> 102 bytes
-rw-r--r--org.eclipse.ui.editors/plugin.properties53
-rw-r--r--org.eclipse.ui.editors/plugin.xml446
-rw-r--r--org.eclipse.ui.editors/schema/documentProviders.exsd147
-rw-r--r--org.eclipse.ui.editors/schema/markerAnnotationSpecification.exsd (renamed from org.eclipse.ui.workbench.texteditor/schema/markerAnnotationSpecification.exsd)0
-rw-r--r--org.eclipse.ui.editors/schema/markerUpdaters.exsd142
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileDocumentProvider.java60
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/ITextEditorHelpContextIds.java17
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/StorageDocumentProvider.java9
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java68
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditorActionContributor.java7
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextFileDocumentProvider.java5
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/WorkspaceOperationRunner.java62
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/EditorsPlugin.java23
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/NextPreviousPulldownActionDelegate.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/NextPreviousPulldownActionDelegate.java)4
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/NextPulldownActionDelegate.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/NextPulldownActionDelegate.java)2
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/PreviousPulldownActionDelegate.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/PreviousPulldownActionDelegate.java)2
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/SharedTextColors.java)2
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractMarkerAnnotationModel.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractMarkerAnnotationModel.java)10
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AddMarkerAction.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AddMarkerAction.java)0
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/BasicMarkerUpdater.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicMarkerUpdater.java)0
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/BookmarkRulerAction.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BookmarkRulerAction.java)2
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DefaultAnnotation.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/DefaultAnnotation.java)5
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DefaultMarkerAnnotationAccess.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/DefaultMarkerAnnotationAccess.java)4
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DocumentProviderRegistry.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/DocumentProviderRegistry.java)6
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ExtendedTextEditor.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ExtendedTextEditor.java)179
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ExtendedTextEditorPreferenceConstants.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ExtendedTextEditorPreferenceConstants.java)0
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/IMarkerUpdater.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IMarkerUpdater.java)0
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerAnnotation.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerAnnotation.java)11
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerAnnotationPreferences.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerAnnotationPreferences.java)4
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerRulerAction.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerRulerAction.java)6
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerRulerInfoAction.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerRulerInfoAction.java)0
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerUpdater.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerUpdater.java)0
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerUtilities.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerUtilities.java)0
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ResourceMarkerAnnotationModel.java (renamed from org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ResourceMarkerAnnotationModel.java)0
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TextEditorMessages.properties28
-rw-r--r--org.eclipse.ui.examples.javaeditor/.classpath25
-rw-r--r--org.eclipse.ui.examples.javaeditor/.project69
-rw-r--r--org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditor.java4
-rw-r--r--org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaDoubleClickSelector.java5
-rw-r--r--org.eclipse.ui.examples.javaeditor/plugin.xml89
-rw-r--r--org.eclipse.ui.workbench.texteditor/.classpath19
-rw-r--r--org.eclipse.ui.workbench.texteditor/.project3
-rw-r--r--org.eclipse.ui.workbench.texteditor/plugin.properties140
-rw-r--r--org.eclipse.ui.workbench.texteditor/plugin.xml1374
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/GotoLastEditPositionAction.java102
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/TextEditorPlugin.java35
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/quickdiff/DocumentLineDiffer.java3
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractDocumentProvider.java172
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java310
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicTextEditorActionContributor.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties49
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionConstants.java118
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/StatusTextEditor.java20
73 files changed, 2761 insertions, 1829 deletions
diff --git a/org.eclipse.core.filebuffers/.classpath b/org.eclipse.core.filebuffers/.classpath
index 0b778fad9..1f3028f0b 100644
--- a/org.eclipse.core.filebuffers/.classpath
+++ b/org.eclipse.core.filebuffers/.classpath
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="src" path="/org.eclipse.text"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="/org.eclipse.core.resources"/>
+ <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
+ <classpathentry kind="src" path="/org.eclipse.text"/>
+ <classpathentry kind="src" path="/org.eclipse.core.boot"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.core.filebuffers/plugin.xml b/org.eclipse.core.filebuffers/plugin.xml
index 7e5101e63..a96f02845 100644
--- a/org.eclipse.core.filebuffers/plugin.xml
+++ b/org.eclipse.core.filebuffers/plugin.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
<plugin
id="org.eclipse.core.filebuffers"
name="%pluginName"
diff --git a/org.eclipse.jface.text/.classpath b/org.eclipse.jface.text/.classpath
index 4a12f97e8..87e31ac3f 100644
--- a/org.eclipse.jface.text/.classpath
+++ b/org.eclipse.jface.text/.classpath
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="src" path="projection"/>
- <classpathentry exported="true" kind="src" path="/org.eclipse.text"/>
- <classpathentry kind="src" path="/org.eclipse.swt"/>
- <classpathentry kind="src" path="/org.eclipse.jface"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="projection"/>
+ <classpathentry exported="true" kind="src" path="/org.eclipse.text"/>
+ <classpathentry kind="src" path="/org.eclipse.swt"/>
+ <classpathentry kind="src" path="/org.eclipse.jface"/>
+ <classpathentry kind="src" path="/org.eclipse.core.boot"/>
+ <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.text/.classpath b/org.eclipse.text/.classpath
index 529e141e7..8361854fe 100644
--- a/org.eclipse.text/.classpath
+++ b/org.eclipse.text/.classpath
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="projection"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="projection"/>
+ <classpathentry kind="src" path="/org.eclipse.core.boot"/>
+ <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.text/.project b/org.eclipse.text/.project
index 1481146e9..fabed5564 100644
--- a/org.eclipse.text/.project
+++ b/org.eclipse.text/.project
@@ -3,6 +3,8 @@
<name>org.eclipse.text</name>
<comment></comment>
<projects>
+ <project>org.eclipse.core.boot</project>
+ <project>org.eclipse.core.runtime</project>
</projects>
<buildSpec>
<buildCommand>
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java b/org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java
index 8aeb25ea6..1e426e73f 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java
@@ -43,7 +43,7 @@ import java.util.regex.PatternSyntaxException;
public abstract class AbstractDocument implements IDocument, IDocumentExtension, IDocumentExtension2, IDocumentExtension3, IRepairableDocument {
/**
- * Inner class to bundle a registered post notifcation replace operation together with its
+ * Inner class to bundle a registered post notification replace operation together with its
* owner.
*
* @since 2.0
@@ -1051,7 +1051,7 @@ public abstract class AbstractDocument implements IDocument, IDocumentExtension,
}
/**
- * Flushs all registered post notification changes.
+ * Flushes all registered post notification changes.
*
* @since 2.0
*/
@@ -1163,7 +1163,7 @@ public abstract class AbstractDocument implements IDocument, IDocumentExtension,
}
/**
- * Resumes the document listern notification by sending out the remembered
+ * Resumes the document listener notification by sending out the remembered
* partition changed and document event.
*
* @since 2.1
diff --git a/org.eclipse.ui.editors/.classpath b/org.eclipse.ui.editors/.classpath
index 144b19a40..7041457e7 100644
--- a/org.eclipse.ui.editors/.classpath
+++ b/org.eclipse.ui.editors/.classpath
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="src" path="extensions"/>
- <classpathentry kind="src" path="/org.eclipse.text"/>
- <classpathentry kind="src" path="/org.eclipse.jface"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.eclipse.update.core"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="src" path="/org.eclipse.jface.text"/>
- <classpathentry kind="src" path="/org.eclipse.ui.workbench"/>
- <classpathentry kind="src" path="/org.eclipse.ui.views"/>
- <classpathentry kind="src" path="/org.eclipse.ui.workbench.texteditor"/>
- <classpathentry kind="src" path="/org.eclipse.core.filebuffers"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="/org.eclipse.text"/>
+ <classpathentry kind="src" path="/org.eclipse.ui.views"/>
+ <classpathentry kind="src" path="/org.eclipse.ui.workbench"/>
+ <classpathentry kind="src" path="/org.eclipse.ui.win32"/>
+ <classpathentry kind="src" path="/org.eclipse.ui.workbench.texteditor"/>
+ <classpathentry kind="src" path="/org.eclipse.jface"/>
+ <classpathentry kind="src" path="/org.eclipse.jface.text"/>
+ <classpathentry kind="src" path="/org.eclipse.core.resources"/>
+ <classpathentry kind="src" path="/org.eclipse.update.core"/>
+ <classpathentry kind="src" path="/org.eclipse.core.filebuffers"/>
+ <classpathentry kind="src" path="/org.eclipse.ui.ide"/>
+ <classpathentry kind="src" path="/org.eclipse.core.boot"/>
+ <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.ui.editors/.project b/org.eclipse.ui.editors/.project
index 2bd93caa2..62f160ee6 100644
--- a/org.eclipse.ui.editors/.project
+++ b/org.eclipse.ui.editors/.project
@@ -10,7 +10,9 @@
<project>org.eclipse.jface</project>
<project>org.eclipse.jface.text</project>
<project>org.eclipse.text</project>
+ <project>org.eclipse.ui.ide</project>
<project>org.eclipse.ui.views</project>
+ <project>org.eclipse.ui.win32</project>
<project>org.eclipse.ui.workbench</project>
<project>org.eclipse.ui.workbench.texteditor</project>
<project>org.eclipse.update.core</project>
diff --git a/org.eclipse.ui.editors/build.properties b/org.eclipse.ui.editors/build.properties
index 77d509f20..86da97cdd 100644
--- a/org.eclipse.ui.editors/build.properties
+++ b/org.eclipse.ui.editors/build.properties
@@ -1,5 +1,4 @@
-source.editors.jar = src/,\
- extensions/
+source.editors.jar = src/
bin.includes = *.jar,\
plugin.xml,\
plugin.properties,\
diff --git a/org.eclipse.ui.editors/extensions/org/eclipse/ui/internal/SystemSummaryDocumentProvider.java b/org.eclipse.ui.editors/extensions/org/eclipse/ui/internal/SystemSummaryDocumentProvider.java
deleted file mode 100644
index 140b57398..000000000
--- a/org.eclipse.ui.editors/extensions/org/eclipse/ui/internal/SystemSummaryDocumentProvider.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ui.internal;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.eclipse.core.boot.BootLoader;
-import org.eclipse.core.boot.IPlatformConfiguration;
-import org.eclipse.core.boot.IPlatformConfiguration.IFeatureEntry;
-import org.eclipse.core.internal.plugins.PluginDescriptor;
-import org.eclipse.core.internal.runtime.InternalPlatform;
-import org.eclipse.core.internal.runtime.PreferenceExporter;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.IPluginRegistry;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.model.PluginFragmentModel;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.source.IAnnotationModel;
-import org.eclipse.ui.texteditor.AbstractDocumentProvider;
-import org.eclipse.update.configuration.IActivity;
-import org.eclipse.update.configuration.IInstallConfiguration;
-import org.eclipse.update.configuration.ILocalSite;
-import org.eclipse.update.core.SiteManager;
-
-/**
- * The <code>SystemSummaryDocumentProvider</code> creates diagnostic
- * information about the Eclipse instance in which it is running.
- */
-class SystemSummaryDocumentProvider extends AbstractDocumentProvider {
- /**
- * @see AbstractDocumentProvider#isDeleted(Object)
- */
- public boolean isDeleted(Object element) {
- return false;
- }
-
- /**
- * @see AbstractDocumentProvider#getSynchronizationStamp(Object)
- */
- public long getSynchronizationStamp(Object element) {
- return 0;
- }
-
- /**
- * @see AbstractDocumentProvider#getModificationStamp(Object)
- */
- public long getModificationStamp(Object element) {
- return 0;
- }
-
- /**
- * @see AbstractDocumentProvider#doSaveDocument(IProgressMonitor, Object, IDocument, boolean)
- */
- protected void doSaveDocument(
- IProgressMonitor arg0,
- Object arg1,
- IDocument arg2,
- boolean arg3)
- throws CoreException {
- }
-
- /**
- * @see AbstractDocumentProvider#createDocument(Object)
- */
- protected IDocument createDocument(Object element) throws CoreException {
- Document doc= new Document();
- doc.set(createDiagnostics());
- return doc;
- }
-
- /**
- * @see AbstractDocumentProvider#createAnnotationModel(Object)
- */
- protected IAnnotationModel createAnnotationModel(Object element)
- throws CoreException {
- return null;
- }
-
- /*
- * Returns a <code>String</code> of diagnostics information.
- */
- private String createDiagnostics() {
- StringWriter out = new StringWriter();
- PrintWriter writer = new PrintWriter(out);
- appendTimestamp(writer);
- appendProperties(writer);
- appendFeatures(writer);
- appendRegistry(writer);
- appendUserPreferences(writer);
- appendUpdateManagerLog(writer);
- appendLog(writer);
- writer.close();
- return out.toString();
- }
-
- /*
- * Appends a timestamp.
- */
- private void appendTimestamp(PrintWriter writer) {
- writer.println(SystemSummaryMessages.getFormattedString("SystemSummary.timeStamp", new Date())); //$NON-NLS-1$
- }
-
- /*
- * Appends the <code>System</code> properties.
- */
- private void appendProperties(PrintWriter writer) {
- writer.println();
- writer.println(SystemSummaryMessages.getString("SystemSummary.systemProperties")); //$NON-NLS-1$
- Properties properties= System.getProperties();
- SortedSet set= new TreeSet(new Comparator() {
- public int compare(Object o1, Object o2) {
- String s1= (String)o1;
- String s2= (String)o2;
- return s1.compareTo(s2);
- }
- });
- set.addAll(properties.keySet());
- Iterator i= set.iterator();
- while(i.hasNext()) {
- Object key= i.next();
- writer.print(key);
- writer.print('=');
- writer.println(properties.get(key));
- }
- }
-
- /*
- * Appends the installed, configured features.
- */
- private void appendFeatures(PrintWriter writer) {
- writer.println();
- writer.println(SystemSummaryMessages.getString("SystemSummary.features")); //$NON-NLS-1$
-
- IPlatformConfiguration platformConfiguration = BootLoader.getCurrentPlatformConfiguration();
- IPlatformConfiguration.IFeatureEntry[] featuresArray = platformConfiguration.getConfiguredFeatureEntries();
-
- Arrays.sort(featuresArray, (new Comparator() {
- public int compare(Object o1, Object o2) {
- String s1= ((IFeatureEntry)o1).getFeatureIdentifier();
- String s2= ((IFeatureEntry)o2).getFeatureIdentifier();
- return s1.compareTo(s2);
- }
- }));
-
- IPluginRegistry pluginRegistry = Platform.getPluginRegistry();
- for (int i = 0; i < featuresArray.length; i++) {
- IFeatureEntry info = featuresArray[i];
- String pluginID = info.getFeaturePluginIdentifier();
- if (pluginID != null) {
- IPluginDescriptor descriptor= pluginRegistry.getPluginDescriptor(pluginID);
- pluginID = descriptor.getLabel();
- if ("".equals(pluginID)) { //$NON-NLS-1$
- pluginID = SystemSummaryMessages.getString("SystemSummary.notSpecified"); //$NON-NLS-1$
- }
- } else {
- pluginID = SystemSummaryMessages.getString("SystemSummary.notSpecified"); //$NON-NLS-1$
- }
-
- String[] args= new String[] {info.getFeatureIdentifier(), info.getFeatureVersion(), pluginID};
- writer.println(SystemSummaryMessages.getFormattedString("SystemSummary.featureVersion", args)); //$NON-NLS-1$
- }
- }
-
- /*
- * Appends the contents of the Plugin Registry.
- */
- private void appendRegistry(PrintWriter writer) {
- writer.println();
- writer.println(SystemSummaryMessages.getString("SystemSummary.pluginRegistry")); //$NON-NLS-1$
- IPluginDescriptor[] descriptors= Platform.getPluginRegistry().getPluginDescriptors();
- SortedSet set= new TreeSet(new Comparator() {
- public int compare(Object o1, Object o2) {
- String s1= ((IPluginDescriptor)o1).getUniqueIdentifier();
- String s2= ((IPluginDescriptor)o2).getUniqueIdentifier();
- return s1.compareTo(s2);
- }
- });
- for(int i= 0, length= descriptors.length; i < length; i++) {
- set.add(descriptors[i]);
- }
- Iterator i= set.iterator();
- while(i.hasNext()) {
- PluginDescriptor descriptor= (PluginDescriptor)i.next();
- String[] args= new String[] {descriptor.getUniqueIdentifier(), descriptor.getVersionIdentifier().toString(), descriptor.getLabel()};
- writer.println(SystemSummaryMessages.getFormattedString("SystemSummary.descriptorIdVersion", args)); //$NON-NLS-1$
- PluginFragmentModel[] fragments= descriptor.getFragments();
- if (fragments != null) {
- for(int j= 0, length= fragments.length; j < length; j++) {
- PluginFragmentModel fragment= fragments[j];
- writer.print('\t');
- args= new String[] {fragment.getId(), fragment.getVersion(), fragment.getName()};
- writer.println(SystemSummaryMessages.getFormattedString("SystemSummary.fragmentIdVersion", args)); //$NON-NLS-1$
- }
- }
- }
- }
-
- /*
- * Appends the preferences
- */
- private void appendUserPreferences(PrintWriter writer) {
- String tmpFile = ".tmpPrefFile"; //$NON-NLS-1$
- IPath path = new Path(InternalPlatform.getMetaArea().getLocation().append(tmpFile).toOSString());
- File file = path.toFile();
- file.delete();
-
- try {
- PreferenceExporter.exportPreferences(path);
- } catch (CoreException e) {
- writer.println("Error exporting user preferences " + e.toString()); //$NON-NLS-1$
- }
- writer.println();
- writer.println(SystemSummaryMessages.getString("SystemSummary.userPreferences")); //$NON-NLS-1$
-
- BufferedReader reader = null;
- try {
- FileInputStream in = new FileInputStream(file);
- reader = new BufferedReader(new InputStreamReader(in, "8859_1")); //$NON-NLS-1$
- char[] chars= new char[8192];
- int read= reader.read(chars);
- while (read > 0) {
- writer.write(chars, 0, read);
- read= reader.read(chars);
- }
- reader.close();
- reader= null;
- } catch (IOException e) {
- writer.println("Error reading user preference file " + e.toString()) ;//$NON-NLS-1$
- }
-
- if (reader != null) {
- try {
- reader.close();
- } catch (IOException e) {
- writer.println("Error closing user preference file " + e.toString()); //$NON-NLS-1$
- }
- }
- file.delete();
- }
-
- /*
- * Appends the contents of the Plugin Registry.
- */
- private void appendUpdateManagerLog(PrintWriter writer) {
- writer.println();
- writer.println(SystemSummaryMessages.getString("SystemSummary.updateManagerLog")); //$NON-NLS-1$
- ILocalSite site;
- try {
- site = SiteManager.getLocalSite();
- } catch (CoreException e) {
- e.printStackTrace(writer);
- return;
- }
- IInstallConfiguration[] configurations = site.getConfigurationHistory();
- for (int i = 0; i < configurations.length; i++) {
- writer.println();
- if (i>0)
- writer.println("----------------------------------------------------"); //$NON-NLS-1$
-
- writer.println(SystemSummaryMessages.getFormattedString("SystemSummary.configuration", configurations[i].getLabel())); //$NON-NLS-1$
- writer.println(SystemSummaryMessages.getFormattedString("SystemSummary.isCurrentConfiguration", "" + configurations[i].isCurrent())); //$NON-NLS-1$ //$NON-NLS-2$
- IActivity[] activities = configurations[i].getActivities();
- for (int j = 0; j < activities.length; j++) {
- writer.println();
- writer.println(SystemSummaryMessages.getFormattedString("SystemSummary.date", activities[j].getDate())); //$NON-NLS-1$
- writer.println(SystemSummaryMessages.getFormattedString("SystemSummary.target", activities[j].getLabel())); //$NON-NLS-1$
- writer.println(SystemSummaryMessages.getFormattedString("SystemSummary.action", getActionLabel(activities[j]))); //$NON-NLS-1$
- writer.println(SystemSummaryMessages.getFormattedString("SystemSummary.status", getStatusLabel(activities[j]))); //$NON-NLS-1$
- }
- }
- }
-
- /*
- * Appends the contents of the .log file
- */
- private void appendLog(PrintWriter writer) {
- File log= new File(InternalPlatform.getMetaArea().getLogLocation().toOSString());
- if (log.exists()) {
- writer.println();
- writer.println(SystemSummaryMessages.getString("SystemSummary.errorLog")); //$NON-NLS-1$
-
- BufferedReader reader = null;
- try {
- FileInputStream in = new FileInputStream(log);
- reader = new BufferedReader(new InputStreamReader(in, "UTF-8")); //$NON-NLS-1$
- char[] chars= new char[8192];
- int read= reader.read(chars);
- while (read > 0) {
- writer.write(chars, 0, read);
- read= reader.read(chars);
- }
- reader.close();
- reader= null;
- } catch (IOException e) {
- writer.println("Error reading .log file"); //$NON-NLS-1$
- }
- if (reader != null) {
- try {
- reader.close();
- } catch (IOException e) {
- writer.println("Error reading .log file"); //$NON-NLS-1$
- }
- }
- }
- }
-
- private String getActionLabel(IActivity activity) {
- int action = activity.getAction();
- switch (action) {
- case IActivity.ACTION_CONFIGURE:
- return SystemSummaryMessages.getString("SystemSummary.activity.enabled"); //$NON-NLS-1$
- case IActivity.ACTION_FEATURE_INSTALL:
- return SystemSummaryMessages.getString("SystemSummary.activity.featureInstalled"); //$NON-NLS-1$
- case IActivity.ACTION_FEATURE_REMOVE:
- return SystemSummaryMessages.getString("SystemSummary.activity.featureRemoved"); //$NON-NLS-1$
- case IActivity.ACTION_SITE_INSTALL:
- return SystemSummaryMessages.getString("SystemSummary.activity.siteInstalled"); //$NON-NLS-1$
- case IActivity.ACTION_SITE_REMOVE:
- return SystemSummaryMessages.getString("SystemSummary.activity.siteRemoved"); //$NON-NLS-1$
- case IActivity.ACTION_UNCONFIGURE:
- return SystemSummaryMessages.getString("SystemSummary.activity.disabled"); //$NON-NLS-1$
- case IActivity.ACTION_REVERT:
- return SystemSummaryMessages.getString("SystemSummary.activity.revert"); //$NON-NLS-1$
- case IActivity.ACTION_RECONCILIATION:
- return SystemSummaryMessages.getString("SystemSummary.activity.reconcile"); //$NON-NLS-1$
- case IActivity.ACTION_ADD_PRESERVED:
- return SystemSummaryMessages.getString("SystemSummary.activity.preserved"); //$NON-NLS-1$
- default:
- return SystemSummaryMessages.getString("SystemSummary.activity.unknown"); //$NON-NLS-1$
- }
- }
-
- private String getStatusLabel(IActivity activity) {
- switch (activity.getStatus()) {
- case IActivity.STATUS_OK:
- return SystemSummaryMessages.getString("SystemSummary.activity.status.success"); //$NON-NLS-1$
- case IActivity.STATUS_NOK:
- return SystemSummaryMessages.getString("SystemSummary.activity.status.failure"); //$NON-NLS-1$
- }
- return SystemSummaryMessages.getString("SystemSummary.activity.status.unknown"); //$NON-NLS-1$
- }
-}
-
diff --git a/org.eclipse.ui.editors/extensions/org/eclipse/ui/internal/SystemSummaryEditor.java b/org.eclipse.ui.editors/extensions/org/eclipse/ui/internal/SystemSummaryEditor.java
deleted file mode 100644
index fdbd937ab..000000000
--- a/org.eclipse.ui.editors/extensions/org/eclipse/ui/internal/SystemSummaryEditor.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal;
-
-
-import java.io.BufferedWriter;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.AbstractTextEditor;
-import org.eclipse.ui.texteditor.ITextEditorActionConstants;
-
-/**
- * The <code>SystemSummaryEditor</code> displays diagnostics information
- * about the Eclipse platform in which it is running.
- */
-public class SystemSummaryEditor extends AbstractTextEditor {
- /*
- * The Editor ID
- */
- static final String ID= WorkbenchPlugin.getDefault().getDescriptor().getUniqueIdentifier() + ".SystemSummaryEditor"; //$NON-NLS-1$
-
- /*
- * The name of the dialog setting property used to store
- * the last file the user selected to write to.
- */
- public static final String LAST_FILE="last_file"; //$NON-NLS-1$
-
- /*
- * The string with which all other defined ids are prefixed to construct help context ids.
- * Value: <code>"org.eclipse.ui."</code>
- */
- private static final String PREFIX= PlatformUI.PLUGIN_ID + "."; //$NON-NLS-1$
-
- /*
- * Id for the system summary editor.
- * Default value: <code>"system_summary_editor_context"</code>.
- */
- private static final String SYSTEM_SUMMARY_TEXT_EDITOR= PREFIX + "system_summary_editor_context"; //$NON-NLS-1$
-
- /**
- * Creates a new text editor.
- */
- public SystemSummaryEditor() {
- super();
- setHelpContextId(SYSTEM_SUMMARY_TEXT_EDITOR);
- setDocumentProvider(new SystemSummaryDocumentProvider());
- }
-
- /**
- * Allow save so that "save as" is enabled.
- *
- * @see AbstractTextEditor#isSaveAsAllowed()
- */
- public boolean isSaveAsAllowed() {
- return true;
- }
-
- /**
- * Disallow editing.
- *
- * @see AbstractTextEditor#isEditable()
- */
- public boolean isEditable() {
- return false;
- }
-
- /**
- * Saves the contents of the editor to a file system file.
- *
- * @see AbstractTextEditor#performSaveAs(IProgressMonitor)
- */
- protected void performSaveAs(IProgressMonitor progressMonitor) {
- String filename= getFilename();
- if (filename == null)
- return;
- String contents= getDocumentProvider().getDocument(getEditorInput()).get();
-
- Writer writer = null;
- try {
- writer =
- new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filename, false), "UTF-8"));//$NON-NLS-1$
- writer.write(contents);
- writer.close();
- writer = null;
- } catch (IOException ioe) {
- MessageDialog.openError(
- getSite().getShell(),
- SystemSummaryMessages.getString("SystemSummary.saveErrorTitle"), //$NON-NLS-1$
- SystemSummaryMessages.getFormattedString("SystemSummary.saveErrorMessage", new Object[]{filename, ioe.getMessage() == null ? "" : ioe.getMessage()})); //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (writer != null) {
- try {
- writer.close();
- } catch (IOException e) {
- // silent
- }
- }
-
- }
-
- /*
- * Prompts the user to select a file
- */
- private String getFilename() {
- String lastUsedPath= getDialogSettings().get(LAST_FILE);
- if (lastUsedPath == null) {
- lastUsedPath= ""; //$NON-NLS-1$
- }
- FileDialog dialog= new FileDialog(getEditorSite().getShell(), SWT.SINGLE);
- dialog.setText(SystemSummaryMessages.getString("SystemSummary.dialogTitle")); //$NON-NLS-1$
- dialog.setFilterPath(lastUsedPath);
- String filename= dialog.open();
- if (filename != null)
- getDialogSettings().put(LAST_FILE, filename);
- return filename;
- }
-
- /*
- * Answers the dialog settings for the DiagnosticsPrinterPlugin plugin
- */
- private IDialogSettings getDialogSettings() {
- return WorkbenchPlugin.getDefault().getDialogSettings();
- }
-
- /**
- * Override the default implementation to only show
- * copy, select all, print, find and goto line.
- *
- * @see AbstractTextEditor#editorContextMenuAboutToShow(IMenuManager)
- */
- protected void editorContextMenuAboutToShow(IMenuManager menu) {
- menu.add(new Separator(ITextEditorActionConstants.GROUP_COPY));
- addAction(menu, ITextEditorActionConstants.COPY);
- addAction(menu, ITextEditorActionConstants.SELECT_ALL);
-
- menu.add(new Separator(ITextEditorActionConstants.GROUP_PRINT));
- addAction(menu, ITextEditorActionConstants.PRINT);
-
- menu.add(new Separator(ITextEditorActionConstants.GROUP_FIND));
- addAction(menu, ITextEditorActionConstants.FIND);
- addAction(menu, ITextEditorActionConstants.GOTO_LINE);
-
- menu.add(new Separator(ITextEditorActionConstants.MB_ADDITIONS));
- }
-
-
-
-
-}
diff --git a/org.eclipse.ui.editors/extensions/org/eclipse/ui/internal/SystemSummaryMessages.java b/org.eclipse.ui.editors/extensions/org/eclipse/ui/internal/SystemSummaryMessages.java
deleted file mode 100644
index 2d16be2db..000000000
--- a/org.eclipse.ui.editors/extensions/org/eclipse/ui/internal/SystemSummaryMessages.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class SystemSummaryMessages {
-
- private static final String RESOURCE_BUNDLE= SystemSummaryMessages.class.getName();
-
- private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
-
- private SystemSummaryMessages() {
- }
-
- public static String getString(String key) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
- }
- /**
- * Gets a string from the resource bundle and formats it with the argument
- *
- * @param key the string used to get the bundle value, must not be null
- */
- public static String getFormattedString(String key, Object[] args) {
- String format= null;
- try {
- format= fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
- return MessageFormat.format(format, args);
- }
-
- /**
- * Gets a string from the resource bundle and formats it with the argument
- *
- * @param key the string used to get the bundle value, must not be null
- */
- public static String getFormattedString(String key, Object arg) {
- String format= null;
- try {
- format= fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
- if (arg == null)
- arg= ""; //$NON-NLS-1$
- return MessageFormat.format(format, new Object[] { arg });
- }
-}
diff --git a/org.eclipse.ui.editors/extensions/org/eclipse/ui/internal/SystemSummaryMessages.properties b/org.eclipse.ui.editors/extensions/org/eclipse/ui/internal/SystemSummaryMessages.properties
deleted file mode 100644
index df5f50453..000000000
--- a/org.eclipse.ui.editors/extensions/org/eclipse/ui/internal/SystemSummaryMessages.properties
+++ /dev/null
@@ -1,56 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-# System Summary Editor
-SystemSummary.dialogTitle= Save As
-SystemSummary.saveErrorTitle= Error
-SystemSummary.saveErrorMessage= An error occurred saving to file {0}\n\n{1}.
-
-# paramter 0 is the feature name, parameter 1 is the version and parameter 2 is the Id
-SystemSummary.featureVersion= {0} ({1}) "{2}"
-
-# parameter 0 is the fragment name, parameter 1 is the version and parameter 2 is the Id
-SystemSummary.fragmentIdVersion= {0} ({1}) "{2}"
-
-# parameter 0 is the description name, parameter 1 is the version and parameter 2 is the Id
-SystemSummary.descriptorIdVersion= {0} ({1}) "{2}"
-
-SystemSummary.configuration= Configuration={0}
-SystemSummary.isCurrentConfiguration= Is current configuration={0}
-
-SystemSummary.date= Date={0}
-SystemSummary.target= Activities={0}
-SystemSummary.status= Status={0}
-SystemSummary.action= Action={0}
-
-SystemSummary.activity.enabled= Enabled
-SystemSummary.activity.disabled= Disabled
-SystemSummary.activity.revert= Revert
-SystemSummary.activity.reconcile= Reconcile
-SystemSummary.activity.preserved= Preserved
-SystemSummary.activity.unknown= Unknown
-SystemSummary.activity.featureInstalled= Feature installed
-SystemSummary.activity.featureRemoved= Feature removed
-SystemSummary.activity.siteInstalled= Site installed
-SystemSummary.activity.siteRemoved= Site removed
-
-SystemSummary.activity.status.unknown= Unknown
-SystemSummary.activity.status.success= Success
-SystemSummary.activity.status.failure= Failure
-
-SystemSummary.timeStamp= *** Date: {0}
-SystemSummary.systemProperties= *** System properties:
-SystemSummary.features= *** Features:
-SystemSummary.pluginRegistry= *** Plug-in Registry:
-SystemSummary.userPreferences= *** User Preferences:
-SystemSummary.updateManagerLog= *** Update Manager Log:
-SystemSummary.errorLog= *** Error Log:
-SystemSummary.notSpecified= Not Specified
diff --git a/org.eclipse.ui.workbench.texteditor/icons/full/ctool16/next_nav.gif b/org.eclipse.ui.editors/icons/full/ctool16/next_nav.gif
index 8392f3345..8392f3345 100644
--- a/org.eclipse.ui.workbench.texteditor/icons/full/ctool16/next_nav.gif
+++ b/org.eclipse.ui.editors/icons/full/ctool16/next_nav.gif
Binary files differ
diff --git a/org.eclipse.ui.workbench.texteditor/icons/full/ctool16/prev_nav.gif b/org.eclipse.ui.editors/icons/full/ctool16/prev_nav.gif
index 9b278e6fa..9b278e6fa 100644
--- a/org.eclipse.ui.workbench.texteditor/icons/full/ctool16/prev_nav.gif
+++ b/org.eclipse.ui.editors/icons/full/ctool16/prev_nav.gif
Binary files differ
diff --git a/org.eclipse.ui.workbench.texteditor/icons/full/dtool16/next_nav.gif b/org.eclipse.ui.editors/icons/full/dtool16/next_nav.gif
index 6cbeced26..6cbeced26 100644
--- a/org.eclipse.ui.workbench.texteditor/icons/full/dtool16/next_nav.gif
+++ b/org.eclipse.ui.editors/icons/full/dtool16/next_nav.gif
Binary files differ
diff --git a/org.eclipse.ui.workbench.texteditor/icons/full/dtool16/prev_nav.gif b/org.eclipse.ui.editors/icons/full/dtool16/prev_nav.gif
index a3441a062..a3441a062 100644
--- a/org.eclipse.ui.workbench.texteditor/icons/full/dtool16/prev_nav.gif
+++ b/org.eclipse.ui.editors/icons/full/dtool16/prev_nav.gif
Binary files differ
diff --git a/org.eclipse.ui.workbench.texteditor/icons/full/etool16/next_nav.gif b/org.eclipse.ui.editors/icons/full/etool16/next_nav.gif
index 03b7af342..03b7af342 100644
--- a/org.eclipse.ui.workbench.texteditor/icons/full/etool16/next_nav.gif
+++ b/org.eclipse.ui.editors/icons/full/etool16/next_nav.gif
Binary files differ
diff --git a/org.eclipse.ui.workbench.texteditor/icons/full/etool16/prev_nav.gif b/org.eclipse.ui.editors/icons/full/etool16/prev_nav.gif
index dd65c5235..dd65c5235 100644
--- a/org.eclipse.ui.workbench.texteditor/icons/full/etool16/prev_nav.gif
+++ b/org.eclipse.ui.editors/icons/full/etool16/prev_nav.gif
Binary files differ
diff --git a/org.eclipse.ui.editors/plugin.properties b/org.eclipse.ui.editors/plugin.properties
index fd05ae559..5e5630bef 100644
--- a/org.eclipse.ui.editors/plugin.properties
+++ b/org.eclipse.ui.editors/plugin.properties
@@ -11,10 +11,57 @@
pluginName= Default Text Editor
providerName= Eclipse.org
-lastSaveReferenceProvider.label= Version on &Disk
+ExtPoint.markerUpdater= Marker Updater
+ExtPoint.documentProvider= Document Provider
+ExtPoint.markerAnnotationSpecification= Marker Annotation Specification
+
+command.custom.description = Change the encoding to a custom encoding
+command.custom.name = Custom Encoding
+command.iso_8859_1.description = Change the encoding to ISO-8859-1
+command.iso_8859_1.name = ISO-8859-1 Encoding
+command.system.description = Change the encoding to the system encoding
+command.system.name = System Encoding
+command.us_ascii.description = Change the encoding to US ASCII
+command.us_ascii.name = US ASCII Encoding
+command.utf_16.description = Change the encoding to UTF-16
+command.utf_16.name = UTF-16 Encoding
+command.utf_16be.description = Change the encoding to UTF-16BE
+command.utf_16be.name = UTF-16BE Encoding
+command.utf_16le.description = Change the encoding to UTF-16LE
+command.utf_16le.name = UTF-16LE Encoding
+command.utf_8.description = Change the encoding to UTF-8
+command.utf_8.name = UTF-8 Encoding
+openExternalFile.label= Open External File...
+openExternalFile.description= Opens an External File
+ActionDefinition.quickDiff.name= Quick Diff Toggle
+ActionDefinition.quickDiff.description= Toggles display of quick diff information on the line number ruler
+Editors.DefaultTextEditor= Text Editor
PreferencePages.TextEditor= Text Editor
+lastSaveReferenceProvider.label= Version on &Disk
+
+AddTask.label=Add &Task...
+AddTask.tooltip=Add Task...
+AddBookmark.label=Add Boo&kmark...
+AddBookmark.tooltip=Add Bookmark...
+quickdiff.toggle.enable= Enable &QuickDiff
+
+Dummy.label=
+
openExternalFileActionSet.label= Open External Files
-openExternalFile.label= Open External File...
-openExternalFile.description= Opens an External File \ No newline at end of file
+textEditorAnnotationNavigationActionSet.label= Annotation Navigation
+
+goToPreviousAnnotation.label= Go to Previous Annotation
+goToPreviousAnnotation.tooltip= Go to Previous Annotation
+goToNextAnnotation.label= Go to Next Annotation
+goToNextAnnotation.tooltip= Go to Next Annotation
+
+errors.label= Errors
+warnings.label= Warnings
+infos.label= Infos
+tasks.label= Tasks
+bookmarks.label= Bookmarks
+changes.label= Diff Changes
+additions.label= Diff Additions
+deletions.label= Diff Deletions
diff --git a/org.eclipse.ui.editors/plugin.xml b/org.eclipse.ui.editors/plugin.xml
index c360da9c3..3d8895230 100644
--- a/org.eclipse.ui.editors/plugin.xml
+++ b/org.eclipse.ui.editors/plugin.xml
@@ -9,52 +9,143 @@
<runtime>
<library name="editors.jar">
- <export name="*"/>
- <packages prefixes="org.eclipse.ui.texteditor,org.eclipse.ui.editors.text,org.eclipse.ui.internal,org.eclipse.ui.internal.editors.quickdiff"/>
+ <export name="*"/>
+ <packages prefixes="org.eclipse.ui.texteditor,org.eclipse.ui.editors.text,org.eclipse.ui.internal,org.eclipse.ui.internal.editors.quickdiff"/>
</library>
</runtime>
<requires>
- <import plugin="org.eclipse.text"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.ui.workbench"/>
+ <import plugin="org.eclipse.ui.ide"/>
<import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.jface"/>
+ <import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.update.core"/>
<import plugin="org.eclipse.core.filebuffers"/>
+ <import plugin="org.eclipse.core.resources"/>
</requires>
+ <extension-point id="documentProviders" name="%ExtPoint.documentProviders" schema="schema/documentProviders.exsd"/>
+ <extension-point id="markerUpdaters" name="%ExtPoint.markerUpdaters" schema="schema/markerUpdaters.exsd"/>
+ <extension-point id="markerAnnotationSpecification" name="%ExtPoint.markerAnnotationSpecification" schema="schema/markerAnnotationSpecification.exsd"/>
+
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ name="%command.us_ascii.name"
+ description="%command.us_ascii.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.text.encoding.us-ascii">
+ </command>
+ <command
+ name="%command.iso_8859_1.name"
+ description="%command.iso_8859_1.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.text.encoding.iso-8859-1">
+ </command>
+ <command
+ name="%command.utf_8.name"
+ description="%command.utf_8.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.text.encoding.utf-8">
+ </command>
+ <command
+ name="%command.utf_16be.name"
+ description="%command.utf_16be.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.text.encoding.utf-16be">
+ </command>
+ <command
+ name="%command.utf_16le.name"
+ description="%command.utf_16le.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.text.encoding.utf-16le">
+ </command>
+ <command
+ name="%command.utf_16.name"
+ description="%command.utf_16.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.text.encoding.utf-16">
+ </command>
+ <command
+ name="%command.system.name"
+ description="%command.system.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.text.encoding.system">
+ </command>
+ <command
+ name="%command.custom.name"
+ description="%command.custom.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.text.encoding.custom">
+ </command>
+ <command
+ name="%openExternalFile.label"
+ description="%openExternalFile.description"
+ category="org.eclipse.ui.category.file"
+ id="org.eclipse.ui.edit.text.openExternalFile">
+ </command>
+ <command
+ name="%ActionDefinition.quickDiff.name"
+ description="%ActionDefinition.quickDiff.description"
+ category="org.eclipse.ui.category.edit"
+ id="org.eclipse.quickdiff.toggle">
+ </command>
+ <keyBinding
+ string="Ctrl+Shift+Q"
+ scope="org.eclipse.ui.textEditorScope"
+ command="org.eclipse.quickdiff.toggle"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ name="%Editors.DefaultTextEditor"
+ icon="icons/full/obj16/file_obj.gif"
+ extensions="txt"
+ contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
+ class="org.eclipse.ui.editors.text.TextEditor"
+ id="org.eclipse.ui.DefaultTextEditor">
+ </editor>
+ </extension>
+
<extension
- point="org.eclipse.ui.preferencePages">
+ point="org.eclipse.ui.preferencePages">
<page
- name="%PreferencePages.TextEditor"
- category="org.eclipse.ui.preferencePages.Editors"
- class="org.eclipse.ui.internal.editors.text.TextEditorPreferencePage2"
- id="org.eclipse.ui.preferencePages.TextEditor">
+ name="%PreferencePages.TextEditor"
+ category="org.eclipse.ui.preferencePages.Editors"
+ class="org.eclipse.ui.internal.editors.text.TextEditorPreferencePage2"
+ id="org.eclipse.ui.preferencePages.TextEditor">
</page>
</extension>
-
+
<extension
- point="org.eclipse.ui.documentProviders">
+ point="org.eclipse.ui.editors.documentProviders">
<provider
class="org.eclipse.ui.editors.text.TextFileDocumentProvider"
inputTypes="org.eclipse.ui.IStorageEditorInput"
id="org.eclipse.ui.editors.text.StorageDocumentProvider">
</provider>
</extension>
-
+
<extension
- point="org.eclipse.ui.documentProviders">
+ point="org.eclipse.ui.editors.documentProviders">
<provider
class="org.eclipse.ui.editors.text.TextFileDocumentProvider"
inputTypes="org.eclipse.ui.internal.editors.text.JavaFileEditorInput"
id="org.eclipse.ui.editors.text.ExternalFileDocumentProvider">
</provider>
</extension>
-
+
<extension
- point="org.eclipse.ui.workbench.texteditor.quickDiffReferenceProvider">
+ point="org.eclipse.ui.editors.markerUpdaters">
+ <updater
+ class="org.eclipse.ui.texteditor.BasicMarkerUpdater"
+ id="org.eclipse.ui.texteditor.BasicMarkerUpdater">
+ </updater>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.workbench.texteditor.quickDiffReferenceProvider">
<referenceprovider
label="%lastSaveReferenceProvider.label"
default="true"
@@ -64,10 +155,54 @@
</extension>
<extension
- point="org.eclipse.ui.popupMenus">
+ point="org.eclipse.ui.popupMenus">
<viewerContribution
targetID="#TextRulerContext"
- id="org.eclipse.ui.quickdiff.TextEditorContribution">
+ id="org.eclipse.ui.texteditor.ruler.context.actions">
+ <action
+ label="%AddTask.label"
+ helpContextId="org.eclipse.ui.AddTask_action_context"
+ tooltip="%AddTask.tooltip"
+ class="org.eclipse.ui.texteditor.TaskRulerAction"
+ menubarPath="additions"
+ id="org.eclipse.ui.texteditor.TaskRulerAction">
+ </action>
+ <action
+ label="%AddBookmark.label"
+ helpContextId="org.eclipse.ui.bookmark_action_context"
+ tooltip="%AddBookmark.tooltip"
+ class="org.eclipse.ui.texteditor.BookmarkRulerAction"
+ menubarPath="additions"
+ id="org.eclipse.ui.texteditor.BookmarkRulerAction">
+ </action>
+ <action
+ label="%quickdiff.toggle.enable"
+ style="push"
+ helpContextId="quickdiff.toggle"
+ class="org.eclipse.ui.texteditor.quickdiff.QuickDiffToggleAction"
+ menubarPath="quickdiff"
+ id="quickdiff.toggle">
+ </action>
+ </viewerContribution>
+ <viewerContribution
+ targetID="#RulerContext"
+ id="org.eclipse.ui.texteditor.ruler.context.actions">
+ <action
+ label="%AddTask.label"
+ helpContextId="org.eclipse.ui.AddTask_action_context"
+ tooltip="%AddTask.tooltip"
+ class="org.eclipse.ui.texteditor.TaskRulerAction"
+ menubarPath="additions"
+ id="org.eclipse.ui.texteditor.TaskRulerAction">
+ </action>
+ <action
+ label="%AddBookmark.label"
+ helpContextId="org.eclipse.ui.bookmark_action_context"
+ tooltip="%AddBookmark.tooltip"
+ class="org.eclipse.ui.texteditor.BookmarkRulerAction"
+ menubarPath="additions"
+ id="org.eclipse.ui.texteditor.BookmarkRulerAction">
+ </action>
<action
label="%quickdiff.toggle.enable"
style="push"
@@ -80,31 +215,252 @@
</extension>
<extension
- point="org.eclipse.ui.commands">
- <command
- name="%openExternalFile.label"
- description="%openExternalFile.description"
- category="org.eclipse.ui.category.file"
- id="org.eclipse.ui.edit.text.openExternalFile">
- </command>
+ point="org.eclipse.ui.editorActions">
+ <editorContribution
+ targetID="org.eclipse.ui.DefaultTextEditor"
+ id="org.eclipse.ui.texteditor.ruler.actions">
+ <action
+ label="%Dummy.label"
+ helpContextId="org.eclipse.ui.bookmark_action_context"
+ class="org.eclipse.ui.texteditor.BookmarkRulerAction"
+ actionID="RulerDoubleClick"
+ id="org.eclipse.ui.texteditor.BookmarkRulerAction">
+ </action>
+ <action
+ label="%Dummy.label"
+ class="org.eclipse.ui.texteditor.SelectRulerAction"
+ actionID="RulerClick"
+ id="org.eclipse.ui.texteditor.SelectRulerAction">
+ </action>
+ </editorContribution>
+ <editorContribution
+ targetID="org.eclipse.ui.DefaultTextEditor"
+ id="org.eclipse.quickdiff.editoractions.texteditor">
+ <action
+ definitionId="org.eclipse.quickdiff.toggle"
+ label="%quickdiff.toggle.enable"
+ class="org.eclipse.ui.texteditor.quickdiff.QuickDiffToggleAction"
+ id="org.eclipse.ui.texteditor.quickdiff.QuickDiffToggleAction">
+ </action>
+ </editorContribution>
</extension>
-
- <extension
- point="org.eclipse.ui.actionSets">
- <actionSet
- label="%openExternalFileActionSet.label"
- visible="true"
- id="org.eclipse.ui.edit.text.actionSet.openExternalFile">
- <action
- id="org.eclipse.ui.edit.text.openExternalFile"
- label="%openExternalFile.label"
- tooltip="%openExternalFile.description"
- menubarPath="file/new.ext"
- class="org.eclipse.ui.internal.editors.text.OpenExternalFileAction"
- definitionId="org.eclipse.ui.edit.text.openExternalFile"
- helpContextId="open_text_editor_action_context"/>
- </actionSet>
- </extension>
+ <extension
+ point="org.eclipse.ui.actionSets">
+ <actionSet
+ label="%openExternalFileActionSet.label"
+ visible="true"
+ id="org.eclipse.ui.edit.text.actionSet.openExternalFile">
+ <action
+ definitionId="org.eclipse.ui.edit.text.openExternalFile"
+ label="%openExternalFile.label"
+ helpContextId="open_text_editor_action_context"
+ tooltip="%openExternalFile.description"
+ class="org.eclipse.ui.internal.editors.text.OpenExternalFileAction"
+ menubarPath="file/new.ext"
+ id="org.eclipse.ui.edit.text.openExternalFile">
+ </action>
+ </actionSet>
+ <actionSet
+ label="%textEditorAnnotationNavigationActionSet.label"
+ visible="false"
+ id="org.eclipse.ui.edit.text.actionSet.annotationNavigation">
+ <action
+ allowLabelUpdate="true"
+ style="pulldown"
+ toolbarPath="org.eclipse.ui.workbench.navigate/history.group"
+ id="org.eclipse.ui.edit.text.gotoPreviousAnnotation"
+ hoverIcon="icons/full/ctool16/prev_nav.gif"
+ class="org.eclipse.ui.internal.editors.text.PreviousPulldownActionDelegate"
+ definitionId="org.eclipse.ui.navigate.previous"
+ disabledIcon="icons/full/dtool16/prev_nav.gif"
+ icon="icons/full/etool16/prev_nav.gif"
+ label="%goToPreviousAnnotation.label"
+ retarget="true"
+ tooltip="%goToPreviousAnnotation.tooltip">
+ </action>
+ <action
+ allowLabelUpdate="true"
+ style="pulldown"
+ toolbarPath="org.eclipse.ui.workbench.navigate/history.group"
+ id="org.eclipse.ui.edit.text.gotoNextAnnotation"
+ hoverIcon="icons/full/ctool16/next_nav.gif"
+ class="org.eclipse.ui.internal.editors.text.NextPulldownActionDelegate"
+ definitionId="org.eclipse.ui.navigate.next"
+ disabledIcon="icons/full/dtool16/next_nav.gif"
+ icon="icons/full/etool16/next_nav.gif"
+ label="%goToNextAnnotation.label"
+ retarget="true"
+ tooltip="%goToNextAnnotation.tooltip">
+ </action>
+ </actionSet>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editors.markerAnnotationSpecification">
+ <specification
+ textPreferenceKey="errorIndication"
+ presentationLayer="6"
+ showInNextPrevDropdownToolbarAction="true"
+ textPreferenceValue="true"
+ isGoToPreviousNavigationTargetKey="isErrorGoToPreviousNavigationTarget"
+ label="%errors.label"
+ markerType="org.eclipse.core.resources.problemmarker"
+ colorPreferenceKey="errorIndicationColor"
+ markerSeverity="2"
+ showInNextPrevDropdownToolbarActionKey="showErrorInNextPrevDropdownToolbarAction"
+ annotationType="org.eclipse.ui.workbench.texteditor.error"
+ isGoToNextNavigationTargetKey="isErrorGoToNextNavigationTarget"
+ isGoToNextNavigationTarget="true"
+ overviewRulerPreferenceKey="errorIndicationInOverviewRuler"
+ verticalRulerPreferenceValue="true"
+ isGoToPreviousNavigationTarget="true"
+ verticalRulerPreferenceKey="errorIndicationInVerticalRuler"
+ contributesToHeader="true"
+ colorPreferenceValue="255,0,128"
+ overviewRulerPreferenceValue="true">
+ </specification>
+ <specification
+ textPreferenceKey="warningIndication"
+ presentationLayer="5"
+ showInNextPrevDropdownToolbarAction="true"
+ textPreferenceValue="true"
+ isGoToPreviousNavigationTargetKey="isWarningGoToPreviousNavigationTarget"
+ label="%warnings.label"
+ markerType="org.eclipse.core.resources.problemmarker"
+ colorPreferenceKey="warningIndicationColor"
+ markerSeverity="1"
+ showInNextPrevDropdownToolbarActionKey="showWarningInNextPrevDropdownToolbarAction"
+ annotationType="org.eclipse.ui.workbench.texteditor.warning"
+ isGoToNextNavigationTargetKey="isWarningGoToNextNavigationTarget"
+ isGoToNextNavigationTarget="true"
+ overviewRulerPreferenceKey="warningIndicationInOverviewRuler"
+ verticalRulerPreferenceValue="true"
+ isGoToPreviousNavigationTarget="true"
+ verticalRulerPreferenceKey="warningIndicationInVerticalRuler"
+ contributesToHeader="true"
+ colorPreferenceValue="244,200,45"
+ overviewRulerPreferenceValue="true">
+ </specification>
+ <specification
+ textPreferenceKey="infoIndication"
+ presentationLayer="4"
+ showInNextPrevDropdownToolbarAction="true"
+ textPreferenceValue="false"
+ isGoToPreviousNavigationTargetKey="isInfoGoToPreviousNavigationTarget"
+ label="%infos.label"
+ markerType="org.eclipse.core.resources.problemmarker"
+ colorPreferenceKey="infoIndicationColor"
+ showInNextPrevDropdownToolbarActionKey="showInfoInNextPrevDropdownToolbarAction"
+ annotationType="org.eclipse.ui.workbench.texteditor.info"
+ isGoToNextNavigationTargetKey="isInfoGoToNextNavigationTarget"
+ isGoToNextNavigationTarget="false"
+ overviewRulerPreferenceKey="infoIndicationInOverviewRuler"
+ verticalRulerPreferenceValue="true"
+ isGoToPreviousNavigationTarget="false"
+ verticalRulerPreferenceKey="infoIndicationInVerticalRuler"
+ contributesToHeader="false"
+ colorPreferenceValue="244,200,45"
+ overviewRulerPreferenceValue="true">
+ </specification>
+ <specification
+ textPreferenceKey="taskIndication"
+ presentationLayer="2"
+ showInNextPrevDropdownToolbarAction="true"
+ textPreferenceValue="false"
+ isGoToPreviousNavigationTargetKey="isTaskGoToPreviousNavigationTarget"
+ label="%tasks.label"
+ markerType="org.eclipse.core.resources.taskmarker"
+ colorPreferenceKey="taskIndicationColor"
+ showInNextPrevDropdownToolbarActionKey="showTaskInNextPrevDropdownToolbarAction"
+ annotationType="org.eclipse.ui.workbench.texteditor.task"
+ isGoToNextNavigationTargetKey="isTaskGoToNextNavigationTarget"
+ isGoToNextNavigationTarget="false"
+ overviewRulerPreferenceKey="taskIndicationInOverviewRuler"
+ verticalRulerPreferenceValue="true"
+ isGoToPreviousNavigationTarget="false"
+ verticalRulerPreferenceKey="taskIndicationInVerticalRuler"
+ contributesToHeader="false"
+ colorPreferenceValue="0,128,255"
+ overviewRulerPreferenceValue="true">
+ </specification>
+ <specification
+ textPreferenceKey="bookmarkIndication"
+ presentationLayer="1"
+ showInNextPrevDropdownToolbarAction="true"
+ textPreferenceValue="false"
+ isGoToPreviousNavigationTargetKey="isBookmarkGoToPreviousNavigationTarget"
+ label="%bookmarks.label"
+ markerType="org.eclipse.core.resources.bookmark"
+ colorPreferenceKey="bookmarkIndicationColor"
+ showInNextPrevDropdownToolbarActionKey="showBookmarkInNextPrevDropdownToolbarAction"
+ annotationType="org.eclipse.ui.workbench.texteditor.bookmark"
+ isGoToNextNavigationTargetKey="isBookmarkGoToNextNavigationTarget"
+ isGoToNextNavigationTarget="false"
+ overviewRulerPreferenceKey="bookmarkIndicationInOverviewRuler"
+ verticalRulerPreferenceValue="true"
+ isGoToPreviousNavigationTarget="false"
+ verticalRulerPreferenceKey="bookmarkIndicationInVerticalRuler"
+ contributesToHeader="false"
+ colorPreferenceValue="34,164,99"
+ overviewRulerPreferenceValue="true">
+ </specification>
+ <specification
+ colorPreferenceValue="204,163,205"
+ isGoToPreviousNavigationTarget="false"
+ isGoToPreviousNavigationTargetKey="isChangeGoToPreviousNavigationTarget"
+ showInNextPrevDropdownToolbarAction="true"
+ annotationType="org.eclipse.ui.workbench.texteditor.quickdiffChange"
+ isGoToNextNavigationTarget="false"
+ showInNextPrevDropdownToolbarActionKey="showChangeInNextPrevDropdownToolbarAction"
+ colorPreferenceKey="changeIndicationColor"
+ isGoToNextNavigationTargetKey="isChangeGoToNextNavigationTarget"
+ contributesToHeader="false"
+ overviewRulerPreferenceValue="false"
+ markerType="org.eclipse.quickdiff.changeindication"
+ presentationLayer="2"
+ textPreferenceValue="false"
+ label="%changes.label"
+ textPreferenceKey="changeIndication"
+ overviewRulerPreferenceKey="changeIndicationInOverviewRuler">
+ </specification>
+ <specification
+ colorPreferenceValue="188,188,222"
+ isGoToPreviousNavigationTarget="false"
+ isGoToPreviousNavigationTargetKey="isAdditionGoToPreviousNavigationTarget"
+ showInNextPrevDropdownToolbarAction="false"
+ annotationType="org.eclipse.ui.workbench.texteditor.quickdiffAddition"
+ isGoToNextNavigationTarget="false"
+ showInNextPrevDropdownToolbarActionKey="showAdditionInNextPrevDropdownToolbarAction"
+ colorPreferenceKey="additionIndicationColor"
+ isGoToNextNavigationTargetKey="isAdditionGoToNextNavigationTarget"
+ contributesToHeader="false"
+ overviewRulerPreferenceValue="false"
+ markerType="org.eclipse.quickdiff.additionindication"
+ presentationLayer="2"
+ textPreferenceValue="false"
+ label="%additions.label"
+ textPreferenceKey="additionIndication"
+ overviewRulerPreferenceKey="additionIndicationInOverviewRuler">
+ </specification>
+ <specification
+ colorPreferenceValue="0,0,0"
+ isGoToPreviousNavigationTarget="false"
+ isGoToPreviousNavigationTargetKey="isDeletionGoToPreviousNavigationTarget"
+ showInNextPrevDropdownToolbarAction="false"
+ annotationType="org.eclipse.ui.workbench.texteditor.quickdiffDeletion"
+ isGoToNextNavigationTarget="false"
+ showInNextPrevDropdownToolbarActionKey="showDeletionInNextPrevDropdownToolbarAction"
+ colorPreferenceKey="deletionIndicationColor"
+ isGoToNextNavigationTargetKey="isDeletionGoToNextNavigationTarget"
+ contributesToHeader="false"
+ overviewRulerPreferenceValue="false"
+ markerType="org.eclipse.quickdiff.deletionindication"
+ presentationLayer="2"
+ textPreferenceValue="false"
+ label="%deletions.label"
+ textPreferenceKey="deletionIndication"
+ overviewRulerPreferenceKey="deletionIndicationInOverviewRuler">
+ </specification>
+ </extension>
</plugin>
diff --git a/org.eclipse.ui.editors/schema/documentProviders.exsd b/org.eclipse.ui.editors/schema/documentProviders.exsd
new file mode 100644
index 000000000..455e55ec1
--- /dev/null
+++ b/org.eclipse.ui.editors/schema/documentProviders.exsd
@@ -0,0 +1,147 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.ui">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.ui" id="documentProviders" name="Document Providers"/>
+ </appInfo>
+ <documentation>
+ This extension point is used to define mappings between file types and document providers or between types of editor inputs and document providers that can be used by editors. Document providers must implement the interface &lt;samp&gt;org.eclipse.ui.texteditor.IDocumentProvider&lt;/samp&gt;. Editor inputs must be instance of &lt;samp&gt;org.eclipse.ui.IEditorInput&lt;/samp&gt;.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="provider" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+ a fully qualified identifier of the target extension point
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ an optional identifier of the extension instance
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ an optional name of the extension instance
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="provider">
+ <complexType>
+ <attribute name="extensions" type="string">
+ <annotation>
+ <documentation>
+ a comma separated list of file extensions
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="inputTypes" type="string">
+ <annotation>
+ <documentation>
+ a comma separated list of qualified editor input class names
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ the qualified name of the document provider class
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ the unique id of this provider
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ Release 1.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ &lt;pre&gt;
+&lt;extension point=&quot;org.eclipse.ui.documentProviders&quot;&gt;
+ &lt;provider
+ extensions=&quot;.jav&quot;
+ class=&quot;org.eclipse.ui.examples.javaeditor.JavaDocumentProvider&quot;
+ id=&quot;org.eclipse.ui.examples.javaeditor.JavaDocumentProvider&quot;&gt;
+ &lt;/provider&gt;
+&lt;/extension&gt;
+&lt;/pre&gt;
+&lt;p&gt;
+This example registers &lt;samp&gt;org.eclipse.ui.examples.javaeditor.JavaDocumentProvider&lt;/samp&gt; as the default provider for files with the extension &quot;.jav&quot;.
+&lt;p&gt;
+&lt;pre&gt;
+&lt;extension point=&quot;org.eclipse.ui.documentProviders&quot;&gt;
+ &lt;provider
+ inputTypes=&quot;org.eclipse.ui.IStorageEditorInput&quot;
+ class=&quot;org.eclipse.ui.editors.text.FileDocumentProvider&quot;
+ id=&quot;org.eclipse.ui.editors.text.FileDocumentProvider&quot;&gt;
+ &lt;/provider&gt;
+&lt;/extension&gt;
+&lt;/pre&gt;
+&lt;/p&gt;
+This example registers &lt;samp&gt;org.eclipse.ui.editors.text.FileDocumentProvider&lt;/samp&gt; as the default provider for all editor inputs that are &lt;samp&gt;instance of org.eclipse.ui.IStorageEditorInput&lt;/samp&gt;.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ Document providers registered for a file extension have precedence over those registered for input types. Document providers must implement the interface &lt;samp&gt;org.eclipse.ui.texteditor.IDocumentProvider&lt;/samp&gt;. Editor inputs must be instance of &lt;samp&gt;org.eclipse.ui.IEditorInput&lt;/samp&gt;.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ &lt;a href=&quot;hglegal.htm&quot;&gt;
+&lt;img SRC=&quot;ngibmcpy.gif&quot; ALT=&quot;Copyright (c) 2000, 2003 IBM Corporation and others. All Rights Reserved.&quot; BORDER=0 height=14 width=324&gt;
+&lt;/a&gt;
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/org.eclipse.ui.workbench.texteditor/schema/markerAnnotationSpecification.exsd b/org.eclipse.ui.editors/schema/markerAnnotationSpecification.exsd
index 192ecf245..192ecf245 100644
--- a/org.eclipse.ui.workbench.texteditor/schema/markerAnnotationSpecification.exsd
+++ b/org.eclipse.ui.editors/schema/markerAnnotationSpecification.exsd
diff --git a/org.eclipse.ui.editors/schema/markerUpdaters.exsd b/org.eclipse.ui.editors/schema/markerUpdaters.exsd
new file mode 100644
index 000000000..695e4fd83
--- /dev/null
+++ b/org.eclipse.ui.editors/schema/markerUpdaters.exsd
@@ -0,0 +1,142 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.ui">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.ui" id="markerUpdaters" name="Marker Updaters"/>
+ </appInfo>
+ <documentation>
+ This extension point is used for registering marker update strategies with marker annotation models. A resource that is opened in a text editor is associated with a marker annotation model. For each marker attached to the resource this model manages a position that is updated with each change applied to the text in the editor. If the resource is saved, the text in the editor and the position managed for a marker are passed over to the registered marker update strategies. These strategies can then update the marker&apos;s attributes based on the text and the position. Marker update strategies are requested to implement the interface &lt;samp&gt;org.eclipse.ui.texteditor.IMarkerUpdater&lt;/samp&gt;. The update strategies can be registered either for a particular marker type or all marker types. The latter by omitting any marker type in the extension.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="updater" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+ a fully qualified identifier of the target extension point
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ an optional identifier of the extension instance
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ an optional name of the extension instance
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="updater">
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ the unique id of this provider
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="markerType" type="string">
+ <annotation>
+ <documentation>
+ the name of the marker type
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ the qualified name of the marker updater class
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ Release 1.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ &lt;pre&gt;
+&lt;extension point= &quot;org.eclipse.ui.markerUpdaters&quot;&gt;
+ &lt;updater
+ id=&quot;org.eclipse.jdt.ui.markerUpdaters.JavaSearchMarkerUpdater&quot;
+ class=&quot;org.eclipse.jdt.internal.ui.search.JavaSearchMarkerUpdater&quot;
+ markerType=&quot;org.eclipse.search.searchmarker&quot;&gt;
+ &lt;/updater&gt;
+&lt;/extension&gt;
+&lt;/pre&gt;
+&lt;p&gt;
+This example registers &lt;samp&gt;org.eclipse.jdt.internal.ui.search.JavaSearchMarkerUpdater&lt;/samp&gt; as a marker updater for all markers of the
+type &lt;samp&gt;org.eclipse.search.searchmarker&lt;/samp&gt; including all its derived types.
+&lt;/p&gt;
+&lt;pre&gt;
+&lt;extension point= &quot;org.eclipse.ui.markerUpdaters&quot;&gt;
+ &lt;updater
+ id=&quot;org.eclipse.ui.texteditor.BasicMarkerUpdater&quot;
+ class=&quot;org.eclipse.ui.texteditor.BasicMarkerUpdater&quot;&gt;
+ &lt;/updater&gt;
+&lt;/extension&gt;
+&lt;/pre&gt;
+&lt;p&gt;
+This example registers &lt;samp&gt;org.eclipse.ui.texteditor.BasicMarkerUpdater&lt;/samp&gt; as a marker updater independent from the type of the marker.
+&lt;/p&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ Registered marker updaters have to implement the interface &lt;samp&gt;org.eclipse.ui.texteditor.IMarkerUpdater&lt;/samp&gt;.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ &lt;a href=&quot;hglegal.htm&quot;&gt;
+ &lt;img SRC=&quot;ngibmcpy.gif&quot;
+ ALT=&quot;Copyright (c) 2000, 2003 IBM Corporation and others. All Rights Reserved.&quot;
+ BORDER=0 height=14 width=324&gt;&lt;/a&gt;
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileDocumentProvider.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileDocumentProvider.java
index 5683e8337..046d904d4 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileDocumentProvider.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileDocumentProvider.java
@@ -36,6 +36,8 @@ import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.jface.operation.IRunnableContext;
+
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.source.IAnnotationModel;
@@ -46,6 +48,7 @@ import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.ContainerGenerator;
import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel;
import org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel;
@@ -63,6 +66,11 @@ public class FileDocumentProvider extends StorageDocumentProvider {
* @since 2.1
*/
private static final QualifiedName ENCODING_KEY = new QualifiedName("org.eclipse.ui.editors", "encoding"); //$NON-NLS-1$ //$NON-NLS-2$
+ /**
+ * The runnable context for that provider.
+ * @since 3.0
+ */
+ private WorkspaceOperationRunner fOperationRunner;
/**
* Runnable encapsulating an element state change. This runnable ensures
@@ -391,10 +399,9 @@ public class FileDocumentProvider extends StorageDocumentProvider {
}
/*
- * @see org.eclipse.ui.texteditor.IDocumentProviderExtension#synchronize(Object)
- * @since 2.0
+ * @see org.eclipse.ui.texteditor.AbstractDocumentProvider#doSynchronize(java.lang.Object)
*/
- public void synchronize(Object element) throws CoreException {
+ protected void doSynchronize(Object element, IProgressMonitor monitor) throws CoreException {
if (element instanceof IFileEditorInput) {
IFileEditorInput input= (IFileEditorInput) element;
@@ -404,10 +411,10 @@ public class FileDocumentProvider extends StorageDocumentProvider {
if (info.fFileSynchronizer != null) {
info.fFileSynchronizer.uninstall();
- refreshFile(input.getFile());
+ refreshFile(input.getFile(), monitor);
info.fFileSynchronizer.install();
} else {
- refreshFile(input.getFile());
+ refreshFile(input.getFile(), monitor);
}
handleElementContentChanged((IFileEditorInput) element);
@@ -415,7 +422,7 @@ public class FileDocumentProvider extends StorageDocumentProvider {
return;
}
- super.synchronize(element);
+ super.doSynchronize(element, monitor);
}
/*
@@ -683,20 +690,25 @@ public class FileDocumentProvider extends StorageDocumentProvider {
}
/*
- * @see IDocumentProvider#resetDocument(Object)
- * @since 2.0
+ * @see org.eclipse.ui.texteditor.AbstractDocumentProvider#doResetDocument(java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
*/
- public void resetDocument(Object element) throws CoreException {
- // http://dev.eclipse.org/bugs/show_bug.cgi?id=19014
+ protected void doResetDocument(Object element, IProgressMonitor monitor) throws CoreException {
if (element instanceof IFileEditorInput) {
IFileEditorInput input= (IFileEditorInput) element;
try {
- refreshFile(input.getFile());
+ refreshFile(input.getFile(), monitor);
} catch (CoreException x) {
handleCoreException(x,TextEditorMessages.getString("FileDocumentProvider.resetDocument")); //$NON-NLS-1$
}
}
- super.resetDocument(element);
+
+ super.doResetDocument(element, monitor);
+
+ IAnnotationModel model= getAnnotationModel(element);
+ if (model instanceof AbstractMarkerAnnotationModel) {
+ AbstractMarkerAnnotationModel markerModel= (AbstractMarkerAnnotationModel) model;
+ markerModel.resetMarkers();
+ }
}
/**
@@ -707,8 +719,20 @@ public class FileDocumentProvider extends StorageDocumentProvider {
* @since 2.1
*/
protected void refreshFile(IFile file) throws CoreException {
+ refreshFile(file, getProgressMonitor());
+ }
+
+ /**
+ * Refreshes the given file resource.
+ *
+ * @param file the file to be refreshed
+ * @param monitor the progress monitor
+ * @throws a CoreException if the refresh fails
+ * @since 3.0
+ */
+ protected void refreshFile(IFile file, IProgressMonitor monitor) throws CoreException {
try {
- file.refreshLocal(IResource.DEPTH_INFINITE, getProgressMonitor());
+ file.refreshLocal(IResource.DEPTH_INFINITE, monitor);
} catch (OperationCanceledException x) {
}
}
@@ -764,4 +788,14 @@ public class FileDocumentProvider extends StorageDocumentProvider {
file.setPersistentProperty(ENCODING_KEY, encoding);
}
}
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractDocumentProvider#getOperationRunner(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected IRunnableContext getOperationRunner(IProgressMonitor monitor) {
+ if (fOperationRunner == null)
+ fOperationRunner = new WorkspaceOperationRunner();
+ fOperationRunner.setProgressMonitor(monitor);
+ return fOperationRunner;
+ }
}
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/ITextEditorHelpContextIds.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/ITextEditorHelpContextIds.java
index 1b7a5db2d..d6270633b 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/ITextEditorHelpContextIds.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/ITextEditorHelpContextIds.java
@@ -11,6 +11,7 @@
package org.eclipse.ui.editors.text;
+import org.eclipse.ui.ide.IDEActionFactory;
import org.eclipse.ui.texteditor.IAbstractTextEditorHelpContextIds;
/**
@@ -31,4 +32,20 @@ public interface ITextEditorHelpContextIds extends IAbstractTextEditorHelpContex
* Value: <code>"org.eclipse.ui.text_editor_context"</code>.
*/
public static final String TEXT_EDITOR= PREFIX + "text_editor_context"; //$NON-NLS-1$
+
+ /**
+ * Help context id for the Add Task action.
+ * Value: <code>"org.eclipse.ui.bookmark_action_context"</code>
+ *
+ * @since 3.0
+ */
+ public static final String BOOKMARK_ACTION= PREFIX + IDEActionFactory.ADD_TASK.getId() + ACTION_POSTFIX;
+
+ /**
+ * Help context id for the Bookmark action.
+ * Value: <code>"org.eclipse.ui.addTask_action_context"</code>
+ *
+ * @since 3.0
+ */
+ public static final String ADD_TASK_ACTION= PREFIX + IDEActionFactory.BOOKMARK.getId() + ACTION_POSTFIX;
}
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/StorageDocumentProvider.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/StorageDocumentProvider.java
index 8129c095e..dea93845d 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/StorageDocumentProvider.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/StorageDocumentProvider.java
@@ -27,6 +27,8 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.operation.IRunnableContext;
+
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.source.IAnnotationModel;
@@ -408,4 +410,11 @@ public class StorageDocumentProvider extends AbstractDocumentProvider implements
protected void persistEncoding(Object element, String encoding) throws CoreException {
// Default is to do nothing
}
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractDocumentProvider#getOperationRunner(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected IRunnableContext getOperationRunner(IProgressMonitor monitor) {
+ return null;
+ }
}
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java
index c9b7484a7..ca9533a9f 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java
@@ -12,7 +12,6 @@
package org.eclipse.ui.editors.text;
-import java.lang.reflect.InvocationTargetException;
import java.text.MessageFormat;
import org.eclipse.core.resources.IFile;
@@ -27,15 +26,12 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.window.Window;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.SaveAsDialog;
import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.texteditor.AddTaskAction;
import org.eclipse.ui.texteditor.ConvertLineDelimitersAction;
import org.eclipse.ui.texteditor.ExtendedTextEditor;
import org.eclipse.ui.texteditor.IAbstractTextEditorHelpContextIds;
@@ -61,12 +57,14 @@ import org.eclipse.ui.internal.editors.text.EditorsPlugin;
* </p>
*/
public class TextEditor extends ExtendedTextEditor {
+
/**
* The encoding support for the editor.
* @since 2.0
*/
protected DefaultEncodingSupport fEncodingSupport;
-
+
+
/**
* Creates a new text editor.
*/
@@ -104,8 +102,8 @@ public class TextEditor extends ExtendedTextEditor {
*/
public void dispose() {
if (fEncodingSupport != null) {
- fEncodingSupport.dispose();
- fEncodingSupport= null;
+ fEncodingSupport.dispose();
+ fEncodingSupport= null;
}
super.dispose();
@@ -183,7 +181,7 @@ public class TextEditor extends ExtendedTextEditor {
*/
protected void performSaveAs(IProgressMonitor progressMonitor) {
Shell shell= getSite().getShell();
- IEditorInput input = getEditorInput();
+ IEditorInput input= getEditorInput();
SaveAsDialog dialog= new SaveAsDialog(shell);
@@ -221,45 +219,33 @@ public class TextEditor extends ExtendedTextEditor {
IWorkspace workspace= ResourcesPlugin.getWorkspace();
IFile file= workspace.getRoot().getFile(filePath);
final IEditorInput newInput= new FileEditorInput(file);
-
- WorkspaceModifyOperation op= new WorkspaceModifyOperation() {
- public void execute(final IProgressMonitor monitor) throws CoreException {
- getDocumentProvider().saveDocument(monitor, newInput, getDocumentProvider().getDocument(getEditorInput()), true);
- }
- };
-
+
boolean success= false;
try {
provider.aboutToChange(newInput);
- new ProgressMonitorDialog(shell).run(false, true, op);
+ provider.saveDocument(progressMonitor, newInput, provider.getDocument(input), true);
success= true;
- } catch (InterruptedException x) {
- } catch (InvocationTargetException x) {
-
- Throwable targetException= x.getTargetException();
+ } catch (CoreException x) {
String title= TextEditorMessages.getString("Editor.error.save.title"); //$NON-NLS-1$
- String msg= MessageFormat.format(TextEditorMessages.getString("Editor.error.save.message"), new Object[] { targetException.getMessage() }); //$NON-NLS-1$
+ String msg= MessageFormat.format(TextEditorMessages.getString("Editor.error.save.message"), new Object[] { x.getMessage() }); //$NON-NLS-1$
- if (targetException instanceof CoreException) {
- CoreException coreException= (CoreException) targetException;
- IStatus status= coreException.getStatus();
- if (status != null) {
- switch (status.getSeverity()) {
- case IStatus.INFO:
- MessageDialog.openInformation(shell, title, msg);
- break;
- case IStatus.WARNING:
- MessageDialog.openWarning(shell, title, msg);
- break;
- default:
- MessageDialog.openError(shell, title, msg);
- }
- } else {
- MessageDialog.openError(shell, title, msg);
+ IStatus status= x.getStatus();
+ if (status != null) {
+ switch (status.getSeverity()) {
+ case IStatus.INFO:
+ MessageDialog.openInformation(shell, title, msg);
+ break;
+ case IStatus.WARNING:
+ MessageDialog.openWarning(shell, title, msg);
+ break;
+ default:
+ MessageDialog.openError(shell, title, msg);
}
+ } else {
+ MessageDialog.openError(shell, title, msg);
}
} finally {
@@ -286,12 +272,7 @@ public class TextEditor extends ExtendedTextEditor {
protected void createActions() {
super.createActions();
- ResourceAction action= new AddTaskAction(TextEditorMessages.getResourceBundle(), "Editor.AddTask.", this); //$NON-NLS-1$
- action.setHelpContextId(IAbstractTextEditorHelpContextIds.ADD_TASK_ACTION);
- action.setActionDefinitionId(ITextEditorActionDefinitionIds.ADD_TASK);
- setAction(ITextEditorActionConstants.ADD_TASK, action);
-
- action= new ConvertLineDelimitersAction(TextEditorMessages.getResourceBundle(), "Editor.ConvertToWindows.", this, "\r\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResourceAction action= new ConvertLineDelimitersAction(TextEditorMessages.getResourceBundle(), "Editor.ConvertToWindows.", this, "\r\n"); //$NON-NLS-1$ //$NON-NLS-2$
action.setHelpContextId(IAbstractTextEditorHelpContextIds.CONVERT_LINE_DELIMITERS_TO_WINDOWS);
action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONVERT_LINE_DELIMITERS_TO_WINDOWS);
setAction(ITextEditorActionConstants.CONVERT_LINE_DELIMITERS_TO_WINDOWS, action);
@@ -382,5 +363,4 @@ public class TextEditor extends ExtendedTextEditor {
if (fEncodingSupport != null)
fEncodingSupport.reset();
}
-
}
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditorActionContributor.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditorActionContributor.java
index f69331513..8b2b6b312 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditorActionContributor.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditorActionContributor.java
@@ -18,6 +18,7 @@ import org.eclipse.jface.action.MenuManager;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.ide.IDEActionFactory;
import org.eclipse.ui.texteditor.BasicTextEditorActionContributor;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
@@ -69,6 +70,12 @@ public class TextEditorActionContributor extends BasicTextEditorActionContributo
ITextEditor textEditor= null;
if (part instanceof ITextEditor)
textEditor= (ITextEditor) part;
+
+ IActionBars actionBars= getActionBars();
+ if (actionBars != null) {
+ actionBars.setGlobalActionHandler(IDEActionFactory.ADD_TASK.getId(), getAction(textEditor, IDEActionFactory.ADD_TASK.getId()));
+ actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), getAction(textEditor, IDEActionFactory.BOOKMARK.getId()));
+ }
// line delimiter conversion
fConvertToWindows.setAction(getAction(textEditor, ITextEditorActionConstants.CONVERT_LINE_DELIMITERS_TO_WINDOWS));
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextFileDocumentProvider.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextFileDocumentProvider.java
index 47be742ed..a760bb4ca 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextFileDocumentProvider.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextFileDocumentProvider.java
@@ -52,6 +52,7 @@ import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.IDocumentProviderExtension;
import org.eclipse.ui.texteditor.IDocumentProviderExtension2;
@@ -501,6 +502,10 @@ public class TextFileDocumentProvider implements IDocumentProvider, IDocumentPr
FileInfo info= (FileInfo) fFileInfoMap.get(element);
if (info != null) {
info.fTextFileBuffer.commit(monitor, overwrite);
+ if (info.fModel instanceof AbstractMarkerAnnotationModel) {
+ AbstractMarkerAnnotationModel model= (AbstractMarkerAnnotationModel) info.fModel;
+ model.updateMarkers(info.fTextFileBuffer.getDocument());
+ }
} else if (element instanceof IFileEditorInput) {
try {
monitor.beginTask("Saving", 2000);
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/WorkspaceOperationRunner.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/WorkspaceOperationRunner.java
new file mode 100644
index 000000000..f575d5778
--- /dev/null
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/WorkspaceOperationRunner.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ui.editors.text;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+
+import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation;
+
+/**
+ * @since 3.0
+ */
+public class WorkspaceOperationRunner implements IRunnableContext {
+
+ private IProgressMonitor fProgressMonitor;
+
+ public WorkspaceOperationRunner() {
+ }
+
+ /**
+ * Sets the progress monitor.
+ *
+ * @param progressMonitor the progress monitor to set
+ */
+ public void setProgressMonitor(IProgressMonitor progressMonitor) {
+ fProgressMonitor= progressMonitor;
+ }
+
+ /**
+ * Returns the progress monitor. It there is no progress monitor the monitor\
+ * is set to the <code>NullProgressMonitor</code>.
+ *
+ * @return the progress monitor
+ */
+ public IProgressMonitor getProgressMonitor() {
+ if (fProgressMonitor == null)
+ fProgressMonitor= new NullProgressMonitor();
+ return fProgressMonitor;
+ }
+
+ /*
+ * @see org.eclipse.jface.operation.IRunnableContext#run(boolean, boolean, org.eclipse.jface.operation.IRunnableWithProgress)
+ */
+ public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
+ WorkspaceModifyDelegatingOperation operation= new WorkspaceModifyDelegatingOperation(runnable);
+ operation.run(getProgressMonitor());
+ }
+}
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/EditorsPlugin.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/EditorsPlugin.java
index 510bd0648..8f792f7b7 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/EditorsPlugin.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/EditorsPlugin.java
@@ -21,8 +21,11 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.source.ISharedTextColors;
+
import org.eclipse.ui.editors.text.TextEditorPreferenceConstants;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
/**
* Represents the editors plug-in. It provides a series of convenience methods such as
@@ -67,6 +70,7 @@ public class EditorsPlugin extends AbstractUIPlugin {
private FileEditorInputAdapterFactory fFileEditorInputAdapterFactory;
+ private ISharedTextColors fSharedTextColors;
public EditorsPlugin(IPluginDescriptor descriptor) {
@@ -79,6 +83,7 @@ public class EditorsPlugin extends AbstractUIPlugin {
* @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore)
*/
protected void initializeDefaultPreferences(IPreferenceStore store) {
+ MarkerAnnotationPreferences.initializeDefaultValues(store);
TextEditorPreferenceConstants.initializeDefaultValues(store);
}
@@ -98,6 +103,24 @@ public class EditorsPlugin extends AbstractUIPlugin {
public void shutdown() throws CoreException {
IAdapterManager manager= Platform.getAdapterManager();
manager.unregisterAdapters(fFileEditorInputAdapterFactory);
+
+ if (fSharedTextColors != null) {
+ fSharedTextColors.dispose();
+ fSharedTextColors= null;
+ }
+
super.shutdown();
}
+
+ /**
+ * Returns the shared text colors of this plug-in.
+ *
+ * @since 3.0
+ * @return the shared text colors
+ */
+ public ISharedTextColors getSharedTextColors() {
+ if (fSharedTextColors == null)
+ fSharedTextColors= new SharedTextColors();
+ return fSharedTextColors;
+ }
}
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/NextPreviousPulldownActionDelegate.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/NextPreviousPulldownActionDelegate.java
index ce5c5bc0e..63d33bd94 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/NextPreviousPulldownActionDelegate.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/NextPreviousPulldownActionDelegate.java
@@ -9,7 +9,7 @@
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.ui.internal.texteditor;
+package org.eclipse.ui.internal.editors.text;
import java.util.ArrayList;
import java.util.Iterator;
@@ -96,7 +96,7 @@ public abstract class NextPreviousPulldownActionDelegate extends Action implemen
* Creates a next previous action delegate.
*/
public NextPreviousPulldownActionDelegate() {
- fStore= TextEditorPlugin.getDefault().getPreferenceStore();
+ fStore= EditorsPlugin.getDefault().getPreferenceStore();
}
/*
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/NextPulldownActionDelegate.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/NextPulldownActionDelegate.java
index bb6d472ee..2ca4a1a44 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/NextPulldownActionDelegate.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/NextPulldownActionDelegate.java
@@ -9,7 +9,7 @@
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.ui.internal.texteditor;
+package org.eclipse.ui.internal.editors.text;
import org.eclipse.ui.texteditor.AnnotationPreference;
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/PreviousPulldownActionDelegate.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/PreviousPulldownActionDelegate.java
index 52e9b035e..812b58d4a 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/PreviousPulldownActionDelegate.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/PreviousPulldownActionDelegate.java
@@ -9,7 +9,7 @@
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.ui.internal.texteditor;
+package org.eclipse.ui.internal.editors.text;
import org.eclipse.ui.texteditor.AnnotationPreference;
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/SharedTextColors.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java
index 8b5050c28..5047227c1 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/SharedTextColors.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.ui.internal.texteditor;
+package org.eclipse.ui.internal.editors.text;
import java.util.Iterator;
import org.eclipse.swt.widgets.Display;
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractMarkerAnnotationModel.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractMarkerAnnotationModel.java
index 0873f825b..e0ca39802 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractMarkerAnnotationModel.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractMarkerAnnotationModel.java
@@ -35,6 +35,8 @@ import org.eclipse.jface.text.source.AnnotationModel;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.editors.text.EditorsPlugin;
+
/**
* Abstract implementation of a marker-based annotation model.
@@ -235,7 +237,7 @@ public abstract class AbstractMarkerAnnotationModel extends AnnotationModel {
catchupWithMarkers();
} catch (CoreException x) {
if (x.getStatus().getCode() != IResourceStatus.RESOURCE_NOT_FOUND)
- handleCoreException(x, EditorMessages.getString("AbstractMarkerAnnotationModel.connected")); //$NON-NLS-1$
+ handleCoreException(x, TextEditorMessages.getString("AbstractMarkerAnnotationModel.connected")); //$NON-NLS-1$
}
fireModelChanged();
@@ -251,7 +253,7 @@ public abstract class AbstractMarkerAnnotationModel extends AnnotationModel {
fInstantiatedMarkerUpdaters= new ArrayList(2);
// populate list
- IExtensionPoint extensionPoint= Platform.getPluginRegistry().getExtensionPoint(PlatformUI.PLUGIN_ID, "markerUpdaters"); //$NON-NLS-1$
+ IExtensionPoint extensionPoint= Platform.getPluginRegistry().getExtensionPoint(EditorsPlugin.getPluginId(), "markerUpdaters"); //$NON-NLS-1$
if (extensionPoint != null) {
IConfigurationElement[] elements= extensionPoint.getConfigurationElements();
for (int i= 0; i < elements.length; i++)
@@ -354,7 +356,7 @@ public abstract class AbstractMarkerAnnotationModel extends AnnotationModel {
deleteMarkers(m);
} catch (CoreException x) {
- handleCoreException(x, EditorMessages.getString("AbstractMarkerAnnotationModel.removeAnnotations")); //$NON-NLS-1$
+ handleCoreException(x, TextEditorMessages.getString("AbstractMarkerAnnotationModel.removeAnnotations")); //$NON-NLS-1$
}
listenToMarkerChanges(true);
@@ -433,7 +435,7 @@ public abstract class AbstractMarkerAnnotationModel extends AnnotationModel {
try {
return (IMarkerUpdater) element.createExecutableExtension("class"); //$NON-NLS-1$
} catch (CoreException x) {
- handleCoreException(x, EditorMessages.getString("AbstractMarkerAnnotationModel.createMarkerUpdater")); //$NON-NLS-1$
+ handleCoreException(x, TextEditorMessages.getString("AbstractMarkerAnnotationModel.createMarkerUpdater")); //$NON-NLS-1$
}
return null;
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AddMarkerAction.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AddMarkerAction.java
index 01a1deb80..01a1deb80 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AddMarkerAction.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AddMarkerAction.java
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicMarkerUpdater.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/BasicMarkerUpdater.java
index 4440eae64..4440eae64 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicMarkerUpdater.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/BasicMarkerUpdater.java
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BookmarkRulerAction.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/BookmarkRulerAction.java
index b82a4a0dd..1ff5846f9 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BookmarkRulerAction.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/BookmarkRulerAction.java
@@ -26,6 +26,6 @@ public class BookmarkRulerAction extends AbstractRulerActionDelegate {
* @see AbstractRulerActionDelegate#createAction(ITextEditor, IVerticalRulerInfo)
*/
protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) {
- return new MarkerRulerAction(EditorMessages.getResourceBundle(), "Editor.ManageBookmarks.", editor, rulerInfo, IMarker.BOOKMARK, true); //$NON-NLS-1$
+ return new MarkerRulerAction(TextEditorMessages.getResourceBundle(), "Editor.ManageBookmarks.", editor, rulerInfo, IMarker.BOOKMARK, true); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/DefaultAnnotation.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DefaultAnnotation.java
index 82f8d92d7..128b75c35 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/DefaultAnnotation.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DefaultAnnotation.java
@@ -36,6 +36,7 @@ import org.eclipse.jface.text.source.Annotation;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.model.IWorkbenchAdapter;
/**
@@ -175,10 +176,10 @@ public class DefaultAnnotation extends Annotation implements IAnnotationExtensio
int layer= 1;
if (isAnnotationType(fAnnotationType, IMarker.TASK)) {
- name= ISharedImages.IMG_OBJS_TASK_TSK;
+ name= IDE.SharedImages.IMG_OBJS_TASK_TSK;
layer= TASK_LAYER;
} else if (isAnnotationType(fAnnotationType, IMarker.BOOKMARK)) {
- name= ISharedImages.IMG_OBJS_BKMRK_TSK;
+ name= IDE.SharedImages.IMG_OBJS_BKMRK_TSK;
layer= BOOKMARK_LAYER;
} else if (isAnnotationType(fAnnotationType, IMarker.PROBLEM)) {
switch (fSeverity) {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/DefaultMarkerAnnotationAccess.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DefaultMarkerAnnotationAccess.java
index f16c18ef9..1e5318afe 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/DefaultMarkerAnnotationAccess.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DefaultMarkerAnnotationAccess.java
@@ -19,7 +19,7 @@ import org.eclipse.jface.text.source.Annotation;
import org.eclipse.jface.text.source.IAnnotationAccess;
import org.eclipse.jface.text.source.IAnnotationAccessExtension;
-import org.eclipse.ui.internal.texteditor.TextEditorPlugin;
+import org.eclipse.ui.internal.editors.text.EditorsPlugin;
/**
@@ -28,7 +28,7 @@ import org.eclipse.ui.internal.texteditor.TextEditorPlugin;
public class DefaultMarkerAnnotationAccess implements IAnnotationAccess, IAnnotationAccessExtension {
/** Constant for the unknown marker type */
- public final static String UNKNOWN= TextEditorPlugin.PLUGIN_ID + ".unknown"; //$NON-NLS-1$
+ public final static String UNKNOWN= EditorsPlugin.getPluginId() + ".unknown"; //$NON-NLS-1$
/** The marker annotation preferences */
protected MarkerAnnotationPreferences fMarkerAnnotationPreferences;
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/DocumentProviderRegistry.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DocumentProviderRegistry.java
index b356f9b4b..2ff99547e 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/DocumentProviderRegistry.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DocumentProviderRegistry.java
@@ -35,6 +35,8 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.editors.text.EditorsPlugin;
+
/**
* This registry manages shareable document provider. Document
@@ -107,10 +109,10 @@ public class DocumentProviderRegistry {
private void initialize() {
IExtensionPoint extensionPoint;
- extensionPoint= Platform.getPluginRegistry().getExtensionPoint(PlatformUI.PLUGIN_ID, "documentProviders"); //$NON-NLS-1$
+ extensionPoint= Platform.getPluginRegistry().getExtensionPoint(EditorsPlugin.getPluginId(), "documentProviders"); //$NON-NLS-1$
if (extensionPoint == null) {
- String msg= MessageFormat.format(EditorMessages.getString("DocumentProviderRegistry.error.extension_point_not_found"), new Object[] { PlatformUI.PLUGIN_ID }); //$NON-NLS-1$
+ String msg= MessageFormat.format(TextEditorMessages.getString("DocumentProviderRegistry.error.extension_point_not_found"), new Object[] { PlatformUI.PLUGIN_ID }); //$NON-NLS-1$
ILog log= Platform.getPlugin(PlatformUI.PLUGIN_ID).getLog();
log.log(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, 0, msg, null));
return;
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ExtendedTextEditor.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ExtendedTextEditor.java
index 5e2bb2f09..3d55b2bdb 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ExtendedTextEditor.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ExtendedTextEditor.java
@@ -12,6 +12,10 @@ package org.eclipse.ui.texteditor;
import java.util.Iterator;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResourceStatus;
+import org.eclipse.core.runtime.IStatus;
+
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Composite;
@@ -20,6 +24,9 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.source.AnnotationRulerColumn;
import org.eclipse.jface.text.source.ChangeRulerColumn;
import org.eclipse.jface.text.source.CompositeRuler;
@@ -39,10 +46,15 @@ import org.eclipse.jface.text.source.LineNumberRulerColumn;
import org.eclipse.jface.text.source.OverviewRuler;
import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.ui.internal.texteditor.TextEditorPlugin;
-import org.eclipse.ui.internal.texteditor.quickdiff.DocumentLineDiffer;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.editors.text.ITextEditorHelpContextIds;
+import org.eclipse.ui.ide.IDEActionFactory;
+import org.eclipse.ui.ide.IGotoMarker;
import org.eclipse.ui.texteditor.quickdiff.QuickDiff;
+import org.eclipse.ui.internal.editors.text.EditorsPlugin;
+import org.eclipse.ui.internal.texteditor.quickdiff.DocumentLineDiffer;
+
/**
* An intermediate editor comprising functionality not present in the leaner <code>AbstractTextEditor</code>,
* but used in many heavy weight (and especially source editing) editors, such as line numbers,
@@ -83,14 +95,22 @@ public abstract class ExtendedTextEditor extends StatusTextEditor {
private final static String PRINT_MARGIN_COLOR= ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR;
/**
* Preference key for print margin ruler column.
- **/
+ */
private final static String PRINT_MARGIN_COLUMN= ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN;
+
+ /**
+ * Adapter class for <code>IGotoMarker</code>.
+ */
+ private class GotoMarkerAdapter implements IGotoMarker {
+ public void gotoMarker(IMarker marker) {
+ ExtendedTextEditor.this.gotoMarker(marker);
+ }
+ }
+
/**
* The annotation preferences.
*/
private MarkerAnnotationPreferences fAnnotationPreferences;
-
-
/**
* The overview ruler of this editor.
*
@@ -99,7 +119,6 @@ public abstract class ExtendedTextEditor extends StatusTextEditor {
* {@link #getOverviewRuler()} instead.</p>
*/
protected IOverviewRuler fOverviewRuler;
-
/**
* Helper for accessing annotation from the perspective of this editor.
*
@@ -108,7 +127,6 @@ public abstract class ExtendedTextEditor extends StatusTextEditor {
* {@link #getAnnotationAccess()} instead.</p>
*/
protected IAnnotationAccess fAnnotationAccess;
-
/**
* Helper for managing the decoration support of this editor's viewer.
*
@@ -117,7 +135,6 @@ public abstract class ExtendedTextEditor extends StatusTextEditor {
* {@link #getSourceViewerDecorationSupport(ISourceViewer)} instead.</p>
*/
protected SourceViewerDecorationSupport fSourceViewerDecorationSupport;
-
/**
* The line number column.
*
@@ -126,7 +143,6 @@ public abstract class ExtendedTextEditor extends StatusTextEditor {
* {@link AbstractTextEditor#getVerticalRuler()} to access the vertical bar instead.</p>
*/
protected LineNumberRulerColumn fLineNumberRulerColumn;
-
/**
* The change ruler column.
*/
@@ -140,6 +156,17 @@ public abstract class ExtendedTextEditor extends StatusTextEditor {
* @since 3.0
*/
private AnnotationRulerColumn fAnnotationRulerColumn;
+ /**
+ * The editor's implicit document provider.
+ * @since 3.0
+ */
+ private IDocumentProvider fImplicitDocumentProvider;
+ /**
+ * The editor's goto marker adapter.
+ * @since 3.0
+ */
+ private Object fGotoMarkerAdapter= new GotoMarkerAdapter();
+
/**
* Creates a new text editor.
@@ -156,7 +183,7 @@ public abstract class ExtendedTextEditor extends StatusTextEditor {
* Initializes this editor.
*/
protected void initializeEditor() {
- setPreferenceStore(TextEditorPlugin.getDefault().getPreferenceStore());
+ setPreferenceStore(EditorsPlugin.getDefault().getPreferenceStore());
}
/**
@@ -207,7 +234,7 @@ public abstract class ExtendedTextEditor extends StatusTextEditor {
}
protected ISharedTextColors getSharedColors() {
- ISharedTextColors sharedColors= TextEditorPlugin.getDefault().getSharedTextColors();
+ ISharedTextColors sharedColors= EditorsPlugin.getDefault().getSharedTextColors();
return sharedColors;
}
@@ -849,5 +876,135 @@ public abstract class ExtendedTextEditor extends StatusTextEditor {
protected MarkerAnnotationPreferences getAnnotationPreferences() {
return fAnnotationPreferences;
}
+
+
+ /**
+ * If the editor can be saved all marker ranges have been changed according to
+ * the text manipulations. However, those changes are not yet propagated to the
+ * marker manager. Thus, when opening a marker, the marker's position in the editor
+ * must be determined as it might differ from the position stated in the marker.
+ *
+ * @param marker the marker to go to
+ * @deprecated visibility will be reduced, use <code>getAdapter(IGotoMarker.class) for accessing this method</code>
+ */
+ public void gotoMarker(IMarker marker) {
+
+ if (getSourceViewer() == null)
+ return;
+
+ int start= MarkerUtilities.getCharStart(marker);
+ int end= MarkerUtilities.getCharEnd(marker);
+
+ if (start < 0 || end < 0) {
+
+ // there is only a line number
+ int line= MarkerUtilities.getLineNumber(marker);
+ if (line > -1) {
+
+ // marker line numbers are 1-based
+ -- line;
+
+ try {
+
+ IDocument document= getDocumentProvider().getDocument(getEditorInput());
+ selectAndReveal(document.getLineOffset(line), document.getLineLength(line));
+
+ } catch (BadLocationException x) {
+ // marker refers to invalid text position -> do nothing
+ }
+ }
+
+ } else {
+
+ // look up the current range of the marker when the document has been edited
+ IAnnotationModel model= getDocumentProvider().getAnnotationModel(getEditorInput());
+ if (model instanceof AbstractMarkerAnnotationModel) {
+
+ AbstractMarkerAnnotationModel markerModel= (AbstractMarkerAnnotationModel) model;
+ Position pos= markerModel.getMarkerPosition(marker);
+ if (pos != null && !pos.isDeleted()) {
+ // use position instead of marker values
+ start= pos.getOffset();
+ end= pos.getOffset() + pos.getLength();
+ }
+
+ if (pos != null && pos.isDeleted()) {
+ // do nothing if position has been deleted
+ return;
+ }
+ }
+
+ IDocument document= getDocumentProvider().getDocument(getEditorInput());
+ int length= document.getLength();
+ if (end - 1 < length && start < length)
+ selectAndReveal(start, end - start);
+ }
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.StatusTextEditor#isErrorStatus(org.eclipse.core.runtime.IStatus)
+ * @since 3.0
+ */
+ protected boolean isErrorStatus(IStatus status) {
+ // see bug 42230
+ return status != null && !status.isOK() && status.getCode() != IResourceStatus.READ_ONLY_LOCAL;
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#createActions()
+ */
+ protected void createActions() {
+ super.createActions();
+
+ ResourceAction action= new AddMarkerAction(TextEditorMessages.getResourceBundle(), "Editor.AddBookmark.", this, IMarker.BOOKMARK, true); //$NON-NLS-1$
+ action.setHelpContextId(ITextEditorHelpContextIds.BOOKMARK_ACTION);
+ action.setActionDefinitionId(ITextEditorActionDefinitionIds.ADD_BOOKMARK);
+ setAction(IDEActionFactory.BOOKMARK.getId(), action);
+
+ action= new AddTaskAction(TextEditorMessages.getResourceBundle(), "Editor.AddTask.", this); //$NON-NLS-1$
+ action.setHelpContextId(ITextEditorHelpContextIds.ADD_TASK_ACTION);
+ action.setActionDefinitionId(ITextEditorActionDefinitionIds.ADD_TASK);
+ setAction(IDEActionFactory.ADD_TASK.getId(), action);
+ }
+
+ /*
+ * @see IAdaptable#getAdapter(java.lang.Class)
+ * @since 3.0
+ */
+ public Object getAdapter(Class adapter) {
+ if (IGotoMarker.class.equals(adapter))
+ return fGotoMarkerAdapter;
+ return super.getAdapter(adapter);
+ }
+
+ /*
+ * If there is no explicit document provider set, the implicit one is
+ * re-initialized based on the given editor input.
+ *
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#setDocumentProvider(org.eclipse.ui.IEditorInput)
+ * @since 3.0
+ */
+ protected void setDocumentProvider(IEditorInput input) {
+ fImplicitDocumentProvider= DocumentProviderRegistry.getDefault().getDocumentProvider(input);
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.ITextEditor#getDocumentProvider()
+ * @since 3.0
+ */
+ public IDocumentProvider getDocumentProvider() {
+ IDocumentProvider provider= super.getDocumentProvider();
+ if (provider == null)
+ return fImplicitDocumentProvider;
+ return provider;
+ }
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#disposeDocumentProvider()
+ * @since 3.0
+ */
+ protected void disposeDocumentProvider() {
+ super.disposeDocumentProvider();
+ fImplicitDocumentProvider= null;
+ }
}
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ExtendedTextEditorPreferenceConstants.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ExtendedTextEditorPreferenceConstants.java
index a49e4ae2a..a49e4ae2a 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ExtendedTextEditorPreferenceConstants.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ExtendedTextEditorPreferenceConstants.java
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IMarkerUpdater.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/IMarkerUpdater.java
index 04ce65f85..04ce65f85 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IMarkerUpdater.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/IMarkerUpdater.java
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerAnnotation.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerAnnotation.java
index a8f7e27cd..00fc3cb15 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerAnnotation.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerAnnotation.java
@@ -16,6 +16,9 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
@@ -28,11 +31,9 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.text.Assert;
import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.model.IWorkbenchAdapter;
@@ -163,10 +164,10 @@ public class MarkerAnnotation extends Annotation implements IAnnotationExtension
int layer= 1;
if (MarkerUtilities.isMarkerType(fMarker, IMarker.TASK)) {
- name= ISharedImages.IMG_OBJS_TASK_TSK;
+ name= IDE.SharedImages.IMG_OBJS_TASK_TSK;
layer= DefaultAnnotation.TASK_LAYER;
} else if (MarkerUtilities.isMarkerType(fMarker, IMarker.BOOKMARK)) {
- name= ISharedImages.IMG_OBJS_BKMRK_TSK;
+ name= IDE.SharedImages.IMG_OBJS_BKMRK_TSK;
layer= DefaultAnnotation.BOOKMARK_LAYER;
} else if (MarkerUtilities.isMarkerType(fMarker, IMarker.PROBLEM)) {
switch (fMarker.getAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO)) {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerAnnotationPreferences.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerAnnotationPreferences.java
index f2a152028..97954faed 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerAnnotationPreferences.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerAnnotationPreferences.java
@@ -30,7 +30,7 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.resource.StringConverter;
-import org.eclipse.ui.internal.texteditor.TextEditorPlugin;
+import org.eclipse.ui.internal.editors.text.EditorsPlugin;
/**
@@ -72,7 +72,7 @@ public class MarkerAnnotationPreferences {
fPreferences= new ArrayList(2);
// populate list
- IExtensionPoint extensionPoint= Platform.getPluginRegistry().getExtensionPoint(TextEditorPlugin.PLUGIN_ID, "markerAnnotationSpecification"); //$NON-NLS-1$
+ IExtensionPoint extensionPoint= Platform.getPluginRegistry().getExtensionPoint(EditorsPlugin.getPluginId(), "markerAnnotationSpecification"); //$NON-NLS-1$
if (extensionPoint != null) {
IConfigurationElement[] elements= extensionPoint.getConfigurationElements();
for (int i= 0; i < elements.length; i++) {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerRulerAction.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerRulerAction.java
index f7d415f01..a7013a3ed 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerRulerAction.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerRulerAction.java
@@ -303,7 +303,7 @@ public class MarkerRulerAction extends ResourceAction implements IUpdate {
}
}
} catch (CoreException x) {
- handleCoreException(x, EditorMessages.getString("MarkerRulerAction.getMarker")); //$NON-NLS-1$
+ handleCoreException(x, TextEditorMessages.getString("MarkerRulerAction.getMarker")); //$NON-NLS-1$
}
}
@@ -327,7 +327,7 @@ public class MarkerRulerAction extends ResourceAction implements IUpdate {
try {
MarkerUtilities.createMarker(resource, attributes, fMarkerType);
} catch (CoreException x) {
- handleCoreException(x, EditorMessages.getString("MarkerRulerAction.addMarker")); //$NON-NLS-1$
+ handleCoreException(x, TextEditorMessages.getString("MarkerRulerAction.addMarker")); //$NON-NLS-1$
}
}
@@ -347,7 +347,7 @@ public class MarkerRulerAction extends ResourceAction implements IUpdate {
}
}, null);
} catch (CoreException x) {
- handleCoreException(x, EditorMessages.getString("MarkerRulerAction.removeMarkers")); //$NON-NLS-1$
+ handleCoreException(x, TextEditorMessages.getString("MarkerRulerAction.removeMarkers")); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerRulerInfoAction.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerRulerInfoAction.java
index 2e80bc1e3..2e80bc1e3 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerRulerInfoAction.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerRulerInfoAction.java
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerUpdater.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerUpdater.java
index af2a4bf87..af2a4bf87 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerUpdater.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerUpdater.java
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerUtilities.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerUtilities.java
index f7f3774ad..f7f3774ad 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerUtilities.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerUtilities.java
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ResourceMarkerAnnotationModel.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ResourceMarkerAnnotationModel.java
index e77c088a6..e77c088a6 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ResourceMarkerAnnotationModel.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ResourceMarkerAnnotationModel.java
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TextEditorMessages.properties b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TextEditorMessages.properties
index f41bc037f..9150ab089 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TextEditorMessages.properties
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TextEditorMessages.properties
@@ -28,6 +28,25 @@ Editor.ManageTasks.add.dialog.message=Enter Task description
Editor.ManageTasks.error.dialog.title=Managing Tasks
Editor.ManageTasks.error.dialog.message=Problems managing tasks
+Editor.AddBookmark.label=Boo&kmark...
+Editor.AddBookmark.tooltip=Add Bookmark
+Editor.AddBookmark.image=
+Editor.AddBookmark.description=Add Bookmark
+Editor.AddBookmark.dialog.title=Add Bookmark
+Editor.AddBookmark.dialog.message=Enter Bookmark name:
+Editor.AddBookmark.error.dialog.title=Add Bookmark
+Editor.AddBookmark.error.dialog.message=Problems adding new bookmark
+
+Editor.ManageBookmarks.tooltip=Adds and Removes Bookmarks
+Editor.ManageBookmarks.image=
+Editor.ManageBookmarks.description=Adds and removes Bookmarks
+Editor.ManageBookmarks.add.label=Add Boo&kmark...
+Editor.ManageBookmarks.remove.label=Remove Boo&kmark
+Editor.ManageBookmarks.add.dialog.title=Add Bookmark
+Editor.ManageBookmarks.add.dialog.message=Enter Bookmark name:
+Editor.ManageBookmarks.error.dialog.title=Managing Bookmarks
+Editor.ManageBookmarks.error.dialog.message=Problems managing bookmarks
+
Editor.SelectMarker.tooltip=Selects the marker's range
Editor.SelectMarker.image=
Editor.SelectMarker.description=Selects the Marker's Range
@@ -41,3 +60,12 @@ MarkerRulerAction.removeMarkers=MarkerRulerAction.removeMarkers
SelectMarkerRulerAction.getMarker=SelectMarkerRulerAction.getMarker
SelectMarkerRulerInfoAction.getMarker=SelectMarkerRulerInfoAction.getMarker
+
+## Others ##
+
+AbstractMarkerAnnotationModel.connected=AbstractMarkerAnnotationModel.connected
+AbstractMarkerAnnotationModel.createMarkerUpdater=AbstractMarkerAnnotationModel.createMarkerUpdater
+AbstractMarkerAnnotationModel.removeAnnotations=AbstractMarkerAnnotationModel.removeAnnotations
+ResourceMarkerAnnotationModel.resourceChanged=ResourceMarkerAnnotationModel.resourceChanged
+
+DocumentProviderRegistry.error.extension_point_not_found=Extension point: {0}.documentProviders not found
diff --git a/org.eclipse.ui.examples.javaeditor/.classpath b/org.eclipse.ui.examples.javaeditor/.classpath
index 844e6d441..30b595c73 100644
--- a/org.eclipse.ui.examples.javaeditor/.classpath
+++ b/org.eclipse.ui.examples.javaeditor/.classpath
@@ -1,11 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="Eclipse Java Editor Example/"/>
- <classpathentry kind="src" path="/org.eclipse.ui"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="src" path="/org.eclipse.core.filebuffers"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="Eclipse Java Editor Example"/>
+ <classpathentry kind="src" path="/org.eclipse.ui"/>
+ <classpathentry kind="src" path="/org.eclipse.core.filebuffers"/>
+ <classpathentry kind="src" path="/org.eclipse.jface.text"/>
+ <classpathentry kind="src" path="/org.eclipse.ui.workbench.texteditor"/>
+ <classpathentry kind="src" path="/org.eclipse.ui.editors"/>
+ <classpathentry kind="src" path="/org.eclipse.ui.views"/>
+ <classpathentry kind="src" path="/org.eclipse.core.boot"/>
+ <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.ui.examples.javaeditor/.project b/org.eclipse.ui.examples.javaeditor/.project
index 9b57fc8d7..2716f9270 100644
--- a/org.eclipse.ui.examples.javaeditor/.project
+++ b/org.eclipse.ui.examples.javaeditor/.project
@@ -1,33 +1,36 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.ui.examples.javaeditor</name>
- <comment></comment>
- <projects>
- <project>org.eclipse.core.boot</project>
- <project>org.eclipse.core.filebuffers</project>
- <project>org.eclipse.core.resources</project>
- <project>org.eclipse.core.runtime</project>
- <project>org.eclipse.ui</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.ui.examples.javaeditor</name>
+ <comment></comment>
+ <projects>
+ <project>org.eclipse.core.boot</project>
+ <project>org.eclipse.core.filebuffers</project>
+ <project>org.eclipse.core.runtime</project>
+ <project>org.eclipse.jface.text</project>
+ <project>org.eclipse.ui</project>
+ <project>org.eclipse.ui.editors</project>
+ <project>org.eclipse.ui.views</project>
+ <project>org.eclipse.ui.workbench.texteditor</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditor.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditor.java
index 9c4f4d3f4..bc4b055f4 100644
--- a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditor.java
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaEditor.java
@@ -140,7 +140,7 @@ public class JavaEditor extends TextEditor {
protected void initializeEditor() {
super.initializeEditor();
setSourceViewerConfiguration(new JavaSourceViewerConfiguration());
- setEditorContextMenuId("#JavaEditorContext"); //$NON-NLS-1$
- setRulerContextMenuId("#JavaRulerContext"); //$NON-NLS-1$
+// setEditorContextMenuId("#JavaEditorContext"); //$NON-NLS-1$
+// setRulerContextMenuId("#JavaRulerContext"); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaDoubleClickSelector.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaDoubleClickSelector.java
index d3ba02c1c..ace486e94 100644
--- a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaDoubleClickSelector.java
+++ b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/java/JavaDoubleClickSelector.java
@@ -11,7 +11,10 @@
package org.eclipse.ui.examples.javaeditor.java;
-import org.eclipse.jface.text.*;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextDoubleClickStrategy;
+import org.eclipse.jface.text.ITextViewer;
/**
* Double click strategy aware of Java identifier syntax rules.
diff --git a/org.eclipse.ui.examples.javaeditor/plugin.xml b/org.eclipse.ui.examples.javaeditor/plugin.xml
index 3602bfd5e..a74b2258f 100644
--- a/org.eclipse.ui.examples.javaeditor/plugin.xml
+++ b/org.eclipse.ui.examples.javaeditor/plugin.xml
@@ -1,43 +1,46 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin
- id="org.eclipse.ui.examples.javaeditor"
- name="%pluginName"
- version="3.0.0"
- provider-name="%providerName"
- class="org.eclipse.ui.examples.javaeditor.JavaEditorExamplePlugin">
-
- <runtime>
- <library name="javaeditorexample.jar">
- <export name="*"/>
- </library>
- </runtime>
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.filebuffers"/>
- </requires>
-
-
- <extension
- point="org.eclipse.ui.editors">
- <editor
- name="%javaEditorName"
- icon="icons/obj16/java.gif"
- extensions="%javaFileExtensions"
- contributorClass="org.eclipse.ui.examples.javaeditor.JavaActionContributor"
- class="org.eclipse.ui.examples.javaeditor.JavaEditor"
- id="org.eclipse.ui.JavaEditor">
- </editor>
- </extension>
-
- <extension
- id="ExampleJavaDocumentSetupParticipant"
- name="%documentSetupParticipantName"
- point="org.eclipse.core.filebuffers.documentSetup">
- <participant
- extensions="%javaFileExtensions"
- class="org.eclipse.ui.examples.javaeditor.JavaDocumentSetupParticipant">
- </participant>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin
+ id="org.eclipse.ui.examples.javaeditor"
+ name="%pluginName"
+ version="3.0.0"
+ provider-name="%providerName"
+ class="org.eclipse.ui.examples.javaeditor.JavaEditorExamplePlugin">
+
+ <runtime>
+ <library name="javaeditorexample.jar">
+ <export name="*"/>
+ </library>
+ </runtime>
+ <requires>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.core.filebuffers"/>
+ <import plugin="org.eclipse.jface.text"/>
+ <import plugin="org.eclipse.ui.workbench.texteditor"/>
+ <import plugin="org.eclipse.ui.editors"/>
+ <import plugin="org.eclipse.ui.views"/>
+ </requires>
+
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ name="%javaEditorName"
+ icon="icons/obj16/java.gif"
+ extensions="%javaFileExtensions"
+ contributorClass="org.eclipse.ui.examples.javaeditor.JavaActionContributor"
+ class="org.eclipse.ui.examples.javaeditor.JavaEditor"
+ id="org.eclipse.ui.JavaEditor">
+ </editor>
+ </extension>
+ <extension
+ id="ExampleJavaDocumentSetupParticipant"
+ name="%documentSetupParticipantName"
+ point="org.eclipse.core.filebuffers.documentSetup">
+ <participant
+ extensions="%javaFileExtensions"
+ class="org.eclipse.ui.examples.javaeditor.JavaDocumentSetupParticipant">
+ </participant>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.ui.workbench.texteditor/.classpath b/org.eclipse.ui.workbench.texteditor/.classpath
index 04e538ed4..907b85edf 100644
--- a/org.eclipse.ui.workbench.texteditor/.classpath
+++ b/org.eclipse.ui.workbench.texteditor/.classpath
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.eclipse.jface"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.jface.text"/>
- <classpathentry kind="src" path="/org.eclipse.text"/>
- <classpathentry kind="src" path="/org.eclipse.ui.workbench"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="/org.eclipse.text"/>
+ <classpathentry kind="src" path="/org.eclipse.jface"/>
+ <classpathentry kind="src" path="/org.eclipse.jface.text"/>
+ <classpathentry kind="src" path="/org.eclipse.ui.workbench"/>
+ <classpathentry kind="src" path="/org.eclipse.ui.win32"/>
+ <classpathentry kind="src" path="/org.eclipse.core.boot"/>
+ <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.ui.workbench.texteditor/.project b/org.eclipse.ui.workbench.texteditor/.project
index a0fcf5e59..228779eb8 100644
--- a/org.eclipse.ui.workbench.texteditor/.project
+++ b/org.eclipse.ui.workbench.texteditor/.project
@@ -3,11 +3,12 @@
<name>org.eclipse.ui.workbench.texteditor</name>
<comment></comment>
<projects>
- <project>org.eclipse.core.resources</project>
+ <project>org.eclipse.core.boot</project>
<project>org.eclipse.core.runtime</project>
<project>org.eclipse.jface</project>
<project>org.eclipse.jface.text</project>
<project>org.eclipse.text</project>
+ <project>org.eclipse.ui.win32</project>
<project>org.eclipse.ui.workbench</project>
</projects>
<buildSpec>
diff --git a/org.eclipse.ui.workbench.texteditor/plugin.properties b/org.eclipse.ui.workbench.texteditor/plugin.properties
index 731b67081..bf7610a73 100644
--- a/org.eclipse.ui.workbench.texteditor/plugin.properties
+++ b/org.eclipse.ui.workbench.texteditor/plugin.properties
@@ -11,8 +11,11 @@
pluginName= Text Editor Framework
providerName= Eclipse.org
+category.textEditor.name= Text Editing
+
+ExtPoint.referenceProvider= Reference Provider
+
textEditorNavigationActionSet.label= Editor Navigation
-textEditorAnnotationNavigationActionSet.label= Annotation Navigation
textEditorPresentationActionSet.label= Editor Presentation
goToLastEditPosition.label= Go to Last Edit Location
@@ -40,26 +43,115 @@ upperCase.label= To Upper Case
lowerCase.description= Changes the selection to lower case
lowerCase.label= To Lower Case
-markerAnnotationSpecification.label= Marker Annotation Specification
-
-errors.label= Errors
-warnings.label= Warnings
-infos.label= Infos
-tasks.label= Tasks
-bookmarks.label= Bookmarks
-changes.label= Diff Changes
-additions.label= Diff Additions
-deletions.label= Diff Deletions
-
-goToPreviousAnnotation.label= Go to Previous Annotation
-goToPreviousAnnotation.tooltip= Go to Previous Annotation
-goToNextAnnotation.label= Go to Next Annotation
-goToNextAnnotation.tooltip= Go to Next Annotation
-
-
-referenceProvider= Reference Provider
-
-quickdiff.toggle.enable= Enable &QuickDiff
-quickdiff.menu.label= Set QuickDiff Re&ference
-ActionDefinition.quickDiff.name= Quick Diff Toggle
-ActionDefinition.quickDiff.description= Toggles display of quick diff information on the line number ruler \ No newline at end of file
+command.clearMark.description = Clear the mark
+command.clearMark.name = Clear Mark
+command.contentAssistContextInformation.description= Show Context Information
+command.contentAssistContextInformation.name= Context Information
+command.contentAssistProposals.description= Content Assist
+command.contentAssistProposals.name= Content Assist
+command.deleteLine.description = Delete a line of text
+command.deleteLine.name = Delete Line
+command.cutLine.description = Cut a line of text
+command.cutLine.name = Cut Line
+command.deleteLineBeginning.description = Delete to the beginning of a line of text
+command.deleteLineBeginning.name = Delete to Beginning of Line
+command.cutLineBeginning.description = Cut to the beginning of a line of text
+command.cutLineBeginning.name = Cut to Beginning of Line
+command.deleteLineEnd.description = Delete to the end of a line of text
+command.deleteLineEnd.name = Delete to End of Line
+command.cutLineEnd.description = Cut to the end of a line of text
+command.cutLineEnd.name = Cut to End of Line
+command.deleteNext.description = Delete the next character
+command.deleteNext.name = Delete Next
+command.deletePreviousWord.description = Delete the previous word
+command.deletePreviousWord.name = Delete Previous Word
+command.deleteNextWord.description = Delete the next word
+command.deleteNextWord.name = Delete Next Word
+command.deletePrevious.description = Delete the previous character
+command.deletePrevious.name = Delete Previous
+command.findIncremental.description = Incremental find
+command.findIncremental.name = Incremental Find
+command.findIncrementalReverse.description = Incremental find reverse
+command.findIncrementalReverse.name = Incremental Find Reverse
+command.findNext.description = Find next item
+command.findNext.name = Find Next
+command.findPrevious.description = Find previous item
+command.findPrevious.name = Find Previous
+command.goToLine.description = Go to a certain line of text
+command.goToLine.name = Go to Line
+command.lineDown.description = Go down a line of text
+command.lineDown.name = Line Down
+command.lineEnd.description = Go to the end of the line of text
+command.lineEnd.name = Line End
+command.lineStart.description = Go to the start of the line of text
+command.lineStart.name = Line Start
+command.lineUp.description = Go up a line of text
+command.lineUp.name = Line Up
+command.nextColumn.description = Go to the next column
+command.nextColumn.name = Next Column
+command.nextWord.description = Go to the next word
+command.nextWord.name = Next Word
+command.pageDown.description = Go down a page
+command.pageDown.name = Page Down
+command.pageUp.description = Go up a page
+command.pageUp.name = Page Up
+command.previousColumn.description = Go to the previous column
+command.previousColumn.name = Previous Column
+command.previousWord.description = Go to the previous word
+command.previousWord.name = Previous Word
+command.revertToSaved.description = Revert to the state after the most recent save operation
+command.revertToSaved.name = Revert to Saved
+command.scrollLineDown.description = Scroll down a line of text
+command.scrollLineDown.name = Scroll Line Down
+command.scrollLineUp.description = Scroll up a line of text
+command.scrollLineUp.name = Scroll Line Up
+command.selectAll.description = Select all
+command.selectAll.name = Select All
+command.selectLineDown.description = Extend the selection to the next line of text
+command.selectLineDown.name = Select Line Down
+command.selectLineEnd.description = Select to the end of the line of text
+command.selectLineEnd.name = Select Line End
+command.selectLineStart.description = Select to the start of the line of text
+command.selectLineStart.name = Select Line Start
+command.selectLineUp.description = Extend the selection to the previous line of text
+command.selectLineUp.name = Select Line Up
+command.selectNextColumn.description = Select the next column
+command.selectNextColumn.name = Select Next Column
+command.selectPageDown.description = Select to the bottom of the page
+command.selectPageDown.name = Select Page Down
+command.selectPageUp.description = Select to the top of the page
+command.selectPageUp.name = Select Page Up
+command.selectPreviousColumn.description = Select the previous column
+command.selectPreviousColumn.name = Select Previous Column
+command.selectTextEnd.description = Select to the end of the text
+command.selectTextEnd.name = Select Text End
+command.selectTextStart.description = Select to the start of the text
+command.selectTextStart.name = Select Text Start
+command.selectWindowEnd.description = Select to the end of the window
+command.selectWindowEnd.name = Select Window End
+command.selectWindowStart.description = Select to the start of the window
+command.selectWindowStart.name = Select Window Start
+command.selectWordNext.description = Select the next word
+command.selectWordNext.name = Select Next Word
+command.selectWordPrevious.description = Select the previous word
+command.selectWordPrevious.name = Select Previous Word
+command.setMark.description = Set the mark
+command.setMark.name = Set Mark
+command.shiftLeft.description = Shift a block of text to the left
+command.shiftLeft.name = Shift Left
+command.shiftRight.description = Shift a block of text to the right
+command.shiftRight.name = Shift Right
+command.showRulerContextMenu.description = Show the context menu for the ruler
+command.showRulerContextMenu.name = Show Ruler Context Menu
+command.swapMark.description = Swap the mark with the cursor position
+command.swapMark.name = Swap Mark
+command.textEnd.description = Go to the end of the text
+command.textEnd.name = Text End
+command.textStart.description = Go to the start of the text
+command.textStart.name = Text Start
+command.toggleOverwrite.description = Toggle input mode
+command.toggleOverwrite.name = Toggle Overwrite
+command.windowEnd.description = Go to the end of the window
+command.windowEnd.name = Window End
+command.windowStart.description = Go to the start of the window
+command.windowStart.name = Window Start
diff --git a/org.eclipse.ui.workbench.texteditor/plugin.xml b/org.eclipse.ui.workbench.texteditor/plugin.xml
index f1d7a34f8..f73c0e667 100644
--- a/org.eclipse.ui.workbench.texteditor/plugin.xml
+++ b/org.eclipse.ui.workbench.texteditor/plugin.xml
@@ -14,496 +14,1002 @@
</library>
</runtime>
<requires>
- <import plugin="org.eclipse.text"/>
- <import plugin="org.eclipse.jface"/>
<import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.workbench"/>
- <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.ui"/>
</requires>
- <extension-point id="markerAnnotationSpecification" name="%markerAnnotationSpecification.label" schema="schema/markerAnnotationSpecification.exsd"/>
-<!-- quick diff reference provider extension point -->
- <extension-point id="quickDiffReferenceProvider" name="%referenceProvider" schema="schema/quickDiffReferenceProvider.exsd"/>
-
-
-<!-- commands and their bindings -->
- <extension
- point="org.eclipse.ui.commands">
+ <extension-point id="quickDiffReferenceProvider" name="%ExtPoint.referenceProvider" schema="schema/quickDiffReferenceProvider.exsd"/>
+
+
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ name="%category.textEditor.name"
+ description="%category.textEditor.description"
+ id="org.eclipse.ui.category.textEditor">
+ </category>
+ <command
+ name="%command.deleteLine.name"
+ description="%command.deleteLine.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.delete.line">
+ </command>
+ <command
+ name="%command.cutLine.name"
+ description="%command.cutLine.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.cut.line">
+ </command>
+ <command
+ name="%command.deleteLineBeginning.name"
+ description="%command.deleteLineBeginning.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.delete.line.to.beginning">
+ </command>
+ <command
+ name="%command.cutLineBeginning.name"
+ description="%command.cutLineBeginning.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.cut.line.to.beginning">
+ </command>
+ <command
+ name="%command.deleteLineEnd.name"
+ description="%command.deleteLineEnd.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.delete.line.to.end">
+ </command>
+ <command
+ name="%command.cutLineEnd.name"
+ description="%command.cutLineEnd.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.cut.line.to.end">
+ </command>
+ <command
+ name="%command.setMark.name"
+ description="%command.setMark.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.set.mark">
+ </command>
+ <command
+ name="%command.clearMark.name"
+ description="%command.clearMark.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.clear.mark">
+ </command>
+ <command
+ name="%command.swapMark.name"
+ description="%command.swapMark.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.swap.mark">
+ </command>
+ <command
+ name="%command.findNext.name"
+ description="%command.findNext.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.findNext">
+ </command>
+ <command
+ name="%command.findPrevious.name"
+ description="%command.findPrevious.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.findPrevious">
+ </command>
+ <command
+ name="%command.findIncremental.name"
+ description="%command.findIncremental.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.findIncremental">
+ </command>
+ <command
+ name="%command.findIncrementalReverse.name"
+ description="%command.findIncrementalReverse.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.findIncrementalReverse">
+ </command>
+ <command
+ name="%command.revertToSaved.name"
+ description="%command.revertToSaved.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.revertToSaved">
+ </command>
+ <command
+ name="%command.lineUp.name"
+ description="%command.lineUp.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.goto.lineUp">
+ </command>
+ <command
+ name="%command.lineDown.name"
+ description="%command.lineDown.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.goto.lineDown">
+ </command>
+ <command
+ name="%command.lineStart.name"
+ description="%command.lineStart.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.goto.lineStart">
+ </command>
+ <command
+ name="%command.lineEnd.name"
+ description="%command.lineEnd.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.goto.lineEnd">
+ </command>
+ <command
+ name="%command.goToLine.name"
+ description="%command.goToLine.description"
+ categoryId="org.eclipse.ui.category.navigate"
+ id="org.eclipse.ui.edit.text.goto.line">
+ </command>
+ <command
+ name="%command.previousColumn.name"
+ description="%command.previousColumn.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.goto.columnPrevious">
+ </command>
+ <command
+ name="%command.nextColumn.name"
+ description="%command.nextColumn.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.goto.columnNext">
+ </command>
+ <command
+ name="%command.pageUp.name"
+ description="%command.pageUp.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.goto.pageUp">
+ </command>
+ <command
+ name="%command.pageDown.name"
+ description="%command.pageDown.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.goto.pageDown">
+ </command>
+ <command
+ name="%command.previousWord.name"
+ description="%command.previousWord.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.goto.wordPrevious">
+ </command>
+ <command
+ name="%command.nextWord.name"
+ description="%command.nextWord.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.goto.wordNext">
+ </command>
+ <command
+ name="%command.textStart.name"
+ description="%command.textStart.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.goto.textStart">
+ </command>
+ <command
+ name="%command.textEnd.name"
+ description="%command.textEnd.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.goto.textEnd">
+ </command>
+ <command
+ name="%command.windowStart.name"
+ description="%command.windowStart.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.goto.windowStart">
+ </command>
+ <command
+ name="%command.windowEnd.name"
+ description="%command.windowEnd.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.goto.windowEnd">
+ </command>
+ <command
+ name="%command.scrollLineUp.name"
+ description="%command.scrollLineUp.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.scroll.lineUp">
+ </command>
+ <command
+ name="%command.scrollLineDown.name"
+ description="%command.scrollLineDown.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.scroll.lineDown">
+ </command>
+ <command
+ name="%command.selectLineUp.name"
+ description="%command.selectLineUp.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.select.lineUp">
+ </command>
+ <command
+ name="%command.selectLineDown.name"
+ description="%command.selectLineDown.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.select.lineDown">
+ </command>
+ <command
+ name="%command.selectLineStart.name"
+ description="%command.selectLineStart.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.select.lineStart">
+ </command>
+ <command
+ name="%command.selectLineEnd.name"
+ description="%command.selectLineEnd.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.select.lineEnd">
+ </command>
+ <command
+ name="%command.selectPreviousColumn.name"
+ description="%command.selectPreviousColumn.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.select.columnPrevious">
+ </command>
+ <command
+ name="%command.selectNextColumn.name"
+ description="%command.selectNextColumn.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.select.columnNext">
+ </command>
+ <command
+ name="%command.selectPageUp.name"
+ description="%command.selectPageUp.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.select.pageUp">
+ </command>
+ <command
+ name="%command.selectPageDown.name"
+ description="%command.selectPageDown.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.select.pageDown">
+ </command>
+ <command
+ name="%command.selectWordPrevious.name"
+ description="%command.selectWordPrevious.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.select.wordPrevious">
+ </command>
+ <command
+ name="%command.selectWordNext.name"
+ description="%command.selectWordNext.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.select.wordNext">
+ </command>
+ <command
+ name="%command.selectTextStart.name"
+ description="%command.selectTextStart.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.select.textStart">
+ </command>
+ <command
+ name="%command.selectTextEnd.name"
+ description="%command.selectTextEnd.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.select.textEnd">
+ </command>
+ <command
+ name="%command.selectWindowStart.name"
+ description="%command.selectWindowStart.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.select.windowStart">
+ </command>
+ <command
+ name="%command.selectWindowEnd.name"
+ description="%command.selectWindowEnd.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.select.windowEnd">
+ </command>
+ <command
+ name="%command.deletePrevious.name"
+ description="%command.deletePrevious.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.deletePrevious">
+ </command>
+ <command
+ name="%command.deleteNext.name"
+ description="%command.deleteNext.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.deleteNext">
+ </command>
+ <command
+ name="%command.deletePreviousWord.name"
+ description="%command.deletePreviousWord.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.deletePreviousWord">
+ </command>
+ <command
+ name="%command.deleteNextWord.name"
+ description="%command.deleteNextWord.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.deleteNextWord">
+ </command>
+ <command
+ name="%command.shiftRight.name"
+ description="%command.shiftRight.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.text.shiftRight">
+ </command>
+ <command
+ name="%command.shiftLeft.name"
+ description="%command.shiftLeft.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.text.shiftLeft">
+ </command>
+ <command
+ name="%command.toggleOverwrite.name"
+ description="%command.toggleOverwrite.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.toggleOverwrite">
+ </command>
+ <command
+ name="%command.showRulerContextMenu.name"
+ description="%command.showRulerContextMenu.description"
+ categoryId="org.eclipse.ui.category.window"
+ id="org.eclipse.ui.edit.text.showRulerContextMenu">
+ </command>
+ <command
+ name="%goToLastEditPosition.label"
+ description="%goToLastEditPosition.description"
+ category="org.eclipse.ui.category.navigate"
+ id="org.eclipse.ui.edit.text.gotoLastEditPosition">
+ </command>
+ <command
+ name="%smartEnter.label"
+ description="%smartEnter.description"
+ category="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.smartEnter">
+ </command>
+ <command
+ name="%smartEnterInverse.label"
+ description="%smartEnterInverse.description"
+ category="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.smartEnterInverse">
+ </command>
+ <command
+ name="%moveLineUp.label"
+ description="%moveLineUp.description"
+ category="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.moveLineUp">
+ </command>
+ <command
+ name="%moveLineDown.label"
+ description="%moveLineDown.description"
+ category="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.moveLineDown">
+ </command>
+ <command
+ name="%copyLineUp.label"
+ description="%copyLineUp.description"
+ category="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.copyLineUp">
+ </command>
+ <command
+ name="%copyLineDown.label"
+ description="%copyLineDown.description"
+ category="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.copyLineDown">
+ </command>
+ <command
+ name="%upperCase.label"
+ description="%upperCase.description"
+ category="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.upperCase">
+ </command>
+ <command
+ name="%lowerCase.label"
+ description="%lowerCase.description"
+ category="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.lowerCase">
+ </command>
+ <command
+ name="%onlyShowSelectedElement.label"
+ description="%onlyShowSelectedElement.description"
+ category="org.eclipse.ui.category.window"
+ id="org.eclipse.ui.edit.text.toggleShowSelectedElementOnly">
+ </command>
+ <command
+ name="%command.contentAssistProposals.name"
+ description="%command.contentAssistProposals.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.text.contentAssist.proposals">
+ </command>
<command
- category="org.eclipse.ui.category.navigate"
- name="%goToLastEditPosition.label"
- description="%goToLastEditPosition.description"
- id="org.eclipse.ui.edit.text.gotoLastEditPosition">
+ name="%command.contentAssistContextInformation.name"
+ description="%command.contentAssistContextInformation.description"
+ categoryId="org.eclipse.ui.category.edit"
+ id="org.eclipse.ui.edit.text.contentAssist.contextInformation">
</command>
+
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.delete.line"
+ keySequence="Ctrl+E">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.delete.line.to.end"
+ keySequence="Ctrl+Shift+E">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.findNext"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+K">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.findPrevious"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+Shift+K">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.findIncremental"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+J">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.findIncrementalReverse"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+Shift+J">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.line"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+L">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.scroll.lineUp"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+Arrow_Up">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.scroll.lineDown"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+Arrow_Down">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.toggleOverwrite"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Insert">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.showRulerContextMenu"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+W">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.contentAssist.proposals"
+ keySequence="Ctrl+Space">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.contentAssist.contextInformation"
+ keySequence="Ctrl+Shift+Space">
+ </keyBinding>
+ <keyBinding
+ string="Ctrl+Q"
+ scope="org.eclipse.ui.globalScope"
+ command="org.eclipse.ui.edit.text.gotoLastEditPosition"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ string="Shift+ENTER"
+ scope="org.eclipse.ui.textEditorScope"
+ command="org.eclipse.ui.edit.text.smartEnter"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ string="Ctrl+Shift+ENTER"
+ scope="org.eclipse.ui.textEditorScope"
+ command="org.eclipse.ui.edit.text.smartEnterInverse"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ string="Alt+ARROW_UP"
+ scope="org.eclipse.ui.textEditorScope"
+ command="org.eclipse.ui.edit.text.moveLineUp"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ string="Alt+ARROW_DOWN"
+ scope="org.eclipse.ui.textEditorScope"
+ command="org.eclipse.ui.edit.text.moveLineDown"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ string="Alt+Ctrl+ARROW_UP"
+ scope="org.eclipse.ui.textEditorScope"
+ command="org.eclipse.ui.edit.text.copyLineUp"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ string="Alt+Ctrl+ARROW_DOWN"
+ scope="org.eclipse.ui.textEditorScope"
+ command="org.eclipse.ui.edit.text.copyLineDown"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ string="Ctrl+Shift+X"
+ scope="org.eclipse.ui.textEditorScope"
+ command="org.eclipse.ui.edit.text.upperCase"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ string="Ctrl+Shift+Y"
+ scope="org.eclipse.ui.textEditorScope"
+ command="org.eclipse.ui.edit.text.lowerCase"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ string=""
+ scope="org.eclipse.ui.textEditorScope"
+ command="org.eclipse.ui.edit.text.toggleShowSelectedElementOnly"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ string="Ctrl+Arrow_Right"
+ scope="org.eclipse.ui.textEditorScope"
+ command="org.eclipse.ui.edit.text.goto.wordNext"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ string="Ctrl+Arrow_Left"
+ scope="org.eclipse.ui.textEditorScope"
+ command="org.eclipse.ui.edit.text.goto.wordPrevious"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ string="Ctrl+Delete"
+ scope="org.eclipse.ui.textEditorScope"
+ command="org.eclipse.ui.edit.text.deleteNextWord"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ string="Ctrl+Backspace"
+ scope="org.eclipse.ui.textEditorScope"
+ command="org.eclipse.ui.edit.text.deletePreviousWord"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ string="Ctrl+Shift+Arrow_Right"
+ scope="org.eclipse.ui.textEditorScope"
+ command="org.eclipse.ui.edit.text.select.wordNext"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ string="Ctrl+Shift+Arrow_Left"
+ scope="org.eclipse.ui.textEditorScope"
+ command="org.eclipse.ui.edit.text.select.wordPrevious"
+ configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </keyBinding>
<keyBinding
- string="Ctrl+Q"
- scope="org.eclipse.ui.globalScope"
- command="org.eclipse.ui.edit.text.gotoLastEditPosition"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ locale="zh"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+Space">
</keyBinding>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%smartEnter.label"
- description="%smartEnter.description"
- category="org.eclipse.ui.category.textEditor"
- id="org.eclipse.ui.edit.text.smartEnter">
- </command>
<keyBinding
- string="Shift+ENTER"
- scope="org.eclipse.ui.textEditorScope"
- command="org.eclipse.ui.edit.text.smartEnter"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ locale="zh"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+Shift+Space">
</keyBinding>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%smartEnterInverse.label"
- description="%smartEnterInverse.description"
- category="org.eclipse.ui.category.textEditor"
- id="org.eclipse.ui.edit.text.smartEnterInverse">
- </command>
<keyBinding
- string="Ctrl+Shift+ENTER"
- scope="org.eclipse.ui.textEditorScope"
- command="org.eclipse.ui.edit.text.smartEnterInverse"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ locale="zh"
+ commandId="org.eclipse.ui.edit.text.contentAssist.proposals"
+ keySequence="Alt+/">
</keyBinding>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%moveLineUp.label"
- description="%moveLineUp.description"
- category="org.eclipse.ui.category.textEditor"
- id="org.eclipse.ui.edit.text.moveLineUp">
- </command>
<keyBinding
- string="Alt+ARROW_UP"
- scope="org.eclipse.ui.textEditorScope"
- command="org.eclipse.ui.edit.text.moveLineUp"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ locale="zh"
+ commandId="org.eclipse.ui.edit.text.contentAssist.contextInformation"
+ keySequence="Alt+?">
</keyBinding>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%moveLineDown.label"
- description="%moveLineDown.description"
- category="org.eclipse.ui.category.textEditor"
- id="org.eclipse.ui.edit.text.moveLineDown">
- </command>
<keyBinding
- string="Alt+ARROW_DOWN"
- scope="org.eclipse.ui.textEditorScope"
- command="org.eclipse.ui.edit.text.moveLineDown"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ locale="zh"
+ commandId="org.eclipse.ui.edit.text.contentAssist.contextInformation"
+ keySequence="Alt+Shift+?">
</keyBinding>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%copyLineUp.label"
- description="%copyLineUp.description"
- category="org.eclipse.ui.category.textEditor"
- id="org.eclipse.ui.edit.text.copyLineUp">
- </command>
<keyBinding
- string="Alt+Ctrl+ARROW_UP"
- scope="org.eclipse.ui.textEditorScope"
- command="org.eclipse.ui.edit.text.copyLineUp"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ platform="carbon"
+ keySequence="Ctrl+E">
</keyBinding>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%copyLineDown.label"
- description="%copyLineDown.description"
- category="org.eclipse.ui.category.textEditor"
- id="org.eclipse.ui.edit.text.copyLineDown">
- </command>
<keyBinding
- string="Alt+Ctrl+ARROW_DOWN"
- scope="org.eclipse.ui.textEditorScope"
- command="org.eclipse.ui.edit.text.copyLineDown"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ platform="carbon"
+ keySequence="Ctrl+Shift+E">
</keyBinding>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%upperCase.label"
- description="%upperCase.description"
- category="org.eclipse.ui.category.textEditor"
- id="org.eclipse.ui.edit.text.upperCase">
- </command>
<keyBinding
- string="Ctrl+Shift+X"
- scope="org.eclipse.ui.textEditorScope"
- command="org.eclipse.ui.edit.text.upperCase"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ platform="carbon"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+K">
</keyBinding>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%lowerCase.label"
- description="%lowerCase.description"
- category="org.eclipse.ui.category.textEditor"
- id="org.eclipse.ui.edit.text.lowerCase">
- </command>
<keyBinding
- string="Ctrl+Shift+Y"
- scope="org.eclipse.ui.textEditorScope"
- command="org.eclipse.ui.edit.text.lowerCase"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ platform="carbon"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+Shift+K">
</keyBinding>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- category="org.eclipse.ui.category.window"
- id="org.eclipse.ui.edit.text.toggleShowSelectedElementOnly"
- name= "%onlyShowSelectedElement.label"
- description="%onlyShowSelectedElement.description">
- </command>
- <keyBinding
- string=""
- scope="org.eclipse.ui.textEditorScope"
- command="org.eclipse.ui.edit.text.toggleShowSelectedElementOnly"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
- </keyBinding>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
<keyBinding
- string="Ctrl+Arrow_Right"
- scope="org.eclipse.ui.textEditorScope"
- command="org.eclipse.ui.edit.text.goto.wordNext"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ platform="carbon"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+J">
</keyBinding>
<keyBinding
- string="Ctrl+Arrow_Left"
- scope="org.eclipse.ui.textEditorScope"
- command="org.eclipse.ui.edit.text.goto.wordPrevious"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ platform="carbon"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+Shift+J">
</keyBinding>
<keyBinding
- string="Ctrl+Delete"
- scope="org.eclipse.ui.textEditorScope"
- command="org.eclipse.ui.edit.text.deleteNextWord"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ platform="carbon"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+L">
</keyBinding>
<keyBinding
- string="Ctrl+Backspace"
- scope="org.eclipse.ui.textEditorScope"
- command="org.eclipse.ui.edit.text.deletePreviousWord"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
+ platform="carbon"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+Arrow_Up">
</keyBinding>
<keyBinding
- command="org.eclipse.ui.edit.text.select.wordNext"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration"
- scope="org.eclipse.ui.textEditorScope"
- string="Ctrl+Shift+Arrow_Right">
+ platform="carbon"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+Arrow_Down">
</keyBinding>
<keyBinding
- command="org.eclipse.ui.edit.text.select.wordPrevious"
- scope="org.eclipse.ui.textEditorScope"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration"
- string="Ctrl+Shift+Arrow_Left">
+ platform="carbon"
+ commandId="org.eclipse.ui.edit.text.delete.line"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Command+E">
</keyBinding>
- </extension>
-
-<!-- action sets -->
- <extension
+ <keyBinding
+ platform="carbon"
+ commandId="org.eclipse.ui.edit.text.delete.line.to.end"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Command+Shift+E">
+ </keyBinding>
+ <keyBinding
+ platform="carbon"
+ commandId="org.eclipse.ui.edit.findNext"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Command+K">
+ </keyBinding>
+ <keyBinding
+ platform="carbon"
+ commandId="org.eclipse.ui.edit.findPrevious"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Command+Shift+K">
+ </keyBinding>
+ <keyBinding
+ platform="carbon"
+ commandId="org.eclipse.ui.edit.findIncremental"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Command+J">
+ </keyBinding>
+ <keyBinding
+ platform="carbon"
+ commandId="org.eclipse.ui.edit.findIncrementalReverse"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Command+Shift+J">
+ </keyBinding>
+ <keyBinding
+ platform="carbon"
+ commandId="org.eclipse.ui.edit.text.goto.line"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Command+L">
+ </keyBinding>
+ <keyBinding
+ platform="carbon"
+ commandId="org.eclipse.ui.edit.text.scroll.lineUp"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Command+Arrow_Up">
+ </keyBinding>
+ <keyBinding
+ platform="carbon"
+ commandId="org.eclipse.ui.edit.text.scroll.lineDown"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Command+Arrow_Down">
+ </keyBinding>
+ <keyBinding
+ platform="carbon"
+ commandId="org.eclipse.ui.edit.text.contentAssist.proposals"
+ keySequence="Command+Space">
+ </keyBinding>
+ <keyBinding
+ platform="carbon"
+ commandId="org.eclipse.ui.edit.text.contentAssist.contextInformation"
+ keySequence="Command+Shift+Space">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.cut.line.to.beginning"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Alt+0 Ctrl+K"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.cut.line.to.beginning"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Esc 0 Ctrl+K"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.cut.line.to.end"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+K"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.set.mark"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+Space"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.set.mark"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+2"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.clear.mark"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+G"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.swap.mark"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+X Ctrl+X"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.findIncremental"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+S"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.findIncrementalReverse"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+R"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.lineUp"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+P"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.lineDown"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+N"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.lineStart"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+A"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.lineEnd"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+E"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.line"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+X G"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.columnPrevious"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+B"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.columnNext"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+F"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.pageUp"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Alt+V"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.pageUp"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Esc V"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.pageDown"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+V"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.wordPrevious"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Alt+B"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.wordPrevious"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Esc B"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.wordNext"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Alt+F"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.wordNext"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Esc F"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.textStart"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Alt+&lt;"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.textStart"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Alt+Shift+&lt;"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.textStart"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Esc &lt;"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.textStart"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Esc Shift+&lt;"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.textStart"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+X ["
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.textEnd"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Alt+&gt;"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.textEnd"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Alt+Shift+&gt;"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.textEnd"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Esc &gt;"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.textEnd"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Esc Shift+&gt;"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.goto.textEnd"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+X ]"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.scroll.lineUp"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Alt+Z"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.scroll.lineUp"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Esc Z"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.scroll.lineDown"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+Z"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.deleteNext"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Ctrl+D"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.deletePreviousWord"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Alt+Bs"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.deletePreviousWord"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Esc Bs"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.deleteNextWord"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Alt+D"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.deleteNextWord"
+ contextId="org.eclipse.ui.textEditorScope"
+ keySequence="Esc D"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.contentAssist.proposals"
+ keySequence="Alt+/"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.contentAssist.contextInformation"
+ keySequence="Alt+?"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ <keyBinding
+ commandId="org.eclipse.ui.edit.text.contentAssist.contextInformation"
+ keySequence="Alt+Shift+?"
+ keyConfigurationId="org.eclipse.ui.emacsAcceleratorConfiguration">
+ </keyBinding>
+ </extension>
+
+ <extension
point="org.eclipse.ui.actionSets">
<actionSet
label="%textEditorPresentationActionSet.label"
visible="false"
id="org.eclipse.ui.edit.text.actionSet.presentation">
<action
- label="%onlyShowSelectedElement.label"
- tooltip="%onlyShowSelectedElement.tooltip"
+ allowLabelUpdate="true"
+ style="toggle"
toolbarPath="Normal/Presentation"
id="org.eclipse.ui.edit.text.toggleShowSelectedElementOnly"
+ hoverIcon="icons/full/ctool16/segment_edit.gif"
definitionId="org.eclipse.ui.edit.text.toggleShowSelectedElementOnly"
- retarget="true"
- allowLabelUpdate="true"
- style="toggle"
- icon="icons/full/etool16/segment_edit.gif"
disabledIcon="icons/full/dtool16/segment_edit.gif"
- hoverIcon="icons/full/ctool16/segment_edit.gif"
- helpContextId="only_show_selected_element_action_context"/>
+ icon="icons/full/etool16/segment_edit.gif"
+ helpContextId="only_show_selected_element_action_context"
+ label="%onlyShowSelectedElement.label"
+ retarget="true"
+ tooltip="%onlyShowSelectedElement.tooltip">
+ </action>
</actionSet>
<actionSet
label="%textEditorNavigationActionSet.label"
visible="true"
id="org.eclipse.ui.edit.text.actionSet.navigation">
<action
- id="org.eclipse.ui.edit.text.gotoLastEditPosition"
- label="%goToLastEditPosition.label"
- tooltip="%goToLastEditPosition.tooltip"
toolbarPath="org.eclipse.ui.workbench.navigate/history.group"
- menubarPath="navigate/"
+ id="org.eclipse.ui.edit.text.gotoLastEditPosition"
+ hoverIcon="icons/full/ctool16/last_edit_pos.gif"
class="org.eclipse.ui.internal.texteditor.GotoLastEditPositionAction"
definitionId="org.eclipse.ui.edit.text.gotoLastEditPosition"
- icon="icons/full/etool16/last_edit_pos.gif"
disabledIcon="icons/full/dtool16/last_edit_pos.gif"
- hoverIcon="icons/full/ctool16/last_edit_pos.gif"
- helpContextId="goto_last_edit_position_action_context"/>
- </actionSet>
- <actionSet
- label="%textEditorAnnotationNavigationActionSet.label"
- visible="false"
- id="org.eclipse.ui.edit.text.actionSet.annotationNavigation">
- <action id="org.eclipse.ui.edit.text.gotoPreviousAnnotation"
- label="%goToPreviousAnnotation.label"
- tooltip="%goToPreviousAnnotation.tooltip"
- toolbarPath="org.eclipse.ui.workbench.navigate/history.group"
- retarget="true"
- style="pulldown"
- allowLabelUpdate="true"
- definitionId="org.eclipse.ui.navigate.previous"
- icon="icons/full/etool16/prev_nav.gif"
- disabledIcon="icons/full/dtool16/prev_nav.gif"
- hoverIcon="icons/full/ctool16/prev_nav.gif"
- class="org.eclipse.ui.internal.texteditor.PreviousPulldownActionDelegate"/>
- <action id="org.eclipse.ui.edit.text.gotoNextAnnotation"
- label="%goToNextAnnotation.label"
- tooltip="%goToNextAnnotation.tooltip"
- toolbarPath="org.eclipse.ui.workbench.navigate/history.group"
- retarget="true"
- style="pulldown"
- allowLabelUpdate="true"
- definitionId="org.eclipse.ui.navigate.next"
- icon="icons/full/etool16/next_nav.gif"
- disabledIcon="icons/full/dtool16/next_nav.gif"
- hoverIcon="icons/full/ctool16/next_nav.gif"
- class="org.eclipse.ui.internal.texteditor.NextPulldownActionDelegate"/>
- </actionSet>
- </extension>
-<!-- marker annotation types -->
- <extension
- point="org.eclipse.ui.workbench.texteditor.markerAnnotationSpecification">
- <specification
- annotationType="org.eclipse.ui.workbench.texteditor.error"
- label="%errors.label"
- markerType="org.eclipse.core.resources.problemmarker"
- markerSeverity="2"
- textPreferenceKey="errorIndication"
- textPreferenceValue="true"
- overviewRulerPreferenceKey="errorIndicationInOverviewRuler"
- overviewRulerPreferenceValue="true"
- verticalRulerPreferenceKey="errorIndicationInVerticalRuler"
- verticalRulerPreferenceValue="true"
- colorPreferenceKey="errorIndicationColor"
- colorPreferenceValue="255,0,128"
- presentationLayer="6"
- contributesToHeader="true"
- showInNextPrevDropdownToolbarActionKey="showErrorInNextPrevDropdownToolbarAction"
- showInNextPrevDropdownToolbarAction="true"
- isGoToNextNavigationTargetKey="isErrorGoToNextNavigationTarget"
- isGoToNextNavigationTarget="true"
- isGoToPreviousNavigationTargetKey="isErrorGoToPreviousNavigationTarget"
- isGoToPreviousNavigationTarget="true">
- </specification>
- <specification
- annotationType="org.eclipse.ui.workbench.texteditor.warning"
- label="%warnings.label"
- markerType="org.eclipse.core.resources.problemmarker"
- markerSeverity="1"
- textPreferenceKey="warningIndication"
- textPreferenceValue="true"
- overviewRulerPreferenceKey="warningIndicationInOverviewRuler"
- overviewRulerPreferenceValue="true"
- verticalRulerPreferenceKey="warningIndicationInVerticalRuler"
- verticalRulerPreferenceValue="true"
- colorPreferenceKey="warningIndicationColor"
- colorPreferenceValue="244,200,45"
- presentationLayer="5"
- contributesToHeader="true"
- showInNextPrevDropdownToolbarActionKey="showWarningInNextPrevDropdownToolbarAction"
- showInNextPrevDropdownToolbarAction="true"
- isGoToNextNavigationTargetKey="isWarningGoToNextNavigationTarget"
- isGoToNextNavigationTarget="true"
- isGoToPreviousNavigationTargetKey="isWarningGoToPreviousNavigationTarget"
- isGoToPreviousNavigationTarget="true">
- </specification>
- <specification
- annotationType="org.eclipse.ui.workbench.texteditor.info"
- label="%infos.label"
- markerType="org.eclipse.core.resources.problemmarker"
- textPreferenceKey="infoIndication"
- textPreferenceValue="false"
- overviewRulerPreferenceKey="infoIndicationInOverviewRuler"
- overviewRulerPreferenceValue="true"
- verticalRulerPreferenceKey="infoIndicationInVerticalRuler"
- verticalRulerPreferenceValue="true"
- colorPreferenceKey="infoIndicationColor"
- colorPreferenceValue="244,200,45"
- presentationLayer="4"
- contributesToHeader="false"
- showInNextPrevDropdownToolbarActionKey="showInfoInNextPrevDropdownToolbarAction"
- showInNextPrevDropdownToolbarAction="true"
- isGoToNextNavigationTargetKey="isInfoGoToNextNavigationTarget"
- isGoToNextNavigationTarget="false"
- isGoToPreviousNavigationTargetKey="isInfoGoToPreviousNavigationTarget"
- isGoToPreviousNavigationTarget="false">
- </specification>
- <specification
- annotationType="org.eclipse.ui.workbench.texteditor.task"
- label="%tasks.label"
- markerType="org.eclipse.core.resources.taskmarker"
- textPreferenceKey="taskIndication"
- textPreferenceValue="false"
- overviewRulerPreferenceKey="taskIndicationInOverviewRuler"
- overviewRulerPreferenceValue="true"
- verticalRulerPreferenceKey="taskIndicationInVerticalRuler"
- verticalRulerPreferenceValue="true"
- colorPreferenceKey="taskIndicationColor"
- colorPreferenceValue="0,128,255"
- presentationLayer="2"
- contributesToHeader="false"
- showInNextPrevDropdownToolbarActionKey="showTaskInNextPrevDropdownToolbarAction"
- showInNextPrevDropdownToolbarAction="true"
- isGoToNextNavigationTargetKey="isTaskGoToNextNavigationTarget"
- isGoToNextNavigationTarget="false"
- isGoToPreviousNavigationTargetKey="isTaskGoToPreviousNavigationTarget"
- isGoToPreviousNavigationTarget="false">
- </specification>
- <specification
- annotationType="org.eclipse.ui.workbench.texteditor.bookmark"
- label="%bookmarks.label"
- markerType="org.eclipse.core.resources.bookmark"
- textPreferenceKey="bookmarkIndication"
- textPreferenceValue="false"
- overviewRulerPreferenceKey="bookmarkIndicationInOverviewRuler"
- overviewRulerPreferenceValue="true"
- verticalRulerPreferenceKey="bookmarkIndicationInVerticalRuler"
- verticalRulerPreferenceValue="true"
- colorPreferenceKey="bookmarkIndicationColor"
- colorPreferenceValue="34,164,99"
- presentationLayer="1"
- contributesToHeader="false"
- showInNextPrevDropdownToolbarActionKey="showBookmarkInNextPrevDropdownToolbarAction"
- showInNextPrevDropdownToolbarAction="true"
- isGoToNextNavigationTargetKey="isBookmarkGoToNextNavigationTarget"
- isGoToNextNavigationTarget="false"
- isGoToPreviousNavigationTargetKey="isBookmarkGoToPreviousNavigationTarget"
- isGoToPreviousNavigationTarget="false">
- </specification>
-
- <!-- change information annotations -->
- <specification
- annotationType="org.eclipse.ui.workbench.texteditor.quickdiffChange"
- label="%changes.label"
- markerType="org.eclipse.quickdiff.changeindication"
- textPreferenceKey="changeIndication"
- textPreferenceValue="false"
- overviewRulerPreferenceKey="changeIndicationInOverviewRuler"
- overviewRulerPreferenceValue="false"
- colorPreferenceKey="changeIndicationColor"
- colorPreferenceValue="204,163,205"
- presentationLayer="2"
- contributesToHeader="false"
- showInNextPrevDropdownToolbarActionKey="showChangeInNextPrevDropdownToolbarAction"
- showInNextPrevDropdownToolbarAction="true"
- isGoToNextNavigationTargetKey="isChangeGoToNextNavigationTarget"
- isGoToNextNavigationTarget="false"
- isGoToPreviousNavigationTargetKey="isChangeGoToPreviousNavigationTarget"
- isGoToPreviousNavigationTarget="false">
- </specification>
- <specification
- annotationType="org.eclipse.ui.workbench.texteditor.quickdiffAddition"
- label="%additions.label"
- markerType="org.eclipse.quickdiff.additionindication"
- textPreferenceKey="additionIndication"
- textPreferenceValue="false"
- overviewRulerPreferenceKey="additionIndicationInOverviewRuler"
- overviewRulerPreferenceValue="false"
- colorPreferenceKey="additionIndicationColor"
- colorPreferenceValue="188,188,222"
- presentationLayer="2"
- contributesToHeader="false"
- showInNextPrevDropdownToolbarActionKey="showAdditionInNextPrevDropdownToolbarAction"
- showInNextPrevDropdownToolbarAction="false"
- isGoToNextNavigationTargetKey="isAdditionGoToNextNavigationTarget"
- isGoToNextNavigationTarget="false"
- isGoToPreviousNavigationTargetKey="isAdditionGoToPreviousNavigationTarget"
- isGoToPreviousNavigationTarget="false">
- </specification>
- <specification
- annotationType="org.eclipse.ui.workbench.texteditor.quickdiffDeletion"
- label="%deletions.label"
- markerType="org.eclipse.quickdiff.deletionindication"
- textPreferenceKey="deletionIndication"
- textPreferenceValue="false"
- overviewRulerPreferenceKey="deletionIndicationInOverviewRuler"
- overviewRulerPreferenceValue="false"
- colorPreferenceKey="deletionIndicationColor"
- colorPreferenceValue="0,0,0"
- presentationLayer="2"
- contributesToHeader="false"
- showInNextPrevDropdownToolbarActionKey="showDeletionInNextPrevDropdownToolbarAction"
- showInNextPrevDropdownToolbarAction="false"
- isGoToNextNavigationTargetKey="isDeletionGoToNextNavigationTarget"
- isGoToNextNavigationTarget="false"
- isGoToPreviousNavigationTargetKey="isDeletionGoToPreviousNavigationTarget"
- isGoToPreviousNavigationTarget="false">
- </specification>
- </extension>
-
-<!-- add the quick diff context menu -->
- <extension
- point="org.eclipse.ui.popupMenus">
-<!-- default -->
- <viewerContribution
- targetID="#RulerContext"
- id="org.eclipse.ui.quickdiff.DefaultEditorContribution">
- <action
- label="%quickdiff.toggle.enable"
- style="push"
- helpContextId="quickdiff.toggle"
- class="org.eclipse.ui.texteditor.quickdiff.QuickDiffToggleAction"
- menubarPath="quickdiff"
- id="quickdiff.toggle">
- </action>
- </viewerContribution>
- </extension>
-<!-- add the toggle command so we can provide a shortcut -->
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%ActionDefinition.quickDiff.name"
- description="%ActionDefinition.quickDiff.description"
- category="org.eclipse.ui.category.edit"
- id="org.eclipse.quickdiff.toggle">
- </command>
- <keyBinding
- string="Ctrl+Shift+Q"
- scope="org.eclipse.ui.textEditorScope"
- command="org.eclipse.quickdiff.toggle"
- configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
- </keyBinding>
- </extension>
-<!-- add the toggle action a second time in order to make it available as shortcut to keybinings -->
- <extension
- point="org.eclipse.ui.editorActions">
-<!-- text editor -->
- <editorContribution
- targetID="org.eclipse.ui.DefaultTextEditor"
- id="org.eclipse.quickdiff.editoractions.texteditor">
- <action
- definitionId="org.eclipse.quickdiff.toggle"
- label="%quickdiff.toggle.enable"
- class="org.eclipse.ui.texteditor.quickdiff.QuickDiffToggleAction"
- id="org.eclipse.ui.texteditor.quickdiff.QuickDiffToggleAction">
+ icon="icons/full/etool16/last_edit_pos.gif"
+ helpContextId="goto_last_edit_position_action_context"
+ label="%goToLastEditPosition.label"
+ menubarPath="navigate/"
+ tooltip="%goToLastEditPosition.tooltip">
</action>
- </editorContribution>
+ </actionSet>
</extension>
-
</plugin>
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/GotoLastEditPositionAction.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/GotoLastEditPositionAction.java
index 6249dd7fb..f53853b35 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/GotoLastEditPositionAction.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/GotoLastEditPositionAction.java
@@ -10,32 +10,18 @@
*******************************************************************************/
package org.eclipse.ui.internal.texteditor;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-import org.eclipse.swt.widgets.Shell;
-
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.text.Assert;
-import org.eclipse.jface.text.Position;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IEditorInput;
+import org.eclipse.jface.text.Position;
+
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.texteditor.IAbstractTextEditorHelpContextIds;
import org.eclipse.ui.texteditor.ITextEditor;
@@ -107,49 +93,49 @@ public class GotoLastEditPositionAction extends Action implements IWorkbenchWind
if (editor instanceof ITextEditor) {
ITextEditor textEditor= (ITextEditor)editor;
textEditor.selectAndReveal(pos.offset, pos.length);
-
- } else
- if (editor != null) {
- final IEditorInput input= editor.getEditorInput();
- final IEditorPart finalEditor= editor;
- if (input instanceof IFileEditorInput) {
-
- WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
- protected void execute(IProgressMonitor monitor) throws CoreException {
- IMarker marker= null;
- try {
- marker= ((IFileEditorInput)input).getFile().createMarker(IMarker.TEXT);
- marker.setAttribute(IMarker.CHAR_START, pos.offset);
- marker.setAttribute(IMarker.CHAR_END, pos.offset + pos.length);
-
- finalEditor.gotoMarker(marker);
-
- } finally {
- if (marker != null)
- marker.delete();
- }
- }
- };
-
- try {
- op.run(null);
- } catch (InvocationTargetException ex) {
- String message= EditorMessages.getString("Editor.error.gotoLastEditPosition.message"); //$NON-NLS-1$
- if (fWindow != null) {
- Shell shell= fWindow.getShell();
- String title= EditorMessages.getString("Editor.error.gotoLastEditPosition.title"); //$NON-NLS-1$
- MessageDialog.openError(shell, title, message);
- } else {
- Throwable t= ex.getTargetException();
- IStatus status= new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, 0, message, t);
- TextEditorPlugin.getDefault().getLog().log(status);
- }
- } catch (InterruptedException e) {
- Assert.isTrue(false, "this operation can not be cancelled"); //$NON-NLS-1$
- }
- }
- editor.setFocus();
}
+// } else
+// if (editor != null) {
+// final IEditorInput input= editor.getEditorInput();
+// final IEditorPart finalEditor= editor;
+// if (input instanceof IFileEditorInput) {
+//
+// WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
+// protected void execute(IProgressMonitor monitor) throws CoreException {
+// IMarker marker= null;
+// try {
+// marker= ((IFileEditorInput)input).getFile().createMarker(IMarker.TEXT);
+// marker.setAttribute(IMarker.CHAR_START, pos.offset);
+// marker.setAttribute(IMarker.CHAR_END, pos.offset + pos.length);
+//
+// finalEditor.gotoMarker(marker);
+//
+// } finally {
+// if (marker != null)
+// marker.delete();
+// }
+// }
+// };
+//
+// try {
+// op.run(null);
+// } catch (InvocationTargetException ex) {
+// String message= EditorMessages.getString("Editor.error.gotoLastEditPosition.message"); //$NON-NLS-1$
+// if (fWindow != null) {
+// Shell shell= fWindow.getShell();
+// String title= EditorMessages.getString("Editor.error.gotoLastEditPosition.title"); //$NON-NLS-1$
+// MessageDialog.openError(shell, title, message);
+// } else {
+// Throwable t= ex.getTargetException();
+// IStatus status= new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, 0, message, t);
+// TextEditorPlugin.getDefault().getLog().log(status);
+// }
+// } catch (InterruptedException e) {
+// Assert.isTrue(false, "this operation can not be cancelled"); //$NON-NLS-1$
+// }
+// }
+// editor.setFocus();
+// }
}
/*
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/TextEditorPlugin.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/TextEditorPlugin.java
index d40ea0f5f..468ce956e 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/TextEditorPlugin.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/TextEditorPlugin.java
@@ -14,16 +14,13 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.text.Assert;
-import org.eclipse.jface.text.source.ISharedTextColors;
import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
/**
* The plug-in runtime class for the text editor UI plug-in (id <code>"org.eclipse.ui.workbench.texteditor"</code>).
@@ -48,8 +45,6 @@ public final class TextEditorPlugin extends AbstractUIPlugin {
/** The action which goes to the last edit position */
private Set fLastEditPositionDependentActions;
- private ISharedTextColors fSharedTextColors;
-
/**
* Creates a plug-in instance.
@@ -75,13 +70,6 @@ public final class TextEditorPlugin extends AbstractUIPlugin {
* Text editor UI plug-in Id (value <code>"org.eclipse.ui.workbench.texteditor"</code>).
*/
public static final String PLUGIN_ID= "org.eclipse.ui.workbench.texteditor"; //$NON-NLS-1$
-
- /*
- * @see AbstractUIPlugin#initializeDefaultPluginPreferences()
- */
- protected void initializeDefaultPluginPreferences() {
- MarkerAnnotationPreferences.initializeDefaultValues(getPreferenceStore());
- }
/**
* Returns the last edit position.
@@ -133,27 +121,4 @@ public final class TextEditorPlugin extends AbstractUIPlugin {
if (fLastEditPositionDependentActions != null)
fLastEditPositionDependentActions.remove(action);
}
-
- /**
- * Returns the shared text colors of this plug-in.
- *
- * @since 3.0
- * @return the shared text colors
- */
- public ISharedTextColors getSharedTextColors() {
- if (fSharedTextColors == null)
- fSharedTextColors= new SharedTextColors();
- return fSharedTextColors;
- }
-
- /*
- * @see org.eclipse.ui.internal.editors.text.EditorsPlugin#shutdown()
- */
- public void shutdown() throws CoreException {
- if (fSharedTextColors != null) {
- fSharedTextColors.dispose();
- fSharedTextColors= null;
- }
- super.shutdown();
- }
} \ No newline at end of file
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/quickdiff/DocumentLineDiffer.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/quickdiff/DocumentLineDiffer.java
index 63180a78c..9e14d1444 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/quickdiff/DocumentLineDiffer.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/quickdiff/DocumentLineDiffer.java
@@ -16,7 +16,6 @@ import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
-import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -207,7 +206,7 @@ public class DocumentLineDiffer implements ILineDiffer, IDocumentListener, IAnno
* @see org.eclipse.ui.texteditor.IAnnotationExtension#getSeverity()
*/
public int getSeverity() {
- return IMarker.SEVERITY_INFO;
+ return 0; // same as IMarker.SEVERITY_INFO;
}
/*
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractDocumentProvider.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractDocumentProvider.java
index 93b4128ed..3ee7484c8 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractDocumentProvider.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractDocumentProvider.java
@@ -12,6 +12,7 @@
package org.eclipse.ui.texteditor;
+import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -20,20 +21,22 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+
import org.eclipse.jface.text.Assert;
import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentListener;
-
import org.eclipse.jface.text.source.IAnnotationModel;
-import org.eclipse.ui.PlatformUI;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.internal.texteditor.TextEditorPlugin;
@@ -45,6 +48,32 @@ import org.eclipse.core.runtime.Status;
* </p>
*/
public abstract class AbstractDocumentProvider implements IDocumentProvider, IDocumentProviderExtension, IDocumentProviderExtension2, IDocumentProviderExtension3 {
+
+ /**
+ * Opertion created by the document provider and to be executed by the providers runnable context.
+ *
+ * @since 3.0
+ */
+ protected static abstract class DocumentProviderOperation implements IRunnableWithProgress {
+
+ /**
+ * The actual functionality of this operation.
+ *
+ * @throws CoreException
+ */
+ protected abstract void execute(IProgressMonitor monitor) throws CoreException;
+
+ /*
+ * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ try {
+ execute(monitor);
+ } catch (CoreException x) {
+ throw new InvocationTargetException(x);
+ }
+ }
+ }
/**
* Collection of all information managed for a connected element.
@@ -148,13 +177,13 @@ public abstract class AbstractDocumentProvider implements IDocumentProvider, IDo
* Constant for representing the ok status. This is considered a value object.
* @since 2.0
*/
- static final protected IStatus STATUS_OK= new Status(IStatus.OK, PlatformUI.PLUGIN_ID, IStatus.OK, EditorMessages.getString("AbstractDocumentProvider.ok"), null); //$NON-NLS-1$
+ static final protected IStatus STATUS_OK= new Status(IStatus.OK, TextEditorPlugin.PLUGIN_ID, IStatus.OK, EditorMessages.getString("AbstractDocumentProvider.ok"), null); //$NON-NLS-1$
/**
* Constant for representing the error status. This is considered a value object.
* @since 2.0
*/
- static final protected IStatus STATUS_ERROR= new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.INFO, EditorMessages.getString("AbstractDocumentProvider.error"), null); //$NON-NLS-1$
+ static final protected IStatus STATUS_ERROR= new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.INFO, EditorMessages.getString("AbstractDocumentProvider.error"), null); //$NON-NLS-1$
/** Element information of all connected elements */
@@ -209,6 +238,13 @@ public abstract class AbstractDocumentProvider implements IDocumentProvider, IDo
*/
protected abstract void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException;
+ /**
+ * Returns the runnable context for this document provider.
+ *
+ * @return the runnable context for this document provider
+ * @since 3.0
+ */
+ protected abstract IRunnableContext getOperationRunner(IProgressMonitor monitor);
/**
* Returns the element info object for the given element.
@@ -405,13 +441,15 @@ public abstract class AbstractDocumentProvider implements IDocumentProvider, IDo
return (info != null ? info.fCanBeSaved : false);
}
- /*
- * @see IDocumentProvider#resetDocument(Object)
+ /**
+ * Executes the actual work of reseting the given elements document.
+ *
+ * @param element the element
+ * @param monitor the progress monitor
+ * @throws CoreException
+ * @since 3.0
*/
- public void resetDocument(Object element) throws CoreException {
- if (element == null)
- return;
-
+ protected void doResetDocument(Object element, IProgressMonitor monitor) throws CoreException {
ElementInfo info= (ElementInfo) fElementInfoMap.get(element);
if (info != null) {
@@ -436,33 +474,80 @@ public abstract class AbstractDocumentProvider implements IDocumentProvider, IDo
fireElementContentReplaced(element);
fireElementDirtyStateChanged(element, false);
}
+ }
+ }
+
+ /**
+ * Executes the given operation in the providers runnable context.
+ *
+ * @param operation the operation to be executes
+ * @param monitor the progress monitor
+ * @exception CoreException the operation's core exception
+ * @since 3.0
+ */
+ protected void executeOperation(DocumentProviderOperation operation, IProgressMonitor monitor) throws CoreException {
+ try {
+ IRunnableContext runner= getOperationRunner(monitor);
+ if (runner != null)
+ runner.run(false, false, operation);
+ else
+ operation.run(monitor);
+ } catch (InvocationTargetException x) {
+ Throwable e= x.getTargetException();
+ if (e instanceof CoreException)
+ throw (CoreException) e;
+ throw new CoreException(new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.ERROR, e.getMessage(), e));
+ } catch (InterruptedException e) {
+ throw new CoreException(new Status(IStatus.CANCEL, TextEditorPlugin.PLUGIN_ID, IStatus.OK, e.getMessage(), e));
}
}
+
+ /*
+ * @see IDocumentProvider#resetDocument(Object)
+ */
+ public final void resetDocument(final Object element) throws CoreException {
+
+ if (element == null)
+ return;
+
+ DocumentProviderOperation operation= new DocumentProviderOperation() {
+ protected void execute(IProgressMonitor monitor) throws CoreException {
+ doResetDocument(element, monitor);
+ }
+ };
+
+ executeOperation(operation, getProgressMonitor());
+ }
+
/*
* @see IDocumentProvider#saveDocument(IProgressMonitor, Object, IDocument, boolean)
*/
- public void saveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException {
+ public final void saveDocument(IProgressMonitor monitor, final Object element, final IDocument document, final boolean overwrite) throws CoreException {
if (element == null)
return;
+
+ DocumentProviderOperation operation= new DocumentProviderOperation() {
+ public void execute(IProgressMonitor monitor) throws CoreException {
+ ElementInfo info= (ElementInfo) fElementInfoMap.get(element);
+ if (info != null) {
+ if (info.fDocument != document) {
+ Status status= new Status(IStatus.WARNING, TextEditorPlugin.PLUGIN_ID, IStatus.ERROR, EditorMessages.getString("AbstractDocumentProvider.error.save.inuse"), null); //$NON-NLS-1$
+ throw new CoreException(status);
+ }
+ doSaveDocument(monitor, element, document, overwrite);
+ info.fCanBeSaved= false;
+ addUnchangedElementListeners(element, info);
+ fireElementDirtyStateChanged(element, false);
- ElementInfo info= (ElementInfo) fElementInfoMap.get(element);
- if (info != null) {
-
- if (info.fDocument != document) {
- Status status= new Status(IStatus.WARNING, PlatformUI.PLUGIN_ID, IStatus.ERROR, EditorMessages.getString("AbstractDocumentProvider.error.save.inuse"), null); //$NON-NLS-1$
- throw new CoreException(status);
+ } else {
+ doSaveDocument(monitor, element, document, overwrite);
+ }
}
-
- doSaveDocument(monitor, element, document, overwrite);
- info.fCanBeSaved= false;
- addUnchangedElementListeners(element, info);
- fireElementDirtyStateChanged(element, false);
-
- } else {
- doSaveDocument(monitor, element, document, overwrite);
- }
+ };
+
+ executeOperation(operation, monitor);
}
/**
@@ -794,11 +879,32 @@ public abstract class AbstractDocumentProvider implements IDocumentProvider, IDo
return STATUS_ERROR;
}
+ /**
+ * Performs the actual work of snchronizing the given element.
+ *
+ * @param element the element
+ * @param monitor the progress monitor
+ * @since 3.0
+ */
+ protected void doSynchronize(Object element, IProgressMonitor monitor) throws CoreException {
+ }
+
/*
* @see org.eclipse.ui.texteditor.IDocumentProviderExtension#synchronize(Object)
* @since 2.0
*/
- public void synchronize(Object element) throws CoreException {
+ public final void synchronize(final Object element) throws CoreException {
+
+ if (element == null)
+ return;
+
+ DocumentProviderOperation operation= new DocumentProviderOperation() {
+ public void execute(IProgressMonitor monitor) throws CoreException {
+ doSynchronize(element, monitor);
+ }
+ };
+
+ executeOperation(operation, getProgressMonitor());
}
/*
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 f329dfbef..d0eedf856 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
@@ -22,7 +22,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionPoint;
@@ -133,14 +132,14 @@ import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.help.WorkbenchHelp;
+import org.eclipse.ui.part.EditorActionBarContributor;
+import org.eclipse.ui.part.EditorPart;
+
import org.eclipse.ui.internal.ActionDescriptor;
import org.eclipse.ui.internal.EditorPluginAction;
import org.eclipse.ui.internal.texteditor.EditPosition;
import org.eclipse.ui.internal.texteditor.TextEditorPlugin;
-import org.eclipse.ui.part.EditorActionBarContributor;
-import org.eclipse.ui.part.EditorPart;
@@ -1328,10 +1327,8 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
- /** The editor's internal document provider. */
- private IDocumentProvider fInternalDocumentProvider;
- /** The editor's external document provider. */
- private IDocumentProvider fExternalDocumentProvider;
+ /** The editor's explicit document provider. */
+ private IDocumentProvider fExplicitDocumentProvider;
/** The editor's preference store. */
private IPreferenceStore fPreferenceStore;
/** The editor's range indicator. */
@@ -1546,9 +1543,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
* @see ITextEditor#getDocumentProvider()
*/
public IDocumentProvider getDocumentProvider() {
- if (fInternalDocumentProvider != null)
- return fInternalDocumentProvider;
- return fExternalDocumentProvider;
+ return fExplicitDocumentProvider;
}
/**
@@ -1631,7 +1626,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
*/
protected void setDocumentProvider(IDocumentProvider provider) {
Assert.isNotNull(provider);
- fInternalDocumentProvider= provider;
+ fExplicitDocumentProvider= provider;
}
/**
@@ -2437,7 +2432,18 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
- * If there is no implicit document provider set, the external one is
+ * Hook method for setting the document provider for the given input.
+ * This default implementation does notthing. Clients may
+ * reimplement.
+ *
+ * @param input the input of this editor.
+ * @since 3.0
+ */
+ protected void setDocumentProvider(IEditorInput input) {
+ }
+
+ /**
+ * If there is no explicit document provider set, the implicit one is
* re-initialized based on the given editor input.
*
* @param input the editor input.
@@ -2456,9 +2462,8 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
}
- if (fInternalDocumentProvider == null)
- fExternalDocumentProvider= DocumentProviderRegistry.getDefault().getDocumentProvider(input);
-
+ setDocumentProvider(input);
+
provider= getDocumentProvider();
if (provider != null) {
provider.addElementStateListener(fElementStateListener);
@@ -2628,21 +2633,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
fActivationCodeTrigger= null;
}
- IDocumentProvider provider= getDocumentProvider();
- if (provider != null) {
-
- IEditorInput input= getEditorInput();
- if (input != null)
- provider.disconnect(input);
-
- if (fElementStateListener != null) {
- provider.removeElementStateListener(fElementStateListener);
- fElementStateListener= null;
- }
-
- fInternalDocumentProvider= null;
- fExternalDocumentProvider= null;
- }
+ disposeDocumentProvider();
if (fSourceViewer != null) {
@@ -2705,6 +2696,29 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
+ * Disposes the connection with the document provider. Subclasses
+ * may extend.
+ *
+ * @since 3.0
+ */
+ protected void disposeDocumentProvider() {
+ IDocumentProvider provider= getDocumentProvider();
+ if (provider != null) {
+
+ IEditorInput input= getEditorInput();
+ if (input != null)
+ provider.disconnect(input);
+
+ if (fElementStateListener != null) {
+ provider.removeElementStateListener(fElementStateListener);
+ fElementStateListener= null;
+ }
+
+ fExplicitDocumentProvider= null;
+ }
+ }
+
+ /**
* Determines whether the given preference change affects the editor's
* presentation. This implementation always returns <code>false</code>.
* May be reimplemented by subclasses.
@@ -2847,69 +2861,23 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
if (MessageDialog.openQuestion(shell, title, msg)) {
- title= EditorMessages.getString("Editor.error.refresh.outofsync.title"); //$NON-NLS-1$
- msg= EditorMessages.getString("Editor.error.refresh.outofsync.message"); //$NON-NLS-1$
-
- if (provider instanceof IDocumentProviderExtension) {
- WorkspaceModifyOperation operation= new WorkspaceModifyOperation() {
- protected void execute(final IProgressMonitor monitor) throws CoreException {
- IDocumentProviderExtension extension= (IDocumentProviderExtension) provider;
- extension.synchronize(input);
- }
- };
-
- try {
- operation.run(getProgressMonitor());
- } catch (InterruptedException x) {
- } catch (InvocationTargetException x) {
- Throwable t= x.getTargetException();
- MessageDialog.openError(shell, title, msg + t.getMessage());
- }
- } else {
-
- try {
+ try {
+ if (provider instanceof IDocumentProviderExtension) {
+ IDocumentProviderExtension extension= (IDocumentProviderExtension) provider;
+ extension.synchronize(input);
+ } else {
doSetInput(input);
- } catch (CoreException x) {
- ErrorDialog.openError(shell, title, msg, x.getStatus());
- }
+ }
+ } catch (CoreException x) {
+ title= EditorMessages.getString("Editor.error.refresh.outofsync.title"); //$NON-NLS-1$
+ msg= EditorMessages.getString("Editor.error.refresh.outofsync.message"); //$NON-NLS-1$
+ ErrorDialog.openError(shell, title, msg, x.getStatus());
}
}
-
- // // disabled because of http://bugs.eclipse.org/bugs/show_bug.cgi?id=15166
- // else {
- // markEditorAsDirty();
- // }
-
}
}
-// /**
-// * Marks this editor and its editor input as dirty.
-// * @since 2.0
-// */
-// private void markEditorAsDirty() {
-//
-// if (isDirty())
-// return;
-//
-// IDocumentProvider provider= getDocumentProvider();
-// if (provider instanceof IDocumentProviderExtension) {
-//
-// provider.removeElementStateListener(fElementStateListener);
-// try {
-//
-// IDocumentProviderExtension extension= (IDocumentProviderExtension) provider;
-// extension.setCanSaveDocument(getEditorInput());
-// firePropertyChange(PROP_DIRTY);
-//
-// } finally {
-// provider.addElementStateListener(fElementStateListener);
-// }
-//
-// }
-// }
-
/**
* The <code>AbstractTextEditor</code> implementation of this
* <code>IEditorPart</code> method calls <code>performSaveAs</code>.
@@ -2966,8 +2934,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
} else {
-
- performSaveOperation(createSaveOperation(false), progressMonitor);
+ performSave(false, progressMonitor);
}
}
@@ -3155,30 +3122,12 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
- * Creates a workspace modify operation which saves the content of the editor
- * to the editor's input element. <code>overwrite</code> indicates whether
- * the editor input element may be overwritten if necessary.
- * Clients may reimplement this method.
+ * Performs the save and handles errors appropriatly.
*
* @param overwrite indicates whether or not overwrititng is allowed
- * @return the save operation
- */
- protected WorkspaceModifyOperation createSaveOperation(final boolean overwrite) {
- return new WorkspaceModifyOperation() {
- public void execute(final IProgressMonitor monitor) throws CoreException {
- IEditorInput input= getEditorInput();
- getDocumentProvider().saveDocument(monitor, input, getDocumentProvider().getDocument(input), overwrite);
- }
- };
- }
-
- /**
- * Performs the given save operation and handles errors appropriatly.
- *
- * @param operation the operation to be performed
* @param progressMonitor the monitor in which to run the operation
*/
- protected void performSaveOperation(WorkspaceModifyOperation operation, IProgressMonitor progressMonitor) {
+ protected void performSave(boolean overwrite, IProgressMonitor progressMonitor) {
IDocumentProvider provider= getDocumentProvider();
if (provider == null)
@@ -3187,22 +3136,12 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
try {
provider.aboutToChange(getEditorInput());
- operation.run(progressMonitor);
+ IEditorInput input= getEditorInput();
+ provider.saveDocument(progressMonitor, input, getDocumentProvider().getDocument(input), overwrite);
editorSaved();
- } catch (InterruptedException x) {
- } catch (InvocationTargetException x) {
-
- Throwable t= x.getTargetException();
- if (t instanceof CoreException)
- handleExceptionOnSave((CoreException) t, progressMonitor);
- else {
- Shell shell= getSite().getShell();
- String title= EditorMessages.getString("Editor.error.save.title"); //$NON-NLS-1$
- String msg= EditorMessages.getString("Editor.error.save.message"); //$NON-NLS-1$
- MessageDialog.openError(shell, title, msg + t.getMessage());
- }
-
+ } catch (CoreException x) {
+ handleExceptionOnSave(x, progressMonitor);
} finally {
provider.changed(getEditorInput());
}
@@ -3241,7 +3180,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
String msg= EditorMessages.getString("Editor.error.save.outofsync.message"); //$NON-NLS-1$
if (MessageDialog.openQuestion(shell, title, msg))
- performSaveOperation(createSaveOperation(true), progressMonitor);
+ performSave(true, progressMonitor);
else {
/*
* 1GEUPKR: ITPJUI:ALL - Loosing work with simultaneous edits
@@ -3301,46 +3240,19 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
* <code>ITextEditor</code> method may be extended by subclasses.
*/
public void doRevertToSaved() {
-
IDocumentProvider p= getDocumentProvider();
if (p == null)
return;
- performRevertOperation(createRevertOperation(), getProgressMonitor());
+ performRevert();
}
/**
- * Creates a workspace modify operation which reverts the content of the editor
- * to the last saved state of the editor's input element. Clients may reimplement this method.
+ * Performs revert and handles errors appropriatly.
*
- * @return the revert operation
- * @since 2.1
- */
- protected WorkspaceModifyOperation createRevertOperation() {
- return new WorkspaceModifyOperation() {
- protected void execute(final IProgressMonitor monitor) throws CoreException {
- IEditorInput input= getEditorInput();
- IDocumentProvider provider= getDocumentProvider();
-
- provider.resetDocument(input);
-
- IAnnotationModel model= provider.getAnnotationModel(input);
- if (model instanceof AbstractMarkerAnnotationModel) {
- AbstractMarkerAnnotationModel markerModel= (AbstractMarkerAnnotationModel) model;
- markerModel.resetMarkers();
- }
- }
- };
- }
-
- /**
- * Performs the given revert operation and handles errors appropriatly.
- *
- * @param operation the operation to be performed
- * @param progressMonitor the monitor in which to run the operation
- * @since 2.1
+ * @since 3.0
*/
- protected void performRevertOperation(WorkspaceModifyOperation operation, IProgressMonitor progressMonitor) {
+ protected void performRevert() {
IDocumentProvider provider= getDocumentProvider();
if (provider == null)
@@ -3349,18 +3261,14 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
try {
provider.aboutToChange(getEditorInput());
- operation.run(progressMonitor);
+ provider.resetDocument(getEditorInput());
editorSaved();
- } catch (InterruptedException x) {
- } catch (InvocationTargetException x) {
-
- Throwable t= x.getTargetException();
+ } catch (CoreException x) {
Shell shell= getSite().getShell();
String title= EditorMessages.getString("Editor.error.revert.title"); //$NON-NLS-1$
String msg= EditorMessages.getString("Editor.error.revert.message"); //$NON-NLS-1$
- MessageDialog.openError(shell, title, msg + t.getMessage());
-
+ ErrorDialog.openError(shell, title, msg, x.getStatus());
} finally {
provider.changed(getEditorInput());
}
@@ -3806,18 +3714,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
action.setHelpContextId(IAbstractTextEditorHelpContextIds.FIND_INCREMENTAL_REVERSE_ACTION);
action.setActionDefinitionId(ITextEditorActionDefinitionIds.FIND_INCREMENTAL_REVERSE);
setAction(ITextEditorActionConstants.FIND_INCREMENTAL_REVERSE, action);
-
- action= new AddMarkerAction(EditorMessages.getResourceBundle(), "Editor.AddBookmark.", this, IMarker.BOOKMARK, true); //$NON-NLS-1$
- action.setHelpContextId(IAbstractTextEditorHelpContextIds.BOOKMARK_ACTION);
- action.setActionDefinitionId(ITextEditorActionDefinitionIds.ADD_BOOKMARK);
- setAction(ITextEditorActionConstants.BOOKMARK, action);
-
-// FIXME: need another way to contribute this action
-// action= new AddTaskAction(EditorMessages.getResourceBundle(), "Editor.AddTask.", this); //$NON-NLS-1$
-// action.setHelpContextId(IAbstractTextEditorHelpContextIds.ADD_TASK_ACTION);
-// action.setActionDefinitionId(ITextEditorActionDefinitionIds.ADD_TASK);
-// setAction(ITextEditorActionConstants.ADD_TASK, action);
-
+
action= new SaveAction(EditorMessages.getResourceBundle(), "Editor.Save.", this); //$NON-NLS-1$
action.setHelpContextId(IAbstractTextEditorHelpContextIds.SAVE_ACTION);
// action.setActionDefinitionId(ITextEditorActionDefinitionIds.SAVE);
@@ -4109,70 +4006,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
if (fSourceViewer != null && fSourceViewer.getTextWidget() != null)
fSourceViewer.getTextWidget().setFocus();
}
-
- /**
- * If the editor can be saved all marker ranges have been changed according to
- * the text manipulations. However, those changes are not yet propagated to the
- * marker manager. Thus, when opening a marker, the marker's position in the editor
- * must be determined as it might differ from the position stated in the marker.
- *
- * @param marker the marker to go to
- * @see EditorPart#gotoMarker(org.eclipse.core.resources.IMarker)
- */
- public void gotoMarker(IMarker marker) {
-
- if (fSourceViewer == null)
- return;
-
- int start= MarkerUtilities.getCharStart(marker);
- int end= MarkerUtilities.getCharEnd(marker);
-
- if (start < 0 || end < 0) {
- // there is only a line number
- int line= MarkerUtilities.getLineNumber(marker);
- if (line > -1) {
-
- // marker line numbers are 1-based
- -- line;
-
- try {
-
- IDocument document= getDocumentProvider().getDocument(getEditorInput());
- selectAndReveal(document.getLineOffset(line), document.getLineLength(line));
-
- } catch (BadLocationException x) {
- // marker refers to invalid text position -> do nothing
- }
- }
-
- } else {
-
- // look up the current range of the marker when the document has been edited
- IAnnotationModel model= getDocumentProvider().getAnnotationModel(getEditorInput());
- if (model instanceof AbstractMarkerAnnotationModel) {
-
- AbstractMarkerAnnotationModel markerModel= (AbstractMarkerAnnotationModel) model;
- Position pos= markerModel.getMarkerPosition(marker);
- if (pos != null && !pos.isDeleted()) {
- // use position instead of marker values
- start= pos.getOffset();
- end= pos.getOffset() + pos.getLength();
- }
-
- if (pos != null && pos.isDeleted()) {
- // do nothing if position has been deleted
- return;
- }
- }
-
- IDocument document= getDocumentProvider().getDocument(getEditorInput());
- int length= document.getLength();
- if (end - 1 < length && start < length)
- selectAndReveal(start, end - start);
- }
- }
-
/*
* @see ITextEditor#showsHighlightRangeOnly()
*/
@@ -4781,6 +4615,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
/*
* @see org.eclipse.ui.texteditor.ITextEditorExtension3#showChangeInformation(boolean)
+ * @since 3.0
*/
public void showChangeInformation(boolean show) {
// do nothing
@@ -4788,6 +4623,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
/*
* @see org.eclipse.ui.texteditor.ITextEditorExtension3#isChangeInformationShowing()
+ * @since 3.0
*/
public boolean isChangeInformationShowing() {
return false;
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicTextEditorActionContributor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicTextEditorActionContributor.java
index a95048673..64b4552a8 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicTextEditorActionContributor.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicTextEditorActionContributor.java
@@ -59,8 +59,6 @@ public class BasicTextEditorActionContributor extends EditorActionBarContributor
ITextEditorActionConstants.DELETE,
ITextEditorActionConstants.SELECT_ALL,
ITextEditorActionConstants.FIND,
- ITextEditorActionConstants.BOOKMARK,
- ITextEditorActionConstants.ADD_TASK,
ITextEditorActionConstants.PRINT,
ITextEditorActionConstants.REVERT
};
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties
index 1d03c8d80..9051a9bba 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties
@@ -50,8 +50,6 @@ Editor.error.validateEdit.message= The file cannot be edited.
AbstractDocumentProvider.error.save.inuse=File is either open in another editor or in use by an operation.
-DocumentProviderRegistry.error.extension_point_not_found=Extension point: {0}.documentProviders not found
-
## Actions ##
@@ -196,15 +194,6 @@ Editor.FindIncrementalReverse.tooltip=Incremental Find Previous
Editor.FindIncrementalReverse.image=
Editor.FindIncrementalReverse.description=Incremental Find Previous
-Editor.AddBookmark.label=Boo&kmark...
-Editor.AddBookmark.tooltip=Add Bookmark
-Editor.AddBookmark.image=
-Editor.AddBookmark.description=Add Bookmark
-Editor.AddBookmark.dialog.title=Add Bookmark
-Editor.AddBookmark.dialog.message=Enter Bookmark name:
-Editor.AddBookmark.error.dialog.title=Add Bookmark
-Editor.AddBookmark.error.dialog.message=Problems adding new bookmark
-
Editor.Save.label=&Save
Editor.Save.tooltip=Save
Editor.Save.image=
@@ -224,33 +213,6 @@ Editor.GotoLine.dialog.message=Enter line number (1..{0}):
Editor.GotoLine.dialog.invalid_input=Not a number
Editor.GotoLine.dialog.invalid_range=Line number out of range
-Editor.ManageBookmarks.tooltip=Adds and Removes Bookmarks
-Editor.ManageBookmarks.image=
-Editor.ManageBookmarks.description=Adds and removes Bookmarks
-Editor.ManageBookmarks.add.label=Add Boo&kmark...
-Editor.ManageBookmarks.remove.label=Remove Boo&kmark
-Editor.ManageBookmarks.add.dialog.title=Add Bookmark
-Editor.ManageBookmarks.add.dialog.message=Enter Bookmark name:
-Editor.ManageBookmarks.error.dialog.title=Managing Bookmarks
-Editor.ManageBookmarks.error.dialog.message=Problems managing bookmarks
-
-Editor.ManageTasks.tooltip=Adds and Removes Tasks
-Editor.ManageTasks.image=
-Editor.ManageTasks.description=Adds and removes Tasks
-Editor.ManageTasks.add.label=Add &Task...
-Editor.ManageTasks.remove.label=Remove &Task
-Editor.ManageTasks.add.dialog.title=Add Task
-Editor.ManageTasks.add.dialog.message=Enter Task description:
-Editor.ManageTasks.error.dialog.title=Managing Tasks
-Editor.ManageTasks.error.dialog.message=Problems managing tasks
-
-Editor.SelectMarker.tooltip=Selects the marker's range
-Editor.SelectMarker.image=
-Editor.SelectMarker.description=Selects the Marker's Range
-Editor.SelectMarker.label=Select &Marker Range
-Editor.SelectMarker.error.dialog.title=Selecting Marker Range
-Editor.SelectMarker.error.dialog.message=Problems selecting marker range
-
Editor.ConvertLineDelimiter.title=Converting line delimiters...
Editor.ConvertLineDelimiter.toWindows.label=CRLF (&Windows)
Editor.ConvertLineDelimiter.toWindows.default.label=CRLF (&Windows) [default]
@@ -304,11 +266,6 @@ Editor.statusline.error.label=?
## Others ##
-AbstractMarkerAnnotationModel.connected=AbstractMarkerAnnotationModel.connected
-AbstractMarkerAnnotationModel.createMarkerUpdater=AbstractMarkerAnnotationModel.createMarkerUpdater
-AbstractMarkerAnnotationModel.removeAnnotations=AbstractMarkerAnnotationModel.removeAnnotations
-ResourceMarkerAnnotationModel.resourceChanged=ResourceMarkerAnnotationModel.resourceChanged
-
WorkbenchChainedTextFontFieldEditor.defaultWorkbenchTextFont=<Using Workbench Text Font>
FindReplace.title= Find/Replace
@@ -337,12 +294,6 @@ FindReplace.Status.replacements.label={0} matches replaced
FindNext.Status.noMatch.label=String Not Found
-MarkerRulerAction.addMarker=MarkerRulerAction.addMarker
-MarkerRulerAction.getMarker=MarkerRulerAction.getMarker
-MarkerRulerAction.removeMarkers=MarkerRulerAction.removeMarkers
-
-SelectMarkerRulerAction.getMarker=SelectMarkerRulerAction.getMarker
-SelectMarkerRulerInfoAction.getMarker=SelectMarkerRulerInfoAction.getMarker
AbstractDocumentProvider.ok=OK
AbstractDocumentProvider.error=ERROR
FindReplaceDialog.read_only=Replace can not be performed because of read only state.
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 39f986ccb..6d7c7b846 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
@@ -192,12 +192,14 @@ public interface IAbstractTextEditorHelpContextIds {
/**
* Help context id for the action.
* Value: <code>"org.eclipse.ui.bookmark_action_context"</code>
+ * @deprecated in 3.0 Use <code>org.eclipse.ui.texteditor.ITextEditorHelpContextIds.BOOKMARK_ACTION</code> instead.
*/
public static final String BOOKMARK_ACTION= PREFIX + ITextEditorActionConstants.BOOKMARK + ACTION_POSTFIX;
/**
* Help context id for the action.
* Value: <code>"org.eclipse.ui.addTask_action_context"</code>
+ * @deprecated in 3.0 Use <code>org.eclipse.ui.texteditor.ITextEditorHelpContextIds.ADD_TASK_ACTION</code> instead.
*/
public static final String ADD_TASK_ACTION= PREFIX + ITextEditorActionConstants.ADD_TASK + ACTION_POSTFIX;
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 277114b53..775c26905 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
@@ -13,6 +13,7 @@ package org.eclipse.ui.texteditor;
import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.actions.ActionFactory;
/**
@@ -86,14 +87,7 @@ public interface ITextEditorActionConstants extends IWorkbenchActionConstants {
* Value: <code>"ShiftLeft"</code>
*/
static final String SHIFT_LEFT= "ShiftLeft"; //$NON-NLS-1$
-
- /**
- * Name of the action for re-establishing the state after the
- * most recent save operation.
- * Value: <code>"IWorkbenchActionConstants.REVERT"</code>
- */
- static final String REVERT_TO_SAVED= REVERT;
-
+
/**
* Name of the action to delete the current line.
* Value: <code>"DeleteLine"</code>
@@ -315,11 +309,117 @@ public interface ITextEditorActionConstants extends IWorkbenchActionConstants {
* @since 2.0
*/
static final String STATUS_CATEGORY_ELEMENT_STATE= "ElementState"; //$NON-NLS-1$
-
+
/**
* Status line category "findField".
* Value: <code>"FindField"</code>
* @since 3.0
*/
static final String STATUS_CATEGORY_FIND_FIELD= "findField"; //$NON-NLS-1$
+
+ /**
+ * Name of standard Copy global action in the Edit menu.
+ * Value <code>"copy"</code>
+ *
+ * @since 3.0
+ * @see org.eclipse.ui.actions.ActionFactory#COPY#getId()
+ */
+ static final String COPY= ActionFactory.COPY.getId();
+
+ /**
+ * Name of standard Cut global action in the Edit menu.
+ * Value <code>"cut"</code>
+ *
+ * @since 3.0
+ * @see org.eclipse.ui.actions.ActionFactory#CUT#getId()
+ */
+ static final String CUT= ActionFactory.CUT.getId();
+
+ /**
+ * Name of standard Delete global action in the Edit menu.
+ * Value <code>"delete"</code>
+ *
+ * @since 3.0
+ * @see org.eclipse.ui.actions.ActionFactory#DELETE#getId()
+ */
+ static final String DELETE= ActionFactory.DELETE.getId();
+
+ /**
+ * Name of standard Find global action in the Edit menu.
+ * Value <code>"find"</code>
+ *
+ * @since 3.0
+ * @see org.eclipse.ui.actions.ActionFactory#FIND#getId()
+ */
+ static final String FIND= ActionFactory.FIND.getId();
+
+ /**
+ * Name of standard Paste global action in the Edit menu.
+ * Value <code>"paste"</code>
+ *
+ * @since 3.0
+ * @see org.eclipse.ui.actions.ActionFactory#PASTE#getId()
+ */
+ static final String PASTE= ActionFactory.PASTE.getId();
+
+ /**
+ * Name of standard Print global action in the File menu.
+ * Value <code>"print"</code>
+ *
+ * @since 3.0
+ * @see org.eclipse.ui.actions.ActionFactory#PRINT#getId()
+ */
+ static final String PRINT= ActionFactory.PRINT.getId();
+
+ /**
+ * Name of standard Redo global action in the Edit menu.
+ * Value <code>"redo"</code>
+ *
+ * @since 3.0
+ * @see org.eclipse.ui.actions.ActionFactory#REDO#getId()
+ */
+ static final String REDO= ActionFactory.REDO.getId();
+
+ /**
+ * Name of standard Undo global action in the Edit menu.
+ * Value <code>"undo"</code>
+ *
+ * @since 3.0
+ * @see org.eclipse.ui.actions.ActionFactory#UNDO#getId()
+ */
+ static final String UNDO= ActionFactory.UNDO.getId();
+
+ /**
+ * Name of standard Save global action in the File menu.
+ * Value <code>"save"</code>
+ *
+ * @since 3.0
+ * @see org.eclipse.ui.actions.ActionFactory#SAVE#getId()
+ */
+ static final String SAVE= ActionFactory.SAVE.getId();
+
+ /**
+ * Name of standard Select All global action in the Edit menu.
+ * Value <code>"selectAll"</code>
+ *
+ * @since 3.0
+ * @see org.eclipse.ui.actions.ActionFactory#SELECT_ALL#getId()
+ */
+ static final String SELECT_ALL= ActionFactory.SELECT_ALL.getId();
+
+ /**
+ * Name of standard Revert global action in the File menu.
+ * Value <code>"revert"</code>
+ *
+ * @since 3.0
+ * @see org.eclipse.ui.actions.ActionFactory#REVERT#getId()
+ */
+ static final String REVERT= ActionFactory.REVERT.getId();
+
+ /**
+ * Name of the action for re-establishing the state after the
+ * most recent save operation.
+ * Value: <code>"ITextEditorActionConstants.REVERT"</code>
+ */
+ static final String REVERT_TO_SAVED= REVERT;
}
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/StatusTextEditor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/StatusTextEditor.java
index 7929536c1..eee9e6410 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/StatusTextEditor.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/StatusTextEditor.java
@@ -18,7 +18,6 @@ import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.core.resources.IResourceStatus;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
@@ -74,8 +73,7 @@ public class StatusTextEditor extends AbstractTextEditor {
if (getDocumentProvider() instanceof IDocumentProviderExtension) {
IDocumentProviderExtension extension= (IDocumentProviderExtension) getDocumentProvider();
IStatus status= extension.getStatus(input);
- // see bug 42230
- if (status.isOK() || status.getCode() == IResourceStatus.READ_ONLY_LOCAL) {
+ if (!isErrorStatus(status)) {
front= fDefaultComposite;
} else {
fStatusControl= createStatusControl(fParent, status);
@@ -92,6 +90,17 @@ public class StatusTextEditor extends AbstractTextEditor {
}
/**
+ * Returns whether the given status indicates an error. Subclasses may override.
+ *
+ * @param status the status to be checked
+ * @return <code>true</code> if the status indicates an error, <code>false</code> otherwise\
+ * @since 3.0
+ */
+ protected boolean isErrorStatus(IStatus status) {
+ return status != null && !status.isOK();
+ }
+
+ /**
* Creates the status control for the given status.
* May be overridden by subclasses.
*
@@ -145,8 +154,7 @@ public class StatusTextEditor extends AbstractTextEditor {
if (provider instanceof IDocumentProviderExtension) {
IDocumentProviderExtension extension= (IDocumentProviderExtension) provider;
IStatus status= extension.getStatus(getEditorInput());
- // see bug 42230
- if (status != null && !status.isOK() && status.getCode() != IResourceStatus.READ_ONLY_LOCAL) {
+ if (isErrorStatus(status)) {
IStatusField field= getStatusField(category);
if (field != null) {
field.setText(fErrorLabel);
@@ -157,7 +165,7 @@ public class StatusTextEditor extends AbstractTextEditor {
super.updateStatusField(category);
}
-
+
/*
* @see AbstractTextEditor#doSetInput(IEditorInput)
*/

Back to the top