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 134191 Details for
Bug 267962
API - Tag drop needs to be decoupled from the palette entry
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Test patch
267962-patch-test.txt (text/plain), 50.49 KB, created by
Raghunathan Srinivasan
on 2009-05-03 20:59:10 EDT
(
hide
)
Description:
Test patch
Filename:
MIME Type:
Creator:
Raghunathan Srinivasan
Created:
2009-05-03 20:59:10 EDT
Size:
50.49 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.pagedesigner.tests >Index: src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorJSP.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorJSP.java,v >retrieving revision 1.4 >diff -u -r1.4 TestDefaultTagCreatorJSP.java >--- src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorJSP.java 27 Mar 2009 19:38:30 -0000 1.4 >+++ src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorJSP.java 4 May 2009 00:55:42 -0000 >@@ -11,7 +11,6 @@ > package org.eclipse.jst.pagedesigner.tests.tagcreator; > > import org.eclipse.jst.jsf.core.internal.tld.TagIdentifierFactory; >-import org.eclipse.jst.pagedesigner.tests.tagcreator.base.BaseTagCreatorTestCase; > > public class TestDefaultTagCreatorJSP extends BaseDefaultTagCreatorTestCase > { >@@ -34,7 +33,7 @@ > > public void testIncludeDirective() throws Exception > { >- doCreateTest(TagIdentifierFactory.createJSPTagWrapper("jsp11", "jsp:directive.include"), "jsp", "jsp", 349,false); >- doCreateTest(TagIdentifierFactory.createJSPTagWrapper("jsp11", "jsp:directive.include"), "jspx", "jspx", 492,false); >+ doCreateTest(TagIdentifierFactory.createJSPTagWrapper("jsp11", "jsp:directive.include"), "jsp", "jsp", 349,false, null); >+ doCreateTest(TagIdentifierFactory.createJSPTagWrapper("jsp11", "jsp:directive.include"), "jspx", "jspx", 492,false, null); > } > } >Index: src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_ParentCustomization.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_ParentCustomization.java,v >retrieving revision 1.2 >diff -u -r1.2 TestUserCustomizedTagCreatorForJSFHTML_ParentCustomization.java >--- src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_ParentCustomization.java 28 Apr 2009 22:38:26 -0000 1.2 >+++ src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_ParentCustomization.java 4 May 2009 00:55:42 -0000 >@@ -1,8 +1,8 @@ > package org.eclipse.jst.pagedesigner.tests.tagcreator; > >-import org.eclipse.core.runtime.IAdaptable; > import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants; > import org.eclipse.jst.pagedesigner.itemcreation.customizer.CustomizationDataImpl; >+import org.eclipse.jst.pagedesigner.itemcreation.customizer.ICustomizationData; > import org.eclipse.jst.pagedesigner.itemcreation.customizer.IWritableCustomizationData; > import org.eclipse.jst.pagedesigner.tests.tagcreatorPlugin.UserCustomizedElementEditFactory; > >@@ -24,14 +24,12 @@ > > public void testParentTagInsertion() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jsp", "jsp", 358, false); >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jspx", "jspx", 495, false); >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "xhtml", "xhtml", 350, false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jsp", "jsp", 358, false, getCustomizationData()); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jspx", "jspx", 495, false, getCustomizationData()); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "xhtml", "xhtml", 350, false, getCustomizationData()); > } > >- >- @Override >- protected IAdaptable getCustomizationData() >+ protected ICustomizationData getCustomizationData() > { > // Setup tag > IWritableCustomizationData data = new CustomizationDataImpl(getTagIdentifier()); >@@ -63,7 +61,7 @@ > IWritableCustomizationData parent2 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG3); > data.addParentData(parent2); > >- return (IAdaptable) data; >+ return data; > } > > >Index: src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_GeneralCustomization.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_GeneralCustomization.java,v >retrieving revision 1.2 >diff -u -r1.2 TestUserCustomizedTagCreatorForJSFHTML_GeneralCustomization.java >--- src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_GeneralCustomization.java 27 Apr 2009 23:40:06 -0000 1.2 >+++ src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_GeneralCustomization.java 4 May 2009 00:55:42 -0000 >@@ -1,8 +1,8 @@ > package org.eclipse.jst.pagedesigner.tests.tagcreator; > >-import org.eclipse.core.runtime.IAdaptable; > import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants; > import org.eclipse.jst.pagedesigner.itemcreation.customizer.CustomizationDataImpl; >+import org.eclipse.jst.pagedesigner.itemcreation.customizer.ICustomizationData; > import org.eclipse.jst.pagedesigner.itemcreation.customizer.IWritableCustomizationData; > import org.eclipse.jst.pagedesigner.tests.tagcreatorPlugin.UserCustomizedElementEditFactory; > >@@ -25,14 +25,13 @@ > > public void testGeneralCustomization() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jsp", "jsp", 358, false); >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jspx", "jspx", 495, false); >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "xhtml", "xhtml", 350, false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jsp", "jsp", 358, false, getCustomizationData()); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jspx", "jspx", 495, false, getCustomizationData()); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "xhtml", "xhtml", 350, false, getCustomizationData()); > } > > >- @Override >- protected IAdaptable getCustomizationData() >+ protected ICustomizationData getCustomizationData() > { > IWritableCustomizationData tagDropped = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG1); > tagDropped.addAttribute("attr1", "value1"); >Index: src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestTagCreationFactory.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestTagCreationFactory.java,v >retrieving revision 1.4 >diff -u -r1.4 TestTagCreationFactory.java >--- src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestTagCreationFactory.java 2 May 2008 19:49:06 -0000 1.4 >+++ src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestTagCreationFactory.java 4 May 2009 00:55:42 -0000 >@@ -4,7 +4,7 @@ > * 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: > * Oracle Corporation - initial API and implementation > *******************************************************************************/ >@@ -38,14 +38,14 @@ > * @author cbateman > * > */ >-public class TestTagCreationFactory extends BaseTestClass >+public class TestTagCreationFactory extends BaseTestClass > { > public TestTagCreationFactory() { > super("jsf"); > } > > @Override >- protected void setUp() throws Exception >+ protected void setUp() throws Exception > { > super.setUp(); > >@@ -58,7 +58,7 @@ > } > > @Override >- protected void tearDown() throws Exception >+ protected void tearDown() throws Exception > { > super.tearDown(); > } >@@ -72,8 +72,8 @@ > > CreationData creationData = > getCreationData(TestCreationFactory.TAGCREATOR_URI_1 >- , "tagWithRequiredAttr", "test", jspFile, 501); >- Element element = CommandUtil.excuteInsertion(creationData.getTagEntry() >+ , "tagWithRequiredAttr", "test", jspFile, 501, null); >+ Element element = CommandUtil.executeInsertion(creationData.getTagCreationProvider() > , creationData.getModel() > , creationData.getDomPosition() > , creationData.getDropCustomizationData()); >@@ -96,18 +96,18 @@ > ,"/testEnsureRequiredAttributes2.jsp"); > creationData = > getCreationData(TestCreationFactory.TAGCREATOR_URI_1 >- , "tagWithRequiredAttr2", "test", jspFile, 501); >- element = CommandUtil.excuteInsertion(creationData.getTagEntry() >+ , "tagWithRequiredAttr2", "test", jspFile, 501, null); >+ element = CommandUtil.executeInsertion(creationData.getTagCreationProvider() > , creationData.getModel() > , creationData.getDomPosition() > , creationData.getDropCustomizationData()); >- >+ > // on this tag, the first required attr is set by metadata > assertEquals("foobar", element.getAttribute(TestCreationFactory.REQUIRED_ATTR_1)); > // the second one is not set by meta-data, but is required and ensure is called > // by the custom advisor, so it should be set to empty > assertEquals("", element.getAttribute(TestCreationFactory.REQUIRED_ATTR_2)); >- >+ > // the optional attribute is not set by meta-data and since it's not required, > // the ensure method should not touch it either. > assertNull(element.getAttribute("notRequiredAttr1")); >@@ -115,15 +115,16 @@ > > public void testTagCreationMetadata() throws Exception > { >- IFile jspFile = (IFile) _webProjectTestEnv.loadResourceInWebRoot( >+ final IFile jspFile = (IFile) _webProjectTestEnv.loadResourceInWebRoot( > PageDesignerTestsPlugin.getDefault().getBundle() > ,"/testdata/tagcreator/testTagCreation.jsp.data" > ,"/testTagCreationMetadata.jsp"); > >- CreationData creationData = >+ final CreationData creationData = > getCreationData(TestCreationFactory.TAGCREATOR_URI_1 >- , "tagWithMetadata", "test", jspFile, 501); >- Element element = CommandUtil.excuteInsertion(creationData.getTagEntry() >+ , "tagWithMetadata", "test", jspFile, 501, null); >+ final Element element = CommandUtil.executeInsertion( >+ creationData.getTagCreationProvider() > , creationData.getModel() > , creationData.getDomPosition() > , creationData.getDropCustomizationData()); >@@ -155,26 +156,26 @@ > */ > public void testBug197042() throws Exception > { >- IFile jspFile = (IFile) _webProjectTestEnv.loadResourceInWebRoot( >+ final IFile jspFile = (IFile) _webProjectTestEnv.loadResourceInWebRoot( > PageDesignerTestsPlugin.getDefault().getBundle() > ,"/testdata/tagcreator/tagCreator.jspx.data" > ,"/testTagCreationMetadata.jsp"); > >- final String uri = >+ final String uri = > IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON.getUri(); >- final String tagName = >+ final String tagName = > IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON.getTagName(); >- CreationData creationData = >- getCreationData(uri,tagName,"h", jspFile, 495); >+ final CreationData creationData = >+ getCreationData(uri,tagName,"h", jspFile, 495, null); > >- ITagCreator tagCreator = TagCreationFactory.getInstance() >+ final ITagCreator tagCreator = TagCreationFactory.getInstance() > .createTagCreator(creationData.getTagId()); > >- Element element = tagCreator.createTag(creationData); >+ final Element element = tagCreator.createTag(creationData); > > System.out.println(element.toString()); > >- ByteArrayOutputStream resultStream = new ByteArrayOutputStream(); >+ final ByteArrayOutputStream resultStream = new ByteArrayOutputStream(); > getDocumentContext(0, jspFile).getModel().save(resultStream); > > final IPath expectedPath = JSFTestUtil.getAbsolutePath( >@@ -188,14 +189,14 @@ > > public void testDropCustomizerThatCancels() throws Exception > { >- IFile jspFile = (IFile) _webProjectTestEnv.loadResourceInWebRoot( >+ final IFile jspFile = (IFile) _webProjectTestEnv.loadResourceInWebRoot( > PageDesignerTestsPlugin.getDefault().getBundle() > ,"/testdata/tagcreator/tagCreator.jsp.data" > ,"/testCustomizerCancel.jsp"); > > TestCreationFactory.setTestParametersForDropCustomer(Status.CANCEL_STATUS, null); > >- MockItemCreationTool tool = >+ final MockItemCreationTool tool = > createMockItemCreationTool(jspFile, 358, TestCreationFactory.TAG_WITH_REQUIRED_ATTR, IStatus.CANCEL); > > tool.customizeDropAndMaybeExecute(0); >@@ -206,17 +207,17 @@ > @SuppressWarnings("unchecked") > public void testDropCustomizationDataAcquistion() throws Exception > { >- IFile jspFile = (IFile) _webProjectTestEnv.loadResourceInWebRoot( >+ final IFile jspFile = (IFile) _webProjectTestEnv.loadResourceInWebRoot( > PageDesignerTestsPlugin.getDefault().getBundle() > ,"/testdata/tagcreator/tagCreator.jsp.data" > ,"/testCustomizerCancel.jsp"); > >- IAdaptable adaptable = new IAdaptable() >+ final IAdaptable adaptable = new IAdaptable() > { >- public Object getAdapter(Class adapter) { >+ public Object getAdapter(final Class adapter) { > if (Map.class == adapter) > { >- HashMap<String, String> map = new HashMap<String, String>(); >+ final HashMap<String, String> map = new HashMap<String, String>(); > map.put("color", "red"); > return map; > } >@@ -226,27 +227,27 @@ > > TestCreationFactory.setTestParametersForDropCustomer(Status.OK_STATUS, adaptable); > >- MockItemCreationTool tool = >+ final MockItemCreationTool tool = > createMockItemCreationTool(jspFile, 358, TestCreationFactory.TAG_WITH_REQUIRED_ATTR, IStatus.CANCEL); > > tool.customizeDropAndMaybeExecute(0); >- Object[] commands = tool.getDomain().getCommandStack().getCommands(); >+ final Object[] commands = tool.getDomain().getCommandStack().getCommands(); > assertEquals(1, commands.length); > assertTrue(commands[0] instanceof MockCreateItemCommand); >- >- IAdaptable value = ((MockCreateItemCommand)commands[0]).getCustomizationDataTesting(); >+ >+ final IAdaptable value = ((MockCreateItemCommand)commands[0]).getCustomizationDataTesting(); > assertEquals(adaptable, value); >- Map map = (Map) value.getAdapter(Map.class); >+ final Map map = (Map) value.getAdapter(Map.class); > assertNotNull(map); > assertEquals("red", map.get("color")); > } >- >- private void assertExpectedResult(IFile file, String outExt) throws Exception >+ >+ private void assertExpectedResult(final IFile file, final String outExt) throws Exception > { > final ByteArrayOutputStream resultStream = new ByteArrayOutputStream(); > getDocumentContext(0, file).getModel().save(resultStream); > >- final String expected = >+ final String expected = > getExpectedResult("/testdata/tagcreator/tagCreator."+outExt+".data").trim(); > final String result = resultStream.toString("ISO-8859-1").trim(); > >Index: src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorHTML.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorHTML.java,v >retrieving revision 1.4 >diff -u -r1.4 TestDefaultTagCreatorHTML.java >--- src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorHTML.java 27 Mar 2009 19:38:30 -0000 1.4 >+++ src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorHTML.java 4 May 2009 00:55:42 -0000 >@@ -11,7 +11,6 @@ > package org.eclipse.jst.pagedesigner.tests.tagcreator; > > import org.eclipse.jst.jsf.core.internal.tld.TagIdentifierFactory; >-import org.eclipse.jst.pagedesigner.tests.tagcreator.base.BaseTagCreatorTestCase; > import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMDocType; > > /** >@@ -40,7 +39,7 @@ > > public void testCreateButton() throws Exception > { >- doCreateTest(TagIdentifierFactory.createJSPTagWrapper(CMDocType.HTML_DOC_TYPE, "INPUT.BUTTON"), "html", "html", 358,false); >- doCreateTest(TagIdentifierFactory.createJSPTagWrapper(CMDocType.HTML_DOC_TYPE, "INPUT.BUTTON"), "xhtml", "xhtml", 350,false); >+ doCreateTest(TagIdentifierFactory.createJSPTagWrapper(CMDocType.HTML_DOC_TYPE, "INPUT.BUTTON"), "html", "html", 358,false, null); >+ doCreateTest(TagIdentifierFactory.createJSPTagWrapper(CMDocType.HTML_DOC_TYPE, "INPUT.BUTTON"), "xhtml", "xhtml", 350,false, null); > } > } >Index: src/org/eclipse/jst/pagedesigner/tests/tagcreator/BaseUserCustomizedTagCreatorTestCase.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/BaseUserCustomizedTagCreatorTestCase.java,v >retrieving revision 1.1 >diff -u -r1.1 BaseUserCustomizedTagCreatorTestCase.java >--- src/org/eclipse/jst/pagedesigner/tests/tagcreator/BaseUserCustomizedTagCreatorTestCase.java 27 Mar 2009 19:38:30 -0000 1.1 >+++ src/org/eclipse/jst/pagedesigner/tests/tagcreator/BaseUserCustomizedTagCreatorTestCase.java 4 May 2009 00:55:42 -0000 >@@ -1,6 +1,8 @@ > package org.eclipse.jst.pagedesigner.tests.tagcreator; > > import org.eclipse.jst.jsf.common.dom.TagIdentifier; >+import org.eclipse.jst.pagedesigner.editors.palette.ITagDropSourceData; >+import org.eclipse.jst.pagedesigner.editors.palette.TagToolCreationAdapter; > import org.eclipse.jst.pagedesigner.editors.palette.TagToolPaletteEntry; > import org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteItemManager; > import org.eclipse.jst.pagedesigner.editors.palette.impl.TaglibPaletteDrawer; >@@ -63,20 +65,26 @@ > return new UserCustomizedTagCreator(); > } > >- >- /** >- * Adds a tag to a section in the tool palette. >- * >- * @param tagId >- * TagIdentifier of tag to add >- * @param category >- * Category in the tool palette >- * >- */ >- private final void addTagToPaletteCategory(final TagIdentifier tagId, final TaglibPaletteDrawer category) >- { >- final TagToolPaletteEntry paletteItem = new TagToolPaletteEntry(tagId.getTagName(), TAG_LABEL, TAG_DESCRIPTION_SHORT, null, null); >- category.getChildren().add(paletteItem); >- paletteItem.setParent(category); >- } >+ >+ /** >+ * Adds a tag to a section in the tool palette. >+ * >+ * @param tagId >+ * TagIdentifier of tag to add >+ * @param category >+ * Category in the tool palette >+ * >+ */ >+ @SuppressWarnings("unchecked") >+ private final void addTagToPaletteCategory(final TagIdentifier tagId, >+ final TaglibPaletteDrawer category) >+ { >+ final ITagDropSourceData tagDropSourceData = new TagToolCreationAdapter( >+ tagId.getUri(), tagId.getTagName(), >+ category.getDefaultPrefix(), tagId.getTagName()); >+ final TagToolPaletteEntry paletteItem = new TagToolPaletteEntry( >+ tagDropSourceData, TAG_LABEL, TAG_DESCRIPTION_SHORT, null, null); >+ category.getChildren().add(paletteItem); >+ paletteItem.setParent(category); >+ } > } >Index: src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorForJSFHTML.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorForJSFHTML.java,v >retrieving revision 1.4 >diff -u -r1.4 TestDefaultTagCreatorForJSFHTML.java >--- src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorForJSFHTML.java 27 Mar 2009 19:38:30 -0000 1.4 >+++ src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorForJSFHTML.java 4 May 2009 00:55:42 -0000 >@@ -33,119 +33,119 @@ > > public void testCreateButton() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jsp", "jsp", 358,false); >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jspx", "jspx", 495,false); >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "xhtml", "xhtml", 350,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jsp", "jsp", 358,false, null); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jspx", "jspx", 495,false, null); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "xhtml", "xhtml", 350,false, null); > } > > public void testCreateCommandLink() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDLINK, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDLINK, "jsp", "jsp", 358,false, null); > } > > public void testCreatePanelGrid() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_PANEL_GRID, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_PANEL_GRID, "jsp", "jsp", 358,false, null); > } > > public void testCreateDataTable() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_DATA_TABLE, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_DATA_TABLE, "jsp", "jsp", 358,false, null); > } > > public void testCreateForm() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_FORM, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_FORM, "jsp", "jsp", 358,false, null); > } > > public void testCreateGraphicImage() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_GRAPHICIMAGE, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_GRAPHICIMAGE, "jsp", "jsp", 358,false, null); > } > > public void testCreateInputHidden() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_INPUTHIDDEN, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_INPUTHIDDEN, "jsp", "jsp", 358,false, null); > } > > public void testCreateMessage() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_MESSAGE, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_MESSAGE, "jsp", "jsp", 358,false, null); > } > > public void testCreateMessages() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_MESSAGES, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_MESSAGES, "jsp", "jsp", 358,false, null); > } > > public void testCreateOutputFormat() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_OUTPUTFORMAT, "jsp", "jsp", 358,true); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_OUTPUTFORMAT, "jsp", "jsp", 358,true, null); > } > > public void testCreateOutputLabel() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_OUTPUTLABEL, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_OUTPUTLABEL, "jsp", "jsp", 358,false, null); > } > > public void testCreateOutputText() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_OUTPUTTEXT, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_OUTPUTTEXT, "jsp", "jsp", 358,false, null); > } > > public void testCreatePanelGroup() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_PANEL_GROUP, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_PANEL_GROUP, "jsp", "jsp", 358,false, null); > } > > public void testCreateInputSecret() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_INPUTSECRET, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_INPUTSECRET, "jsp", "jsp", 358,false, null); > } > > public void testCreateSelectBooleanCheckbox() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTBOOLEANCHECKBOX, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTBOOLEANCHECKBOX, "jsp", "jsp", 358,false, null); > } > > public void testCreateSelectManyCheckbox() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTMANYCHECKBOX, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTMANYCHECKBOX, "jsp", "jsp", 358,false, null); > } > > public void testCreateSelectManyListbox() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTMANYLISTBOX, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTMANYLISTBOX, "jsp", "jsp", 358,false, null); > } > > public void testCreateSelectManyMenu() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTMANYMENU, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTMANYMENU, "jsp", "jsp", 358,false, null); > } > > public void testCreateSelectOneListbox() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTONELISTBOX, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTONELISTBOX, "jsp", "jsp", 358,false, null); > } > > public void testCreateSelectOneMenu() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTONEMENU, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTONEMENU, "jsp", "jsp", 358,false, null); > } > > public void testCreateSelectOneRadio() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTONERADIO, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTONERADIO, "jsp", "jsp", 358,false, null); > } > > public void testCreateInputText() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_INPUTTEXT, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_INPUTTEXT, "jsp", "jsp", 358,false, null); > } > > public void testCreateInputTextArea() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_INPUTTEXTAREA, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_INPUTTEXTAREA, "jsp", "jsp", 358,false, null); > } > > } >\ No newline at end of file >Index: src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_AttributeCustomization.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_AttributeCustomization.java,v >retrieving revision 1.2 >diff -u -r1.2 TestUserCustomizedTagCreatorForJSFHTML_AttributeCustomization.java >--- src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_AttributeCustomization.java 27 Apr 2009 23:40:06 -0000 1.2 >+++ src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_AttributeCustomization.java 4 May 2009 00:55:42 -0000 >@@ -1,8 +1,8 @@ > package org.eclipse.jst.pagedesigner.tests.tagcreator; > >-import org.eclipse.core.runtime.IAdaptable; > import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants; > import org.eclipse.jst.pagedesigner.itemcreation.customizer.CustomizationDataImpl; >+import org.eclipse.jst.pagedesigner.itemcreation.customizer.ICustomizationData; > import org.eclipse.jst.pagedesigner.itemcreation.customizer.IWritableCustomizationData; > > /** >@@ -23,20 +23,19 @@ > > public void testAttributeInsertion() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jsp", "jsp", 358, false); >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jspx", "jspx", 495, false); >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "xhtml", "xhtml", 350, false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jsp", "jsp", 358, false, getCustomizationData()); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jspx", "jspx", 495, false, getCustomizationData()); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "xhtml", "xhtml", 350, false, getCustomizationData()); > } > > >- @Override >- protected IAdaptable getCustomizationData() >+ protected ICustomizationData getCustomizationData() > { > // Setup tag > IWritableCustomizationData data = new CustomizationDataImpl(getTagIdentifier()); > data.addAttribute("attr1", "value1"); > >- return (IAdaptable) data; >+ return data; > } > > >Index: src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_ChildCustomization.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_ChildCustomization.java,v >retrieving revision 1.2 >diff -u -r1.2 TestUserCustomizedTagCreatorForJSFHTML_ChildCustomization.java >--- src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_ChildCustomization.java 27 Apr 2009 23:40:06 -0000 1.2 >+++ src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_ChildCustomization.java 4 May 2009 00:55:42 -0000 >@@ -1,8 +1,8 @@ > package org.eclipse.jst.pagedesigner.tests.tagcreator; > >-import org.eclipse.core.runtime.IAdaptable; > import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants; > import org.eclipse.jst.pagedesigner.itemcreation.customizer.CustomizationDataImpl; >+import org.eclipse.jst.pagedesigner.itemcreation.customizer.ICustomizationData; > import org.eclipse.jst.pagedesigner.itemcreation.customizer.IWritableCustomizationData; > import org.eclipse.jst.pagedesigner.tests.tagcreatorPlugin.UserCustomizedElementEditFactory; > >@@ -24,14 +24,13 @@ > > public void testChildTagInsertion() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jsp", "jsp", 358, false); >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jspx", "jspx", 495, false); >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "xhtml", "xhtml", 350, false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jsp", "jsp", 358, false, getCustomizationData()); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jspx", "jspx", 495, false, getCustomizationData()); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "xhtml", "xhtml", 350, false, getCustomizationData()); > } > > >- @Override >- protected IAdaptable getCustomizationData() >+ protected ICustomizationData getCustomizationData() > { > // Setup tag > IWritableCustomizationData tagDropped = new CustomizationDataImpl(getTagIdentifier()); >Index: src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorForJSFCore.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorForJSFCore.java,v >retrieving revision 1.4 >diff -u -r1.4 TestDefaultTagCreatorForJSFCore.java >--- src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorForJSFCore.java 27 Mar 2009 19:38:30 -0000 1.4 >+++ src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorForJSFCore.java 4 May 2009 00:55:42 -0000 >@@ -33,21 +33,21 @@ > > public void testCreateActionListener() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_ACTIONLISTENER, "jsp", "jsp", 358, false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_ACTIONLISTENER, "jsp", "jsp", 358, false, null); > } > > public void testCreateAttribute() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_ATTRIBUTE, "jsp", "jsp", 358, false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_ATTRIBUTE, "jsp", "jsp", 358, false, null); > } > > public void testCreateConvertDateTime() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_CONVERTDATETIME, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_CONVERTDATETIME, "jsp", "jsp", 358,false, null); > } > public void testCreateConvertNumber() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_CONVERTNUMBER, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_CONVERTNUMBER, "jsp", "jsp", 358,false, null); > } > > /** >@@ -55,7 +55,7 @@ > */ > public void testCreateConverter() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_CONVERTER, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_CONVERTER, "jsp", "jsp", 358,false, null); > } > > /** >@@ -63,7 +63,7 @@ > */ > public void testCreateFacet() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_FACET, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_FACET, "jsp", "jsp", 358,false, null); > } > > /** >@@ -71,7 +71,7 @@ > */ > public void testCreateLoadBundle() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_LOADBUNDLE, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_LOADBUNDLE, "jsp", "jsp", 358,false, null); > } > > /** >@@ -79,7 +79,7 @@ > */ > public void testCreateParam() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_PARAM, "jsp", "jsp", 358,true); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_PARAM, "jsp", "jsp", 358,true, null); > } > > /** >@@ -87,7 +87,7 @@ > */ > public void testCreateSelectItem() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTITEM, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTITEM, "jsp", "jsp", 358,false, null); > } > > /** >@@ -95,7 +95,7 @@ > */ > public void testCreateSelectItems() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTITEMS, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTITEMS, "jsp", "jsp", 358,false, null); > } > > /** >@@ -103,7 +103,7 @@ > */ > public void testCreateSubview() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_SUBVIEW, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SUBVIEW, "jsp", "jsp", 358,false, null); > } > > /** >@@ -111,7 +111,7 @@ > */ > public void testCreateValidateDoubleRange() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALIDATEDOUBLERANGE, "jsp", "jsp", 358,true); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALIDATEDOUBLERANGE, "jsp", "jsp", 358,true, null); > } > > /** >@@ -119,7 +119,7 @@ > */ > public void testCreateValidateLength() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALIDATELENGTH, "jsp", "jsp", 358,true); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALIDATELENGTH, "jsp", "jsp", 358,true, null); > } > > /** >@@ -127,7 +127,7 @@ > */ > public void testCreateValidateLongRange() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALIDATELONGRANGE, "jsp", "jsp", 358,true); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALIDATELONGRANGE, "jsp", "jsp", 358,true, null); > } > > /** >@@ -135,7 +135,7 @@ > */ > public void testCreateValidator() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALIDATOR, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALIDATOR, "jsp", "jsp", 358,false, null); > } > > /** >@@ -143,7 +143,7 @@ > */ > public void testCreateValueChangeListener() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALUECHANGELISTENER, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALUECHANGELISTENER, "jsp", "jsp", 358,false, null); > } > > /** >@@ -151,7 +151,7 @@ > */ > public void testCreateVerbatim() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_VERBATIM, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VERBATIM, "jsp", "jsp", 358,false, null); > } > > /** >@@ -159,7 +159,7 @@ > */ > public void testCreateView() throws Exception > { >- doCreateTest(IJSFConstants.TAG_IDENTIFIER_VIEW, "jsp", "jsp", 358,false); >+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VIEW, "jsp", "jsp", 358,false, null); > } > > } >Index: src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/MockCreateItemCommand.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/MockCreateItemCommand.java,v >retrieving revision 1.3 >diff -u -r1.3 MockCreateItemCommand.java >--- src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/MockCreateItemCommand.java 2 May 2008 19:49:06 -0000 1.3 >+++ src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/MockCreateItemCommand.java 4 May 2009 00:55:42 -0000 >@@ -16,7 +16,7 @@ > import org.eclipse.core.runtime.IAdaptable; > import org.eclipse.jst.pagedesigner.commands.CreateItemCommand; > import org.eclipse.jst.pagedesigner.dom.IDOMPosition; >-import org.eclipse.jst.pagedesigner.editors.palette.TagToolPaletteEntry; >+import org.eclipse.jst.pagedesigner.editors.palette.ITagDropSourceData; > import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; > import org.w3c.dom.Element; > import org.w3c.dom.Node; >@@ -24,8 +24,8 @@ > public class MockCreateItemCommand extends CreateItemCommand > { > public MockCreateItemCommand(String label, IDOMModel model, >- IDOMPosition position, TagToolPaletteEntry tagItem) { >- super(label, model, position, tagItem); >+ IDOMPosition position, ITagDropSourceData tagDropSourceData) { >+ super(label, model, position, tagDropSourceData); > } > > @Override >Index: src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseTestClass.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseTestClass.java,v >retrieving revision 1.7 >diff -u -r1.7 BaseTestClass.java >--- src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseTestClass.java 27 Mar 2009 19:38:30 -0000 1.7 >+++ src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseTestClass.java 4 May 2009 00:55:42 -0000 >@@ -18,7 +18,6 @@ > > import org.eclipse.core.resources.IFile; > import org.eclipse.core.resources.IFolder; >-import org.eclipse.core.runtime.IAdaptable; > import org.eclipse.core.runtime.IPath; > import org.eclipse.core.runtime.IStatus; > import org.eclipse.gef.EditDomain; >@@ -41,6 +40,7 @@ > import org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteItemManager; > import org.eclipse.jst.pagedesigner.editors.palette.impl.TaglibPaletteDrawer; > import org.eclipse.jst.pagedesigner.itemcreation.CreationData; >+import org.eclipse.jst.pagedesigner.itemcreation.customizer.ICustomizationData; > import org.eclipse.jst.pagedesigner.tests.PageDesignerTestsPlugin; > import org.eclipse.wst.html.core.internal.document.DOMStyleModelImpl; > import org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl; >@@ -49,8 +49,6 @@ > import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel; > import org.eclipse.wst.xml.core.internal.document.ElementImpl; > import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; >-import org.w3c.dom.Element; >-import org.w3c.dom.NamedNodeMap; > import org.w3c.dom.Node; > > public class BaseTestClass extends TestCase >@@ -90,16 +88,9 @@ > .getTestProject()); > } > >- >- protected IAdaptable getCustomizationData() >- { >- return null; >- } >- >- > protected CreationData getCreationData(final String uri, > final String tagName, final String defaultPrefix, final IFile file, >- final int offset) throws Exception >+ final int offset, final ICustomizationData customizationData) throws Exception > { > final ITaglibDomainMetaDataModelContext modelContext = TaglibDomainMetaDataQueryHelper > .createMetaDataModelContext( >@@ -116,12 +107,12 @@ > assertEquals(Node.TEXT_NODE, node.getNodeType()); > > final DOMPosition domPosition = new DOMPosition(node, 0); >- >- return new CreationData(entry, (IDOMModel) context.getModel(), >- domPosition, modelContext, getCustomizationData()); >+ final IDOMModel model =(IDOMModel) context.getModel(); >+ return new CreationData(entry.getTemplate(), model, >+ domPosition, modelContext, customizationData); > } > >- protected TagToolPaletteEntry createPaletteEntry(final String uri, >+ private TagToolPaletteEntry createPaletteEntry(final String uri, > final String tagName) > { > final TaglibPaletteDrawer drawer = _manager >@@ -140,7 +131,7 @@ > return entry; > } > >- protected TagToolPaletteEntry createNonNullPaletteEntry(final String uri, >+ private TagToolPaletteEntry createNonNullPaletteEntry(final String uri, > final String tagName) > { > final TagToolPaletteEntry entry = createPaletteEntry(uri, tagName); >@@ -284,10 +275,10 @@ > final int offset, final TagIdentifier tagId, > final int expectedResult) throws Exception > { >+ > final TagToolPaletteEntry toolEntry = createNonNullPaletteEntry(tagId > .getUri(), tagId.getTagName()); >- >- final MockItemCreationTool tool = new MockItemCreationTool(toolEntry); >+ final MockItemCreationTool tool = new MockItemCreationTool(toolEntry.getTemplate()); > > final ContextWrapper wrapper = getDocumentContext(offset, file); > final IDOMContextResolver resolver = IStructuredDocumentContextResolverFactory.INSTANCE >@@ -297,7 +288,7 @@ > final DOMPosition domPosition = new DOMPosition(resolver.getNode(), 0); > > final MockCreateItemCommand command = new MockCreateItemCommand( >- "Test Command", (IDOMModel) model, domPosition, toolEntry); >+ "Test Command", (IDOMModel) model, domPosition, toolEntry.getTemplate()); > > tool.setEditDomain(new EditDomain()); > tool.setCurrentCommand(command); >@@ -323,25 +314,6 @@ > (element).setEmptyTag(true); > (element).removeChildNodes(); > final Node copy = (element).cloneNode(false); >- >- /* >- * ElementImpl.cloneNode(...) seems to have started creating >- * attributes that display differently than the cloned Node's >- * (attr='' rather than attr=""), breaking textual comparisons. >- * By overwriting the existing attributes after cloning, we get the >- * expected form (double quotes instead of single quotes). >- * >- * - Ian Trimble, 20090305 >- */ >- if (element.hasAttributes() && copy instanceof Element) { >- NamedNodeMap attrMap = element.getAttributes(); >- for (int i = 0; i < attrMap.getLength(); i++) { >- Node attrNode = attrMap.item(i); >- ((Element)copy).setAttribute( >- attrNode.getNodeName(), attrNode.getNodeValue()); >- } >- } >- > element.getParentNode().replaceChild(copy, element); > } > } >Index: src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseTagCreatorTestCase.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseTagCreatorTestCase.java,v >retrieving revision 1.4 >diff -u -r1.4 BaseTagCreatorTestCase.java >--- src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseTagCreatorTestCase.java 27 Mar 2009 19:38:30 -0000 1.4 >+++ src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseTagCreatorTestCase.java 4 May 2009 00:55:42 -0000 >@@ -13,6 +13,7 @@ > import org.eclipse.core.resources.IFile; > import org.eclipse.jst.jsf.common.dom.TagIdentifier; > import org.eclipse.jst.pagedesigner.itemcreation.ITagCreator; >+import org.eclipse.jst.pagedesigner.itemcreation.customizer.ICustomizationData; > import org.eclipse.jst.pagedesigner.tests.PageDesignerTestsPlugin; > import org.eclipse.wst.xml.core.internal.document.ElementImpl; > import org.w3c.dom.Element; >@@ -50,16 +51,17 @@ > > /** > * @param tagId >- * @param inExt >- * @param outExt >- * @param offset >- * @param forceResultTagEmpty this is a workaround flag due to the fact that some >+ * @param inExt >+ * @param outExt >+ * @param offset >+ * @param forceResultTagEmpty this is a workaround flag due to the fact that some > * TLD body definitions differ between RI and MyFaces, causing some tags to be > * generated as <tag></tag> in RI and <tag/> in MyFaces. NEVER SET TO TRUE ON A TAG ID > * whose instances may have child elements. >+ * @param customizationData TODO > * @throws Exception > */ >- protected final void doCreateTest(final TagIdentifier tagId, final String inExt, final String outExt, int offset, boolean forceResultTagEmpty) throws Exception >+ protected final void doCreateTest(final TagIdentifier tagId, final String inExt, final String outExt, int offset, boolean forceResultTagEmpty, ICustomizationData customizationData) throws Exception > { > final String uri = tagId.getUri(); > final String tagName = tagId.getTagName(); >@@ -69,12 +71,12 @@ > "/testdata/tagcreator/tagCreator."+inExt+".data", "/tagCreator_"+tagName+"."+inExt); > > setTagIdentifier(tagId); >- >+ > ITagCreator tagCreator = getTagCreator(getTagIdentifier()); >- >+ > Element element = tagCreator.createTag(getCreationData(uri, tagName, >- _defaultPrefix, file, offset)); >- >+ _defaultPrefix, file, offset, customizationData)); >+ > // this is a hack that is required because we do a literal comparison > // between the modified source file and test data file on a character > // by character basis. However, the MyFaces and RI (and possibly other) >Index: src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/MockItemCreationTool.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/MockItemCreationTool.java,v >retrieving revision 1.3 >diff -u -r1.3 MockItemCreationTool.java >--- src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/MockItemCreationTool.java 2 May 2008 19:49:06 -0000 1.3 >+++ src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/MockItemCreationTool.java 4 May 2009 00:55:42 -0000 >@@ -16,15 +16,15 @@ > import org.eclipse.gef.EditDomain; > import org.eclipse.gef.commands.Command; > import org.eclipse.jst.pagedesigner.commands.CreateItemCommand; >-import org.eclipse.jst.pagedesigner.editors.palette.TagToolPaletteEntry; >+import org.eclipse.jst.pagedesigner.editors.palette.ITagDropSourceData; > import org.eclipse.jst.pagedesigner.itemcreation.ItemCreationTool; > > public class MockItemCreationTool extends ItemCreationTool > { > private Command _cached = null; > >- public MockItemCreationTool(TagToolPaletteEntry tagToolPaletteEntryItem) { >- super(tagToolPaletteEntryItem); >+ public MockItemCreationTool(ITagDropSourceData tagDropSourceData) { >+ super(tagDropSourceData); > } > > @Override >Index: src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/BasicTabbedPropertyPageTests.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/BasicTabbedPropertyPageTests.java,v >retrieving revision 1.4 >diff -u -r1.4 BasicTabbedPropertyPageTests.java >--- src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/BasicTabbedPropertyPageTests.java 5 Feb 2009 22:44:01 -0000 1.4 >+++ src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/BasicTabbedPropertyPageTests.java 4 May 2009 00:55:42 -0000 >@@ -50,7 +50,7 @@ > ISelection sel = getSelection(node); > view.getViewSite().getSelectionProvider().setSelection(sel); > ISelection selection = view.getViewSite().getSelectionProvider().getSelection(); >- assertEquals(sel, selection); >+ assertEquals(sel, selection); > > } catch(Exception ex) { > ex.printStackTrace();
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 267962
:
134034
|
134190
|
134191
|
134330
|
134332