Author: adietish
Date: 2011-10-11 12:55:10 -0400 (Tue, 11 Oct 2011)
New Revision: 35545
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] adding now maven nature if imported proj is maven proj
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-11
16:15:08 UTC (rev 35544)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-10-11
16:55:10 UTC (rev 35545)
@@ -10,6 +10,8 @@
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",
+ org.jboss.ide.eclipse.as.core;bundle-version="2.3.0",
+ org.eclipse.m2e.core;bundle-version="1.0.100",
org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.databinding;bundle-version="1.4.0",
@@ -17,7 +19,6 @@
org.eclipse.core.databinding.observable;bundle-version="1.4.0",
org.eclipse.core.databinding.property;bundle-version="1.4.0",
org.eclipse.jface.databinding;bundle-version="[1.5.0,2.0.0)",
- org.jboss.ide.eclipse.as.core;bundle-version="2.3.0",
org.eclipse.wst.server.core;bundle-version="[1.1.3,2.0.0)",
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)",
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-11
16:15:08 UTC (rev 35544)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java 2011-10-11
16:55:10 UTC (rev 35545)
@@ -37,6 +37,9 @@
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;
@@ -86,10 +89,19 @@
overwriteExistingProject(project, monitor);
importToNewProject(projectDirectory, monitor, project);
-
+ if (isMavenProject(projectDirectory)) {
+ configureMavenNature(project, monitor);
+ }
+
createServerAdapterIfRequired();
}
+ 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 importToNewProject(File projectDirectory, IProgressMonitor monitor,
IProject project)
throws CoreException, InvocationTargetException, InterruptedException {
project.create(monitor);
@@ -178,8 +190,8 @@
private boolean isReadable(File destination) {
return destination == null
- || !destination.exists()
- || !destination.canRead();
+ || destination.exists()
+ || destination.canRead();
}
private File getDestinationDirectory(IApplication application) {
Show replies by date