[hg] main-silver: #228265:put a mark in jump history before Go T...

  • From: Tomas Zezula < >
  • To: ,
  • Subject: [hg] main-silver: #228265:put a mark in jump history before Go T...
  • Date: Fri, 26 Apr 2013 11:11:23 -0700

changeset e87eda850221 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/e87eda850221
description:
        #228265:put a mark in jump history before Go To (File, Type, Symbol) 
element

diffstat:

 jumpto/src/org/netbeans/modules/jumpto/file/FileSearchAction.java   |  2 ++
 jumpto/src/org/netbeans/modules/jumpto/symbol/GoToSymbolAction.java |  2 ++
 jumpto/src/org/netbeans/modules/jumpto/type/GoToTypeAction.java     |  7 
++++++-
 3 files changed, 10 insertions(+), 1 deletions(-)

diffs (65 lines):

diff --git 
a/jumpto/src/org/netbeans/modules/jumpto/file/FileSearchAction.java 
b/jumpto/src/org/netbeans/modules/jumpto/file/FileSearchAction.java
--- a/jumpto/src/org/netbeans/modules/jumpto/file/FileSearchAction.java
+++ b/jumpto/src/org/netbeans/modules/jumpto/file/FileSearchAction.java
@@ -105,6 +105,7 @@
 import org.netbeans.api.project.ui.OpenProjects;
 import org.netbeans.api.search.provider.SearchFilter;
 import org.netbeans.api.search.provider.SearchInfoUtils;
+import org.netbeans.editor.JumpList;
 import org.netbeans.modules.jumpto.EntitiesListCellRenderer;
 import org.netbeans.modules.jumpto.common.HighlightingNameFormatter;
 import org.netbeans.modules.jumpto.common.Factory;
@@ -173,6 +174,7 @@
     public void actionPerformed(ActionEvent arg0) {
         FileDescriptor[] typeDescriptors = getSelectedFiles();
         if (typeDescriptors != null) {
+            JumpList.checkAddEntry();
             for(FileDescriptor td: typeDescriptors){
                 td.open();
             }
diff --git 
a/jumpto/src/org/netbeans/modules/jumpto/symbol/GoToSymbolAction.java 
b/jumpto/src/org/netbeans/modules/jumpto/symbol/GoToSymbolAction.java
--- a/jumpto/src/org/netbeans/modules/jumpto/symbol/GoToSymbolAction.java
+++ b/jumpto/src/org/netbeans/modules/jumpto/symbol/GoToSymbolAction.java
@@ -53,6 +53,7 @@
 import javax.swing.JButton;
 import javax.swing.JEditorPane;
 import org.netbeans.api.project.ui.OpenProjects;
+import org.netbeans.editor.JumpList;
 import org.openide.ErrorManager;
 import org.openide.cookies.EditorCookie;
 import org.openide.nodes.Node;
@@ -85,6 +86,7 @@
     public void actionPerformed( ActionEvent e ) {
         SymbolDescriptor typeDescriptor = getSelectedSymbol();
         if (typeDescriptor != null) {
+            JumpList.checkAddEntry();
             typeDescriptor.open();
         }
     }
diff --git a/jumpto/src/org/netbeans/modules/jumpto/type/GoToTypeAction.java 
b/jumpto/src/org/netbeans/modules/jumpto/type/GoToTypeAction.java
--- a/jumpto/src/org/netbeans/modules/jumpto/type/GoToTypeAction.java
+++ b/jumpto/src/org/netbeans/modules/jumpto/type/GoToTypeAction.java
@@ -96,6 +96,7 @@
 import org.netbeans.api.annotations.common.NonNull;
 import org.netbeans.api.jumpto.type.TypeBrowser;
 import org.netbeans.api.project.ui.OpenProjects;
+import org.netbeans.editor.JumpList;
 import org.netbeans.modules.jumpto.EntitiesListCellRenderer;
 import org.netbeans.modules.jumpto.common.HighlightingNameFormatter;
 import org.netbeans.modules.jumpto.file.LazyListModel;
@@ -164,10 +165,14 @@
     
     @Override
     public void actionPerformed( ActionEvent e ) {
-        for (TypeDescriptor td : getSelectedTypes()) {
+        final Iterable<? extends TypeDescriptor> selectedTypes = 
getSelectedTypes();
+        if (selectedTypes.iterator().hasNext()) {
+            JumpList.checkAddEntry();
+            for (TypeDescriptor td : selectedTypes) {
             td.open();
         }
     }
+    }
             
     public Iterable<? extends TypeDescriptor> getSelectedTypes() {
         return getSelectedTypes(true);

[hg] main-silver: #228265:put a mark in jump history before Go T...

Tomas Zezula 04/26/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 147 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close