Author: akazakov
Date: 2009-12-17 09:40:21 -0500 (Thu, 17 Dec 2009)
New Revision: 19422
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/proposal/FacetNameProposalType.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3875
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/proposal/FacetNameProposalType.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/proposal/FacetNameProposalType.java 2009-12-17
14:00:53 UTC (rev 19421)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/proposal/FacetNameProposalType.java 2009-12-17
14:40:21 UTC (rev 19422)
@@ -66,10 +66,12 @@
if(lib instanceof IFacesConfigTagLibrary) {
for (String type : types) {
IComponent comp = lib.getComponentByType(type);
- Facet[] facets = comp.getFacets();
- if(facets!=null) {
- for (int i = 0; i < facets.length; i++) {
- facetNames.add(facets[i].getName());
+ if(comp!=null) {
+ Facet[] facets = comp.getFacets();
+ if(facets!=null) {
+ for (int i = 0; i < facets.length; i++) {
+ facetNames.add(facets[i].getName());
+ }
}
}
}
@@ -87,6 +89,7 @@
if(ICON==null) {
ICON = ImageDescriptor.createFromFile(WebKbPlugin.class, IMAGE_NAME).createImage();
}
+ proposal.setImage(ICON);
proposals.add(proposal);
}
}