Author: rombert
Date: Tue May 20 15:07:48 2014
New Revision: 1596282

URL: http://svn.apache.org/r1596282
Log:
SLING-3174 - Add new simple project content wizard

Moved reusable code to eclipse-ui.

Added:
    
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/AbstractNewMavenBasedSlingApplicationWizard.java
   (with props)
    
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/AbstractNewSlingApplicationWizard.java
   (with props)
    
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/Projects.java
   (with props)
    
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/SetupServerWizardPage.java
   (contents, props changed)
      - copied, changed from r1596276, 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/SetupServerWizardPage.java
Removed:
    
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/AbstractNewSlingApplicationWizard.java
    
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/SetupServerWizardPage.java
Modified:
    sling/trunk/tooling/ide/eclipse-m2e-ui/META-INF/MANIFEST.MF
    
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ArchetypeParametersWizardPage.java
    
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ChooseArchetypeWizardPage.java
    
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/NewSlingBundleWizard.java

Modified: sling/trunk/tooling/ide/eclipse-m2e-ui/META-INF/MANIFEST.MF
URL: 
http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-m2e-ui/META-INF/MANIFEST.MF?rev=1596282&r1=1596281&r2=1596282&view=diff
==============================================================================
--- sling/trunk/tooling/ide/eclipse-m2e-ui/META-INF/MANIFEST.MF (original)
+++ sling/trunk/tooling/ide/eclipse-m2e-ui/META-INF/MANIFEST.MF Tue May 20 
15:07:48 2014
@@ -25,6 +25,7 @@ Import-Package: org.apache.commons.httpc
  org.apache.maven.plugin,
  org.apache.sling.ide.artifacts,
  org.apache.sling.ide.eclipse.core,
+ org.apache.sling.ide.eclipse.ui.wizards,
  org.apache.sling.ide.osgi,
  org.apache.sling.ide.transport,
  org.codehaus.plexus,

Added: 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/AbstractNewMavenBasedSlingApplicationWizard.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/AbstractNewMavenBasedSlingApplicationWizard.java?rev=1596282&view=auto
==============================================================================
--- 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/AbstractNewMavenBasedSlingApplicationWizard.java
 (added)
+++ 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/AbstractNewMavenBasedSlingApplicationWizard.java
 Tue May 20 15:07:48 2014
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.ide.eclipse.ui.wizards.np;
+
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.maven.archetype.catalog.Archetype;
+import org.apache.maven.model.Model;
+import 
org.apache.sling.ide.eclipse.ui.wizards.AbstractNewSlingApplicationWizard;
+import org.apache.sling.ide.eclipse.ui.wizards.Projects;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.wst.server.core.IServer;
+
+public abstract class AbstractNewMavenBasedSlingApplicationWizard extends 
AbstractNewSlingApplicationWizard {
+       private ChooseArchetypeWizardPage chooseArchetypePage;
+       private ArchetypeParametersWizardPage archetypeParametersPage;
+       public abstract void installArchetypes();
+       public abstract boolean acceptsArchetype(Archetype archetype2);
+
+       /**
+        * Constructor for AbstractNewMavenBasedSlingApplicationWizard.
+        */
+       public AbstractNewMavenBasedSlingApplicationWizard() {
+               super();
+               setWindowTitle(doGetWindowTitle());
+               setNeedsProgressMonitor(true);
+       }
+       
+       
+       /**
+        * Adding the page to the wizard.
+        */
+       public void addPages() {
+               chooseArchetypePage = new ChooseArchetypeWizardPage(this);
+               addPage(chooseArchetypePage);
+               archetypeParametersPage = new 
ArchetypeParametersWizardPage(this);
+               addPage(archetypeParametersPage);
+        addPage(getSetupServerWizardPage());
+       }
+       
+    public ChooseArchetypeWizardPage getChooseArchetypePage() {
+               return chooseArchetypePage;
+       }
+
+       protected List<IProject> createProjects(IProgressMonitor monitor) 
throws CoreException {
+
+        IPath location = chooseArchetypePage.getLocation();
+        Archetype archetype = chooseArchetypePage.getSelectedArchetype();
+        String groupId = archetypeParametersPage.getGroupId();
+        String artifactId = archetypeParametersPage.getArtifactId();
+        String version = archetypeParametersPage.getVersion();
+        String javaPackage = archetypeParametersPage.getJavaPackage();
+        Properties properties = archetypeParametersPage.getProperties();
+        ProjectImportConfiguration configuration = new 
ProjectImportConfiguration();
+
+        advance(monitor, 1);
+
+        List<IProject> projects = 
MavenPlugin.getProjectConfigurationManager().createArchetypeProjects(location,
+                archetype, groupId, artifactId, version, javaPackage, 
properties, configuration, monitor);
+
+        monitor.worked(3);
+
+        return 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);
+
+        finishConfiguration(createdProjects, server, monitor);
+        advance(monitor, 1);
+
+        return projects;
+    }
+}
\ No newline at end of file

