Package org.netbeans.modules.nodejs

Examples of org.netbeans.modules.nodejs.NodeJSProject$AllJSFiles$JSFileFilterNode


        return n;
    }

    @Override
    public Node findPath ( Node root, Object target ) {
        NodeJSProject p = root.getLookup().lookup( NodeJSProject.class );
        if (target instanceof FileObject && p != null) {
            FileObject t = (FileObject) target;
            if (t.getParent().equals( p.getProjectDirectory() )) {
                Children kids = root.getChildren();
                Node[] nodes = kids.getNodes( true );
                Set<Node> folders = new HashSet<Node>();
                for (Node node : nodes) {
                    DataObject dob = node.getLookup().lookup( DataObject.class );
View Full Code Here


        return getIcon( type );
    }

    @Override
    public Action[] getActions ( boolean ignored ) {
        NodeJSProject project = getLookup().lookup( NodeJSProject.class );
        final ResourceBundle bundle
                = NbBundle.getBundle( RootNode.class );

        List<Action> actions = new ArrayList<>();

        actions.add( CommonProjectActions.newFileAction() );
        actions.add( null );
        actions.add( ProjectSensitiveActions.projectCommandAction(
                ActionProvider.COMMAND_RUN,
                bundle.getString( "LBL_RunAction_Name" ), null ) ); // NOI18N
        actions.add( null );
        actions.add( CommonProjectActions.setAsMainProjectAction() );
        actions.add( null );
        actions.add( ProjectSensitiveActions.projectCommandAction(
                NodeJSProject.MAIN_FILE_COMMAND,
                bundle.getString( "LBL_ChooseMainFile_Name" ), null ) ); // NOI18N
        actions.add( null );
//        actions.add(ProjectSensitiveActions.projectCommandAction(
//                NodeJSProject.LIBRARIES_COMMAND,
//                bundle.getString("LBL_AddLibrary_Name"), null));
        actions.add( new AddLibraryAction( bundle, project, this ) );
        actions.add( null );
        actions.add( CommonProjectActions.setAsMainProjectAction() );
        actions.add( CommonProjectActions.closeProjectAction() );
        actions.add( null );
        actions.add( CommonProjectActions.renameProjectAction() );
        actions.add( CommonProjectActions.moveProjectAction() );
        actions.add( CommonProjectActions.copyProjectAction() );
        actions.add( CommonProjectActions.deleteProjectAction() );
        actions.add( null );
        actions.add( SystemAction.get( FindAction.class ) );
        actions.add( null );
        actions.add( SystemAction.get( PasteAction.class ) );
        actions.add( null );
        actions.add( getFilesystemAction() );
        actions.addAll( Lookups.forPath( "Project/NodeJS/Actions" ).lookupAll( Action.class ) ); //NOI18N
        actions.add( new AbstractAction( NbBundle.getMessage( RootNode.class, "PROPERTIES" ) ) { //NOI18N
            @Override
            public void actionPerformed ( ActionEvent e ) {
                Project project = getLookup().lookup( Project.class );
                new PropertiesPanel( project.getLookup().lookup( NodeJSProjectProperties.class ) ).showDialog();
            }
        } );
        final LibrariesResolver resolver = getLookup().lookup( Project.class ).getLookup().lookup( LibrariesResolver.class );
        if (resolver.hasMissingLibraries()) {
            actions.add(new AbstractAction(NbBundle.getMessage(RootNode.class, "RESOLVE_LIBRARIES")){ //NOI18N
View Full Code Here

            if (dataObject != null) {
                Node n = dataObject.getNodeDelegate();
                return n.getActions( ignored );
            }
            if (key.type() == KeyType.LIBRARIES) {
                NodeJSProject project = getLookup().lookup( NodeJSProject.class );
                assert project != null;
                NodeJSLogicalViewProvider l = project.getLookup().lookup( NodeJSLogicalViewProvider.class );
                return new Action[]{new AddLibraryAction( NbBundle.getBundle( GenericNode.class ), project, l.getView() )};
            }
            return new Action[0];
        }
View Full Code Here

                @Override
                public void actionPerformed ( ActionEvent e ) {
                    final DataObject dob = getLookup().lookup( DataObject.class );
                    if (dob != null && dob.isValid()) {
                        Project p = FileOwnerQuery.getOwner( dob.getPrimaryFile().getParent() );
                        final NodeJSProject prj = p == null ? null : p
                                .getLookup()
                                .lookup( NodeJSProject.class );
                        System.out.println( "PROJECT IS " + prj );
                        RequestProcessor.getDefault().post( new Runnable() {
                            @Override
View Full Code Here

TOP

Related Classes of org.netbeans.modules.nodejs.NodeJSProject$AllJSFiles$JSFileFilterNode

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.