Package org.apache.sling.ide.eclipse.ui.wizards

Examples of org.apache.sling.ide.eclipse.ui.wizards.Projects


    }

    protected Projects configureCreatedProjects(List<IProject> createdProjects, IProgressMonitor monitor)
            throws CoreException {

        Projects projects = new Projects();

        for (IProject project : createdProjects) {
            IFile pomFile = project.getFile("pom.xml");
            if (!pomFile.exists()) {
                // then ignore this project - we only deal with maven projects
                continue;
            }
            final Model model = MavenPlugin.getMavenModelManager().readMavenModel(pomFile);
            final String packaging = model.getPackaging();

            if ("content-package".equals(packaging)) {
                projects.getContentProjects().add(project);
            } else if ("bundle".equals(packaging)) {
                projects.getBundleProjects().add(project);
            } else if ("pom".equals(packaging)) {
                if (projects.getReactorProject() == null) {
                    projects.setReactorProject(project);
                } else {
                    IPath currLocation = project.getFullPath();
                    IPath prevLocation = projects.getReactorProject().getFullPath();
                    if (currLocation.isPrefixOf(prevLocation)) {
                        // assume reactor is up in the folder structure
                        projects.setReactorProject(project);
                    }
                }
            }
        }

        advance(monitor, 1);

        for (IProject contentProject : projects.getContentProjects()) {
            configureContentProject(contentProject, createdProjects, monitor);
        }
        for (IProject bundleProject : projects.getBundleProjects()) {
            configureBundleProject(bundleProject, createdProjects, monitor);
        }

        if (projects.getReactorProject() != null) {
            configureReactorProject(projects.getReactorProject(), monitor);
            advance(monitor, 1);
        }

        IServer server = getSetupServerWizardPage().getOrCreateServer(monitor);
        advance(monitor, 1);
View Full Code Here

TOP

Related Classes of org.apache.sling.ide.eclipse.ui.wizards.Projects

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.