[jbosstools-commits] JBoss Tools SVN: r43721 - trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Sep 14 18:58:25 EDT 2012


Author: dgolovin
Date: 2012-09-14 18:58:24 -0400 (Fri, 14 Sep 2012)
New Revision: 43721

Modified:
   trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/ELProposalProcessor.java
Log:
Java doc added for common StringUtil.java class

Modified: trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/ELProposalProcessor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/ELProposalProcessor.java	2012-09-14 22:43:09 UTC (rev 43720)
+++ trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/ELProposalProcessor.java	2012-09-14 22:58:24 UTC (rev 43721)
@@ -493,9 +493,6 @@
 	 * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
 	 */
 	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
-		if(viewer == null) {
-			return NO_PROPOSALS;
-		}
 		IDocument document = viewer.getDocument();
 		int start = 0;
 		int end = document.getLength();
@@ -665,9 +662,7 @@
 		Arrays.sort(resultArray, new Comparator<ICompletionProposal>() {
 			public int compare(ICompletionProposal arg0,
 					ICompletionProposal arg1) {
-				String str0 = (arg0 == null ? "" : arg0.getDisplayString()); //$NON-NLS-1$
-				String str1 = (arg1 == null ? "" : arg1.getDisplayString()); //$NON-NLS-1$
-				return str0.compareTo(str1);
+				return arg0.getDisplayString().compareTo(arg1.getDisplayString());
 			}
 		});
 		return resultArray;



More information about the jbosstools-commits mailing list