JBoss Tools SVN: r17736 - trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-09-25 09:00:09 -0400 (Fri, 25 Sep 2009)
New Revision: 17736
Added:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/VpeTaglibListener.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/VpeTaglibManager.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/VpeTaglibManagerProvider.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4913
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/VpeTaglibListener.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/VpeTaglibListener.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/VpeTaglibListener.java 2009-09-25 13:00:09 UTC (rev 17736)
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.tld;
+
+public interface VpeTaglibListener {
+ void taglibPrefixChanged(String[] prefixs);
+ void addTaglib(String uri, String prefix);
+ void removeTaglib(String uri, String prefix);
+}
\ No newline at end of file
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/VpeTaglibManager.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/VpeTaglibManager.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/VpeTaglibManager.java 2009-09-25 13:00:09 UTC (rev 17736)
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.tld;
+
+import java.util.List;
+import org.w3c.dom.Node;
+
+
+/**
+ * @author Igels
+ */
+public interface VpeTaglibManager {
+
+ /**
+ * Add Taglib Listener to manager
+ * @param listener
+ */
+ public void addTaglibListener(VpeTaglibListener listener);
+
+ /**
+ * Remove Taglib Listener from manager
+ * @param listener
+ */
+ public void removeTaglibListener(VpeTaglibListener listener);
+
+ /**
+ * Return List of TaglibData(s) where keys are prefixes of TLD.
+ * @return
+ */
+ public List<TaglibData> getTagLibs();
+
+ /**
+ * Sets node in scope of which we should show content assistent
+ * @param node
+ */
+ public void setReferenceNode(Node node);
+}
\ No newline at end of file
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/VpeTaglibManagerProvider.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/VpeTaglibManagerProvider.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/VpeTaglibManagerProvider.java 2009-09-25 13:00:09 UTC (rev 17736)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.tld;
+
+
+/**
+ * @author Igels
+ */
+public interface VpeTaglibManagerProvider {
+
+ /**
+ * Returns Taglib manager.
+ * @return Taglib manager.
+ */
+ public VpeTaglibManager getTaglibManager();
+}
\ No newline at end of file
16 years, 3 months
JBoss Tools SVN: r17735 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-09-25 08:59:24 -0400 (Fri, 25 Sep 2009)
New Revision: 17735
Removed:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/VpeTaglibListener.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/VpeTaglibManager.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/VpeTaglibManagerProvider.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4913
Deleted: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/VpeTaglibListener.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/VpeTaglibListener.java 2009-09-25 12:55:12 UTC (rev 17734)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/VpeTaglibListener.java 2009-09-25 12:59:24 UTC (rev 17735)
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jst.web.tld;
-
-public interface VpeTaglibListener {
- void taglibPrefixChanged(String[] prefixs);
- void addTaglib(String uri, String prefix);
- void removeTaglib(String uri, String prefix);
-}
\ No newline at end of file
Deleted: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/VpeTaglibManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/VpeTaglibManager.java 2009-09-25 12:55:12 UTC (rev 17734)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/VpeTaglibManager.java 2009-09-25 12:59:24 UTC (rev 17735)
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jst.web.tld;
-
-import java.util.List;
-import org.w3c.dom.Node;
-
-
-/**
- * @author Igels
- */
-public interface VpeTaglibManager {
-
- /**
- * Add Taglib Listener to manager
- * @param listener
- */
- public void addTaglibListener(VpeTaglibListener listener);
-
- /**
- * Remove Taglib Listener from manager
- * @param listener
- */
- public void removeTaglibListener(VpeTaglibListener listener);
-
- /**
- * Return List of TaglibData(s) where keys are prefixes of TLD.
- * @return
- */
- public List<TaglibData> getTagLibs();
-
- /**
- * Sets node in scope of which we should show content assistent
- * @param node
- */
- public void setReferenceNode(Node node);
-}
\ No newline at end of file
Deleted: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/VpeTaglibManagerProvider.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/VpeTaglibManagerProvider.java 2009-09-25 12:55:12 UTC (rev 17734)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/VpeTaglibManagerProvider.java 2009-09-25 12:59:24 UTC (rev 17735)
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jst.web.tld;
-
-
-/**
- * @author Igels
- */
-public interface VpeTaglibManagerProvider {
-
- /**
- * Returns Taglib manager.
- * @return Taglib manager.
- */
- public VpeTaglibManager getTaglibManager();
-}
\ No newline at end of file
16 years, 3 months
JBoss Tools SVN: r17734 - in trunk/jst/plugins/org.jboss.tools.jst.web: src/org/jboss/tools/jst/web/tld and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-09-25 08:55:12 -0400 (Fri, 25 Sep 2009)
New Revision: 17734
Added:
trunk/jst/plugins/org.jboss.tools.jst.web/catalog/web-facesconfig_2_0.xsd
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/FilePathEncoderFactory.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/IFilePathEncoder.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4913
Added: trunk/jst/plugins/org.jboss.tools.jst.web/catalog/web-facesconfig_2_0.xsd
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/catalog/web-facesconfig_2_0.xsd (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/catalog/web-facesconfig_2_0.xsd 2009-09-25 12:55:12 UTC (rev 17734)
@@ -0,0 +1,2743 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License"). You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code. If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license." If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above. However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+
+
+<xsd:schema
+ targetNamespace="http://java.sun.com/xml/ns/javaee"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="2.0">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ $Id: web-facesconfig_2_0.xsd,v 1.1.8.2 2008/03/20 21:12:50 edburns Exp $
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Copyright 2007 Sun Microsystems, Inc.,
+ 901 San Antonio Road,
+ Palo Alto, California 94303, U.S.A.
+ All rights reserved.
+
+ Sun Microsystems, Inc. has intellectual property
+ rights relating to technology described in this document. In
+ particular, and without limitation, these intellectual
+ property rights may include one or more of the U.S. patents
+ listed at http://www.sun.com/patents and one or more
+ additional patents or pending patent applications in the
+ U.S. and other countries.
+
+ This document and the technology which it describes are
+ distributed under licenses restricting their use, copying,
+ distribution, and decompilation. No part of this document
+ may be reproduced in any form by any means without prior
+ written authorization of Sun and its licensors, if any.
+
+ Third-party software, including font technology, is
+ copyrighted and licensed from Sun suppliers.
+
+ Sun, Sun Microsystems, the Sun logo, Solaris, Java, Java EE,
+ JavaServer Pages, Enterprise JavaBeans and the Java Coffee
+ Cup logo are trademarks or registered trademarks of Sun
+ Microsystems, Inc. in the U.S. and other countries.
+
+ Federal Acquisitions: Commercial Software - Government Users
+ Subject to Standard License Terms and Conditions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ <![CDATA[
+
+ The XML Schema for the JavaServer Faces Application
+ Configuration File (Version 2.0).
+
+ All JavaServer Faces configuration files must indicate
+ the JavaServer Faces schema by indicating the JavaServer
+ Faces namespace:
+
+ http://java.sun.com/xml/ns/javaee
+
+ and by indicating the version of the schema by
+ using the version element as shown below:
+
+ <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="..."
+ version="2.0">
+ ...
+ </faces-config>
+
+ The instance documents may indicate the published
+ version of the schema using xsi:schemaLocation attribute
+ for javaee namespace with the following location:
+
+ http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd
+
+ ]]>
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="javaee_5.xsd"/>
+
+ <!-- **************************************************** -->
+
+ <xsd:element name = "faces-config" type="javaee:faces-configType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "faces-config" element is the root of the configuration
+ information hierarchy, and contains nested elements for all
+ of the other configuration settings.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:unique name="faces-config-behavior-ID-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Behavior IDs must be unique within a document.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:selector xpath="javaee:behavior"/>
+ <xsd:field xpath="javaee:behavior-id"/>
+ </xsd:unique>
+
+ <xsd:unique name="faces-config-converter-ID-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Converter IDs must be unique within a document.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:selector xpath="javaee:converter"/>
+ <xsd:field xpath="javaee:converter-id"/>
+ </xsd:unique>
+
+ <xsd:unique name="faces-config-converter-for-class-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ 'converter-for-class' element values must be unique
+ within a document.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:selector xpath="javaee:converter"/>
+ <xsd:field xpath="javaee:converter-for-class"/>
+ </xsd:unique>
+
+ <xsd:unique name="faces-config-validator-ID-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Validator IDs must be unique within a document.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:selector xpath="javaee:validator"/>
+ <xsd:field xpath="javaee:validator-id"/>
+ </xsd:unique>
+
+ <xsd:unique name="faces-config-managed-bean-name-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Managed bean names must be unique within a document.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:selector xpath="javaee:managed-bean"/>
+ <xsd:field xpath="javaee:managed-bean-name"/>
+ </xsd:unique>
+ </xsd:element>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-configType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "faces-config" element is the root of the configuration
+ information hierarchy, and contains nested elements for all
+ of the other configuration settings.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="application"
+ type="javaee:faces-config-applicationType"/>
+ <xsd:element name="ordering"
+ type="javaee:faces-config-orderingType"/>
+ <xsd:element name="absolute-ordering"
+ type="javaee:faces-config-absoluteOrderingType"
+ minOccurs="0"
+ maxOccurs="1"/>
+ <xsd:element name="factory"
+ type="javaee:faces-config-factoryType"/>
+ <xsd:element name="component"
+ type="javaee:faces-config-componentType"/>
+ <xsd:element name="converter"
+ type="javaee:faces-config-converterType"/>
+ <xsd:element name="managed-bean"
+ type="javaee:faces-config-managed-beanType"/>
+ <xsd:element name="name"
+ type="javaee:java-identifierType"
+ minOccurs="0"
+ maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "name" element within the top level "faces-config"
+ element declares the name of this application
+ configuration resource. Such names are used
+ in the document ordering scheme specified in section
+ JSF.11.4.6.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="navigation-rule"
+ type="javaee:faces-config-navigation-ruleType"/>
+ <xsd:element name="referenced-bean"
+ type="javaee:faces-config-referenced-beanType"/>
+ <xsd:element name="render-kit"
+ type="javaee:faces-config-render-kitType"/>
+ <xsd:element name="lifecycle"
+ type="javaee:faces-config-lifecycleType"/>
+ <xsd:element name="validator"
+ type="javaee:faces-config-validatorType"/>
+ <xsd:element name="behavior"
+ type="javaee:faces-config-behaviorType"/>
+ <xsd:element name="faces-config-extension"
+ type="javaee:faces-config-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:choice>
+ <xsd:attribute name="metadata-complete"
+ type="xsd:boolean"
+ use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The metadata-complete attribute defines whether this
+ JavaServer Faces application is complete, or whether
+ the class files available to this module and packaged with
+ this application should be examined for annotations
+ that specify configuration information.
+
+ This attribute is only inspected on the application
+ configuration resource file located at "WEB-INF/faces-config.xml".
+ The presence of this attribute on any application configuration
+ resource other than the one located at "WEB-INF/faces-config.xml",
+ including any files named using the javax.faces.CONFIG_FILES
+ attribute, must be ignored.
+
+ If metadata-complete is set to "true", the JavaServer Faces
+ runtime must ignore any annotations that specify configuration
+ information, which might be present in the class files
+ of the application.
+
+ If metadata-complete is not specified or is set to
+ "false", the JavaServer Faces runtime must examine the class
+ files of the application for annotations, as specified by
+ the specification.
+
+ If "WEB-INF/faces-config.xml" is not present, the JavaServer
+ Faces runtime will assume metadata-complete to be "false".
+
+ The value of this attribute will have no impact on
+ runtime annotations such as @ResourceDependency or
+ @ListenerFor.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="id" type="xsd:ID" />
+ <xsd:attribute name="version"
+ type="javaee:faces-config-versionType"
+ use="required"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for faces-config. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+
+ <xsd:complexType name="faces-config-orderingType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Please see section JSF.11.4.6 for the specification of this element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="after"
+ type="javaee:faces-config-ordering-orderingType"
+ minOccurs="0"
+ maxOccurs="1"/>
+ <xsd:element name="before"
+ type="javaee:faces-config-ordering-orderingType"
+ minOccurs="0"
+ maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="faces-config-ordering-orderingType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This element contains a sequence of "id" elements, each of which
+ refers to an application configuration resource by the "id"
+ declared on its faces-config element. This element can also contain
+ a single "others" element which specifies that this document comes
+ before or after other documents within the application.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="name" type="javaee:java-identifierType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="others" type="javaee:faces-config-ordering-othersType" minOccurs="0" maxOccurs="1" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="faces-config-ordering-othersType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This element indicates that the ordering sub-element in which
+ it was placed should take special action regarding the ordering
+ of this application resource relative to other
+ application configuration resources. See section JSF.11.4.6
+ for the complete specification.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+
+ <xsd:complexType name="faces-config-absoluteOrderingType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Only relevant if this is placed within the /WEB-INF/faces-config.xml.
+ Please see section JSF.11.4.6 for the specification for details.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="javaee:java-identifierType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="others" type="javaee:faces-config-ordering-othersType" minOccurs="0" maxOccurs="1" />
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+
+ <xsd:complexType name="faces-config-applicationType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "application" element provides a mechanism to define the
+ various per-application-singleton implementation artifacts for
+ a particular web application that is utilizing
+ JavaServer Faces. For nested elements that are not specified,
+ the JSF implementation must provide a suitable default.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="action-listener"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "action-listener" element contains the fully
+ qualified class name of the concrete
+ ActionListener implementation class that will be
+ called during the Invoke Application phase of the
+ request processing lifecycle.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="default-render-kit-id"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "default-render-kit-id" element allows the
+ application to define a renderkit to be used other
+ than the standard one.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="message-bundle"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The base name of a resource bundle representing
+ the message resources for this application. See
+ the JavaDocs for the "java.util.ResourceBundle"
+ class for more information on the syntax of
+ resource bundle names.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="navigation-handler"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "navigation-handler" element contains the
+ fully qualified class name of the concrete
+ NavigationHandler implementation class that will
+ be called during the Invoke Application phase
+ of the request processing lifecycle, if the
+ default ActionListener (provided by the JSF
+ implementation) is used.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="partial-traversal"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "partial-traversal" element contains the fully
+ qualified class name of the concrete
+ PartialTraversal implementation class that will be
+ called during the "execute" and "render" phases of the
+ request processing lifecycle.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="view-handler"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "view-handler" element contains the fully
+ qualified class name of the concrete ViewHandler
+ implementation class that will be called during
+ the Restore View and Render Response phases of the
+ request processing lifecycle. The faces
+ implementation must provide a default
+ implementation of this class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="state-manager"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "state-manager" element contains the fully
+ qualified class name of the concrete StateManager
+ implementation class that will be called during
+ the Restore View and Render Response phases of the
+ request processing lifecycle. The faces
+ implementation must provide a default
+ implementation of this class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="el-resolver"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "el-resolver" element contains the fully
+ qualified class name of the concrete
+ javax.el.ELResolver implementation class
+ that will be used during the processing of
+ EL expressions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="property-resolver"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property-resolver" element contains the fully
+ qualified class name of the concrete
+ PropertyResolver implementation class that will
+ be used during the processing of value binding
+ expressions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="variable-resolver"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "variable-resolver" element contains the fully
+ qualified class name of the concrete
+ VariableResolver implementation class that will
+ be used during the processing of value binding
+ expressions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="resource-handler"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The "resource-handler" element contains the
+ fully qualified class name of the concrete
+ ResourceHandler implementation class that
+ will be used during rendering and decoding
+ of resource requests The standard
+ constructor based decorator pattern used for
+ other application singletons will be
+ honored.
+
+ ]]>
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="system-event-listener"
+ type="javaee:faces-config-system-event-listenerType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ </xsd:element>
+ <xsd:element
+ name="locale-config"
+ type="javaee:faces-config-locale-configType"/>
+ <xsd:element
+ name="resource-bundle"
+ type="javaee:faces-config-application-resource-bundleType"/>
+ <xsd:element name="application-extension"
+ type="javaee:faces-config-application-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element
+ name="default-validators"
+ type="javaee:faces-config-default-validatorsType"/>
+ </xsd:choice>
+ <xsd:attribute name = "id" type = "xsd:ID"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="faces-config-application-resource-bundleType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The resource-bundle element inside the application element
+ references a java.util.ResourceBundle instance by name
+ using the var element. ResourceBundles referenced in this
+ manner may be returned by a call to
+ Application.getResourceBundle() passing the current
+ FacesContext for this request and the value of the var
+ element below.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="base-name"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The fully qualified class name of the
+ java.util.ResourceBundle instance.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="var"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The name by which this ResourceBundle instance
+ is retrieved by a call to
+ Application.getResourceBundle().
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-application-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for application. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-factoryType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "factory" element provides a mechanism to define the
+ various Factories that comprise parts of the implementation
+ of JavaServer Faces. For nested elements that are not
+ specified, the JSF implementation must provide a suitable
+ default.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="application-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "application-factory" element contains the
+ fully qualified class name of the concrete
+ ApplicationFactory implementation class that will
+ be called when
+ FactoryFinder.getFactory(APPLICATION_FACTORY) is
+ called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="exception-handler-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "exception-handler-factory" element contains the
+ fully qualified class name of the concrete
+ ExceptionHandlerFactory implementation class that will
+ be called when
+ FactoryFinder.getFactory(EXCEPTION_HANDLER_FACTORY)
+ is called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="external-context-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "external-context-factory" element contains the
+ fully qualified class name of the concrete
+ ExternalContextFactory implementation class that will
+ be called when
+ FactoryFinder.getFactory(EXTERNAL_CONTEXT_FACTORY)
+ is called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="faces-context-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "faces-context-factory" element contains the
+ fully qualified class name of the concrete
+ FacesContextFactory implementation class that will
+ be called when
+ FactoryFinder.getFactory(FACES_CONTEXT_FACTORY)
+ is called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="partial-view-context-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "partial-view-context-factory" element contains the
+ fully qualified class name of the concrete
+ PartialViewContextFactory implementation class that will
+ be called when FactoryFinder.getFactory
+ (FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY) is called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="lifecycle-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "lifecycle-factory" element contains the fully
+ qualified class name of the concrete LifecycleFactory
+ implementation class that will be called when
+ FactoryFinder.getFactory(LIFECYCLE_FACTORY) is called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="view-declaration-language-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "view-declaration-language-factory" element contains
+ the fully qualified class name of the concrete
+ ViewDeclarationLanguageFactory
+ implementation class that will be called when
+ FactoryFinder.getFactory(VIEW_DECLARATION_FACTORY) is called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="tag-handler-delegate-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "tag-handler-delegate-factory" element contains
+ the fully qualified class name of the concrete
+ ViewDeclarationLanguageFactory
+ implementation class that will be called when
+ FactoryFinder.getFactory(TAG_HANDLER_DELEGATE_FACTORY) is called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="render-kit-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "render-kit-factory" element contains the fully
+ qualified class name of the concrete RenderKitFactory
+ implementation class that will be called when
+ FactoryFinder.getFactory(RENDER_KIT_FACTORY) is
+ called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="visit-context-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "visit-context-factory" element contains the fully
+ qualified class name of the concrete VisitContextFactory
+ implementation class that will be called when
+ FactoryFinder.getFactory(VISIT_CONTEXT_FACTORY) is
+ called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="factory-extension"
+ type="javaee:faces-config-factory-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:choice>
+ <xsd:attribute name = "id" type = "xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-factory-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for factory. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-attributeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "attribute" element represents a named, typed, value
+ associated with the parent UIComponent via the generic
+ attributes mechanism.
+
+ Attribute names must be unique within the scope of the parent
+ (or related) component.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="attribute-name"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "attribute-name" element represents the name under
+ which the corresponding value will be stored, in the
+ generic attributes of the UIComponent we are related
+ to.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="attribute-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "attribute-class" element represents the Java type
+ of the value associated with this attribute name.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="default-value"
+ type="javaee:faces-config-default-valueType"
+ minOccurs="0"/>
+ <xsd:element name="suggested-value"
+ type="javaee:faces-config-suggested-valueType"
+ minOccurs="0"/>
+ <xsd:element name="attribute-extension"
+ type="javaee:faces-config-attribute-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name = "id" type = "xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-attribute-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for attribute. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-componentType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "component" element represents a concrete UIComponent
+ implementation class that should be registered under the
+ specified type identifier, along with its associated
+ properties and attributes. Component types must be unique
+ within the entire web application.
+
+ Nested "attribute" elements identify generic attributes that
+ are recognized by the implementation logic of this component.
+ Nested "property" elements identify JavaBeans properties of
+ the component class that may be exposed for manipulation
+ via tools.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="component-type"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "component-type" element represents the name under
+ which the corresponding UIComponent class should be
+ registered.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="component-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "component-class" element represents the fully
+ qualified class name of a concrete UIComponent
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="facet"
+ type="javaee:faces-config-facetType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="attribute"
+ type="javaee:faces-config-attributeType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="property"
+ type="javaee:faces-config-propertyType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="component-extension"
+ type="javaee:faces-config-component-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-component-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ Extension element for component. It may contain
+ implementation specific content.
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-default-localeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "default-locale" element declares the default locale
+ for this application instance.
+
+ It must be specified as :language:[_:country:[_:variant:]]
+ without the colons, for example "ja_JP_SJIS". The
+ separators between the segments may be '-' or '_'.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="javaee:faces-config-localeType">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+
+ <xsd:complexType name="faces-config-default-valueType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "default-value" contains the value for the property or
+ attribute in which this element resides. This value differs
+ from the "suggested-value" in that the property or attribute
+ must take the value, whereas in "suggested-value" taking the
+ value is optional.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:simpleType name="faces-config-el-expressionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ EL expressions present within a faces config file
+ must start with the character sequence of '#{' and
+ end with '}'.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="#\{.*\}"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-facetType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Define the name and other design-time information for a facet
+ that is associated with a renderer or a component.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="facet-name"
+ type="javaee:java-identifierType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "facet-name" element represents the facet name
+ under which a UIComponent will be added to its parent.
+ It must be of type "Identifier".
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="facet-extension"
+ type="javaee:faces-config-facet-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-facet-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for facet. It may contain implementation
+ specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-from-view-idType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The value of from-view-id must contain one of the following
+ values:
+
+ - The exact match for a view identifier that is recognized
+ by the the ViewHandler implementation being used (such as
+ "/index.jsp" if you are using the default ViewHandler).
+
+ - A proper prefix of a view identifier, plus a trailing
+ "*" character. This pattern indicates that all view
+ identifiers that match the portion of the pattern up to
+ the asterisk will match the surrounding rule. When more
+ than one match exists, the match with the longest pattern
+ is selected.
+
+ - An "*" character, which means that this pattern applies
+ to all view identifiers.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-from-actionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "from-action" element contains an action reference
+ expression that must have been executed (by the default
+ ActionListener for handling application level events)
+ in order to select the navigation rule. If not specified,
+ this rule will be relevant no matter which action reference
+ was executed (or if no action reference was executed).
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="javaee:faces-config-el-expressionType">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-ifType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "if" element defines a condition that must resolve
+ to true in order for the navigation case on which it is
+ defined to be matched, with the existing match criteria
+ (action method and outcome) as a prerequiste, if present.
+ The condition is defined declaratively using a value
+ expression in the body of this element. The expression is
+ evaluated at the time the navigation case is being matched.
+ If the "from-outcome" is omitted and this element is
+ present, the navigation handler will match a null outcome
+ and use the condition return value to determine if the
+ case should be considered a match.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="javaee:faces-config-el-expressionType">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-converterType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "converter" element represents a concrete Converter
+ implementation class that should be registered under the
+ specified converter identifier. Converter identifiers must
+ be unique within the entire web application.
+
+ Nested "attribute" elements identify generic attributes that
+ may be configured on the corresponding UIComponent in order
+ to affect the operation of the Converter. Nested "property"
+ elements identify JavaBeans properties of the Converter
+ implementation class that may be configured to affect the
+ operation of the Converter. "attribute" and "property"
+ elements are intended to allow component developers to
+ more completely describe their components to tools and users.
+ These elements have no required runtime semantics.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:choice>
+ <xsd:element name="converter-id"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "converter-id" element represents the
+ identifier under which the corresponding
+ Converter class should be registered.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="converter-for-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "converter-for-class" element represents the
+ fully qualified class name for which a Converter
+ class will be registered.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+
+ <xsd:element name="converter-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "converter-class" element represents the fully
+ qualified class name of a concrete Converter
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="attribute"
+ type="javaee:faces-config-attributeType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Nested "attribute" elements identify generic
+ attributes that may be configured on the
+ corresponding UIComponent in order to affect the
+ operation of the Converter. This attribute is
+ primarily for design-time tools and is not
+ specified to have any meaning at runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="property"
+ type="javaee:faces-config-propertyType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Nested "property" elements identify JavaBeans
+ properties of the Converter implementation class
+ that may be configured to affect the operation of
+ the Converter. This attribute is primarily for
+ design-time tools and is not specified to have
+ any meaning at runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="converter-extension"
+ type="javaee:faces-config-converter-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-converter-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for converter. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-lifecycleType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "lifecycle" element provides a mechanism to specify
+ modifications to the behaviour of the default Lifecycle
+ implementation for this web application.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="phase-listener"
+ type="javaee:fully-qualified-classType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "phase-listener" element contains the fully
+ qualified class name of the concrete PhaseListener
+ implementation class that will be registered on
+ the Lifecycle.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="lifecycle-extension"
+ type="javaee:faces-config-lifecycle-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-lifecycle-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for lifecycle. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:simpleType name="faces-config-localeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The localeType defines valid locale defined by ISO-639-1
+ and ISO-3166.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="([a-z]{2})[_|\-]?([\p{L}]{2})?[_|\-]?(\w+)?"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-locale-configType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "locale-config" element allows the app developer to
+ declare the supported locales for this application.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="default-locale"
+ type="javaee:faces-config-default-localeType"
+ minOccurs="0">
+ </xsd:element>
+ <xsd:element name="supported-locale"
+ type="javaee:faces-config-supported-localeType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-default-validatorsType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "default-validators" element allows the app developer to
+ register a set of validators, referenced by identifier, that
+ are automatically assigned to any EditableValueHolder component
+ in the application, unless overridden or disabled locally.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="validator-id"
+ type="javaee:string"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "validator-id" element represents the identifier
+ of a registered validator.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-managed-beanType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "managed-bean" element represents a JavaBean, of a
+ particular class, that will be dynamically instantiated
+ at runtime (by the default VariableResolver implementation)
+ if it is referenced as the first element of a value binding
+ expression, and no corresponding bean can be identified in
+ any scope. In addition to the creation of the managed bean,
+ and the optional storing of it into the specified scope,
+ the nested managed-property elements can be used to
+ initialize the contents of settable JavaBeans properties of
+ the created instance.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="managed-bean-name"
+ type="javaee:java-identifierType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "managed-bean-name" element represents the
+ attribute name under which a managed bean will
+ be searched for, as well as stored (unless the
+ "managed-bean-scope" value is "none").
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="managed-bean-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "managed-bean-class" element represents the fully
+ qualified class name of the Java class that will be
+ used`to instantiate a new instance if creation of the
+ specified`managed bean is requested.
+
+ The specified class must conform to standard JavaBeans
+ conventions. In particular, it must have a public
+ zero-arguments constructor, and zero or more public
+ property setters.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element
+ name="managed-bean-scope"
+ type="javaee:faces-config-managed-bean-scopeOrNoneType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "managed-bean-scope" element represents the scope
+ into which a newly created instance of the specified
+ managed bean will be stored (unless the value is
+ "none").
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element name="managed-property"
+ type="javaee:faces-config-managed-propertyType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="map-entries"
+ type="javaee:faces-config-map-entriesType"/>
+ <xsd:element name="list-entries"
+ type="javaee:faces-config-list-entriesType"/>
+ </xsd:choice>
+ <xsd:element name="managed-bean-extension"
+ type="javaee:faces-config-managed-bean-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="eager"
+ type="xsd:boolean"
+ use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This attribute is only considered when associated with
+ an application-scoped managed bean. If the value of the eager
+ attribute is true the runtime must instantiate this class
+ and store the instance within the application scope when the
+ application starts.
+
+ If eager is unspecified or is false, the default "lazy"
+ instantiation and scoped storage of the managed bean
+ will occur.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-managed-bean-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for managed-bean. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-managed-bean-scopeOrNoneType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ <![CDATA[
+ Defines the legal values for the <managed-bean-scope>
+ element's body content, which includes all of the scopes
+ normally used in a web application, plus the "none" value
+ indicating that a created bean should not be stored into
+ any scope. Alternatively, an EL expression may be used
+ as the value of this element. The result of evaluating this
+ expression must by of type java.util.Map.
+ ]]>
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string">
+ <xsd:pattern value="view|request|session|application|none|#\{.*\}"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-managed-propertyType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "managed-property" element represents an individual
+ property of a managed bean that will be configured to the
+ specified value (or value set) if the corresponding
+ managed bean is automatically created.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="property-name"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property-name" element represents the JavaBeans
+ property name under which the corresponding value may
+ be stored.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="property-class"
+ type="javaee:java-typeType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property-class" element represents the Java type
+ of the value associated with this property name.
+ If not specified, it can be inferred from existing
+ classes; however, this element should be specified
+ if the configuration file is going to be the source
+ for generating the corresponding classes.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element name="map-entries"
+ type="javaee:faces-config-map-entriesType"/>
+ <xsd:element name="null-value"
+ type="javaee:faces-config-null-valueType">
+ </xsd:element>
+ <xsd:element name="value"
+ type="javaee:faces-config-valueType"/>
+ <xsd:element name="list-entries"
+ type="javaee:faces-config-list-entriesType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-map-entryType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "map-entry" element reprsents a single key-entry pair
+ that will be added to the computed value of a managed
+ property of type java.util.Map.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="key"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "key" element is the String representation of a
+ map key that will be stored in a managed property of
+ type java.util.Map.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element name="null-value"
+ type="javaee:faces-config-null-valueType"/>
+ <xsd:element name="value"
+ type="javaee:faces-config-valueType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-map-entriesType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "map-entries' element represents a set of key-entry pairs
+ that will be added to the computed value of a managed property
+ of type java.util.Map. In addition, the Java class types
+ of the key and entry values may be optionally declared.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="key-class"
+ type="javaee:fully-qualified-classType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "key-class" element defines the Java type to which
+ each "key" element in a set of "map-entry" elements
+ will be converted to. If omitted, "java.lang.String"
+ is assumed.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="value-class"
+ type="javaee:faces-config-value-classType"
+ minOccurs="0"/>
+ <xsd:element name="map-entry"
+ type="javaee:faces-config-map-entryType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-navigation-caseType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "navigation-case" element describes a particular
+ combination of conditions that must match for this case to
+ be executed, and the view id of the component tree that
+ should be selected next.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="from-action"
+ type="javaee:faces-config-from-actionType"
+ minOccurs="0">
+ </xsd:element>
+ <xsd:element name="from-outcome"
+ type="javaee:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "from-outcome" element contains a logical outcome
+ string returned by the execution of an application
+ action method selected via an "actionRef" property
+ (or a literal value specified by an "action" property)
+ of a UICommand component. If specified, this rule
+ will be relevant only if the outcome value matches
+ this element's value. If not specified, this rule
+ will be relevant if the outcome value is non-null
+ or, if the "if" element is present, will be relevant
+ for any outcome value, with the assumption that the
+ condition specified in the "if" element ultimately
+ determines if this rule is a match.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="if"
+ type="javaee:faces-config-ifType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Please see section JSF.7.4.2 for the specification of this element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="to-view-id"
+ type="javaee:faces-config-valueType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "to-view-id" element contains the view identifier
+ of the next view that should be displayed if this
+ navigation rule is matched. If the contents is a
+ value expression, it should be resolved by the
+ navigation handler to obtain the view identifier.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element
+ name="redirect"
+ type="javaee:faces-config-redirectType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-navigation-ruleType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "navigation-rule" element represents an individual
+ decision rule that will be utilized by the default
+ NavigationHandler implementation to make decisions on
+ what view should be displayed next, based on the
+ view id being processed.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="from-view-id"
+ type="javaee:faces-config-from-view-idType"
+ minOccurs="0"/>
+ <xsd:element name="navigation-case"
+ type="javaee:faces-config-navigation-caseType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element
+ name="navigation-rule-extension"
+ type="javaee:faces-config-navigation-rule-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-navigation-rule-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for navigation-rule. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-null-valueType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "null-value" element indicates that the managed
+ property in which we are nested will be explicitly
+ set to null if our managed bean is automatically
+ created. This is different from omitting the managed
+ property element entirely, which will cause no
+ property setter to be called for this property.
+
+ The "null-value" element can only be used when the
+ associated "property-class" identifies a Java class,
+ not a Java primitive.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-propertyType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property" element represents a JavaBean property of the
+ Java class represented by our parent element.
+
+ Property names must be unique within the scope of the Java
+ class that is represented by the parent element, and must
+ correspond to property names that will be recognized when
+ performing introspection against that class via
+ java.beans.Introspector.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="property-name"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property-name" element represents the JavaBeans
+ property name under which the corresponding value
+ may be stored.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="property-class"
+ type="javaee:java-typeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property-class" element represents the Java type
+ of the value associated with this property name.
+ If not specified, it can be inferred from existing
+ classes; however, this element should be specified if
+ the configuration file is going to be the source for
+ generating the corresponding classes.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="default-value"
+ type="javaee:faces-config-default-valueType"
+ minOccurs="0"/>
+ <xsd:element name="suggested-value"
+ type="javaee:faces-config-suggested-valueType"
+ minOccurs="0"/>
+ <xsd:element name="property-extension"
+ type="javaee:faces-config-property-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-property-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for property. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-redirectType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "redirect" element indicates that navigation to the
+ specified "to-view-id" should be accomplished by
+ performing an HTTP redirect rather than the usual
+ ViewHandler mechanisms.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="view-param"
+ type="javaee:faces-config-redirect-viewParamType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attribute name="include-view-params" type="xsd:boolean" use="optional"/>
+
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-redirect-viewParamType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "view-param" element, only valid within
+ a "redirect" element, contains child "name"
+ and "value" elements that must be included in the
+ redirect url when the redirect is performed.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="name"
+ type="javaee:string"
+ minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="value"
+ type="javaee:string"
+ minOccurs="1" maxOccurs="1"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-referenced-beanType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "referenced-bean" element represents at design time the
+ promise that a Java object of the specified type will exist at
+ runtime in some scope, under the specified key. This can be
+ used by design time tools to construct user interface dialogs
+ based on the properties of the specified class. The presence
+ or absence of a referenced bean element has no impact on the
+ JavaServer Faces runtime environment inside a web application.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="referenced-bean-name"
+ type="javaee:java-identifierType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "referenced-bean-name" element represents the
+ attribute name under which the corresponding
+ referenced bean may be assumed to be stored, in one
+ of 'request', 'session', 'view', 'application'
+ or a custom scope.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="referenced-bean-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "referenced-bean-class" element represents the
+ fully qualified class name of the Java class
+ (either abstract or concrete) or Java interface
+ implemented by the corresponding referenced bean.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-render-kitType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "render-kit" element represents a concrete RenderKit
+ implementation that should be registered under the specified
+ render-kit-id. If no render-kit-id is specified, the
+ identifier of the default RenderKit
+ (RenderKitFactory.DEFAULT_RENDER_KIT) is assumed.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="render-kit-id"
+ type="javaee:string"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "render-kit-id" element represents an identifier
+ for the RenderKit represented by the parent
+ "render-kit" element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="render-kit-class"
+ type="javaee:fully-qualified-classType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "render-kit-class" element represents the fully
+ qualified class name of a concrete RenderKit
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="renderer"
+ type="javaee:faces-config-rendererType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="client-behavior-renderer"
+ type="javaee:faces-config-client-behavior-rendererType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="render-kit-extension"
+ type="javaee:faces-config-render-kit-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-client-behavior-rendererType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "client-behavior-renderer" element represents a concrete
+ ClientBehaviorRenderer implementation class that should be
+ registered under the specified behavior renderer type identifier,
+ in the RenderKit associated with the parent "render-kit"
+ element. Client Behavior renderer type must be unique within the RenderKit
+ associated with the parent "render-kit" element.
+
+ Nested "attribute" elements identify generic component
+ attributes that are recognized by this renderer.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="client-behavior-renderer-type"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "client-behavior-renderer-type" element represents a renderer type
+ identifier for the Client Behavior Renderer represented by the parent
+ "client-behavior-renderer" element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="client-behavior-renderer-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "client-behavior-renderer-class" element represents the fully
+ qualified class name of a concrete Client Behavior Renderer
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="faces-config-rendererType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "renderer" element represents a concrete Renderer
+ implementation class that should be registered under the
+ specified component family and renderer type identifiers,
+ in the RenderKit associated with the parent "render-kit"
+ element. Combinations of component family and
+ renderer type must be unique within the RenderKit
+ associated with the parent "render-kit" element.
+
+ Nested "attribute" elements identify generic component
+ attributes that are recognized by this renderer.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="component-family"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "component-family" element represents the
+ component family for which the Renderer represented
+ by the parent "renderer" element will be used.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="renderer-type"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "renderer-type" element represents a renderer type
+ identifier for the Renderer represented by the parent
+ "renderer" element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="renderer-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "renderer-class" element represents the fully
+ qualified class name of a concrete Renderer
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="facet"
+ type="javaee:faces-config-facetType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="attribute"
+ type="javaee:faces-config-attributeType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="renderer-extension"
+ type="javaee:faces-config-renderer-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-renderer-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for renderer. It may contain implementation
+ specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-render-kit-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for render-kit. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-suggested-valueType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "suggested-value" contains the value for the property or
+ attribute in which this element resides. This value is
+ advisory only and is intended for tools to use when
+ populating pallettes.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-supported-localeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "supported-locale" element allows authors to declare
+ which locales are supported in this application instance.
+
+ It must be specified as :language:[_:country:[_:variant:]]
+ without the colons, for example "ja_JP_SJIS". The
+ separators between the segments may be '-' or '_'.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="javaee:faces-config-localeType">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-behaviorType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "behavior" element represents a concrete Behavior
+ implementation class that should be registered under the
+ specified behavior identifier. Behavior identifiers must
+ be unique within the entire web application.
+
+ Nested "attribute" elements identify generic attributes that
+ may be configured on the corresponding UIComponent in order
+ to affect the operation of the Behavior. Nested "property"
+ elements identify JavaBeans properties of the Behavior
+ implementation class that may be configured to affect the
+ operation of the Behavior. "attribute" and "property"
+ elements are intended to allow component developers to
+ more completely describe their components to tools and users.
+ These elements have no required runtime semantics.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="behavior-id"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "behavior-id" element represents the identifier
+ under which the corresponding Behavior class should
+ be registered.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="behavior-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "behavior-class" element represents the fully
+ qualified class name of a concrete Behavior
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="attribute"
+ type="javaee:faces-config-attributeType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Nested "attribute" elements identify generic
+ attributes that may be configured on the
+ corresponding UIComponent in order to affect the
+ operation of the Behavior. This attribute is
+ primarily for design-time tools and is not
+ specified to have any meaning at runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+ <xsd:element name="property"
+ type="javaee:faces-config-propertyType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Nested "property" elements identify JavaBeans
+ properties of the Behavior implementation class
+ that may be configured to affect the operation of
+ the Behavior. This attribute is primarily for
+ design-time tools and is not specified to have
+ any meaning at runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="behavior-extension"
+ type="javaee:faces-config-behavior-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-behavior-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for behavior. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-validatorType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "validator" element represents a concrete Validator
+ implementation class that should be registered under the
+ specified validator identifier. Validator identifiers must
+ be unique within the entire web application.
+
+ Nested "attribute" elements identify generic attributes that
+ may be configured on the corresponding UIComponent in order
+ to affect the operation of the Validator. Nested "property"
+ elements identify JavaBeans properties of the Validator
+ implementation class that may be configured to affect the
+ operation of the Validator. "attribute" and "property"
+ elements are intended to allow component developers to
+ more completely describe their components to tools and users.
+ These elements have no required runtime semantics.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="validator-id"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "validator-id" element represents the identifier
+ under which the corresponding Validator class should
+ be registered.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="validator-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "validator-class" element represents the fully
+ qualified class name of a concrete Validator
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="attribute"
+ type="javaee:faces-config-attributeType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Nested "attribute" elements identify generic
+ attributes that may be configured on the
+ corresponding UIComponent in order to affect the
+ operation of the Validator. This attribute is
+ primarily for design-time tools and is not
+ specified to have any meaning at runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+ <xsd:element name="property"
+ type="javaee:faces-config-propertyType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Nested "property" elements identify JavaBeans
+ properties of the Validator implementation class
+ that may be configured to affect the operation of
+ the Validator. This attribute is primarily for
+ design-time tools and is not specified to have
+ any meaning at runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="validator-extension"
+ type="javaee:faces-config-validator-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-validator-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for validator. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:simpleType name="faces-config-valueType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "value" element is the String representation of
+ a literal value to which a scalar managed property
+ will be set, or a value binding expression ("#{...}")
+ that will be used to calculate the required value.
+ It will be converted as specified for the actual
+ property type.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:union
+ memberTypes="javaee:faces-config-el-expressionType xsd:string"/>
+ </xsd:simpleType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-value-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "value-class" element defines the Java type to which each
+ "value" element's value will be converted to, prior to adding
+ it to the "list-entries" list for a managed property that is
+ a java.util.List, or a "map-entries" map for a managed
+ property that is a java.util.Map.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:fully-qualified-classType"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-list-entriesType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "list-entries" element represents a set of initialization
+ elements for a managed property that is a java.util.List or an
+ array. In the former case, the "value-class" element can
+ optionally be used to declare the Java type to which each
+ value should be converted before adding it to the Collection.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="value-class"
+ type="javaee:faces-config-value-classType"
+ minOccurs="0"/>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="null-value"
+ type="javaee:faces-config-null-valueType"/>
+ <xsd:element name="value"
+ type="javaee:faces-config-valueType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-system-event-listenerType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The presence of this element within the "application" element in
+ an application configuration resource file indicates the
+ developer wants to add an SystemEventListener to this
+ application instance. Elements nested within this element allow
+ selecting the kinds of events that will be delivered to the
+ listener instance, and allow selecting the kinds of classes that
+ can be the source of events that are delivered to the listener
+ instance.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="system-event-listener-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "system-event-listener-class" element contains
+ the fully qualified class name of the concrete
+ SystemEventListener implementation class that will be
+ called when events of the type specified by the
+ "system-event-class" are sent by the runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="system-event-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "system-event-class" element contains the fully
+ qualified class name of the SystemEvent subclass for
+ which events will be delivered to the class whose fully
+ qualified class name is given by the
+ "system-event-listener-class" element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="source-class" minOccurs="0"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "source-class" element, if present, contains the
+ fully qualified class name of the class that will be the
+ source for the event to be delivered to the class whose
+ fully qualified class name is given by the
+ "system-event-listener-class" element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:simpleType name="faces-config-versionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type contains the recognized versions of
+ faces-config supported.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="2.0"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!-- **************************************************** -->
+
+</xsd:schema>
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web/catalog/web-facesconfig_2_0.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/FilePathEncoderFactory.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/FilePathEncoderFactory.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/FilePathEncoderFactory.java 2009-09-25 12:55:12 UTC (rev 17734)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.tld;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.common.model.plugin.ModelPlugin;
+import org.jboss.tools.common.model.project.ModelNatureExtension;
+import org.jboss.tools.common.model.util.ModelFeatureFactory;
+
+public class FilePathEncoderFactory {
+ static IFilePathEncoder pathEncoderInstance;
+
+ public static IFilePathEncoder getPathEncoder (String pathEncoder) {
+ if(pathEncoderInstance != null) {
+ return pathEncoderInstance;
+ }
+ if(pathEncoder == null) {
+ return null;
+ }
+ if(pathEncoder.length() == 0) {
+ pathEncoder = null;
+ return null;
+ }
+ try {
+ pathEncoderInstance = (IFilePathEncoder)ModelFeatureFactory.getInstance().createFeatureInstance(pathEncoder);
+ } catch (ClassCastException e) {
+ ModelPlugin.getPluginLog().logError(e);
+ } finally {
+ pathEncoder = null;
+ }
+ return pathEncoderInstance;
+ }
+
+
+ public static IFilePathEncoder getEncoder(IProject project) {
+ if(project == null || !project.isOpen()) return null;
+ ModelNatureExtension[] es = ModelNatureExtension.getInstances();
+ for (int i = 0; i < es.length; i++) {
+ try {
+ if(project.hasNature(es[i].getName())) {
+ IFilePathEncoder encoder = getPathEncoder(es[i].getPathEncoder());
+ if(encoder != null) return encoder;
+ }
+ } catch (CoreException e) {
+ //ignore - all checks are done above
+ }
+ }
+ return null;
+ }
+
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/IFilePathEncoder.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/IFilePathEncoder.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/IFilePathEncoder.java 2009-09-25 12:55:12 UTC (rev 17734)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.tld;
+
+import java.util.Properties;
+
+import org.jboss.tools.common.model.XModelObject;
+
+public interface IFilePathEncoder {
+ public static String PATH_TYPE = "pathType"; //$NON-NLS-1$
+ public static String PATH_ADDITION = "pathAddition"; //$NON-NLS-1$
+
+ public static String ABSOLUTE_PATH = "absolute"; //$NON-NLS-1$
+ public static String RELATIVE_PATH = "relative"; //$NON-NLS-1$
+
+ /**
+ * Returns path that should be inserted to jsp page.
+ *
+ * @path file path relative to WebContent
+ */
+ public String encode(String path, XModelObject f, String tag, VpeTaglibManager taglibs, Properties context);
+
+ /**
+ * Returns file path relative to WebContent
+ *
+ * @path value on jsp page
+ */
+ public String decode(String path, XModelObject f, String tag, VpeTaglibManager taglibs, Properties context);
+}
16 years, 3 months
JBoss Tools SVN: r17733 - in trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools: jst/web/tld and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-09-25 08:54:11 -0400 (Fri, 25 Sep 2009)
New Revision: 17733
Removed:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/FilePathEncoderFactory.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/IFilePathEncoder.java
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ModelNatureExtension.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4913
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ModelNatureExtension.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ModelNatureExtension.java 2009-09-25 12:40:18 UTC (rev 17732)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ModelNatureExtension.java 2009-09-25 12:54:11 UTC (rev 17733)
@@ -6,9 +6,6 @@
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.Platform;
-import org.jboss.tools.common.model.plugin.ModelPlugin;
-import org.jboss.tools.common.model.util.ModelFeatureFactory;
-import org.jboss.tools.jst.web.tld.IFilePathEncoder;
public class ModelNatureExtension {
public static String EXTENSION_POINT = "org.jboss.tools.common.model.modelnatures"; //$NON-NLS-1$
@@ -17,7 +14,6 @@
String displayName;
String pathEncoder;
String watcherContributor;
- IFilePathEncoder pathEncoderInstance;
public ModelNatureExtension() {}
@@ -29,25 +25,8 @@
return displayName;
}
- public IFilePathEncoder getPathEncoder () {
- if(pathEncoderInstance != null) {
- return pathEncoderInstance;
- }
- if(pathEncoder == null) {
- return null;
- }
- if(pathEncoder.length() == 0) {
- pathEncoder = null;
- return null;
- }
- try {
- pathEncoderInstance = (IFilePathEncoder)ModelFeatureFactory.getInstance().createFeatureInstance(pathEncoder);
- } catch (ClassCastException e) {
- ModelPlugin.getPluginLog().logError(e);
- } finally {
- pathEncoder = null;
- }
- return pathEncoderInstance;
+ public String getPathEncoder () {
+ return pathEncoder;
}
public String getWatcherContributor() {
Deleted: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/FilePathEncoderFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/FilePathEncoderFactory.java 2009-09-25 12:40:18 UTC (rev 17732)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/FilePathEncoderFactory.java 2009-09-25 12:54:11 UTC (rev 17733)
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jst.web.tld;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.jboss.tools.common.model.project.ModelNatureExtension;
-
-public class FilePathEncoderFactory {
-
- public static IFilePathEncoder getEncoder(IProject project) {
- if(project == null || !project.isOpen()) return null;
- ModelNatureExtension[] es = ModelNatureExtension.getInstances();
- for (int i = 0; i < es.length; i++) {
- try {
- if(project.hasNature(es[i].getName())) {
- IFilePathEncoder encoder = es[i].getPathEncoder();
- if(encoder != null) return encoder;
- }
- } catch (CoreException e) {
- //ignore - all checks are done above
- }
- }
- return null;
- }
-
-}
Deleted: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/IFilePathEncoder.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/IFilePathEncoder.java 2009-09-25 12:40:18 UTC (rev 17732)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/IFilePathEncoder.java 2009-09-25 12:54:11 UTC (rev 17733)
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jst.web.tld;
-
-import java.util.Properties;
-
-import org.jboss.tools.common.model.XModelObject;
-
-public interface IFilePathEncoder {
- public static String PATH_TYPE = "pathType"; //$NON-NLS-1$
- public static String PATH_ADDITION = "pathAddition"; //$NON-NLS-1$
-
- public static String ABSOLUTE_PATH = "absolute"; //$NON-NLS-1$
- public static String RELATIVE_PATH = "relative"; //$NON-NLS-1$
-
- /**
- * Returns path that should be inserted to jsp page.
- *
- * @path file path relative to WebContent
- */
- public String encode(String path, XModelObject f, String tag, VpeTaglibManager taglibs, Properties context);
-
- /**
- * Returns file path relative to WebContent
- *
- * @path value on jsp page
- */
- public String decode(String path, XModelObject f, String tag, VpeTaglibManager taglibs, Properties context);
-}
16 years, 3 months
JBoss Tools SVN: r17732 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: toolbar/format/handler and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-09-25 08:40:18 -0400 (Fri, 25 Sep 2009)
New Revision: 17732
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction2.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/FormatHandler.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4913
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction.java 2009-09-25 12:39:23 UTC (rev 17731)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction.java 2009-09-25 12:40:18 UTC (rev 17732)
@@ -20,8 +20,8 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.ui.views.palette.PaletteInsertHelper;
import org.jboss.tools.jst.jsp.jspeditor.dnd.JSPPaletteInsertHelper;
-import org.jboss.tools.jst.web.tld.TLDToPaletteHelper;
import org.jboss.tools.jst.web.tld.URIConstants;
+import org.jboss.tools.jst.web.tld.model.helpers.TLDToPaletteHelper;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.SelectionUtil;
@@ -140,7 +140,7 @@
p.setProperty(URIConstants.LIBRARY_VERSION, libraryVersion);
String addTaglib = item.getParent().getAttributeValue(TLDToPaletteHelper.ADD_TAGLIB);
p.setProperty(URIConstants.DEFAULT_PREFIX, defaultPrefix);
- p.setProperty(PaletteInsertHelper.PROPOPERTY_ADD_TAGLIB, addTaglib);
+ p.setProperty(JSPPaletteInsertHelper.PROPOPERTY_ADD_TAGLIB, addTaglib);
/*
* Added by Dzmitry Sakovich Fix for JBIDE-1626
*/
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction2.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction2.java 2009-09-25 12:39:23 UTC (rev 17731)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction2.java 2009-09-25 12:40:18 UTC (rev 17732)
@@ -20,8 +20,8 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.ui.views.palette.PaletteInsertHelper;
import org.jboss.tools.jst.jsp.jspeditor.dnd.JSPPaletteInsertHelper;
-import org.jboss.tools.jst.web.tld.TLDToPaletteHelper;
import org.jboss.tools.jst.web.tld.URIConstants;
+import org.jboss.tools.jst.web.tld.model.helpers.TLDToPaletteHelper;
import org.jboss.tools.vpe.editor.menu.InsertType;
import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.NodesManagingUtil;
@@ -209,7 +209,7 @@
String addTaglib = item.getParent().getAttributeValue(
TLDToPaletteHelper.ADD_TAGLIB);
p.setProperty(URIConstants.DEFAULT_PREFIX, defaultPrefix);
- p.setProperty(PaletteInsertHelper.PROPOPERTY_ADD_TAGLIB, addTaglib);
+ p.setProperty(JSPPaletteInsertHelper.PROPOPERTY_ADD_TAGLIB, addTaglib);
/*
* Added by Dzmitry Sakovich Fix for JBIDE-1626
*/
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/FormatHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/FormatHandler.java 2009-09-25 12:39:23 UTC (rev 17731)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/FormatHandler.java 2009-09-25 12:40:18 UTC (rev 17732)
@@ -113,8 +113,8 @@
if(format) {
p.setProperty(PaletteInsertHelper.PROPOPERTY_REFORMAT_BODY, "yes"); //$NON-NLS-1$
}
- p.setProperty(PaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI, "http://www.w3.org/TR/REC-html40"); //$NON-NLS-1$
- p.setProperty(PaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX, ""); //$NON-NLS-1$
+ p.setProperty(JSPPaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI, "http://www.w3.org/TR/REC-html40"); //$NON-NLS-1$
+ p.setProperty(JSPPaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX, ""); //$NON-NLS-1$
ITextSelection sel = new TextSelection(startOffcet, length);
ISelectionProvider selProvider = viewer.getSelectionProvider();
16 years, 3 months
JBoss Tools SVN: r17731 - in trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld: model/helpers and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-09-25 08:39:23 -0400 (Fri, 25 Sep 2009)
New Revision: 17731
Added:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/URIConstants.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/helpers/TLDToPaletteHelper.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4913
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/URIConstants.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/URIConstants.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/URIConstants.java 2009-09-25 12:39:23 UTC (rev 17731)
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.tld;
+
+public interface URIConstants {
+ public String LIBRARY_URI = "library uri"; //$NON-NLS-1$
+ public String LIBRARY_VERSION = "library version"; //$NON-NLS-1$
+ public String DEFAULT_PREFIX = "default prefix"; //$NON-NLS-1$
+}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/helpers/TLDToPaletteHelper.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/helpers/TLDToPaletteHelper.java 2009-09-25 12:38:29 UTC (rev 17730)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/helpers/TLDToPaletteHelper.java 2009-09-25 12:39:23 UTC (rev 17731)
@@ -16,9 +16,9 @@
import org.jboss.tools.jst.web.tld.model.TLDUtil;
public class TLDToPaletteHelper {
- public static final String START_TEXT = "start text"; //$NON-NLS-1$
- public static final String END_TEXT = "end text"; //$NON-NLS-1$
- public static final String REFORMAT = "automatically reformat tag body"; //$NON-NLS-1$
+ public static final String START_TEXT = XModelObjectConstants.START_TEXT;
+ public static final String END_TEXT = XModelObjectConstants.END_TEXT;
+ public static final String REFORMAT = XModelObjectConstants.REFORMAT;
public static final String DESCRIPTION = "description"; //$NON-NLS-1$
public static final String URI = URIConstants.LIBRARY_URI;
public static final String DEFAULT_PREFIX = URIConstants.DEFAULT_PREFIX;
@@ -95,7 +95,7 @@
}
for (int i = 0; i < as.length; i++) {
if(isRequired(as[i])) continue;
- sb.append(as[i].getAttributeValue("name")); //$NON-NLS-1$
+ sb.append(as[i].getAttributeValue(XModelObjectConstants.ATTR_NAME));
++k;
if(k < as.length) sb.append(", "); //$NON-NLS-1$
}
@@ -107,7 +107,7 @@
private boolean isRequired(XModelObject attr) {
String required = attr.getAttributeValue("required"); //$NON-NLS-1$
- return ("true".equals(required) || "yes".equals(required)); //$NON-NLS-1$ //$NON-NLS-2$
+ return (XModelObjectConstants.TRUE.equals(required) || XModelObjectConstants.TRUE.equals(required));
}
public XModelObject createTabByTLD(XModelObject tld, XModel model) {
@@ -120,7 +120,7 @@
private XModelObject createGroupByTLD(XModelObject tld, XModel model, String entity) {
Properties p = new Properties();
- p.setProperty("name", capitalize(getTldName(tld))); //$NON-NLS-1$
+ p.setProperty(XModelObjectConstants.ATTR_NAME, capitalize(getTldName(tld)));
p.setProperty(DESCRIPTION, TLDUtil.getTagDescription(tld));
p.setProperty(DEFAULT_PREFIX, getTldName(tld));
p.setProperty(URIConstants.LIBRARY_URI, "" + tld.getAttributeValue("uri")); //$NON-NLS-1$ //$NON-NLS-2$
16 years, 3 months
JBoss Tools SVN: r17730 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-09-25 08:38:29 -0400 (Fri, 25 Sep 2009)
New Revision: 17730
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/FileDropCommand.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/JSPPaletteInsertHelper.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/PaletteDropCommand.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/PaletteTaglibInserter.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4913
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/FileDropCommand.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/FileDropCommand.java 2009-09-25 12:37:34 UTC (rev 17729)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/FileDropCommand.java 2009-09-25 12:38:29 UTC (rev 17730)
@@ -54,12 +54,12 @@
properties.put(PaletteInsertHelper.PROPOPERTY_START_TEXT, generateStartText());
properties.put(PaletteInsertHelper.PROPOPERTY_END_TEXT, generateEndText());
properties.put(PaletteInsertHelper.PROPOPERTY_REFORMAT_BODY, getReformatBodyProperty());
- properties.put(PaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI, uri);
+ properties.put(JSPPaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI, uri);
String version = ((TagProposal)getDefaultModel().getTagProposal()).getLibraryVersion();
- properties.put(PaletteInsertHelper.PROPOPERTY_TAGLIBRARY_VERSION, version);
- properties.put(PaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX,getDefaultModel().getTagProposal().getPrefix());
+ properties.put(JSPPaletteInsertHelper.PROPOPERTY_TAGLIBRARY_VERSION, version);
+ properties.put(JSPPaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX,getDefaultModel().getTagProposal().getPrefix());
properties.put(PaletteInsertHelper.PROPOPERTY_SELECTION_PROVIDER, getDefaultModel().getDropData().getSelectionProvider());
- properties.put(PaletteInsertHelper.PROPOPERTY_ADD_TAGLIB, "true"); //$NON-NLS-1$
+ properties.put(JSPPaletteInsertHelper.PROPOPERTY_ADD_TAGLIB, "true"); //$NON-NLS-1$
addCustomProperties(properties);
JSPPaletteInsertHelper.getInstance().insertIntoEditor(
getDefaultModel().getDropData().getSourceViewer(),
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/JSPPaletteInsertHelper.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/JSPPaletteInsertHelper.java 2009-09-25 12:37:34 UTC (rev 17729)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/JSPPaletteInsertHelper.java 2009-09-25 12:38:29 UTC (rev 17730)
@@ -6,8 +6,14 @@
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.ui.texteditor.ITextEditor;
import org.jboss.tools.common.model.ui.views.palette.PaletteInsertHelper;
+import org.jboss.tools.jst.web.tld.URIConstants;
+import org.jboss.tools.jst.web.tld.model.helpers.TLDToPaletteHelper;
public class JSPPaletteInsertHelper extends PaletteInsertHelper {
+ public static final String PROPOPERTY_ADD_TAGLIB = TLDToPaletteHelper.ADD_TAGLIB;
+ public static final String PROPOPERTY_TAGLIBRARY_URI = URIConstants.LIBRARY_URI;
+ public static final String PROPOPERTY_TAGLIBRARY_VERSION = URIConstants.LIBRARY_VERSION;
+ public static final String PROPOPERTY_DEFAULT_PREFIX = URIConstants.DEFAULT_PREFIX;
static JSPPaletteInsertHelper instance = new JSPPaletteInsertHelper();
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/PaletteDropCommand.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/PaletteDropCommand.java 2009-09-25 12:37:34 UTC (rev 17729)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/PaletteDropCommand.java 2009-09-25 12:38:29 UTC (rev 17730)
@@ -39,9 +39,9 @@
import org.jboss.tools.common.model.ui.views.palette.PaletteInsertManager;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.jst.web.tld.IWebProject;
-import org.jboss.tools.jst.web.tld.TLDToPaletteHelper;
import org.jboss.tools.jst.web.tld.URIConstants;
import org.jboss.tools.jst.web.tld.WebProjectFactory;
+import org.jboss.tools.jst.web.tld.model.helpers.TLDToPaletteHelper;
/**
*
@@ -68,9 +68,9 @@
newLine = properties.getProperty(PaletteInsertHelper.PROPOPERTY_NEW_LINE);
if (newLine == null) newLine="true"; //$NON-NLS-1$
runningProperties.setProperty(PaletteInsertHelper.PROPOPERTY_NEW_LINE, newLine);
- String addTaglib = properties.getProperty(PaletteInsertHelper.PROPOPERTY_ADD_TAGLIB);
+ String addTaglib = properties.getProperty(JSPPaletteInsertHelper.PROPOPERTY_ADD_TAGLIB);
if(addTaglib == null) addTaglib = "true"; //$NON-NLS-1$
- runningProperties.setProperty(PaletteInsertHelper.PROPOPERTY_ADD_TAGLIB, addTaglib);
+ runningProperties.setProperty(JSPPaletteInsertHelper.PROPOPERTY_ADD_TAGLIB, addTaglib);
}
public void execute() {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/PaletteTaglibInserter.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/PaletteTaglibInserter.java 2009-09-25 12:37:34 UTC (rev 17729)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/PaletteTaglibInserter.java 2009-09-25 12:38:29 UTC (rev 17730)
@@ -54,12 +54,12 @@
}
private boolean checkProperties(Properties p) {
- return "true".equalsIgnoreCase(p.getProperty(PaletteInsertHelper.PROPOPERTY_ADD_TAGLIB)) && //$NON-NLS-1$
- p.getProperty(PaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI) != null &&
- p.getProperty(PaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI).length() > 0 &&
- !p.getProperty(PaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI).equals(JSP_URI) &&
- p.getProperty(PaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX) != null &&
- p.getProperty(PaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX).length() > 0 &&
+ return "true".equalsIgnoreCase(p.getProperty(JSPPaletteInsertHelper.PROPOPERTY_ADD_TAGLIB)) && //$NON-NLS-1$
+ p.getProperty(JSPPaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI) != null &&
+ p.getProperty(JSPPaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI).length() > 0 &&
+ !p.getProperty(JSPPaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI).equals(JSP_URI) &&
+ p.getProperty(JSPPaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX) != null &&
+ p.getProperty(JSPPaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX).length() > 0 &&
p.getProperty(PaletteInsertHelper.PROPOPERTY_START_TEXT) != null;
}
@@ -81,8 +81,8 @@
if(tl == null) tl = JSPPaletteInsertHelper.getPrefixes(d.get());
Element root = xmlDocument.getDocumentElement();
- String uri_p = p.getProperty(PaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI);
- String defaultPrefix_p = p.getProperty(PaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX);
+ String uri_p = p.getProperty(JSPPaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI);
+ String defaultPrefix_p = p.getProperty(JSPPaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX);
String lineDelimiter = PaletteInsertHelper.getLineDelimiter(d);
StringBuffer tg = new StringBuffer(TAGLIB_START).append(" uri=\"").append(uri_p).append("\"").append(" prefix=\"").append(defaultPrefix_p).append("\"%>").append(lineDelimiter); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -90,7 +90,7 @@
//If taglib already exist check the prefix if changed
if (tl.containsKey(uri_p)) {
if (!tl.get(uri_p).equals(defaultPrefix_p)) {
- p.setProperty(PaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX, (String)tl.get(uri_p));
+ p.setProperty(JSPPaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX, (String)tl.get(uri_p));
}
} else if(!tl.containsValue(defaultPrefix_p)) {
if (checkplace(xmlDocument, d, "jsp:directive.taglib", tg, p, v) == false) { //$NON-NLS-1$
@@ -143,7 +143,7 @@
}
private static boolean checkSelectedElement(HashMap<String,String> map, ISourceViewer v, Properties p){
- String taglibUri = p.getProperty(PaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI);
+ String taglibUri = p.getProperty(JSPPaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI);
if(taglibUri == null) return false;
Node selectedNode = getSelectedNode(v, p);
@@ -246,8 +246,8 @@
* with text formatting
*/
private static Properties checkTL(Element root, ISourceViewer v, Properties p, IDocument d) {
- String uri_p = p.getProperty(PaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI);
- String defaultPrefix_p = p.getProperty(PaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX);
+ String uri_p = p.getProperty(JSPPaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI);
+ String defaultPrefix_p = p.getProperty(JSPPaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX);
HashMap<String,String> map = new HashMap<String,String>();
NamedNodeMap attrs = root.getAttributes();
@@ -262,7 +262,7 @@
if (map.containsKey(uri_p) || checkSelectedElement(map, v, p)) {
if (!map.get(uri_p).equals(defaultPrefix_p)) {
- p.setProperty(PaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX, (String) map.get(uri_p));
+ p.setProperty(JSPPaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX, (String) map.get(uri_p));
}
} else if(!map.containsValue(defaultPrefix_p)) {
StringBuffer attribute = new StringBuffer("xmlns:").append(defaultPrefix_p).append("=\"").append(uri_p).append("\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
16 years, 3 months
JBoss Tools SVN: r17729 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-09-25 08:37:34 -0400 (Fri, 25 Sep 2009)
New Revision: 17729
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteInsertHelper.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteViewPart.java
Log:
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteInsertHelper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteInsertHelper.java 2009-09-25 12:36:36 UTC (rev 17728)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteInsertHelper.java 2009-09-25 12:37:34 UTC (rev 17729)
@@ -34,11 +34,10 @@
import org.eclipse.ui.texteditor.ITextEditor;
import org.jboss.tools.common.model.ServiceDialog;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.XModelObjectConstants;
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.editor.IModelObjectEditorInput;
-import org.jboss.tools.jst.web.tld.TLDToPaletteHelper;
-import org.jboss.tools.jst.web.tld.URIConstants;
/**
* @author Jeremy
@@ -46,15 +45,11 @@
public class PaletteInsertHelper {
public static final String PROPOPERTY_TAG_NAME = "tag name"; //$NON-NLS-1$
- public static final String PROPOPERTY_START_TEXT = TLDToPaletteHelper.START_TEXT;
- public static final String PROPOPERTY_END_TEXT = TLDToPaletteHelper.END_TEXT;
+ public static final String PROPOPERTY_START_TEXT = XModelObjectConstants.START_TEXT;
+ public static final String PROPOPERTY_END_TEXT = XModelObjectConstants.END_TEXT;
public static final String PROPOPERTY_NEW_LINE = "new line"; //$NON-NLS-1$
- public static final String PROPOPERTY_REFORMAT_BODY = TLDToPaletteHelper.REFORMAT;
- public static final String PROPOPERTY_TAGLIBRARY_URI = URIConstants.LIBRARY_URI;
- public static final String PROPOPERTY_TAGLIBRARY_VERSION = URIConstants.LIBRARY_VERSION;
- public static final String PROPOPERTY_DEFAULT_PREFIX = URIConstants.DEFAULT_PREFIX;
+ public static final String PROPOPERTY_REFORMAT_BODY = XModelObjectConstants.REFORMAT;
public static final String PROPOPERTY_SELECTION_PROVIDER = "selectionProvider"; //$NON-NLS-1$
- public static final String PROPOPERTY_ADD_TAGLIB = TLDToPaletteHelper.ADD_TAGLIB;
static PaletteInsertHelper instance = new PaletteInsertHelper();
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteViewPart.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteViewPart.java 2009-09-25 12:36:36 UTC (rev 17728)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteViewPart.java 2009-09-25 12:37:34 UTC (rev 17729)
@@ -35,7 +35,6 @@
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.dnd.ModelTransfer;
import org.jboss.tools.common.model.ui.editor.EditorPartWrapper;
-import org.jboss.tools.jst.web.tld.URIConstants;
public class PaletteViewPart extends ViewPart implements IPartListener {
@@ -144,6 +143,8 @@
if(dropIntoEditor(editor, macro)) return;
if(dropIntoEditor2(editor, macro)) return;
+ //TODO implement a service
+/**
String tagname = macro.getAttributeValue("name"); //$NON-NLS-1$
String startText = "" + macro.getAttributeValue("start text"); //$NON-NLS-1$ //$NON-NLS-2$
String endText = "" + macro.getAttributeValue("end text"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -174,6 +175,7 @@
);
page.activate(part);
}
+*/
}
private boolean dropIntoEditor(ITextEditor editor, XModelObject macro) {
16 years, 3 months
JBoss Tools SVN: r17728 - in trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools: common/model and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-09-25 08:36:36 -0400 (Fri, 25 Sep 2009)
New Revision: 17728
Removed:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/java/jsp/
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/TLDToPaletteHelper.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/URIConstants.java
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XModelObjectConstants.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4913
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XModelObjectConstants.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XModelObjectConstants.java 2009-09-25 12:09:16 UTC (rev 17727)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XModelObjectConstants.java 2009-09-25 12:36:36 UTC (rev 17728)
@@ -63,4 +63,9 @@
// ""
// "setModified" use ENUM for compare
+
+ //drop & palette related
+ public static final String START_TEXT = "start text"; //$NON-NLS-1$
+ public static final String END_TEXT = "end text"; //$NON-NLS-1$
+ public static final String REFORMAT = "automatically reformat tag body"; //$NON-NLS-1$
}
Deleted: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/TLDToPaletteHelper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/TLDToPaletteHelper.java 2009-09-25 12:09:16 UTC (rev 17727)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/TLDToPaletteHelper.java 2009-09-25 12:36:36 UTC (rev 17728)
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jst.web.tld;
-
-import java.util.*;
-import org.jboss.tools.common.model.*;
-
-public class TLDToPaletteHelper {
- public static final String START_TEXT = "start text"; //$NON-NLS-1$
- public static final String END_TEXT = "end text"; //$NON-NLS-1$
- public static final String REFORMAT = "automatically reformat tag body"; //$NON-NLS-1$
- public static final String DESCRIPTION = "description"; //$NON-NLS-1$
- public static final String URI = URIConstants.LIBRARY_URI;
- public static final String DEFAULT_PREFIX = URIConstants.DEFAULT_PREFIX;
- public static final String ADD_TAGLIB = "add taglib"; //$NON-NLS-1$
-
- public TLDToPaletteHelper() {}
-
- public XModelObject createMacroByTag(XModelObject tag, XModel model) {
- Properties p = new Properties();
- String parentname = getTldName(tag.getParent());
- String prefix = (parentname.length() == 0) ? "" : parentname + ":"; //$NON-NLS-1$ //$NON-NLS-2$
- String shortname = tag.getAttributeValue(XModelObjectConstants.ATTR_NAME);
- String name = prefix + shortname;
- String tagname = shortname; ///name;
- p.setProperty(XModelObjectConstants.ATTR_NAME, shortname);
- boolean empty = "empty".equals(tag.getAttributeValue("bodycontent")); //$NON-NLS-1$ //$NON-NLS-2$
- if(!empty) p.setProperty(END_TEXT, "</" + tagname + ">"); //$NON-NLS-1$ //$NON-NLS-2$
- p.setProperty(START_TEXT, getStartText(tag, empty, tagname));
- p.setProperty(DESCRIPTION, getTagDescription(tag, empty, name));
- if(!empty) p.setProperty(REFORMAT, XModelObjectConstants.YES);
- return model.createModelObject("SharableMacroHTML", p); //$NON-NLS-1$
- }
-
- public static String getTldName(XModelObject tld) {
- if(tld == null) return ""; //$NON-NLS-1$
- String n = tld.getAttributeValue("shortname"); //$NON-NLS-1$
- if(n == null) return ""; //$NON-NLS-1$
- if(n.length() == 0) {
- n = tld.getAttributeValue(XModelObjectConstants.ATTR_NAME);
- int q = n.lastIndexOf('-');
- if(q >= 0) n = n.substring(q + 1);
- }
- int s = n.lastIndexOf(' ');
- if(s >= 0) n = n.substring(s + 1);
- return n.toLowerCase();
- }
-
- private String getStartText(XModelObject tag, boolean empty, String name) {
- StringBuffer sb = new StringBuffer();
- sb.append("<").append(name); //$NON-NLS-1$
- XModelObject[] as = tag.getChildren();
- boolean found = false;
- for (int i = 0; i < as.length; i++) {
- if(!TLDUtil.isAttribute(as[i])) continue;
- String required = as[i].getAttributeValue("required"); //$NON-NLS-1$
- if(!XModelObjectConstants.TRUE.equals(required) && !XModelObjectConstants.YES.equals(required)) continue;
- sb.append(' ').append(as[i].getAttributeValue(XModelObjectConstants.ATTR_NAME)).append("=\""); //$NON-NLS-1$
- if(!found) {
- sb.append('|');
- found = true;
- }
- sb.append('"');
- }
- if(empty) sb.append(XModelObjectConstants.SEPARATOR);
- sb.append(">"); //$NON-NLS-1$
- return sb.toString();
- }
-
- private String getTagDescription(XModelObject tag, boolean empty, String name) {
-// String info = TLDUtil.getTagDescription(tag);
- StringBuffer sb = new StringBuffer();
- sb.append("<b>Syntax:</b><br><code>");
- if (empty)
- sb.append("<").append(name).append(" />"); //$NON-NLS-1$ //$NON-NLS-2$
- else
- sb.append("<").append(name).append("></code><br><code></").append(name).append(">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- sb.append("</code><br><b>Attributes:</b><br><code>");
- int k = 0;
- XModelObject[] as = tag.getChildren();
- for (int i = 0; i < as.length; i++) {
- if(!TLDUtil.isAttribute(as[i])) continue;
- if(!isRequired(as[i])) continue;
- sb.append("<b>").append(as[i].getAttributeValue(XModelObjectConstants.ATTR_NAME)).append("</b>"); //$NON-NLS-1$ //$NON-NLS-2$
- ++k;
- if(k < as.length) sb.append(", "); //$NON-NLS-1$
- }
- for (int i = 0; i < as.length; i++) {
- if(isRequired(as[i])) continue;
- sb.append(as[i].getAttributeValue(XModelObjectConstants.ATTR_NAME));
- ++k;
- if(k < as.length) sb.append(", "); //$NON-NLS-1$
- }
-
- sb.append("</code>"); //$NON-NLS-1$
-
-/*
- sb.append("<html>").append("\n ");
- sb.append("<table width=\"300\">").append("\n ");
- if(info.length() > 0) {
- sb.append("<tr>").append("\n ");
- sb.append("<td><i><b>").append(info).append("</b></i></td>").append("\n ");
- sb.append("</tr>").append("\n ");
- }
- sb.append("<tr>").append("\n ");
- sb.append("<td>").append("\n ");
- sb.append("<font color=\"OLIVE\"><strong>Syntax:</strong></font> <code><br>");
- if(empty) sb.append("<" + name + " />"); else sb.append("<" + name + "><br></" + name + ">");
- sb.append("</code>").append("\n ");
- sb.append("<br>").append("\n ");
- sb.append("<font color=\"OLIVE\"><strong>Atributes:</strong></font>").append("\n ");
- sb.append("<code><br>").append("\n ");
- int k = 0;
- XModelObject[] as = tag.getChildren();
- for (int i = 0; i < as.length; i++) {
- if(!TLDUtil.isAttribute(as[i])) continue;
- if(!isRequired(as[i])) continue;
- sb.append("<b>").append(as[i].getAttributeValue(XModelObjectConstants.ATTR_NAME)).append("</b>");
- ++k;
- if(k < as.length) sb.append(',');
- sb.append("\n ");
- }
- for (int i = 0; i < as.length; i++) {
- if(isRequired(as[i])) continue;
- sb.append(as[i].getAttributeValue(XModelObjectConstants.ATTR_NAME));
- ++k;
- if(k < as.length) sb.append(',');
- sb.append("\n ");
- }
- sb.append("</code>").append("\n ");
- sb.append("</td>").append("\n ");
- sb.append("</tr>").append("\n ");
- sb.append("</table>").append('\n');
- sb.append("</html>").append('\n');
-*/
-
- return sb.toString();///XModelObjectLoaderUtil.saveToXMLAttribute(sb.toString());
- }
-
- private boolean isRequired(XModelObject attr) {
- String required = attr.getAttributeValue("required"); //$NON-NLS-1$
- return (XModelObjectConstants.TRUE.equals(required) || XModelObjectConstants.YES.equals(required));
- }
-
- public XModelObject createTabByTLD(XModelObject tld, XModel model) {
- return createGroupByTLD(tld, model, "SharablePageTabHTML"); //$NON-NLS-1$
- }
-
- public XModelObject createGroupByTLD(XModelObject tld, XModel model) {
- return createGroupByTLD(tld, model, "SharableGroupHTML"); //$NON-NLS-1$
- }
-
- private XModelObject createGroupByTLD(XModelObject tld, XModel model, String entity) {
- Properties p = new Properties();
- p.setProperty(XModelObjectConstants.ATTR_NAME, capitalize(getTldName(tld)));
- p.setProperty(DESCRIPTION, TLDUtil.getTagDescription(tld));
- p.setProperty(DEFAULT_PREFIX, getTldName(tld));
- p.setProperty(URIConstants.LIBRARY_URI, "" + tld.getAttributeValue("uri")); //$NON-NLS-1$ //$NON-NLS-2$
- XModelObject tab = model.createModelObject(entity, p);
- XModelObject[] tags = tld.getChildren();
- for (int i = 0; i < tags.length; i++)
- if(TLDUtil.isTag(tags[i])) tab.addChild(createMacroByTag(tags[i], model));
- return tab;
- }
-
-
- private String capitalize(String s) {
- return (s.length() == 0) ? s : Character.toUpperCase(s.charAt(0)) + s.substring(1);
- }
-
-}
-
Deleted: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/URIConstants.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/URIConstants.java 2009-09-25 12:09:16 UTC (rev 17727)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/URIConstants.java 2009-09-25 12:36:36 UTC (rev 17728)
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jst.web.tld;
-
-public interface URIConstants {
- public String LIBRARY_URI = "library uri"; //$NON-NLS-1$
- public String LIBRARY_VERSION = "library version"; //$NON-NLS-1$
- public String DEFAULT_PREFIX = "default prefix"; //$NON-NLS-1$
-}
16 years, 3 months
JBoss Tools SVN: r17727 - in trunk/hibernatetools/plugins: org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-09-25 08:09:16 -0400 (Fri, 25 Sep 2009)
New Revision: 17727
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/HibernateIdMapping.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMappingImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmIdMappingImpl.java
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaFactory.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaColumnImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmColumnImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmEntityImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmIdMapping.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateIdMappingComposite.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernateJpaUiFactory.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4795
Some additions and changes for orm.xml-style mapping.
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaFactory.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaFactory.java 2009-09-25 11:34:43 UTC (rev 17726)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaFactory.java 2009-09-25 12:09:16 UTC (rev 17727)
@@ -65,7 +65,7 @@
import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaEmbeddable;
import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaEntity;
import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaEntityImpl;
-import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaIdMapping;
+import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaIdMappingImpl;
import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaJoinColumnImpl;
import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaJoinTableImpl;
import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaManyToManyMapping;
@@ -86,7 +86,7 @@
import org.jboss.tools.hibernate.jpt.core.internal.context.orm.HibernateOrmBasicMapping;
import org.jboss.tools.hibernate.jpt.core.internal.context.orm.HibernateOrmColumnImpl;
import org.jboss.tools.hibernate.jpt.core.internal.context.orm.HibernateOrmEntityImpl;
-import org.jboss.tools.hibernate.jpt.core.internal.context.orm.HibernateOrmIdMapping;
+import org.jboss.tools.hibernate.jpt.core.internal.context.orm.HibernateOrmIdMappingImpl;
import org.jboss.tools.hibernate.jpt.core.internal.context.orm.HibernateOrmJoinColumnImpl;
import org.jboss.tools.hibernate.jpt.core.internal.context.orm.HibernateOrmJoinTableImpl;
import org.jboss.tools.hibernate.jpt.core.internal.context.orm.HibernateOrmManyToManyMapping;
@@ -121,7 +121,7 @@
@Override
public JavaIdMapping buildJavaIdMapping(JavaPersistentAttribute parent) {
- return new HibernateJavaIdMapping(parent);
+ return new HibernateJavaIdMappingImpl(parent);
}
public JavaGenericGenerator buildJavaGenericGenerator(JavaJpaContextNode parent) {
@@ -217,7 +217,7 @@
@Override
public OrmIdMapping buildOrmIdMapping(OrmPersistentAttribute parent,
XmlId resourceMapping) {
- return new HibernateOrmIdMapping(parent, resourceMapping);
+ return new HibernateOrmIdMappingImpl(parent, resourceMapping);
}
@Override
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/HibernateIdMapping.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/HibernateIdMapping.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/HibernateIdMapping.java 2009-09-25 12:09:16 UTC (rev 17727)
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.hibernate.jpt.core.internal.context.basic;
+
+import org.eclipse.jpt.core.context.IdMapping;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public interface HibernateIdMapping extends IdMapping {
+
+
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/HibernateIdMapping.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaColumnImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaColumnImpl.java 2009-09-25 11:34:43 UTC (rev 17726)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaColumnImpl.java 2009-09-25 12:09:16 UTC (rev 17727)
@@ -93,7 +93,7 @@
}
public String getSpecifiedDBTableName() {
- if (getSpecifiedName() == null) return null;
+ if (getSpecifiedTable() == null) return null;
NamingStrategy ns = getJpaProject().getNamingStrategy();
if (getJpaProject().isNamingStrategyEnabled() && ns != null){
try {
@@ -104,7 +104,7 @@
HibernateJptPlugin.logException(m.getText(), e);
}
}
- return this.getName();
+ return this.getSpecifiedTable();
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java 2009-09-25 11:34:43 UTC (rev 17726)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java 2009-09-25 12:09:16 UTC (rev 17727)
@@ -8,198 +8,18 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
+
package org.jboss.tools.hibernate.jpt.core.internal.context.java;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.context.java.JavaGenerator;
-import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.core.internal.context.java.GenericJavaIdMapping;
-import org.eclipse.jpt.utility.Filter;
-import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
-import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
-import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
-import org.eclipse.jpt.utility.internal.iterators.SingleElementIterator;
-import org.eclipse.jpt.utility.internal.iterators.SingleElementListIterator;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaFactory;
-import org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaProject;
-import org.jboss.tools.hibernate.jpt.core.internal.context.GenericGenerator;
+import org.eclipse.jpt.core.context.java.JavaIdMapping;
import org.jboss.tools.hibernate.jpt.core.internal.context.GenericGeneratorHolder;
-import org.jboss.tools.hibernate.jpt.core.internal.resource.java.GenericGeneratorAnnotation;
+import org.jboss.tools.hibernate.jpt.core.internal.context.basic.HibernateIdMapping;
/**
* @author Dmitry Geraskov
*
*/
-public class HibernateJavaIdMapping extends GenericJavaIdMapping
-implements GenericGeneratorHolder {
-
- protected JavaGenericGenerator genericGenerator;
-
- /**
- * @param parent
- */
- public HibernateJavaIdMapping(JavaPersistentAttribute parent) {
- super(parent);
- }
+public interface HibernateJavaIdMapping extends HibernateIdMapping,
+ JavaIdMapping, GenericGeneratorHolder {
- @Override
- protected void initialize() {
- super.initialize();
- this.initializeGenericGenerator();
- }
-
- @Override
- public HibernateJavaColumn getColumn() {
- return (HibernateJavaColumn) column;
- }
-
- @Override
- public String getPrimaryKeyColumnName() {
- return this.getColumn().getDBColumnName();
- }
-
- protected void initializeGenericGenerator() {
- GenericGeneratorAnnotation genericGeneratorResource = getResourceGenericGenerator();
- if (genericGeneratorResource != null) {
- this.genericGenerator = buildGenericGenerator(genericGeneratorResource);
- }
- }
-
- protected GenericGeneratorAnnotation getResourceGenericGenerator() {
- return (GenericGeneratorAnnotation) this.getResourcePersistentAttribute().getSupportingAnnotation(GenericGeneratorAnnotation.ANNOTATION_NAME);
- }
-
- protected JavaGenericGenerator buildGenericGenerator(GenericGeneratorAnnotation genericGeneratorResource) {
- JavaGenericGenerator generator = ((HibernateJpaFactory) getJpaFactory()).buildJavaGenericGenerator(this);
- generator.initialize(genericGeneratorResource);
- return generator;
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<JavaGenerator> generators() {
- return new CompositeIterator<JavaGenerator>(super.generators(),
- (getGenericGenerator() == null) ? EmptyIterator.instance()
- : new SingleElementIterator(getGenericGenerator()));
- }
-
- public JavaGenericGenerator addGenericGenerator(int index) {
- if (getGenericGenerator() != null) {
- throw new IllegalStateException("genericGenerator already exists"); //$NON-NLS-1$
- }
- this.genericGenerator = ((HibernateJpaFactory)getJpaFactory()).buildJavaGenericGenerator(this);
- GenericGeneratorAnnotation genericGeneratorResource = (GenericGeneratorAnnotation)getResourcePersistentAttribute()
- .addSupportingAnnotation(GenericGeneratorAnnotation.ANNOTATION_NAME);
- this.genericGenerator.initialize(genericGeneratorResource);
- firePropertyChanged(GENERIC_GENERATORS_LIST, null, this.genericGenerator);
- return this.genericGenerator;
- }
-
- private JavaGenericGenerator getGenericGenerator() {
- return genericGenerator;
- }
-
- private void removeGenericGenerator() {
- if (getGenericGenerator() == null) {
- throw new IllegalStateException("genericGenerator does not exist, cannot be removed"); //$NON-NLS-1$
- }
- JavaGenericGenerator oldGenericGenerator = this.genericGenerator;
- this.genericGenerator = null;
- this.getResourcePersistentAttribute().removeSupportingAnnotation(GenericGeneratorAnnotation.ANNOTATION_NAME);
- firePropertyChanged(GENERIC_GENERATORS_LIST, oldGenericGenerator,null);
- }
-
- private void setGenericGenerator(JavaGenericGenerator newGenericGenerator) {
- JavaGenericGenerator oldGenericGenerator = this.genericGenerator;
- this.genericGenerator = newGenericGenerator;
- firePropertyChanged(GENERIC_GENERATORS_LIST, oldGenericGenerator, newGenericGenerator);
- }
-
- @Override
- public void update() {
- super.update();
- updateGenericGenerator();
- }
-
- protected void updateGenericGenerator() {
- GenericGeneratorAnnotation genericGeneratorResource = getResourceGenericGenerator();
- if (genericGeneratorResource == null) {
- if (getGenericGenerator() != null) {
- setGenericGenerator(null);
- }
- }
- else {
- if (getGenericGenerator() == null) {
- setGenericGenerator(buildGenericGenerator(genericGeneratorResource));
- }
- else {
- getGenericGenerator().update(genericGeneratorResource);
- }
- }
- }
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- validateGenericGenerator(messages, reporter, astRoot);
- }
-
- private void validateGenericGenerator(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (genericGenerator != null){
- genericGenerator.validate(messages, reporter, astRoot);
- }
- }
-
- @Override
- public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter,
- CompilationUnit astRoot) {
- Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- if (this.getGenericGenerator() != null) {
- result = this.getGenericGenerator().javaCompletionProposals(pos, filter, astRoot);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
- public ListIterator<GenericGenerator> genericGenerators() {
- return genericGenerator == null ? EmptyListIterator.<GenericGenerator>instance()
- : new SingleElementListIterator<GenericGenerator>(genericGenerator);
- }
-
- public int genericGeneratorsSize() {
- return genericGenerator == null ? 0 : 1;
- }
-
- public void moveGenericGenerator(int targetIndex, int sourceIndex) {
- throw new UnsupportedOperationException();
- }
-
- public void removeGenericGenerator(int index) {
- if (genericGeneratorsSize() < index + 1){
- throw new IndexOutOfBoundsException();
- }
- removeGenericGenerator();
- }
-
- public void removeGenericGenerator(GenericGenerator generator) {
- if (this.genericGenerator == generator){
- removeGenericGenerator();
- }
- }
-
- @Override
- public HibernateJpaProject getJpaProject() {
- return (HibernateJpaProject) super.getJpaProject();
- }
-
}
Copied: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMappingImpl.java (from rev 17715, trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java)
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMappingImpl.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMappingImpl.java 2009-09-25 12:09:16 UTC (rev 17727)
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.java.JavaGenerator;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.java.GenericJavaIdMapping;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementListIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaFactory;
+import org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaProject;
+import org.jboss.tools.hibernate.jpt.core.internal.context.GenericGenerator;
+import org.jboss.tools.hibernate.jpt.core.internal.resource.java.GenericGeneratorAnnotation;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class HibernateJavaIdMappingImpl extends GenericJavaIdMapping
+implements HibernateJavaIdMapping {
+
+ protected JavaGenericGenerator genericGenerator;
+
+ /**
+ * @param parent
+ */
+ public HibernateJavaIdMappingImpl(JavaPersistentAttribute parent) {
+ super(parent);
+ }
+
+ @Override
+ protected void initialize() {
+ super.initialize();
+ this.initializeGenericGenerator();
+ }
+
+ @Override
+ public HibernateJavaColumn getColumn() {
+ return (HibernateJavaColumn) column;
+ }
+
+ @Override
+ public String getPrimaryKeyColumnName() {
+ return this.getColumn().getDBColumnName();
+ }
+
+ protected void initializeGenericGenerator() {
+ GenericGeneratorAnnotation genericGeneratorResource = getResourceGenericGenerator();
+ if (genericGeneratorResource != null) {
+ this.genericGenerator = buildGenericGenerator(genericGeneratorResource);
+ }
+ }
+
+ protected GenericGeneratorAnnotation getResourceGenericGenerator() {
+ return (GenericGeneratorAnnotation) this.getResourcePersistentAttribute().getSupportingAnnotation(GenericGeneratorAnnotation.ANNOTATION_NAME);
+ }
+
+ protected JavaGenericGenerator buildGenericGenerator(GenericGeneratorAnnotation genericGeneratorResource) {
+ JavaGenericGenerator generator = ((HibernateJpaFactory) getJpaFactory()).buildJavaGenericGenerator(this);
+ generator.initialize(genericGeneratorResource);
+ return generator;
+ }
+
+ @SuppressWarnings("unchecked")
+ public Iterator<JavaGenerator> generators() {
+ return new CompositeIterator<JavaGenerator>(super.generators(),
+ (getGenericGenerator() == null) ? EmptyIterator.instance()
+ : new SingleElementIterator(getGenericGenerator()));
+ }
+
+ public JavaGenericGenerator addGenericGenerator(int index) {
+ if (getGenericGenerator() != null) {
+ throw new IllegalStateException("genericGenerator already exists"); //$NON-NLS-1$
+ }
+ this.genericGenerator = ((HibernateJpaFactory)getJpaFactory()).buildJavaGenericGenerator(this);
+ GenericGeneratorAnnotation genericGeneratorResource = (GenericGeneratorAnnotation)getResourcePersistentAttribute()
+ .addSupportingAnnotation(GenericGeneratorAnnotation.ANNOTATION_NAME);
+ this.genericGenerator.initialize(genericGeneratorResource);
+ firePropertyChanged(GENERIC_GENERATORS_LIST, null, this.genericGenerator);
+ return this.genericGenerator;
+ }
+
+ private JavaGenericGenerator getGenericGenerator() {
+ return genericGenerator;
+ }
+
+ private void removeGenericGenerator() {
+ if (getGenericGenerator() == null) {
+ throw new IllegalStateException("genericGenerator does not exist, cannot be removed"); //$NON-NLS-1$
+ }
+ JavaGenericGenerator oldGenericGenerator = this.genericGenerator;
+ this.genericGenerator = null;
+ this.getResourcePersistentAttribute().removeSupportingAnnotation(GenericGeneratorAnnotation.ANNOTATION_NAME);
+ firePropertyChanged(GENERIC_GENERATORS_LIST, oldGenericGenerator,null);
+ }
+
+ private void setGenericGenerator(JavaGenericGenerator newGenericGenerator) {
+ JavaGenericGenerator oldGenericGenerator = this.genericGenerator;
+ this.genericGenerator = newGenericGenerator;
+ firePropertyChanged(GENERIC_GENERATORS_LIST, oldGenericGenerator, newGenericGenerator);
+ }
+
+ @Override
+ public void update() {
+ super.update();
+ updateGenericGenerator();
+ }
+
+ protected void updateGenericGenerator() {
+ GenericGeneratorAnnotation genericGeneratorResource = getResourceGenericGenerator();
+ if (genericGeneratorResource == null) {
+ if (getGenericGenerator() != null) {
+ setGenericGenerator(null);
+ }
+ }
+ else {
+ if (getGenericGenerator() == null) {
+ setGenericGenerator(buildGenericGenerator(genericGeneratorResource));
+ }
+ else {
+ getGenericGenerator().update(genericGeneratorResource);
+ }
+ }
+ }
+
+ @Override
+ public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ super.validate(messages, reporter, astRoot);
+ validateGenericGenerator(messages, reporter, astRoot);
+ }
+
+ private void validateGenericGenerator(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ if (genericGenerator != null){
+ genericGenerator.validate(messages, reporter, astRoot);
+ }
+ }
+
+ @Override
+ public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter,
+ CompilationUnit astRoot) {
+ Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+ if (result != null) {
+ return result;
+ }
+ if (this.getGenericGenerator() != null) {
+ result = this.getGenericGenerator().javaCompletionProposals(pos, filter, astRoot);
+ if (result != null) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ public ListIterator<GenericGenerator> genericGenerators() {
+ return genericGenerator == null ? EmptyListIterator.<GenericGenerator>instance()
+ : new SingleElementListIterator<GenericGenerator>(genericGenerator);
+ }
+
+ public int genericGeneratorsSize() {
+ return genericGenerator == null ? 0 : 1;
+ }
+
+ public void moveGenericGenerator(int targetIndex, int sourceIndex) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void removeGenericGenerator(int index) {
+ if (genericGeneratorsSize() < index + 1){
+ throw new IndexOutOfBoundsException();
+ }
+ removeGenericGenerator();
+ }
+
+ public void removeGenericGenerator(GenericGenerator generator) {
+ if (this.genericGenerator == generator){
+ removeGenericGenerator();
+ }
+ }
+
+ @Override
+ public HibernateJpaProject getJpaProject() {
+ return (HibernateJpaProject) super.getJpaProject();
+ }
+
+}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmColumnImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmColumnImpl.java 2009-09-25 11:34:43 UTC (rev 17726)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmColumnImpl.java 2009-09-25 12:09:16 UTC (rev 17727)
@@ -85,7 +85,7 @@
}
public String getSpecifiedDBTableName() {
- if (getSpecifiedName() == null) return null;
+ if (getSpecifiedTable() == null) return null;
NamingStrategy ns = getJpaProject().getNamingStrategy();
if (getJpaProject().isNamingStrategyEnabled() && ns != null){
try {
@@ -96,7 +96,7 @@
HibernateJptPlugin.logException(m.getText(), e);
}
}
- return this.getName();
+ return this.getSpecifiedTable();
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmEntityImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmEntityImpl.java 2009-09-25 11:34:43 UTC (rev 17726)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmEntityImpl.java 2009-09-25 12:09:16 UTC (rev 17727)
@@ -11,10 +11,12 @@
package org.jboss.tools.hibernate.jpt.core.internal.context.orm;
+import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jpt.core.context.BaseJoinColumn;
import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.Table;
import org.eclipse.jpt.core.context.TypeMapping;
import org.eclipse.jpt.core.context.orm.OrmBaseJoinColumn;
import org.eclipse.jpt.core.context.orm.OrmPersistentType;
@@ -22,6 +24,7 @@
import org.eclipse.jpt.core.resource.orm.XmlEntity;
import org.eclipse.jpt.core.utility.TextRange;
import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
import org.eclipse.wst.validation.internal.core.Message;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.hibernate.cfg.NamingStrategy;
@@ -31,6 +34,7 @@
import org.jboss.tools.hibernate.jpt.core.internal.context.GenericGenerator;
import org.jboss.tools.hibernate.jpt.core.internal.context.HibernateNamedNativeQuery;
import org.jboss.tools.hibernate.jpt.core.internal.context.HibernateNamedQuery;
+import org.jboss.tools.hibernate.jpt.core.internal.context.HibernateTable;
import org.jboss.tools.hibernate.jpt.core.internal.context.Messages;
import org.jboss.tools.hibernate.jpt.core.internal.context.HibernatePersistenceUnit.LocalMessage;
@@ -51,40 +55,15 @@
return (HibernateJpaProject) super.getJpaProject();
}
-/*
- @Override
- protected String buildDefaultName() {
- NamingStrategy ns = getJpaProject().getNamingStrategy();
- if (!isMetadataComplete()) {
- JavaEntity javaEntity = getJavaEntity();
- if (javaEntity != null) {
- return javaEntity.getName();
- }
- }
- String className = getClass_();
- if (className != null) {
- try {
- String shortCalssName = ClassTools.shortNameForClassNamed(className);
- return ns == null ? shortCalssName : ns.classToTableName(shortCalssName);
- } catch (Exception e) {
- Message m = new LocalMessage(IMessage.HIGH_SEVERITY,
- Messages.NAMING_STRATEGY_EXCEPTION, new String[0], null);
- HibernateJptPlugin.logException(m.getText(), e);
- }
- }
- return null;
- }
-
-
@Override
public String getPrimaryTableName() {
return this.getTable().getDBTableName();
- }*/
-
+ }
+
/**
* Convert Table to it's DB name.
*/
-/* @Override
+ @Override
protected Iterator<String> tableNames(Iterator<Table> tables) {
return new TransformationIterator<Table, String>(tables) {
@Override
@@ -96,7 +75,7 @@
}
}
};
- }*/
+ }
@Override
protected OrmBaseJoinColumn.Owner createPrimaryKeyJoinColumnOwner() {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmIdMapping.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmIdMapping.java 2009-09-25 11:34:43 UTC (rev 17726)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmIdMapping.java 2009-09-25 12:09:16 UTC (rev 17727)
@@ -11,46 +11,14 @@
package org.jboss.tools.hibernate.jpt.core.internal.context.orm;
-import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.core.internal.context.orm.GenericOrmIdMapping;
-import org.eclipse.jpt.core.resource.orm.XmlId;
-import org.eclipse.wst.validation.internal.core.Message;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.hibernate.cfg.NamingStrategy;
-import org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaProject;
-import org.jboss.tools.hibernate.jpt.core.internal.HibernateJptPlugin;
-import org.jboss.tools.hibernate.jpt.core.internal.context.Messages;
-import org.jboss.tools.hibernate.jpt.core.internal.context.HibernatePersistenceUnit.LocalMessage;
+import org.eclipse.jpt.core.context.orm.OrmIdMapping;
+import org.jboss.tools.hibernate.jpt.core.internal.context.basic.HibernateIdMapping;
/**
* @author Dmitry Geraskov
*
*/
-public class HibernateOrmIdMapping extends GenericOrmIdMapping<XmlId> {
+public interface HibernateOrmIdMapping extends HibernateIdMapping,
+ OrmIdMapping {
- public HibernateOrmIdMapping(OrmPersistentAttribute parent,
- XmlId resourceMapping) {
- super(parent, resourceMapping);
- }
-
- @Override
- public HibernateJpaProject getJpaProject() {
- return (HibernateJpaProject) super.getJpaProject();
- }
-
- @Override
- public String getDefaultColumnName() {
- NamingStrategy namingStrategy = getJpaProject().getNamingStrategy();
- if (getJpaProject().isNamingStrategyEnabled() && namingStrategy != null && getName() != null){
- try {
- return namingStrategy.propertyToColumnName(getName());
- } catch (Exception e) {
- Message m = new LocalMessage(IMessage.HIGH_SEVERITY,
- Messages.NAMING_STRATEGY_EXCEPTION, new String[0], null);
- HibernateJptPlugin.logException(m.getText(), e);
- }
- }
- return super.getDefaultColumnName();
- }
-
}
Copied: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmIdMappingImpl.java (from rev 17715, trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmIdMapping.java)
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmIdMappingImpl.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmIdMappingImpl.java 2009-09-25 12:09:16 UTC (rev 17727)
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.hibernate.jpt.core.internal.context.orm;
+
+import java.util.List;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.orm.GenericOrmIdMapping;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.orm.XmlId;
+import org.eclipse.wst.validation.internal.core.Message;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.hibernate.cfg.NamingStrategy;
+import org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaProject;
+import org.jboss.tools.hibernate.jpt.core.internal.HibernateJptPlugin;
+import org.jboss.tools.hibernate.jpt.core.internal.context.Messages;
+import org.jboss.tools.hibernate.jpt.core.internal.context.HibernatePersistenceUnit.LocalMessage;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class HibernateOrmIdMappingImpl extends GenericOrmIdMapping<XmlId>
+implements HibernateOrmIdMapping {
+
+ public HibernateOrmIdMappingImpl(OrmPersistentAttribute parent,
+ XmlId resourceMapping) {
+ super(parent, resourceMapping);
+ }
+
+ @Override
+ public HibernateJpaProject getJpaProject() {
+ return (HibernateJpaProject) super.getJpaProject();
+ }
+
+ @Override
+ public String getDefaultColumnName() {
+ NamingStrategy namingStrategy = getJpaProject().getNamingStrategy();
+ if (getJpaProject().isNamingStrategyEnabled() && namingStrategy != null && getName() != null){
+ try {
+ return namingStrategy.propertyToColumnName(getName());
+ } catch (Exception e) {
+ Message m = new LocalMessage(IMessage.HIGH_SEVERITY,
+ Messages.NAMING_STRATEGY_EXCEPTION, new String[0], null);
+ HibernateJptPlugin.logException(m.getText(), e);
+ }
+ }
+ return super.getDefaultColumnName();
+ }
+
+ @Override
+ public HibernateOrmColumn getColumn() {
+ return (HibernateOrmColumn) column;
+ }
+
+ @Override
+ public String getPrimaryKeyColumnName() {
+ return this.getColumn().getDBColumnName();
+ }
+
+ protected void validateColumn(List<IMessage> messages) {
+ OrmPersistentAttribute pa = this.getPersistentAttribute();
+ String tableName = this.column.getTable();
+ if (this.getTypeMapping().tableNameIsInvalid(tableName)) {
+ if (pa.isVirtual()) {
+ messages.add(
+ DefaultJpaValidationMessages.buildMessage(
+ IMessage.HIGH_SEVERITY,
+ JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLUMN_UNRESOLVED_TABLE,
+ new String[] {pa.getName(), tableName, this.getColumn().getDBColumnName()},
+ this.column,
+ this.column.getTableTextRange()
+ )
+ );
+ } else {
+ messages.add(
+ DefaultJpaValidationMessages.buildMessage(
+ IMessage.HIGH_SEVERITY,
+ JpaValidationMessages.COLUMN_UNRESOLVED_TABLE,
+ new String[] {tableName, this.getColumn().getDBColumnName()},
+ this.column,
+ this.column.getTableTextRange()
+ )
+ );
+ }
+ return;
+ }
+
+ if ( ! this.column.isResolved() && this.column.getDbTable() != null) {
+ if (pa.isVirtual()) {
+ messages.add(
+ DefaultJpaValidationMessages.buildMessage(
+ IMessage.HIGH_SEVERITY,
+ JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLUMN_UNRESOLVED_NAME,
+ new String[] {pa.getName(), this.getColumn().getDBColumnName()},
+ this.column,
+ this.column.getNameTextRange()
+ )
+ );
+ } else {
+ messages.add(
+ DefaultJpaValidationMessages.buildMessage(
+ IMessage.HIGH_SEVERITY,
+ JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+ new String[] {this.getColumn().getDBColumnName()},
+ this.column,
+ this.column.getNameTextRange()
+ )
+ );
+ }
+ }
+ }
+
+}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateIdMappingComposite.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateIdMappingComposite.java 2009-09-25 11:34:43 UTC (rev 17726)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateIdMappingComposite.java 2009-09-25 12:09:16 UTC (rev 17727)
@@ -17,6 +17,7 @@
import org.eclipse.jpt.ui.WidgetFactory;
import org.eclipse.jpt.ui.details.JpaComposite;
import org.eclipse.jpt.ui.internal.mappings.JptUiMappingsMessages;
+import org.eclipse.jpt.ui.internal.mappings.details.GenerationComposite;
import org.eclipse.jpt.ui.internal.mappings.details.TemporalTypeComposite;
import org.eclipse.jpt.ui.internal.widgets.FormPane;
import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter;
@@ -28,13 +29,14 @@
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.jboss.tools.hibernate.jpt.core.internal.context.HibernateColumn;
+import org.jboss.tools.hibernate.jpt.core.internal.context.basic.HibernateIdMapping;
import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaIdMapping;
/**
* @author Dmitry Geraskov
*
*/
-public class HibernateIdMappingComposite extends FormPane<HibernateJavaIdMapping>
+public class HibernateIdMappingComposite extends FormPane<HibernateIdMapping>
implements JpaComposite{
/**
* Creates a new <code>HibernateIdMappingComposite</code>.
@@ -43,7 +45,7 @@
* @param parent The parent container
* @param widgetFactory The factory used to create various common widgets
*/
- public HibernateIdMappingComposite(PropertyValueModel<? extends HibernateJavaIdMapping> subjectHolder,
+ public HibernateIdMappingComposite(PropertyValueModel<? extends HibernateIdMapping> subjectHolder,
Composite parent,
WidgetFactory widgetFactory) {
@@ -59,6 +61,7 @@
};
}
+ @SuppressWarnings("unchecked")
@Override
protected void initializeLayout(Composite container) {
@@ -67,8 +70,13 @@
initializeTypePane(container);
- // Generation pane
- new HibernateGenerationComposite(this, addSubPane(container, 10));
+ if (getSubject() instanceof HibernateJavaIdMapping) {
+ // Generic Generator required only for Java.
+ new HibernateGenerationComposite((FormPane<? extends HibernateJavaIdMapping>) this, addSubPane(container, 10));
+ } else {
+ new GenerationComposite(this, addSubPane(container, 10));
+ }
+
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernateJpaUiFactory.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernateJpaUiFactory.java 2009-09-25 11:34:43 UTC (rev 17726)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernateJpaUiFactory.java 2009-09-25 12:09:16 UTC (rev 17727)
@@ -17,7 +17,9 @@
import org.eclipse.jpt.core.context.java.JavaBasicMapping;
import org.eclipse.jpt.core.context.java.JavaEntity;
import org.eclipse.jpt.core.context.java.JavaIdMapping;
+import org.eclipse.jpt.core.context.orm.OrmBasicMapping;
import org.eclipse.jpt.core.context.orm.OrmEntity;
+import org.eclipse.jpt.core.context.orm.OrmIdMapping;
import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
import org.eclipse.jpt.ui.WidgetFactory;
import org.eclipse.jpt.ui.details.JpaComposite;
@@ -34,6 +36,7 @@
import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaEntity;
import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaIdMapping;
import org.jboss.tools.hibernate.jpt.core.internal.context.orm.HibernateOrmEntity;
+import org.jboss.tools.hibernate.jpt.core.internal.context.orm.HibernateOrmIdMapping;
import org.jboss.tools.hibernate.jpt.ui.internal.java.details.HibernateJavaEntityComposite;
import org.jboss.tools.hibernate.jpt.ui.internal.mapping.details.HibernateBasicMappingComposite;
import org.jboss.tools.hibernate.jpt.ui.internal.mapping.details.HibernateIdMappingComposite;
@@ -116,5 +119,22 @@
WidgetFactory widgetFactory) {
return new HibernateBasicMappingComposite(subjectHolder, parent, widgetFactory);
}
+
+ @Override
+ public JpaComposite createOrmBasicMappingComposite(
+ PropertyValueModel<OrmBasicMapping> subjectHolder,
+ Composite parent, WidgetFactory widgetFactory) {
+ return new HibernateBasicMappingComposite(subjectHolder, parent,
+ widgetFactory);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public JpaComposite createOrmIdMappingComposite(
+ PropertyValueModel<OrmIdMapping> subjectHolder,
+ Composite parent,
+ WidgetFactory widgetFactory) {
+ return new HibernateIdMappingComposite((PropertyValueModel<? extends HibernateOrmIdMapping>) subjectHolder, parent, widgetFactory);
+ }
}
\ No newline at end of file
16 years, 3 months