geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r472276 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoSourcePathComputerDelegate.java
Date Tue, 07 Nov 2006 21:22:01 GMT
Author: sppatel
Date: Tue Nov  7 13:22:01 2006
New Revision: 472276

URL: http://svn.apache.org/viewvc?view=rev&rev=472276
Log:
source locator should process referenced java projects to support shared lib projects source
lookup

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoSourcePathComputerDelegate.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoSourcePathComputerDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoSourcePathComputerDelegate.java?view=diff&rev=472276&r1=472275&r2=472276
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoSourcePathComputerDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoSourcePathComputerDelegate.java
Tue Nov  7 13:22:01 2006
@@ -139,17 +139,31 @@
 			}
 
 			if (project != null) {
+				//process referenced projects for shared lib
 				try {
-					if (project.hasNature(JavaCore.NATURE_ID)) {
-						IJavaProject javaProject = (IJavaProject) project.getNature(JavaCore.NATURE_ID);
-						if (!javaProjectList.contains(javaProject)) {
-							javaProjectList.add(javaProject);
-						}
+					IProject[] referencedProjects = project.getReferencedProjects();
+					for(int j = 0; j < referencedProjects.length; j++) {
+						processJavaProject(javaProjectList, referencedProjects[j]);
 					}
-				} catch (Exception e) {
-					// ignore
+				} catch (CoreException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
 				}
+				processJavaProject(javaProjectList, project);
 			}
+		}
+	}
+
+	private void processJavaProject(List javaProjectList, IProject project) {
+		try {
+			if (project.hasNature(JavaCore.NATURE_ID)) {
+				IJavaProject javaProject = (IJavaProject) project.getNature(JavaCore.NATURE_ID);
+				if (!javaProjectList.contains(javaProject)) {
+					javaProjectList.add(javaProject);
+				}
+			}
+		} catch (Exception e) {
+			// ignore
 		}
 	}
 	



Mime
View raw message