When I'm in java file, When i click "navigate > test", it will popup a diaglog with "create new test", I hope in ruby file idea do same thing, how should i do?
With your suggestion, I use following code inspire from "/home/roroco/Downloads/clion-1.2/lib/clion.jar!/com/intellij/testIntegration/GotoTestOrCodeAction.class"
/** * Created by roroco on 10/28/15. */ class ShowPopup extends Act { @Override void actionPerformed(AnActionEvent e) { super.actionPerformed(e) PopupFactoryImpl f = PopupFactoryImpl.newInstance()
ListPopup p = f.createListPopup(listPopupStep) p.showInFocusCenter() }
ListPopupStep getListPopupStep() { new ListPopupStep() {
Is there any solution?
I'm not sure what solution you need. The Ruby plugin supports this functionality out of the box.
When I'm in java file, When i click "navigate > test", it will popup a diaglog with "create new test", I hope in ruby file idea do same thing, how should i do?
What i hope is to learn how to build idea ui with openapi. so I hope build a popup dialog with idea theme
com.intellij.testIntegration.GotoTestOrCodeHandler
With your suggestion, I use following code inspire from "/home/roroco/Downloads/clion-1.2/lib/clion.jar!/com/intellij/testIntegration/GotoTestOrCodeAction.class"
void actionPerformed(AnActionEvent e) {super.actionPerformed(e)
Presentation p = e.getPresentation();
p.setEnabled(true);
p.setText(ActionsBundle.message("action.GotoTestSubject.text"));
p.setDescription(ActionsBundle.message("action.GotoTestSubject.description"));
}
But it's not popup ui, I hope a simple code to build popup dialog, the gototest code that I can implement it in other way
I find the solution, here is my code: