JBoss Tools SVN: r35572 - trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-10-12 10:44:01 -0400 (Wed, 12 Oct 2011)
New Revision: 35572
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPageModel.java
Log:
JBIDE-9793 - Somehow missed a commit
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPageModel.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPageModel.java 2011-10-12 14:41:17 UTC (rev 35571)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPageModel.java 2011-10-12 14:44:01 UTC (rev 35572)
@@ -16,11 +16,23 @@
* @author André Dietisheim
*/
public class AdapterWizardPageModel extends ObservableUIPojo {
+ public static final String CREATE_SERVER = "createServer";
+ public static final String MODE = "serverMode";
+ public static final String MODE_SOURCE = "serverModeSource";
+ public static final String MODE_BINARY = "serverModeBinary";
+ public static final String RUNTIME_DELEGATE = "runtimeDelegate";
+ public static final String SERVER_TYPE = "serverType";
+
private ServerAdapterWizardModel wizardModel;
public AdapterWizardPageModel(ServerAdapterWizardModel wizardModel) {
this.wizardModel = wizardModel;
}
+
+ // TODO is this the best way? Or should we expose ONLY getters to the parent model?
+ public ServerAdapterWizardModel getParentModel() {
+ return wizardModel;
+ }
}
13 years, 3 months
JBoss Tools SVN: r35571 - trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-10-12 10:41:17 -0400 (Wed, 12 Oct 2011)
New Revision: 35571
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
Log:
JBIDE-9793 - Incorrect bundle version set by andre
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-10-12 14:35:42 UTC (rev 35570)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-10-12 14:41:17 UTC (rev 35571)
@@ -8,10 +8,10 @@
org.jboss.ide.eclipse.as.egit.core;bundle-version="2.3.0",
org.eclipse.egit.ui;bundle-version="[1.0.0,2.0.0)",
org.eclipse.egit.core;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.jgit;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jgit;bundle-version="[1.1.0,2.1.0)",
com.jcraft.jsch;bundle-version="0.1.44",
org.jboss.ide.eclipse.as.core;bundle-version="2.3.0",
- org.eclipse.m2e.core;bundle-version="1.0.100",
+ org.eclipse.m2e.core;bundle-version="1.0.0",
org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.databinding;bundle-version="1.4.0",
@@ -24,7 +24,7 @@
org.jboss.ide.eclipse.as.ui;bundle-version="[2.3.0,3.0.0)",
org.eclipse.wst.server.ui;bundle-version="[1.1.3,2.0.0)",
org.eclipse.ui.ide;bundle-version="3.7.0",
- org.eclipse.m2e.core.ui;bundle-version="1.0.100"
+ org.eclipse.m2e.core.ui;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.jboss.tools.common.databinding,
13 years, 3 months
JBoss Tools SVN: r35570 - trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-10-12 10:35:42 -0400 (Wed, 12 Oct 2011)
New Revision: 35570
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
Log:
JBIDE-9793 - runtime not set properly
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-10-12 14:23:49 UTC (rev 35569)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-10-12 14:35:42 UTC (rev 35570)
@@ -10,21 +10,57 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.wizard;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IRuntimeType;
+import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
+import org.eclipse.wst.server.core.IServerType;
+import org.eclipse.wst.server.core.ServerCore;
+import org.eclipse.wst.server.core.TaskModel;
+import org.eclipse.wst.server.ui.internal.Messages;
+import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
+import org.eclipse.wst.server.ui.internal.Trace;
+import org.eclipse.wst.server.ui.internal.wizard.TaskWizard;
+import org.eclipse.wst.server.ui.internal.wizard.WizardTaskUtil;
+import org.eclipse.wst.server.ui.wizard.WizardFragment;
+import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
+import org.jboss.ide.eclipse.as.ui.UIUtil;
+import org.jboss.tools.openshift.express.client.ICartridge;
+import org.jboss.tools.openshift.express.client.OpenshiftException;
+import org.jboss.tools.openshift.express.internal.ui.OpenshiftUIActivator;
public class AdapterWizardPage extends AbstractOpenshiftWizardPage implements IWizardPage {
-
+
private AdapterWizardPageModel model;
+ private Combo suitableRuntimes;
+ private IServerType serverTypeToCreate;
+ private IRuntime runtimeDelegate;
+ private Label domainLabel;
+ private Label modeLabel;
public AdapterWizardPage(ServerAdapterWizard wizard, ServerAdapterWizardModel model) {
super("Server Adapter", "...", "Server Adapter", wizard);
@@ -66,8 +102,159 @@
fillServerAdapterGroup(serverAdapterGroup);
}
+ protected void enableServerWidgets(boolean enabled) {
+ suitableRuntimes.setEnabled(enabled);
+ }
+
private void fillServerAdapterGroup(Group serverAdapterGroup) {
- Button serverAdapterCheckbox = new Button(serverAdapterGroup, SWT.CHECK);
+ Composite c = new Composite(serverAdapterGroup, SWT.BORDER);
+ c.setLayout(new FormLayout());
+ Button serverAdapterCheckbox = new Button(c, SWT.CHECK);
serverAdapterCheckbox.setText("Create a JBoss server adapter");
+ final Button serverAdapterCheckbox2 = serverAdapterCheckbox;
+ serverAdapterCheckbox.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ model.getParentModel().setProperty(AdapterWizardPageModel.CREATE_SERVER, serverAdapterCheckbox2.getSelection());
+ enableServerWidgets(serverAdapterCheckbox2.getSelection());
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+
+ Label l = new Label(c, SWT.BORDER);
+ l.setText("Local Runtime: ");
+
+ suitableRuntimes = new Combo(c, SWT.READ_ONLY);
+ Link addRuntime = new Link(c, SWT.NONE);
+ addRuntime.setText("<a>" + Messages.addRuntime + "</a>");
+
+ domainLabel = new Label(c, SWT.NONE);
+ //appLabel = new Label(c, SWT.NONE);
+ modeLabel = new Label(c, SWT.NONE);
+
+ suitableRuntimes.addSelectionListener(new SelectionListener(){
+ public void widgetSelected(SelectionEvent e) {
+ updateSelectedRuntimeDelegate();
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }});
+ addRuntime.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ IRuntimeType type = getValidRuntimeType();
+ showRuntimeWizard(type);
+ }
+ });
+
+ serverAdapterCheckbox.setLayoutData(UIUtil.createFormData2(0,5,null,0,0,5,null,0));
+ l.setLayoutData( UIUtil.createFormData2(serverAdapterCheckbox,5,null,0,0,5,null,0));
+ addRuntime.setLayoutData(UIUtil.createFormData2(serverAdapterCheckbox, 5, null, 0, null, 0, 100, -5));
+ suitableRuntimes.setLayoutData(UIUtil.createFormData2(serverAdapterCheckbox,5,null,0,l,5,addRuntime,-5));
+ domainLabel.setLayoutData(UIUtil.createFormData2(suitableRuntimes, 5, null, 0, 0, 5, 100, 0));
+ //appLabel.setLayoutData(UIUtil.createFormData2(domainLabel, 5, null, 0, 0, 5, 100, 0));
+ modeLabel.setLayoutData(UIUtil.createFormData2(domainLabel, 5, null, 0, 0, 5, 100, 0));
+
}
+
+ private void updateSelectedRuntimeDelegate() {
+ if( suitableRuntimes.getSelectionIndex() != -1) {
+ runtimeDelegate = ServerCore.findRuntime(suitableRuntimes.getItem(suitableRuntimes.getSelectionIndex()));
+ } else {
+ runtimeDelegate = null;
+ }
+ model.getParentModel().setProperty(AdapterWizardPageModel.RUNTIME_DELEGATE, runtimeDelegate);
+ }
+ private IRuntimeType getValidRuntimeType() {
+ String cartridgeName = model.getParentModel().getApplication().getCartridge().getName();
+ if( ICartridge.JBOSSAS_7.getName().equals(cartridgeName)) {
+ return ServerCore.findRuntimeType(IJBossToolingConstants.AS_70);
+ }
+ return null;
+ }
+ private IServerType getServerTypeToCreate() {
+ String cartridgeName = model.getParentModel().getApplication().getCartridge().getName();
+ if( ICartridge.JBOSSAS_7.getName().equals(cartridgeName)) {
+ return ServerCore.findServerType(IJBossToolingConstants.SERVER_AS_70);
+ }
+ return null;
+ }
+
+
+ private IRuntime[] getRuntimesOfType(String type) {
+ ArrayList<IRuntime> validRuntimes = new ArrayList<IRuntime>();
+ IRuntime[] allRuntimes = ServerCore.getRuntimes();
+ for( int i = 0; i < allRuntimes.length; i++ ) {
+ if( allRuntimes[i].getRuntimeType().getId().equals(type))
+ validRuntimes.add(allRuntimes[i]);
+ }
+ return validRuntimes.toArray(new IRuntime[validRuntimes.size()]);
+ }
+
+ private void fillRuntimeCombo(Combo combo, IRuntime[] runtimes) {
+ String[] names = new String[runtimes.length];
+ for( int i = 0; i < runtimes.length; i++ ) {
+ names[i] = runtimes[i].getName();
+ }
+ combo.setItems(names);
+ }
+
+ protected void onPageActivated(DataBindingContext dbc) {
+ serverTypeToCreate = getServerTypeToCreate();
+ model.getParentModel().setProperty(AdapterWizardPageModel.SERVER_TYPE, serverTypeToCreate);
+ refreshValidRuntimes();
+ if( suitableRuntimes.getItemCount() > 0 ) {
+ suitableRuntimes.select(0);
+ updateSelectedRuntimeDelegate();
+ }
+ try {
+ domainLabel.setText("Host: " + model.getParentModel().getApplication().getApplicationUrl());
+ modeLabel.setText("Mode: Source");
+ model.getParentModel().setProperty(AdapterWizardPageModel.MODE, AdapterWizardPageModel.MODE_SOURCE);
+ } catch(OpenshiftException ose ) {
+ OpenshiftUIActivator.getDefault().getLog().log(new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID, ose.getMessage(), ose));
+ }
+ }
+
+ protected void refreshValidRuntimes() {
+ IRuntime[] runtimes = getRuntimesOfType(getValidRuntimeType().getId());
+ fillRuntimeCombo(suitableRuntimes, runtimes);
+ }
+
+ /* Stolen from NewManualServerComposite */
+ protected int showRuntimeWizard(IRuntimeType runtimeType) {
+ WizardFragment fragment = null;
+ TaskModel taskModel = new TaskModel();
+ final WizardFragment fragment2 = ServerUIPlugin.getWizardFragment(runtimeType.getId());
+ if (fragment2 == null)
+ return Window.CANCEL;
+
+ try {
+ IRuntimeWorkingCopy runtimeWorkingCopy = runtimeType.createRuntime(null, null);
+ taskModel.putObject(TaskModel.TASK_RUNTIME, runtimeWorkingCopy);
+ } catch (CoreException ce) {
+ if (Trace.SEVERE) {
+ Trace.trace(Trace.STRING_SEVERE, "Error creating runtime", ce);
+ }
+ return Window.CANCEL;
+ }
+ fragment = new WizardFragment() {
+ protected void createChildFragments(List<WizardFragment> list) {
+ list.add(fragment2);
+ list.add(WizardTaskUtil.SaveRuntimeFragment);
+ }
+ };
+ TaskWizard wizard2 = new TaskWizard(Messages.wizNewRuntimeWizardTitle, fragment, taskModel);
+ wizard2.setForcePreviousAndNextButtons(true);
+ WizardDialog dialog = new WizardDialog(getShell(), wizard2);
+ int returnValue = dialog.open();
+ refreshValidRuntimes();
+ if (returnValue != Window.CANCEL) {
+ IRuntime rt = (IRuntime)taskModel.getObject(TaskModel.TASK_RUNTIME);
+ if (rt != null && rt.getName() != null && suitableRuntimes.indexOf(rt.getName()) != -1) {
+ suitableRuntimes.select(suitableRuntimes.indexOf(rt.getName()));
+ }
+ }
+ return returnValue;
+ }
+
}
13 years, 3 months
JBoss Tools SVN: r35569 - in trunk/as/plugins/org.jboss.tools.openshift.express.ui: src/org/jboss/tools/openshift/express/internal/ui/wizard and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-12 10:23:49 -0400 (Wed, 12 Oct 2011)
New Revision: 35569
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/projectimport/
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/projectimport/AbstractProjectImportOperation.java
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/projectimport/GeneralProjectImportOperation.java
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/projectimport/MavenProjectImportOperation.java
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java
Log:
[JBIDE-9793] now importing maven project (was: created new and added maven nature)
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-10-12 12:23:38 UTC (rev 35568)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-10-12 14:23:49 UTC (rev 35569)
@@ -23,7 +23,8 @@
org.eclipse.debug.core;bundle-version="[3.7.0,4.0.0)",
org.jboss.ide.eclipse.as.ui;bundle-version="[2.3.0,3.0.0)",
org.eclipse.wst.server.ui;bundle-version="[1.1.3,2.0.0)",
- org.eclipse.ui.ide;bundle-version="3.7.0"
+ org.eclipse.ui.ide;bundle-version="3.7.0",
+ org.eclipse.m2e.core.ui;bundle-version="1.0.100"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.jboss.tools.common.databinding,
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java 2011-10-12 12:23:38 UTC (rev 35568)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java 2011-10-12 14:23:49 UTC (rev 35569)
@@ -14,9 +14,10 @@
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.net.URISyntaxException;
+import java.util.Collections;
+import java.util.List;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -24,7 +25,6 @@
import org.eclipse.egit.core.op.CloneOperation;
import org.eclipse.egit.core.op.ConnectProviderOperation;
import org.eclipse.egit.ui.Activator;
-import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.InitCommand;
import org.eclipse.jgit.api.errors.CheckoutConflictException;
@@ -38,27 +38,19 @@
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.merge.MergeStrategy;
import org.eclipse.jgit.transport.URIish;
-import org.eclipse.m2e.core.internal.MavenPluginActivator;
-import org.eclipse.m2e.core.project.IProjectConfigurationManager;
-import org.eclipse.m2e.core.project.ResolverConfiguration;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.IOverwriteQuery;
-import org.eclipse.ui.wizards.datatransfer.FileSystemStructureProvider;
-import org.eclipse.ui.wizards.datatransfer.ImportOperation;
import org.jboss.ide.eclipse.as.core.util.FileUtil;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.openshift.express.client.IApplication;
import org.jboss.tools.openshift.express.client.IUser;
import org.jboss.tools.openshift.express.client.OpenshiftException;
+import org.jboss.tools.openshift.express.internal.ui.wizard.projectimport.GeneralProjectImportOperation;
+import org.jboss.tools.openshift.express.internal.ui.wizard.projectimport.MavenProjectImportOperation;
/**
- * @author André Dietisheim
+ * @author André Dietisheim <adietish(a)redhat.com>
*/
public class ServerAdapterWizardModel extends ObservableUIPojo {
- private static final String REMOTE_NAME = "openshift";
private IUser user;
private IApplication application;
@@ -78,83 +70,30 @@
this.application = application;
}
- public void importProject(File projectDirectory, IProgressMonitor monitor) throws OpenshiftException,
- URISyntaxException,
- InvocationTargetException, InterruptedException, IOException, NoHeadException,
- ConcurrentRefUpdateException, CheckoutConflictException, InvalidMergeHeadsException,
- WrongRepositoryStateException, NoMessageException, CoreException {
- final String projectName = projectDirectory.getName();
+ public void importProject(File projectFolder, IProgressMonitor monitor) throws OpenshiftException, CoreException, InterruptedException {
+ MavenProjectImportOperation mavenImport = new MavenProjectImportOperation(projectFolder);
+ List<IProject> importedProjects = Collections.emptyList();
+ if (mavenImport.isMavenProject()) {
+ importedProjects = mavenImport.importToWorkspace(monitor);
+ } else {
+ importedProjects = new GeneralProjectImportOperation(projectFolder).importToWorkspace(monitor);
+ }
- IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
- IProject project = workspaceRoot.getProject(projectName);
- overwriteExistingProject(project, monitor);
+ connectToGitRepo(importedProjects, monitor);
- importToNewProject(projectDirectory, project, monitor);
- conntectToGitRepo(project, monitor);
-
- if (isMavenProject(projectDirectory)) {
- configureMavenNature(project, monitor);
- }
-
createServerAdapterIfRequired();
}
- private void conntectToGitRepo(IProject project, IProgressMonitor monitor) throws CoreException {
- new ConnectProviderOperation(project).execute(monitor);
+ private void connectToGitRepo(List<IProject> projects, IProgressMonitor monitor) throws CoreException {
+ for (IProject project : projects) {
+ connectToGitRepo(project, monitor);
+ }
}
- private void configureMavenNature(IProject project, IProgressMonitor monitor) throws CoreException {
- IProjectConfigurationManager manager = MavenPluginActivator.getDefault().getProjectConfigurationManager();
- ResolverConfiguration resolverConfiguration = manager.getResolverConfiguration(project);
- manager.enableMavenNature(project, resolverConfiguration, monitor);
+ private void connectToGitRepo(IProject project, IProgressMonitor monitor) throws CoreException {
+ new ConnectProviderOperation(project).execute(monitor);
}
- private void importToNewProject(File projectDirectory, IProject project, IProgressMonitor monitor)
- throws CoreException, InvocationTargetException, InterruptedException {
- project.create(monitor);
- project.open(monitor);
- ImportOperation operation =
- new ImportOperation(
- project.getFullPath()
- , projectDirectory
- , FileSystemStructureProvider.INSTANCE
- , new IOverwriteQuery() {
- public String queryOverwrite(String file) {
- return IOverwriteQuery.ALL;
- }
- });
- operation.setCreateContainerStructure(false);
- operation.run(monitor);
- }
-
- private void overwriteExistingProject(final IProject project, IProgressMonitor monitor)
- throws CoreException {
- if (project == null
- || !project.exists()) {
- return;
- }
-
- final boolean[] overwrite = new boolean[1];
- Display.getDefault().syncExec(new Runnable() {
-
- public void run() {
- overwrite[0] = MessageDialog.openQuestion(
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- "Overwrite project?",
- NLS.bind(
- "A project \"{0}\" already exists in the workspace.\n"
- + "If you want to import the OpenShift \"{0}\", the project in your workspace will "
- + "get overwritten and may not be recovered.\n\n"
- + "Are you sure that you want to overwrite the project \"{0}\" in your workspace?",
- project.getName()));
- }
-
- });
- if (overwrite[0]) {
- project.delete(true, true, monitor);
- }
- }
-
public File cloneRepository(IProgressMonitor monitor) throws URISyntaxException, OpenshiftException,
InvocationTargetException,
InterruptedException {
@@ -178,29 +117,6 @@
Activator.getDefault().getRepositoryUtil().addConfiguredRepository(gitDirectory);
}
- private boolean isEclipseProject(File destination) {
- if (!isReadable(destination)) {
- return false;
- }
-
- return isReadable(new File(destination, ".project"));
-
- }
-
- private boolean isMavenProject(File destination) {
- if (!isReadable(destination)) {
- return false;
- }
-
- return isReadable(new File(destination, "pom.xml"));
- }
-
- private boolean isReadable(File destination) {
- return destination != null
- && destination.exists()
- && destination.canRead();
- }
-
private File getDestinationDirectory(IApplication application) {
String applicationDirectory = "openshift-" + application.getName();
// File workspace =
Added: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/projectimport/AbstractProjectImportOperation.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/projectimport/AbstractProjectImportOperation.java (rev 0)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/projectimport/AbstractProjectImportOperation.java 2011-10-12 14:23:49 UTC (rev 35569)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.ui.wizard.projectimport;
+
+import java.io.File;
+
+/**
+ * @author André Dietisheim <adietish(a)redhat.com>
+ */
+public class AbstractProjectImportOperation {
+
+ private File projectFolder;
+
+ public AbstractProjectImportOperation(File projectDirectory) {
+ this.projectFolder = projectDirectory;
+ }
+
+ protected File getProjectDirectory() {
+ return projectFolder;
+ }
+
+ protected boolean isReadable(File destination) {
+ return destination != null
+ && destination.exists()
+ && destination.canRead();
+ }
+}
\ No newline at end of file
Property changes on: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/projectimport/AbstractProjectImportOperation.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/projectimport/GeneralProjectImportOperation.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/projectimport/GeneralProjectImportOperation.java (rev 0)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/projectimport/GeneralProjectImportOperation.java 2011-10-12 14:23:49 UTC (rev 35569)
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.ui.wizard.projectimport;
+
+import java.io.File;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.eclipse.ui.wizards.datatransfer.FileSystemStructureProvider;
+import org.eclipse.ui.wizards.datatransfer.ImportOperation;
+
+/**
+ * @author Andre Dietisheim <adietish(a)redhat.com>
+ *
+ */
+public class GeneralProjectImportOperation extends AbstractProjectImportOperation {
+
+ public GeneralProjectImportOperation(File projectDirectory) {
+ super(projectDirectory);
+ }
+
+ public List<IProject> importToWorkspace(IProgressMonitor monitor)
+ throws CoreException, InterruptedException {
+
+ IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+ IProject project = workspaceRoot.getProject(getProjectDirectory().getName());
+ overwriteExistingProject(project, monitor);
+ return Collections.singletonList(project);
+ }
+
+ private void importToNewProject(File projectDirectory, IProject project, IProgressMonitor monitor)
+ throws CoreException, InvocationTargetException, InterruptedException {
+ project.create(monitor);
+ project.open(monitor);
+ ImportOperation operation =
+ new ImportOperation(
+ project.getFullPath()
+ , projectDirectory
+ , FileSystemStructureProvider.INSTANCE
+ , new IOverwriteQuery() {
+ public String queryOverwrite(String file) {
+ return IOverwriteQuery.ALL;
+ }
+ });
+ operation.setCreateContainerStructure(false);
+ operation.run(monitor);
+ }
+
+ private void overwriteExistingProject(final IProject project, IProgressMonitor monitor)
+ throws CoreException {
+ if (project == null
+ || !project.exists()) {
+ return;
+ }
+
+ final boolean[] overwrite = new boolean[1];
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ overwrite[0] = MessageDialog.openQuestion(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ "Overwrite project?",
+ NLS.bind(
+ "A project \"{0}\" already exists in the workspace.\n"
+ + "If you want to import the OpenShift \"{0}\", the project in your workspace will "
+ + "get overwritten and may not be recovered.\n\n"
+ + "Are you sure that you want to overwrite the project \"{0}\" in your workspace?",
+ project.getName()));
+ }
+
+ });
+ if (overwrite[0]) {
+ project.delete(true, true, monitor);
+ }
+ }
+}
Property changes on: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/projectimport/GeneralProjectImportOperation.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/projectimport/MavenProjectImportOperation.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/projectimport/MavenProjectImportOperation.java (rev 0)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/projectimport/MavenProjectImportOperation.java 2011-10-12 14:23:49 UTC (rev 35569)
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.ui.wizard.projectimport;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
+import org.eclipse.m2e.core.internal.MavenPluginActivator;
+import org.eclipse.m2e.core.project.IMavenProjectImportResult;
+import org.eclipse.m2e.core.project.IProjectConfigurationManager;
+import org.eclipse.m2e.core.project.LocalProjectScanner;
+import org.eclipse.m2e.core.project.MavenProjectInfo;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+
+/**
+ * @author Andre Dietisheim <adietish(a)redhat.com>
+ *
+ */
+public class MavenProjectImportOperation extends AbstractProjectImportOperation {
+
+ private static final String POM_FILE = "pom.xml";
+
+ public MavenProjectImportOperation(File projectFolder) {
+ super(projectFolder);
+ }
+
+ public List<IProject> importToWorkspace(IProgressMonitor monitor)
+ throws CoreException, InterruptedException {
+ MavenPluginActivator mavenPlugin = MavenPluginActivator.getDefault();
+ IProjectConfigurationManager configurationManager = mavenPlugin.getProjectConfigurationManager();
+ MavenModelManager modelManager = mavenPlugin.getMavenModelManager();
+ List<MavenProjectInfo> projectInfos = getMavenProjects(getProjectDirectory(), modelManager, monitor);
+ ProjectImportConfiguration projectImportConfiguration =
+ new ProjectImportConfiguration();
+ List<IMavenProjectImportResult> importResults =
+ configurationManager.importProjects(projectInfos, projectImportConfiguration, monitor);
+ return toProjects(importResults);
+ }
+
+ private List<IProject> toProjects(List<IMavenProjectImportResult> importResults) {
+ List<IProject> projects = new ArrayList<IProject>();
+ for (IMavenProjectImportResult importResult : importResults) {
+ projects.add(importResult.getProject());
+ }
+ return projects;
+ }
+
+ private List<MavenProjectInfo> getMavenProjects(File directory, MavenModelManager modelManager,
+ IProgressMonitor monitor) throws InterruptedException {
+ LocalProjectScanner scanner = new LocalProjectScanner(directory, directory.toString(), false,
+ modelManager);
+ scanner.run(monitor);
+ return scanner.getProjects();
+ }
+
+ public boolean isMavenProject() {
+ if (!isReadable(getProjectDirectory())
+ || !getProjectDirectory().isDirectory()) {
+ return false;
+ }
+
+ return isReadable(new File(getProjectDirectory(), POM_FILE));
+ }
+}
Property changes on: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/projectimport/MavenProjectImportOperation.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 3 months
JBoss Tools SVN: r35568 - trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-10-12 08:23:38 -0400 (Wed, 12 Oct 2011)
New Revision: 35568
Modified:
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeLaunchHelper.java
Log:
JBIDE-9882: Forge does not start on XP
Modified: trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeLaunchHelper.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeLaunchHelper.java 2011-10-12 11:46:58 UTC (rev 35567)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeLaunchHelper.java 2011-10-12 12:23:38 UTC (rev 35568)
@@ -95,19 +95,42 @@
private static String createJBossModulesPathArgument(String location) {
StringBuffer buffer = new StringBuffer("-modulepath ");
- buffer.append(location).append("/modules").append(File.pathSeparator);
- buffer.append(System.getProperty("user.home")).append("/.forge/plugins").append(File.pathSeparator);
- buffer.append(getExtLocation());
+ buffer.append(getMainModulesLocation(location)).append(File.pathSeparator);
+ buffer.append(getUserModulesLocation()).append(File.pathSeparator);
+ buffer.append(getExtraModulesLocation());
return buffer.toString();
}
- private static String getExtLocation() {
+ private static String encloseWithDoubleQuotes(String str) {
+ return "\"" + str + "\"";
+ }
+
+ private static String getMainModulesLocation(String location) {
+ String result = location + "/modules";
+ if (result.contains(" ")) {
+ result = encloseWithDoubleQuotes(result);
+ }
+ return result;
+ }
+
+ private static String getUserModulesLocation() {
+ String result = System.getProperty("user.home") + "/.forge/plugins";
+ if (result.contains(" ")) {
+ result = encloseWithDoubleQuotes(result);
+ }
+ return result;
+ }
+
+ private static String getExtraModulesLocation() {
String result = "";
try {
result = FileLocator.getBundleFile(Platform.getBundle("org.jboss.tools.forge.runtime.ext")).getAbsolutePath() + "/modules";
} catch (IOException e) {
ForgeCorePlugin.log(new RuntimeException("Problem while obtaining location of extra runtime classes.", e));
}
+ if (result.contains(" ")) {
+ result = encloseWithDoubleQuotes(result);
+ }
return result;
}
13 years, 3 months
JBoss Tools SVN: r35567 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-10-12 07:46:58 -0400 (Wed, 12 Oct 2011)
New Revision: 35567
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java
Log:
incomplete cleanup of extension point refactor - relates to JBIDE-9864 and JBIDE-9724
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java 2011-10-12 11:38:03 UTC (rev 35566)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java 2011-10-12 11:46:58 UTC (rev 35567)
@@ -55,6 +55,7 @@
BehaviourImpl impl = BehaviourModel.getModel().getBehaviour(getServer().getServerType().getId()).getImpl(id);
delegate = impl.getBehaviourDelegate();
+ delegate.setActualBehaviour(this);
return delegate;
}
13 years, 3 months
JBoss Tools SVN: r35566 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-10-12 07:38:03 -0400 (Wed, 12 Oct 2011)
New Revision: 35566
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/BehaviourModel.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/DelegatingStartLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DelegatingJBoss7ServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerCreationUtils.java
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/internal/EGitCoreActivator.java
Log:
incomplete cleanup of extension point refactor - relates to JBIDE-9864 and JBIDE-9724
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/BehaviourModel.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/BehaviourModel.java 2011-10-12 09:58:34 UTC (rev 35565)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/BehaviourModel.java 2011-10-12 11:38:03 UTC (rev 35566)
@@ -50,7 +50,7 @@
for( int i = 0; i < impls.length; i++ ) {
list.add(impls[i].getLaunchDelegate());
}
- return null;
+ return list;
}
/*
@@ -128,6 +128,8 @@
private IConfigurationElement element;
private IJBossLaunchDelegate launchDelegate;
private String supportedServers;
+ private IJBossBehaviourDelegate behaviourDelegate = null;
+
public BehaviourImpl(IConfigurationElement element) {
this.element = element;
name = element.getAttribute("name"); //$NON-NLS-1$
@@ -171,5 +173,17 @@
}
return null;
}
+
+ public IJBossBehaviourDelegate getBehaviourDelegate() {
+ if( behaviourDelegate != null )
+ return behaviourDelegate;
+ try {
+ behaviourDelegate = (IJBossBehaviourDelegate)element.createExecutableExtension("behaviourDelegate"); //$NON-NLS-1$
+ return behaviourDelegate;
+ } catch(CoreException ce) {
+ JBossServerCorePlugin.getInstance().getLog().log(ce.getStatus());
+ }
+ return null;
+ }
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java 2011-10-12 09:58:34 UTC (rev 35565)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java 2011-10-12 11:38:03 UTC (rev 35566)
@@ -10,8 +10,6 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.core.server.internal;
-import java.util.HashMap;
-
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -27,6 +25,7 @@
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.IJBossServerPublishMethodType;
+import org.jboss.ide.eclipse.as.core.server.internal.BehaviourModel.BehaviourImpl;
import org.jboss.ide.eclipse.as.core.server.internal.launch.DelegatingStartLaunchConfiguration;
import org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.IPublishCopyCallbackHandler;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader;
@@ -40,18 +39,7 @@
*
*/
public class DelegatingServerBehavior extends DeployableServerBehavior {
-
- private static HashMap<String, Class> delegateClassMap;
-
- static {
- delegateClassMap = new HashMap<String, Class>();
- delegateClassMap.put(LocalPublishMethod.LOCAL_PUBLISH_METHOD, LocalJBossBehaviorDelegate.class);
- }
-
- public static void addDelegateMapping(String s, Class c) {
- delegateClassMap.put(s, c);
- }
-
+
private IJBossBehaviourDelegate delegate;
private String lastModeId;
@@ -65,25 +53,11 @@
if( id.equals(lastModeId) && delegate != null && delegate.getBehaviourTypeId().equals(id))
return delegate;
- Class c = getDelegateMap().get(id);
- if( c == null )
- c = getDelegateMap().get(LocalPublishMethod.LOCAL_PUBLISH_METHOD);
-
- try {
- IJBossBehaviourDelegate o = (IJBossBehaviourDelegate)c.newInstance();
- o.setActualBehaviour(this);
- lastModeId = id;
- delegate = o;
- } catch( InstantiationException ie) {
- } catch( IllegalAccessException iae) {
- }
+ BehaviourImpl impl = BehaviourModel.getModel().getBehaviour(getServer().getServerType().getId()).getImpl(id);
+ delegate = impl.getBehaviourDelegate();
return delegate;
}
- protected HashMap<String, Class> getDelegateMap() {
- return delegateClassMap;
- }
-
public void stop(boolean force) {
if( LaunchCommandPreferences.isIgnoreLaunchCommand(getServer())) {
super.setServerStopped();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/DelegatingStartLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/DelegatingStartLaunchConfiguration.java 2011-10-12 09:58:34 UTC (rev 35565)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/DelegatingStartLaunchConfiguration.java 2011-10-12 11:38:03 UTC (rev 35566)
@@ -27,13 +27,9 @@
public class DelegatingStartLaunchConfiguration extends AbstractJBossStartLaunchConfiguration {
public ArrayList<IJBossLaunchDelegate> getSetupParticipants(IServer server) {
- //return ExtensionManager.getDefault().getSetupParticipants(server);
return BehaviourModel.getModel().getSetupParticipants(server);
}
-// public HashMap<String, IStartLaunchDelegate> getLaunchDelegates(IServer server) {
-// return ExtensionManager.getDefault().getLaunchDelegates(server);
-// }
-
+
// Allow all participants to set some defaults for their own details
// Participants should be careful not to change shared launch keys / values
// unless their operation mode (local / rse / etc) is in use
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DelegatingJBoss7ServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DelegatingJBoss7ServerBehavior.java 2011-10-12 09:58:34 UTC (rev 35565)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DelegatingJBoss7ServerBehavior.java 2011-10-12 11:38:03 UTC (rev 35566)
@@ -13,7 +13,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
-import java.util.HashMap;
import java.util.List;
import org.eclipse.core.runtime.CoreException;
@@ -32,7 +31,6 @@
import org.jboss.ide.eclipse.as.core.Messages;
import org.jboss.ide.eclipse.as.core.extensions.events.IEventCodes;
import org.jboss.ide.eclipse.as.core.extensions.events.ServerLogger;
-import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
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.IJBossServerPublishMethod;
@@ -50,20 +48,6 @@
private IDebugEventSetListener serverProcessListener;
private PollThread pollThread;
- private static HashMap<String, Class> delegateClassMap;
- static {
- delegateClassMap = new HashMap<String, Class>();
- delegateClassMap.put(LocalPublishMethod.LOCAL_PUBLISH_METHOD, LocalJBoss7BehaviorDelegate.class);
- }
-
- public static void addDelegateMapping(String s, Class c) {
- delegateClassMap.put(s, c);
- }
-
- protected HashMap<String, Class> getDelegateMap() {
- return delegateClassMap;
- }
-
@Override
public boolean shouldSuspendScanner() {
return false;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerCreationUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerCreationUtils.java 2011-10-12 09:58:34 UTC (rev 35565)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerCreationUtils.java 2011-10-12 11:38:03 UTC (rev 35566)
@@ -58,12 +58,17 @@
return createServer2(currentRuntime, runtimeServerTypeMap.get(currentRuntime.getRuntimeType().getId()), name);
}
- public static IServer createServer2(IRuntime currentRuntime, String serverID) throws CoreException {
- return createServer2(currentRuntime, serverID, serverID);
+ public static IServer createServer2(IRuntime currentRuntime, String serverTypeId) throws CoreException {
+ return createServer2(currentRuntime, serverTypeId, serverTypeId);
}
- public static IServer createServer2(IRuntime currentRuntime, String serverID, String serverName) throws CoreException {
- IServerType serverType = ServerCore.findServerType(serverID);
+ public static IServer createServer2(IRuntime currentRuntime, String serverTypeId, String serverName) throws CoreException {
+ IServerType serverType = ServerCore.findServerType(serverTypeId);
+ return createServer2(currentRuntime, serverType, serverName);
+ }
+
+
+ public static IServer createServer2(IRuntime currentRuntime, IServerType serverType, String serverName) throws CoreException {
IServerWorkingCopy serverWC = serverType.createServer(null, null,
new NullProgressMonitor());
serverWC.setRuntime(currentRuntime);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/internal/EGitCoreActivator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/internal/EGitCoreActivator.java 2011-10-12 09:58:34 UTC (rev 35565)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/internal/EGitCoreActivator.java 2011-10-12 11:38:03 UTC (rev 35566)
@@ -10,8 +10,6 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.egit.core.internal;
-import org.jboss.ide.eclipse.as.core.server.internal.v7.DelegatingJBoss7ServerBehavior;
-import org.jboss.ide.eclipse.as.egit.core.EgitBehaviourDelegate;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
@@ -28,7 +26,8 @@
public void start(BundleContext bundleContext) throws Exception {
EGitCoreActivator.context = bundleContext;
- DelegatingJBoss7ServerBehavior.addDelegateMapping(EgitBehaviourDelegate.ID, EgitBehaviourDelegate.class);
+ //DelegatingJBoss7ServerBehavior.addDelegateMapping(EgitBehaviourDelegate.ID, EgitBehaviourDelegate.class);
+ // THIS is not relevant at the moment. Egit support will need to be revisited
}
13 years, 3 months
JBoss Tools SVN: r35565 - trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-12 05:58:34 -0400 (Wed, 12 Oct 2011)
New Revision: 35565
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
Log:
corrected required egit ui plugin version
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-10-12 09:15:12 UTC (rev 35564)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-10-12 09:58:34 UTC (rev 35565)
@@ -6,7 +6,7 @@
Bundle-Activator: org.jboss.tools.openshift.express.internal.ui.OpenshiftUIActivator
Require-Bundle: org.jboss.tools.openshift.express.client;bundle-version="2.3.0",
org.jboss.ide.eclipse.as.egit.core;bundle-version="2.3.0",
- org.eclipse.egit.ui;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.egit.ui;bundle-version="[1.0.0,2.0.0)",
org.eclipse.egit.core;bundle-version="[1.1.0,2.0.0)",
org.eclipse.jgit;bundle-version="[1.1.0,2.0.0)",
com.jcraft.jsch;bundle-version="0.1.44",
13 years, 3 months
JBoss Tools SVN: r35564 - in trunk/ws/docs: restful_reference/en-US and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2011-10-12 05:15:12 -0400 (Wed, 12 Oct 2011)
New Revision: 35564
Modified:
trunk/ws/docs/reference/en-US/master_output.xml
trunk/ws/docs/reference/en-US/proc-jbt-generate_a_simple_web_service.xml
trunk/ws/docs/reference/en-US/proc-jbt-web_service_test_view.xml
trunk/ws/docs/reference/en-US/sample_web_service_wizards.xml
trunk/ws/docs/reference/en-US/topdown.xml
trunk/ws/docs/restful_reference/en-US/master_output.xml
trunk/ws/docs/restful_reference/en-US/proc-jbt-generate_a_simple_web_service.xml
trunk/ws/docs/restful_reference/en-US/proc-jbt-web_service_test_view.xml
trunk/ws/docs/restful_reference/en-US/sample_web_service_wizards.xml
trunk/ws/docs/soap_reference/en-US/master_output.xml
trunk/ws/docs/soap_reference/en-US/proc-jbt-generate_a_simple_web_service.xml
trunk/ws/docs/soap_reference/en-US/proc-jbt-web_service_test_view.xml
trunk/ws/docs/soap_reference/en-US/sample_web_service_wizards.xml
trunk/ws/docs/soap_reference/en-US/topdown.xml
Log:
JBoss Web Services User Guide correction
Modified: trunk/ws/docs/reference/en-US/master_output.xml
===================================================================
--- trunk/ws/docs/reference/en-US/master_output.xml 2011-10-11 22:52:49 UTC (rev 35563)
+++ trunk/ws/docs/reference/en-US/master_output.xml 2011-10-12 09:15:12 UTC (rev 35564)
@@ -310,7 +310,7 @@
set to 2.0 if your JBossWS runtime in JBoss Server is JBossWS native runtime. You can
specify a catalog file and binding files if you have them. If you want the wizard to
generate empty implementation classes for the Web Service, check the <emphasis>
- <property moreinfo="none">Generate default Web Service implementation classes</property>
+ <property moreinfo="none">Generate default Web Service Implementation classes</property>
</emphasis> check box. If you want to update the default Web.xml file with the Web Service
servlets configured, check the <emphasis>
<property moreinfo="none">Update the default Web.xml</property>
Modified: trunk/ws/docs/reference/en-US/proc-jbt-generate_a_simple_web_service.xml
===================================================================
--- trunk/ws/docs/reference/en-US/proc-jbt-generate_a_simple_web_service.xml 2011-10-11 22:52:49 UTC (rev 35563)
+++ trunk/ws/docs/reference/en-US/proc-jbt-generate_a_simple_web_service.xml 2011-10-12 09:15:12 UTC (rev 35564)
@@ -111,7 +111,7 @@
<entry>Service details</entry>
<entry>Service name</entry>
<entry>yes</entry>
- <entry>Enter the name to for the web service.</entry>
+ <entry>Enter the name for the web service.</entry>
<entry>The web service name will be the URL for the service as mapped in the deployment descriptor (<filename>web.xml</filename>).</entry>
</row>
<row>
Modified: trunk/ws/docs/reference/en-US/proc-jbt-web_service_test_view.xml
===================================================================
--- trunk/ws/docs/reference/en-US/proc-jbt-web_service_test_view.xml 2011-10-11 22:52:49 UTC (rev 35563)
+++ trunk/ws/docs/reference/en-US/proc-jbt-web_service_test_view.xml 2011-10-12 09:15:12 UTC (rev 35564)
@@ -85,7 +85,7 @@
<row>
<entry>Toolbar button - Get From WSDL</entry>
<entry>
- Click this button to display the <guilabel>Select WSDL</guilabel> dialog. Enter the <guibutton>URL</guibutton>, <guibutton>File system</guibutton> location or Eclipse <guibutton>Workspace</guibutton> location of the WSDL file. Given a vaild file, the dialog will allow selection of the <guilabel>Port</guilabel> and <guilabel>Operation</guilabel> to test. Once selected, the request details will be displayed in the <guilabel>Request Details</guilabel> panel.
+ Click this button to display the <guilabel>Select WSDL</guilabel> dialog. Enter the <guibutton>URL</guibutton>, <guibutton>File system</guibutton> location or Eclipse <guibutton>Workspace</guibutton> location of the WSDL file. Given a valid file, the dialog will allow selection of the <guilabel>Port</guilabel> and <guilabel>Operation</guilabel> to test. Once selected, the request details will be displayed in the <guilabel>Request Details</guilabel> panel.
</entry>
</row>
<row>
Modified: trunk/ws/docs/reference/en-US/sample_web_service_wizards.xml
===================================================================
--- trunk/ws/docs/reference/en-US/sample_web_service_wizards.xml 2011-10-11 22:52:49 UTC (rev 35563)
+++ trunk/ws/docs/reference/en-US/sample_web_service_wizards.xml 2011-10-12 09:15:12 UTC (rev 35564)
@@ -11,12 +11,12 @@
<itemizedlist>
<listitem>
<para>
- <guilabel>Create a sample Web Service</guilabel> for a JAX-WS web service; and
+ <guilabel>Create a Sample Web Service</guilabel> for a JAX-WS web service; and
</para>
</listitem>
<listitem>
<para>
- <guilabel>Create a sample RESTful Web Service</guilabel> for a JAX-RS web service.
+ <guilabel>Create a Sample RESTful Web Service</guilabel> for a JAX-RS web service.
</para>
</listitem>
</itemizedlist>
Modified: trunk/ws/docs/reference/en-US/topdown.xml
===================================================================
--- trunk/ws/docs/reference/en-US/topdown.xml 2011-10-11 22:52:49 UTC (rev 35563)
+++ trunk/ws/docs/reference/en-US/topdown.xml 2011-10-12 09:15:12 UTC (rev 35564)
@@ -342,7 +342,7 @@
</listitem>
<listitem>
<para>
- <emphasis> <property>Generate default Web Service implementation classes</property> </emphasis> : select it if you want to generate empty implementation classes for the selected WSDL Service.
+ <emphasis> <property>Generate default Web Service Implementation classes</property> </emphasis> : select it if you want to generate empty implementation classes for the selected WSDL Service.
</para>
</listitem>
<listitem>
Modified: trunk/ws/docs/restful_reference/en-US/master_output.xml
===================================================================
--- trunk/ws/docs/restful_reference/en-US/master_output.xml 2011-10-11 22:52:49 UTC (rev 35563)
+++ trunk/ws/docs/restful_reference/en-US/master_output.xml 2011-10-12 09:15:12 UTC (rev 35564)
@@ -310,7 +310,7 @@
set to 2.0 if your JBossWS runtime in JBoss Server is JBossWS native runtime. You can
specify a catalog file and binding files if you have them. If you want the wizard to
generate empty implementation classes for the Web Service, check the <emphasis>
- <property moreinfo="none">Generate default Web Service implementation classes</property>
+ <property moreinfo="none">Generate default Web Service Implementation classes</property>
</emphasis> check box. If you want to update the default Web.xml file with the Web Service
servlets configured, check the <emphasis>
<property moreinfo="none">Update the default Web.xml</property>
Modified: trunk/ws/docs/restful_reference/en-US/proc-jbt-generate_a_simple_web_service.xml
===================================================================
--- trunk/ws/docs/restful_reference/en-US/proc-jbt-generate_a_simple_web_service.xml 2011-10-11 22:52:49 UTC (rev 35563)
+++ trunk/ws/docs/restful_reference/en-US/proc-jbt-generate_a_simple_web_service.xml 2011-10-12 09:15:12 UTC (rev 35564)
@@ -111,7 +111,7 @@
<entry>Service details</entry>
<entry>Service name</entry>
<entry>yes</entry>
- <entry>Enter the name to for the web service.</entry>
+ <entry>Enter the name for the web service.</entry>
<entry>The web service name will be the URL for the service as mapped in the deployment descriptor (<filename>web.xml</filename>).</entry>
</row>
<row>
Modified: trunk/ws/docs/restful_reference/en-US/proc-jbt-web_service_test_view.xml
===================================================================
--- trunk/ws/docs/restful_reference/en-US/proc-jbt-web_service_test_view.xml 2011-10-11 22:52:49 UTC (rev 35563)
+++ trunk/ws/docs/restful_reference/en-US/proc-jbt-web_service_test_view.xml 2011-10-12 09:15:12 UTC (rev 35564)
@@ -85,7 +85,7 @@
<row>
<entry>Toolbar button - Get From WSDL</entry>
<entry>
- Click this button to display the <guilabel>Select WSDL</guilabel> dialog. Enter the <guibutton>URL</guibutton>, <guibutton>File system</guibutton> location or Eclipse <guibutton>Workspace</guibutton> location of the WSDL file. Given a vaild file, the dialog will allow selection of the <guilabel>Port</guilabel> and <guilabel>Operation</guilabel> to test. Once selected, the request details will be displayed in the <guilabel>Request Details</guilabel> panel.
+ Click this button to display the <guilabel>Select WSDL</guilabel> dialog. Enter the <guibutton>URL</guibutton>, <guibutton>File system</guibutton> location or Eclipse <guibutton>Workspace</guibutton> location of the WSDL file. Given a valid file, the dialog will allow selection of the <guilabel>Port</guilabel> and <guilabel>Operation</guilabel> to test. Once selected, the request details will be displayed in the <guilabel>Request Details</guilabel> panel.
</entry>
</row>
<row>
Modified: trunk/ws/docs/restful_reference/en-US/sample_web_service_wizards.xml
===================================================================
--- trunk/ws/docs/restful_reference/en-US/sample_web_service_wizards.xml 2011-10-11 22:52:49 UTC (rev 35563)
+++ trunk/ws/docs/restful_reference/en-US/sample_web_service_wizards.xml 2011-10-12 09:15:12 UTC (rev 35564)
@@ -11,7 +11,7 @@
<itemizedlist>
<listitem>
<para>
- <guilabel>Create a sample RESTful Web Service</guilabel> for a JAX-RS web service.
+ <guilabel>Create a Sample RESTful Web Service</guilabel> for a JAX-RS web service.
</para>
</listitem>
</itemizedlist>
Modified: trunk/ws/docs/soap_reference/en-US/master_output.xml
===================================================================
--- trunk/ws/docs/soap_reference/en-US/master_output.xml 2011-10-11 22:52:49 UTC (rev 35563)
+++ trunk/ws/docs/soap_reference/en-US/master_output.xml 2011-10-12 09:15:12 UTC (rev 35564)
@@ -310,7 +310,7 @@
set to 2.0 if your JBossWS runtime in JBoss Server is JBossWS native runtime. You can
specify a catalog file and binding files if you have them. If you want the wizard to
generate empty implementation classes for the Web Service, check the <emphasis>
- <property moreinfo="none">Generate default Web Service implementation classes</property>
+ <property moreinfo="none">Generate default Web Service Implementation classes</property>
</emphasis> check box. If you want to update the default Web.xml file with the Web Service
servlets configured, check the <emphasis>
<property moreinfo="none">Update the default Web.xml</property>
Modified: trunk/ws/docs/soap_reference/en-US/proc-jbt-generate_a_simple_web_service.xml
===================================================================
--- trunk/ws/docs/soap_reference/en-US/proc-jbt-generate_a_simple_web_service.xml 2011-10-11 22:52:49 UTC (rev 35563)
+++ trunk/ws/docs/soap_reference/en-US/proc-jbt-generate_a_simple_web_service.xml 2011-10-12 09:15:12 UTC (rev 35564)
@@ -111,7 +111,7 @@
<entry>Service details</entry>
<entry>Service name</entry>
<entry>yes</entry>
- <entry>Enter the name to for the web service.</entry>
+ <entry>Enter the name for the web service.</entry>
<entry>The web service name will be the URL for the service as mapped in the deployment descriptor (<filename>web.xml</filename>).</entry>
</row>
<row>
Modified: trunk/ws/docs/soap_reference/en-US/proc-jbt-web_service_test_view.xml
===================================================================
--- trunk/ws/docs/soap_reference/en-US/proc-jbt-web_service_test_view.xml 2011-10-11 22:52:49 UTC (rev 35563)
+++ trunk/ws/docs/soap_reference/en-US/proc-jbt-web_service_test_view.xml 2011-10-12 09:15:12 UTC (rev 35564)
@@ -85,7 +85,7 @@
<row>
<entry>Toolbar button - Get From WSDL</entry>
<entry>
- Click this button to display the <guilabel>Select WSDL</guilabel> dialog. Enter the <guibutton>URL</guibutton>, <guibutton>File system</guibutton> location or Eclipse <guibutton>Workspace</guibutton> location of the WSDL file. Given a vaild file, the dialog will allow selection of the <guilabel>Port</guilabel> and <guilabel>Operation</guilabel> to test. Once selected, the request details will be displayed in the <guilabel>Request Details</guilabel> panel.
+ Click this button to display the <guilabel>Select WSDL</guilabel> dialog. Enter the <guibutton>URL</guibutton>, <guibutton>File system</guibutton> location or Eclipse <guibutton>Workspace</guibutton> location of the WSDL file. Given a valid file, the dialog will allow selection of the <guilabel>Port</guilabel> and <guilabel>Operation</guilabel> to test. Once selected, the request details will be displayed in the <guilabel>Request Details</guilabel> panel.
</entry>
</row>
<row>
Modified: trunk/ws/docs/soap_reference/en-US/sample_web_service_wizards.xml
===================================================================
--- trunk/ws/docs/soap_reference/en-US/sample_web_service_wizards.xml 2011-10-11 22:52:49 UTC (rev 35563)
+++ trunk/ws/docs/soap_reference/en-US/sample_web_service_wizards.xml 2011-10-12 09:15:12 UTC (rev 35564)
@@ -11,7 +11,7 @@
<itemizedlist>
<listitem>
<para>
- <guilabel>Create a sample Web Service</guilabel> for a JAX-WS web service
+ <guilabel>Create a Sample Web Service</guilabel> for a JAX-WS web service
</para>
</listitem>
</itemizedlist>
Modified: trunk/ws/docs/soap_reference/en-US/topdown.xml
===================================================================
--- trunk/ws/docs/soap_reference/en-US/topdown.xml 2011-10-11 22:52:49 UTC (rev 35563)
+++ trunk/ws/docs/soap_reference/en-US/topdown.xml 2011-10-12 09:15:12 UTC (rev 35564)
@@ -342,7 +342,7 @@
</listitem>
<listitem>
<para>
- <emphasis> <property>Generate default Web Service implementation classes</property> </emphasis> : select it if you want to generate empty implementation classes for the selected WSDL Service.
+ <emphasis> <property>Generate default Web Service Implementation classes</property> </emphasis> : select it if you want to generate empty implementation classes for the selected WSDL Service.
</para>
</listitem>
<listitem>
13 years, 3 months
JBoss Tools SVN: r35563 - trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-11 18:52:49 -0400 (Tue, 11 Oct 2011)
New Revision: 35563
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPageModel.java
Log:
[JBIDE-9793] fixed bug: not showing any error dialog if loading domain/applications fails since this is an expected usecase. the applications table shall then just stay empty
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2011-10-11 22:41:26 UTC (rev 35562)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2011-10-11 22:52:49 UTC (rev 35563)
@@ -57,6 +57,7 @@
import org.jboss.tools.common.ui.databinding.DataBindingUtils;
import org.jboss.tools.openshift.express.client.IApplication;
import org.jboss.tools.openshift.express.client.IDomain;
+import org.jboss.tools.openshift.express.client.NotFoundOpenshiftException;
import org.jboss.tools.openshift.express.client.OpenshiftException;
import org.jboss.tools.openshift.express.internal.ui.OpenshiftUIActivator;
@@ -189,7 +190,7 @@
private void createDomain() throws OpenshiftException {
if (WizardUtils.openWizardDialog(
new NewDomainDialog(model.getNamespace(), wizardModel), getContainer().getShell()) == Dialog.OK) {
- model.updateDomain();
+ model.loadDomain();
}
}
@@ -347,10 +348,14 @@
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
- model.updateDomain();
- final Collection<IApplication> applications = model.getApplications();
+ model.loadDomain();
+ final Collection<IApplication> applications = model.loadApplications();
setViewerInput(applications);
return Status.OK_STATUS;
+ } catch (NotFoundOpenshiftException e) {
+ // no domain and therefore no applications present
+ clearViewer();
+ return Status.OK_STATUS;
} catch (Exception e) {
clearViewer();
return new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID,
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPageModel.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPageModel.java 2011-10-11 22:41:26 UTC (rev 35562)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPageModel.java 2011-10-11 22:52:49 UTC (rev 35563)
@@ -71,12 +71,12 @@
getDomain().setNamespace(namespace);
}
- public void updateDomain() throws OpenshiftException {
+ public void loadDomain() throws OpenshiftException {
setDomain(getUser().getDomain());
}
- public Collection<IApplication> getApplications() throws OpenshiftException {
- IUser user = wizardModel.getUser();
+ public Collection<IApplication> loadApplications() throws OpenshiftException {
+ IUser user = getUser();
if (user == null) {
return Collections.emptyList();
}
13 years, 3 months