private void updateDisplayName() { setDisplayName(WindowUtilities.getUniqueTitle(getDocument().getDisplayName(), MetadataViewTopComponent.class)); }
private void updateDisplayName() { setDisplayName(WindowUtilities.getUniqueTitle(getDocument().getDisplayName(), PlacemarkViewTopComponent.class)); }
private void updateDisplayName() { setDisplayName(WindowUtilities.getUniqueTitle(getView().getSceneName(), ProductSceneViewTopComponent.class)); }
@Override public void actionPerformed(ActionEvent e) { String defaultName = WindowUtilities.getUniqueTitle(Bundle.VAL_NewWorkspaceActionValue(), WorkspaceTopComponent.class); NotifyDescriptor.InputLine d = new NotifyDescriptor.InputLine(Bundle.LBL_NewWorkspaceActionName(), Bundle.CTL_NewWorkspaceActionName()); d.setInputText(defaultName); Object result = DialogDisplayer.getDefault().notify(d); if (NotifyDescriptor.OK_OPTION.equals(result)) { WorkspaceTopComponent workspaceTopComponent = new WorkspaceTopComponent(d.getInputText()); Mode editor = WindowManager.getDefault().findMode("editor"); Assert.notNull(editor, "editor"); editor.dockInto(workspaceTopComponent); workspaceTopComponent.open(); workspaceTopComponent.requestActive(); } }