# HG changeset patch # Parent aa51208482a826431d67d1219039fa6db3d3b7ed diff --git a/cnd.highlight/nbproject/project.xml b/cnd.highlight/nbproject/project.xml --- a/cnd.highlight/nbproject/project.xml +++ b/cnd.highlight/nbproject/project.xml @@ -149,7 +149,7 @@ 1 - 2.0 + 2.3 diff --git a/cnd.highlight/src/org/netbeans/modules/cnd/highlight/resources/DefaultKeyBindings.xml b/cnd.highlight/src/org/netbeans/modules/cnd/highlight/resources/DefaultKeyBindings.xml deleted file mode 100644 --- a/cnd.highlight/src/org/netbeans/modules/cnd/highlight/resources/DefaultKeyBindings.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - diff --git a/cnd.highlight/src/org/netbeans/modules/cnd/highlight/resources/layer.xml b/cnd.highlight/src/org/netbeans/modules/cnd/highlight/resources/layer.xml --- a/cnd.highlight/src/org/netbeans/modules/cnd/highlight/resources/layer.xml +++ b/cnd.highlight/src/org/netbeans/modules/cnd/highlight/resources/layer.xml @@ -53,13 +53,6 @@ - - - - - - - diff --git a/cnd.highlight/src/org/netbeans/modules/cnd/highlight/semantic/actions/Bundle.properties b/cnd.highlight/src/org/netbeans/modules/cnd/highlight/semantic/actions/Bundle.properties --- a/cnd.highlight/src/org/netbeans/modules/cnd/highlight/semantic/actions/Bundle.properties +++ b/cnd.highlight/src/org/netbeans/modules/cnd/highlight/semantic/actions/Bundle.properties @@ -41,7 +41,7 @@ # made subject to such option by the copyright holder. # -cpp-next-marked-occurrence=Navigate to Next Occurrence -cpp-prev-marked-occurrence=Navigate to Previous Occurrence +next-marked-occurrence=Navigate to Next Occurrence +prev-marked-occurrence=Navigate to Previous Occurrence cpp-no-marked-occurrence=There is no occurrence to navigate to. diff --git a/cnd.highlight/src/org/netbeans/modules/cnd/highlight/semantic/actions/GotoNextOccurrenceAction.java b/cnd.highlight/src/org/netbeans/modules/cnd/highlight/semantic/actions/GotoNextOccurrenceAction.java --- a/cnd.highlight/src/org/netbeans/modules/cnd/highlight/semantic/actions/GotoNextOccurrenceAction.java +++ b/cnd.highlight/src/org/netbeans/modules/cnd/highlight/semantic/actions/GotoNextOccurrenceAction.java @@ -45,6 +45,7 @@ import java.awt.event.ActionEvent; import javax.swing.text.JTextComponent; +import org.netbeans.api.editor.EditorActionNames; import org.netbeans.editor.BaseAction; import org.openide.util.NbBundle; @@ -56,7 +57,7 @@ */ public final class GotoNextOccurrenceAction extends BaseAction { - private static final String actionName = "cpp-next-marked-occurrence"; // NOI18N + private static final String actionName = EditorActionNames.gotoNextOccurrence; // NOI18N private static GotoNextOccurrenceAction instance; public static synchronized GotoNextOccurrenceAction getInstance() { diff --git a/cnd.highlight/src/org/netbeans/modules/cnd/highlight/semantic/actions/GotoPrevOccurrenceAction.java b/cnd.highlight/src/org/netbeans/modules/cnd/highlight/semantic/actions/GotoPrevOccurrenceAction.java --- a/cnd.highlight/src/org/netbeans/modules/cnd/highlight/semantic/actions/GotoPrevOccurrenceAction.java +++ b/cnd.highlight/src/org/netbeans/modules/cnd/highlight/semantic/actions/GotoPrevOccurrenceAction.java @@ -45,6 +45,7 @@ import java.awt.event.ActionEvent; import javax.swing.text.JTextComponent; +import org.netbeans.api.editor.EditorActionNames; import org.netbeans.editor.BaseAction; import org.openide.util.NbBundle; @@ -56,7 +57,7 @@ */ public final class GotoPrevOccurrenceAction extends BaseAction { - private static final String actionName = "cpp-prev-marked-occurrence"; // NOI18N + private static final String actionName = EditorActionNames.gotoPrevOccurrence; private static GotoPrevOccurrenceAction instance; public static synchronized GotoPrevOccurrenceAction getInstance() { diff --git a/csl.api/nbproject/project.xml b/csl.api/nbproject/project.xml --- a/csl.api/nbproject/project.xml +++ b/csl.api/nbproject/project.xml @@ -169,7 +169,7 @@ 1 - 2.0 + 2.3 diff --git a/csl.api/src/org/netbeans/modules/csl/api/Bundle.properties b/csl.api/src/org/netbeans/modules/csl/api/Bundle.properties --- a/csl.api/src/org/netbeans/modules/csl/api/Bundle.properties +++ b/csl.api/src/org/netbeans/modules/csl/api/Bundle.properties @@ -14,6 +14,8 @@ #GoToMarkOccurrencesAction csl-next-marked-occurrence=Navigate to Next Occurrence csl-prev-marked-occurrence=Navigate to Previous Occurrence +next-marked-occurrence=Navigate to Next Occurrence +prev-marked-occurrence=Navigate to Previous Occurrence csl-no-marked-occurrence=There is no occurrence to navigate to. TXT_CalculatingDeclPos=Calculating declaration position diff --git a/csl.api/src/org/netbeans/modules/csl/api/GoToMarkOccurrencesAction.java b/csl.api/src/org/netbeans/modules/csl/api/GoToMarkOccurrencesAction.java --- a/csl.api/src/org/netbeans/modules/csl/api/GoToMarkOccurrencesAction.java +++ b/csl.api/src/org/netbeans/modules/csl/api/GoToMarkOccurrencesAction.java @@ -58,6 +58,7 @@ import java.awt.event.ActionEvent; import javax.swing.text.Document; import javax.swing.text.JTextComponent; +import org.netbeans.api.editor.EditorActionNames; import org.netbeans.editor.BaseAction; import org.netbeans.modules.csl.editor.semantic.MarkOccurrencesHighlighter; import org.netbeans.spi.editor.highlighting.HighlightsSequence; @@ -82,8 +83,8 @@ */ public final class GoToMarkOccurrencesAction extends BaseAction { - private static final String prevActionName = "csl-prev-marked-occurrence"; // NOI18N - private static final String nextActionName = "csl-next-marked-occurrence"; // NOI18N + private static final String prevActionName = EditorActionNames.gotoPrevOccurrence; + private static final String nextActionName = EditorActionNames.gotoNextOccurrence; private final boolean next; diff --git a/csl.api/src/org/netbeans/modules/csl/core/DefaultKeyBindings-Mac.xml b/csl.api/src/org/netbeans/modules/csl/core/DefaultKeyBindings-Mac.xml deleted file mode 100644 --- a/csl.api/src/org/netbeans/modules/csl/core/DefaultKeyBindings-Mac.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - diff --git a/csl.api/src/org/netbeans/modules/csl/core/DefaultKeyBindings.xml b/csl.api/src/org/netbeans/modules/csl/core/DefaultKeyBindings.xml deleted file mode 100644 --- a/csl.api/src/org/netbeans/modules/csl/core/DefaultKeyBindings.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - diff --git a/csl.api/src/org/netbeans/modules/csl/core/layer.xml b/csl.api/src/org/netbeans/modules/csl/core/layer.xml --- a/csl.api/src/org/netbeans/modules/csl/core/layer.xml +++ b/csl.api/src/org/netbeans/modules/csl/core/layer.xml @@ -45,16 +45,6 @@ - - - - - - - - - - diff --git a/editor.lib2/apichanges.xml b/editor.lib2/apichanges.xml --- a/editor.lib2/apichanges.xml +++ b/editor.lib2/apichanges.xml @@ -107,6 +107,21 @@ + + Added IDs for goto prev/next occurrence actions + + + + + +

