Author: vyemialyanchyk
Date: 2008-10-24 12:46:09 -0400 (Fri, 24 Oct 2008)
New Revision: 11171
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java
Log:
JBIDE-2987
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java 2008-10-24
16:36:18 UTC (rev 11170)
+++
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java 2008-10-24
16:46:09 UTC (rev 11171)
@@ -48,7 +48,8 @@
try {
lwType = javaProject.findType(fullyQualifiedName);
} catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ",
e); //$NON-NLS-1$
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException:
", e); //$NON-NLS-1$
}
ICompilationUnit resCompilationUnit = null;
if (lwType != null) {
@@ -80,21 +81,25 @@
try {
javaElement = javaProject.findElement(path.makeRelative());
} catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ",
e); //$NON-NLS-1$
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException:
", e); //$NON-NLS-1$
}
ICompilationUnit[] res = null;
- if (javaElement instanceof ICompilationUnit) {
- res = new ICompilationUnit[]{ (ICompilationUnit)javaElement };
- }
- else if (javaElement instanceof IPackageFragment) {
- try {
- res = ((IPackageFragment)javaElement).getCompilationUnits();
- } catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ",
e); //$NON-NLS-1$
+ if (javaElement != null) {
+ if (javaElement instanceof ICompilationUnit) {
+ res = new ICompilationUnit[]{ (ICompilationUnit)javaElement };
}
+ else if (javaElement instanceof IPackageFragment) {
+ try {
+ res = ((IPackageFragment)javaElement).getCompilationUnits();
+ } catch (JavaModelException e) {
+ // just ignore it!
+ //HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException:
", e); //$NON-NLS-1$
+ }
+ }
+ else if (javaElement instanceof IClassFile) {
+ }
}
- else if (javaElement instanceof IClassFile) {
- }
return res;
}
Show replies by date