From 4a0fd328d39f7c5efb0763ac81498fe167752d49 Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Mon, 2 Mar 2015 15:47:22 +0300 Subject: [PATCH] cleanup --- .../intellij/plugins/xpathView/ShowXPathAction.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/ShowXPathAction.java b/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/ShowXPathAction.java index 8739b243f86a..5e2660fac242 100644 --- a/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/ShowXPathAction.java +++ b/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/ShowXPathAction.java @@ -15,12 +15,10 @@ */ package org.intellij.plugins.xpathView; +import com.intellij.codeInsight.hint.HintManager; import com.intellij.codeInsight.hint.HintManagerImpl; import com.intellij.idea.ActionsBundle; -import com.intellij.openapi.actionSystem.ActionPlaces; -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.LangDataKeys; -import com.intellij.openapi.actionSystem.Presentation; +import com.intellij.openapi.actionSystem.*; import com.intellij.openapi.editor.Document; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.markup.RangeHighlighter; @@ -69,7 +67,7 @@ public class ShowXPathAction extends XPathAction { } public void actionPerformed(AnActionEvent e) { - final Editor editor = LangDataKeys.EDITOR.getData(e.getDataContext()); + final Editor editor = CommonDataKeys.EDITOR.getData(e.getDataContext()); if (editor == null) { return; } @@ -108,7 +106,7 @@ public class ShowXPathAction extends XPathAction { label.setOpaque(false); label.setEditable(false); label.setBorder(null); - label.setHorizontalAlignment(JTextField.CENTER); + label.setHorizontalAlignment(SwingConstants.CENTER); label.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR)); final JPanel p = new NonOpaquePanel(new BorderLayout()); @@ -136,6 +134,6 @@ public class ShowXPathAction extends XPathAction { final Point point = editor.visualPositionToXY(editor.getCaretModel().getVisualPosition()); point.y += editor.getLineHeight() / 2; HintHint hintHint = new HintHint(editor, point).setAwtTooltip(true).setContentActive(true).setExplicitClose(true).setShowImmediately(true); - HintManagerImpl.getInstanceImpl().showEditorHint(hint, editor, point, HintManagerImpl.HIDE_BY_ANY_KEY, 0, false, hintHint); + HintManagerImpl.getInstanceImpl().showEditorHint(hint, editor, point, HintManager.HIDE_BY_ANY_KEY, 0, false, hintHint); } } \ No newline at end of file