ensure byte code viewer works in Project view, make focusable

IDEA-185007; IDEA-188549
This commit is contained in:
Anna.Kozlova
2018-03-20 12:54:02 +01:00
parent 747b12a94a
commit 9ba8627b09
2 changed files with 5 additions and 1 deletions
@@ -108,6 +108,10 @@ public class ByteCodeViewerComponent extends JPanel implements Disposable {
public String getText() {
return myEditor.getDocument().getText();
}
public JComponent getEditorComponent() {
return myEditor.getContentComponent();
}
@Override
public void dispose() {
@@ -130,7 +130,7 @@ public class ShowByteCodeAction extends AnAction {
return false;
};
final JBPopup popup = JBPopupFactory.getInstance().createComponentPopupBuilder(component, editor.getComponent())
final JBPopup popup = JBPopupFactory.getInstance().createComponentPopupBuilder(component, component.getEditorComponent())
.setProject(project)
.setDimensionServiceKey(project, ShowByteCodeAction.class.getName(), false)
.setResizable(true)