This commit is contained in:
peter
2012-01-05 20:38:47 +01:00
parent edbb4ecc18
commit 5c2f3aa071
3 changed files with 7 additions and 6 deletions
@@ -50,12 +50,13 @@ public abstract class LookupManager {
}
@Nullable
public LookupEx showLookup(Editor editor, @NotNull LookupElement[] items, String prefix) {
public LookupEx showLookup(Editor editor, @NotNull LookupElement[] items, @NotNull String prefix) {
return showLookup(editor, items, prefix, LookupArranger.DEFAULT);
}
@Nullable
public abstract LookupEx showLookup(Editor editor, @NotNull LookupElement[] items, String prefix, @NotNull LookupArranger arranger);
public abstract LookupEx showLookup(Editor editor, @NotNull LookupElement[] items,
@NotNull String prefix, @NotNull LookupArranger arranger);
public abstract void hideActiveLookup();
@@ -69,6 +70,6 @@ public abstract class LookupManager {
//public abstract boolean isDisposed();
public abstract Lookup createLookup(Editor editor, @NotNull LookupElement[] items, final String prefix, LookupArranger arranger);
public abstract Lookup createLookup(Editor editor, @NotNull LookupElement[] items, @NotNull final String prefix, LookupArranger arranger);
}
@@ -106,7 +106,7 @@ public class LookupManagerImpl extends LookupManager {
public LookupEx showLookup(final Editor editor,
@NotNull LookupElement[] items,
final String prefix,
@NotNull final String prefix,
@NotNull final LookupArranger arranger) {
for (LookupElement item : items) {
assert item != null;
@@ -118,7 +118,7 @@ public class LookupManagerImpl extends LookupManager {
public LookupImpl createLookup(final Editor editor,
@NotNull LookupElement[] items,
final String prefix,
@NotNull final String prefix,
@NotNull final LookupArranger arranger) {
hideActiveLookup();
@@ -120,7 +120,7 @@ public class TextFieldWithAutoCompletion extends EditorTextField {
final LookupImpl lookup =
(LookupImpl)LookupManager.getInstance(getProject()).createLookup(editor,
calcLookupItems(lookupPrefix),
lookupPrefix != null ? lookupPrefix : "",
StringUtil.notNullize(lookupPrefix),
LookupArranger.DEFAULT);
final String advertisementText = getAdvertisementText();
if (!StringUtil.isEmpty(advertisementText)) {