Java Code Examples for com.intellij.openapi.ui.MessageType#ERROR
The following examples show how to use
com.intellij.openapi.ui.MessageType#ERROR .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CopyToDbUnit.java From dbunit-extractor with MIT License | 6 votes |
private void showPopup(DataContext dataContext, XmlOutput xmlOutput) { MessageType messageType = MessageType.INFO; String htmlMessage = ""; if (xmlOutput != null && xmlOutput.getRowSize() > 0 && xmlOutput.getColumnsSize() > 0) { if (xmlOutput.getTableName() == null || xmlOutput.getTableName().isEmpty()) { messageType = MessageType.WARNING; htmlMessage += "Table name is missing. Please try to synchronize database connection. <br/>"; } htmlMessage += "Copied: " + xmlOutput.getRowSize() + " entries (selected " + xmlOutput.getColumnsSize() + " columns)"; } else { messageType = MessageType.ERROR; if (xmlOutput == null) { htmlMessage = "Failed to copy entries. No grid available."; } else if (xmlOutput.getRowSize() <= 0) { htmlMessage = "No rows selected."; } else if (xmlOutput.getColumnsSize() <= 0) { htmlMessage = "No columns selected."; } } JBPopupFactory.getInstance() .createHtmlTextBalloonBuilder(htmlMessage, messageType, null) .setFadeoutTime(7500) .createBalloon().show(JBPopupFactory.getInstance().guessBestPopupLocation(dataContext), Balloon.Position.atRight); }
Example 2
Source File: TestsUIUtil.java From consulo with Apache License 2.0 | 5 votes |
public TestResultPresentation getPresentation(int failedCount, int passedCount, int notStartedCount, int ignoredCount) { if (myRoot == null) { myBalloonText = myTitle = myStarted ? "Tests were interrupted" : ExecutionBundle.message("test.not.started.progress.text"); myText = ""; myType = MessageType.WARNING; } else { if (failedCount > 0) { myTitle = ExecutionBundle.message("junit.runing.info.tests.failed.label"); myText = passedCount + " passed, " + failedCount + " failed" + (notStartedCount > 0 ? ", " + notStartedCount + " not started" : ""); myType = MessageType.ERROR; } else if (notStartedCount > 0) { myTitle = ignoredCount > 0 ? "Tests Ignored" : ExecutionBundle.message("junit.running.info.failed.to.start.error.message"); myText = passedCount + " passed, " + notStartedCount + (ignoredCount > 0 ? " ignored" : " not started"); myType = ignoredCount == 0 ? MessageType.WARNING : MessageType.ERROR; } else { myTitle = ExecutionBundle.message("junit.runing.info.tests.passed.label"); myText = passedCount + " passed"; myType = MessageType.INFO; } if (myComment != null) { myText += " " + myComment; } myBalloonText = myTitle + ": " + myText; } return this; }
Example 3
Source File: NotificationsUtil.java From consulo with Apache License 2.0 | 5 votes |
@Nonnull public static MessageType getMessageType(@Nonnull Notification notification) { switch (notification.getType()) { case WARNING: return MessageType.WARNING; case ERROR: return MessageType.ERROR; case INFORMATION: default: return MessageType.INFO; } }
Example 4
Source File: Highlighters.java From consulo with Apache License 2.0 | 4 votes |
public ErrorTextHighlighter() { super(MessageType.ERROR); }