Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Macguire2002-06-06 21:11:06 +0000
committerKevin Macguire2002-06-06 21:11:06 +0000
commitd7261a8d2016979335618aa363e5bf0764a65b81 (patch)
treefd3d6608b0ec33b92638a86a0241b09f3a8eeb28
parent77c716785043120ceef7453e75c6fe0cca11138b (diff)
downloadeclipse.platform.team-d7261a8d2016979335618aa363e5bf0764a65b81.tar.gz
eclipse.platform.team-d7261a8d2016979335618aa363e5bf0764a65b81.tar.xz
eclipse.platform.team-d7261a8d2016979335618aa363e5bf0764a65b81.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java17
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamPlugin.java11
2 files changed, 17 insertions, 11 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java
index 171a32c12..2dc8794f6 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java
@@ -422,4 +422,21 @@ public abstract class RepositoryProvider implements IProjectNature {
}
return null;
}
+
+ /*
+ * Convert a project that are using natures to mark them as Team projects
+ * to instead use persistent properties. Optionally remove the nature from the project.
+ * Do nothing if the project has no Team nature.
+ */
+ public static void convertNatureToProperty(IProject project, boolean removeNature) throws TeamException {
+ RepositoryProvider provider = RepositoryProvider.getProvider(project);
+ if(provider == null)
+ return;
+
+ String providerId = provider.getID();
+
+ RepositoryProvider.map(project, providerId);
+ if(removeNature)
+ Team.removeNatureFromProject(project, providerId, new NullProgressMonitor());
+ }
}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamPlugin.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamPlugin.java
index 0f2e37f1b..29961bb59 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamPlugin.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamPlugin.java
@@ -10,14 +10,11 @@
******************************************************************************/
package org.eclipse.team.internal.core;
-import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
-import org.eclipse.team.core.RepositoryProvider;
import org.eclipse.team.core.Team;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.target.TargetManager;
@@ -115,12 +112,4 @@ final public class TeamPlugin extends Plugin {
return new TeamException(new Status(status.getSeverity(), ID, status.getCode(), status.getMessage(), e));
}
- public static void convertNatureToProperty(IProject project) throws TeamException {
- RepositoryProvider provider = RepositoryProvider.getProvider(project);
- String providerId = provider.getID();
-
- RepositoryProvider.map(project, providerId);
- Team.reallyRemoveNatureFromProject(project, providerId, new NullProgressMonitor());
- }
-
} \ No newline at end of file

Back to the top