fix for "fix missing tooltips on a diagram", in production yfiles classes is obfuscated

GitOrigin-RevId: 6826fd65681240263d96faab4b9597a9943d2a1f
This commit is contained in:
Alexander Lobas
2019-07-16 12:20:00 +03:00
committed by intellij-monorepo-bot
parent 750b1b1090
commit 8230f21e50
2 changed files with 3 additions and 3 deletions
@@ -12,6 +12,7 @@ import com.intellij.openapi.components.BaseComponent;
import com.intellij.openapi.editor.colors.ColorKey;
import com.intellij.openapi.editor.colors.EditorColorsManager;
import com.intellij.openapi.editor.colors.EditorColorsUtil;
import com.intellij.openapi.keymap.impl.IdeMouseEventDispatcher;
import com.intellij.openapi.ui.popup.Balloon;
import com.intellij.openapi.ui.popup.BalloonBuilder;
import com.intellij.openapi.ui.popup.JBPopupFactory;
@@ -239,8 +240,7 @@ public class IdeTooltipManager implements Disposable, AWTEventListener, BaseComp
if (text == null || text.trim().isEmpty()) return false;
Rectangle visibleRect = c.getParent() instanceof JViewport ? ((JViewport)c.getParent()).getViewRect() :
c.getClass().getName().equals("y.view.Graph2DCanvas") ? c.getBounds() :
c.getVisibleRect();
IdeMouseEventDispatcher.isDiagramViewComponent(c) ? c.getBounds() : c.getVisibleRect();
if (!visibleRect.contains(getPoint())) return false;
JLayeredPane layeredPane = ComponentUtil.getParentOfType((Class<? extends JLayeredPane>)JLayeredPane.class, (Component)c);
@@ -380,7 +380,7 @@ public final class IdeMouseEventDispatcher {
return findHorizontalScrollBar(c.getParent());
}
private static boolean isDiagramViewComponent(@Nullable Component component) {
public static boolean isDiagramViewComponent(@Nullable Component component) {
// in production yfiles classes is obfuscated
return UIUtil.isClientPropertyTrue(component, "Diagram-View-Component-Key");
}