Package org.netbeans.api.project

Examples of org.netbeans.api.project.Project


            compiler.stopDebugger(true);
        //    windowService.localVariableWindowStop();
        }

        // Get the project the user is referencing
        Project proj = getAppropriateProject(isMainMenuRequest(e));
        MainFileProvider provider = getMainFile(proj);
        if(!isProjectSetupCorrectly(provider)) {
            return;
        }
        FileObject docs = provider.getDocumentsDirectory();
View Full Code Here


     *
     * @return
     */
    private Project getMainProject() {
        OpenProjects open = OpenProjects.getDefault();
        Project project = open.getMainProject();
       
        //in NetBeans 7.2, we may not have a main project
        //check the global selection to see if there's a project in there
        if(project == null) {
            project = globalProjectSelection;
        }
       
        //if their is no main project and the global selection does
        //not contain a quorum project, check to see if there's only
        //one project
        if(project == null && open.getOpenProjects()!= null && open.getOpenProjects().length == 1) {
            project = open.getOpenProjects()[0];
        }
       
        if(project != null) {
            MainFileProvider localProvider =
                project.getLookup().lookup(MainFileProvider.class);
            if (localProvider == null) {
                //either this is not a quorum project or we should return
                return null;
            }
        }
View Full Code Here

     *
     * @return
     */
    private Project getSelectedProject() {
        OpenProjects open = OpenProjects.getDefault();
        Project project = globalProjectSelection;
       
       
        //if their is no global selection does
        //not contain a quorum project, check to see if there's only
        //one project
        if(project == null && open.getOpenProjects()!= null && open.getOpenProjects().length == 1) {
            project = open.getOpenProjects()[0];
        }
       
        //if it's still null, check the main project as a last resort
        if(project == null) {
            project = open.getMainProject();
        }
       
        if(project != null) {
            MainFileProvider localProvider =
                project.getLookup().lookup(MainFileProvider.class);
            if (localProvider == null) {
                //either this is not a quorum project or we should return
                return null;
            }
        }
View Full Code Here

                            }
                        } else {
                            // Start a TOD session.
                            FileObject current = compiler.getMainClassFile();
                            // Get the project the user is referencing
                            final Project proj = projectRequestedToRun;
                            MainFileProvider provider = getMainFile(proj);
                            if(!isProjectSetupCorrectly(provider)) {
                                return;
                            }
                            // Get the path of the Build folder.
                            File projectFolder = new File(proj.getProjectDirectory().getPath());

                            // Start the session by specifying the main class location, name, and the name of the method
                            // we wish to stop at. We will stop at "action Main".
                            final TODSession session = TODSessionFactory.getDefault();
                            if (session.isActive()) {
View Full Code Here

        if (compiler.isDebuggerActive()) {
            compiler.stopDebugger(true);
        }

        // Get the project the user is referencing
        Project proj = getAppropriateProject(isMainMenuRequest(e));
       
        MainFileProvider provider = getMainFile(proj);
        if(!isProjectSetupCorrectly(provider)) {
            return;
        }
View Full Code Here

        if (compiler.isDebuggerActive()) {
            compiler.stopDebugger(true);
        }

        // Get the project the user is referencing
        Project proj = getAppropriateProject(isMainMenuRequest(e));
       
        MainFileProvider provider = getMainFile(proj);
        if(!isProjectSetupCorrectly(provider)) {
            return;
        }
View Full Code Here

         * These watchers keep track of the 'java 'process's output to stdout and stderr.
         */
        QuorumWatcher stdoutWatcher = null;
        QuorumWatcher stderrWatcher = null;
       
        final Project project = projectRequestedToRun;
       
        taskName = project.getProjectDirectory().getName() + " (run)";
       
        // Create a new "task" to be run by the process API. This task does
        // the following:
        //
        // 1. Spawns a new 'java' process.
View Full Code Here

            }

            final VCSContext ctx = VCSContext.forNodes(allNodes.toArray(new Node[allNodes.size()]));
            final String title;
            if (projects.length == 1) {
                Project project = projects[0];
                ProjectInformation pinfo = ProjectUtils.getInformation(project);
                title = pinfo.getDisplayName();
            } else {
                title = NbBundle.getMessage(ShowAllChangesAction.class, "CTL_ShowAllChanges_WindowTitle", Integer.toString(projects.length)); // NOI18N
            }
View Full Code Here

                        file);
                return;
            }
        }

        final Project proj = GitUtils.getProject(context);
        File projFile = GitUtils.getProjectFile(proj);

        if (projFile == null) {
            OutputLogger logger = OutputLogger.getLogger(Git.GIT_OUTPUT_TAB_TITLE);
            logger.outputInRed(NbBundle.getMessage(InitAction.class, "MSG_CREATE_TITLE")); // NOI18N
View Full Code Here

        for (File file : files) {
            /* We may be committing a LocallyDeleted file */
            if (!file.exists()) {
                file = file.getParentFile();
            }
            Project p = FileOwnerQuery.getOwner(FileUtil.toFileObject(file));
            if (p != null) {
                return p;
            } else {
                Git.LOG.log(Level.FINE, "GitUtils.getProjectFile(): No project for {0}", // NOI18N
                        file);
View Full Code Here

TOP

Related Classes of org.netbeans.api.project.Project

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.