1 19 package org.netbeans.modules.xml.text.indent; 20 21 import java.beans.BeanDescriptor ; 22 import java.util.MissingResourceException ; 23 24 import org.netbeans.modules.editor.FormatterIndentEngineBeanInfo; 25 import org.netbeans.modules.editor.NbEditorUtilities; 26 27 31 public class XMLIndentEngineBeanInfo extends FormatterIndentEngineBeanInfo { 32 33 34 private BeanDescriptor beanDescriptor; 35 36 37 41 42 public XMLIndentEngineBeanInfo () { 43 } 44 45 46 50 52 public BeanDescriptor getBeanDescriptor () { 53 if (beanDescriptor == null) { 54 beanDescriptor = new BeanDescriptor (getBeanClass()); 55 beanDescriptor.setDisplayName (getString ("LAB_XMLIndentEngine")); 56 beanDescriptor.setShortDescription (getString ("HINT_XMLIndentEngine")); 57 } 58 return beanDescriptor; 59 } 60 61 63 protected Class getBeanClass () { 64 return XMLIndentEngine.class; 65 } 66 67 69 protected String [] createPropertyNames () { 70 return NbEditorUtilities.mergeStringArrays 71 (super.createPropertyNames(), 72 new String [] { 73 } 74 ); 75 } 76 77 79 protected String getString (String key) { 80 try { 81 return Util.THIS.getString (key); 82 } catch (MissingResourceException e) { 83 return super.getString (key); 84 } 85 } 86 87 } 88 | Popular Tags |