// Path: src/org/gololang/netbeans/project/nodes/ProxyChildren.java
// public class ProxyChildren extends FilterNode.Children {
// 
//     public ProxyChildren(Node owner) {
//         super(owner);
//     }
// 
//     @Override
//     protected Node[] createNodes(Node object) {
//         List<Node> result = new ArrayList<>();
//         for (Node node : super.createNodes(object)) {
//             if (accept(node)) {
//                 result.add(node);
//             }
//         }
//         return result.toArray(new Node[0]);
//     }
// 
//     private boolean accept(Node node) {
//         return !node.getName().equals("golo.project");
//     }
//     
// }


import java.awt.Image;
import java.beans.PropertyChangeListener;
import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.event.ChangeListener;
import org.gololang.netbeans.project.nodes.ProxyChildren;
import org.netbeans.api.annotations.common.StaticResource;
import org.netbeans.api.project.Project;
import org.netbeans.api.project.ProjectInformation;
import org.netbeans.api.project.SourceGroup;
import org.netbeans.api.project.Sources;
import org.netbeans.spi.project.ProjectState;
import org.netbeans.spi.project.support.GenericSources;
import org.netbeans.spi.project.ui.LogicalViewProvider;
import org.netbeans.spi.project.ui.support.CommonProjectActions;
import org.openide.filesystems.FileObject;
import org.openide.loaders.DataFolder;
import org.openide.loaders.DataObjectNotFoundException;
import org.openide.nodes.AbstractNode;
import org.openide.nodes.Children;
import org.openide.nodes.FilterNode;
import org.openide.nodes.Node;
import org.openide.util.Exceptions;
import org.openide.util.ImageUtilities;
import org.openide.util.Lookup;
import org.openide.util.lookup.Lookups;
import org.openide.util.lookup.ProxyLookup;

        @Override
        public void addChangeListener(ChangeListener cl) {
        }

        @Override
        public void removeChangeListener(ChangeListener cl) {
        }
    }
    
    class CustomerProjectLogicalView implements LogicalViewProvider {

        @StaticResource()
        public static final String GOLO_ICON = "org/gololang/netbeans/golo_icon_16px.png";

        private final GoloProject project;

        public CustomerProjectLogicalView(GoloProject project) {
            this.project = project;
        }

        @Override
        public Node createLogicalView() {
            try {
                //Obtain the project directory's node:
                FileObject projectDirectory = project.getProjectDirectory();
                DataFolder projectFolder = DataFolder.findFolder(projectDirectory);
                Node nodeOfProjectFolder = projectFolder.getNodeDelegate();

                //filter golo.project
// Path: src/org/gololang/netbeans/project/nodes/ProxyChildren.java
// public class ProxyChildren extends FilterNode.Children {
// 
//     public ProxyChildren(Node owner) {
//         super(owner);
//     }
// 
//     @Override
//     protected Node[] createNodes(Node object) {
//         List<Node> result = new ArrayList<>();
//         for (Node node : super.createNodes(object)) {
//             if (accept(node)) {
//                 result.add(node);
//             }
//         }
//         return result.toArray(new Node[0]);
//     }
// 
//     private boolean accept(Node node) {
//         return !node.getName().equals("golo.project");
//     }
//     
// }


// Path: src/org/gololang/netbeans/project/GoloProject.java
import java.awt.Image;
import java.beans.PropertyChangeListener;
import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.event.ChangeListener;
import org.gololang.netbeans.project.nodes.ProxyChildren;
import org.netbeans.api.annotations.common.StaticResource;
import org.netbeans.api.project.Project;
import org.netbeans.api.project.ProjectInformation;
import org.netbeans.api.project.SourceGroup;
import org.netbeans.api.project.Sources;
import org.netbeans.spi.project.ProjectState;
import org.netbeans.spi.project.support.GenericSources;
import org.netbeans.spi.project.ui.LogicalViewProvider;
import org.netbeans.spi.project.ui.support.CommonProjectActions;
import org.openide.filesystems.FileObject;
import org.openide.loaders.DataFolder;
import org.openide.loaders.DataObjectNotFoundException;
import org.openide.nodes.AbstractNode;
import org.openide.nodes.Children;
import org.openide.nodes.FilterNode;
import org.openide.nodes.Node;
import org.openide.util.Exceptions;
import org.openide.util.ImageUtilities;
import org.openide.util.Lookup;
import org.openide.util.lookup.Lookups;
import org.openide.util.lookup.ProxyLookup;


        @Override
        public void addChangeListener(ChangeListener cl) {
        }

        @Override
        public void removeChangeListener(ChangeListener cl) {
        }
    }
    
    class CustomerProjectLogicalView implements LogicalViewProvider {

        @StaticResource()
        public static final String GOLO_ICON = "org/gololang/netbeans/golo_icon_16px.png";

        private final GoloProject project;

        public CustomerProjectLogicalView(GoloProject project) {
            this.project = project;
        }

        @Override
        public Node createLogicalView() {
            try {
                //Obtain the project directory's node:
                FileObject projectDirectory = project.getProjectDirectory();
                DataFolder projectFolder = DataFolder.findFolder(projectDirectory);
                Node nodeOfProjectFolder = projectFolder.getNodeDelegate();

                //filter golo.project
                Node filteredRootNode = new FilterNode(nodeOfProjectFolder, new ProxyChildren(nodeOfProjectFolder));