Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2011-08-03 07:50:34 -0400
committerIgor Fedorenko2011-08-03 07:50:34 -0400
commite322d67bdd77b611c67c7c153f02db1c9909a0a2 (patch)
tree5dc53ca919bf3ef858a810151f6ca532a4d032e8
parent9b0f9f606581c7e5385cdcf01cdaa90b1ce63fad (diff)
downloadm2e-core-e322d67bdd77b611c67c7c153f02db1c9909a0a2.tar.gz
m2e-core-e322d67bdd77b611c67c7c153f02db1c9909a0a2.tar.xz
m2e-core-e322d67bdd77b611c67c7c153f02db1c9909a0a2.zip
353173 removed check for Eclipse version >= 3.4.0
m2e only supports eclipse 3.6 or newer, so check for 3.4 was redundant. Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java30
1 files changed, 11 insertions, 19 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java
index 0d7e42bb..9cd4ab69 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java
@@ -22,8 +22,6 @@ import java.util.List;
import java.util.Properties;
import java.util.Set;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.Version;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -71,8 +69,8 @@ import org.eclipse.m2e.core.embedder.MavenModelManager;
import org.eclipse.m2e.core.internal.IMavenConstants;
import org.eclipse.m2e.core.internal.MavenPluginActivator;
import org.eclipse.m2e.core.internal.Messages;
-import org.eclipse.m2e.core.internal.archetype.ArchetypeManager;
import org.eclipse.m2e.core.internal.archetype.ArchetypeCatalogFactory.RemoteCatalogFactory;
+import org.eclipse.m2e.core.internal.archetype.ArchetypeManager;
import org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory;
import org.eclipse.m2e.core.internal.markers.IMavenMarkerManager;
import org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager;
@@ -166,33 +164,27 @@ public class ProjectConfigurationManager implements IProjectConfigurationManager
}
private void hideNestedProjectsFromParents(List<IProject> projects) {
-
- if (!MavenPlugin.getMavenConfiguration().isHideFoldersOfNestedProjects()) {
+
+ if(!MavenPlugin.getMavenConfiguration().isHideFoldersOfNestedProjects()) {
return;
}
+
// Prevent child project folders from showing up in parent project folders.
-
- Bundle bundle = ResourcesPlugin.getPlugin().getBundle();
- String version = (String) bundle.getHeaders().get(org.osgi.framework.Constants.BUNDLE_VERSION);
- Version currentVersion = org.osgi.framework.Version.parseVersion(version);
- Version e34Version = new Version(3,4,0);
- if (currentVersion.compareTo(e34Version) < 0) {
- return; // IResource.setHidden doesn't exist in Eclipse prior to version 3.4
- }
+
HashMap<File, IProject> projectFileMap = new HashMap<File, IProject>();
-
- for (IProject project: projects) {
+
+ for(IProject project : projects) {
projectFileMap.put(project.getLocation().toFile(), project);
}
- for (IProject project: projects) {
+ for(IProject project : projects) {
File projectFile = project.getLocation().toFile();
IProject physicalParentProject = projectFileMap.get(projectFile.getParentFile());
- if (physicalParentProject == null) {
+ if(physicalParentProject == null) {
continue;
}
IFolder folder = physicalParentProject.getFolder(projectFile.getName());
- if (folder.exists()) {
- setHidden(folder);
+ if(folder.exists()) {
+ setHidden(folder);
}
}
}

Back to the top