1 19 20 package org.netbeans.modules.db.sql.editor; 21 22 import java.beans.BeanDescriptor ; 23 import java.util.MissingResourceException ; 24 import org.netbeans.modules.editor.FormatterIndentEngineBeanInfo; 25 import org.netbeans.modules.editor.NbEditorUtilities; 26 import org.openide.util.NbBundle; 27 28 33 public class SQLIndentEngineBeanInfo extends FormatterIndentEngineBeanInfo { 34 35 private BeanDescriptor beanDescriptor; 36 37 40 public BeanDescriptor getBeanDescriptor () { 41 if (beanDescriptor == null) { 42 beanDescriptor = new BeanDescriptor (getBeanClass()); 43 beanDescriptor.setDisplayName(getMessage("LBL_SQLIndentEngine")); 44 beanDescriptor.setShortDescription(getMessage("HINT_SQLIndentEngine")); 45 beanDescriptor.setValue("global", Boolean.TRUE); } 47 return beanDescriptor; 48 } 49 50 53 protected Class getBeanClass() { 54 return SQLIndentEngine.class; 55 } 56 57 61 protected String getMessage(String key) { 62 try { 63 return NbBundle.getMessage(SQLIndentEngineBeanInfo.class, key); 64 } catch (MissingResourceException e) { 65 return super.getString(key); 66 } 67 } 68 69 } 70 71 | Popular Tags |