use of com.intellij.ide.util.GotoLineNumberDialog in project intellij-community by JetBrains.
the class GotoLineAction method actionPerformed.
public void actionPerformed(AnActionEvent e) {
final Project project = e.getData(CommonDataKeys.PROJECT);
final Editor editor = e.getData(CommonDataKeys.EDITOR_EVEN_IF_INACTIVE);
if (Boolean.TRUE.equals(e.getData(PlatformDataKeys.IS_MODAL_CONTEXT))) {
GotoLineNumberDialog dialog = new EditorGotoLineNumberDialog(project, editor);
dialog.show();
} else {
CommandProcessor processor = CommandProcessor.getInstance();
processor.executeCommand(project, () -> {
GotoLineNumberDialog dialog = new EditorGotoLineNumberDialog(project, editor);
dialog.show();
IdeDocumentHistory.getInstance(project).includeCurrentCommandAsNavigation();
}, IdeBundle.message("command.go.to.line"), null);
}
}
Aggregations