1 19 20 package org.netbeans.modules.project.ui; 21 22 import java.awt.Image ; 23 import java.beans.PropertyChangeListener ; 24 import java.util.Collections ; 25 import java.util.Iterator ; 26 import org.netbeans.modules.xml.catalog.spi.CatalogDescriptor; 27 import org.netbeans.modules.xml.catalog.spi.CatalogListener; 28 import org.netbeans.modules.xml.catalog.spi.CatalogReader; 29 import org.openide.util.NbBundle; 30 import org.openide.util.Utilities; 31 32 37 public class ProjectXMLCatalogReader implements CatalogReader, CatalogDescriptor { 38 39 private static final String PREFIX = "http://www.netbeans.org/ns/"; private static final String SUFFIX = ".xsd"; 42 43 public ProjectXMLCatalogReader() {} 44 45 public String resolveURI(String name) { 46 if (name.startsWith(PREFIX)) { 47 return name + SUFFIX; 48 } else { 49 return null; 50 } 51 } 52 53 public String resolvePublic(String publicId) { 54 return null; 55 } 56 57 public String getSystemID(String publicId) { 58 return null; 59 } 60 61 public void removePropertyChangeListener(PropertyChangeListener l) {} 62 63 public void addPropertyChangeListener(PropertyChangeListener l) {} 64 65 public void removeCatalogListener(CatalogListener l) {} 66 67 public void addCatalogListener(CatalogListener l) {} 68 69 public Image getIcon(int type) { 70 return Utilities.loadImage("org/netbeans/modules/project/ui/resources/projectTab.gif", true); 71 } 72 73 public void refresh() {} 74 75 public String getShortDescription() { 76 return NbBundle.getMessage(ProjectXMLCatalogReader.class, "HINT_project_xml_schemas"); 77 } 78 79 public Iterator getPublicIDs() { 80 return Collections.EMPTY_SET.iterator(); 81 } 82 83 public String getDisplayName() { 84 return NbBundle.getMessage(ProjectXMLCatalogReader.class, "LBL_project_xml_schemas"); 85 } 86 87 } 88 | Popular Tags |