Propchange: 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/AbstractNewMavenBasedSlingApplicationWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/AbstractNewMavenBasedSlingApplicationWizard.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Modified: 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ArchetypeParametersWizardPage.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ArchetypeParametersWizardPage.java?rev=1596282&r1=1596281&r2=1596282&view=diff
==============================================================================
--- 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ArchetypeParametersWizardPage.java
 (original)
+++ 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ArchetypeParametersWizardPage.java
 Tue May 20 15:07:48 2014
@@ -64,7 +64,7 @@ public class ArchetypeParametersWizardPa
        
        private boolean javaPackageModified;
 
-       private final AbstractNewSlingApplicationWizard parent;
+       private final AbstractNewMavenBasedSlingApplicationWizard parent;
 
        private TableViewer propertiesViewer;
 
@@ -74,7 +74,7 @@ public class ArchetypeParametersWizardPa
 
        private Text version;
        
-       public ArchetypeParametersWizardPage(AbstractNewSlingApplicationWizard 
parent) {
+       public 
ArchetypeParametersWizardPage(AbstractNewMavenBasedSlingApplicationWizard 
parent) {
                super("archetypeParametersPage");
                this.parent = parent;
                setTitle("Configure Archetype Properties");

Modified: 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ChooseArchetypeWizardPage.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ChooseArchetypeWizardPage.java?rev=1596282&r1=1596281&r2=1596282&view=diff
==============================================================================
--- 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ChooseArchetypeWizardPage.java
 (original)
+++ 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ChooseArchetypeWizardPage.java
 Tue May 20 15:07:48 2014
@@ -65,7 +65,7 @@ public class ChooseArchetypeWizardPage e
        private Label locationLabel;
        private Combo locationCombo;
 
-       public ChooseArchetypeWizardPage(AbstractNewSlingApplicationWizard 
parent) {
+       public 
ChooseArchetypeWizardPage(AbstractNewMavenBasedSlingApplicationWizard parent) {
                super("chooseArchetypePage");
                setTitle("Choose Project Location and Archetype");
                setDescription("This step defines the project location and 
archetype");
@@ -73,8 +73,8 @@ public class ChooseArchetypeWizardPage e
        }
 
     @Override
-    public AbstractNewSlingApplicationWizard getWizard() {
-        return (AbstractNewSlingApplicationWizard) super.getWizard();
+    public AbstractNewMavenBasedSlingApplicationWizard getWizard() {
+        return (AbstractNewMavenBasedSlingApplicationWizard) super.getWizard();
     }
 
        public void createControl(Composite parent) {

Modified: 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/NewSlingBundleWizard.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/NewSlingBundleWizard.java?rev=1596282&r1=1596281&r2=1596282&view=diff
==============================================================================
--- 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/NewSlingBundleWizard.java
 (original)
+++ 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/NewSlingBundleWizard.java
 Tue May 20 15:07:48 2014
@@ -23,16 +23,9 @@ import org.apache.sling.ide.artifacts.Em
 import org.apache.sling.ide.artifacts.EmbeddedArtifactLocator;
 import org.apache.sling.ide.eclipse.m2e.EmbeddedArchetypeInstaller;
 import org.apache.sling.ide.eclipse.m2e.internal.Activator;
-import org.apache.sling.ide.eclipse.m2e.internal.SharedImages;
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.resource.ImageDescriptor;
 
-public class NewSlingBundleWizard extends AbstractNewSlingApplicationWizard {
-
-       @Override
-       public ImageDescriptor getLogo() {
-               return SharedImages.SLING_LOG;
-       }
+public class NewSlingBundleWizard extends 
AbstractNewMavenBasedSlingApplicationWizard {
 
        @Override
        public String doGetWindowTitle() {

Added: 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/AbstractNewSlingApplicationWizard.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/AbstractNewSlingApplicationWizard.java?rev=1596282&view=auto
==============================================================================
--- 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/AbstractNewSlingApplicationWizard.java
 (added)
+++ 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/AbstractNewSlingApplicationWizard.java
 Tue May 20 15:07:48 2014
@@ -0,0 +1,239 @@
+/*************************************************************************
+ *
+ * ADOBE CONFIDENTIAL
+ * __________________
+ *
+ *  Copyright 2014 Adobe Systems Incorporated
+ *  All Rights Reserved.
+ *
+ * NOTICE:  All information contained herein is, and remains
+ * the property of Adobe Systems Incorporated and its suppliers,
+ * if any.  The intellectual and technical concepts contained
+ * herein are proprietary to Adobe Systems Incorporated and its
+ * suppliers and are protected by trade secret or copyright law.
+ * Dissemination of this information or reproduction of this material
+ * is strictly forbidden unless prior written permission is obtained
+ * from Adobe Systems Incorporated.
+ **************************************************************************/
+package org.apache.sling.ide.eclipse.ui.wizards;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.sling.ide.eclipse.core.ConfigurationHelper;
+import org.apache.sling.ide.eclipse.ui.internal.Activator;
+import org.apache.sling.ide.eclipse.ui.internal.SharedImages;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.ServerUtil;
+
+/**
+ * The <tt>AbstractNewSlingApplicationWizard</tt> is a support class for 
wizards which create Sling applications
+ *
+ */
+public abstract class AbstractNewSlingApplicationWizard extends Wizard 
implements INewWizard {
+
+    private SetupServerWizardPage setupServerWizardPage = new 
SetupServerWizardPage(this);
+
+    public void init(IWorkbench workbench, IStructuredSelection selection) {
+    }
+
+    /**
+     * 
+     * @return the current wizard page, possibly null
+     */
+    protected WizardPage getCurrentWizardPage() {
+        IWizardPage currentPage = getContainer().getCurrentPage();
+        if (currentPage instanceof WizardPage) {
+            return (WizardPage) currentPage;
+        }
+
+        return null;
+    }
+
+    public void reportError(CoreException e) {
+        WizardPage currentPage = getCurrentWizardPage();
+        if (currentPage != null) {
+            currentPage.setMessage(e.getMessage(), IMessageProvider.ERROR);
+        } else {
+            MessageDialog.openError(getShell(), "Unexpected error", 
e.getMessage());
+        }
+
+        Activator.getDefault().getLog().log(e.getStatus());
+    }
+
+    public void reportError(Throwable t) {
+        if (t instanceof CoreException) {
+            reportError((CoreException) t);
+            return;
+        }
+
+        IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, 
t.getMessage(), t);
+        reportError(new CoreException(status));
+    }
+
+    protected SetupServerWizardPage getSetupServerWizardPage() {
+        return setupServerWizardPage;
+    }
+    /**
+     * This method is called when 'Finish' button is pressed in the wizard. We 
will create an operation and run it using
+     * wizard as execution context.
+     */
+    public boolean performFinish() {
+
+        try {
+            // create projects
+            final List<IProject> createdProjects = new ArrayList<IProject>();
+            getContainer().run(false, true, new WorkspaceModifyOperation() {
+                @Override
+                protected void execute(IProgressMonitor monitor) throws 
CoreException, InvocationTargetException,
+                        InterruptedException {
+                    createdProjects.addAll(createProjects(monitor));
+                }
+            });
+
+            // configure projects
+            final Projects[] projects = new Projects[1];
+            getContainer().run(false, true, new WorkspaceModifyOperation() {
+                @Override
+                protected void execute(IProgressMonitor monitor) throws 
CoreException, InvocationTargetException,
+                        InterruptedException {
+                    projects[0] = configureCreatedProjects(createdProjects, 
monitor);
+                }
+            });
+
+            // deploy the projects on server
+            getContainer().run(false, true, new WorkspaceModifyOperation() {
+                @Override
+                protected void execute(IProgressMonitor monitor) throws 
CoreException, InvocationTargetException,
+                        InterruptedException {
+                    deployProjectsOnServer(projects[0], monitor);
+                }
+            });
+
+            // ensure server is started and all modules are published
+            getContainer().run(true, false, new IRunnableWithProgress() {
+
+                @Override
+                public void run(IProgressMonitor monitor) throws 
InvocationTargetException, InterruptedException {
+                    try {
+                        publishModules(createdProjects, monitor);
+                    } catch (CoreException e) {
+                        throw new InvocationTargetException(e);
+                    }
+                }
+            });
+        } catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
+            return false;
+        } catch (InvocationTargetException e) {
+            reportError(e.getTargetException());
+            return false;
+        }
+
+        return true;
+    }
+
+    protected abstract List<IProject> createProjects(IProgressMonitor monitor) 
throws CoreException;
+
+    protected abstract Projects configureCreatedProjects(List<IProject> 
createdProjects, IProgressMonitor monitor)
+            throws CoreException;
+
+    protected void deployProjectsOnServer(Projects projects, IProgressMonitor 
monitor) throws CoreException {
+
+        IServer server = setupServerWizardPage.getOrCreateServer(monitor);
+        advance(monitor, 1);
+
+        IServerWorkingCopy wc = server.createWorkingCopy();
+        // add the bundle and content projects, ie modules, to the server
+        List<IModule> modules = new LinkedList<IModule>();
+        for (IProject project : projects.getBundleProjects()) {
+            IModule module = ServerUtil.getModule(project);
+            if (module != null) {
+                modules.add(module);
+            }
+        }
+        for (IProject project : projects.getContentProjects()) {
+            IModule module = ServerUtil.getModule(project);
+            if (module != null) {
+                modules.add(module);
+            }
+        }
+        wc.modifyModules(modules.toArray(new IModule[modules.size()]), new 
IModule[0], monitor);
+        wc.save(true, monitor);
+
+        advance(monitor, 2);
+
+        monitor.done();
+    }
+
+    protected void publishModules(final List<IProject> createdProjects, 
IProgressMonitor monitor) throws CoreException {
+        IServer server = setupServerWizardPage.getOrCreateServer(monitor);
+        server.start(ILaunchManager.RUN_MODE, monitor);
+        List<IModule[]> modules = new ArrayList<IModule[]>();
+        for (IProject project : createdProjects) {
+            IModule module = ServerUtil.getModule(project);
+            if (module != null) {
+                modules.add(new IModule[] { module });
+            }
+        }
+
+        if (modules.size() > 0) {
+            server.publish(IServer.PUBLISH_FULL, modules, null, null);
+        }
+    }
+
+    protected void configureBundleProject(IProject aBundleProject, 
List<IProject> projects, IProgressMonitor monitor)
+            throws CoreException {
+        ConfigurationHelper.convertToBundleProject(aBundleProject);
+    }
+
+    protected void configureContentProject(IProject aContentProject, 
List<IProject> projects, IProgressMonitor monitor)
+            throws CoreException {
+        ConfigurationHelper.convertToContentPackageProject(aContentProject, 
monitor, "src/main/content/jcr_root");
+    }
+
+    protected void configureReactorProject(IProject reactorProject, 
IProgressMonitor monitor) throws CoreException {
+        // nothing to be done
+    }
+
+    protected void advance(IProgressMonitor monitor, int step) {
+
+        monitor.worked(step);
+        if (monitor.isCanceled()) {
+            throw new OperationCanceledException();
+        }
+    }
+
+    protected void finishConfiguration(List<IProject> projects, IServer 
server, IProgressMonitor monitor)
+            throws CoreException {
+        // nothing to be done by default - hook for subclasses
+    }
+
+    public ImageDescriptor getLogo() {
+        return SharedImages.SLING_LOG;
+    }
+
+    public abstract String doGetWindowTitle();
+}
\ No newline at end of file

Propchange: 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/AbstractNewSlingApplicationWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/AbstractNewSlingApplicationWizard.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Added: 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/Projects.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/Projects.java?rev=1596282&view=auto
==============================================================================
--- 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/Projects.java
 (added)
+++ 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/Projects.java
 Tue May 20 15:07:48 2014
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.ide.eclipse.ui.wizards;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+
+public class Projects {
+
+    private List<IProject> bundleProjects = new ArrayList<IProject>();
+    private List<IProject> contentProjects = new ArrayList<IProject>();
+    private IProject reactorProject;
+
+    public List<IProject> getBundleProjects() {
+        return bundleProjects;
+    }
+
+    public List<IProject> getContentProjects() {
+        return contentProjects;
+    }
+
+    public IProject getReactorProject() {
+        return reactorProject;
+    }
+
+    public void setReactorProject(IProject reactorProject) {
+        this.reactorProject = reactorProject;
+    }
+}
\ No newline at end of file

Propchange: 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/Projects.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/Projects.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Copied: 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/SetupServerWizardPage.java
 (from r1596276, 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/SetupServerWizardPage.java)
URL: 
http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/SetupServerWizardPage.java?p2=sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/SetupServerWizardPage.java&p1=sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/SetupServerWizardPage.java&r1=1596276&r2=1596282&rev=1596282&view=diff
==============================================================================
--- 
sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/SetupServerWizardPage.java
 (original)
+++ 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/SetupServerWizardPage.java
 Tue May 20 15:07:48 2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.ide.eclipse.ui.wizards.np;
+package org.apache.sling.ide.eclipse.ui.wizards;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -25,7 +25,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.sling.ide.artifacts.EmbeddedArtifactLocator;
 import org.apache.sling.ide.artifacts.EmbeddedArtifact;
 import org.apache.sling.ide.eclipse.core.ISlingLaunchpadServer;
-import org.apache.sling.ide.eclipse.m2e.internal.Activator;
+import org.apache.sling.ide.eclipse.ui.internal.Activator;
 import org.apache.sling.ide.osgi.OsgiClient;
 import org.apache.sling.ide.osgi.OsgiClientException;
 import org.apache.sling.ide.osgi.OsgiClientFactory;
@@ -77,7 +77,7 @@ public class SetupServerWizardPage exten
 
        private Map<String, IServer> serversMap = new HashMap<String, 
IServer>();
 
-       public SetupServerWizardPage(AbstractNewSlingApplicationWizard parent) {
+    public SetupServerWizardPage(AbstractNewSlingApplicationWizard parent) {
                super("chooseArchetypePage");
                setTitle("Select or Setup Launchpad Server");
                setDescription("This step defines which server to use with the 
new Sling application.");
@@ -282,7 +282,7 @@ public class SetupServerWizardPage exten
                 + "/"));
     }
        
-    IServer getOrCreateServer(IProgressMonitor monitor) throws CoreException {
+    public IServer getOrCreateServer(IProgressMonitor monitor) throws 
CoreException {
 
         if (server != null) {
             return server;
@@ -315,7 +315,7 @@ public class SetupServerWizardPage exten
                             "Failed reading the tooling support bundle 
version", e));
                 }
                 finalVersion = installedVersion;
-                EmbeddedArtifactLocator artifactsLocator = 
Activator.getDefault().getArtifactsLocator();
+                EmbeddedArtifactLocator artifactsLocator = 
Activator.getDefault().getArtifactLocator();
                 EmbeddedArtifact toolingSupportBundle = 
artifactsLocator.loadToolingSupportBundle();
                 Version ourVersion = new 
Version(toolingSupportBundle.getVersion());
 

Propchange: 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/SetupServerWizardPage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/SetupServerWizardPage.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Propchange: 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/SetupServerWizardPage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain


Reply via email to