public Image getImage(Object element) {
   BufferedImage image = null;
   if (element instanceof FeatureTypeStyleWrapper) {
     FeatureTypeStyleWrapper ftsW = (FeatureTypeStyleWrapper) element;
     List<RuleWrapper> rulesWrapperList = ftsW.getRulesWrapperList();
     image = rulesWrapperToImage(rulesWrapperList, 16, 16, type);
   } else if (element instanceof RuleWrapper) {
     RuleWrapper ruleWrapper = (RuleWrapper) element;
     image = rulesWrapperToImage(ruleWrapper, 16, 16, type);
   }
   if (image != null) {
     Image convertToSWTImage = AWTSWTImageUtils.convertToSWTImage(image);
     return convertToSWTImage;
   }
   return null;
 }
 public String getText(Object element) {
   if (element instanceof FeatureTypeStyleWrapper) {
     FeatureTypeStyleWrapper ftsW = (FeatureTypeStyleWrapper) element;
     String name = ftsW.getName();
     if (name == null || name.length() == 0) {
       name = Messages.GroupRulesTreeLabelProvider_0;
       name =
           checkSameNameFeatureTypeStyle(ftsW.getParent().getFeatureTypeStylesWrapperList(), name);
       ftsW.setName(name);
     }
     return name;
   } else if (element instanceof RuleWrapper) {
     RuleWrapper ruleWrapper = (RuleWrapper) element;
     String name = ruleWrapper.getName();
     if (name == null || name.length() == 0) {
       name = Messages.GroupRulesTreeLabelProvider_1;
       name = checkSameNameRule(ruleWrapper.getParent().getRulesWrapperList(), name);
       ruleWrapper.setName(name);
     }
     return name;
   }
   return null;
 }