Package org.netbeans.api.project

Examples of org.netbeans.api.project.Project


        public void actionPerformed(ActionEvent e) {
            if (specificTestcase == null) {
                return;
            }

            Project project = javaExt.getProject();
            Lookup context = Lookups.fixed(testTaskName, specificTestcase);

            GradleActionProvider.invokeAction(project, command, context);
        }
View Full Code Here


        else if(o instanceof SourceGroup) {
            SourceGroup group = (SourceGroup)o;
            sayString = group.getDisplayName();
        }
        else if(o instanceof Project) {
            Project proj = (Project) o;
            ProjectInformation info = proj.getLookup().lookup(ProjectInformation.class);
            sayString = info.getDisplayName();
        }

        if(sayString != null) {//null values for separators?
             proc.setText(sayString);
View Full Code Here

            else if(o instanceof SourceGroup) {
                SourceGroup group = (SourceGroup)o;
                sayString = group.getDisplayName();
            }
            else if(o instanceof Project) {
                Project proj = (Project) o;
                ProjectInformation info = proj.getLookup().lookup(ProjectInformation.class);
                sayString = info.getDisplayName();
            }

            if(sayString != null) {//null values for separators?
                 return sayString;
View Full Code Here

        if(file != null) {
            File ioFile = org.openide.filesystems.FileUtil.toFile(file);
            //ask the virtual machine for a fileDescriptor of a different type
            FileDescriptor fd = virtualMachine.getSymbolTable().getFileDescriptor(ioFile.getAbsolutePath());
            if(fd == null && !hasBuiltAllOnce()) {//try compiling if we haven't already
                Project project = FileOwnerQuery.getOwner(file);
                compile(project);
                fd = virtualMachine.getSymbolTable().getFileDescriptor(ioFile.getAbsolutePath());
            }
            QuorumFileDescriptor cfd = new QuorumFileDescriptor();
            cfd.setFileDescriptor(fd);
View Full Code Here

    }
    // Retrieves an object from a class in the getFromProject parameters.

    private Object getFromProject(Class clazz) {
        Object result;
        Project p = FileOwnerQuery.getOwner(getFile());
        if (p != null) {
            result = p.getLookup().lookup(clazz);
        } else {
            result = null;
        }
        return result;
    }
View Full Code Here

        long startTime = date.getTime();
        if(compiler.hasBuiltAllOnce()) {
            machine.buildSingle(file, editorText);
        }
        else {
            Project project = FileOwnerQuery.getOwner(currentFileInEditor);
            compiler.compile(project); //ignore failure
        }
       
        date = new Date();
        long endTime = date.getTime();
View Full Code Here

     * Attempt to compile the program.
     *
     * @return Compiler message
     */
    public void compile(Project project) {
        Project proj = project;
        if(proj == null) {
            return;
        }

        ProjectInformation info = ProjectUtils.getInformation(proj);
        String name = info.getName();
        if (name.compareTo(PROJECT_KEY) == 0) { //it's a quorum project
            //so build it!
            MainFileProvider provider =
                    proj.getLookup().lookup(MainFileProvider.class);
            if (provider.getMainFile() == null) {
                return;
            } else {
                setMainFile(provider.getMainFile());
            }
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;
        }
        compiler.setBuildFolder(provider.getBuildDirectory());
        compiler.setDistributionFolder(provider.getDistributionDirectory());

        //clean the build.
        compiler.clean();
        ProjectInformation info = proj.getLookup().lookup(ProjectInformation.class);
        if (TextToSpeechOptions.isScreenReading())
            speech.speak("Cleaning project " + info.getDisplayName(), SpeechPriority.HIGHEST);
    }
View Full Code Here

            compiler.stopDebugger(true);
        }

        // Get the project the user is referencing
        //Utilities.get
        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

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.