[jboss-cvs] jbosside/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards ...
Max Rydahl Andersen
mandersen at jboss.com
Fri Sep 15 05:19:17 EDT 2006
User: mandersen
Date: 06/09/15 05:19:17
Modified: hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards
ConsoleConfigurationWizardPage.java
Log:
deadcode
Revision Changes Path
1.22 +21 -9 jbosside/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConsoleConfigurationWizardPage.java
===================================================================
RCS file: /cvsroot/jboss/jbosside/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- ConsoleConfigurationWizardPage.java 7 Jul 2006 13:51:10 -0000 1.21
+++ ConsoleConfigurationWizardPage.java 15 Sep 2006 09:19:17 -0000 1.22
@@ -352,14 +352,26 @@
Object obj = ssel.getFirstElement();
IContainer container = null;
- if (obj instanceof IJavaProject) {
- v.javaProject = (IJavaProject) obj;
- container = ( (IJavaProject)obj).getProject();
- } else if (obj instanceof IResource) {
- if (obj instanceof IContainer)
- container = (IContainer)obj;
- else
- container = ( (IResource)obj).getParent();
+ if (obj instanceof IJavaElement) {
+ v.javaProject = ((IJavaElement) obj).getJavaProject();
+ if(v.javaProject!=null) {
+ container = v.javaProject.getProject();
+ }
+ }
+ if (obj instanceof IResource) {
+ IResource res = (IResource) obj;
+ if (obj instanceof IContainer) {
+ container = (IContainer)res;
+ } else {
+ container = res.getParent();
+ }
+
+ if(res.getProject()!=null) {
+ IJavaProject project = JavaCore.create(res.getProject());
+ if(project.exists()) {
+ v.javaProject = project;
+ }
+ }
}
if(container!=null) {
More information about the jboss-cvs-commits
mailing list