mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-169956 - Wrong HelpId's are mapped to dialog boxes: Help button: 404 error
- delegate to RemoteServersViewContribution
This commit is contained in:
+8
@@ -23,6 +23,7 @@ import com.intellij.remoteServer.impl.runtime.ui.tree.ServersTreeNodeSelector;
|
||||
import com.intellij.remoteServer.impl.runtime.ui.tree.ServersTreeStructure;
|
||||
import com.intellij.remoteServer.runtime.ServerConnection;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -30,6 +31,9 @@ import java.util.List;
|
||||
|
||||
public abstract class RemoteServersViewContribution extends RemoteServersViewContributor {
|
||||
|
||||
@NonNls
|
||||
private static final String HELP_ID = "Application_Servers_tool_window";
|
||||
|
||||
public abstract List<RemoteServer<?>> getRemoteServers();
|
||||
|
||||
@Override
|
||||
@@ -71,4 +75,8 @@ public abstract class RemoteServersViewContribution extends RemoteServersViewCon
|
||||
return ContainerUtil.filter(RemoteServersManager.getInstance().getServers(),
|
||||
server -> getRemoteServerToolWindowId(server) == toolWindowId);
|
||||
}
|
||||
|
||||
protected String getContextHelpId() {
|
||||
return HELP_ID;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -52,8 +52,6 @@ public class ServersToolWindowContent extends JPanel implements Disposable, Serv
|
||||
@NonNls private static final String SERVERS_TOOL_WINDOW_TOOLBAR = "RemoteServersViewToolbar";
|
||||
@NonNls private static final String SERVERS_TOOL_WINDOW_POPUP = "RemoteServersViewPopup";
|
||||
|
||||
@NonNls
|
||||
private static final String HELP_ID = "Application_Servers_tool_window";
|
||||
private static final String MESSAGE_CARD = "message";
|
||||
private static final String EMPTY_SELECTION_MESSAGE = "Select a server or deployment in the tree to view details";
|
||||
|
||||
@@ -263,7 +261,7 @@ public class ServersToolWindowContent extends JPanel implements Disposable, Serv
|
||||
DefaultActionGroup group = new DefaultActionGroup();
|
||||
group.add(ActionManager.getInstance().getAction(SERVERS_TOOL_WINDOW_TOOLBAR));
|
||||
group.add(new Separator());
|
||||
group.add(new ContextHelpAction(HELP_ID));
|
||||
group.add(new ContextHelpAction(myContribution.getContextHelpId()));
|
||||
|
||||
ActionToolbar actionToolBar = ActionManager.getInstance().createActionToolbar(PLACE_TOOLBAR, group, false);
|
||||
|
||||
@@ -275,6 +273,9 @@ public class ServersToolWindowContent extends JPanel implements Disposable, Serv
|
||||
if (KEY.getName().equals(dataId)) {
|
||||
return ServersToolWindowContent.this;
|
||||
}
|
||||
else if (PlatformDataKeys.HELP_ID.is(dataId)) {
|
||||
return myContribution.getContextHelpId();
|
||||
}
|
||||
return myContribution.getData(dataId, ServersToolWindowContent.this);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user