1 9 10 package org.netbeans.modules.xml.wsdl.validator; 11 12 import java.io.File ; 13 import java.net.URI ; 14 import org.netbeans.modules.xml.xam.ModelSource; 15 import org.openide.util.Lookup; 16 import org.openide.util.lookup.AbstractLookup; 17 import org.openide.util.lookup.InstanceContent; 18 import org.openide.util.lookup.ProxyLookup; 19 20 24 class MyModelSource extends ModelSource { 25 26 private URI mURI; 27 28 public MyModelSource(Lookup lookup, boolean editable, URI uri){ 29 super(lookup, editable); 30 this.mURI = uri; 31 } 32 33 public Lookup getLookup(){ 34 Lookup l1 = super.getLookup(); 35 InstanceContent ic = new InstanceContent(); 36 ic.add(new File (mURI)); 37 Lookup l2 = new AbstractLookup(ic); 38 39 40 41 ProxyLookup pl = new ProxyLookup(new Lookup[] {l1, l2}); 42 43 return pl; 44 45 } 46 } | Popular Tags |