Bug 563155 - JAXWSJavaCompletionProposalComputer requires UI Thread

Audited code, and it turns out UI Thread is not necessary in this class,
so it can run async.

Change-Id: I99bfcfa79d1fce40653440c11fcf9424f4b3cc96
Signed-off-by: Mickael Istria <mistria@redhat.com>
diff --git a/bundles/org.eclipse.jst.ws.jaxws.ui/plugin.xml b/bundles/org.eclipse.jst.ws.jaxws.ui/plugin.xml
index 99baef1..baa1d71 100755
--- a/bundles/org.eclipse.jst.ws.jaxws.ui/plugin.xml
+++ b/bundles/org.eclipse.jst.ws.jaxws.ui/plugin.xml
@@ -74,7 +74,8 @@
       <javaCompletionProposalComputer

             activate="true"

             categoryId="org.eclipse.jst.ws.jaxws.ui.jaxwsProposalComputer"

-            class="org.eclipse.jst.ws.internal.jaxws.ui.annotations.contentassist.AnnotationCompletionProposalComputer">

+            class="org.eclipse.jst.ws.internal.jaxws.ui.annotations.contentassist.AnnotationCompletionProposalComputer"

+            requiresUIThread="false">

          <partition

                type="__java_string">

          </partition>

diff --git a/bundles/org.eclipse.jst.ws.jaxws.ui/src/org/eclipse/jst/ws/internal/jaxws/ui/annotations/contentassist/AnnotationCompletionProposalComputer.java b/bundles/org.eclipse.jst.ws.jaxws.ui/src/org/eclipse/jst/ws/internal/jaxws/ui/annotations/contentassist/AnnotationCompletionProposalComputer.java
index f63f52c..8cbdb51 100644
--- a/bundles/org.eclipse.jst.ws.jaxws.ui/src/org/eclipse/jst/ws/internal/jaxws/ui/annotations/contentassist/AnnotationCompletionProposalComputer.java
+++ b/bundles/org.eclipse.jst.ws.jaxws.ui/src/org/eclipse/jst/ws/internal/jaxws/ui/annotations/contentassist/AnnotationCompletionProposalComputer.java
@@ -29,6 +29,7 @@
 import org.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer;

 import org.eclipse.jdt.ui.text.java.JavaContentAssistInvocationContext;

 import org.eclipse.jface.text.contentassist.ICompletionProposal;

+import org.eclipse.jface.text.contentassist.IContextInformation;

 import org.eclipse.jst.ws.annotations.core.AnnotationsManager;

 import org.eclipse.jst.ws.annotations.core.initialization.IAnnotationAttributeInitializer;

 import org.eclipse.jst.ws.annotations.core.utils.AnnotationUtils;

@@ -40,8 +41,7 @@
         super();

     }

 

-    @SuppressWarnings("unchecked")

-    public List computeCompletionProposals(ContentAssistInvocationContext context, IProgressMonitor monitor) {

+    public List<ICompletionProposal> computeCompletionProposals(ContentAssistInvocationContext context, IProgressMonitor monitor) {

         if (context instanceof JavaContentAssistInvocationContext) {

             return computeCompletionProposals((JavaContentAssistInvocationContext) context);

         }

@@ -149,8 +149,7 @@
         return false;

     }

 

-    @SuppressWarnings("unchecked")

-    public List computeContextInformation(ContentAssistInvocationContext context, IProgressMonitor monitor) {

+    public List<IContextInformation> computeContextInformation(ContentAssistInvocationContext context, IProgressMonitor monitor) {

         return Collections.emptyList();

     }