JBoss Tools SVN: r19617 - in trunk/esb/plugins/org.jboss.tools.esb.core: resources/help and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-12-30 09:31:46 -0500 (Wed, 30 Dec 2009)
New Revision: 19617
Added:
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-notifiers.meta
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/NotificationListConverter.java
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/plugin.xml
trunk/esb/plugins/org.jboss.tools.esb.core/resources/help/keys-esb-menu.properties
trunk/esb/plugins/org.jboss.tools.esb.core/resources/help/keys-esb-menu_ja.properties
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/SpecificActionLoader.java
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/ConverterConstants.java
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/ListConverter.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5554
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/plugin.xml 2009-12-30 12:58:50 UTC (rev 19616)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/plugin.xml 2009-12-30 14:31:46 UTC (rev 19617)
@@ -5,6 +5,7 @@
<extension point="org.jboss.tools.common.model.meta">
<meta path="meta/esb.meta"/>
<meta path="meta/esb-actions.meta"/>
+ <meta path="meta/esb-notifiers.meta"/>
<meta path="meta/esb12.meta"/>
</extension>
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/help/keys-esb-menu.properties
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/help/keys-esb-menu.properties 2009-12-30 12:58:50 UTC (rev 19616)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/help/keys-esb-menu.properties 2009-12-30 14:31:46 UTC (rev 19617)
@@ -2,7 +2,7 @@
ESB.AddNotificationList.menu=Add Notification List...
ESB.AddProperty.menu=Add Property...
ESB.AddAlias.menu=Add Alias...
-ESB.CreateTarget.menu=Add Target...
+ESB.CreateTarget.menu=Target...
ESB.CreateTag.menu=Add Tag...
ESB.AddAction.menu=Generic Action...
ESB.AddBus.menu=Add Channel...
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/help/keys-esb-menu_ja.properties
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/help/keys-esb-menu_ja.properties 2009-12-30 12:58:50 UTC (rev 19616)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/help/keys-esb-menu_ja.properties 2009-12-30 14:31:46 UTC (rev 19617)
@@ -2,7 +2,7 @@
ESB.AddNotificationList.menu=Add Notification List...
ESB.AddProperty.menu=\u30D7\u30ED\u30D1\u30C6\u30A3\u30FC\u306E\u8FFD\u52A0...
ESB.AddAlias.menu=\u5225\u540D\u306E\u8FFD\u52A0...
-ESB.CreateTarget.menu=Add Target...
+ESB.CreateTarget.menu=Target...
ESB.CreateTag.menu=\u30BF\u30B0\u306E\u8FFD\u52A0...
ESB.AddAction.menu=Generic Action...
ESB.AddBus.menu=Add Channel...
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2009-12-30 12:58:50 UTC (rev 19616)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2009-12-30 14:31:46 UTC (rev 19617)
@@ -1148,6 +1148,56 @@
<XDependencies/>
</XModelEntity>
<XModelEntity ImplementingClass="%ESB%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;children=%EntityOrdered%"
+ XMLSUBPATH="action" name="ESBPreActionNotifier120">
+ <XChildrenEntities>
+ <XChildEntity name="ESBProperty"/>
+ <XChildEntity name="ESBPreNotificationList120"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.esb.action" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="notifier action" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;id=true;save=always"
+ name="name" xmlname="name"/>
+ <XModelAttribute PROPERTIES="category=general;save=always"
+ default="org.jboss.soa.esb.actions.Notifier" name="class" xmlname="class">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=general"
+ name="ok method" xmlname="okMethod"/>
+ <XModelAttribute PROPERTIES="pre=true;category=general"
+ name="exception method" xmlname="exceptionMethod"/>
+ <XModelAttribute PROPERTIES="category=general" name="process" xmlname="process">
+ <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"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Add Notification List..." kind="action" name="AddNotificationList">
+ <EntityData EntityName="ESBPreNotificationList120">
+ <AttributeData AttributeName="type"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItemReference entity="ESBProperty" name="CopyActions"/>
+ <XActionItemReference entity="ESBProperty" name="DeleteActions"/>
+ <XActionItemReference entity="ESBProperty" name="Properties"/>
+ <XActionItemReference entity="ESBProperty" name="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%ESB%"
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData"
XMLSUBPATH="action" name="ESBPreActionObjectInvoke101">
<XChildrenEntities>
@@ -2679,7 +2729,7 @@
</XModelAttribute>
</XModelAttributes>
<XActionItem kind="list">
- <XActionItem kind="list" name="CreateActions">
+ <XActionItem displayName="New" group="1" kind="list" name="CreateActions">
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
PROPERTIES="entity=ESBPreTarget" WizardClassName="%Default%"
displayName="Add Target..." kind="action" name="CreateTarget">
@@ -2710,6 +2760,65 @@
</XActionItem>
<XDependencies/>
</XModelEntity>
+ <XModelEntity ImplementingClass="%ESB%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;converter=notification2;children=%Ordered%"
+ XMLSUBPATH="NotificationList" name="ESBPreNotificationList120">
+ <XChildrenEntities>
+ <XChildEntity name="ESBPreTarget"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.esb.property" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="notification list" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;id=true;save=always"
+ name="type" xmlname="type"/>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem displayName="New" group="1" kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="entity=ESBPreTarget;validator.add=true"
+ WizardClassName="%Default%" displayName="Generic Target..."
+ kind="action" name="CreateTarget">
+ <EntityData EntityName="ESBPreTarget">
+ <AttributeData AttributeName="class"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem kind="list" name="Target"/>
+ <XActionItem HIDE="always"
+ HandlerClassName="org.jboss.tools.common.meta.action.impl.handlers.ShowMenuHandler"
+ PROPERTIES="actionList=CreateActions" displayName="Target..."
+ kind="action" name="AddAnyTarget"/>
+ </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>
+ <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="org.jboss.tools.esb.core.model.ESBRouteToImpl"
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;converter=path"
@@ -3147,7 +3256,7 @@
<XChildEntity name="ESBPreActionSOAPWiseClient120"/>
<XChildEntity name="ESBPreActionSOAPProxy120"/>
<XChildEntity name="ESBPreActionSystemPrintln101"/>
- <XChildEntity name="ESBPreActionNotifier101"/>
+ <XChildEntity name="ESBPreActionNotifier120"/>
<XChildEntity name="ESBPreActionBusinessRulesProcessor101"/>
<XChildEntity name="ESBPreActionXSLTAction120"/>
<XChildEntity name="ESBPreActionSchemaValidator120"/>
@@ -3284,7 +3393,7 @@
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
PROPERTIES="validator.add=true" WizardClassName="%Default%"
displayName="Notifier..." kind="action" name="AddNotifier">
- <EntityData EntityName="ESBPreActionNotifier101">
+ <EntityData EntityName="ESBPreActionNotifier120">
<AttributeData AttributeName="name"/>
</EntityData>
</XActionItem>
Added: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-notifiers.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-notifiers.meta (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-notifiers.meta 2009-12-30 14:31:46 UTC (rev 19617)
@@ -0,0 +1,343 @@
+<?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="ESB" VERSION="1.0"/>
+ <MAPPINGS/>
+ <ICONS>
+ <GROUP name="action">
+ <GROUP name="new">
+ <GROUP name="esb"/>
+ </GROUP>
+ </GROUP>
+ <GROUP name="main">
+ <GROUP name="esb"/>
+ </GROUP>
+ </ICONS>
+ <GlobalActions kind="list"/>
+ <XModelEntity ImplementingClass="%ESB%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData"
+ XMLSUBPATH="column" name="ESBPreNotifyColumn">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.esb.property" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="column" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;id=true;save=always"
+ name="name" xmlname="name"/>
+ <XModelAttribute PROPERTIES="category=general" name="value"
+ visibility="false" xmlname="value"/>
+ <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="ESBPreAlias" name="CopyActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="DeleteActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="Properties"/>
+ <XActionItemReference entity="ESBPreAlias" name="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%ESB%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData"
+ XMLSUBPATH="ftp" name="ESBPreNotifyFTP">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.esb.property" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="ftp" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;id=true;save=always"
+ name="url" xmlname="URL"/>
+ <XModelAttribute PROPERTIES="category=general" name="file name" xmlname="filename">
+ <Constraint loader="Tree">
+ <value name="ESBResourceTree"/>
+ <value name="linkAction=OpenFile"/>
+ </Constraint>
+ <Editor name="TreeChooser"/>
+ </XModelAttribute>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem
+ HandlerClassName="org.jboss.tools.esb.core.model.handlers.OpenESBResourceHandler"
+ ICON="action.empty" PROPERTIES="actionpath=Open;attribute=file name"
+ displayName="Open File" kind="action" name="OpenFile"/>
+ <XActionItem kind="list" name="CreateActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="CopyActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="DeleteActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="Properties"/>
+ <XActionItemReference entity="ESBPreAlias" name="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%ESB%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData"
+ XMLSUBPATH="file" name="ESBPreNotifyFile">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.esb.property" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="file" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;id=true;save=always"
+ name="uri" xmlname="URI"/>
+ <XModelAttribute PROPERTIES="category=general" name="append"
+ visibility="false" xmlname="append">
+ <Constraint loader="ListString">
+ <value/>
+ <value name="true"/>
+ <value name="false"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </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="ESBPreAlias" name="CopyActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="DeleteActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="Properties"/>
+ <XActionItemReference entity="ESBPreAlias" name="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%ESB%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData"
+ XMLSUBPATH="target" name="ESBPreTargetNotifyConsole">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.esb.property" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="target notify console" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;id=true;save=always"
+ default="NotifyConsole" name="class" xmlname="class">
+ <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 ICON="action.empty" displayName="Create" kind="list" name="EditActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="CopyActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="DeleteActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="Properties"/>
+ <XActionItemReference entity="ESBPreAlias" name="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%ESB%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData"
+ XMLSUBPATH="target" name="ESBPreTargetNotifyFTP">
+ <XChildrenEntities>
+ <XChildEntity name="ESBPreNotifyFTP"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.esb.property" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="target notify FTP" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;id=true;save=always"
+ default="NotifyFTP" name="class" xmlname="class">
+ <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 FTP..." kind="action" name="CreateFTP">
+ <EntityData EntityName="ESBPreNotifyFTP">
+ <AttributeData AttributeName="url"/>
+ <AttributeData AttributeName="file name" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem ICON="action.empty" displayName="Create" kind="list" name="EditActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="CopyActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="DeleteActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="Properties"/>
+ <XActionItemReference entity="ESBPreAlias" name="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%ESB%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData"
+ XMLSUBPATH="target" name="ESBPreTargetNotifyFiles">
+ <XChildrenEntities>
+ <XChildEntity name="ESBPreNotifyFile"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.esb.property" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="target notify files" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;id=true;save=always"
+ default="NotifyFiles" name="class" xmlname="class">
+ <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 File..." kind="action" name="CreateFile">
+ <EntityData EntityName="ESBPreNotifyFile">
+ <AttributeData AttributeName="uri"/>
+ <AttributeData AttributeName="append" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem ICON="action.empty" displayName="Create" kind="list" name="EditActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="CopyActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="DeleteActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="Properties"/>
+ <XActionItemReference entity="ESBPreAlias" name="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%ESB%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData"
+ XMLSUBPATH="target" name="ESBPreTargetNotifySQLTable">
+ <XChildrenEntities>
+ <XChildEntity name="ESBPreNotifyColumn"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.esb.property" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="target notify SQL table"
+ loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general;id=true;save=always"
+ default="NotifySQLTable" name="class" xmlname="class">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="driver class" xmlname="driver-class">
+ <Editor name="AccessibleJava"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="connection url" xmlname="connection-url"/>
+ <XModelAttribute PROPERTIES="category=general" name="user name" xmlname="user-name"/>
+ <XModelAttribute PROPERTIES="category=general" name="password" xmlname="password"/>
+ <XModelAttribute PROPERTIES="category=general" name="table" xmlname="table"/>
+ <XModelAttribute PROPERTIES="category=general" name="data column" xmlname="dataColumn"/>
+ <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"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Add Column..." kind="action" name="CreateColumn">
+ <EntityData EntityName="ESBPreNotifyColumn">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="value" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem ICON="action.empty" displayName="Create" kind="list" name="EditActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="CopyActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="DeleteActions"/>
+ <XActionItemReference entity="ESBPreAlias" name="Properties"/>
+ <XActionItemReference entity="ESBPreAlias" name="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XEntityExtension name="ESBPreNotificationList120">
+ <XChildrenEntities>
+ <XChildEntity maxCount="1" name="ESBPreTargetNotifyConsole"/>
+ <XChildEntity maxCount="1" name="ESBPreTargetNotifyFiles"/>
+ <XChildEntity maxCount="1" name="ESBPreTargetNotifySQLTable"/>
+ <XChildEntity maxCount="1" name="ESBPreTargetNotifyFTP"/>
+ </XChildrenEntities>
+ <XActionItem kind="list">
+ <XActionItem displayName="New" group="1" kind="list" name="CreateActions">
+ <XActionItem kind="list" name="Target">
+ <XActionItem HandlerClassName="%DefaultReplaceUnique%"
+ ICON="action.empty"
+ PROPERTIES="child=NotifyConsole;significanceMessageClass=%Replace%"
+ displayName="Notify Console..." kind="action" name="CreateTargetNotifyConsole">
+ <EntityData EntityName="ESBPreTargetNotifyConsole">
+ <AttributeData AttributeName="class"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem HandlerClassName="%DefaultReplaceUnique%"
+ ICON="action.empty"
+ PROPERTIES="child=NotifyFiles;significanceMessageClass=%Replace%"
+ displayName="Notify Files..." kind="action" name="CreateTargetNotifyFiles">
+ <EntityData EntityName="ESBPreTargetNotifyFiles">
+ <AttributeData AttributeName="class"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem HandlerClassName="%DefaultReplaceUnique%"
+ ICON="action.empty"
+ PROPERTIES="child=NotifyFTP;significanceMessageClass=%Replace%"
+ displayName="Notify FTP..." kind="action" name="CreateTargetNotifyFTP">
+ <EntityData EntityName="ESBPreTargetNotifyFTP">
+ <AttributeData AttributeName="class"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem HandlerClassName="%DefaultReplaceUnique%"
+ ICON="action.empty"
+ PROPERTIES="child=NotifySQLTable;significanceMessageClass=%Replace%"
+ WizardClassName="%Default%" displayName="Notify SQL Table..."
+ kind="action" name="CreateTargetNotifySQLTable">
+ <EntityData EntityName="ESBPreTargetNotifySQLTable">
+ <AttributeData AttributeName="class"/>
+ <AttributeData AttributeName="driver class" Mandatory="no"/>
+ <AttributeData AttributeName="connection url" Mandatory="no"/>
+ <AttributeData AttributeName="user name" Mandatory="no"/>
+ <AttributeData AttributeName="password" Mandatory="no"/>
+ <AttributeData AttributeName="table" Mandatory="no"/>
+ <AttributeData AttributeName="data column" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ </XEntityExtension>
+</XModelEntityGroup>
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java 2009-12-30 12:58:50 UTC (rev 19616)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java 2009-12-30 14:31:46 UTC (rev 19617)
@@ -140,8 +140,15 @@
public String ENT_ESB_CRON_SCHEDULE = "ESBCronSchedule101"; //$NON-NLS-1$
public String ENT_ESB_ROUTE_TO = "ESBPreRouteTo"; //$NON-NLS-1$
- public String ENT_ESB_OBJECT_PATH = "ESBPreObjectPath"; //$NON-NLS-1$
+ public String ENT_ESB_OBJECT_PATH = "ESBPreObjectPath"; //$NON-NLS-1$
+ public String ENT_ESB_NOTIFICATION = "ESBPreNotificationList"; //$NON-NLS-1$
+ public String ENT_ESB_NOTIFICATION_120 = ENT_ESB_NOTIFICATION + SUFF_120;
+ public String ENT_ESB_TARGET = "ESBPreTarget"; //$NON-NLS-1$
+ public String TARGET_NOTIFY_CONSOLE = "NotifyConsole"; //$NON-NLS-1$
+ public String TARGET_NOTIFY_FILES = "NotifyFiles"; //$NON-NLS-1$
+ public String TARGET_NOTIFY_SQL_TABLE = "NotifySQLTable"; //$NON-NLS-1$
+
public String ATTR_NAME = "name"; //$NON-NLS-1$
public String ATTR_VALUE = "value"; //$NON-NLS-1$
public String ATTR_PROPERTY_VALUE_PRESENTATION = "value presentation"; //$NON-NLS-1$
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/SpecificActionLoader.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/SpecificActionLoader.java 2009-12-30 12:58:50 UTC (rev 19616)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/SpecificActionLoader.java 2009-12-30 14:31:46 UTC (rev 19617)
@@ -54,6 +54,7 @@
propertyConverters.put("route", ConverterConstants.ROUTE_CONVERTER);
propertyConverters.put("path", ConverterConstants.OBJECT_PATHS_CONVERTER);
propertyConverters.put("notification", ConverterConstants.NOTIFICATION_CONVERTER);
+ propertyConverters.put("notification2", ConverterConstants.NOTIFICATION_CONVERTER_2);
propertyConverters.put("bpmVar", ConverterConstants.BPM_VAR_CONVERTER);
propertyConverters.put("httpclient", ConverterConstants.ENDPOINT_CONVERTER);
propertyConverters.put("header", ConverterConstants.HEADER_CONVERTER);
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/ConverterConstants.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/ConverterConstants.java 2009-12-30 12:58:50 UTC (rev 19616)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/ConverterConstants.java 2009-12-30 14:31:46 UTC (rev 19617)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.esb.core.model.converters;
+import org.jboss.tools.esb.core.model.ESBConstants;
+
/**
* @author Viacheslav Kabanovich
*/
@@ -26,8 +28,8 @@
String OBJECT_PATHS = "object-paths";
IPropertyConverter OBJECT_PATHS_CONVERTER = new BasicListConverter(OBJECT_PATHS, OBJECT_PATH_ENTITY);
- String NOTIFICATION_ENTITY = "ESBPreNotificationList";
- IPropertyConverter NOTIFICATION_CONVERTER = new BasicListConverter(DESTINATIONS, NOTIFICATION_ENTITY);
+ IPropertyConverter NOTIFICATION_CONVERTER = new BasicListConverter(DESTINATIONS, ESBConstants.ENT_ESB_NOTIFICATION);
+ IPropertyConverter NOTIFICATION_CONVERTER_2 = new NotificationListConverter(DESTINATIONS, ESBConstants.ENT_ESB_NOTIFICATION_120);
String BPM_VAR_ENTITY = "ESBPreBPMVar";
String BPM_VARS = "esbToBpmVars";
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/ListConverter.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/ListConverter.java 2009-12-30 12:58:50 UTC (rev 19616)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/ListConverter.java 2009-12-30 14:31:46 UTC (rev 19617)
@@ -91,8 +91,8 @@
a.addChild(cs[j].copy());
}
} else {
- String toChildEntity = a.getModelEntity().getChildren()[0].getName();
for (int j = 0; j < cs.length; j++) {
+ String toChildEntity = getToChildEntity(cs[j], a.getModelEntity());
XModelObject c = fromAnyElement(cs[j], toChildEntity);
if(c != null) {
a.addChild(c);
@@ -103,6 +103,10 @@
return a;
}
+ protected String getToChildEntity(XModelObject any, XModelEntity parent) {
+ return parent.getChildren()[0].getName();
+ }
+
protected boolean isRelevantTag(String tag, XModelObject object) {
return (object != null && tag != null && tag.equals(object.getModelEntity().getXMLSubPath()));
}
Added: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/NotificationListConverter.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/NotificationListConverter.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/NotificationListConverter.java 2009-12-30 14:31:46 UTC (rev 19617)
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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.esb.core.model.converters;
+
+import java.util.Map;
+
+import org.jboss.tools.common.meta.XModelEntity;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.impl.AnyElementObjectImpl;
+import org.jboss.tools.esb.core.model.ESBConstants;
+
+/**
+ * Class for converting 'destinations' property of out-of-the-box action org.jboss.soa.esb.actions.Notifier
+ * that may have list of child tags <target> with specific structure. Target entity depends on attribute 'class'.
+ *
+ * @author Viacheslav Kabanovich
+ */
+public class NotificationListConverter extends BasicListConverter implements ESBConstants {
+
+ public NotificationListConverter(String propertyName, String itemEntityName) {
+ super(propertyName, itemEntityName);
+ }
+
+ protected String getToChildEntity(XModelObject any, XModelEntity parent) {
+ if(ENT_ESB_NOTIFICATION_120.equals(parent.getName())) {
+ String tag = any.getAttributeValue("tag");
+ if("target".equalsIgnoreCase(tag)) {
+ Map<String, String> attr = toMap(((AnyElementObjectImpl)any).getAttributes());
+ String targetClass = attr.get("class");
+ if(targetClass != null && targetClass.length() > 0) {
+ String result = ENT_ESB_TARGET + targetClass;
+ if(parent.getChild(result) != null) {
+ return result;
+ }
+ }
+ }
+ return ENT_ESB_TARGET;
+ }
+ return super.getToChildEntity(any, parent);
+ }
+}
Property changes on: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/NotificationListConverter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years
JBoss Tools SVN: r19616 - in trunk/jsf/plugins: org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-12-30 07:58:50 -0500 (Wed, 30 Dec 2009)
New Revision: 19616
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSFLinkHyperlink.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFPromptingProvider.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/CompoundPattern.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/JSFUrlPattern.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PostfixUrlPattern.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PrefixUrlPattern.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5577, Resolving JSF mappings was corrected, both jsp and xhtml files will be accepted.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFPromptingProvider.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFPromptingProvider.java 2009-12-30 12:28:51 UTC (rev 19615)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFPromptingProvider.java 2009-12-30 12:58:50 UTC (rev 19616)
@@ -469,16 +469,31 @@
//JSF_GET_PATH
List<Object> getPathAsList(XModel model, String url) {
- String s = getPath(model, url);
- if(s == null) return EMPTY_LIST;
- List<Object> l = new ArrayList<Object>();
- l.add(s);
- return l;
+ /*
+ * Fixes https://jira.jboss.org/jira/browse/JBIDE-5577
+ * List will return all possible paths for url.
+ */
+ List<Object> pathsList = new ArrayList<Object>();
+ JSFWebProject p = JSFWebProject.getInstance(model);
+ if(p == null) {
+ pathsList.add(url);
+ } else {
+ JSFUrlPattern pattern = p.getUrlPattern();
+ if (pattern != null) {
+ pathsList.addAll(pattern.getJSFPaths(url));
+ } else {
+ pathsList.add(url);
+ }
+ }
+ return pathsList;
+
}
String getPath(XModel model, String url) {
JSFWebProject p = JSFWebProject.getInstance(model);
- if(p == null) return url;
+ if(p == null) {
+ return url;
+ }
JSFUrlPattern pattern = p.getUrlPattern();
return (pattern == null) ? url : pattern.getJSFPath(url);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/CompoundPattern.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/CompoundPattern.java 2009-12-30 12:28:51 UTC (rev 19615)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/CompoundPattern.java 2009-12-30 12:58:50 UTC (rev 19616)
@@ -10,6 +10,9 @@
******************************************************************************/
package org.jboss.tools.jsf.web.pattern;
+import java.util.ArrayList;
+import java.util.List;
+
public class CompoundPattern implements JSFUrlPattern {
JSFUrlPattern[] patterns = PatternLoader.DEFAULT_PATTERNS;
@@ -48,5 +51,13 @@
}
return patterns[0].getJSFUrl(path);
}
+
+ /**
+ * Stub implementation
+ * @see org.jboss.tools.jsf.web.pattern.JSFUrlPattern#getJSFPaths(java.lang.String)
+ */
+ public List<String> getJSFPaths(String url) {
+ return new ArrayList<String>();
+ }
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/JSFUrlPattern.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/JSFUrlPattern.java 2009-12-30 12:28:51 UTC (rev 19615)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/JSFUrlPattern.java 2009-12-30 12:58:50 UTC (rev 19616)
@@ -10,9 +10,20 @@
******************************************************************************/
package org.jboss.tools.jsf.web.pattern;
+import java.util.List;
+
public interface JSFUrlPattern {
- public boolean matches(String path);
- public boolean isJSFUrl(String path);
- public String getJSFPath(String url);
- public String getJSFUrl(String path);
+ boolean matches(String path);
+ boolean isJSFUrl(String path);
+ String getJSFPath(String url);
+ String getJSFUrl(String path);
+ /**
+ * Fixes https://jira.jboss.org/jira/browse/JBIDE-5577
+ * <p>
+ * Searches files that could have been mapped to jsf servlet.
+ *
+ * @param url the jsf mapping path
+ * @return the list of possible jsf files
+ */
+ List<String> getJSFPaths(String url);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PostfixUrlPattern.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PostfixUrlPattern.java 2009-12-30 12:28:51 UTC (rev 19615)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PostfixUrlPattern.java 2009-12-30 12:58:50 UTC (rev 19616)
@@ -10,10 +10,19 @@
******************************************************************************/
package org.jboss.tools.jsf.web.pattern;
+import java.util.ArrayList;
+import java.util.List;
+
public class PostfixUrlPattern implements JSFUrlPattern {
protected String postfix = ".jsf";
protected String fileSuffix = ".jsp";
-
+ /*
+ * Fixes https://jira.jboss.org/jira/browse/JBIDE-5577
+ * JSF files could be mapped to xhtml files also.
+ * All of this extensions should be checked.
+ */
+ protected String[] fileExtensions = {".jsp", ".xhtml"};
+
public void setPostfix(String postfix) {
this.postfix = postfix;
}
@@ -22,6 +31,10 @@
fileSuffix = s;
}
+ public void setFileExtentions(String[] fileExtentions) {
+ this.fileExtensions = fileExtentions;
+ }
+
public boolean matches(String path) {
return path.endsWith(postfix);
}
@@ -35,6 +48,20 @@
return (url.endsWith(postfix)) ? url.substring(0, url.length() - postfix.length()) + fileSuffix : url;
}
+ public List<String> getJSFPaths(String url) {
+ List<String> jsfPathsList = new ArrayList<String>();
+ if((url != null) && (url.length() > 0)) {
+ if (url.endsWith(postfix)) {
+ for (String extension : fileExtensions) {
+ jsfPathsList.add(url.substring(0, url.length() - postfix.length()) + extension);
+ }
+ } else {
+ jsfPathsList.add(url);
+ }
+ }
+ return jsfPathsList;
+ }
+
public String getJSFUrl(String path) {
if(path == null || path.length() == 0) return path;
if(!path.endsWith(postfix)) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PrefixUrlPattern.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PrefixUrlPattern.java 2009-12-30 12:28:51 UTC (rev 19615)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PrefixUrlPattern.java 2009-12-30 12:58:50 UTC (rev 19616)
@@ -10,6 +10,9 @@
******************************************************************************/
package org.jboss.tools.jsf.web.pattern;
+import java.util.ArrayList;
+import java.util.List;
+
public class PrefixUrlPattern implements JSFUrlPattern {
protected String prefix = "/faces/";
@@ -37,6 +40,14 @@
return path;
}
+ /**
+ * Stub implementation
+ * @see org.jboss.tools.jsf.web.pattern.JSFUrlPattern#getJSFPaths(java.lang.String)
+ */
+ public List<String> getJSFPaths(String url) {
+ return new ArrayList<String>();
+ }
+
public String toString() {
return "PrefixUrlPattern:" + prefix;
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSFLinkHyperlink.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSFLinkHyperlink.java 2009-12-30 12:28:51 UTC (rev 19615)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSFLinkHyperlink.java 2009-12-30 12:58:50 UTC (rev 19616)
@@ -31,7 +31,6 @@
protected String updateFilenameForModel(String filename, IProject project) {
// Begin of Slava's magic
WebPromptingProvider provider = WebPromptingProvider.getInstance();
-
IModelNature n = EclipseResourceUtil.getModelNature(project);
XModel xModel = n == null ? null : n.getModel();
@@ -50,11 +49,35 @@
}
protected IFile getFileFromProject(String fileName) {
+ IFile fileFromProject = null;
IFile documentFile = getFile();
- if(documentFile == null) return null;
+ if(documentFile == null) {
+ return null;
+ }
+ IProject project = documentFile.getProject();
+ /*
+ * Fixes https://jira.jboss.org/jira/browse/JBIDE-5577
+ * Get existed file from the project.
+ * There could be several files, the first one will be returned.
+ */
+ WebPromptingProvider provider = WebPromptingProvider.getInstance();
+ IModelNature n = EclipseResourceUtil.getModelNature(project);
+ XModel xModel = n == null ? null : n.getModel();
+ if (xModel != null) {
+ List<Object> list = provider.getList(xModel, WebPromptingProvider.JSF_GET_PATH, fileName, null);
+ if ((list != null) && (list.size() > 0)) {
+ for (Object realFileName : list) {
+ if (realFileName instanceof String) {
+ fileFromProject = super.getFileFromProject((String)realFileName);
+ if (fileFromProject != null) {
+ break;
+ }
+ }
+ }
+ }
+ }
- IProject project = documentFile.getProject();
- return super.getFileFromProject(updateFilenameForModel(fileName, project));
+ return fileFromProject;
}
}
\ No newline at end of file
15 years
JBoss Tools SVN: r19615 - trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-12-30 07:28:51 -0500 (Wed, 30 Dec 2009)
New Revision: 19615
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/ELExprPartitionerTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4758
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/ELExprPartitionerTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/ELExprPartitionerTest.java 2009-12-30 11:55:45 UTC (rev 19614)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/ELExprPartitionerTest.java 2009-12-30 12:28:51 UTC (rev 19615)
@@ -20,7 +20,6 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentExtension3;
import org.eclipse.jface.text.ITypedRegion;
@@ -54,12 +53,6 @@
provider = new TestProjectProvider("org.jboss.tools.jsf.text.ext.test", null, PROJECT_NAME, makeCopy);
project = provider.getProject();
Throwable exception = null;
-// try {
-// project.refreshLocal(IResource.DEPTH_INFINITE, null);
-// } catch (Exception x) {
-// exception = x;
-// x.printStackTrace();
-// }
assertNull("An exception caught: " + (exception != null? exception.getMessage() : ""), exception);
}
@@ -95,7 +88,7 @@
}
assertNull("An exception caught: " + (exception != null? exception.getMessage() : ""), exception);
- assertTrue("The document provider for the file \"" + PAGE_NAME + "\" is not loaded", (documentProvider != null));
+ assertNotNull("The document provider for the file \"" + PAGE_NAME + "\" is not loaded", documentProvider);
try {
documentProvider.connect(editorInput);
@@ -108,7 +101,7 @@
IDocument document = documentProvider.getDocument(editorInput);
- assertTrue("The document for the file \"" + PAGE_NAME + "\" is not loaded", (document != null));
+ assertNotNull("The document for the file \"" + PAGE_NAME + "\" is not loaded", document);
IStructuredModel model = null;
if (document instanceof IStructuredDocument) {
@@ -118,7 +111,7 @@
EditorModelUtil.addFactoriesTo(model);
}
- assertTrue("The document model for the file \"" + PAGE_NAME + "\" is not loaded", (model != null));
+ assertNotNull("The document model for the file \"" + PAGE_NAME + "\" is not loaded", model);
JSPExprHyperlinkPartitioner elPartitioner = new JSPExprHyperlinkPartitioner();
@@ -132,30 +125,36 @@
regionList.add(new Region(972, 18));
regionList.add(new Region(1041, 17));
recognitionTest.put("org.jboss.tools.common.text.ext.jsp.JSP_BUNDLE", regionList);
+
regionList = new ArrayList<Region>();
regionList.add(new Region(859, 11));
regionList.add(new Region(871, 16));
recognitionTest.put("org.jboss.tools.common.text.ext.jsp.JSP_BEAN", regionList);
+
regionList = new ArrayList<Region>();
regionList.add(new Region(859, 11));
regionList.add(new Region(871, 16));
recognitionTest.put("org.jboss.tools.seam.text.ext.SEAM_BEAN", regionList);
+
regionList = new ArrayList<Region>();
- regionList.add(new Region(639, 1));
- regionList.add(new Region(722, 1));
- regionList.add(new Region(831, 1));
- regionList.add(new Region(933, 1));
- regionList.add(new Region(990, 1));
- regionList.add(new Region(1058, 1));
+
+ regionList.add(new Region(859, 11));
+ regionList.add(new Region(870, 16));
+ regionList.add(new Region(886, 1));
+
recognitionTest.put("org.jboss.tools.common.text.ext.jsp.JSP_EXPRESSION", regionList);
+ regionList = new ArrayList<Region>();
+ regionList.add(new Region(859, 11));
+ regionList.add(new Region(871, 16));
+ recognitionTest.put("org.jboss.tools.common.text.ext.jsp.EXPRESSION", regionList);
+
int counter = 0;
for (int i = 0; i < document.getLength(); i++) {
TestData testData = new TestData(document, i);
boolean recognized = elPartitioner.recognize(testData.document, testData.getHyperlinkRegion());
if (recognized) {
String childPartitionType = elPartitioner.getChildPartitionType(testData.document, testData.getHyperlinkRegion());
-
if (childPartitionType != null) {
ArrayList<Region> test = (ArrayList<Region>)recognitionTest.get(childPartitionType);
boolean testResult = false;
@@ -209,14 +208,13 @@
testResult = true;
}
}
- assertTrue("Wrong recognition for the region: " + testData.getHyperlinkRegion().toString()
- + " matches the wrong region [" + r.getOffset() + "-" + (r.getOffset() + r.getLength()) + "]" , (testResult == false));
+ assertFalse("Wrong recognition for the region: " + testData.getHyperlinkRegion().toString()
+ + " matches the wrong region [" + r.getOffset() + "-" + (r.getOffset() + r.getLength()) + "]" , testResult);
}
}
- assertTrue("Wrong recognized region count: " + counter
- + " (must be 137)" , (counter == 137));
-
+ assertEquals("Wrong recognized region count: ", 132, counter);
+
model.releaseFromEdit();
documentProvider.disconnect(editorInput);
15 years
JBoss Tools SVN: r19614 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test: jbide and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-12-30 06:55:45 -0500 (Wed, 30 Dec 2009)
New Revision: 19614
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestOpenOnForXhtmlFiles_JBIDE5577.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5577, JUnit test for openOn was added.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-12-30 10:34:10 UTC (rev 19613)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-12-30 11:55:45 UTC (rev 19614)
@@ -75,6 +75,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.MozDirtyTest_JBIDE5105;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.NullPointerWithStyleProperty_JBIDE5193;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.TestForUsingComponentsLibrariesWithDefaultNamespace;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.TestOpenOnForXhtmlFiles_JBIDE5577;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.VpeI18nTest_JBIDE4887;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JsfJbide1467Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JsfJbide1501Test;
@@ -184,6 +185,7 @@
suite.addTestSuite(OpenOnInsideJspRoot_JBIDE4852.class);
suite.addTestSuite(NullPointerWithStyleProperty_JBIDE5193.class);
suite.addTestSuite(TestFViewLocaleAttribute_JBIDE5218.class);
+ suite.addTestSuite(TestOpenOnForXhtmlFiles_JBIDE5577.class);
// $JUnit-END$
// added by Max Areshkau
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestOpenOnForXhtmlFiles_JBIDE5577.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestOpenOnForXhtmlFiles_JBIDE5577.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestOpenOnForXhtmlFiles_JBIDE5577.java 2009-12-30 11:55:45 UTC (rev 19614)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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 org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.util.SelectionUtil;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.w3c.dom.Node;
+
+/**
+ * Checks that openOn will correctly resolve JSF page mapping.
+ *
+ * @author dmaliarevich
+ */
+public class TestOpenOnForXhtmlFiles_JBIDE5577 extends VpeTest {
+
+ public TestOpenOnForXhtmlFiles_JBIDE5577(String name) {
+ super(name);
+ }
+
+ public void testOpenOnForXhtmlFiles() throws CoreException {
+ /*
+ * Open index.html
+ */
+ IFile file = (IFile) TestUtil.getWebContentPath("index.html", JsfAllTests.IMPORT_JSF_20_PROJECT_NAME); //$NON-NLS-1$
+ assertNotNull("Could not find the file for the editor", file); //$NON-NLS-1$
+ IEditorInput input = new FileEditorInput(file);
+ assertNotNull("Editor input is null", input); //$NON-NLS-1$
+ JSPMultiPageEditor part = openEditor(input);
+ VpeController vpeController = TestUtil.getVpeController(part);
+
+ /*
+ * Make openOn action an <a> tag.
+ */
+ int position = TestUtil.getLinePositionOffcet(vpeController.getSourceEditor().getTextViewer(), 7, 29);
+ Node sourceNode = SelectionUtil.getNodeBySourcePosition(vpeController.getSourceEditor(), position);
+ nsIDOMNode domNode = vpeController.getDomMapping().getNearVisualNode(sourceNode);
+ vpeController.getSourceBuilder().openOn(domNode);
+ IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ assertEquals("head2.xhtml file should be opened","head2.xhtml", activeEditor.getEditorInput().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+}
15 years
JBoss Tools SVN: r19613 - in trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test: .settings and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-12-30 05:34:10 -0500 (Wed, 30 Dec 2009)
New Revision: 19613
Added:
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/.jsdtscope
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.jdt.core.prefs
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.common.component
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.jsdt.ui.superType.name
Log:
JBIDE-5586: Fix JstJspAllTests CA-related issue
JsfJspJbide1813Test is fixed
Added: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/.jsdtscope
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/.jsdtscope (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/.jsdtscope 2009-12-30 10:34:10 UTC (rev 19613)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebContent"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.jdt.core.prefs 2009-12-30 10:34:10 UTC (rev 19613)
@@ -0,0 +1,7 @@
+#Wed May 20 19:58:57 MSD 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Property changes on: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.common.component 2009-12-30 10:34:10 UTC (rev 19613)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="JsfJspJbide1813Test">
+<wb-resource deploy-path="/" source-path="/WebContent"/>
+<wb-resource deploy-path="/WEB-INF/classes" source-path="/JavaSource"/>
+<property name="context-root" value="JsfJspJbide1813Test"/>
+<property name="java-output-path"/>
+</wb-module>
+</project-modules>
Added: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.common.project.facet.core.xml 2009-12-30 10:34:10 UTC (rev 19613)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 4.2 Runtime"/>
+ <fixed facet="jst.web"/>
+ <fixed facet="jst.java"/>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="jst.web" version="2.5"/>
+</faceted-project>
Property changes on: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.jsdt.ui.superType.container 2009-12-30 10:34:10 UTC (rev 19613)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.settings/org.eclipse.wst.jsdt.ui.superType.name 2009-12-30 10:34:10 UTC (rev 19613)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
15 years
JBoss Tools SVN: r19612 - trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1807Test/.settings.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-12-30 04:22:30 -0500 (Wed, 30 Dec 2009)
New Revision: 19612
Modified:
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1807Test/.settings/org.eclipse.wst.common.component
Log:
JBIDE-5586: Fix JstJspAllTests CA-related issue
JsfJspJbide1807Test is fixed
Modified: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1807Test/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1807Test/.settings/org.eclipse.wst.common.component 2009-12-30 09:16:44 UTC (rev 19611)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1807Test/.settings/org.eclipse.wst.common.component 2009-12-30 09:22:30 UTC (rev 19612)
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
-<wb-module deploy-name="JsfJspJbide1813Test">
+<wb-module deploy-name="JsfJspJbide1807Test">
<wb-resource deploy-path="/" source-path="/WebContent"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/JavaSource"/>
-<property name="context-root" value="JsfJspJbide1813Test"/>
+<property name="context-root" value="JsfJspJbide1807Test"/>
<property name="java-output-path"/>
</wb-module>
</project-modules>
15 years
JBoss Tools SVN: r19611 - in trunk/jsf: plugins/org.jboss.tools.jsf.vpe.jsf/templates and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-12-30 04:16:44 -0500 (Wed, 30 Dec 2009)
New Revision: 19611
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstarctLinkJsfTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfLinkTemplate.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/ajax.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/button.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/button.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/event.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/link.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/link.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/metadata.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/validateBean.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/validateRequired.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/viewParam.xhtml
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCommandLinkTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2820
Templates and JUnit tests for the following tags have been added:
h:button
h:link
f:ajax
f:event
f:validateBean
f:validateRequired
f:viewParam
f:metadata
Copied: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstarctLinkJsfTemplate.java (from rev 19552, trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCommandLinkTemplate.java)
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstarctLinkJsfTemplate.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstarctLinkJsfTemplate.java 2009-12-30 09:16:44 UTC (rev 19611)
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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 org.jboss.tools.jsf.vpe.jsf.template;
+
+import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * Abstract template for h:link and h:commandLink
+ *
+ * @author Dzmitry Sakovich (dsakovich(a)exadel.com)
+ *
+ */
+public abstract class AbstarctLinkJsfTemplate extends AbstractOutputJsfTemplate {
+
+ private static final String H_FORM = "h:form"; //$NON-NLS-1$
+ private static final String A4J_FORM = "a4j:form"; //$NON-NLS-1$
+ private static final String OUTSIDE_FORM_TEXT = ": This link is disabled as it is not nested within a JSF form."; //$NON-NLS-1$
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+
+ Element element = (Element) sourceNode;
+ nsIDOMElement parentElement;
+
+ boolean disabled = ComponentUtil.string2boolean(ComponentUtil
+ .getAttribute(element, HTML.ATTR_DISABLED));
+ String value = ComponentUtil.getAttribute(element, HTML.ATTR_VALUE);
+ boolean hasParentForm = hasParentForm(pageContext, element);
+
+ if (!hasParentForm) {
+ parentElement = VisualDomUtil.createBorderlessContainer(visualDocument);
+ } else if (disabled) {
+ parentElement = VisualDomUtil.createBorderlessContainer(visualDocument);
+ } else {
+ parentElement = visualDocument.createElement(HTML.TAG_A);
+ }
+
+ // copy attributes
+ copyOutputJsfAttributes(parentElement, element);
+
+ VpeCreationData creationData;
+ if (!hasParentForm) {
+ nsIDOMElement topSpan = VisualDomUtil.createBorderlessContainer(visualDocument);
+ nsIDOMElement noteSpan = VisualDomUtil.createBorderlessContainer(visualDocument);
+ noteSpan.appendChild(visualDocument.createTextNode(OUTSIDE_FORM_TEXT));
+ topSpan.appendChild(parentElement);
+ topSpan.appendChild(noteSpan);
+ creationData = new VpeCreationData(topSpan);
+ } else {
+ creationData = new VpeCreationData(parentElement);
+ }
+
+ VpeChildrenInfo linkInfo = new VpeChildrenInfo(parentElement);
+ creationData.addChildrenInfo(linkInfo);
+
+ for (Node child : ComponentUtil.getChildren(element)) {
+ linkInfo.addSourceChild(child);
+ }
+ if (ComponentUtil.isNotBlank(value)) {
+ parentElement.appendChild(visualDocument.createTextNode(value));
+ }
+ return creationData;
+
+ }
+
+ private boolean hasParentForm(VpePageContext pageContext, Element sourceElement) {
+ Node parent = sourceElement.getParentNode();
+ while (parent != null && parent instanceof Element && parent.getNodeName() != null) {
+ String parentTemplateName = VpeTemplateManager.getInstance().getTemplateName(pageContext, parent);
+ if (H_FORM.equals(parentTemplateName)
+ || A4J_FORM.equals(parentTemplateName)) {
+ return true;
+ }
+ parent = parent.getParentNode();
+ }
+ return false;
+ }
+
+ @Override
+ public boolean recreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
+ return true;
+ }
+
+}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCommandLinkTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCommandLinkTemplate.java 2009-12-29 22:10:15 UTC (rev 19610)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCommandLinkTemplate.java 2009-12-30 09:16:44 UTC (rev 19611)
@@ -1,104 +1,19 @@
-/*******************************************************************************
- * Copyright (c) 2007-2008 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 org.jboss.tools.jsf.vpe.jsf.template;
-
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
-import org.jboss.tools.vpe.editor.context.VpePageContext;
-import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
-import org.jboss.tools.vpe.editor.template.VpeCreationData;
-import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
-import org.jboss.tools.vpe.editor.util.HTML;
-import org.jboss.tools.vpe.editor.util.VisualDomUtil;
-import org.mozilla.interfaces.nsIDOMDocument;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * Template for jsf tag commandLink
- *
- * @author Dzmitry Sakovich (dsakovich(a)exadel.com)
- *
- */
-public class JsfCommandLinkTemplate extends AbstractOutputJsfTemplate {
-
- private static final String H_FORM = "h:form"; //$NON-NLS-1$
- private static final String A4J_FORM = "a4j:form"; //$NON-NLS-1$
- private static final String OUTSIDE_FORM_TEXT = ": This link is disabled as it is not nested within a JSF form."; //$NON-NLS-1$
-
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
- nsIDOMDocument visualDocument) {
-
- Element element = (Element) sourceNode;
- nsIDOMElement parentElement;
-
- boolean disabled = ComponentUtil.string2boolean(ComponentUtil
- .getAttribute(element, HTML.ATTR_DISABLED));
- String value = ComponentUtil.getAttribute(element, HTML.ATTR_VALUE);
- boolean hasParentForm = hasParentForm(pageContext, element);
-
- if (!hasParentForm) {
- parentElement = VisualDomUtil.createBorderlessContainer(visualDocument);
- } else if (disabled) {
- parentElement = VisualDomUtil.createBorderlessContainer(visualDocument);
- } else {
- parentElement = visualDocument.createElement(HTML.TAG_A);
- }
-
- // copy attributes
- copyOutputJsfAttributes(parentElement, element);
-
- VpeCreationData creationData;
- if (!hasParentForm) {
- nsIDOMElement topSpan = VisualDomUtil.createBorderlessContainer(visualDocument);
- nsIDOMElement noteSpan = VisualDomUtil.createBorderlessContainer(visualDocument);
- noteSpan.appendChild(visualDocument.createTextNode(OUTSIDE_FORM_TEXT));
- topSpan.appendChild(parentElement);
- topSpan.appendChild(noteSpan);
- creationData = new VpeCreationData(topSpan);
- } else {
- creationData = new VpeCreationData(parentElement);
- }
-
- VpeChildrenInfo linkInfo = new VpeChildrenInfo(parentElement);
- creationData.addChildrenInfo(linkInfo);
-
- for (Node child : ComponentUtil.getChildren(element)) {
- linkInfo.addSourceChild(child);
- }
- if (ComponentUtil.isNotBlank(value)) {
- parentElement.appendChild(visualDocument.createTextNode(value));
- }
- return creationData;
-
- }
-
- private boolean hasParentForm(VpePageContext pageContext, Element sourceElement) {
- Node parent = sourceElement.getParentNode();
- while (parent != null && parent instanceof Element && parent.getNodeName() != null) {
- String parentTemplateName = VpeTemplateManager.getInstance().getTemplateName(pageContext, parent);
- if (H_FORM.equals(parentTemplateName)
- || A4J_FORM.equals(parentTemplateName)) {
- return true;
- }
- parent = parent.getParentNode();
- }
- return false;
- }
-
- @Override
- public boolean recreateAtAttrChange(VpePageContext pageContext,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement visualNode, Object data, String name, String value) {
- return true;
- }
-
-}
+/*******************************************************************************
+ * 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 org.jboss.tools.jsf.vpe.jsf.template;
+
+/**
+ * Template for h:commandLink
+ *
+ * @author Yahor Radtsevich (yradtsevich)
+ */
+public class JsfCommandLinkTemplate extends AbstarctLinkJsfTemplate {
+}
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfLinkTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfLinkTemplate.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfLinkTemplate.java 2009-12-30 09:16:44 UTC (rev 19611)
@@ -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 org.jboss.tools.jsf.vpe.jsf.template;
+
+/**
+ * Template for h:link
+ *
+ * @author yradtsevich
+ */
+public class JsfLinkTemplate extends AbstarctLinkJsfTemplate {
+}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2009-12-29 22:10:15 UTC (rev 19610)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2009-12-30 09:16:44 UTC (rev 19611)
@@ -832,6 +832,32 @@
<vpe:template children="no" modify="no" />
</vpe:tag>
+ <!-- JSF 2.0 Core Tags -->
+ <vpe:tag name="f:ajax" case-sensitive="yes">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:event" case-sensitive="yes">
+ <vpe:template children="yes" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:validateBean" case-sensitive="yes">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:validateRequired" case-sensitive="yes">
+ <vpe:template children="yes" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:viewParam" case-sensitive="yes">
+ <vpe:template children="yes" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:metadata" case-sensitive="yes">
+ <vpe:template children="yes" modify="no" />
+ </vpe:tag>
+ <!-- End of JSF 2.0 Core Tags -->
+
<vpe:tag name="h:message">
<vpe:template children="no" modify="no">
<ul class="{@styleClass}" style="{@style}">
@@ -860,7 +886,7 @@
</vpe:template>
</vpe:tag>
- <!-- JSF 2.0 Tags -->
+ <!-- JSF 2.0 HTML Tags -->
<vpe:tag name="h:body" case-sensitive="yes">
<!-- The tag cannot have any attribute. -->
<!-- Checks for min tld version has been comented,
@@ -925,18 +951,155 @@
</vpe:template>
<!-- </vpe:if> -->
</vpe:tag>
- <!-- End of JSF 2.0 Tags -->
+ <vpe:tag name="h:button" case-sensitive="yes">
+ <!-- This is a very big if-statement.
+ Its goal is to add support of 'disabled property'
+ DO NOT FORGET TO EDIT 'ELSE' PART IN FUTURE MODIFICATIONS -->
+ <vpe:if test="(@disabled='true')">
+ <vpe:if test="not(attrpresent('image'))">
+ <vpe:if test="(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="button" value="{iif(@value='',' ',jsfvalue(@value))}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"
+ disabled='disabled'/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <vpe:if test="not(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="{@type}" value="{iif(@value='',' ',jsfvalue(@value))}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"
+ disabled='disabled'/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ </vpe:if>
+ <vpe:if test="attrpresent('image')">
+ <vpe:template children="no" modify="no">
+ <input type="image" src="{src(@image)}"
+ class="{@styleClass}" style="{@style}" title="{tagstring()}"
+ disabled='disabled'/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ </vpe:if>
+ <!--else-->
+ <vpe:if test="not(attrpresent('image'))">
+ <vpe:if test="(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="button" value="{iif(@value='',' ',jsfvalue(@value))}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <vpe:if test="not(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="{@type}" value="{iif(@value='',' ',jsfvalue(@value))}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ </vpe:if>
+ <vpe:if test="attrpresent('image')">
+ <vpe:template children="no" modify="no">
+ <input type="image" src="{src(@image)}"
+ class="{@styleClass}" style="{@style}" title="{tagstring()}" />
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <!--end-of-else-->
+ </vpe:tag>
+
+ <vpe:tag name="h:link" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.jsf.template.JsfLinkTemplate">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="outputText" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormatting>
+ <vpe:format type="BoldFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ItalicFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontNameFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontSizeFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BackgroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ForegroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ </vpe:textFormatting>
+ <vpe:pseudoContent />
+ </vpe:template>
+ </vpe:tag>
+ <!-- End of JSF 2.0 HTML Tags -->
+
<!-- Jsf 2.0 composite tags -->
<vpe:tag name="composite:implementation" case-sensitive="yes">
<!-- Checks for min tld version has been comented,
- becouse it's not specified correctly in jsf lib, mareshkau -->
- <!-- <vpe:if test="tld_version('min=2.0')"> -->
+ becouse it's not specified correctly in jsf lib, mareshkau
+ <vpe:if test="tld_version('min=2.0')"> -->
<vpe:template children="yes" modify="yes"
class="org.jboss.tools.jsf.vpe.facelets.template.VpeCompositionTemplate"
namespaceIdentifier="org.jboss.tools.jsf.vpe.facelets">
</vpe:template>
-<!-- </vpe:if>-->
+<!-- </vpe:if>-->
</vpe:tag>
<vpe:tag name="composite:interface" case-sensitive="yes">
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/ajax.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/ajax.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/ajax.xhtml 2009-12-30 09:16:44 UTC (rev 19611)
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<f:view contentType="text/html"/>
+<h:head/>
+<h:body>
+ <h:form>
+ <h:inputText value="#{calc.query}" id="query">
+ <f:ajax id="ajax1" event="keyup" render="result" listener="#{calc.evaluate}"/>
+ </h:inputText>
+ </h:form>
+</h:body>
+</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/button.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/button.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/button.xhtml 2009-12-30 09:16:44 UTC (rev 19611)
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<f:view contentType="text/html"/>
+<h:head>
+ <style>
+ .redClass {
+ color: red;
+ }
+ </style>
+</h:head>
+<h:body>
+ <h:form>
+ <h:button value="button" id="button1" />
+ <h:button value="button1" id="button2" type="button" />
+ <h:button value="button3" id="button3" type="reset" />
+ <h:button value="button4" id="button4" type="submit" />
+ <h:button value="button5" id="button5" image="" />
+ <h:button value="button6" id="button6" styleClass="redClass" style="font-style:italic;" />
+ </h:form>
+</h:body>
+</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/button.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/button.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/button.xhtml.xml 2009-12-30 09:16:44 UTC (rev 19611)
@@ -0,0 +1,20 @@
+<tests>
+ <test id="button1">
+ <input type="button" value="button"/>
+ </test>
+ <test id="button2">
+ <input type="button" value="button1" />
+ </test>
+ <test id="button3">
+ <input type="reset" value="button3" />
+ </test>
+ <test id="button4">
+ <input type="submit" value="button4" />
+ </test>
+ <test id="button5">
+ <input type="image" SRC="/.*ve/unresolved_image.gif/" />
+ </test>
+ <test id="button6">
+ <INPUT TYPE="button" CLASS="redClass" STYLE="/.*font-style: italic;.*/" VALUE="button6"/>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/event.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/event.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/event.xhtml 2009-12-30 09:16:44 UTC (rev 19611)
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<f:view contentType="text/html"/>
+<h:head/>
+<h:body>
+ <h:form>
+ <h:inputText value="#{calc.query}" id="query">
+ <f:event id="event1" type="preValidate" listener="#{calc.preValidateQuery}"/>
+ </h:inputText>
+ </h:form>
+</h:body>
+</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/link.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/link.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/link.xhtml 2009-12-30 09:16:44 UTC (rev 19611)
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<f:view contentType="text/html"/>
+<h:head>
+ <style>
+ .redClass {
+ color: red;
+ }
+ </style>
+</h:head>
+<h:body>
+ <h:form>
+ <h:link id="link1" value="link1" disabled="true" />
+ <h:link id="link2" value="link2" disabled="false" />
+ <h:link id="link3" value="link3" styleClass="redClass" style="font-style:italic;"/>
+ <h:link id="link4" value="link3" rendered="false"/>
+ </h:form>
+</h:body>
+</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/link.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/link.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/link.xhtml.xml 2009-12-30 09:16:44 UTC (rev 19611)
@@ -0,0 +1,11 @@
+<tests>
+ <test id="link1">
+ <span CLASS="vpe-text">link1</span>
+ </test>
+ <test id="link2">
+ <a>link2</a>
+ </test>
+ <test id="link3">
+ <A STYLE="font-style: italic;" CLASS="redClass">link3</A>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/metadata.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/metadata.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/metadata.xhtml 2009-12-30 09:16:44 UTC (rev 19611)
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<f:view contentType="text/html"/>
+<h:head/>
+<h:body>
+ <f:metadata id="metadata1"/>
+ <h:form>
+ <h:link value="h:link" alt="h:linkALTTEXT" includeViewParams="true"/>
+ </h:form>
+</h:body>
+</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/validateBean.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/validateBean.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/validateBean.xhtml 2009-12-30 09:16:44 UTC (rev 19611)
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<f:view contentType="text/html"/>
+<h:head/>
+<h:body>
+ <h:form>
+ <h:inputText value="#{calc.query}" id="query">
+ <f:validateBean id="validateBean1" binding="#{calcValidator}"/>
+ </h:inputText>
+ </h:form>
+</h:body>
+</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/validateRequired.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/validateRequired.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/validateRequired.xhtml 2009-12-30 09:16:44 UTC (rev 19611)
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<f:view contentType="text/html"/>
+<h:head/>
+<h:body>
+ <h:form>
+ <h:inputText value="#{calc.query}" id="query">
+ <f:validateRequired id="validateRequired1"/>
+ </h:inputText>
+ </h:form>
+</h:body>
+</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/viewParam.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/viewParam.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/viewParam.xhtml 2009-12-30 09:16:44 UTC (rev 19611)
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<f:view contentType="text/html"/>
+<h:head/>
+<h:body>
+ <f:metadata>
+ <f:viewParam id="viewParam1" name="viewParam1" value="viewParamValue1" />
+ <f:viewParam name="viewParam2" value="viewParamValue2" />
+ </f:metadata>
+ <h:form>
+ <h:link value="h:link" alt="h:linkALTTEXT" includeViewParams="true"/>
+ </h:form>
+</h:body>
+</html>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java 2009-12-29 22:10:15 UTC (rev 19610)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java 2009-12-30 09:16:44 UTC (rev 19611)
@@ -29,6 +29,30 @@
super(name);
setCheckWarning(false);
}
+
+ public void testAjax() throws Throwable {
+ performInvisibleTagTest("components/ajax.xhtml", "ajax1"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void testEvent() throws Throwable {
+ performInvisibleTagTest("components/event.xhtml", "event1"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void testValidateBean() throws Throwable {
+ performInvisibleTagTest("components/validateBean.xhtml", "validateBean1"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void testValidateRequired() throws Throwable {
+ performInvisibleTagTest("components/validateRequired.xhtml", "validateRequired1"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void testViewParam() throws Throwable {
+ performInvisibleTagTest("components/viewParam.xhtml", "viewParam1"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void testMetadata() throws Throwable {
+ performInvisibleTagTest("components/metadata.xhtml", "metadata1"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
public void testBody1() throws Throwable {
performContentTest("components/body1.xhtml"); //$NON-NLS-1$
@@ -45,7 +69,16 @@
public void testHead2() throws Throwable {
performContentTest("components/head2.xhtml"); //$NON-NLS-1$
}
+
+ public void testButton() throws Throwable {
+ performContentTest("components/button.xhtml"); //$NON-NLS-1$
+ }
+ public void testLink() throws Throwable {
+ performContentTest("components/link.xhtml"); //$NON-NLS-1$
+ performInvisibleTagTest("components/link.xhtml", "link4"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
public void testOutputScript() throws Throwable {
performInvisibleTagTest("components/outputScript.xhtml", "outputScript1"); //$NON-NLS-1$ //$NON-NLS-2$
}
15 years
JBoss Tools SVN: r19610 - workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-12-29 17:10:15 -0500 (Tue, 29 Dec 2009)
New Revision: 19610
Added:
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libfreebl3.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libjavaxpcomglue.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libmozjs.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libnspr4.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libnss3.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libnssckbi.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libnssdbm3.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libnssutil3.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libplc4.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libplds4.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libsmime3.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libsoftokn3.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libsqlite3.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libssl3.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libxpcom.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libxul.so
Log:
https://jira.jboss.org/jira/browse/JBIDE-5033, some libraries has been missed and added now
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libfreebl3.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libfreebl3.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libjavaxpcomglue.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libjavaxpcomglue.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libmozjs.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libmozjs.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libnspr4.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libnspr4.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libnss3.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libnss3.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libnssckbi.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libnssckbi.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libnssdbm3.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libnssdbm3.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libnssutil3.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libnssutil3.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libplc4.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libplc4.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libplds4.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libplds4.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libsmime3.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libsmime3.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libsoftokn3.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libsoftokn3.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libsqlite3.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libsqlite3.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libssl3.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libssl3.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libxpcom.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libxpcom.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libxul.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86_64_rhel5/xulrunner/libxul.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
15 years
JBoss Tools SVN: r19608 - in trunk/seam/docs/reference/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2009-12-29 11:30:48 -0500 (Tue, 29 Dec 2009)
New Revision: 19608
Added:
trunk/seam/docs/reference/en/images/create_mavenized_seam/seamJSFImplementation.png
Modified:
trunk/seam/docs/reference/en/modules/creating_mavenized_seam.xml
Log:
JBDS-806 and JBDS-926. Maven WTP 3.1 Library Providers are added sem guide update
Added: trunk/seam/docs/reference/en/images/create_mavenized_seam/seamJSFImplementation.png
===================================================================
(Binary files differ)
Property changes on: trunk/seam/docs/reference/en/images/create_mavenized_seam/seamJSFImplementation.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/seam/docs/reference/en/modules/creating_mavenized_seam.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/creating_mavenized_seam.xml 2009-12-29 16:26:04 UTC (rev 19607)
+++ trunk/seam/docs/reference/en/modules/creating_mavenized_seam.xml 2009-12-29 16:30:48 UTC (rev 19608)
@@ -8,153 +8,174 @@
<keyword>JBDS</keyword>
</keywordset>
</chapterinfo>
-
<title>Maven Integration for Seam Projects</title>
- <para>Starting from 3.1 M2 version <property>JBoss Tools</property> includes new Jboss Maven Integration plug-in which for now allows
- to create mavenized Seam projects and enable Seam tools support for imported Maven projects.</para>
-
+ <para>Starting from 3.1 M2 version <property>JBoss Tools</property> includes new Jboss Maven
+ Integration plug-in which for now allows to create mavenized Seam projects and enable Seam
+ tools support for imported Maven projects.</para>
<para>The Jboss Maven Integration requires <ulink url="http://m2eclipse.sonatype.org/"
- >m2eclipse</ulink> to be installed.</para>
-
+ >m2eclipse</ulink> to be installed.</para>
<note>
<title>Note:</title>
- <para>For M2 release of <property>Jboss Tools</property> it is important to use m2eclipse <ulink
- url="http://m2eclipse.sonatype.org/update/">stable updatesite</ulink> or the <ulink url="http://m2eclipse.sonatype.org/releases/0.9.9.200906081351">latest integration build</ulink> that M2 was
- developed against. If you want to use the latest development release of m2eclipse you need to use the <ulink url="http://download.jboss.org/jbosstools/updates/nightly/trunk/">nightly builds</ulink> of
- <property>JBoss Tools</property>.</para>
+ <para>For M2 release of <property>Jboss Tools</property> it is important to use m2eclipse
+ <ulink url="http://m2eclipse.sonatype.org/update/">stable updatesite</ulink> or the
+ <ulink url="http://m2eclipse.sonatype.org/releases/0.9.9.200906081351">latest
+ integration build</ulink> that M2 was developed against. If you want to use the
+ latest development release of m2eclipse you need to use the <ulink
+ url="http://download.jboss.org/jbosstools/updates/nightly/trunk/">nightly
+ builds</ulink> of <property>JBoss Tools</property>.</para>
</note>
-
<section id="create_mavenized_project">
- <title>Creating Maven ready Seam project</title>
-
- <para>Maven Integration makes the Seam Wizard capable of creating
- Maven ready projects to let Maven get the libraries instead of using the Seam runtime.</para>
-
- <para>To create a mavenized Seam project you should perform the following steps:</para>
-
- <itemizedlist>
- <listitem>
- <para>Navigate to <emphasis>
- <property>File > New Seam Project</property>.</emphasis> Give the project a meaningful name, specify a target runtime and server
- and select the proper configuration for your Seam project:</para>
-
- <figure>
- <title>Starting the Mavenized Seam Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/create_mavenized_seam/createMavenizedSeamProject.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
-
- <listitem>
- <para>Click the <emphasis>
- <property>Modify</property></emphasis> button to enable the <emphasis>
- <property>Jboss Maven Integration</property></emphasis> facet:</para>
-
- <figure>
- <title>Enabling the Jboss Maven Integration Facet</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/create_mavenized_seam/jbossMavenIntegrationFacet.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
-
- <listitem>
- <para>On the <property>JBoss M2 capabilities</property> page you'll be prompted to add the following maven properties:
- groupId, artifactId, version, packaging, name and description. Here it's possible to set a maven version of Seam
- and also decide whether to remove WTP classpath containers (where the path starts with org.eclipse.jst).
- </para>
-
- <figure>
- <title>Adjusting JBoss M2 Capabilities</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/create_mavenized_seam/jbossM2capabilities.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
-
- <listitem>
- <para>On the <property>Seam Facet</property> page configure the Seam Facet settings and click <emphasis>
- <property>Finish</property>:</emphasis></para>
-
- <figure>
- <title>Seam Facet Settings</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/create_mavenized_seam/seamFacetPage.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
-
- <para>The organized Seam project contains five projects with the Maven nature, builder, Maven classpath and the <emphasis>
- <property>pom.xml</property></emphasis> files added:
- projectname, projectname-ear, projectname-ejb, projectname-parent and projectname-test.</para>
-
- <figure>
- <title>Mavenized Seam Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/create_mavenized_seam/mavenizedProjectStructure.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+ <title>Creating Maven ready Seam project</title>
+ <para>Maven Integration makes the Seam Wizard capable of creating Maven ready projects to
+ let Maven get the libraries instead of using the Seam runtime.</para>
+ <para>To create a mavenized Seam project you should perform the following steps:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Navigate to <emphasis>
+ <property>File > New Seam Project</property>.</emphasis> Give the project
+ a meaningful name, specify a target runtime and server and select the proper
+ configuration for your Seam project:</para>
+ <figure>
+ <title>Starting the Mavenized Seam Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/create_mavenized_seam/createMavenizedSeamProject.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Click the <emphasis>
+ <property>Modify</property></emphasis> button to enable the <emphasis>
+ <property>Jboss Maven Integration</property></emphasis> facet:</para>
+ <figure>
+ <title>Enabling the Jboss Maven Integration Facet</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/create_mavenized_seam/jbossMavenIntegrationFacet.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>On the <property>JBoss M2 capabilities</property> page you'll be prompted
+ to add the following maven properties: groupId, artifactId, version, packaging,
+ name and description. Here it's possible to set a maven version of Seam and
+ also decide whether to remove WTP classpath containers (where the path starts
+ with org.eclipse.jst). </para>
+ <figure>
+ <title>Adjusting JBoss M2 Capabilities</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/create_mavenized_seam/jbossM2capabilities.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para> On the <property>JSF Capabilities</property> page you can choose Maven as
+ libraries provider. This is possible when you use Maven JSF 1.2 Libraries as
+ type of JSF Implementing Library. Also it gives you capability to edit
+ Dependencies and Exclusions for the mavenized Seam project directly from the
+ wizard. </para>
+ <figure>
+ <title>Using JSF Implementation libraries provided by Maven</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/create_mavenized_seam/seamJSFImplementation.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>On the <property>Seam Facet</property> page configure the Seam Facet settings
+ and click <emphasis>
+ <property>Finish</property>:</emphasis></para>
+ <figure>
+ <title>Seam Facet Settings</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/create_mavenized_seam/seamFacetPage.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ <para>The organized Seam project contains five projects with the Maven nature, builder,
+ Maven classpath and the <emphasis>
+ <property>pom.xml</property></emphasis> files added: projectname, projectname-ear,
+ projectname-ejb, projectname-parent and projectname-test.</para>
+ <figure>
+ <title>Mavenized Seam Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/create_mavenized_seam/mavenizedProjectStructure.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
</section>
-
<section id="import_maven_project">
<title>Existing Maven Projects Import</title>
-
- <para>Maven Integration includes the Seam Maven configurator which is called when importing a project, changing
- <emphasis>
+ <para>Maven Integration includes the Seam Maven configurator which is called when importing
+ a project, changing <emphasis>
<property>pom.xml</property></emphasis> and/or calling <emphasis>
- <property>Maven > Update Project Configuration</property>.</emphasis> When importing a Maven Seam project, the Seam Maven configurator
- picks up the settings set up in <emphasis>
- <property>pom.xml</property></emphasis> and adds to the project the following:</para>
-
+ <property>Maven > Update Project Configuration</property>.</emphasis> When
+ importing a Maven Seam project, the Seam Maven configurator picks up the settings set up
+ in <emphasis>
+ <property>pom.xml</property></emphasis> and adds to the project the
+ following:</para>
<itemizedlist>
- <listitem><para>Seam nature</para></listitem>
- <listitem><para>Seam facet and dependent facets to the EJB, EAR and WAR projects</para></listitem>
- <listitem><para>JBoss Maven Integration facet if the Maven project contains a dependency with the
- org.jboss.seam groupId and an artifactId starting with 'jboss-seam'</para></listitem>
- <listitem><para>other required facets (Web Module, Java, JSF, etc.)</para></listitem>
+ <listitem>
+ <para>Seam nature</para>
+ </listitem>
+ <listitem>
+ <para>Seam facet and dependent facets to the EJB, EAR and WAR projects</para>
+ </listitem>
+ <listitem>
+ <para>JBoss Maven Integration facet if the Maven project contains a dependency with
+ the org.jboss.seam groupId and an artifactId starting with 'jboss-seam'</para>
+ </listitem>
+ <listitem>
+ <para>other required facets (Web Module, Java, JSF, etc.)</para>
+ </listitem>
</itemizedlist>
-
<para>If the Seam version from <emphasis>
- <property>pom.xml</property></emphasis> matches a version of a Seam runtime configured in the workspace,
- Seam configurator will set that runtime, otherwise no Seam runtime will be set and you'll have to set it manually under
- <link linkend="project_pref">Seam Settings in the project preferences</link>.</para>
-
- <para>Seam configurator recognizes the Seam artifacts in the following way: the view folder is a web content folder from the WAR project,
- the source folder is the first Eclipse source folder. If there is a folder containing "hot" in the name, it will be chosen as the action source folder.
- Package is the first package that has children or doesn't have any subpackage.
- </para>
-
- <para>Configuring the Seam when importing a Maven project as well as a Seam Runtime, Seam artifacts and some facets could be suspended
- in the JBoss Maven Integration preferences (<emphasis>
- <property>Window > Preferences > JBoss Tools > JBoss Maven Integration</property></emphasis>).</para>
-
+ <property>pom.xml</property></emphasis> matches a version of a Seam runtime
+ configured in the workspace, Seam configurator will set that runtime, otherwise no Seam
+ runtime will be set and you'll have to set it manually under <link
+ linkend="project_pref">Seam Settings in the project preferences</link>.</para>
+ <para>Seam configurator recognizes the Seam artifacts in the following way: the view folder
+ is a web content folder from the WAR project, the source folder is the first Eclipse
+ source folder. If there is a folder containing "hot" in the name, it will be
+ chosen as the action source folder. Package is the first package that has children or
+ doesn't have any subpackage. </para>
+ <para>Configuring the Seam when importing a Maven project as well as a Seam Runtime, Seam
+ artifacts and some facets could be suspended in the JBoss Maven Integration preferences
+ (<emphasis>
+ <property>Window > Preferences > JBoss Tools > JBoss Maven
+ Integration</property></emphasis>).</para>
<figure>
<title>JBoss Maven Integration Preferences</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/create_mavenized_seam/configure_maven_integration.png"/>
+ <imagedata
+ fileref="images/create_mavenized_seam/configure_maven_integration.png"/>
</imageobject>
</mediaobject>
</figure>
</section>
-
<section>
<title>Relevant Resources Links</title>
-
- <para>In the <ulink url="http://in.relation.to/Bloggers/UsingMavenWithJBossTools">Using Maven with JBoss Tools</ulink>
- article written by Max Andersen you'll find references to the
- screencasts on how to use the examples of mavenized Seam projects provided by <property>JBoss Tools</property>.</para>
+ <para>In the <ulink url="http://in.relation.to/Bloggers/UsingMavenWithJBossTools">Using
+ Maven with JBoss Tools</ulink> article written by Max Andersen you'll find
+ references to the screencasts on how to use the examples of mavenized Seam projects
+ provided by <property>JBoss Tools</property>.</para>
</section>
</chapter>
15 years
JBoss Tools SVN: r19607 - in trunk/cdi/plugins/org.jboss.tools.cdi.core: META-INF and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-12-29 11:26:04 -0500 (Tue, 29 Dec 2009)
New Revision: 19607
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/META-INF/MANIFEST.MF
trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.xml
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreNature.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIAnnotationElement.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4943
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/META-INF/MANIFEST.MF 2009-12-29 15:05:07 UTC (rev 19606)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/META-INF/MANIFEST.MF 2009-12-29 16:26:04 UTC (rev 19607)
@@ -14,6 +14,7 @@
org.eclipse.wst.common.project.facet.core,
org.eclipse.wst.common.modulecore,
org.eclipse.wst.common.frameworks,
+ org.eclipse.wst.validation,
org.jboss.tools.jst.web.kb,
org.jboss.tools.common.el.core,
org.eclipse.jface.text,
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.xml 2009-12-29 15:05:07 UTC (rev 19606)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.xml 2009-12-29 16:26:04 UTC (rev 19607)
@@ -95,4 +95,13 @@
<extension point="org.eclipse.core.runtime.preferences">
<initializer class="org.jboss.tools.cdi.core.preferences.CDIPreferenceInitializer"/>
</extension>
+
+ <extension
+ point="org.jboss.tools.jst.web.kb.validator">
+ <validator
+ class="org.jboss.tools.cdi.internal.core.validation.CDICoreValidator"
+ id="org.jboss.tools.cdi.core.CoreValidator">
+ </validator>
+ </extension>
+
</plugin>
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreNature.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreNature.java 2009-12-29 15:05:07 UTC (rev 19606)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreNature.java 2009-12-29 16:26:04 UTC (rev 19607)
@@ -27,6 +27,7 @@
import org.jboss.tools.cdi.internal.core.impl.definition.DefinitionContext;
import org.jboss.tools.cdi.internal.core.scanner.lib.ClassPathMonitor;
import org.jboss.tools.common.util.FileUtil;
+import org.jboss.tools.jst.web.kb.internal.validation.ProjectValidationContext;
public class CDICoreNature implements IProjectNature {
public static String NATURE_ID = "org.jboss.tools.cdi.core.cdinature";
@@ -37,6 +38,8 @@
ClassPathMonitor classPath = new ClassPathMonitor(this);
DefinitionContext definitions = new DefinitionContext();
+ ProjectValidationContext validationContext = null;
+
boolean isBuilt = false;
// Map<IPath, Object> sourcePaths2 = new HashMap<IPath, Object>(); //TODO
@@ -262,5 +265,15 @@
//TODO
}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.seam.core.ISeamProject#getValidationContext()
+ */
+ public ProjectValidationContext getValidationContext() {
+ if(validationContext==null) {
+ validationContext = new ProjectValidationContext();
+ }
+ return validationContext;
+ }
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIAnnotationElement.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIAnnotationElement.java 2009-12-29 15:05:07 UTC (rev 19606)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIAnnotationElement.java 2009-12-29 16:26:04 UTC (rev 19607)
@@ -10,6 +10,9 @@
******************************************************************************/
package org.jboss.tools.cdi.internal.core.impl;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.jdt.core.IType;
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
import org.jboss.tools.cdi.core.ICDIAnnotation;
@@ -37,4 +40,14 @@
return definition.getInheritedAnnotation();
}
+ public List<IAnnotationDeclaration> getAnnotationDeclarations() {
+ List<IAnnotationDeclaration> result = new ArrayList<IAnnotationDeclaration>();
+ result.addAll(definition.getAnnotations());
+ return result;
+ }
+
+ public IAnnotationDeclaration getAnnotationDeclaration(String typeName) {
+ return definition.getAnnotation(typeName);
+ }
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java 2009-12-29 15:05:07 UTC (rev 19606)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java 2009-12-29 16:26:04 UTC (rev 19607)
@@ -79,6 +79,10 @@
return annotations;
}
+ public AnnotationDeclaration getAnnotation(String typeName) {
+ return annotationsByType.get(typeName);
+ }
+
public AnnotationDeclaration getNamedAnnotation() {
return annotationsByType.get(CDIConstants.NAMED_QUALIFIER_TYPE_NAME);
}
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2009-12-29 16:26:04 UTC (rev 19607)
@@ -0,0 +1,174 @@
+package org.jboss.tools.cdi.internal.core.validation;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.IMemberValuePair;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.wst.validation.internal.core.ValidationException;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.jboss.tools.cdi.core.CDIConstants;
+import org.jboss.tools.cdi.core.CDICoreNature;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.IAnnotationDeclaration;
+import org.jboss.tools.cdi.core.IQualifierDeclaration;
+import org.jboss.tools.cdi.core.preferences.CDIPreferences;
+import org.jboss.tools.cdi.internal.core.impl.AnnotationDeclaration;
+import org.jboss.tools.cdi.internal.core.impl.CDIProject;
+import org.jboss.tools.cdi.internal.core.impl.StereotypeElement;
+import org.jboss.tools.common.text.ITextSourceReference;
+import org.jboss.tools.jst.web.kb.IKbProject;
+import org.jboss.tools.jst.web.kb.KbProjectFactory;
+import org.jboss.tools.jst.web.kb.internal.KbProject;
+import org.jboss.tools.jst.web.kb.internal.validation.ContextValidationHelper;
+import org.jboss.tools.jst.web.kb.internal.validation.ValidatingProjectSet;
+import org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager;
+import org.jboss.tools.jst.web.kb.validation.IValidatingProjectSet;
+import org.jboss.tools.jst.web.kb.validation.IValidationContext;
+import org.jboss.tools.jst.web.kb.validation.IValidator;
+
+public class CDICoreValidator extends CDIValidationErrorManager implements IValidator {
+ public static final String ID = "org.jboss.tools.cdi.core.CoreValidator";
+
+ CDIProject cdiProject;
+ String projectName;
+
+ public String getId() {
+ return ID;
+ }
+
+ public IValidatingProjectSet getValidatingProjects(IProject project) {
+ IValidationContext rootContext = null;
+ IProject war = null; //TODO get war ?
+ if(war != null && war.isAccessible()) {
+ IKbProject kbProject = KbProjectFactory.getKbProject(war, false);
+ if(kbProject!=null) {
+ rootContext = kbProject.getValidationContext();
+ } else {
+ KbProject.checkKBBuilderInstalled(war);
+ CDICoreNature cdiProject = CDICorePlugin.getCDI(project, false);
+ if(cdiProject != null) {
+ rootContext = null; //cdiProject.getDelegate().getValidationContext();
+ }
+ }
+ }
+ if(rootContext == null) {
+ CDICoreNature cdiProject = CDICorePlugin.getCDI(project, false);
+ if(cdiProject != null) {
+ rootContext = cdiProject.getValidationContext();
+ }
+ }
+
+ List<IProject> projects = new ArrayList<IProject>();
+ projects.add(project);
+// IProject[] array = set.getAllProjects();
+// for (int i = 0; i < array.length; i++) {
+// if(array[i].isAccessible()) {
+// projects.add(array[i]);
+// }
+// }
+ return new ValidatingProjectSet(project, projects, rootContext);
+ }
+
+ public boolean shouldValidate(IProject project) {
+ try {
+ // TODO check preferences
+ return project != null && project.isAccessible() && project.hasNature(CDICoreNature.NATURE_ID);
+ } catch (CoreException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#init(org.eclipse.core.resources.IProject, org.jboss.tools.jst.web.kb.internal.validation.ContextValidationHelper, org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager, org.eclipse.wst.validation.internal.provisional.core.IReporter, org.jboss.tools.jst.web.kb.validation.IValidationContext)
+ */
+ @Override
+ public void init(IProject project, ContextValidationHelper validationHelper, org.eclipse.wst.validation.internal.provisional.core.IValidator manager, IReporter reporter) {
+ super.init(project, validationHelper, manager, reporter);
+
+// SeamProjectsSet set = new SeamProjectsSet(project);
+// IProject warProject = set.getWarProject();
+ CDICoreNature nature = CDICorePlugin.getCDI(project, false);
+ cdiProject = nature != null ? (CDIProject)nature.getDelegate() : null;
+
+ projectName = project.getName();
+ }
+
+ public IStatus validate(Set<IFile> changedFiles, IProject project,
+ ContextValidationHelper validationHelper, ValidatorManager manager,
+ IReporter reporter) throws ValidationException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IStatus validateAll(IProject project,
+ ContextValidationHelper validationHelper, ValidatorManager manager,
+ IReporter reporter) throws ValidationException {
+ init(project, validationHelper, manager, reporter);
+ removeAllMessagesFromResource(cdiProject.getNature().getProject());
+ if(cdiProject != null) {
+ validateStereotypes();
+
+ }
+ // TODO
+ return OK_STATUS;
+ }
+
+ public void validateStereotypes() {
+ Set<IType> ts = cdiProject.getStereotypes();
+ for (IType t: ts) {
+ StereotypeElement s = cdiProject.getStereotype(t.getFullyQualifiedName());
+ if(s == null) continue;
+ IResource resource = s.getResource();
+ if(resource == null || !resource.getName().endsWith(".java")) {
+ //validate sources only
+ continue;
+ }
+ List<IAnnotationDeclaration> as = s.getAnnotationDeclarations();
+
+// 1. non-empty name
+ AnnotationDeclaration nameDeclaration = s.getNameDeclaration();
+ if(nameDeclaration != null) {
+ IMemberValuePair[] ps = null;
+ try {
+ ps = nameDeclaration.getDeclaration().getMemberValuePairs();
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ if(ps != null && ps.length > 0) {
+ Object name = ps[0].getValue();
+ if(name != null && name.toString().length() > 0) {
+ ITextSourceReference location = nameDeclaration;
+ addError(CDIValidationMessages.STEREOTYPE_DECLARES_NON_EMPTY_NAME, CDIPreferences.STEREOTYPE_DECLARES_NON_EMPTY_NAME, location, resource);
+ }
+ }
+ }
+
+// 2. typed annotation
+ IAnnotationDeclaration typedDeclaration = s.getAnnotationDeclaration(CDIConstants.TYPED_ANNOTATION_TYPE_NAME);
+ if(typedDeclaration != null) {
+ ITextSourceReference location = typedDeclaration;
+ addError(CDIValidationMessages.STEREOTYPE_IS_ANNOTATED_TYPED, CDIPreferences.STEREOTYPE_IS_ANNOTATED_TYPED, location, resource);
+ }
+
+// 3. Qualifier other than @Named
+ for (IAnnotationDeclaration a: as) {
+ if(a instanceof IQualifierDeclaration && a != nameDeclaration) {
+ ITextSourceReference location = a;
+ addError(CDIValidationMessages.ILLEGAL_QUALIFIER_IN_STEREOTYPE, CDIPreferences.ILLEGAL_QUALIFIER_IN_STEREOTYPE, location, resource);
+ }
+ }
+ }
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java 2009-12-29 16:26:04 UTC (rev 19607)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.internal.core.validation;
+
+import org.eclipse.core.resources.IProject;
+import org.jboss.tools.cdi.core.preferences.CDIPreferences;
+import org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager;
+
+public class CDIValidationErrorManager extends ValidationErrorManager {
+
+ @Override
+ protected String getPreference(IProject project, String preferenceKey) {
+ return CDIPreferences.getInstance().getProjectPreference(project, preferenceKey);
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years