Author: vyemialyanchyk
Date: 2010-12-08 13:19:33 -0500 (Wed, 08 Dec 2010)
New Revision: 27248
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenSourceAction.java
Log:
https://jira.jboss.org/browse/JBIDE-7720 - fixed
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenSourceAction.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenSourceAction.java 2010-12-08
18:11:44 UTC (rev 27247)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenSourceAction.java 2010-12-08
18:19:33 UTC (rev 27248)
@@ -99,7 +99,9 @@
*/
public static IEditorPart run(ConsoleConfiguration consoleConfig, Object selection,
String fullyQualifiedName) throws JavaModelException, PartInitException,
FileNotFoundException {
- if (fullyQualifiedName == null) return null;
+ if (fullyQualifiedName == null) {
+ return null;
+ }
IJavaProject[] projs = ProjectUtils.findJavaProjects(consoleConfig);
String remainder = null;
IType type = null;
@@ -109,7 +111,7 @@
fullyQualifiedName = fullyQualifiedName.substring(0,
fullyQualifiedName.indexOf("$")); //$NON-NLS-1$
for (int i = 0; i < projs.length && type == null; i++) {
proj = projs[i];
- type = proj.findType(fullyQualifiedName);
+ type = ProjectUtils.findType(proj, fullyQualifiedName);
}
while ( remainder.indexOf("$") > 0 ){ //$NON-NLS-1$
String subtype = remainder.substring(0, fullyQualifiedName.indexOf("$"));
//$NON-NLS-1$
@@ -120,7 +122,7 @@
} else {
for (int i = 0; i < projs.length && type == null; i++) {
proj = projs[i];
- type = proj.findType(fullyQualifiedName);
+ type = ProjectUtils.findType(proj, fullyQualifiedName);
}
}
IJavaElement jElement = null;
@@ -136,10 +138,10 @@
if (parentClassName == null) {
break;
}
- type = proj.findType(parentClassName);
+ type = ProjectUtils.findType(proj, parentClassName);
for (int i = 0; i < projs.length && type == null; i++) {
proj = projs[i];
- type = proj.findType(fullyQualifiedName);
+ type = ProjectUtils.findType(proj, fullyQualifiedName);
}
if (type == null) {
break;