Netbeans own module with custom project type: fix popup menu
===

). 

I have written my first module. my module adds a new project type to the project wizard. 

i can create a new Project but when i rightclick it i get this menu: 

http://img6.imagebanana.com/img/atqyyock/nb1.png


instead of this:


http://img6.imagebanana.com/img/7xmtusd7/nb2.png

Now i have found the problem my main project node is a folder. how can i tell netbeans it is a project? or is my assumption false? 

Here is my code for the logical view: 

    @Override 
    public org.openide.nodes.Node createLogicalView() { 
        try { 
      
            Node realTextFolderNode = DataFolder.findFolder(project.getProjectDirectory()).getNodeDelegate(); 
            
            
            return new TextNode(realTextFolderNode, project); 

        } catch (DataObjectNotFoundException donfe) { 
            Exceptions.printStackTrace(donfe); 
 
            return new AbstractNode(Children.LEAF); 
        } 
    } 

    /** This is the node you actually see in the project tab for the project */ 
    private static final class TextNode extends FilterNode  { 

        final MyProject project; 

        public TextNode(Node node, MyProject project) throws DataObjectNotFoundException { 
            super(node, new FilterNode.Children(node), 

                    new ProxyLookup(new Lookup[]{Lookups.singleton(project), 
                        node.getLookup() 
                    })); 
            this.setExpert(true); 
            
            this.project = project; 
        } 


        @Override 
        public Image getIcon(int type) { 
            return ImageUtilities.loadImage("de/andeo/mcmodule/project/MyProject.png"); 
        } 

        @Override 
        public Image getOpenedIcon(int type) { 
            return getIcon(type); 
        } 

        @Override 
        public String getDisplayName() { 
            return project.getProjectDirectory().getName(); 
        } 
        
        
      

    } 


  [1]: http://i.stack.imgur.com/HhcxE.png
  [2]: http://i.stack.imgur.com/53RNt.png