Author: vyemialyanchyk
Date: 2009-04-07 08:51:32 -0400 (Tue, 07 Apr 2009)
New Revision: 14559
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefEntityInfo.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefFieldInfo.java
Log:
JBIDE-4137
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java 2009-04-07
12:50:50 UTC (rev 14558)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java 2009-04-07
12:51:32 UTC (rev 14559)
@@ -64,7 +64,6 @@
}
public void init(IViewPart view) {
- view = null;
}
public boolean isCUSelected() {
IWorkbench workbench = Activator.getDefault().getWorkbench();
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java 2009-04-07
12:50:50 UTC (rev 14558)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java 2009-04-07
12:51:32 UTC (rev 14559)
@@ -66,7 +66,6 @@
}
public void run(IAction action) {
- action = null;
}
public void selectionChanged(IAction action, ISelection selection) {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2009-04-07
12:50:50 UTC (rev 14558)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2009-04-07
12:51:32 UTC (rev 14559)
@@ -69,7 +69,7 @@
/**
* instance
*/
- protected static JPAMapToolActor actor = null;
+ private static JPAMapToolActor actor = null;
/**
* selection - start point to generate annotations
* could be java file, list of files, package, project, some other?
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefEntityInfo.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefEntityInfo.java 2009-04-07
12:50:50 UTC (rev 14558)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefEntityInfo.java 2009-04-07
12:51:32 UTC (rev 14559)
@@ -53,4 +53,19 @@
public int compareTo(RefEntityInfo rei) {
return fullyQualifiedName.compareTo(rei.fullyQualifiedName);
}
+
+ public boolean equals(Object obj) {
+ if (super.equals(obj)) {
+ return true;
+ }
+ if (obj == null || !(obj instanceof RefEntityInfo)) {
+ return false;
+ }
+ RefEntityInfo rei = (RefEntityInfo)obj;
+ return fullyQualifiedName.equals(rei.fullyQualifiedName);
+ }
+
+ public int hashCode() {
+ return fullyQualifiedName.hashCode();
+ }
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefFieldInfo.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefFieldInfo.java 2009-04-07
12:50:50 UTC (rev 14558)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefFieldInfo.java 2009-04-07
12:51:32 UTC (rev 14559)
@@ -37,4 +37,19 @@
public int compareTo(RefFieldInfo rfi) {
return fieldId.compareTo(rfi.fieldId);
}
+
+ public boolean equals(Object obj) {
+ if (super.equals(obj)) {
+ return true;
+ }
+ if (obj == null || !(obj instanceof RefFieldInfo)) {
+ return false;
+ }
+ RefFieldInfo rfi = (RefFieldInfo)obj;
+ return fieldId.equals(rfi.fieldId);
+ }
+
+ public int hashCode() {
+ return fieldId.hashCode();
+ }
}