From c42dde013864d811018229a64bcad8e8104d97fc Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 22 Feb 2012 13:20:42 +0100 Subject: [PATCH 1/4] unblock document (EA-33824) --- .../src/com/intellij/codeInsight/lookup/PsiTypeLookupItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/java-impl/src/com/intellij/codeInsight/lookup/PsiTypeLookupItem.java b/java/java-impl/src/com/intellij/codeInsight/lookup/PsiTypeLookupItem.java index a8a5814a9dde..c87745948fec 100644 --- a/java/java-impl/src/com/intellij/codeInsight/lookup/PsiTypeLookupItem.java +++ b/java/java-impl/src/com/intellij/codeInsight/lookup/PsiTypeLookupItem.java @@ -234,7 +234,7 @@ public class PsiTypeLookupItem extends LookupItem { PsiFile file = context.getFile(); int newTail = JavaCompletionUtil.insertClassReference(aClass, file, context.getStartOffset(), context.getTailOffset()); context.setTailOffset(newTail); - PostprocessReformattingAspect.getInstance(context.getProject()).doPostponedFormatting(); JavaCompletionUtil.shortenReference(file, context.getStartOffset()); + PostprocessReformattingAspect.getInstance(context.getProject()).doPostponedFormatting(); } } From b5fb74669945afdd3eebe2a10fe6f6792c52039b Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 22 Feb 2012 13:22:09 +0100 Subject: [PATCH 2/4] when selection start = end is a normal situation (EA-33778) --- .../src/com/intellij/codeInsight/lookup/impl/LookupImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java index e4a9a301b0c9..a36e6a26038a 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java @@ -784,7 +784,7 @@ public class LookupImpl extends LightweightHint implements LookupEx, Disposable int bs = myEditor.logicalPositionToOffset(new LogicalPosition(line, blockStart.column)); int start = bs - prefix.length(); int end = myEditor.logicalPositionToOffset(new LogicalPosition(line, blockEnd.column)); - if (start >= end) { + if (start > end) { LOG.error("bs=" + bs + "; start=" + start + "; end=" + end + "; blockStart=" + blockStart + "; blockEnd=" + blockEnd + "; line=" + line + "; len=" + (document.getLineEndOffset(line) - document.getLineStartOffset(line))); From c83d41fb5e4b6441d5faf04b1d2eba3049e2838b Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 22 Feb 2012 13:24:42 +0100 Subject: [PATCH 3/4] tolerate recursive lookup hiding (EA-33777) --- .../src/com/intellij/codeInsight/lookup/impl/LookupImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java index a36e6a26038a..d8574ce19d64 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java @@ -1275,7 +1275,7 @@ public class LookupImpl extends LightweightHint implements LookupEx, Disposable public void hideLookup(boolean explicitly) { ApplicationManager.getApplication().assertIsDispatchThread(); - if (myDisposed) return; + if (myHidden) return; doHide(true, explicitly); } From ab388f9ff1cdcc32147b9f60ef6fdd3c21e96ac5 Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 22 Feb 2012 13:56:14 +0100 Subject: [PATCH 4/4] restore api for plugins --- .../src/com/intellij/ui/table/TableView.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/platform/platform-api/src/com/intellij/ui/table/TableView.java b/platform/platform-api/src/com/intellij/ui/table/TableView.java index b62334b42962..9d79f0a9e96a 100644 --- a/platform/platform-api/src/com/intellij/ui/table/TableView.java +++ b/platform/platform-api/src/com/intellij/ui/table/TableView.java @@ -41,6 +41,15 @@ public class TableView extends BaseTableView implements ItemsProvider, Sel super.setModel(dataModel); } + /** + * use {@link #setModelAndUpdateColumns(com.intellij.util.ui.ListTableModel)} instead + * @param model + */ + @Deprecated + public void setModel(final ListTableModel model) { + setModelAndUpdateColumns(model); + } + public void setModelAndUpdateColumns(final ListTableModel model) { super.setModel(model); updateColumnSizes();