mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WEB-21129: move auto-update to the gear icon
This commit is contained in:
+1
@@ -105,6 +105,7 @@ public abstract class DockablePopupManager<T extends JComponent & Disposable> {
|
||||
setToolwindowDefaultState();
|
||||
|
||||
((ToolWindowEx)myToolWindow).setTitleActions(createRestorePopupAction());
|
||||
((ToolWindowEx)myToolWindow).setAdditionalGearActions(new DefaultActionGroup(createActions()));
|
||||
|
||||
final ContentManager contentManager = myToolWindow.getContentManager();
|
||||
final ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
|
||||
|
||||
+1
-12
@@ -181,7 +181,7 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr
|
||||
});
|
||||
}
|
||||
|
||||
public DocumentationComponent(final DocumentationManager manager, final AnAction[] additionalActions) {
|
||||
public DocumentationComponent(final DocumentationManager manager) {
|
||||
myManager = manager;
|
||||
myIsEmpty = true;
|
||||
myIsShown = false;
|
||||
@@ -403,13 +403,6 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr
|
||||
|
||||
myExternalDocAction.registerCustomShortcutSet(CustomShortcutSet.fromString("UP"), this);
|
||||
edit.registerCustomShortcutSet(CommonShortcuts.getEditSource(), this);
|
||||
if (additionalActions != null) {
|
||||
for (final AnAction action : additionalActions) {
|
||||
actions.add(action);
|
||||
ShortcutSet shortcutSet = action.getShortcutSet();
|
||||
action.registerCustomShortcutSet(shortcutSet, this);
|
||||
}
|
||||
}
|
||||
|
||||
new NextLinkAction().registerCustomShortcutSet(CustomShortcutSet.fromString("TAB"), this);
|
||||
new PreviousLinkAction().registerCustomShortcutSet(CustomShortcutSet.fromString("shift TAB"), this);
|
||||
@@ -454,10 +447,6 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr
|
||||
return FontInfo.isMonospaced(new Font(fontName, Font.PLAIN, 12));
|
||||
}
|
||||
|
||||
public DocumentationComponent(final DocumentationManager manager) {
|
||||
this(manager, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getData(@NonNls String dataId) {
|
||||
if (DocumentationManager.SELECTED_QUICK_DOC_TEXT.getName().equals(dataId)) {
|
||||
|
||||
+2
-2
@@ -105,7 +105,7 @@ public class DocumentationManager extends DockablePopupManager<DocumentationComp
|
||||
|
||||
@Override
|
||||
protected DocumentationComponent createComponent() {
|
||||
return new DocumentationComponent(this, createActions());
|
||||
return new DocumentationComponent(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -150,7 +150,7 @@ public class DocumentationManager extends DockablePopupManager<DocumentationComp
|
||||
|
||||
if (myToolWindow != null) {
|
||||
myToolWindow.getComponent().putClientProperty(ChooseByNameBase.TEMPORARILY_FOCUSABLE_COMPONENT_KEY, Boolean.TRUE);
|
||||
|
||||
|
||||
if (myRestorePopupAction != null) {
|
||||
ShortcutSet quickDocShortcut = ActionManager.getInstance().getAction(IdeActions.ACTION_QUICK_JAVADOC).getShortcutSet();
|
||||
myRestorePopupAction.registerCustomShortcutSet(quickDocShortcut, myToolWindow.getComponent());
|
||||
|
||||
+1
-13
@@ -17,10 +17,6 @@ package com.intellij.byteCodeViewer;
|
||||
|
||||
import com.intellij.execution.filters.LineNumbersMapping;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.actionSystem.ActionManager;
|
||||
import com.intellij.openapi.actionSystem.ActionPlaces;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.DefaultActionGroup;
|
||||
import com.intellij.openapi.editor.*;
|
||||
import com.intellij.openapi.editor.colors.EditorColorsManager;
|
||||
import com.intellij.openapi.editor.ex.EditorEx;
|
||||
@@ -47,7 +43,7 @@ public class ByteCodeViewerComponent extends JPanel implements Disposable {
|
||||
|
||||
private final Editor myEditor;
|
||||
|
||||
public ByteCodeViewerComponent(Project project, AnAction[] additionalActions) {
|
||||
public ByteCodeViewerComponent(Project project) {
|
||||
super(new BorderLayout());
|
||||
final EditorFactory factory = EditorFactory.getInstance();
|
||||
final Document doc = ((EditorFactoryImpl)factory).createDocument("", true, false);
|
||||
@@ -66,14 +62,6 @@ public class ByteCodeViewerComponent extends JPanel implements Disposable {
|
||||
|
||||
myEditor.setBorder(null);
|
||||
add(myEditor.getComponent(), BorderLayout.CENTER);
|
||||
final ActionManager actionManager = ActionManager.getInstance();
|
||||
final DefaultActionGroup actions = new DefaultActionGroup();
|
||||
if (additionalActions != null) {
|
||||
for (final AnAction action : additionalActions) {
|
||||
actions.add(action);
|
||||
}
|
||||
}
|
||||
add(actionManager.createActionToolbar(ActionPlaces.JAVADOC_TOOLBAR, actions, true).getComponent(), BorderLayout.NORTH);
|
||||
}
|
||||
|
||||
public void setText(final String bytecode) {
|
||||
|
||||
@@ -91,7 +91,7 @@ public class ByteCodeViewerManager extends DockablePopupManager<ByteCodeViewerCo
|
||||
|
||||
@Override
|
||||
protected ByteCodeViewerComponent createComponent() {
|
||||
return new ByteCodeViewerComponent(myProject, createActions());
|
||||
return new ByteCodeViewerComponent(myProject);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -122,7 +122,7 @@ public class ShowByteCodeAction extends AnAction {
|
||||
Messages.showErrorDialog(project, "Unable to parse class file for '" + psiElementTitle + "'.", "Bytecode not Found");
|
||||
return;
|
||||
}
|
||||
final ByteCodeViewerComponent component = new ByteCodeViewerComponent(project, null);
|
||||
final ByteCodeViewerComponent component = new ByteCodeViewerComponent(project);
|
||||
component.setText(myByteCode, targetElement);
|
||||
Processor<JBPopup> pinCallback = popup -> {
|
||||
codeViewerManager.recreateToolWindow(targetElement, targetElement);
|
||||
|
||||
Reference in New Issue
Block a user