Author: vyemialyanchyk
Date: 2009-04-07 08:59:06 -0400 (Tue, 07 Apr 2009)
New Revision: 14562
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/xpl/BaseXMLHyperlinkSupport.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/HibernateTypeDescriptor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/TypeMappingAdapter.java
Log:
JBIDE-4137
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/xpl/BaseXMLHyperlinkSupport.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/xpl/BaseXMLHyperlinkSupport.java 2009-04-07
12:58:38 UTC (rev 14561)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/xpl/BaseXMLHyperlinkSupport.java 2009-04-07
12:59:06 UTC (rev 14562)
@@ -48,7 +48,7 @@
int regLength = att.getValueRegion().getTextLength();
String attValue = att.getValueRegionText();
if (org.eclipse.wst.sse.core.utils.StringUtils.isQuoted(attValue) ) {
- regOffset = ++regOffset;
+ ++regOffset;
regLength = regLength - 2;
}
hyperRegion = new Region(regOffset, regLength);
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/HibernateTypeDescriptor.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/HibernateTypeDescriptor.java 2009-04-07
12:58:38 UTC (rev 14561)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/HibernateTypeDescriptor.java 2009-04-07
12:59:06 UTC (rev 14562)
@@ -56,6 +56,18 @@
return name.compareTo( ( (HibernateTypeDescriptor)o).getName() );
}
+ public boolean equals(Object obj) {
+ if (obj == null || !(obj instanceof HibernateTypeDescriptor)) {
+ return false;
+ }
+ HibernateTypeDescriptor htd = (HibernateTypeDescriptor) obj;
+ return this.name.equals(htd.getName());
+ }
+
+ public int hashCode() {
+ return this.name.hashCode();
+ }
+
public String toString() {
return name;
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/TypeMappingAdapter.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/TypeMappingAdapter.java 2009-04-07
12:58:38 UTC (rev 14561)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/TypeMappingAdapter.java 2009-04-07
12:59:06 UTC (rev 14562)
@@ -66,12 +66,11 @@
private Boolean getBoolean(String name) {
Node type = getNode().getAttributes().getNamedItem(name);
- if(type == null) {
- return null;
- } else {
- Boolean decode = Boolean.valueOf(type.getNodeValue());
- return decode;
+ Boolean decode = null;
+ if(type != null) {
+ decode = Boolean.valueOf(type.getNodeValue());
}
+ return decode;
}
public Integer getPrecision() {
Show replies by date