summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael Istria2018-05-14 06:05:01 -0400
committerMickael Istria2018-05-16 02:38:09 -0400
commita5dd573797121a653605780eac2090b9183ff743 (patch)
treef2e2317379159ce005a2bcb2722c86226aef1aea
parent8854563167abd0c7657e18f92d6c38f9183b58e4 (diff)
downloadeclipse.platform.text-a5dd573797121a653605780eac2090b9183ff743.zip
eclipse.platform.text-a5dd573797121a653605780eac2090b9183ff743.tar.gz
eclipse.platform.text-a5dd573797121a653605780eac2090b9183ff743.tar.xz
Bug 534402 - ContentAssistant#setStatusMessage isn't safe in async modeI20180516-0800
Change-Id: I05ede1415ca42e6b39f38bed1856b71b43c6cca4 Signed-off-by: Mickael Istria <mistria@redhat.com>
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/AsyncCompletionProposalPopup.java1
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java4
2 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/AsyncCompletionProposalPopup.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/AsyncCompletionProposalPopup.java
index a3979ea..f67612f 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/AsyncCompletionProposalPopup.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/AsyncCompletionProposalPopup.java
@@ -293,4 +293,5 @@ class AsyncCompletionProposalPopup extends CompletionProposalPopup {
}
return IDocument.DEFAULT_CONTENT_TYPE;
}
+
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
index 92052d4..3161ed5 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
@@ -1900,7 +1900,7 @@ class CompletionProposalPopup implements IContentAssistListener {
*/
void setMessage(String message) {
Assert.isNotNull(message);
- if (isActive() && fMessageText != null)
+ if (isActive() && fMessageText != null && !fMessageText.isDisposed())
fMessageText.setText(message + " "); //$NON-NLS-1$
}
@@ -1923,7 +1923,7 @@ class CompletionProposalPopup implements IContentAssistListener {
* @since 3.2
*/
public void setStatusLineVisible(boolean show) {
- if (!isActive() || show == (fMessageText != null))
+ if (!isActive() || show == (fMessageText != null && !fMessageText.isDisposed()))
return; // nothing to do
if (show) {