Index: src/org/netbeans/modules/project/ui/actions/Bundle.properties =================================================================== RCS file: /cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/Bundle.properties,v retrieving revision 1.17 diff -u -r1.17 Bundle.properties --- src/org/netbeans/modules/project/ui/actions/Bundle.properties 14 Sep 2004 16:13:29 -0000 1.17 +++ src/org/netbeans/modules/project/ui/actions/Bundle.properties 21 Sep 2004 07:23:19 -0000 @@ -30,6 +30,8 @@ LBL_SetAsMainProjectAction_Name=Set Main Project LBL_SelectInProjectsAction_Name=Select Node in Projects LBL_SelectInFilesAction_Name=Select Node in Files +LBL_SelectInProjectsAction_PopupName=Projects +LBL_SelectInFilesAction_PopupName=Files # {0} number of project # {1} the first project name Index: src/org/netbeans/modules/project/ui/actions/SelectNodeAction.java =================================================================== RCS file: /cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/SelectNodeAction.java,v retrieving revision 1.3 diff -u -r1.3 SelectNodeAction.java --- src/org/netbeans/modules/project/ui/actions/SelectNodeAction.java 16 Aug 2004 13:45:08 -0000 1.3 +++ src/org/netbeans/modules/project/ui/actions/SelectNodeAction.java 21 Sep 2004 07:23:19 -0000 @@ -16,6 +16,7 @@ import javax.swing.Action; import javax.swing.Icon; import javax.swing.ImageIcon; +import javax.swing.JMenuItem; import org.netbeans.api.project.Project; import org.netbeans.modules.project.ui.ProjectTab; import org.netbeans.modules.project.ui.ProjectUtilities; @@ -28,12 +29,13 @@ import org.openide.util.Lookup; import org.openide.util.NbBundle; import org.openide.util.Utilities; +import org.openide.util.actions.Presenter; /** Action sensitive to current project * * @author Pet Hrebejk */ -public class SelectNodeAction extends LookupSensitiveAction { +public class SelectNodeAction extends LookupSensitiveAction implements Presenter.Menu { // XXX Better icons private static final Icon SELECT_IN_PROJECTS_ICON = new ImageIcon( Utilities.loadImage( "org/netbeans/modules/project/ui/resources/projectTab.gif" ) ); //NOI18N @@ -42,6 +44,9 @@ private static final String SELECT_IN_PROJECTS_NAME = NbBundle.getMessage( CloseProject.class, "LBL_SelectInProjectsAction_Name" ); // NOI18N private static final String SELECT_IN_FILES_NAME = NbBundle.getMessage( CloseProject.class, "LBL_SelectInFilesAction_Name" ); // NOI18N + private static final String SELECT_IN_PROJECTS_NAME_POPUP = NbBundle.getMessage( CloseProject.class, "LBL_SelectInProjectsAction_PopupName" ); // NOI18N + private static final String SELECT_IN_FILES_NAME_POPUP = NbBundle.getMessage( CloseProject.class, "LBL_SelectInFilesAction_PopupName" ); // NOI18N + private String command; private ProjectActionPerformer performer; private String namePattern; @@ -100,7 +105,21 @@ return namePattern; } - // Private methods --------------------------------------------------------- + // Presenter.Popup implementation ------------------------------------------ + + public JMenuItem getMenuPresenter () { + JMenuItem popupPresenter = new JMenuItem (this); + + if (ProjectTab.ID_LOGICAL.equals (this.findIn)) { + popupPresenter.setText (SELECT_IN_PROJECTS_NAME_POPUP); + } else { + popupPresenter.setText (SELECT_IN_FILES_NAME_POPUP); + } + + return popupPresenter; + } + + // Private methods --------------------------------------------------------- private FileObject getFileFromLookup( Lookup context ) {