JBoss Tools SVN: r14381 - in trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test: res/project/test/annotated/getters and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-03-30 13:59:59 -0400 (Mon, 30 Mar 2009)
New Revision: 14381
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/DocumentBase.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/DocumentBase.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/DocumentBase.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/DocumentBase.java
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/Country.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Country.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Visa.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Country.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Visa.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Country.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Visa.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java
Log:
JBIDE-4031
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/Country.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/Country.java 2009-03-30 17:57:43 UTC (rev 14380)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/Country.java 2009-03-30 17:59:59 UTC (rev 14381)
@@ -13,12 +13,14 @@
public class Country {
private String name;
+
+ protected Visa visa;
- public Country(String name){
+ public Country(String name) {
this.name = name;
}
- public String getName(){
+ public String getName() {
return this.name;
}
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/DocumentBase.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/DocumentBase.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/DocumentBase.java 2009-03-30 17:59:59 UTC (rev 14381)
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package test.annotated.fields;
+
+public abstract class DocumentBase {
+
+ protected Long globalDocumentIdentificator;
+}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Country.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Country.java 2009-03-30 17:57:43 UTC (rev 14380)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Country.java 2009-03-30 17:59:59 UTC (rev 14381)
@@ -8,17 +8,17 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package test.annotated.fields;
+package test.annotated.getters;
public class Country {
private String name;
- public Country(String name){
+ public Country(String name) {
this.name = name;
}
- public String getName(){
+ public String getName() {
return this.name;
}
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/DocumentBase.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/DocumentBase.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/DocumentBase.java 2009-03-30 17:59:59 UTC (rev 14381)
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package test.annotated.getters;
+
+public abstract class DocumentBase {
+
+ protected Long globalDocumentIdentificator;
+}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Visa.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Visa.java 2009-03-30 17:57:43 UTC (rev 14380)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Visa.java 2009-03-30 17:59:59 UTC (rev 14381)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package test.annotated.fields;
+package test.annotated.getters;
/**
* @author Dmitry Geraskov
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Country.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Country.java 2009-03-30 17:57:43 UTC (rev 14380)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Country.java 2009-03-30 17:59:59 UTC (rev 14381)
@@ -11,17 +11,24 @@
package test.annotated.fields;
import javax.persistence.Entity;
+import javax.persistence.ManyToOne;
@Entity
public class Country {
private String name;
+
+ @ManyToOne
+ protected Visa visa;
+
+ protected Country() {
+ }
- public Country(String name){
+ public Country(String name) {
this.name = name;
}
- public String getName(){
+ public String getName() {
return this.name;
}
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/DocumentBase.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/DocumentBase.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/DocumentBase.java 2009-03-30 17:59:59 UTC (rev 14381)
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package test.annotated.fields;
+
+import javax.persistence.MappedSuperclass;
+
+@MappedSuperclass
+public abstract class DocumentBase {
+
+ protected Long globalDocumentIdentificator;
+}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Visa.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Visa.java 2009-03-30 17:57:43 UTC (rev 14380)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Visa.java 2009-03-30 17:59:59 UTC (rev 14381)
@@ -13,12 +13,18 @@
import javax.persistence.Entity;
import javax.persistence.OneToMany;
+/**
+ * @author Dmitry Geraskov
+ */
@Entity
public class Visa {
- @OneToMany(mappedBy="country")
+ @OneToMany(mappedBy="visa")
private Country[] countries;
+
+ protected Visa() {
+ }
- public Visa(Country[] countries){
+ public Visa(Country[] countries) {
this.countries = countries;
}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Country.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Country.java 2009-03-30 17:57:43 UTC (rev 14380)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Country.java 2009-03-30 17:59:59 UTC (rev 14381)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package test.annotated.fields;
+package test.annotated.getters;
import javax.persistence.Entity;
@@ -16,12 +16,15 @@
public class Country {
private String name;
+
+ protected Country() {
+ }
- public Country(String name){
+ public Country(String name) {
this.name = name;
}
- public String getName(){
+ public String getName() {
return this.name;
}
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/DocumentBase.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/DocumentBase.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/DocumentBase.java 2009-03-30 17:59:59 UTC (rev 14381)
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package test.annotated.getters;
+
+import javax.persistence.MappedSuperclass;
+
+@MappedSuperclass
+public abstract class DocumentBase {
+
+ protected Long globalDocumentIdentificator;
+}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Visa.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Visa.java 2009-03-30 17:57:43 UTC (rev 14380)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Visa.java 2009-03-30 17:59:59 UTC (rev 14381)
@@ -8,17 +8,23 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package test.annotated.fields;
+package test.annotated.getters;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
+/**
+ * @author Dmitry Geraskov
+ */
@Entity
public class Visa {
private Country[] countries;
private byta nonCompiledProterty1;
privata byte nonCompiledProterty2;
+
+ protected Visa() {
+ }
public Visa(Country[] countries){
this.countries = countries;
@@ -32,7 +38,7 @@
return countries;
}
- @OneToMany(mappedBy="country")
+ @OneToMany
public Country[] getCountries(){
return countries;
}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java 2009-03-30 17:57:43 UTC (rev 14380)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java 2009-03-30 17:59:59 UTC (rev 14381)
@@ -139,6 +139,7 @@
collector.resolveRelations();
processor.modify(javaProject, collector.getMapCUs_Info(), false);
//
+ //checkItem("DocumentBase"); //$NON-NLS-1$
checkItem("Document"); //$NON-NLS-1$
checkItem("Foto"); //$NON-NLS-1$
checkItem("Passport"); //$NON-NLS-1$
@@ -146,6 +147,8 @@
checkItem("Staff"); //$NON-NLS-1$
checkItem("FotoXPerson"); //$NON-NLS-1$
checkItem("PersonXFoto"); //$NON-NLS-1$
+ checkItem("Country"); //$NON-NLS-1$
+ checkItem("Visa"); //$NON-NLS-1$
if (icu4 != null) {
checkItem("Entity"); //$NON-NLS-1$
}
15 years, 10 months
JBoss Tools SVN: r14380 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa: common and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-03-30 13:57:43 -0400 (Mon, 30 Mar 2009)
New Revision: 14380
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/JPAConst.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/ProcessEntityInfo.java
Log:
JBIDE-4028
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2009-03-30 15:34:48 UTC (rev 14379)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2009-03-30 17:57:43 UTC (rev 14380)
@@ -59,7 +59,7 @@
/**
* pair of 2 particular fields from 2 particular entities
*/
- protected class ProcessItem {
+ static protected class ProcessItem {
// field names
public String fieldId = null;
public String fieldId2 = null;
@@ -503,9 +503,23 @@
pi.refEntityInfo2.mappedBy = pi.fieldId;
updateOwner(pi);
}
+ else if (pi.refEntityInfo2.refType == RefType.MANY2ONE) {
+ pi.refEntityInfo.refType = RefType.ONE2MANY;
+ pi.refEntityInfo.mappedBy = pi.fieldId2;
+ pi.refEntityInfo2.refType = RefType.MANY2ONE;
+ pi.refEntityInfo2.mappedBy = pi.fieldId;
+ updateOwner(pi);
+ }
}
else if (pi.refEntityInfo.refType == RefType.MANY2ONE) {
- if (pi.refEntityInfo2.refType == RefType.MANY2ONE) {
+ if (pi.refEntityInfo2.refType == RefType.ONE2MANY) {
+ pi.refEntityInfo.refType = RefType.MANY2ONE;
+ pi.refEntityInfo.mappedBy = pi.fieldId2;
+ pi.refEntityInfo2.refType = RefType.ONE2MANY;
+ pi.refEntityInfo2.mappedBy = pi.fieldId;
+ updateOwner(pi);
+ }
+ else if (pi.refEntityInfo2.refType == RefType.MANY2ONE) {
pi.refEntityInfo.refType = RefType.ONE2ONE;
pi.refEntityInfo.mappedBy = pi.fieldId2;
pi.refEntityInfo2.refType = RefType.ONE2ONE;
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java 2009-03-30 15:34:48 UTC (rev 14379)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java 2009-03-30 17:57:43 UTC (rev 14380)
@@ -14,7 +14,6 @@
import java.util.Iterator;
import java.util.List;
-import org.eclipse.core.runtime.Assert;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.ASTVisitor;
@@ -251,9 +250,10 @@
SourceType sourceT = (SourceType)tb.getJavaElement();
try {
entityFullyQualifiedName = sourceT.getFullyQualifiedParameterizedName();
- } catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("error", e);
}
+ catch (JavaModelException e) {
+ HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
+ }
}
entityInfo.addDependency(entityFullyQualifiedName);
entityInfo.setFullyQualifiedParentName(entityFullyQualifiedName);
@@ -308,7 +308,7 @@
}
public boolean visit(MethodDeclaration node) {
- if (node.getName().getFullyQualifiedName().compareTo(entityInfo.getName()) == 0) {
+ if (node.getName().getFullyQualifiedName().compareTo(entityInfo.getName()) == 0 || node.isConstructor()) {
// this is constructor declaration - process it separately
entityInfo.setImplicitConstructorFlag(false);
if (node.parameters().size() == 0) {
@@ -317,14 +317,14 @@
return true;
}
// -) is it setter?
- if (node.getName().getIdentifier().startsWith("set")//$NON-NLS-1$
+ if (node.getName().getIdentifier().startsWith("set") //$NON-NLS-1$
&& node.parameters().size() == 1) {
// setter - do not process it
return true;
}
// +) is it getter?
- if (!(node.getName().getIdentifier().startsWith("get")//$NON-NLS-1$
- || node.getName().getIdentifier().startsWith("is"))//$NON-NLS-1$
+ if (!(node.getName().getIdentifier().startsWith("get") //$NON-NLS-1$
+ || node.getName().getIdentifier().startsWith("is")) //$NON-NLS-1$
|| node.parameters().size() > 0) {
// not the getter - do not process it
return true;
@@ -337,7 +337,8 @@
List<String> list = new ArrayList<String>();
if (returnIdentifier != null){
list.add(returnIdentifier);
- } else {
+ }
+ else {
//this need to do not lost primiry id
//and add references for interface
if (entityInfo.isInterfaceFlag()){
@@ -377,7 +378,8 @@
entityInfo.addPrimaryIdCandidate(name);
}
}
- } else if (type.isSimpleType()) {
+ }
+ else if (type.isSimpleType()) {
SimpleType st = (SimpleType)type;
ITypeBinding tb = st.resolveBinding();
if (tb != null) {
@@ -386,7 +388,8 @@
SourceType sourceT = (SourceType)tb.getJavaElement();
try {
entityFullyQualifiedName = sourceT.getFullyQualifiedParameterizedName();
- } catch (JavaModelException e) {
+ }
+ catch (JavaModelException e) {
HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
}
entityInfo.addDependency(entityFullyQualifiedName);
@@ -408,7 +411,8 @@
}
}
}
- } else if (type.isArrayType()) {
+ }
+ else if (type.isArrayType()) {
ArrayType at = (ArrayType)type;
Type componentType = at;
while (componentType.isArrayType()){
@@ -421,7 +425,8 @@
SourceType sourceT = (SourceType)tb.getJavaElement();
try {
entityFullyQualifiedName = sourceT.getFullyQualifiedParameterizedName();
- } catch (JavaModelException e) {
+ }
+ catch (JavaModelException e) {
HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
}
entityInfo.addDependency(entityFullyQualifiedName);
@@ -432,7 +437,8 @@
}
}
}
- } else if (type.isParameterizedType()) {
+ }
+ else if (type.isParameterizedType()) {
ParameterizedType pt = (ParameterizedType)type;
Type typeP = (Type)pt.getType();
ITypeBinding tb = typeP.resolveBinding();
@@ -478,10 +484,12 @@
}
}
}
- } else if (type.isQualifiedType()) {
+ }
+ else if (type.isQualifiedType()) {
QualifiedType qt = (QualifiedType)type;
ITypeBinding tb = qt.resolveBinding();
- } else if (type.isWildcardType()) {
+ }
+ else if (type.isWildcardType()) {
WildcardType wt = (WildcardType)type;
ITypeBinding tb = wt.resolveBinding();
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/JPAConst.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/JPAConst.java 2009-03-30 15:34:48 UTC (rev 14379)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/JPAConst.java 2009-03-30 17:57:43 UTC (rev 14380)
@@ -19,6 +19,8 @@
public static final String IMPORT_ONE2MANY = "javax.persistence.OneToMany"; //$NON-NLS-1$
public static final String IMPORT_MANY2ONE = "javax.persistence.ManyToOne"; //$NON-NLS-1$
public static final String IMPORT_MANY2MANY = "javax.persistence.ManyToMany"; //$NON-NLS-1$
+ public static final String IMPORT_MAPPEDSUPERCLASS = "javax.persistence.MappedSuperclass"; //$NON-NLS-1$
+ public static final String IMPORT_VERSION = "javax.persistence.Version"; //$NON-NLS-1$
public static final String ANNOTATION_SERIALIZABLE = "Serializable"; //$NON-NLS-1$
public static final String ANNOTATION_ENTITY = "Entity"; //$NON-NLS-1$
@@ -29,6 +31,8 @@
public static final String ANNOTATION_ONE2MANY = "OneToMany"; //$NON-NLS-1$
public static final String ANNOTATION_MANY2ONE = "ManyToOne"; //$NON-NLS-1$
public static final String ANNOTATION_MANY2MANY = "ManyToMany"; //$NON-NLS-1$
+ public static final String ANNOTATION_MAPPEDSUPERCLASS = "MappedSuperclass"; //$NON-NLS-1$
+ public static final String ANNOTATION_VERSION = "Version"; //$NON-NLS-1$
public static final Vector<String> ALL_IMPORTS = new Vector<String>();
@@ -42,6 +46,8 @@
ALL_IMPORTS.add(IMPORT_ONE2MANY);
ALL_IMPORTS.add(IMPORT_MANY2ONE);
ALL_IMPORTS.add(IMPORT_MANY2MANY);
+ ALL_IMPORTS.add(IMPORT_MAPPEDSUPERCLASS);
+ ALL_IMPORTS.add(IMPORT_VERSION);
}
static public String getRefType(RefType refType) {
@@ -115,4 +121,20 @@
}
return false;
}
+
+ static public boolean isAnnotationMappedSuperclass(String fullyQualifiedName) {
+ if (ANNOTATION_MAPPEDSUPERCLASS.compareTo(fullyQualifiedName) == 0 ||
+ IMPORT_MAPPEDSUPERCLASS.compareTo(fullyQualifiedName) == 0) {
+ return true;
+ }
+ return false;
+ }
+
+ static public boolean isAnnotationVersion(String fullyQualifiedName) {
+ if (ANNOTATION_VERSION.compareTo(fullyQualifiedName) == 0 ||
+ IMPORT_VERSION.compareTo(fullyQualifiedName) == 0) {
+ return true;
+ }
+ return false;
+ }
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/ProcessEntityInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/ProcessEntityInfo.java 2009-03-30 15:34:48 UTC (rev 14379)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/ProcessEntityInfo.java 2009-03-30 17:57:43 UTC (rev 14380)
@@ -17,19 +17,23 @@
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.ASTVisitor;
+import org.eclipse.jdt.core.dom.ArrayType;
import org.eclipse.jdt.core.dom.Block;
import org.eclipse.jdt.core.dom.BodyDeclaration;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.FieldDeclaration;
+import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.ImportDeclaration;
import org.eclipse.jdt.core.dom.MarkerAnnotation;
import org.eclipse.jdt.core.dom.MemberValuePair;
import org.eclipse.jdt.core.dom.MethodDeclaration;
import org.eclipse.jdt.core.dom.Modifier;
import org.eclipse.jdt.core.dom.NormalAnnotation;
+import org.eclipse.jdt.core.dom.ParameterizedType;
import org.eclipse.jdt.core.dom.QualifiedName;
import org.eclipse.jdt.core.dom.ReturnStatement;
import org.eclipse.jdt.core.dom.SimpleName;
+import org.eclipse.jdt.core.dom.SimpleType;
import org.eclipse.jdt.core.dom.StringLiteral;
import org.eclipse.jdt.core.dom.Type;
import org.eclipse.jdt.core.dom.TypeDeclaration;
@@ -238,7 +242,7 @@
}
}
}
- if (type.isSimpleType() || type.isParameterizedType()) {
+ if (type.isSimpleType() || type.isParameterizedType() || type.isArrayType()) {
Iterator itVarNames = node.fragments().iterator();
String fieldId = ""; //$NON-NLS-1$
RefType refType = RefType.UNDEF;
@@ -256,7 +260,7 @@
}
}
Set<RefFieldInfo> setRFI = entityInfo.getRefFieldInfoSet(fullyQualifiedName2);
- if (!annotated && setRFI != null) {
+ if (!annotated && setRFI != null && isSimilarType(type, fullyQualifiedName2)) {
RefEntityInfo rei = entityInfo.getFieldIdRefEntityInfo(fieldId);
// try to process bidirectional relationships:
// nRefType == JPAConst.ONE2ONE - OneToOne - the owning side corresponds
@@ -290,6 +294,23 @@
if (annotationStyle != AnnotStyle.GETTERS) {
return true;
}
+ if (node.getName().getFullyQualifiedName().compareTo(entityInfo.getName()) == 0 || node.isConstructor()) {
+ // this is constructor declaration
+ return true;
+ }
+ // -) is it setter?
+ if (node.getName().getIdentifier().startsWith("set") //$NON-NLS-1$
+ && node.parameters().size() == 1) {
+ // setter - do not process it
+ return true;
+ }
+ // +) is it getter?
+ if (!(node.getName().getIdentifier().startsWith("get") //$NON-NLS-1$
+ || node.getName().getIdentifier().startsWith("is")) //$NON-NLS-1$
+ || node.parameters().size() > 0) {
+ // not the getter - do not process it
+ return true;
+ }
Type type = node.getReturnType2();
if (type == null) {
return true;
@@ -323,7 +344,7 @@
}
}
}
- if (type.isSimpleType() || type.isParameterizedType()) {
+ if (type.isSimpleType() || type.isParameterizedType() || type.isArrayType()) {
String fieldId = ""; //$NON-NLS-1$
RefType refType = RefType.UNDEF;
boolean annotated = false;
@@ -332,10 +353,8 @@
refType = entityInfo.getFieldIdRelValue(fieldId);
annotated = entityInfo.getFieldIdAnnotatedValue(fieldId);
fullyQualifiedName2 = entityInfo.getFieldIdFQNameValue(fieldId);
- if (refType != RefType.UNDEF) {
- }
Set<RefFieldInfo> setRFI = entityInfo.getRefFieldInfoSet(fullyQualifiedName2);
- if (!annotated && setRFI != null) {
+ if (!annotated && setRFI != null && isSimilarType(type, fullyQualifiedName2)) {
RefEntityInfo rei = entityInfo.getFieldIdRefEntityInfo(fieldId);
// try to process bidirectional relationships:
// nRefType == JPAConst.ONE2ONE - OneToOne - the owning side corresponds
@@ -364,6 +383,30 @@
}
return true;
}
+
+ // simple type name check
+ public boolean isSimilarType(Type type, String fullyQualifiedName) {
+ String typeName = null;
+ if (type.isSimpleType()) {
+ SimpleType st = (SimpleType)type;
+ typeName = st.getName().getFullyQualifiedName();
+ }
+ else if (type.isArrayType()) {
+ ArrayType at = (ArrayType)type;
+ Type componentType = at;
+ while (componentType.isArrayType()){
+ componentType = ((ArrayType)componentType).getComponentType();
+ }
+ if (componentType.isSimpleType()) {
+ SimpleType st = (SimpleType)componentType;
+ typeName = st.getName().getFullyQualifiedName();
+ }
+ }
+ if (typeName != null && fullyQualifiedName.indexOf(typeName) == -1) {
+ return false;
+ }
+ return true;
+ }
public boolean addSimpleMarkerAnnotation(BodyDeclaration node, String name) {
if (name == null || name.length() == 0) {
15 years, 10 months
JBoss Tools SVN: r14379 - trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-03-30 11:34:48 -0400 (Mon, 30 Mar 2009)
New Revision: 14379
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/FileTilesLoader.java
Log:
JBIDE-4101
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/FileTilesLoader.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/FileTilesLoader.java 2009-03-30 15:32:28 UTC (rev 14378)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/FileTilesLoader.java 2009-03-30 15:34:48 UTC (rev 14379)
@@ -161,8 +161,8 @@
public String getAttribute(Element element, String xmlname, XAttribute attr) {
int i = xmlname.indexOf('|');
- if(i < 0 || xmlname.startsWith("content|")) return super.getAttribute(element, xmlname);
- String v = super.getAttribute(element, xmlname.substring(0, i));
+ if(i < 0 || xmlname.startsWith("content|")) return super.getAttribute(element, xmlname, attr);
+ String v = super.getAttribute(element, xmlname.substring(0, i), attr);
return (v != null && v.length() > 0) ? v :
super.getAttribute(element, xmlname.substring(i + 1), attr);
}
15 years, 10 months
JBoss Tools SVN: r14378 - trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-03-30 11:32:28 -0400 (Mon, 30 Mar 2009)
New Revision: 14378
Modified:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/SeamPagesLoaderUtil.java
Log:
JBIDE-4101
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/SeamPagesLoaderUtil.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/SeamPagesLoaderUtil.java 2009-03-30 15:27:22 UTC (rev 14377)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/SeamPagesLoaderUtil.java 2009-03-30 15:32:28 UTC (rev 14378)
@@ -33,12 +33,12 @@
return super.isSaveable(entity, n, v, dv);
}
- public String getAttribute(Element element, String xmlname) {
+ public String getAttribute(Element element, String xmlname, XAttribute attr) {
int i = xmlname.indexOf('|');
- if(i < 0) return super.getAttribute(element, xmlname);
- String v = super.getAttribute(element, xmlname.substring(0, i));
+ if(i < 0) return super.getAttribute(element, xmlname, attr);
+ String v = super.getAttribute(element, xmlname.substring(0, i), attr);
return (v != null && v.length() > 0) ? v :
- super.getAttribute(element, xmlname.substring(i + 1));
+ super.getAttribute(element, xmlname.substring(i + 1), attr);
}
public void saveAttribute(Element element, String xmlname, String value) {
15 years, 10 months
JBoss Tools SVN: r14377 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-03-30 11:27:22 -0400 (Mon, 30 Mar 2009)
New Revision: 14377
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/FacesConfigLoader.java
Log:
JBIDE-4101
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/FacesConfigLoader.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/FacesConfigLoader.java 2009-03-30 15:27:13 UTC (rev 14376)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/FacesConfigLoader.java 2009-03-30 15:27:22 UTC (rev 14377)
@@ -294,7 +294,7 @@
return super.isSaveable(entity, n, v, dv);
}
- public String getAttribute(Element element, String xmlname) {
+ public String getAttribute(Element element, String xmlname, XAttribute attr) {
if("attribute-names".equals(xmlname))
return loadArray(element, "attribute-name");
if("redirect".equals(xmlname))
@@ -302,7 +302,7 @@
if("value.#text".equals(xmlname)) {
if(XMLUtil.getUniqueChild(element, "null-value") != null) return "null-value";
}
- return super.getAttribute(element, xmlname);
+ return super.getAttribute(element, xmlname, attr);
}
public void saveAttribute(Element element, String xmlname, String value) {
15 years, 10 months
JBoss Tools SVN: r14376 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-03-30 11:27:13 -0400 (Mon, 30 Mar 2009)
New Revision: 14376
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBar.xhtml.xml
Log:
RESOLVED - issue JBIDE-4058: Tool Bar and item separator
https://jira.jboss.org/jira/browse/JBIDE-4058
- JUnit tests have been updated
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBar.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBar.xhtml.xml 2009-03-30 15:26:46 UTC (rev 14375)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBar.xhtml.xml 2009-03-30 15:27:13 UTC (rev 14376)
@@ -47,15 +47,9 @@
</TBODY>
</TABLE>
</TD>
- <TD ALIGN="center">
- <IMG SRC="/.*resources/toolBar/separatorLine.gif/" />
- </TD>
<TD WIDTH="100%">
<BR _MOZ_DIRTY="" TYPE="_moz" />
</TD>
- <TD ALIGN="center">
- <IMG SRC="/.*resources/toolBar/separatorLine.gif/" />
- </TD>
<TD CLASS="dr-toolbar-int rich-toolbar-item" STYLE="padding: 0px;">
<TABLE
STYLE="border: 0px none ; margin: 0px; padding: 0px; width: 100%; height: 100%;">
15 years, 10 months
JBoss Tools SVN: r14375 - trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-03-30 11:26:46 -0400 (Mon, 30 Mar 2009)
New Revision: 14375
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/FileTilesLoader.java
Log:
JBIDE-4101
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/FileTilesLoader.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/FileTilesLoader.java 2009-03-30 15:26:16 UTC (rev 14374)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/FileTilesLoader.java 2009-03-30 15:26:46 UTC (rev 14375)
@@ -13,6 +13,7 @@
import java.io.StringReader;
import java.io.StringWriter;
+import org.jboss.tools.common.meta.XAttribute;
import org.jboss.tools.common.meta.XModelEntity;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.filesystems.FileAuxiliary;
@@ -158,12 +159,12 @@
return super.isSaveable(entity, n, v, dv);
}
- public String getAttribute(Element element, String xmlname) {
+ public String getAttribute(Element element, String xmlname, XAttribute attr) {
int i = xmlname.indexOf('|');
if(i < 0 || xmlname.startsWith("content|")) return super.getAttribute(element, xmlname);
String v = super.getAttribute(element, xmlname.substring(0, i));
return (v != null && v.length() > 0) ? v :
- super.getAttribute(element, xmlname.substring(i + 1));
+ super.getAttribute(element, xmlname.substring(i + 1), attr);
}
public void saveAttribute(Element element, String xmlname, String value) {
15 years, 10 months
JBoss Tools SVN: r14374 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-03-30 11:26:16 -0400 (Mon, 30 Mar 2009)
New Revision: 14374
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java
Log:
JBIDE-4101
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java 2009-03-30 15:23:56 UTC (rev 14373)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java 2009-03-30 15:26:16 UTC (rev 14374)
@@ -18,6 +18,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.w3c.dom.*;
+import org.jboss.tools.common.meta.XAttribute;
import org.jboss.tools.common.meta.XModelEntity;
import org.jboss.tools.common.model.*;
import org.jboss.tools.common.model.loaders.*;
@@ -363,7 +364,7 @@
oldAttributes.put("src", "SRC");
}
- public String getAttribute(Element element, String xmlname) {
+ public String getAttribute(Element element, String xmlname, XAttribute attr) {
if(element == null || xmlname == null) return null;
if(!element.hasAttribute(xmlname)) {
String oldAttribute = xmlname;
@@ -375,7 +376,7 @@
}
}
}
- return super.getAttribute(element, xmlname);
+ return super.getAttribute(element, xmlname, attr);
}
}
15 years, 10 months
JBoss Tools SVN: r14373 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/forms.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-03-30 11:23:56 -0400 (Mon, 30 Mar 2009)
New Revision: 14373
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/forms/TLDFormLayoutData.java
Log:
JBIDE-4101
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/forms/TLDFormLayoutData.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/forms/TLDFormLayoutData.java 2009-03-30 15:22:12 UTC (rev 14372)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/forms/TLDFormLayoutData.java 2009-03-30 15:23:56 UTC (rev 14373)
@@ -60,7 +60,7 @@
for (int i = 0; i < attributes.length; i++) {
if(entity.getAttribute(attributes[i]) != null) list.add(new FormAttributeData(attributes[i]));
}
- list.add(new FormAttributeData("description", InfoLayoutDataFactory.getInstance()));
+ list.add(new FormAttributeData("description", InfoLayoutDataFactory.getHighInstance()));
}
return list.toArray(new FormAttributeData[0]);
@@ -93,10 +93,11 @@
);
static IFormData TAG_GENERAL = new FormData(
- "Tag Description",
+ "Tag Descriptio",
"", // "Description, description, description",
- new FormAttributeData[]{new FormAttributeData("name"), new FormAttributeData("tagclass", null, STBFE_CLASS_NAME), new FormAttributeData("teiclass", null, STBFE_CLASS_NAME), new FormAttributeData("bodycontent"), new FormAttributeData("display-name"), new FormAttributeData("small-icon"), new FormAttributeData("large-icon"), new FormAttributeData("description", InfoLayoutDataFactory.getInstance()), new FormAttributeData("example", InfoLayoutDataFactory.getInstance())}
+ new FormAttributeData[]{new FormAttributeData("name"), new FormAttributeData("tagclass", null, STBFE_CLASS_NAME), new FormAttributeData("teiclass", null, STBFE_CLASS_NAME), new FormAttributeData("bodycontent"), new FormAttributeData("display-name"), new FormAttributeData("small-icon"), new FormAttributeData("large-icon"), new FormAttributeData("description", InfoLayoutDataFactory.getHighInstance()), new FormAttributeData("example", InfoLayoutDataFactory.getInstance())}
);
+
static IFormData[] TAG_DEFINITIONS = new IFormData[] {
TAG_GENERAL,
@@ -198,7 +199,7 @@
new FormData(
"Validator",
"", // "Description, description, description",
- new FormAttributeData[]{new FormAttributeData("validator-class", null, STBFE_CLASS_NAME), new FormAttributeData("description", InfoLayoutDataFactory.getInstance())}
+ new FormAttributeData[]{new FormAttributeData("validator-class", null, STBFE_CLASS_NAME), new FormAttributeData("description", InfoLayoutDataFactory.getHighInstance())}
),
// Tiles Put List Adds Form
new FormData(
15 years, 10 months
JBoss Tools SVN: r14372 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-03-30 11:22:12 -0400 (Mon, 30 Mar 2009)
New Revision: 14372
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/InfoLayoutDataFactory.java
Log:
JBIDE-4101
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/InfoLayoutDataFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/InfoLayoutDataFactory.java 2009-03-30 15:19:40 UTC (rev 14371)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/InfoLayoutDataFactory.java 2009-03-30 15:22:12 UTC (rev 14372)
@@ -20,16 +20,24 @@
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class InfoLayoutDataFactory implements ILayoutDataFactory {
+ int height = 60;
- private static InfoLayoutDataFactory INSTANCE = new InfoLayoutDataFactory();
+ private static InfoLayoutDataFactory INSTANCE = new InfoLayoutDataFactory(60);
- private InfoLayoutDataFactory() {
+ private static InfoLayoutDataFactory HIGH_INSTANCE = new InfoLayoutDataFactory(120);
+
+ private InfoLayoutDataFactory(int height) {
+ this.height = height;
}
public static InfoLayoutDataFactory getInstance() {
return INSTANCE;
}
+ public static InfoLayoutDataFactory getHighInstance() {
+ return HIGH_INSTANCE;
+ }
+
/* (non-Javadoc)
* @see org.jboss.tools.common.model.ui.forms.ILayoutDataFactory#createLayoutData(org.jboss.tools.common.model.ui.forms.AttributeControlType)
*/
@@ -40,7 +48,7 @@
return gd;
} else if(type == AttributeControlType.EDITOR) {
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 60;
+ gd.heightHint = height;
return gd;
}
throw new FormRuntimeException("Attribute control type may be only Label or Editor but this is " + type);
15 years, 10 months