[jbosstools-commits] JBoss Tools SVN: r40882 - trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Wed May 9 15:10:10 EDT 2012


Author: elvisisking
Date: 2012-05-09 15:10:10 -0400 (Wed, 09 May 2012)
New Revision: 40882

Modified:
   trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/QualifiedNameEditor.java
Log:
JBIDE-11816 NPE Occurs After Changing Node Type Definition Name. Had to set a default proposal provider (one without proposals). This default proposal provider gets overridden when proposals are needed.

Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/QualifiedNameEditor.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/QualifiedNameEditor.java	2012-05-09 17:35:56 UTC (rev 40881)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/QualifiedNameEditor.java	2012-05-09 19:10:10 UTC (rev 40882)
@@ -14,6 +14,7 @@
 
 import org.eclipse.jface.bindings.keys.KeyStroke;
 import org.eclipse.jface.fieldassist.ContentProposalAdapter;
+import org.eclipse.jface.fieldassist.SimpleContentProposalProvider;
 import org.eclipse.jface.fieldassist.TextContentAdapter;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.CCombo;
@@ -163,7 +164,7 @@
 
             this.proposalAdapter = new ContentProposalAdapter(this.txtName,
                                                               new TextContentAdapter(),
-                                                              null,
+                                                              new SimpleContentProposalProvider(new String[0]),
                                                               KeyStroke.getInstance(SWT.CTRL, ' '),
                                                               CndValidator.LOCAL_NAME_VALID_CHARS.toCharArray());
             this.proposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);



More information about the jbosstools-commits mailing list