+ Many languages define their own actions and support for navigating between symbol occurrences. + Common action name allows them to be presented and configured as one action in IDE configuration. +

+
+ + +
Document handling split diff --git a/editor.lib2/nbproject/project.properties b/editor.lib2/nbproject/project.properties --- a/editor.lib2/nbproject/project.properties +++ b/editor.lib2/nbproject/project.properties @@ -43,7 +43,7 @@ is.autoload=true javac.source=1.7 javac.compilerargs=-Xlint:unchecked -spec.version.base=2.2.0 +spec.version.base=2.3.0 javadoc.arch=${basedir}/arch.xml javadoc.apichanges=${basedir}/apichanges.xml diff --git a/editor.lib2/src/org/netbeans/api/editor/EditorActionNames.java b/editor.lib2/src/org/netbeans/api/editor/EditorActionNames.java --- a/editor.lib2/src/org/netbeans/api/editor/EditorActionNames.java +++ b/editor.lib2/src/org/netbeans/api/editor/EditorActionNames.java @@ -136,4 +136,18 @@ * @since 1.64 */ public static final String organizeMembers = "organize-members"; // NOI18N + + /** + * Navigates to the previous occurence of the symbol under the caret. The action + * should be implemented by specific language EditorKit + * @since 2.3 + */ + public static final String gotoPrevOccurrence = "prev-marked-occurrence"; // NOI18N + + /** + * Navigates to the next occurence of the symbol under the caret. The action + * should be implemented by specific language EditorKit + * @since 2.3 + */ + public static final String gotoNextOccurrence = "next-marked-occurrence"; // NOI18N } diff --git a/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings-mac.xml b/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings-mac.xml --- a/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings-mac.xml +++ b/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings-mac.xml @@ -131,4 +131,7 @@ + + + diff --git a/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings.xml b/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings.xml --- a/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings.xml +++ b/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings.xml @@ -199,4 +199,7 @@ + + + diff --git a/html.editor/nbproject/project.xml b/html.editor/nbproject/project.xml --- a/html.editor/nbproject/project.xml +++ b/html.editor/nbproject/project.xml @@ -161,7 +161,7 @@ 1 - 2.0 + 2.3
diff --git a/html.editor/src/org/netbeans/modules/html/editor/resources/DefaultKeyBindings.xml b/html.editor/src/org/netbeans/modules/html/editor/resources/DefaultKeyBindings.xml deleted file mode 100644 --- a/html.editor/src/org/netbeans/modules/html/editor/resources/DefaultKeyBindings.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - diff --git a/html.editor/src/org/netbeans/modules/html/editor/resources/layer.xml b/html.editor/src/org/netbeans/modules/html/editor/resources/layer.xml --- a/html.editor/src/org/netbeans/modules/html/editor/resources/layer.xml +++ b/html.editor/src/org/netbeans/modules/html/editor/resources/layer.xml @@ -230,13 +230,6 @@ - - - - - - - diff --git a/java.editor/nbproject/project.xml b/java.editor/nbproject/project.xml --- a/java.editor/nbproject/project.xml +++ b/java.editor/nbproject/project.xml @@ -187,7 +187,7 @@ 1 - 2.0 + 2.3 diff --git a/java.editor/src/org/netbeans/modules/java/editor/resources/DefaultKeyBindings-Mac.xml b/java.editor/src/org/netbeans/modules/java/editor/resources/DefaultKeyBindings-Mac.xml --- a/java.editor/src/org/netbeans/modules/java/editor/resources/DefaultKeyBindings-Mac.xml +++ b/java.editor/src/org/netbeans/modules/java/editor/resources/DefaultKeyBindings-Mac.xml @@ -59,7 +59,4 @@ - - - diff --git a/java.editor/src/org/netbeans/modules/java/editor/resources/DefaultKeyBindings.xml b/java.editor/src/org/netbeans/modules/java/editor/resources/DefaultKeyBindings.xml --- a/java.editor/src/org/netbeans/modules/java/editor/resources/DefaultKeyBindings.xml +++ b/java.editor/src/org/netbeans/modules/java/editor/resources/DefaultKeyBindings.xml @@ -64,7 +64,4 @@ - - - diff --git a/java.editor/src/org/netbeans/modules/java/editor/semantic/Bundle.properties b/java.editor/src/org/netbeans/modules/java/editor/semantic/Bundle.properties --- a/java.editor/src/org/netbeans/modules/java/editor/semantic/Bundle.properties +++ b/java.editor/src/org/netbeans/modules/java/editor/semantic/Bundle.properties @@ -57,7 +57,7 @@ LBL_ES_TOOLTIP=Mark Occurrences -java-next-marked-occurrence=Navigate to Next Occurrence -java-prev-marked-occurrence=Navigate to Previous Occurrence +next-marked-occurrence=Navigate to Next Occurrence +prev-marked-occurrence=Navigate to Previous Occurrence java-no-marked-occurrence=There is no occurrence to navigate to. diff --git a/java.editor/src/org/netbeans/modules/java/editor/semantic/GoToMarkOccurrencesAction.java b/java.editor/src/org/netbeans/modules/java/editor/semantic/GoToMarkOccurrencesAction.java --- a/java.editor/src/org/netbeans/modules/java/editor/semantic/GoToMarkOccurrencesAction.java +++ b/java.editor/src/org/netbeans/modules/java/editor/semantic/GoToMarkOccurrencesAction.java @@ -58,6 +58,7 @@ import java.awt.event.ActionEvent; import javax.swing.text.Document; import javax.swing.text.JTextComponent; +import org.netbeans.api.editor.EditorActionNames; import org.netbeans.editor.BaseAction; import org.netbeans.lib.editor.util.swing.DocumentUtilities; import org.netbeans.spi.editor.highlighting.HighlightsSequence; @@ -71,8 +72,9 @@ */ public class GoToMarkOccurrencesAction extends BaseAction { - private static final String prevActionName = "java-prev-marked-occurrence"; // NOI18N - private static final String nextActionName = "java-next-marked-occurrence"; // NOI18N + private static final String prevActionName = EditorActionNames.gotoPrevOccurrence; + private static final String nextActionName = EditorActionNames.gotoNextOccurrence; + static final String markedOccurence = "marked-occurrence"; // NOI18N private final boolean next; diff --git a/javascript.editing/src/org/netbeans/modules/javascript/editing/DefaultKeyBindings.xml b/javascript.editing/src/org/netbeans/modules/javascript/editing/DefaultKeyBindings.xml --- a/javascript.editing/src/org/netbeans/modules/javascript/editing/DefaultKeyBindings.xml +++ b/javascript.editing/src/org/netbeans/modules/javascript/editing/DefaultKeyBindings.xml @@ -52,6 +52,6 @@ --> - - + diff --git a/javascript2.editor/src/org/netbeans/modules/javascript2/editor/resources/DefaultKeyBindings-Mac.xml b/javascript2.editor/src/org/netbeans/modules/javascript2/editor/resources/DefaultKeyBindings-Mac.xml --- a/javascript2.editor/src/org/netbeans/modules/javascript2/editor/resources/DefaultKeyBindings-Mac.xml +++ b/javascript2.editor/src/org/netbeans/modules/javascript2/editor/resources/DefaultKeyBindings-Mac.xml @@ -54,6 +54,4 @@ - - diff --git a/javascript2.editor/src/org/netbeans/modules/javascript2/editor/resources/DefaultKeyBindings.xml b/javascript2.editor/src/org/netbeans/modules/javascript2/editor/resources/DefaultKeyBindings.xml --- a/javascript2.editor/src/org/netbeans/modules/javascript2/editor/resources/DefaultKeyBindings.xml +++ b/javascript2.editor/src/org/netbeans/modules/javascript2/editor/resources/DefaultKeyBindings.xml @@ -54,6 +54,4 @@ - -