Author: scabanovich
Date: 2007-07-13 03:19:17 -0400 (Fri, 13 Jul 2007)
New Revision: 2420
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamComponentProperties.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamElementProperties.java
Log:
EXIN-218 Annotations @Entity and @Stateful processed in properties.
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamComponentProperties.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamComponentProperties.java 2007-07-13
07:18:24 UTC (rev 2419)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamComponentProperties.java 2007-07-13
07:19:17 UTC (rev 2420)
@@ -41,14 +41,21 @@
ISeamComponent element;
static IPropertyDescriptor[] DESCRIPTORS = {
- NAME_DESCRIPTOR, SCOPE_DESCRIPTOR, CLASS_DESCRIPTOR, PRECEDENCE_DESCRIPTOR
+ NAME_DESCRIPTOR, SCOPE_DESCRIPTOR, CLASS_DESCRIPTOR, PRECEDENCE_DESCRIPTOR,
+ ENTITY_DESCRIPTOR
};
+ static IPropertyDescriptor[] ENTITY_DESCRIPTORS = {
+ NAME_DESCRIPTOR, SCOPE_DESCRIPTOR, CLASS_DESCRIPTOR, PRECEDENCE_DESCRIPTOR,
+ ENTITY_DESCRIPTOR, STATEFUL_DESCRIPTOR
+ };
+
public SeamComponentProperties(ISeamComponent element) {
this.element = element;
}
public IPropertyDescriptor[] getPropertyDescriptors() {
+ if(element != null && element.isEntity()) return ENTITY_DESCRIPTORS;
return DESCRIPTORS;
}
@@ -61,6 +68,10 @@
return element.getClassName();
} else if(PRECEDENCE.equals(id)) {
return Precedence.getStringValue(element.getPrecedence());
+ } if(ENTITY.equals(id)) {
+ return "" + element.isEntity();
+ } if(STATEFUL.equals(id)) {
+ return "" + element.isStateful();
}
return null;
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamElementProperties.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamElementProperties.java 2007-07-13
07:18:24 UTC (rev 2419)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamElementProperties.java 2007-07-13
07:19:17 UTC (rev 2420)
@@ -23,14 +23,18 @@
static String CLASS = "class";
static String PRECEDENCE = "precedence";
static String INSTALLED = "installed";
+
+ static String ENTITY = "entity";
static String STATEFUL = "stateful";
-
static IPropertyDescriptor NAME_DESCRIPTOR = new PropertyDescriptor(NAME, NAME);
static IPropertyDescriptor SCOPE_DESCRIPTOR = new PropertyDescriptor(SCOPE, SCOPE);
static IPropertyDescriptor CLASS_DESCRIPTOR = new PropertyDescriptor(CLASS, CLASS);
static IPropertyDescriptor PRECEDENCE_DESCRIPTOR = new PropertyDescriptor(PRECEDENCE,
PRECEDENCE);
-
+
+ static IPropertyDescriptor ENTITY_DESCRIPTOR = new PropertyDescriptor(ENTITY, ENTITY);
+ static IPropertyDescriptor STATEFUL_DESCRIPTOR = new PropertyDescriptor(STATEFUL,
STATEFUL);
+
public SeamElementProperties() {
}