Author: dgolovin
Date: 2010-02-03 13:58:46 -0500 (Wed, 03 Feb 2010)
New Revision: 20110
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5786 revert changes to fix buid compilation
errors. bug is reopened
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java 2010-02-03
15:59:35 UTC (rev 20109)
+++
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java 2010-02-03
18:58:46 UTC (rev 20110)
@@ -10,43 +10,27 @@
******************************************************************************/
package org.jboss.tools.seam.xml.ui.editor.form;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.tools.common.meta.XChild;
-import org.jboss.tools.common.meta.XModelEntity;
-import org.jboss.tools.common.meta.XModelMetaData;
-import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.ui.forms.*;
import org.jboss.tools.seam.xml.components.model.SeamComponentConstants;
public class SeamComponentsFileFormLayoutData implements SeamComponentConstants {
- static IFormData createSeamComponentListDefinition(String parentEntity) {
- XModelMetaData meta = PreferenceModelUtilities.getPreferenceModel().getMetaData();
- XModelEntity entity = meta.getEntity(parentEntity);
- List<String> childEntities = new ArrayList<String>();
- if(entity != null) {
- XChild[] cs = entity.getChildren();
- for (XChild c: cs) {
- XModelEntity e = meta.getEntity(c.getName());
- if(e != null && e.getAttribute(ATTR_NAME) != null &&
e.getAttribute(ATTR_CLASS) != null) {
- childEntities.add(c.getName());
- System.out.println(parentEntity + " " + c.getName());
- }
- }
- }
+ static IFormData SEAM_COMPONENT_LIST_DEFINITION = new FormData(
+ "Components", //$NON-NLS-1$
+ SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
+ new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 40), new
FormAttributeData("class", 60)}, //$NON-NLS-1$
+ new String[]{ENT_SEAM_COMPONENT},
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddComponent")
//$NON-NLS-1$
+ );
+
+ static IFormData SEAM_COMPONENT_20_LIST_DEFINITION = new FormData(
+ "Components", //$NON-NLS-1$
+ SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
+ new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 40), new
FormAttributeData("class", 60)}, //$NON-NLS-1$
+ new String[]{ENT_SEAM_COMPONENT_20},
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddComponent")
//$NON-NLS-1$
+ );
- IFormData result = new FormData(
- "Components", //$NON-NLS-1$
- SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
- new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 40), new
FormAttributeData(ATTR_CLASS, 60)}, //$NON-NLS-1$
- childEntities.toArray(new String[0]),
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddComponent")
//$NON-NLS-1$
- );
- return result;
- }
-
static IFormData getFactoryList(String entity) {
return new FormData(
"Factories", //$NON-NLS-1$
@@ -81,7 +65,7 @@
SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
FormLayoutDataUtil.createGeneralFormAttributeData(ENT_SEAM_COMPONENTS_11)
),
- createSeamComponentListDefinition(ENT_SEAM_COMPONENTS_11),
+ SEAM_COMPONENT_LIST_DEFINITION,
getFactoryList(ENT_SEAM_FACTORY),
getEventList(ENT_SEAM_EVENT)
};
@@ -92,7 +76,7 @@
SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
FormLayoutDataUtil.createGeneralFormAttributeData(ENT_SEAM_COMPONENTS_12)
),
- createSeamComponentListDefinition(ENT_SEAM_COMPONENTS_12),
+ SEAM_COMPONENT_LIST_DEFINITION,
getFactoryList(ENT_SEAM_FACTORY),
getEventList(ENT_SEAM_EVENT)
};
@@ -103,7 +87,7 @@
SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
FormLayoutDataUtil.createGeneralFormAttributeData(ENT_SEAM_COMPONENTS_20)
),
- createSeamComponentListDefinition(ENT_SEAM_COMPONENTS_20),
+ SEAM_COMPONENT_20_LIST_DEFINITION,
getFactoryList(ENT_SEAM_FACTORY_20),
getEventList(ENT_SEAM_EVENT_20),
SEAM_IMPORT_LIST_DEFINITION
@@ -115,7 +99,7 @@
SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
FormLayoutDataUtil.createGeneralFormAttributeData(ENT_SEAM_COMPONENTS_21)
),
- createSeamComponentListDefinition(ENT_SEAM_COMPONENTS_21),
+ SEAM_COMPONENT_20_LIST_DEFINITION,
getFactoryList(ENT_SEAM_FACTORY_20),
getEventList(ENT_SEAM_EVENT_20),
SEAM_IMPORT_LIST_DEFINITION
@@ -127,7 +111,7 @@
SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
FormLayoutDataUtil.createGeneralFormAttributeData(ENT_SEAM_COMPONENTS_22)
),
- createSeamComponentListDefinition(ENT_SEAM_COMPONENTS_22),
+ SEAM_COMPONENT_20_LIST_DEFINITION,
getFactoryList(ENT_SEAM_FACTORY_20),
getEventList(ENT_SEAM_EVENT_20),
SEAM_IMPORT_LIST_DEFINITION