Package org.openide.nodes

Examples of org.openide.nodes.Node


            if (storage != null) {
                java.util.Map<String,PlatformCategoriesDescriptor> categories = new HashMap<String,PlatformCategoriesDescriptor>();
                for (FileObject child : storage.getChildren()) {
                    try {
                        DataObject dobj = DataObject.find(child);
                        Node node = dobj.getNodeDelegate();
                        ScalaPlatform platform = node.getLookup().lookup(ScalaPlatform.class);
                        if (platform != null) {
                            String platformType = platform.getSpecification().getName();
                            if (platformType != null) {
                                platformType = platformType.toUpperCase(Locale.ENGLISH);
                                PlatformCategoriesDescriptor platforms = categories.get(platformType);
                                if (platforms == null ) {
                                    platforms = new PlatformCategoriesDescriptor (platformType);
                                    categories.put (platformType, platforms);
                                }
                                platforms.add (node);
                            }
                            else {
                                ErrorManager.getDefault().log ("Platform: "+ platform.getDisplayName() +" has invalid specification.")//NOI18N
                            }
                        }
                        else {                       
                            ErrorManager.getDefault().log ("Platform node for : "+node.getDisplayName()+" has no platform in its lookup.");   //NOI18N
                        }                   
                    }catch (DataObjectNotFoundException e) {
                        ErrorManager.getDefault().notify(e);
                    }
                 }                                   
View Full Code Here


        return defaultPlatform!=null && !defaultPlatform.equals(platform);
    }

    private void expandPlatforms (ScalaPlatform platform) {
        ExplorerManager mgr = this.getExplorerManager();
        Node node = mgr.getRootContext();
        expandAllNodes(this.platforms, node, mgr, platform);
    }
View Full Code Here

                    //Ignore it
                }
            }
            return;
        }
        Node nodes[] = ch.getNodes( true );
        for ( int i = 0; i < nodes.length; i++ ) {
            expandAllNodes( btv, nodes[i], mgr, platform);
        }

    }
View Full Code Here

            if (!prj.equals(owner)) {
                return null; // Don't waste time if project does not own the fo
            }
           
            for (Node n : root.getChildren().getNodes(true)) {
                Node result = PackageView.findPath(n, target);
                if (result != null) {
                    return result;
                }
            }
        }
View Full Code Here

    public void propertyChange(PropertyChangeEvent propertychangeevent)
    {
        Object obj = propertychangeevent.getNewValue();
        if(obj != null && (obj instanceof Node[]))
        {
            Node anode[] = (Node[])obj;
            if(anode.length == 1)
            {
                Node node = anode[0];
                String s = "";
                do
                {
                    Node node1 = node.getParentNode();
                    if(node1 == null || node1 == root)
                    {
                        if(s.endsWith("."))
                            s = s.substring(0, s.length() - 1);
                        break;
View Full Code Here

        throws PropertyVetoException
    {
        Object obj = propertychangeevent.getNewValue();
        if(obj != null && (obj instanceof Node[]))
        {
            Node anode[] = (Node[])obj;
            if(anode.length != 1)
                throw new PropertyVetoException("", propertychangeevent);
        }
    }
View Full Code Here

    }//GEN-LAST:event_jButtonDuplicateActionPerformed

    private void jButtonNewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonNewActionPerformed
        try {
            String stringElementName = elementCreator.createElement().getName();
            Node nodeRoot = manager.getExploredContext();
            Children children = nodeRoot.getChildren();
            Node node = children.findChild( stringElementName );

            if ( node != null ) {
                updateSelection( new Node[] { node } );
            }
        }
View Full Code Here

                    }
                }
            };
        manager.addPropertyChangeListener(managerListener);
       
        Node n = manager.getExploredContext();
        if (n != null)
            indexableParent = (Index)n.getCookie(Index.class);
        updateButtons();
    }
View Full Code Here

        }
    }

   public void generateImports(Vector Imports1)
    { 
        Node anode[] = getChildren().getNodes();
        for(int l = 0; l < anode.length; l++)
        {
            ((BaseNode)anode[l]).generateImports(Imports1);
           
       
View Full Code Here

       
    }
  
    public void generateImports(Vector Imports1)
    { 
        Node anode[] = getChildren().getNodes();
        for(int l = 0; l < anode.length; l++)
        {
            ((BaseNode)anode[l]).generateImports(Imports1);
           
       
View Full Code Here

TOP

Related Classes of org.openide.nodes.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.