| <?xml version='1.0' encoding='UTF-8'?> |
| <!-- Schema file written by PDE --> |
| <schema targetNamespace="org.eclipse.wst.sse.ui" xmlns="http://www.w3.org/2001/XMLSchema"> |
| <annotation> |
| <appInfo> |
| <meta.schema plugin="org.eclipse.wst.sse.ui" id="sourcevalidation" name="Source Validation"/> |
| </appInfo> |
| <documentation> |
| This extension point is provided to allow clients to contribute a validator (<code>org.eclipse.wst.validation.internal.provisional.core.IValidator</code>) |
| for as-you-type (source) validation.<br> |
| |
| If your validator can handle "partial document" validation, it should also implement ISourceValidator. The validate call on ISourceValidator gets passed an IRegion representation of the part of the document that's dirty.<br> |
| |
| This should be much more efficient than validating the entire file each time someone types.<br> |
| |
| The validator is enabled for specific content type/partition combinations.<br> |
| |
| Required plugins are:<br> |
| org.eclipse.wst.sse.ui<br> |
| org.eclipse.wst.validation |
| </documentation> |
| </annotation> |
| |
| <element name="extension"> |
| <annotation> |
| <appInfo> |
| <meta.element /> |
| </appInfo> |
| </annotation> |
| <complexType> |
| <sequence> |
| <element ref="validator"/> |
| </sequence> |
| <attribute name="point" type="string" use="required"> |
| <annotation> |
| <documentation> |
| a fully qualified identifier of the target extension point |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="id" type="string"> |
| <annotation> |
| <documentation> |
| an optional identifier of the extension instance |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="name" type="string"> |
| <annotation> |
| <documentation> |
| an optional name of the extension instance |
| </documentation> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <element name="validator"> |
| <complexType> |
| <sequence> |
| <element ref="contentTypeIdentifier" minOccurs="1" maxOccurs="unbounded"/> |
| </sequence> |
| <attribute name="id" type="string"> |
| <annotation> |
| <documentation> |
| |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="class" type="string" use="required"> |
| <annotation> |
| <documentation> |
| |
| </documentation> |
| <appInfo> |
| <meta.attribute kind="java"/> |
| </appInfo> |
| </annotation> |
| </attribute> |
| <attribute name="scope" type="string" use="required"> |
| <annotation> |
| <documentation> |
| Either "total" or "partial", depending on whether all or just some of the document should be revalidated on changes. |
| </documentation> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <element name="partitionType"> |
| <complexType> |
| <attribute name="id" type="string"> |
| <annotation> |
| <documentation> |
| |
| </documentation> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <element name="contentTypeIdentifier"> |
| <complexType> |
| <sequence> |
| <element ref="partitionType" minOccurs="0" maxOccurs="unbounded"/> |
| </sequence> |
| <attribute name="id" type="string"> |
| <annotation> |
| <documentation> |
| |
| </documentation> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <annotation> |
| <appInfo> |
| <meta.section type="since"/> |
| </appInfo> |
| <documentation> |
| <b>This extension point is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.</b> |
| </documentation> |
| </annotation> |
| |
| <annotation> |
| <appInfo> |
| <meta.section type="examples"/> |
| </appInfo> |
| <documentation> |
| Example demonstrating how HTMLValidator contributes to as-you-type validation in the source editor. |
| |
| <pre> |
| <extension |
| point="org.eclipse.wst.sse.ui.extensions.sourcevalidation"> |
| <validator |
| scope="total" |
| class="org.eclipse.wst.validation.html.HTMLValidator" |
| id="org.eclipse.wst.validation.htmlsourcevalidator"> |
| <contentTypeIdentifier |
| id="org.eclipse.wst.html.core.htmlsource"> |
| <partitionType |
| id="org.eclipse.wst.html.HTML_DEFAULT"/> |
| </contentTypeIdentifier> |
| <contentTypeIdentifier |
| id="org.eclipse.jst.jsp.core.jspsource"> |
| <partitionType |
| id="org.eclipse.wst.html.HTML_DEFAULT"/> |
| </contentTypeIdentifier> |
| </validator> |
| </extension> |
| </pre> |
| <p> |
| Using ISourceValidator |
| </p> |
| <p> |
| If your validator can handle "partial document" validation, it should implement ISourceValidator. |
| </p> |
| <p> |
| The validate call on ISourceValidator gets passed an IRegion of the document which represents just the part that's dirty. This should be much more efficient than validating the entire file each time someone types. |
| </p> |
| <p> |
| ISourceValidator has its "connect(IDocument doc)" method called when it's hooked up to the document (when the editor is opened), and "disconnect(IDocument doc)" called when the editor is closed, where any "unhooking" should take place. |
| </p> |
| </documentation> |
| </annotation> |
| |
| |
| <annotation> |
| <appInfo> |
| <meta.section type="implementation"/> |
| </appInfo> |
| <documentation> |
| Currently there is no supplied implementation for IValidator. |
| </documentation> |
| </annotation> |
| |
| <annotation> |
| <appInfo> |
| <meta.section type="copyright"/> |
| </appInfo> |
| <documentation> |
| Copyright (c) 2005 IBM Corporation and others.<br> |
| All rights reserved. This program and the accompanying materials are made |
| available under the terms of the Eclipse Public License v1.0 which accompanies |
| this distribution, and is available at <a |
| href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> |
| </documentation> |
| </annotation> |
| |
| </schema> |