This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 199545
Collapse All | Expand All

(-)a/core.multiview/src/org/netbeans/core/multiview/EditorsAction.java (-1 / +11 lines)
Lines 58-63 Link Here
58
import org.netbeans.core.api.multiview.MultiViewHandler;
58
import org.netbeans.core.api.multiview.MultiViewHandler;
59
import org.netbeans.core.api.multiview.MultiViewPerspective;
59
import org.netbeans.core.api.multiview.MultiViewPerspective;
60
import org.netbeans.core.api.multiview.MultiViews;
60
import org.netbeans.core.api.multiview.MultiViews;
61
import org.openide.awt.Actions;
61
import org.openide.awt.DynamicMenuContent;
62
import org.openide.awt.DynamicMenuContent;
62
import org.openide.awt.Mnemonics;
63
import org.openide.awt.Mnemonics;
63
import org.openide.text.CloneableEditorSupport;
64
import org.openide.text.CloneableEditorSupport;
Lines 72-93 Link Here
72
 * @author mkleint
73
 * @author mkleint
73
 */
74
 */
74
public class EditorsAction extends AbstractAction 
75
public class EditorsAction extends AbstractAction 
75
                                implements Presenter.Menu {
76
                                implements Presenter.Menu, Presenter.Popup {
76
                                    
77
                                    
77
    public EditorsAction() {
78
    public EditorsAction() {
78
        super(NbBundle.getMessage(EditorsAction.class, "CTL_EditorsAction"));
79
        super(NbBundle.getMessage(EditorsAction.class, "CTL_EditorsAction"));
79
    }
80
    }
80
    
81
    
82
    @Override
81
    public void actionPerformed(ActionEvent ev) {
83
    public void actionPerformed(ActionEvent ev) {
82
        assert false;// no operation
84
        assert false;// no operation
83
    }
85
    }
84
    
86
    
87
    @Override
85
    public JMenuItem getMenuPresenter() {
88
    public JMenuItem getMenuPresenter() {
86
        JMenu menu = new UpdatingMenu();
89
        JMenu menu = new UpdatingMenu();
87
        String label = NbBundle.getMessage(EditorsAction.class, "CTL_EditorsAction");
90
        String label = NbBundle.getMessage(EditorsAction.class, "CTL_EditorsAction");
88
        Mnemonics.setLocalizedText(menu, label);
91
        Mnemonics.setLocalizedText(menu, label);
89
        return menu;
92
        return menu;
90
    }
93
    }
94
    @Override
95
    public JMenuItem getPopupPresenter() {
96
        JMenu menu = new UpdatingMenu();
97
        String label = NbBundle.getMessage(EditorsAction.class, "CTL_EditorsAction");
98
        Actions.setMenuText(menu, label, false);
99
        return menu;
100
    }
91
    
101
    
92
    private static final class UpdatingMenu extends JMenu implements DynamicMenuContent {
102
    private static final class UpdatingMenu extends JMenu implements DynamicMenuContent {
93
        
103
        
(-)a/core.multiview/src/org/netbeans/core/multiview/MultiViewCloneableTopComponent.java (-2 / +6 lines)
Lines 163-174 Link Here
163
     * merge action for the topcomponent and the enclosed MultiViewElement..
163
     * merge action for the topcomponent and the enclosed MultiViewElement..
164
     * 
164
     * 
165
     */
165
     */
166
    @Override
166
    public Action[] getActions() {
167
    public Action[] getActions() {
167
        //TEMP don't delegate to element's actions..
168
        //TEMP don't delegate to element's actions..
168
        Action[] superActions = super.getActions();
169
        Action[] superActions = super.getActions();
169
        Action[] acts = peer.peerGetActions(superActions);
170
        Action[] acts = peer.peerGetActions(superActions);
170
        return acts;
171
        
171
//        return acts;
172
        Action[] myActions = new Action[acts.length + 2];
173
        System.arraycopy(acts, 0, myActions, 0, acts.length);
174
        myActions[acts.length + 1] = new EditorsAction();
175
        return myActions;
172
    }
176
    }
173
    
177
    
174
    public MultiViewHandlerDelegate getMultiViewHandlerDelegate() {
178
    public MultiViewHandlerDelegate getMultiViewHandlerDelegate() {
(-)a/core.multiview/src/org/netbeans/core/multiview/MultiViewPeer.java (-2 lines)
Lines 682-689 Link Here
682
              if (obj == null) {
682
              if (obj == null) {
683
                  return true;
683
                  return true;
684
              }
684
              }
685
        } else {
686
            return true;
687
        }
685
        }
688
        if (editorSettingsPreferences == null) {
686
        if (editorSettingsPreferences == null) {
689
            return true;
687
            return true;

Return to bug 199545