Skip to content
Permalink
Browse files
8263385: IGV: Graph is not opened in the window that has focus.
Reviewed-by: rrich, chagedorn
  • Loading branch information
jyukutyo authored and Yi Yang committed Jul 19, 2021
1 parent e7cdfeb commit edff55607b9bc47bc1a5d9de7ad1a5d622be9736
@@ -27,6 +27,9 @@
import com.sun.hotspot.igv.data.services.GraphViewer;
import com.sun.hotspot.igv.graph.Diagram;
import com.sun.hotspot.igv.settings.Settings;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.openide.windows.Mode;
import org.openide.windows.TopComponent;
import org.openide.windows.WindowManager;
@@ -45,7 +48,10 @@ public void view(InputGraph graph, boolean clone) {
if (!clone) {
WindowManager manager = WindowManager.getDefault();
for (Mode m : manager.getModes()) {
for (TopComponent t : manager.getOpenedTopComponents(m)) {
List<TopComponent> l = new ArrayList<>();
l.add(m.getSelectedTopComponent());
l.addAll(Arrays.asList(manager.getOpenedTopComponents(m)));
for (TopComponent t : l) {
if (t instanceof EditorTopComponent) {
EditorTopComponent etc = (EditorTopComponent) t;
if (etc.getModel().getGroup().getGraphs().contains(graph)) {

1 comment on commit edff556

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on edff556 Jul 19, 2021

Please sign in to comment.