use of com.intellij.openapi.command.CommandProcessor in project intellij-community by JetBrains.
the class MessageViewHelper method openMessageViewImpl.
private void openMessageViewImpl() {
CommandProcessor commandProcessor = CommandProcessor.getInstance();
commandProcessor.executeCommand(myProject, () -> {
MessageView messageView = MessageView.SERVICE.getInstance(myProject);
Content content = ContentFactory.SERVICE.getInstance().createContent(myErrorsView.getComponent(), myContentName, true);
content.putUserData(myKey, myErrorsView);
messageView.getContentManager().addContent(content);
messageView.getContentManager().setSelectedContent(content);
messageView.getContentManager().addContentManagerListener(new CloseListener(content, myContentName, myErrorsView));
removeOldContents(content);
messageView.getContentManager().addContentManagerListener(new MyContentDisposer(content, messageView, myKey));
}, "Open Message View", null);
ToolWindowManager.getInstance(myProject).getToolWindow(ToolWindowId.MESSAGES_WINDOW).activate(null);
}
use of com.intellij.openapi.command.CommandProcessor in project intellij-community by JetBrains.
the class StdErrorReporter method openMessageView.
private void openMessageView() {
CommandProcessor commandProcessor = CommandProcessor.getInstance();
commandProcessor.executeCommand(myProject, () -> {
MessageView messageView = MessageView.SERVICE.getInstance(myProject);
final Content content = ContentFactory.SERVICE.getInstance().createContent(myErrorsView.getComponent(), CONTENT_NAME, true);
content.putUserData(KEY, myErrorsView);
messageView.getContentManager().addContent(content);
messageView.getContentManager().setSelectedContent(content);
messageView.getContentManager().addContentManagerListener(new CloseListener(content, messageView.getContentManager()));
removeCompileContents(content);
messageView.getContentManager().addContentManagerListener(new MyContentDisposer(content, messageView));
}, XmlBundle.message("validate.xml.open.message.view.command.name"), null);
}
Aggregations