1 19 24 25 package org.netbeans.modules.piagetproject; 26 27 import java.awt.Image ; 28 import java.beans.PropertyChangeEvent ; 29 import java.beans.PropertyChangeListener ; 30 import javax.swing.AbstractAction ; 31 import javax.swing.Action ; 32 import org.netbeans.modules.piagetproject.treestructure.NodeRetriever; 33 import org.netbeans.spi.project.ui.LogicalViewProvider; 34 import org.openide.ErrorManager; 35 import org.openide.filesystems.FileAttributeEvent; 36 import org.openide.filesystems.FileChangeListener; 37 import org.openide.filesystems.FileEvent; 38 import org.openide.filesystems.FileObject; 39 import org.openide.loaders.DataObject; 40 import org.openide.loaders.DataObjectNotFoundException; 41 import org.openide.nodes.AbstractNode; 42 import org.openide.nodes.Children; 43 import org.openide.nodes.FilterNode; 44 import org.openide.nodes.Node; 45 import org.openide.util.Lookup; 46 import org.openide.util.Utilities; 47 import org.openide.util.lookup.Lookups; 48 import org.openide.util.lookup.ProxyLookup; 49 50 57 public class PiagetLogicalView implements LogicalViewProvider { 58 59 private PiagetProject project; 60 private static Node piagetNode, originalNode; 61 62 63 public PiagetLogicalView(PiagetProject project) { 64 this.project = project; 65 } 66 67 public org.openide.nodes.Node createLogicalView() { 68 try { 69 FileObject dir = project.getProjectDirectory(); 70 DataObject dirDataObject = DataObject.find(dir); 71 Node dirNode = dirDataObject.getNodeDelegate(); 72 piagetNode = new PiagetNode(dirNode, project); 73 return piagetNode; 74 } catch (DataObjectNotFoundException donfe) { 75 ErrorManager.getDefault().notify(donfe); 76 return new AbstractNode(Children.LEAF); 77 } 78 } 79 80 public org.openide.nodes.Node findPath(org.openide.nodes.Node root, Object target) { 81 if (target instanceof DataObject) { 82 return null; } else { 84 return null; 85 } 86 } 87 } | Popular Tags |