[163816] look for older format
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphManager.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphManager.java
index 00447e2..079edf1 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphManager.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphManager.java
@@ -59,9 +59,17 @@
}
public void construct(IProject project) {
- if (project!=null && project.isAccessible() && project.findMember(IModuleConstants.COMPONENT_FILE_PATH) !=null) //$NON-NLS-1$
+ if (project!=null && project.isAccessible() && getComponentFile(project) !=null) //$NON-NLS-1$
constructIfNecessary();
}
+
+ private IResource getComponentFile(IProject project) {
+ IResource componentFile = project.findMember(IModuleConstants.COMPONENT_FILE_PATH);
+ if (componentFile == null)
+ componentFile = project.findMember(IModuleConstants.R1_MODULE_META_FILE_PATH);
+ return componentFile;
+
+ }
private void constructIfNecessary() {
if (moduleTimeStampsChanged() || manifestTimeStampsChanged())
@@ -139,7 +147,7 @@
for (int i=0; i<projects.length; i++) {
if (projects[i]==null || !projects[i].isAccessible())
continue;
- IResource wtpModulesFile = projects[i].findMember(IModuleConstants.COMPONENT_FILE_PATH); //$NON-NLS-1$
+ IResource wtpModulesFile = getComponentFile(projects[i]); //$NON-NLS-1$
if (wtpModulesFile != null && wtpModulesFile.exists() && ComponentCore.createComponent(projects[i]) != null) {
Long currentTimeStamp = new Long(wtpModulesFile.getModificationStamp());
timeStamps.put(projects[i],currentTimeStamp);
@@ -155,7 +163,7 @@
IProject[] projects = ProjectUtilities.getAllProjects();
for (int k=0; k<projects.length; k++) {
- if (!projects[k].isAccessible() || projects[k].findMember(IModuleConstants.COMPONENT_FILE_PATH)==null)
+ if (!projects[k].isAccessible() || getComponentFile(projects[k])==null)
continue;
IVirtualComponent component= ComponentCore.createComponent(projects[k]);
if (component == null) continue;
@@ -196,7 +204,7 @@
private boolean addTimeStamp(IProject project) {
// Get the .component file for the given project
- IResource wtpModulesFile = project.findMember(IModuleConstants.COMPONENT_FILE_PATH);
+ IResource wtpModulesFile = getComponentFile(project);
if (wtpModulesFile==null)
return false;
Long currentTimeStamp = new Long(wtpModulesFile.getModificationStamp());
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IModuleConstants.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IModuleConstants.java
index a124150..e6b2a70 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IModuleConstants.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IModuleConstants.java
@@ -25,6 +25,7 @@
public final static String COMPONENT_FILE_NAME = ".component"; //$NON-NLS-1$
public final static Path COMPONENT_FILE_PATH = new Path(StructureEdit.MODULE_META_FILE_NAME);
public final static String WTPMODULE_FILE_NAME = ".wtpmodules"; //$NON-NLS-1$
+ public final static Path R1_MODULE_META_FILE_PATH = new Path(".settings/.component"); //$NON-NLS-1$
public final static Path WTPMODULE_FILE_PATH = new Path(WTPMODULE_FILE_NAME);
public final static String MODULE_PLUG_IN_ID = "org.eclipse.wst.common.modulecore"; //$NON-NLS-1$
public final static String MODULE_NATURE_ID = "org.eclipse.wst.common.modulecore.ModuleCoreNature"; //$NON-NLS-1$