Author: rob.stryker(a)jboss.com
Date: 2012-02-14 04:19:59 -0500 (Tue, 14 Feb 2012)
New Revision: 38681
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBinaryPublishMethod.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServer.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServerUtils.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressWizardFragment.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
Log:
JBIDE-10480 - best effort thus far for hybrid server
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-02-14
09:16:11 UTC (rev 38680)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-02-14
09:19:59 UTC (rev 38681)
@@ -71,6 +71,7 @@
serverTypes="org.jboss.tools.openshift.express.openshift.server.type"
typeId="openshift">
</behaviour>
+ <!--
<behaviour
behaviourDelegate="org.jboss.tools.openshift.express.internal.core.behaviour.ExpressBinaryBehaviourDelegate"
launchDelegate="org.jboss.tools.openshift.express.internal.core.behaviour.ExpressLaunchDelegate"
@@ -79,6 +80,7 @@
serverTypes="org.jboss.ide.eclipse.as.70"
typeId="openshiftBinary">
</behaviour>
+ -->
</extension>
<extension
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBinaryPublishMethod.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBinaryPublishMethod.java 2012-02-14
09:16:11 UTC (rev 38680)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBinaryPublishMethod.java 2012-02-14
09:19:59 UTC (rev 38681)
@@ -11,16 +11,12 @@
package org.jboss.tools.openshift.express.internal.core.behaviour;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.WorkspaceJob;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.model.IModuleResourceDelta;
@@ -29,7 +25,6 @@
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
-import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
public class ExpressBinaryPublishMethod extends ExpressPublishMethod {
@@ -42,7 +37,7 @@
if( outProject != null ) {
final IProject destProj =
ResourcesPlugin.getWorkspace().getRoot().getProject(outProject);
if( destProj.exists() ) {
- refreshProject(destProj);
+ refreshProject(destProj,new NullProgressMonitor());
commitAndPushProject(destProj, behaviour, monitor);
}
}
@@ -50,11 +45,6 @@
return areAllPublished(behaviour) ? IServer.PUBLISH_STATE_NONE :
IServer.PUBLISH_STATE_INCREMENTAL;
}
- private void refreshProject(final IProject project) throws CoreException {
- // Already inside a workspace scheduling rule
- project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
- }
-
@Override
public int publishModule(DeployableServerBehavior behaviour, int kind,
int deltaKind, IModule[] module, IProgressMonitor monitor)
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-02-14
09:16:11 UTC (rev 38680)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-02-14
09:19:59 UTC (rev 38681)
@@ -10,13 +10,13 @@
*******************************************************************************/
package org.jboss.tools.openshift.express.internal.core.behaviour;
-import java.util.ArrayList;
-
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.egit.core.op.PushOperationResult;
@@ -29,17 +29,19 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.model.IModuleResourceDelta;
import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
+import org.jboss.ide.eclipse.archives.webtools.modules.LocalZippedPublisherUtil;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IPublishCopyCallbackHandler;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.tools.openshift.egit.core.EGitUtils;
import org.jboss.tools.openshift.express.internal.ui.console.ConsoleUtils;
public class ExpressPublishMethod implements IJBossServerPublishMethod {
- private ArrayList<IProject> projectsLackingGitRepo = null;
-
public ExpressPublishMethod() {
// TODO Auto-generated constructor stub
}
@@ -54,11 +56,14 @@
@Override
public int publishFinish(DeployableServerBehavior behaviour,
IProgressMonitor monitor) throws CoreException {
- if( projectsLackingGitRepo != null ) {
- IProject[] projects = (IProject[]) projectsLackingGitRepo.toArray(new
IProject[projectsLackingGitRepo.size()]);
- shareProjects(projects);
- projectsLackingGitRepo = null;
+ IProject destProj =
ExpressServerUtils.findProjectForServersApplication(behaviour.getServer());
+ if( destProj != null ) {
+ if( destProj.exists() ) {
+ refreshProject(destProj, submon(monitor, 100));
+ commitAndPushProject(destProj, behaviour, submon(monitor, 100));
+ }
}
+
return areAllPublished(behaviour) ? IServer.PUBLISH_STATE_NONE :
IServer.PUBLISH_STATE_INCREMENTAL;
}
@@ -85,24 +90,27 @@
if( s == null || !s.equals("user"))
return -1;
+ if( module.length > 1 )
+ return 0;
- int state = behaviour.getServer().getModulePublishState(module);
- IProject p = module[module.length-1].getProject();
+ IProject destProj =
ExpressServerUtils.findProjectForServersApplication(behaviour.getServer());
+ IPath dest = destProj.getLocation().append("deployments");
- if( deltaKind == ServerBehaviourDelegate.REMOVED)
- return IServer.PUBLISH_STATE_NONE; // go ahead and remove it
-
- Repository repository = EGitUtils.getRepository(p);
- if (repository==null) {
- if( projectsLackingGitRepo == null )
- projectsLackingGitRepo = new ArrayList<IProject>();
- projectsLackingGitRepo.add(p);
- return IServer.PUBLISH_STATE_UNKNOWN;
+ if( module.length == 0 ) return IServer.PUBLISH_STATE_NONE;
+ int modulePublishState = behaviour.getServer().getModulePublishState(module);
+ int publishType = behaviour.getPublishType(kind, deltaKind, modulePublishState);
+
+ IModuleResourceDelta[] delta = new IModuleResourceDelta[]{};
+ if( deltaKind != ServerBehaviourDelegate.REMOVED)
+ delta = behaviour.getPublishedResourceDelta(module);
+
+ try {
+ LocalZippedPublisherUtil util = new LocalZippedPublisherUtil();
+ IStatus status = util.publishModule(behaviour.getServer(), dest.toString(), module,
publishType, delta, monitor);
+ } catch( Exception e ) {
+ e.printStackTrace();
}
-
- commitAndPushProject(p, behaviour, monitor);
-
- return IServer.PUBLISH_STATE_NONE;
+ return 0;
}
protected PushOperationResult commitAndPushProject(IProject p,
@@ -205,10 +213,22 @@
return null;
}
- @Override
public String getPublishDefaultRootFolder(IServer server) {
- // TODO Auto-generated method stub
- return null;
+ IDeployableServer s = ServerConverter.getDeployableServer(server);
+ return s.getDeployFolder();
}
+ protected void refreshProject(final IProject project,IProgressMonitor monitor) throws
CoreException {
+ // Already inside a workspace scheduling rule
+ project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+ }
+
+ public static IProgressMonitor submon( final IProgressMonitor parent, final int ticks
) {
+ return submon( parent, ticks, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL );
+ }
+ public static IProgressMonitor submon( final IProgressMonitor parent,
+ final int ticks, final int style ) {
+ return ( parent == null ? new NullProgressMonitor() : new SubProgressMonitor(
parent, ticks, style ) );
+ }
+
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServer.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServer.java 2012-02-14
09:16:11 UTC (rev 38680)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServer.java 2012-02-14
09:19:59 UTC (rev 38681)
@@ -12,48 +12,26 @@
import java.net.URL;
+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.Status;
-import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.model.IURLProvider;
-import org.eclipse.wst.server.core.model.ServerDelegate;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.DeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.util.ServerUtil;
import org.jboss.ide.eclipse.as.wtp.core.util.ServerModelUtilities;
-import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
-public class ExpressServer extends ServerDelegate implements IURLProvider {
+public class ExpressServer extends DeployableServer implements IURLProvider {
public void setDefaults(IProgressMonitor monitor) {
- super.setDefaults(monitor);
+ getServerWorkingCopy().setName(ServerUtil.getDefaultServerName(getServer().getServerType().getName()));
setAttribute(IDeployableServer.SERVER_MODE, ExpressBehaviourDelegate.OPENSHIFT_ID);
}
- public IStatus canModifyModules(IModule[] add, IModule[] remove) {
- // safety
- add = add == null ? new IModule[0] : add;
- remove = remove == null ? new IModule[0] : remove;
-
- // Can only add a module if the server has zero, and even then, can only add 1.
- IModule[] mods = getServer().getModules();
- if( mods.length == 1 && add.length == 1 && add[0].equals(mods[0]))
- return Status.OK_STATUS;
-
-
- boolean canModify = mods.length == 0 && add.length == 1;
- canModify &= remove.length == 0;
-
- if(!canModify )
- return new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID,
ExpressMessages.cannotModifyModules);
-
- // Make sure if there's a requried mod, the one being added matches it
- String requiredMod = getAttribute(ExpressServerUtils.ATTRIBUTE_APPLICATION_NAME,
(String)null);
- if( requiredMod != null && !requiredMod.equals(add[0].getName())) {
- return new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID,
- NLS.bind(ExpressMessages.additionNotRequiredModule, requiredMod));
- }
+ public IStatus canModifyModules(IModule[] add, IModule[] remove) {
return Status.OK_STATUS;
}
@@ -77,7 +55,9 @@
@Override
public URL getModuleRootURL(IModule module) {
- boolean shouldIgnore = ExpressServerUtils.getIgnoresContextRoot(getServer());
+ IProject appProj = ExpressServerUtils.findProjectForServersApplication(getServer());
+ IProject p =module.getProject();
+ boolean shouldIgnore = ExpressServerUtils.getIgnoresContextRoot(getServer()) &&
p.equals(appProj);
return JBossServer.getModuleRootURL(module, getServer().getHost(), 80, shouldIgnore);
}
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServerUtils.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServerUtils.java 2012-02-14
09:16:11 UTC (rev 38680)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServerUtils.java 2012-02-14
09:19:59 UTC (rev 38681)
@@ -33,6 +33,7 @@
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.core.util.ServerCreationUtils;
import org.jboss.tools.openshift.egit.core.EGitUtils;
+import org.jboss.tools.openshift.express.internal.core.console.UserModel;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.IUser;
@@ -343,20 +344,46 @@
return null;
}
- public static IProject findProjectForApplication(IApplication application)
- throws OpenShiftException, CoreException {
- String gitUri = application.getGitUri();
+ public static IProject findProjectForApplication(IApplication application) {
+ if( application ==null )
+ return null;
+ String gitUri = null;
+ try {
+ gitUri = application.getGitUri();
+ } catch(OpenShiftException ose) {
+ return null;
+ }
+
IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
for( int i = 0; i < projects.length; i++ ) {
- List<URIish> uris = EGitUtils.getRemoteURIs(projects[i]);
- Iterator<URIish> it = uris.iterator();
- while(it.hasNext()) {
- String projURI = it.next().toPrivateString();
- if( projURI.equals(gitUri))
- return projects[i];
+ List<URIish> uris = null;
+ try {
+ uris = EGitUtils.getRemoteURIs(projects[i]);
+ Iterator<URIish> it = uris.iterator();
+ while(it.hasNext()) {
+ String projURI = it.next().toPrivateString();
+ if( projURI.equals(gitUri))
+ return projects[i];
+ }
+ } catch(CoreException ce) {
+ // Log? Not 100 required, just skip this project?
}
}
return null;
}
+ public static IProject findProjectForServersApplication(IServer server) {
+ try {
+ String user = ExpressServerUtils.getExpressUsername(server);
+ IUser user2 = UserModel.getDefault().findUser(user);
+ String appName = ExpressServerUtils.getExpressApplicationName(server);
+ IApplication app = user2.getApplicationByName(appName);
+ IProject destProj = ExpressServerUtils.findProjectForApplication(app);
+ return destProj;
+ } catch(OpenShiftException ose) {
+ //TODO log and throw core e
+ }
+ return null;
+ }
+
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java 2012-02-14
09:16:11 UTC (rev 38680)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java 2012-02-14
09:19:59 UTC (rev 38681)
@@ -126,15 +126,7 @@
}
public IUser findUser(String username) {
- try {
- for( int i = 0; i < allUsers.size(); i++ ) {
- if( allUsers.get(i).getUUID().equals(username))
- return allUsers.get(i);
- }
- } catch(OpenShiftException ose) {
-
- }
- return null;
+ return allUsers.get(username);
}
public IUser[] getUsers() {
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java 2012-02-14
09:16:11 UTC (rev 38680)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java 2012-02-14
09:19:59 UTC (rev 38681)
@@ -23,16 +23,20 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Text;
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
@@ -45,6 +49,7 @@
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.wizard.CredentialsWizardPageModel;
import org.jboss.tools.openshift.express.internal.ui.wizard.IOpenShiftWizardModel;
+import
org.jboss.tools.openshift.express.internal.ui.wizard.OpenShiftExpressApplicationWizard;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.IUser;
@@ -62,6 +67,7 @@
private ModifyListener nameModifyListener, remoteModifyListener,
appModifyListener, deployProjectModifyListener;
private ModifyListener passModifyListener;
+ private Link importLink;
protected Text userText, remoteText;
protected Text passText;
protected Combo appNameCombo, deployProjectCombo;
@@ -154,6 +160,11 @@
}
if( showVerify ) {
+ importLink = new Link(composite, SWT.DEFAULT);
+ importLink.setText("<a>Import this application</a>");
//$NON-NLS-1$
+ importLink.setEnabled(false);
+ GridData gd = GridDataFactory.fillDefaults().span(2, 1).create();
+ importLink.setLayoutData(gd);
verifyButton = new Button(composite, SWT.PUSH);
verifyButton.setText("Verify...");
}
@@ -228,6 +239,19 @@
}
if( verifyButton != null ) {
+ importLink.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ OpenShiftExpressApplicationWizard wizard = new OpenShiftExpressApplicationWizard();
+ wizard.setInitialUser(fuser);
+ wizard.setSelectedApplication(fapplication);
+ WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(),
wizard);
+ dialog.create();
+ dialog.open();
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
verifyButton.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
verifyPressed();
@@ -258,6 +282,7 @@
}
private void postLongRunningValidate() {
+ importLink.setEnabled(true);
if( appListNames == null ) {
appListNames = new String[0];
}
@@ -267,6 +292,13 @@
if( index != -1 )
appNameCombo.select(index);
}
+ if( error == null ) {
+ IProject p = ExpressServerUtils.findProjectForApplication(fapplication);
+ if( p == null ) {
+ error = "Your workspace does not have a project corresponding to " + app
+". Please import one.";
+ importLink.setEnabled(true);
+ }
+ }
callback.setErrorMessage(error);
verifyButton.setEnabled(true);
}
@@ -340,7 +372,6 @@
private void verifyApplicationBinaryMode(CredentialsWizardPageModel model) {
- System.out.println(deployProject);
IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(deployProject);
try {
fuser = OpenShiftUIActivator.getDefault().getUser();
@@ -382,11 +413,16 @@
try {
ExpressDetailsComposite.this.fapplication = application;
ExpressDetailsComposite.this.fuser = user;
+ IProject p = ExpressServerUtils.findProjectForApplication(fapplication);
// update the values
IServerWorkingCopy wc = callback.getServer();
ExpressServerUtils.fillServerWithOpenShiftDetails(wc, application, fuser,
mode, remote);
+ wc.setAttribute(IDeployableServer.DEPLOY_DIRECTORY_TYPE,
IDeployableServer.DEPLOY_CUSTOM);
+ wc.setAttribute(IDeployableServer.ZIP_DEPLOYMENTS_PREF, true);
+ wc.setAttribute(IDeployableServer.DEPLOY_DIRECTORY,
p.getFolder("deployments").getLocation().toString());
+ wc.setAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY,
p.getFolder("deployments").getLocation().toString());
} catch(CoreException ce) {
// TODO FIX HANDLE
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressWizardFragment.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressWizardFragment.java 2012-02-14
09:16:11 UTC (rev 38680)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressWizardFragment.java 2012-02-14
09:19:59 UTC (rev 38681)
@@ -75,16 +75,15 @@
IUser user = composite.getUser();
UserModel.getDefault().addUser(user);
IApplication app = composite.getApplication();
- try {
- // Only clone and import if there's no project already in existence
- IProject p = ExpressServerUtils.findProjectForApplication(app);
- if( p == null ) {
- // clone and import
-
- // If we had to clone and import, we also need to add the module ??
- }
- } catch(OpenShiftException ose ) {
+
+ // Only clone and import if there's no project already in existence
+ IProject p = ExpressServerUtils.findProjectForApplication(app);
+ System.out.println(p);
+ if( p == null ) {
+ System.out.println(p);
+ // clone and import
- }
+ // If we had to clone and import, we also need to add the module ??
+ }
}
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-14
09:16:11 UTC (rev 38680)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-14
09:19:59 UTC (rev 38681)
@@ -104,6 +104,10 @@
IWizardPage[] pages = getPages();
return initialUser == null ? pages[0] : pages[1];
}
+
+ public void setInitialUser(IUser user) {
+ this.initialUser = user;
+ }
@Override
public boolean performFinish() {