Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.SubMonitor.newChild()


                return Status.OK_STATUS;

            SubMonitor progress = SubMonitor.convert(monitor, projects.size());
            for (Project project : projects) {
                IJavaProject eclipseProject = Central.getJavaProject(project);
                eclipseProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            }
            return Status.OK_STATUS;
        }

    }
View Full Code Here


                replacer.start();
                is = replacer.getStream();
            }

            if (dst.exists()) {
                dst.setContents(is, false, true, progress.newChild(2, SubMonitor.SUPPRESS_NONE));
            } else {
                FileUtils.recurseCreate(dst.getParent(), progress.newChild(1, SubMonitor.SUPPRESS_NONE));
                dst.create(is, false, progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            }
View Full Code Here

            }

            if (dst.exists()) {
                dst.setContents(is, false, true, progress.newChild(2, SubMonitor.SUPPRESS_NONE));
            } else {
                FileUtils.recurseCreate(dst.getParent(), progress.newChild(1, SubMonitor.SUPPRESS_NONE));
                dst.create(is, false, progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            }

            if (replacer != null) {
                try {
View Full Code Here

            if (dst.exists()) {
                dst.setContents(is, false, true, progress.newChild(2, SubMonitor.SUPPRESS_NONE));
            } else {
                FileUtils.recurseCreate(dst.getParent(), progress.newChild(1, SubMonitor.SUPPRESS_NONE));
                dst.create(is, false, progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            }

            if (replacer != null) {
                try {
                    replacer.join();
View Full Code Here

        } catch (UnsupportedEncodingException e) {
            return;
        }
        IFile bndBndFile = project.getProject().getFile(Project.BNDFILE);
        if (bndBndFile.exists()) {
            bndBndFile.setContents(bndInput, false, false, progress.newChild(1));
        }

        BndProject proj = generateBndProject(project.getProject(), progress.newChild(1));

        progress.setWorkRemaining(proj.getResources().size());
View Full Code Here

        IFile bndBndFile = project.getProject().getFile(Project.BNDFILE);
        if (bndBndFile.exists()) {
            bndBndFile.setContents(bndInput, false, false, progress.newChild(1));
        }

        BndProject proj = generateBndProject(project.getProject(), progress.newChild(1));

        progress.setWorkRemaining(proj.getResources().size());
        for (Map.Entry<String,BndProjectResource> resource : proj.getResources().entrySet()) {
            importResource(project.getProject(), resource.getKey(), resource.getValue(), progress.newChild(1));
        }
View Full Code Here

        BndProject proj = generateBndProject(project.getProject(), progress.newChild(1));

        progress.setWorkRemaining(proj.getResources().size());
        for (Map.Entry<String,BndProjectResource> resource : proj.getResources().entrySet()) {
            importResource(project.getProject(), resource.getKey(), resource.getValue(), progress.newChild(1));
        }

        if (!bndBndFile.exists()) {
            bndBndFile.create(bndInput, false, progress.newChild(1));
        }
View Full Code Here

        for (Map.Entry<String,BndProjectResource> resource : proj.getResources().entrySet()) {
            importResource(project.getProject(), resource.getKey(), resource.getValue(), progress.newChild(1));
        }

        if (!bndBndFile.exists()) {
            bndBndFile.create(bndInput, false, progress.newChild(1));
        }

        /* Version control ignores */
        VersionControlIgnoresPluginTracker versionControlIgnoresPluginTracker = Plugin.getDefault().getVersionControlIgnoresPluginTracker();
        Set<String> enabledIgnorePlugins = new BndPreferences().getVersionControlIgnoresPluginsEnabled(versionControlIgnoresPluginTracker, project, null);
View Full Code Here

                    public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
                        try {
                            SubMonitor progress = SubMonitor.convert(monitor, 3);

                            // Generate the Bnd model
                            final BndEditModel bndModel = generateBndModel(progress.newChild(1));

                            // Make changes to the project
                            final IWorkspaceRunnable op = new IWorkspaceRunnable() {
                                public void run(IProgressMonitor monitor) throws CoreException {
                                    processGeneratedProject(ProjectPaths.get(pageOne.getProjectLayout()), bndModel, javaProj, monitor);
View Full Code Here

                            final IWorkspaceRunnable op = new IWorkspaceRunnable() {
                                public void run(IProgressMonitor monitor) throws CoreException {
                                    processGeneratedProject(ProjectPaths.get(pageOne.getProjectLayout()), bndModel, javaProj, monitor);
                                }
                            };
                            javaProj.getProject().getWorkspace().run(op, progress.newChild(2));
                        } catch (CoreException e) {
                            throw new InvocationTargetException(e);
                        }
                    }
                });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.