summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2006-04-06 04:41:53 (EDT)
committer pelder2006-04-06 04:41:53 (EDT)
commit19d8c89942513826e60b118915ccebbd1ac85365 (patch)
tree9a1422a66980b3ad77f97b6f3c8a5bc9366d94d5
parent0028d75de1c91afa30ee03e0eea94247739531ad (diff)
downloadorg.eclipse.jet-19d8c89942513826e60b118915ccebbd1ac85365.zip
org.eclipse.jet-19d8c89942513826e60b118915ccebbd1ac85365.tar.gz
org.eclipse.jet-19d8c89942513826e60b118915ccebbd1ac85365.tar.bz2
[135223] When searching for info on project-based JET projects, check to see whether listener has run or not.
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/runtime/ProjectJETBundleProvider.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/runtime/ProjectJETBundleProvider.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/runtime/ProjectJETBundleProvider.java
index 085a123..deb70c3 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/runtime/ProjectJETBundleProvider.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/runtime/ProjectJETBundleProvider.java
@@ -226,6 +226,16 @@ public class ProjectJETBundleProvider implements IResourceChangeListener, IJETBu
{
IJETBundleDescriptor result = null;
String id = (String)projectNameToIdMap.get(name);
+ if(id == null)
+ {
+ // check to see if this is a project that we haven't updated yet via
+ // the workspace listener. If so, do it now.
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
+ if(isOpenJETProject(project))
+ {
+ updateJETProject(project);
+ }
+ }
if(id != null)
{
result = (IJETBundleDescriptor)descriptorsById.get(id);
@@ -233,6 +243,18 @@ public class ProjectJETBundleProvider implements IResourceChangeListener, IJETBu
return result;
}
+ private boolean isOpenJETProject(IProject project)
+ {
+ try
+ {
+ return project != null && project.exists() && project.isOpen() && project.hasNature(JET2Platform.JET2_NATURE_ID);
+ }
+ catch (CoreException e)
+ {
+ return false;
+ }
+ }
+
public String getProjectForId(String id)
{
ProjectJETBundleDescriptor descriptor = (ProjectJETBundleDescriptor)getDescriptor(id);