don't always show intention icon

This commit is contained in:
peter
2012-07-30 21:46:56 +02:00
parent b182db57db
commit 9a6733be27
2 changed files with 4 additions and 2 deletions
@@ -26,7 +26,7 @@ public class ShowHideIntentionIconLookupAction extends LookupElementAction {
private static final String KEY = "completion.show.intention.icon";
public ShowHideIntentionIconLookupAction() {
super(AllIcons.Actions.IntentionBulb, (Registry.is(KEY) ? "Never" : "Always") + " show intention icon");
super(AllIcons.Actions.IntentionBulb, (Registry.is(KEY) ? "Never show" : "Show") + " intention icon");
}
@Override
@@ -363,7 +363,9 @@ public class LookupImpl extends LightweightHint implements LookupEx, Disposable
for (LookupActionProvider provider : LookupActionProvider.EP_NAME.getExtensions()) {
provider.fillActions(element, this, consumer);
}
consumer.consume(new ShowHideIntentionIconLookupAction());
if (!consumer.getResult().isEmpty()) {
consumer.consume(new ShowHideIntentionIconLookupAction());
}
return consumer.getResult();
}