use of com.intellij.uiDesigner.ErrorInfo in project intellij-community by JetBrains.
the class QuickFixManager method showIntentionHint.
/**
* Shows intention hint (light bulb) if it's not visible yet.
*/
final void showIntentionHint() {
if (!myComponent.isShowing() || !IJSwingUtilities.hasFocus(myComponent)) {
hideIntentionHint();
return;
}
// 1. Hide previous hint (if any)
hideIntentionHint();
// 2. Found error (if any)
final ErrorInfo[] errorInfos = getErrorInfos();
if (!haveFixes(errorInfos)) {
hideIntentionHint();
return;
}
// 3. Determine position where this hint should be shown
final Rectangle bounds = getErrorBounds();
if (bounds == null) {
return;
}
// 4. Show light bulb to fix this error
final LightBulbComponentImpl lightBulbComponent = new LightBulbComponentImpl(this, AllIcons.Actions.IntentionBulb);
myHint = new LightweightHint(lightBulbComponent);
myLastHintBounds = bounds;
myHint.show(myComponent, bounds.x - AllIcons.Actions.IntentionBulb.getIconWidth() - 4, bounds.y, myComponent, new HintHint(myComponent, bounds.getLocation()));
}
Aggregations