Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 92107 Details for
Bug 222151
[tests][patch] Add new PDESchemaHelper tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
org.eclipse.pde.ui.tests.patch
org.eclipse.pde.ui.tests.patch (text/plain), 15.91 KB, created by
Chris Aniszczyk
on 2008-03-10 21:30:00 EDT
(
hide
)
Description:
org.eclipse.pde.ui.tests.patch
Filename:
MIME Type:
Creator:
Chris Aniszczyk
Created:
2008-03-10 21:30:00 EDT
Size:
15.91 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.ui.tests >Index: src/org/eclipse/pde/ui/tests/model/schema/AllSchemaModelTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/model/schema/AllSchemaModelTests.java,v >retrieving revision 1.1 >diff -u -r1.1 AllSchemaModelTests.java >--- src/org/eclipse/pde/ui/tests/model/schema/AllSchemaModelTests.java 18 Feb 2008 14:50:14 -0000 1.1 >+++ src/org/eclipse/pde/ui/tests/model/schema/AllSchemaModelTests.java 11 Mar 2008 01:25:33 -0000 >@@ -17,6 +17,7 @@ > > public static Test suite() { > TestSuite suite = new TestSuite("Test Suite for testing the schema model"); //$NON-NLS-1$ >+ suite.addTestSuite(SchemaIdentifierAttributeTestCase.class); > return suite; > } > >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui.tests/plugin.xml,v >retrieving revision 1.14 >diff -u -r1.14 plugin.xml >--- plugin.xml 22 Mar 2005 18:34:33 -0000 1.14 >+++ plugin.xml 11 Mar 2008 01:25:33 -0000 >@@ -3,6 +3,9 @@ > <plugin> > > <extension-point id="macroSupport" name="Macro Support" schema="schema/macroSupport.exsd"/> >+ <extension-point id="oldIdentifierTest" name="oldIdentifierTest" schema="schema/identifierTests/oldIdentifierTest.exsd"/> >+ <extension-point id="newIdentifierTest" name="newIdentifierTest" schema="schema/identifierTests/newIdentifierTest.exsd"/> >+ <extension-point id="sampleIdentifierTest" name="sampleIdentifierTest" schema="schema/identifierTests/sampleIdentifierTest.exsd"/> > <extension > point="org.eclipse.ui.actionSets"> > <actionSet >@@ -85,5 +88,5 @@ > commandId="org.eclipse.pde.ui.tests.index" > keySequence="Ctrl+Shift+F10" > keyConfigurationId="org.eclipse.ui.defaultAcceleratorConfiguration"/> >- </extension> >-</plugin> >\ No newline at end of file >+ </extension>> >+</plugin> >Index: schema/identifierTests/newIdentifierTest.exsd >=================================================================== >RCS file: schema/identifierTests/newIdentifierTest.exsd >diff -N schema/identifierTests/newIdentifierTest.exsd >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ schema/identifierTests/newIdentifierTest.exsd 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,94 @@ >+<?xml version='1.0' encoding='UTF-8'?> >+<!-- Schema file written by PDE --> >+<schema targetNamespace="org.eclipse.pde.ui.tests" xmlns="http://www.w3.org/2001/XMLSchema"> >+<annotation> >+ <appinfo> >+ <meta.schema plugin="org.eclipse.pde.ui.tests" id="newIdentifierTest" name="newIdentifierTest"/> >+ </appinfo> >+ <documentation> >+ [Enter description of this extension point.] >+ </documentation> >+ </annotation> >+ >+ <element name="extension"> >+ <complexType> >+ <sequence> >+ <element ref="A" minOccurs="0" maxOccurs="unbounded"/> >+ </sequence> >+ <attribute name="point" type="string" use="required"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="id" type="string"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="name" type="string"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ <appinfo> >+ <meta.attribute translatable="true"/> >+ </appinfo> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <element name="A"> >+ <complexType> >+ <attribute name="id" type="string" use="required"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="since"/> >+ </appinfo> >+ <documentation> >+ [Enter the first release in which this extension point appears.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="examples"/> >+ </appinfo> >+ <documentation> >+ [Enter extension point usage example here.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="apiinfo"/> >+ </appinfo> >+ <documentation> >+ [Enter API information here.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="implementation"/> >+ </appinfo> >+ <documentation> >+ [Enter information about supplied implementation of this extension point.] >+ </documentation> >+ </annotation> >+ >+ >+</schema> >Index: src/org/eclipse/pde/ui/tests/model/schema/SchemaIdentifierAttributeTestCase.java >=================================================================== >RCS file: src/org/eclipse/pde/ui/tests/model/schema/SchemaIdentifierAttributeTestCase.java >diff -N src/org/eclipse/pde/ui/tests/model/schema/SchemaIdentifierAttributeTestCase.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/ui/tests/model/schema/SchemaIdentifierAttributeTestCase.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,78 @@ >+/******************************************************************************* >+ * Copyright (c) 2008 IBM Corporation and others. >+ * 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.pde.ui.tests.model.schema; >+ >+import junit.framework.Test; >+import junit.framework.TestSuite; >+import org.eclipse.pde.core.plugin.IPluginExtension; >+import org.eclipse.pde.internal.core.PDECore; >+import org.eclipse.pde.internal.core.ischema.ISchema; >+import org.eclipse.pde.internal.core.ischema.ISchemaElement; >+import org.eclipse.pde.internal.core.schema.SchemaRegistry; >+import org.eclipse.pde.ui.tests.model.xml.XMLModelTestCase; >+ >+public class SchemaIdentifierAttributeTestCase extends XMLModelTestCase { >+ >+ public static Test suite() { >+ return new TestSuite(SchemaIdentifierAttributeTestCase.class); >+ } >+ >+ public void testBuildingReferenceIdentifiers() { >+ >+ } >+ >+ public void testOldStyleIdentifier() { >+ StringBuffer sb = new StringBuffer(); >+ sb.append("<extension id=\"oldSchoolID1\" point=\"org.eclipse.pde.ui.tests.oldIdentifierTest\"></extension>"); >+ sb.append("<extension id=\"oldSchoolID2\" point=\"org.eclipse.pde.ui.tests.oldIdentifierTest\"></extension>"); >+ sb.append("<extension point=\"org.eclipse.pde.ui.tests.sampleIdentifierTest\">"); >+ sb.append("<oldIdentifier someId=\"id1\"/>"); >+ sb.append("</extension>"); >+ >+ setXMLContents(sb, LF); >+ load(); >+ >+ IPluginExtension[] extensions = fModel.getPluginBase().getExtensions(); >+ assertEquals(extensions.length, 3); >+ >+ // test for schema things >+ SchemaRegistry registry = PDECore.getDefault().getSchemaRegistry(); >+ ISchema schema = registry.getSchema("org.eclipse.pde.ui.tests.oldIdentifierTest"); >+ assertNotNull(schema); >+ >+ ISchemaElement element = schema.findElement("element"); >+ >+ } >+ >+ public void testNewStyleIdentifier() { >+ StringBuffer sb = new StringBuffer(); >+ sb.append("<extension point=\"org.eclipse.pde.ui.tests.newIdentifierTest\">"); >+ sb.append("<A id=\"id1\"></A>"); >+ sb.append("<A id=\"id2\"></A>"); >+ sb.append("<A id=\"id3\"></A>"); >+ sb.append("</extension>"); >+ sb.append("<extension point=\"org.eclipse.pde.ui.tests.sampleIdentifierTest\">"); >+ sb.append("<simpleIdentifier someId=\"id1\">"); >+ sb.append("</simpleIdentifier>"); >+ sb.append("<complexIdentifier someId=\"id1\">"); >+ sb.append("</complexIdentifier>"); >+ sb.append("<oldIdentifier someId=\"id1\">"); >+ sb.append("</oldIdentifier>"); >+ sb.append("</extension>"); >+ >+ setXMLContents(sb, LF); >+ load(); >+ >+ IPluginExtension[] extensions = fModel.getPluginBase().getExtensions(); >+ assertEquals(extensions.length, 2); >+ } >+ >+} >Index: schema/identifierTests/oldIdentifierTest.exsd >=================================================================== >RCS file: schema/identifierTests/oldIdentifierTest.exsd >diff -N schema/identifierTests/oldIdentifierTest.exsd >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ schema/identifierTests/oldIdentifierTest.exsd 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,81 @@ >+<?xml version='1.0' encoding='UTF-8'?> >+<!-- Schema file written by PDE --> >+<schema targetNamespace="org.eclipse.pde.ui.tests" xmlns="http://www.w3.org/2001/XMLSchema"> >+<annotation> >+ <appinfo> >+ <meta.schema plugin="org.eclipse.pde.ui.tests" id="oldIdentifierTest" name="oldIdentifierTest"/> >+ </appinfo> >+ <documentation> >+ [Enter description of this extension point.] >+ </documentation> >+ </annotation> >+ >+ <element name="extension"> >+ <complexType> >+ <sequence> >+ </sequence> >+ <attribute name="point" type="string" use="required"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="id" type="string" use="required"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="name" type="string"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ <appinfo> >+ <meta.attribute translatable="true"/> >+ </appinfo> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="since"/> >+ </appinfo> >+ <documentation> >+ [Enter the first release in which this extension point appears.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="examples"/> >+ </appinfo> >+ <documentation> >+ [Enter extension point usage example here.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="apiinfo"/> >+ </appinfo> >+ <documentation> >+ [Enter API information here.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="implementation"/> >+ </appinfo> >+ <documentation> >+ [Enter information about supplied implementation of this extension point.] >+ </documentation> >+ </annotation> >+ >+ >+</schema> >Index: schema/identifierTests/sampleIdentifierTest.exsd >=================================================================== >RCS file: schema/identifierTests/sampleIdentifierTest.exsd >diff -N schema/identifierTests/sampleIdentifierTest.exsd >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ schema/identifierTests/sampleIdentifierTest.exsd 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,139 @@ >+<?xml version='1.0' encoding='UTF-8'?> >+<!-- Schema file written by PDE --> >+<schema targetNamespace="org.eclipse.pde.ui.tests" xmlns="http://www.w3.org/2001/XMLSchema"> >+<annotation> >+ <appinfo> >+ <meta.schema plugin="org.eclipse.pde.ui.tests" id="sampleIdentifierTest" name="sampleIdentifierTest"/> >+ </appinfo> >+ <documentation> >+ [Enter description of this extension point.] >+ </documentation> >+ </annotation> >+ >+ <element name="extension"> >+ <complexType> >+ <sequence> >+ <element ref="complexIdentifier" minOccurs="0" maxOccurs="unbounded"/> >+ <element ref="simpleIdentifier" minOccurs="0" maxOccurs="unbounded"/> >+ <element ref="oldIdentifier" minOccurs="0" maxOccurs="unbounded"/> >+ </sequence> >+ <attribute name="point" type="string" use="required"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="id" type="string"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="name" type="string"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ <appinfo> >+ <meta.attribute translatable="true"/> >+ </appinfo> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <element name="simpleIdentifier"> >+ <complexType> >+ <attribute name="someId" type="string" use="required"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ <appinfo> >+ <meta.attribute kind="identifier" basedOn="org.eclipse.pde.ui.tests.newIdentifierTest/A/@id"/> >+ </appinfo> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <element name="complexIdentifier"> >+ <complexType> >+ <attribute name="someId" use="required"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ <appinfo> >+ <meta.attribute kind="identifier" basedOn="org.eclipse.pde.ui.tests.newIdentifierTest/A/@id"/> >+ </appinfo> >+ </annotation> >+ <simpleType> >+ <restriction base="string"> >+ <enumeration value="test1"> >+ </enumeration> >+ <enumeration value="test2"> >+ </enumeration> >+ <enumeration value="test3"> >+ </enumeration> >+ </restriction> >+ </simpleType> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <element name="oldIdentifier"> >+ <complexType> >+ <attribute name="someId" type="string" use="required"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ <appinfo> >+ <meta.attribute kind="identifier" basedOn="org.eclipse.pde.ui.tests.oldIdentifierTest/@id"/> >+ </appinfo> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="since"/> >+ </appinfo> >+ <documentation> >+ [Enter the first release in which this extension point appears.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="examples"/> >+ </appinfo> >+ <documentation> >+ [Enter extension point usage example here.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="apiinfo"/> >+ </appinfo> >+ <documentation> >+ [Enter API information here.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="implementation"/> >+ </appinfo> >+ <documentation> >+ [Enter information about supplied implementation of this extension point.] >+ </documentation> >+ </annotation> >+ >+ >+</schema>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 222151
: 92107