Author: scabanovich
Date: 2010-05-18 10:37:22 -0400 (Tue, 18 May 2010)
New Revision: 22172
Added:
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-navigation.meta
trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/
trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/
trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components22.xml
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLAllTests.java
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLModelTest.java
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLTestSetup.java
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLTestSuite.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/PropertyListFormLayoutData.java
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/SeamComponentsCoreFormLayoutData.java
trunk/seam/plugins/org.jboss.tools.seam.xml/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/help/keys-seam-menu.properties
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/help/keys-seam.properties
trunk/seam/tests/org.jboss.tools.seam.xml.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.xml.test/build.properties
Log:
https://jira.jboss.org/browse/JBIDE-6224
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/plugin.xml 2010-05-18 13:02:14 UTC (rev
22171)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/plugin.xml 2010-05-18 14:37:22 UTC (rev
22172)
@@ -11,6 +11,7 @@
<meta path="meta/seam-international.meta"/>
<meta path="meta/seam-mail.meta"/>
<meta path="meta/seam-pdf.meta"/>
+ <meta path="meta/seam-navigation.meta"/>
<meta path="meta/seam-persistence.meta"/>
<meta path="meta/seam-theme.meta"/>
<meta path="meta/seam-web.meta"/>
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/help/keys-seam-menu.properties
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/help/keys-seam-menu.properties 2010-05-18
13:02:14 UTC (rev 22171)
+++
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/help/keys-seam-menu.properties 2010-05-18
14:37:22 UTC (rev 22172)
@@ -73,6 +73,8 @@
Seam.AddContextLoader.menu=Context Loader...
Seam.AddTaskDispatcher.menu=Task Dispatcher...
Seam.AddTransaction.menu=Transaction...
+Seam.Navigation.menu=Navigation
+Seam.AddNavigationPages.menu=Navigation Pages...
Seam.Theme.menu=Theme
Seam.AddThemeSelector.menu=Theme Selector...
Seam.Transaction.menu=Transaction
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/help/keys-seam.properties
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/help/keys-seam.properties 2010-05-18
13:02:14 UTC (rev 22171)
+++
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/help/keys-seam.properties 2010-05-18
14:37:22 UTC (rev 22172)
@@ -975,6 +975,9 @@
FileSeamComponents20_AddThemeSelector.WindowTitle=Add Theme Selector
FileSeamComponents20_AddThemeSelector.Title=Seam Theme Selector
+FileSeamComponents20_AddNavigationPages.WindowTitle=Add Navigation Pages
+FileSeamComponents20_AddNavigationPages.Title=Seam Navigation Pages
+
FileSeamComponents20_EditorActionList_AddThemeSelector.WindowTitle=Add Theme Selector
FileSeamComponents20_EditorActionList_AddThemeSelector.Title=Seam Theme Selector
@@ -1317,6 +1320,9 @@
FileSeamComponents21_AddThemeSelector.WindowTitle=Add Theme Selector
FileSeamComponents21_AddThemeSelector.Title=Seam Theme Selector
+FileSeamComponents21_AddNavigationPages.WindowTitle=Add Navigation Pages
+FileSeamComponents21_AddNavigationPages.Title=Seam Navigation Pages
+
FileSeamComponents21_AddEjb.WindowTitle=Add Ejb
FileSeamComponents21_AddEjb.Title=Seam Transaction Ejb
@@ -1413,6 +1419,9 @@
FileSeamComponents22_AddThemeSelector.WindowTitle=Add Theme Selector
FileSeamComponents22_AddThemeSelector.Title=Seam Theme Selector
+FileSeamComponents22_AddNavigationPages.WindowTitle=Add Navigation Pages
+FileSeamComponents22_AddNavigationPages.Title=Seam Navigation Pages
+
FileSeamComponents22_AddEjb.WindowTitle=Add Ejb
FileSeamComponents22_AddEjb.Title=Seam Transaction Ejb
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-navigation.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-navigation.meta
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-navigation.meta 2010-05-18
14:37:22 UTC (rev 22172)
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE XModelEntityGroup PUBLIC "-//Red Hat, Inc.//DTD Meta 1.0//EN"
+ "meta.dtd">
+<XModelEntityGroup>
+ <VERSION DEPENDS="Model:1.0" MODULE="Seam"
VERSION="1.0"/>
+ <MAPPINGS>
+ <MAPPING name="Handlers"/>
+ <MAPPING name="SeamNamespaces">
+ <PAIR name="navigation"
value="http://jboss.com/products/seam/navigation"/>
+ </MAPPING>
+ <MAPPING name="SeamSchemas">
+ <PAIR name="navigation$20"
value="http://jboss.com/products/seam/navigation-2.0.xsd"/>
+ <PAIR name="navigation$21"
value="http://jboss.com/products/seam/navigation-2.1.xsd"/>
+ <PAIR name="navigation$22"
value="http://jboss.com/products/seam/navigation-2.2.xsd"/>
+ </MAPPING>
+ </MAPPINGS>
+ <ICONS>
+ <GROUP name="action">
+ <GROUP name="new">
+ <GROUP name="navigation"/>
+ </GROUP>
+ </GROUP>
+ <GROUP name="main">
+ <GROUP name="seam">
+ <GROUP name="navigation">
+ <ICON name="pages" path="images/struts/plug_in.gif"/>
+ </GROUP>
+ </GROUP>
+ </GROUP>
+ </ICONS>
+ <GlobalActions kind="list"/>
+ <XModelEntity ImplementingClass="%Custom%"
+
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData"
+ XMLSUBPATH="navigation:pages" name="SeamNavigationPages">
+ <XChildrenEntities>
+ <XChildEntity maxCount="1" name="SeamNavigationResources"
required="yes"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.seam.navigation.pages" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="navigation pages"
loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="id=true;category=general"
+ default="org.jboss.seam.navigation.pages" name="name"
xmlname="name"/>
+ <XModelAttributeReference
+ attributes="class,scope,precedence,installed,auto-create"
+ entity="SeamComponent" name="component"/>
+ <XModelAttribute PROPERTIES="category=general"
+ name="no-conversation-view-id"
xmlname="no-conversation-view-id"/>
+ <XModelAttribute PROPERTIES="category=general"
name="login-view-id" xmlname="login-view-id"/>
+ <XModelAttribute PROPERTIES="category=advanced"
name="http-port" xmlname="http-port">
+ <Constraint loader="%IntEL%">
+ <value name="minimum=0"/>
+ </Constraint>
+ <Editor name="Int"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=advanced"
name="https-port" xmlname="https-port">
+ <Constraint loader="%IntEL%">
+ <value name="minimum=0"/>
+ </Constraint>
+ <Editor name="Int"/>
+ </XModelAttribute>
+ <XModelAttribute TRIM="no" name="comment"
visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions"/>
+ <XActionItem ICON="action.empty" displayName="Create"
kind="list" name="EditActions">
+ <XActionItemReference entity="SeamComponent" name="Rename"
path="EditActions/Rename"/>
+ </XActionItem>
+ <XActionItem ICON="action.copy" displayName="Copy"
kind="list" name="CopyActions">
+ <XActionItem BaseActionName="Copy" HandlerClassName="%Copy%"
+ ICON="action.copy" displayName="Copy" kind="action"
name="Copy"/>
+ <XActionItem BaseActionName="Cut" HandlerClassName="%Cut%"
+ ICON="action.cut" displayName="Cut" kind="action"
name="Cut"/>
+ </XActionItem>
+ <XActionItem ICON="action.delete" displayName="Delete"
kind="list" name="DeleteActions">
+ <XActionItem BaseActionName="Delete"
HandlerClassName="%Delete%"
+ ICON="action.delete" displayName="Delete"
kind="action" name="Delete"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" kind="list"
name="Properties">
+ <XActionItem HandlerClassName="%Properties%"
ICON="action.empty"
+ displayName="Properties..." kind="action"
name="Properties"/>
+ </XActionItem>
+ <XActionItem displayName="move" kind="list"
name="MoveActions">
+ <XActionItem HIDE="always" HandlerClassName="%Move%"
+ ICON="action.move" displayName="Move" kind="action"
name="Move"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData;children=%Ordered%;childrenLoader=list;saveDefault=false"
+ XMLSUBPATH="navigation:resources"
name="SeamNavigationResources">
+ <XChildrenEntities>
+ <XChildEntity name="SeamListEntry"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.seam.property" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="resources" loader="ElementType"
name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="id=true;category=general"
+ default="resources" name="name">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute TRIM="no" name="comment"
visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ WizardClassName="%Default%" displayName="Add Entry..."
+ kind="action" name="AddEntry">
+ <EntityData EntityName="SeamListEntry">
+ <AttributeData AttributeName="value"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem ICON="action.empty" displayName="Create"
kind="list" name="EditActions"/>
+ <XActionItem ICON="action.copy" displayName="Copy"
kind="list" name="CopyActions">
+ <XActionItem BaseActionName="Copy" HandlerClassName="%Copy%"
+ ICON="action.copy" displayName="Copy" kind="action"
name="Copy"/>
+ <XActionItem BaseActionName="Cut" HandlerClassName="%Cut%"
+ ICON="action.cut" displayName="Cut" kind="action"
name="Cut"/>
+ <XActionItem BaseActionName="Paste"
HandlerClassName="%Paste%"
+ ICON="action.paste" displayName="Paste" kind="action"
name="Paste"/>
+ </XActionItem>
+ <XActionItem ICON="action.delete" displayName="Delete"
kind="list" name="DeleteActions">
+ <XActionItem BaseActionName="Delete"
HandlerClassName="%Delete%"
+ ICON="action.delete" displayName="Delete"
kind="action" name="Delete"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" kind="list"
name="Properties">
+ <XActionItem HandlerClassName="%Properties%"
ICON="action.empty"
+ displayName="Properties..." kind="action"
name="Properties"/>
+ </XActionItem>
+ <XActionItem displayName="move" kind="list"
name="MoveActions">
+ <XActionItem HIDE="always" HandlerClassName="%Move%"
+ ICON="action.move" displayName="Move" kind="action"
name="Move"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XEntityExtension name="FileSeamComponents20">
+ <XChildrenEntities>
+ <XChildEntity name="SeamNavigationPages"/>
+ </XChildrenEntities>
+ <XActionItem kind="list">
+ <XActionItem ICON="action.empty" displayName="New"
group="1"
+ kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="Navigation"
group="1"
+ kind="list" name="Navigation">
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Navigation Pages..." kind="action"
name="AddNavigationPages">
+ <EntityData EntityName="SeamNavigationPages">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="no-conversation-view-id"
Mandatory="no"/>
+ <AttributeData AttributeName="login-view-id"
Mandatory="no"/>
+ <AttributeData AttributeName="http-port"
Mandatory="no"/>
+ <AttributeData AttributeName="https-port"
Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ </XEntityExtension>
+ <XEntityExtension name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamNavigationPages"/>
+ </XChildrenEntities>
+ <XActionItem kind="list">
+ <XActionItem ICON="action.empty" displayName="New"
group="1"
+ kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="Navigation"
group="1"
+ kind="list" name="Navigation">
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Navigation Pages..." kind="action"
name="AddNavigationPages">
+ <EntityData EntityName="SeamNavigationPages">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="no-conversation-view-id"
Mandatory="no"/>
+ <AttributeData AttributeName="login-view-id"
Mandatory="no"/>
+ <AttributeData AttributeName="http-port"
Mandatory="no"/>
+ <AttributeData AttributeName="https-port"
Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ </XEntityExtension>
+ <XEntityExtension name="FileSeamComponents22">
+ <XChildrenEntities>
+ <XChildEntity name="SeamNavigationPages"/>
+ </XChildrenEntities>
+ <XActionItem kind="list">
+ <XActionItem ICON="action.empty" displayName="New"
group="1"
+ kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="Navigation"
group="1"
+ kind="list" name="Navigation">
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Navigation Pages..." kind="action"
name="AddNavigationPages">
+ <EntityData EntityName="SeamNavigationPages">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="no-conversation-view-id"
Mandatory="no"/>
+ <AttributeData AttributeName="login-view-id"
Mandatory="no"/>
+ <AttributeData AttributeName="http-port"
Mandatory="no"/>
+ <AttributeData AttributeName="https-port"
Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ </XEntityExtension>
+</XModelEntityGroup>
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/PropertyListFormLayoutData.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/PropertyListFormLayoutData.java 2010-05-18
13:02:14 UTC (rev 22171)
+++
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/PropertyListFormLayoutData.java 2010-05-18
14:37:22 UTC (rev 22172)
@@ -33,6 +33,9 @@
static String ENT_RESTRICTIONS = "SeamFrameworkRestrictions"; //$NON-NLS-1$
static String ENT_HINTS = "SeamFrameworkHints"; //$NON-NLS-1$
+ static String ENT_NAVIGATION_PAGES = "SeamNavigationPages"; //$NON-NLS-1$
+ static String ENT_NAVIGATION_RESOURCES = "SeamNavigationResources";
//$NON-NLS-1$
+
static String ENT_THEME_SELECTOR = "SeamThemeSelector"; //$NON-NLS-1$
static String ENT_AVAILABLE_THEMES = "SeamThemeAvailableThemes";
//$NON-NLS-1$
@@ -225,6 +228,23 @@
ENT_FILTER, new String[]{null}, FILTER_DEFINITIONS);
/**
+ * Navigation
+ */
+ private final static IFormData[] NAVIGATION_RESOURCES_DEFINITIONS = new IFormData[] {
+ createListDefinition("Resources") //$NON-NLS-1$
+ };
+
+ final static IFormData NAVIGATION_RESOURCES_FORM_DEFINITION = new FormData(
+ ENT_NAVIGATION_RESOURCES, new String[]{null}, NAVIGATION_RESOURCES_DEFINITIONS);
+
+ private final static IFormData[] NAVIGATION_PAGES_DEFINITIONS =
+ createDefinitionsForListHolder("Navigation Pages", ENT_NAVIGATION_PAGES,
"Resources", "resources"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+ final static IFormData NAVIGATION_PAGES_FORM_DEFINITION = new FormData(
+ ENT_NAVIGATION_PAGES, new String[]{null}, NAVIGATION_PAGES_DEFINITIONS);
+
+
+ /**
* Theme
*/
private final static IFormData[] AVAILABLE_THEMES_DEFINITIONS = new IFormData[] {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/SeamComponentsCoreFormLayoutData.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/SeamComponentsCoreFormLayoutData.java 2010-05-18
13:02:14 UTC (rev 22171)
+++
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/SeamComponentsCoreFormLayoutData.java 2010-05-18
14:37:22 UTC (rev 22172)
@@ -43,6 +43,9 @@
PropertyListFormLayoutData.HINTS_FORM_DEFINITION,
PropertyListFormLayoutData.RESTRICTIONS_FORM_DEFINITION,
+ PropertyListFormLayoutData.NAVIGATION_PAGES_FORM_DEFINITION,
+ PropertyListFormLayoutData.NAVIGATION_RESOURCES_FORM_DEFINITION,
+
PropertyListFormLayoutData.THEME_SELECTOR_FORM_DEFINITION,
PropertyListFormLayoutData.AVAILABLE_THEMES_FORM_DEFINITION,
Modified: trunk/seam/tests/org.jboss.tools.seam.xml.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.xml.test/META-INF/MANIFEST.MF 2010-05-18
13:02:14 UTC (rev 22171)
+++ trunk/seam/tests/org.jboss.tools.seam.xml.test/META-INF/MANIFEST.MF 2010-05-18
14:37:22 UTC (rev 22172)
@@ -3,6 +3,10 @@
Bundle-Name: Seam XML Tests
Bundle-SymbolicName: org.jboss.tools.seam.xml.test;singleton:=true
Bundle-Version: 3.1.0.qualifier
-Require-Bundle: org.eclipse.core.runtime
+Require-Bundle: org.eclipse.core.runtime,
+ org.junit,
+ org.jboss.tools.seam.xml,
+ org.jboss.tools.common.test,
+ org.jboss.tools.tests
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/seam/tests/org.jboss.tools.seam.xml.test/build.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.xml.test/build.properties 2010-05-18 13:02:14
UTC (rev 22171)
+++ trunk/seam/tests/org.jboss.tools.seam.xml.test/build.properties 2010-05-18 14:37:22
UTC (rev 22172)
@@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .
+ .,\
+ projects/
Added: trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components22.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components22.xml
(rev 0)
+++
trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components22.xml 2010-05-18
14:37:22 UTC (rev 22172)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<components
xmlns="http://jboss.com/products/seam/components"
+
xmlns:core="http://jboss.com/products/seam/core"
+
xmlns:framework="http://jboss.com/products/seam/framework"
+
xmlns:navigation="http://jboss.com/products/seam/navigation"
+
xmlns:pdf="http://jboss.com/products/seam/pdf"
+
xmlns:remoting="http://jboss.com/products/seam/remoting"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.com/products/seam/components
http://jboss.com/products/seam/components-2.2.xsd http://jboss.com/products/seam/framework
http://jboss.com/products/seam/framework-2.2.xsd http://jboss.com/products/seam/remoting
http://jboss.com/products/seam/remoting-2.2.xsd http://jboss.com/products/seam/core
http://jboss.com/products/seam/core-2.2.xsd http://jboss.com/products/seam/navigation
http://jboss.com/products/seam/navigation-2.2.xsd http://jboss.com/products/seam/pdf
http://jboss.com/products/seam/pdf-2.2.xsd">
+ <component class="MyCls" name="component1"/>
+ <framework:entity-query name="entityQuery"/>
+ <remoting:remoting poll-interval="1" poll-timeout="2"/>
+ <core:manager/>
+ <navigation:pages http-port="1111" https-port="1112"
+ login-view-id="b.xhtml" no-conversation-view-id="a.xhtml">
+ <navigation:resources>
+ <value>v2</value>
+ </navigation:resources>
+ </navigation:pages>
+ <pdf:document-store name="mypdfStore"/>
+</components>
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components22.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLAllTests.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLAllTests.java
(rev 0)
+++
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLAllTests.java 2010-05-18
14:37:22 UTC (rev 22172)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.xml.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * @author V.Kabanovich
+ *
+ */
+public class SeamXMLAllTests {
+ public static final String PLUGIN_ID = "org.jboss.tools.seam.xml";
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+ suite.setName("All tests for " + PLUGIN_ID);
+ suite.addTest(new SeamXMLTestSetup(SeamXMLTestSuite.suite()));
+
+ return suite;
+ }
+}
\ No newline at end of file
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLAllTests.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLModelTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLModelTest.java
(rev 0)
+++
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLModelTest.java 2010-05-18
14:37:22 UTC (rev 22172)
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.xml.test;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.seam.xml.components.model.SeamComponentConstants;
+
+public class SeamXMLModelTest extends TestCase {
+ IProject project = null;
+
+ public SeamXMLModelTest() {
+ super("Seam Scanner test");
+ project = getTestProject();
+ }
+
+ public IProject getTestProject() {
+ if(project==null) {
+ try {
+ project = findTestProject();
+ if(project==null || !project.exists()) {
+// project = importPreparedProject("/");
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Can't import Seam XML test project: " + e.getMessage());
+ }
+ }
+ return project;
+ }
+
+ public static IProject findTestProject() {
+ return ResourcesPlugin.getWorkspace().getRoot().getProject("Test");
+ }
+
+
+ /**
+ * This test is to check different cases of declaring components in xml.
+ * It does not check interaction of xml declaration with other declarations.
+ */
+ public void testXMLModel() {
+ IFile f = project.getFile(new Path("components22.xml"));
+ assertNotNull("File components22.xml is not found in Test project.", f);
+
+ XModelObject fileObject = EclipseResourceUtil.createObjectForResource(f);
+ assertNotNull("Cannot create XModel object for file components22.xml.",
fileObject);
+
+ String entity = fileObject.getModelEntity().getName();
+ assertEquals("File components22.xml is incorrectly parsed by XModel.",
SeamComponentConstants.ENT_SEAM_COMPONENTS_22, entity);
+
+ //TODO continue test
+ }
+
+ protected XModelObject getComponents22Object() {
+ if(project == null) return null;
+ IFile f = project.getFile(new Path("components22.xml"));
+ return f == null ? null : EclipseResourceUtil.createObjectForResource(f);
+
+ }
+
+ public void testNavigationPagesComponent() {
+ XModelObject fileObject = getComponents22Object();
+ assertNotNull("Cannot create XModel object for file components22.xml.",
fileObject);
+
+ XModelObject navigationPages =
fileObject.getChildByPath("org.jboss.seam.navigation.pages");
+ assertNotNull("Cannot find org.jboss.seam.navigation.pages",
navigationPages);
+
+ XModelObject resources = navigationPages.getChildByPath("resources");
+ assertNotNull("Cannot find resources in org.jboss.seam.navigation.pages",
resources);
+
+ XModelObject[] resourcesList = resources.getChildren();
+ assertEquals(1, resourcesList.length);
+
+ assertAttribute(navigationPages, "no-conversation-view-id",
"a.xhtml");
+ assertAttribute(navigationPages, "login-view-id", "b.xhtml");
+ assertAttribute(navigationPages, "http-port", "1111");
+ assertAttribute(navigationPages, "https-port", "1112");
+
+ }
+
+ protected void assertAttribute(XModelObject object, String name, String value) {
+ String actual = object.getAttributeValue(name);
+ assertEquals("Attribute " + name + " in " +
object.getPresentationString() + " is incorrect.", value, actual);
+ }
+
+}
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLModelTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLTestSetup.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLTestSetup.java
(rev 0)
+++
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLTestSetup.java 2010-05-18
14:37:22 UTC (rev 22172)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.xml.test;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.test.util.xpl.EditorTestHelper;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class SeamXMLTestSetup extends TestSetup {
+
+ protected IProject project;
+
+ public SeamXMLTestSetup(Test test) {
+ super(test);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ project = ResourcesUtils.importProject(
+ "org.jboss.tools.seam.xml.test","/projects/Test" , new
NullProgressMonitor());
+ project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ EditorTestHelper.joinBackgroundActivities();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+ JobUtils.waitForIdle();
+ project.delete(true, true, null);
+ JobUtils.waitForIdle();
+ ResourcesUtils.setBuildAutomatically(saveAutoBuild);
+ }
+}
\ No newline at end of file
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLTestSetup.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLTestSuite.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLTestSuite.java
(rev 0)
+++
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLTestSuite.java 2010-05-18
14:37:22 UTC (rev 22172)
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.xml.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author V. Kabanovich
+ */
+public class SeamXMLTestSuite extends TestSuite {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Seam XML Tests");
+ suite.addTestSuite(SeamXMLModelTest.class);
+ return suite;
+ }
+}
\ No newline at end of file
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLTestSuite.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain