1 package org.netbeans.modules.websvc.client; 2 3 import java.util.HashMap ; 4 import java.util.Map ; 5 import org.netbeans.api.project.Project; 6 import org.netbeans.api.project.SourceGroup; 7 import org.netbeans.modules.websvc.api.client.WebServicesClientView; 8 import org.netbeans.modules.websvc.spi.client.WebServicesClientViewFactory; 9 import org.netbeans.modules.websvc.spi.client.WebServicesClientViewImpl; 10 import org.netbeans.modules.websvc.spi.client.WebServicesClientViewProvider; 11 import org.openide.filesystems.FileObject; 12 import org.openide.nodes.Node; 13 14 18 public class CustomWebServicesClientViewProvider implements WebServicesClientViewProvider { 19 20 private Map <FileObject, WebServicesClientView> cache = new HashMap <FileObject, WebServicesClientView>(); 21 22 23 public CustomWebServicesClientViewProvider() { 24 } 25 26 public WebServicesClientView findWebServicesClientView(FileObject file) { 27 if (file.getExt().equals("ws")) { 28 WebServicesClientView em = cache.get(file.getParent()); 29 if (em == null) { 30 em = WebServicesClientViewFactory.createWebServicesClientView(new CustomWebServicesClientViewImpl(file)); 31 cache.put(file.getParent(), em); 32 } 33 return em; 34 } 35 return null; 36 } 37 38 private static final class CustomWebServicesClientViewImpl implements WebServicesClientViewImpl { 39 private FileObject fo; 40 41 CustomWebServicesClientViewImpl(FileObject fo) { 42 this.fo = fo; 43 } 44 45 public Node createWebServiceClientView(Project p) { 46 throw new UnsupportedOperationException ("Not supported yet."); 47 } 48 49 public Node createWebServiceClientView(SourceGroup sg) { 50 throw new UnsupportedOperationException ("Not supported yet."); 51 } 52 53 public Node createWebServiceClientView(FileObject wsdlFolder) { 54 throw new UnsupportedOperationException ("Not supported yet."); 55 } 56 } 57 } 58 | Popular Tags |