JBoss Tools SVN: r23662 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2010-07-22 08:08:09 -0400 (Thu, 22 Jul 2010)
New Revision: 23662
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml
Log:
https://jira.jboss.org/browse/JBIDE-6686
Rename platforms.
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml 2010-07-22 11:59:45 UTC (rev 23661)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml 2010-07-22 12:08:09 UTC (rev 23662)
@@ -8,14 +8,14 @@
factoryClass="org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaPlatformFactory"
id="hibernate"
jpaFacetVersion="1.0"
- label="Hibernate Jpa 1.0">
+ label="Hibernate JPA 1.0">
</jpaPlatform>
<jpaPlatform
default="false"
factoryClass="org.jboss.tools.hibernate.jpt.core.internal.jpa2.HibernateJpa2_0PlatformFactory"
id="hibernate2_0"
jpaFacetVersion="2.0"
- label="Hibernate Jpa 2.0">
+ label="Hibernate JPA2.0">
</jpaPlatform>
</extension>
<extension
15 years, 9 months
JBoss Tools SVN: r23660 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2010-07-22 07:38:59 -0400 (Thu, 22 Jul 2010)
New Revision: 23660
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml
Log:
https://jira.jboss.org/browse/JBIDE-6686
Filter platforms based on jpa version.
Rename platforms.
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml 2010-07-22 10:04:27 UTC (rev 23659)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml 2010-07-22 11:38:59 UTC (rev 23660)
@@ -3,17 +3,19 @@
<plugin>
<extension id="org.jboss.tools.hibernate.jpt.core"
point="org.eclipse.jpt.core.jpaPlatforms">
- <jpaPlatform
- factoryClass="org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaPlatformFactory"
- default="false"
- id="hibernate"
- label="Hibernate">
+ <jpaPlatform
+ default="false"
+ factoryClass="org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaPlatformFactory"
+ id="hibernate"
+ jpaFacetVersion="1.0"
+ label="Hibernate Jpa 1.0">
</jpaPlatform>
- <jpaPlatform
- factoryClass="org.jboss.tools.hibernate.jpt.core.internal.jpa2.HibernateJpa2_0PlatformFactory"
- default="false"
- id="hibernate2_0"
- label="Hibernate jpa 2.0">
+ <jpaPlatform
+ default="false"
+ factoryClass="org.jboss.tools.hibernate.jpt.core.internal.jpa2.HibernateJpa2_0PlatformFactory"
+ id="hibernate2_0"
+ jpaFacetVersion="2.0"
+ label="Hibernate Jpa 2.0">
</jpaPlatform>
</extension>
<extension
15 years, 9 months
JBoss Tools SVN: r23659 - in trunk/ws/tests/org.jboss.tools.ws.ui.bot.test: resources/wsdl and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: jlukas(a)redhat.com
Date: 2010-07-22 06:04:27 -0400 (Thu, 22 Jul 2010)
New Revision: 23659
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/imported.wsdl
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/original.wsdl
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/schema.xsd
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WsTesterTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/widgets/SelectWSDLDialog.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/widgets/WsTesterView.java
Log:
update wstestertest to facelifted (M2) version of the tester
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/imported.wsdl
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/imported.wsdl (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/imported.wsdl 2010-07-22 10:04:27 UTC (rev 23659)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<definitions xmlns:tns="http://www.ecubicle.net/webservices"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/"
+ targetNamespace="http://www.ecubicle.net/webservices">
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://www.ecubicle.net/webservices"
+ schemaLocation="schema.xsd" />
+ </xsd:schema>
+ </types>
+ <message name="GetSearchResults">
+ <part name="parameters" element="tns:GetSearchResults" />
+ </message>
+ <message name="GetSearchResultsResponse">
+ <part name="parameters" element="tns:GetSearchResultsResponse" />
+ </message>
+ <portType name="gsearch_rssSoap">
+ <operation name="GetSearchResults">
+ <input message="tns:GetSearchResults" />
+ <output message="tns:GetSearchResultsResponse" />
+ </operation>
+ </portType>
+</definitions>
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/original.wsdl
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/original.wsdl (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/original.wsdl 2010-07-22 10:04:27 UTC (rev 23659)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..."
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservices.www.ecubicle.net/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:jb="http://test.jboss.org/ns" targetNamespace="http://webservices.www.ecubicle.net/"
+ name="GsearchRssSoap">
+ <import namespace="http://www.ecubicle.net/webservices"
+ location="imported.wsdl" />
+ <types>
+ <xsd:schema elementFormDefault='qualified' targetNamespace='http://test.jboss.org/ns'
+ version='1.0' xmlns:tns='http://test.jboss.org/ns' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <xsd:element name='echo'>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name='person' type='tns:person' />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name='echoResponse' nillable='true'
+ type='tns:echoResponse' />
+ <xsd:complexType name='person'>
+ <xsd:sequence>
+ <xsd:element name='age' type='xsd:int' />
+ <xsd:element name='login' type='xsd:string' />
+ <xsd:element name='male' type='xsd:boolean' />
+ <xsd:element maxOccurs='unbounded' name='nicks' type='xsd:string' />
+ <xsd:element name='tax' type='xsd:float' />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name='echoResponse'>
+ <xsd:sequence>
+ <xsd:element name='return' type='tns:person' />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+ </types>
+ <message name="echo">
+ <part name="parameters" element="jb:echo" />
+ </message>
+ <message name="echoResponse">
+ <part name="parameters" element="jb:echoResponse" />
+ </message>
+ <portType name="EchoPortType">
+ <operation name="echo">
+ <input message="tns:echo" />
+ <output message="tns:echoResponse" />
+ </operation>
+ </portType>
+ <binding xmlns:ns1="http://www.ecubicle.net/webservices" name="gsearch_rssSoap"
+ type="ns1:gsearch_rssSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="GetSearchResults">
+ <soap:operation
+ soapAction="http://www.ecubicle.net/webservices/GetSearchResults"
+ style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <binding name="EchoPortBinding" type="tns:EchoPortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
+ style="document" />
+ <operation name="echo">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="gsearch_rss">
+ <port name="gsearch_rssSoap" binding="tns:gsearch_rssSoap">
+ <soap:address location="http://www.ecubicle.net/gsearch_rss.asmx" />
+ </port>
+ </service>
+ <service name="EchoService">
+ <port name="EchoPort" binding="tns:EchoPortBinding">
+ <soap:address location="http://localhost:8080/webws/EchoPortType" />
+ </port>
+ </service>
+</definitions>
+
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/schema.xsd
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/schema.xsd (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/wsdl/schema.xsd 2010-07-22 10:04:27 UTC (rev 23659)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified" version="1.0"
+ targetNamespace="http://www.ecubicle.net/webservices">
+
+ <xs:element name="GetSearchResults">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="searchPage" type="xs:string" minOccurs="0" />
+ <xs:element name="gQuery" type="xs:string" minOccurs="0" />
+ <xs:element name="numOfResults" type="xs:string"
+ minOccurs="0" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="GetSearchResultsResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="GetSearchResultsResult" minOccurs="0">
+ <xs:complexType mixed="true">
+ <xs:sequence>
+ <xs:any processContents="lax" namespace="##other"
+ minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WsTesterTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WsTesterTest.java 2010-07-22 09:43:16 UTC (rev 23658)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WsTesterTest.java 2010-07-22 10:04:27 UTC (rev 23659)
@@ -10,10 +10,15 @@
******************************************************************************/
package org.jboss.tools.ws.ui.bot.test;
+import java.io.BufferedOutputStream;
import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.io.OutputStream;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
@@ -24,6 +29,9 @@
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ws.ui.bot.test.widgets.SelectWSDLDialog;
import org.jboss.tools.ws.ui.bot.test.widgets.WsTesterView;
+import org.jboss.tools.ws.ui.bot.test.widgets.WsTesterView.Request_Arg_Type;
+import org.jboss.tools.ws.ui.bot.test.widgets.WsTesterView.Request_Type;
+import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
import org.junit.Assert;
import org.junit.Test;
@@ -34,264 +42,300 @@
*/
public class WsTesterTest extends SWTTestExt {
- private static final Logger L = Logger.getLogger(WsTesterTest.class.getName());
- private static final String SERVICE_URL = "http://www.webservicex.net/BibleWebservice.asmx";
+ private static final Logger L = Logger.getLogger(WsTesterTest.class.getName());
+ private static final String SERVICE_URL = "http://www.webservicex.net/BibleWebservice.asmx";
- /**
- * Test behavior of UI
- */
- @Test
- public void testUI() {
- WsTesterView wstv = new WsTesterView();
- SWTBotView viewBot = wstv.show();
- Assert.assertTrue("Tester View is not active", viewBot.isActive());
- Assert.assertFalse(wstv.isHttpMethodSelectionEnabled());
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_RS);
- Assert.assertTrue(wstv.isHttpMethodSelectionEnabled());
- wstv.setHttpMethod(WsTesterView.Http_Method.PUT);
- Assert.assertEquals(WsTesterView.Http_Method.PUT, wstv.getHttpMethod());
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_WS);
- Assert.assertFalse(wstv.isHttpMethodSelectionEnabled());
- Assert.assertEquals(WsTesterView.Http_Method.POST, wstv.getHttpMethod());
+ /**
+ * Test behavior of UI
+ */
+ @Test
+ public void testUI() {
+ WsTesterView wstv = new WsTesterView();
+ SWTBotView viewBot = wstv.show();
+ Assert.assertTrue("Tester View is not active", viewBot.isActive());
+ wstv.setRequestType(Request_Type.PUT);
+ Assert.assertEquals(Request_Type.PUT, wstv.getRequestType());
+ wstv.setRequestType(Request_Type.JAX_WS);
+ Assert.assertEquals(Request_Type.JAX_WS, wstv.getRequestType());
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_RS);
- Assert.assertTrue(wstv.isHttpMethodSelectionEnabled());
- wstv.setHttpMethod(WsTesterView.Http_Method.DELETE);
- Assert.assertEquals(WsTesterView.Http_Method.DELETE, wstv.getHttpMethod());
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.HEADER, "a", "1");
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.HEADER, "b", "2");
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.HEADER, "c", "3");
- Assert.assertEquals(3, wstv.getRequestArgs(WsTesterView.Request_Arg_Type.HEADER).keySet().size());
- Assert.assertTrue(wstv.getRequestArgs(WsTesterView.Request_Arg_Type.HEADER).containsKey("b"));
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.HEADER, "d", "4");
- Assert.assertEquals(4, wstv.getRequestArgs(WsTesterView.Request_Arg_Type.HEADER).keySet().size());
- Assert.assertTrue(wstv.getRequestArgs(WsTesterView.Request_Arg_Type.HEADER).containsKey("d"));
- wstv.upRequestArg(WsTesterView.Request_Arg_Type.HEADER, "c", "3");
- wstv.downRequestArg(WsTesterView.Request_Arg_Type.HEADER, "b", "2");
- Assert.assertEquals(4, wstv.getRequestArgs(WsTesterView.Request_Arg_Type.HEADER).keySet().size());
- wstv.removeRequestArg(WsTesterView.Request_Arg_Type.HEADER, "a", "1");
- wstv.removeRequestArg(WsTesterView.Request_Arg_Type.HEADER, "c", "3");
- Assert.assertEquals(2, wstv.getRequestArgs(WsTesterView.Request_Arg_Type.HEADER).keySet().size());
- wstv.clearRequestArgs(WsTesterView.Request_Arg_Type.HEADER);
- Assert.assertEquals(0, wstv.getRequestArgs(WsTesterView.Request_Arg_Type.HEADER).keySet().size());
-
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_WS);
- SelectWSDLDialog dlg = wstv.getFromWSDL();
- dlg.openURL();
- SWTBotShell sh = bot.activeShell();
- sh.bot().text().typeText(SERVICE_URL + "?WSDL");
- sh.bot().button("OK").click();
- bot.sleep(1000);
- Assert.assertEquals(SERVICE_URL + "?WSDL", dlg.getURI());
- List<String> items = dlg.getServices();
- L.log(Level.FINE, "Services: {0}", items);
- Assert.assertEquals(1, items.size());
- Assert.assertTrue(items.contains("BibleWebservice"));
- items = dlg.getPorts();
- L.log(Level.FINE, "Ports: {0}", items);
- Assert.assertEquals(2, items.size());
- Assert.assertTrue(items.contains("BibleWebserviceSoap"));
- Assert.assertTrue(items.contains("BibleWebserviceSoap12"));
- items = dlg.getOperations();
- L.log(Level.FINE, "Operations: {0}", items);
- Assert.assertEquals(4, items.size());
- Assert.assertTrue(items.contains("GetBookTitles"));
- Assert.assertTrue(items.contains("GetBibleWordsByChapterAndVerse"));
- dlg.selectOperation("GetBibleWordsbyKeyWord");
- dlg.ok();
- Assert.assertEquals("http://www.webservicex.net/BibleWebservice.asmx", wstv.getServiceURL());
- Assert.assertEquals("http://www.webserviceX.NET/GetBibleWordsbyKeyWord", wstv.getActionURL());
- viewBot.close();
- }
+ wstv.setRequestType(Request_Type.DELETE);
+ Assert.assertEquals(Request_Type.DELETE, wstv.getRequestType());
+ wstv.expandSection(Request_Arg_Type.HEADER.toString());
+ wstv.addRequestArg(Request_Arg_Type.HEADER, "a", "1");
+ wstv.addRequestArg(Request_Arg_Type.HEADER, "b", "2");
+ wstv.addRequestArg(Request_Arg_Type.HEADER, "c", "3");
+ Assert.assertEquals(3, wstv.getRequestArgs(Request_Arg_Type.HEADER).keySet().size());
+ Assert.assertTrue(wstv.getRequestArgs(Request_Arg_Type.HEADER).containsKey("b"));
+ wstv.addRequestArg(Request_Arg_Type.HEADER, "d", "4");
+ Assert.assertEquals(4, wstv.getRequestArgs(Request_Arg_Type.HEADER).keySet().size());
+ Assert.assertTrue(wstv.getRequestArgs(Request_Arg_Type.HEADER).containsKey("d"));
+ Assert.assertEquals(4, wstv.getRequestArgs(Request_Arg_Type.HEADER).keySet().size());
+ wstv.removeRequestArg(Request_Arg_Type.HEADER, "a", "1");
+ wstv.removeRequestArg(Request_Arg_Type.HEADER, "c", "3");
+ Assert.assertEquals(2, wstv.getRequestArgs(Request_Arg_Type.HEADER).keySet().size());
+ wstv.clearRequestArgs(Request_Arg_Type.HEADER);
+ Assert.assertEquals(0, wstv.getRequestArgs(Request_Arg_Type.HEADER).keySet().size());
- /**
- * Test SOAP service invocation
- */
- @Test
- public void testSOAPService() {
- WsTesterView wstv = new WsTesterView();
- wstv.show();
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_WS);
- Assert.assertFalse(wstv.isHttpMethodSelectionEnabled());
- Assert.assertEquals(WsTesterView.Http_Method.POST, wstv.getHttpMethod());
- String actionUrl = "http://www.webserviceX.NET/GetBibleWordsByChapterAndVerse";
- wstv.setServiceURL(SERVICE_URL);
- wstv.setActionURL(actionUrl);
- InputStream is = WsTesterTest.class.getResourceAsStream("/resources/jbossws/message_soap_out.xml");
- wstv.setRequestBody(readResource(is));
- wstv.invoke();
- String rsp = wstv.getResponseBody();
- L.log(Level.FINE, "SOAP response: {0}", rsp);
- Assert.assertTrue(rsp.trim().length() > 0);
- checkResponse(rsp, "<BookTitle>Mark</BookTitle>");
- }
+ wstv.setRequestType(Request_Type.JAX_WS);
+ SelectWSDLDialog dlg = wstv.getFromWSDL();
+ try {
+ dlg.openURL();
+ SWTBotShell sh = bot.activeShell();
+ sh.bot().text().typeText(SERVICE_URL + "?WSDL");
+ sh.bot().button("OK").click();
+ bot.sleep(1000);
+ Assert.assertEquals(SERVICE_URL + "?WSDL", dlg.getURI());
+ List<String> items = dlg.getServices();
+ L.log(Level.FINE, "Services: {0}", items);
+ Assert.assertEquals(1, items.size());
+ Assert.assertTrue(items.contains("BibleWebservice"));
+ items = dlg.getPorts();
+ L.log(Level.FINE, "Ports: {0}", items);
+ Assert.assertEquals(2, items.size());
+ Assert.assertTrue(items.contains("BibleWebserviceSoap"));
+ Assert.assertTrue(items.contains("BibleWebserviceSoap12"));
+ items = dlg.getOperations();
+ L.log(Level.FINE, "Operations: {0}", items);
+ Assert.assertEquals(4, items.size());
+ Assert.assertTrue(items.contains("GetBookTitles"));
+ Assert.assertTrue(items.contains("GetBibleWordsByChapterAndVerse"));
+ dlg.selectOperation("GetBibleWordsbyKeyWord");
+ dlg.ok();
+ Assert.assertEquals("http://www.webservicex.net/BibleWebservice.asmx", wstv.getServiceURL());
+ } finally {
+ if (dlg.isOpen()) {
+ dlg.close();
+ }
+ }
+ viewBot.close();
+ }
- /**
- * Test REST service invocation (GET request)
- */
- @Test
- public void testRESTGETService() {
- WsTesterView wstv = new WsTesterView();
- wstv.show();
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_RS);
- wstv.setHttpMethod(WsTesterView.Http_Method.GET);
- wstv.setServiceURL(SERVICE_URL + "/GetBibleWordsByChapterAndVerse");
- wstv.clearRequestArgs(WsTesterView.Request_Arg_Type.PARAMETER);
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.PARAMETER, "BookTitle", "Luke");
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.PARAMETER, "chapter", "2");
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.PARAMETER, "Verse", "2");
- wstv.editRequestArg(WsTesterView.Request_Arg_Type.PARAMETER, "chapter", "2", "chapter", "1");
- wstv.invoke();
- String rsp = wstv.getResponseBody();
- String[] rspHeaders = wstv.getResponseHeaders();
- L.log(Level.FINE, "REST response: {0}", rsp);
- L.log(Level.FINE, "Response headers: {0}", Arrays.asList(rspHeaders));
- Assert.assertTrue(rsp.trim().length() > 0);
- checkResponse(rsp, "<Chapter>1</Chapter>");
- checkResponse(rsp, "ministers of the word");
- }
+ /**
+ * Test refreshing body requests in the UI
+ */
+ @Test
+ public void testNamespaces() {
+ String uri = new File(prepareWsdl(), "original.wsdl").toURI().toString();
+ WsTesterView wstv = new WsTesterView();
+ SWTBotView viewBot = wstv.show();
+ Assert.assertTrue("Tester View is not active", viewBot.isActive());
+ SelectWSDLDialog dlg = wstv.getFromWSDL();
+ dlg.setURI(uri);
+ bot.sleep(1000);
+ List<String> items = dlg.getServices();
+ L.log(Level.FINE, "Services: {0}", items);
+ Assert.assertEquals(2, items.size());
+ Assert.assertTrue(items.contains("EchoService"));
+ items = dlg.getPorts();
+ L.log(Level.FINE, "Ports: {0}", items);
+ Assert.assertEquals(1, items.size());
+ Assert.assertTrue(items.contains("EchoPort"));
+ items = dlg.getOperations();
+ L.log(Level.FINE, "Operations: {0}", items);
+ Assert.assertEquals(1, items.size());
+ Assert.assertTrue(items.contains("echo"));
+ dlg.ok();
+ L.log(Level.INFO, "Request: {0}", wstv.getRequestBody());
+ Assert.assertTrue(wstv.getRequestBody().contains(
+ "<echo xmlns = \"http://test.jboss.org/ns\">"));
- /**
- * Test REST service invocation (POST request)
- */
- @Test
- public void testRESTPOSTService() {
- WsTesterView wstv = new WsTesterView();
- wstv.show();
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_RS);
- wstv.setHttpMethod(WsTesterView.Http_Method.POST);
- wstv.setServiceURL(SERVICE_URL + "/GetBibleWordsByChapterAndVerse");
- String requestBody = "BookTitle=John&chapter=3&Verse=1\r";
- wstv.setRequestBody(requestBody);
- wstv.clearRequestArgs(WsTesterView.Request_Arg_Type.PARAMETER);
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.HEADER, "Content-Type", "application/x-www-form-urlencoded");
- wstv.addRequestArg(WsTesterView.Request_Arg_Type.HEADER, "Content-Length", String.valueOf(requestBody.length()));
- wstv.invoke();
- String rsp = wstv.getResponseBody();
- String[] rspHeaders = wstv.getResponseHeaders();
- L.log(Level.FINE, "REST response: {0}", rsp);
- L.log(Level.FINE, "Response headers: {0}", Arrays.asList(rspHeaders));
- Assert.assertTrue(rsp.trim().length() > 0);
- checkResponse(rsp, "<Chapter>3</Chapter>");
- checkResponse(rsp, "There was a man of the Pharisees, named Nicodemus, a ruler of the Jews");
- }
+ dlg = wstv.getFromWSDL();
+ dlg.setURI(uri);
+ bot.sleep(1000);
+ items = dlg.getServices();
+ L.log(Level.FINE, "Services: {0}", items);
+ Assert.assertEquals(2, items.size());
+ Assert.assertTrue(items.contains("gsearch_rss"));
+ dlg.selectService("gsearch_rss");
+ items = dlg.getPorts();
+ L.log(Level.FINE, "Ports: {0}", items);
+ Assert.assertEquals(1, items.size());
+ Assert.assertTrue(items.contains("gsearch_rssSoap"));
+ items = dlg.getOperations();
+ L.log(Level.FINE, "Operations: {0}", items);
+ Assert.assertEquals(1, items.size());
+ Assert.assertTrue(items.contains("GetSearchResults"));
+ dlg.ok();
+ L.log(Level.INFO, "Request: {0}", wstv.getRequestBody());
+ Assert.assertTrue(wstv.getRequestBody().contains(
+ "<GetSearchResults xmlns = \"http://www.ecubicle.net/webservices\">"));
+ }
-// @Test
-// @Ignore
-// public void testSOAPSample() {
-// WsTesterView wstv = new WsTesterView();
-// wstv.show();
-// wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_WS);
-// wstv.setSampleContent();
-// wstv.invoke();
-// String rsp = wstv.getResponseBody();
-// L.log(Level.FINE, "SOAP Sample response: {0}", rsp);
-// checkResponse(rsp, "To be, or not to be: that is the question");
-// }
-//
-// @Test
-// @Ignore
-// public void testRESTSample() {
-// WsTesterView wstv = new WsTesterView();
-// SWTBotView viewBot = wstv.show();
-// wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_RS);
-// wstv.setSampleContent();
-// wstv.invoke();
-// String rsp = wstv.getResponseBody();
-// String[] rspHeaders = wstv.getResponseHeaders();
-// L.log(Level.FINE, "REST Sample response: {0}", rsp);
-// L.log(Level.FINE, "Response headers: {0}", Arrays.asList(rspHeaders));
-// checkResponse(rsp, "Colorado Springs");
-// viewBot.close();
-// }
+ /**
+ * Test SOAP service invocation
+ */
+ @Test
+ public void testSOAPService() {
+ WsTesterView wstv = new WsTesterView();
+ wstv.show();
+ wstv.setRequestType(Request_Type.JAX_WS);
+ Assert.assertEquals(Request_Type.JAX_WS, wstv.getRequestType());
+ wstv.setServiceURL(SERVICE_URL);
+ InputStream is = WsTesterTest.class.getResourceAsStream("/resources/jbossws/message_soap_out.xml");
+ wstv.setRequestBody(readResource(is));
+ wstv.invoke();
+ String rsp = wstv.getResponseBody();
+ L.log(Level.FINE, "SOAP response: {0}", rsp);
+ Assert.assertTrue(rsp.trim().length() > 0);
+ checkResponse(rsp, "<BookTitle>Mark</BookTitle>");
+ }
- @Test
- public void testOpenMonitor() {
- WsTesterView wstv = new WsTesterView();
- SWTBotView tv = wstv.show();
- wstv.openMonitor();
- SWTBotView av = bot.activeView();
- Assert.assertEquals("TCP/IP Monitor", av.getTitle());
- av.close();
- tv.close();
- }
+ /**
+ * Test REST service invocation (GET request)
+ */
+ @Test
+ public void testRESTGETService() {
+ WsTesterView wstv = new WsTesterView();
+ wstv.show();
+ wstv.setRequestType(Request_Type.GET);
+ wstv.setServiceURL(SERVICE_URL + "/GetBibleWordsByChapterAndVerse");
+ wstv.expandSection(Request_Arg_Type.PARAMETER.toString());
+ wstv.addRequestArg(Request_Arg_Type.PARAMETER, "BookTitle", "Luke");
+ wstv.addRequestArg(Request_Arg_Type.PARAMETER, "chapter", "2");
+ wstv.addRequestArg(Request_Arg_Type.PARAMETER, "Verse", "2");
+ wstv.editRequestArg(Request_Arg_Type.PARAMETER, "chapter", "2", "chapter", "1");
+ try {
+ wstv.invoke();
+ String rsp = wstv.getResponseBody();
+ String[] rspHeaders = wstv.getResponseHeaders();
+ L.log(Level.FINE, "REST response: {0}", rsp);
+ L.log(Level.FINE, "Response headers: {0}", Arrays.asList(rspHeaders));
+ Assert.assertTrue(rsp.trim().length() > 0);
+ checkResponse(rsp, "<Chapter>1</Chapter>");
+ checkResponse(rsp, "ministers of the word");
+ } finally {
+ wstv.clearRequestArgs(Request_Arg_Type.PARAMETER);
+ }
+ }
- @Test
- public void testConfigureMonitor() {
- WsTesterView wstv = new WsTesterView();
- SWTBotView tv = wstv.show();
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_WS);
- Assert.assertFalse(wstv.isHttpMethodSelectionEnabled());
- Assert.assertEquals(WsTesterView.Http_Method.POST, wstv.getHttpMethod());
- String actionUrl = "http://www.webserviceX.NET/GetBibleWordsByChapterAndVerse";
- wstv.setServiceURL(SERVICE_URL);
- wstv.setActionURL(actionUrl);
- InputStream is = WsTesterTest.class.getResourceAsStream("/resources/jbossws/message_soap_out.xml");
- wstv.setRequestBody(readResource(is));
- wstv.configureMonitor();
- SWTBotShell sh = bot.activeShell();
- Assert.assertEquals("New Monitor", sh.getText());
- sh.bot().spinner("80", 0).setSelection(8077);
- sh.bot().button("OK").click();
- tv.show();
- wstv.invoke();
- tv.show();
- String rsp = wstv.getResponseBody();
- L.log(Level.FINE, "SOAP response: {0}", rsp);
- Assert.assertTrue(rsp.trim().length() > 0);
- checkResponse(rsp, "<BookTitle>Mark</BookTitle>");
- }
+ /**
+ * Test REST service invocation (POST request)
+ */
+ @Test
+ public void testRESTPOSTService() {
+ WsTesterView wstv = new WsTesterView();
+ wstv.show();
+ wstv.setRequestType(WsTesterView.Request_Type.POST);
+ wstv.setServiceURL(SERVICE_URL + "/GetBibleWordsByChapterAndVerse");
+ String requestBody = "BookTitle=John&chapter=3&Verse=1\r";
+ wstv.setRequestBody(requestBody);
+ wstv.expandSection(Request_Arg_Type.HEADER.toString());
+ wstv.addRequestArg(Request_Arg_Type.HEADER, "Content-Type", "application/x-www-form-urlencoded");
+ wstv.addRequestArg(Request_Arg_Type.HEADER, "Content-Length", String.valueOf(requestBody.length()));
+ try {
+ wstv.invoke();
+ String rsp = wstv.getResponseBody();
+ String[] rspHeaders = wstv.getResponseHeaders();
+ L.log(Level.FINE, "REST response: {0}", rsp);
+ L.log(Level.FINE, "Response headers: {0}", Arrays.asList(rspHeaders));
+ Assert.assertTrue(rsp.trim().length() > 0);
+ checkResponse(rsp, "<Chapter>3</Chapter>");
+ checkResponse(rsp, "There was a man of the Pharisees, named Nicodemus, a ruler of the Jews");
+ } finally {
+ wstv.clearRequestArgs(Request_Arg_Type.HEADER);
+ }
+ }
- @Test
- public void testErrorResponse() {
- WsTesterView wstv = new WsTesterView();
- wstv.show();
- wstv.setWebServiceType(WsTesterView.Ws_Type.JAX_RS);
- wstv.setHttpMethod(WsTesterView.Http_Method.GET);
- wstv.setServiceURL("http://www.zvents.com/rest/event_update");
- wstv.invoke();
- Assert.assertEquals(0, wstv.getRequestArgs(WsTesterView.Request_Arg_Type.PARAMETER).size());
- String rsp = wstv.getResponseBody();
- String[] rspHeaders = wstv.getResponseHeaders();
- L.log(Level.FINE, "REST response: {0}", rsp);
- L.log(Level.FINE, "Response headers: {0}", Arrays.asList(rspHeaders));
- Assert.assertTrue(rsp.trim().length() > 0);
- checkResponse(rsp, "Invalid API Key.");
- }
+ @Test
+ public void testErrorResponse() {
+ WsTesterView wstv = new WsTesterView();
+ wstv.show();
+ wstv.setRequestType(Request_Type.GET);
+ wstv.setServiceURL("http://www.zvents.com/rest/event_update");
+ wstv.invoke();
+ Assert.assertEquals(0, wstv.getRequestArgs(Request_Arg_Type.PARAMETER).size());
+ String rsp = wstv.getResponseBody();
+ wstv.expandSection(JBossWSUIMessages.JAXRSWSTestView2_ResponseHeaders_Section);
+ String[] rspHeaders = wstv.getResponseHeaders();
+ L.log(Level.FINE, "REST response: {0}", rsp);
+ L.log(Level.FINE, "Response headers: {0}", Arrays.asList(rspHeaders));
+ Assert.assertTrue(rsp.trim().length() > 0);
+ checkResponse(rsp, "Invalid API Key.");
+ }
- private String readResource(InputStream is) {
- StringBuilder sb = new StringBuilder();
- BufferedReader br = null;
- try {
- br = new BufferedReader(new InputStreamReader(is));
- String s;
- while ((s = br.readLine()) != null) {
- sb.append(s);
- sb.append('\n');
- }
- } catch (IOException e) {
- L.log(Level.WARNING, e.getMessage(), e);
- } finally {
- if (br != null) {
- try {
- br.close();
- } catch (IOException e) {
- L.log(Level.FINEST, e.getMessage(), e);
- }
- }
- }
- return sb.toString();
- }
+ private String readResource(InputStream is) {
+ StringBuilder sb = new StringBuilder();
+ BufferedReader br = null;
+ try {
+ br = new BufferedReader(new InputStreamReader(is));
+ String s;
+ while ((s = br.readLine()) != null) {
+ sb.append(s);
+ sb.append('\n');
+ }
+ } catch (IOException e) {
+ L.log(Level.WARNING, e.getMessage(), e);
+ } finally {
+ if (br != null) {
+ try {
+ br.close();
+ } catch (IOException e) {
+ L.log(Level.FINEST, e.getMessage(), e);
+ }
+ }
+ }
+ return sb.toString();
+ }
- private void checkResponse(String rsp, String expContent) {
- try {
- Assert.assertTrue(rsp, rsp.contains(expContent));
- } catch (AssertionError t) {
- if (rsp.contains("503")) {
- L.log(Level.WARNING, "Service Unavailable: {0}", SERVICE_URL);
- } else {
- throw t;
- }
- }
- }
+ private void checkResponse(String rsp, String expContent) {
+ try {
+ Assert.assertTrue(rsp, rsp.contains(expContent));
+ } catch (AssertionError t) {
+ if (rsp.contains("503")) {
+ L.log(Level.WARNING, "Service Unavailable: {0}", SERVICE_URL);
+ } else {
+ throw t;
+ }
+ }
+ }
+
+ private File prepareWsdl() {
+ String[] files = { "imported.wsdl", "original.wsdl", "schema.xsd" };
+ File targetFolder = new File(System.getProperty("java.io.tmpdir"),
+ "WsTesterTest");
+ targetFolder.mkdirs();
+ for (String file : files) {
+ InputStream is = WsTesterTest.class.getResourceAsStream("/wsdl/"
+ + file);
+ File target = new File(targetFolder, file);
+ if (target.exists()) {
+ target.delete();
+ }
+ try {
+ OutputStream os = new BufferedOutputStream(
+ new FileOutputStream(target));
+ copy(is, os);
+ } catch (FileNotFoundException fnfe) {
+ throw new RuntimeException(fnfe);
+ }
+ }
+ return targetFolder;
+ }
+
+ private void copy(InputStream in, OutputStream out) {
+ byte[] buf = new byte[1024];
+ int len;
+ try {
+ while ((len = in.read(buf)) > 0) {
+ out.write(buf, 0, len);
+ }
+ } catch (IOException ioe) {
+ throw new RuntimeException(ioe);
+ } finally {
+ if (in != null) {
+ try {
+ in.close();
+ } catch (IOException ioe2) {
+ L.log(Level.WARNING, ioe2.getMessage(), ioe2);
+ }
+ }
+ if (out != null) {
+ try {
+ out.close();
+ } catch (IOException ioe2) {
+ L.log(Level.WARNING, ioe2.getMessage(), ioe2);
+ }
+ }
+ }
+ }
}
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/widgets/SelectWSDLDialog.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/widgets/SelectWSDLDialog.java 2010-07-22 09:43:16 UTC (rev 23658)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/widgets/SelectWSDLDialog.java 2010-07-22 10:04:27 UTC (rev 23659)
@@ -24,26 +24,37 @@
public SelectWSDLDialog(Shell shell) throws WidgetNotFoundException {
super(shell);
+ //Select WSDL
assert JBossWSUIMessages.WSDLBrowseDialog_Dialog_Title.equals(getText());
}
public void openURL() {
+ //URL...
bot().button(JBossWSUIMessages.WSDLBrowseDialog_URL_Browse).click();
}
- // public void setURI(String s) {
- // bot().comboBoxWithLabel(JBossWSUIMessages.WSDLBrowseDialog_WSDL_URI_Field).setText(s);
- // }
+ public void setURI(String s) {
+ //WSDL URI:
+ bot().comboBoxWithLabel(JBossWSUIMessages.WSDLBrowseDialog_WSDL_URI_Field).setText(s);
+ }
public String getURI() {
+ //WSDL URI:
return bot().comboBoxWithLabel(JBossWSUIMessages.WSDLBrowseDialog_WSDL_URI_Field).getText();
}
public List<String> getServices() {
+ //Service:
return getItems(JBossWSUIMessages.WSDLBrowseDialog_Service_Field);
}
+
+ public void selectService(String service) {
+ //Service:
+ bot().comboBoxWithLabel(JBossWSUIMessages.WSDLBrowseDialog_Service_Field).setSelection(service);
+ }
public List<String> getPorts() {
+ //Port:
return getItems(JBossWSUIMessages.WSDLBrowseDialog_Port_Field);
}
@@ -65,6 +76,7 @@
}
private SWTBotList getOperationsList() {
+ //Operation:
return bot().listWithLabel(JBossWSUIMessages.WSDLBrowseDialog_Operation_Field);
}
}
\ No newline at end of file
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/widgets/WsTesterView.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/widgets/WsTesterView.java 2010-07-22 09:43:16 UTC (rev 23658)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/widgets/WsTesterView.java 2010-07-22 10:04:27 UTC (rev 23659)
@@ -17,18 +17,19 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.results.BoolResult;
import org.eclipse.swtbot.swt.finder.waits.Conditions;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTabItem;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotLabel;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
import org.jboss.tools.ui.bot.ext.gen.IView;
import org.jboss.tools.ui.bot.ext.view.ViewBase;
-import org.jboss.tools.ws.ui.bot.test.WsTesterTest;
import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
import org.osgi.framework.Bundle;
@@ -37,30 +38,29 @@
private static final Bundle WSUI_BUNDLE = Platform.getBundle("org.jboss.tools.ws.ui");
- public enum Ws_Type {
+ public enum Request_Type {
- JAX_WS, JAX_RS;
+ JAX_WS, GET, POST, PUT, DELETE;
- String getLabel() {
+ @Override
+ public String toString() {
switch (this) {
case JAX_WS:
return "JAX-WS";
- case JAX_RS:
- return "JAX-RS";
+ default:
+ return super.toString();
}
- throw new AssertionError("Invalid Web Service Type");
}
- }
- public enum Http_Method {
-
- GET, POST, PUT, DELETE;
+ public static Request_Type parse(String s) {
+ return "JAX-WS".equals(s) ? JAX_WS : valueOf(s);
+ }
}
public enum Request_Arg_Type {
- HEADER(JBossWSUIMessages.JAXRSWSTestView_Request_Header_Label),
- PARAMETER(JBossWSUIMessages.JAXRSWSTestView_Request_Parameters_Label);
+ HEADER(JBossWSUIMessages.JAXRSWSTestView2_Headers_Section),
+ PARAMETER(JBossWSUIMessages.JAXRSWSTestView2_Parameters_Section);
private String type;
@@ -71,6 +71,11 @@
private String getType() {
return type;
}
+
+ @Override
+ public String toString() {
+ return getType();
+ }
}
public WsTesterView() {
@@ -98,63 +103,63 @@
return b;
}
- public void setWebServiceType(WsTesterView.Ws_Type type) {
- // Web Service Type:
- comboBoxWithLabel(JBossWSUIMessages.JAXRSWSTestView_Web_Service_Type_Label)
- .setSelection(type.getLabel());
+ public void setRequestType(Request_Type m) {
+ getRequestTypeCombo().setSelection(m.toString());
}
- // public void setSampleContent() {
- // button(JBossWSUIMessages.JAXRSWSTestView_Set_Sample_Data_Label).click();
- // }
-
- public void setHttpMethod(WsTesterView.Http_Method m) {
- getHTTPTypeCombo().setSelection(m.toString());
+ public Request_Type getRequestType() {
+ return Request_Type.parse(getRequestTypeCombo().getText());
}
- public WsTesterView.Http_Method getHttpMethod() {
- return Enum.valueOf(WsTesterView.Http_Method.class, getHTTPTypeCombo().getText());
- }
-
- public boolean isHttpMethodSelectionEnabled() {
- return getHTTPTypeCombo().isEnabled();
- }
-
public void setServiceURL(String url) {
- getServiceURLCombo().typeText(url);
+ SWTBotCombo c = getServiceURLCombo();
+ c.setText("");
+ c.typeText(url);
}
public String getServiceURL() {
return getServiceURLCombo().getText();
}
- public void setActionURL(String s) {
- getActionURLText().typeText(s);
+ public void setRequestBody(String s) {
+ // Body Text
+ textWithLabel(JBossWSUIMessages.JAXRSWSTestView2_BodyText_Section).setText(s);
}
- public String getActionURL() {
- return getActionURLText().getText();
+ public String getRequestBody() {
+ // Body Text
+ return textWithLabel(JBossWSUIMessages.JAXRSWSTestView2_BodyText_Section).getText();
}
- public void setRequestBody(String s) {
- SWTBotTabItem ti = tabItem(JBossWSUIMessages.JAXRSWSTestView_Request_Body_Label);
- ti.activate();
- text(1).setText(s);
+ public void expandSection(String name) {
+ class X extends SWTBotLabel {
+ X(Label y){
+ super(y);
+ }
+
+ void expand() {
+ boolean expanded = syncExec(new BoolResult() {
+
+ public Boolean run() {
+ return ((ExpandableComposite) widget.getParent()).isExpanded();
+ }
+ });
+ assert !expanded : "Section '" + widget.getText() + "' is already expanded";
+ click(true);
+ }
+ }
+ new X(label(name).widget).expand();
}
public void addRequestArg(WsTesterView.Request_Arg_Type type, String name,
String value) {
- SWTBotTabItem ti = WsTesterTest.bot.tabItem(type.getType());
- ti.activate();
- text(1).typeText(name + "=" + value);
- WsTesterTest.bot.button("Add").click();
- text(1).setText("");
+ text(type.ordinal()).typeText(name + "=" + value);
+ button("Add", type.ordinal()).click();
+ text(type.ordinal()).setText("");
}
public Map<String, String> getRequestArgs(WsTesterView.Request_Arg_Type type) {
- SWTBotTabItem ti = WsTesterTest.bot.tabItem(type.getType());
- ti.activate();
- String[] args = list(0).getItems();
+ String[] args = list(type.ordinal()).getItems();
Map<String, String> result = new HashMap<String, String>();
for (String s : args) {
int i = s.indexOf('=');
@@ -165,96 +170,55 @@
public void editRequestArg(WsTesterView.Request_Arg_Type type,
String oldName, String oldValue, String newName, String newValue) {
- SWTBotTabItem ti = WsTesterTest.bot.tabItem(type.getType());
- ti.activate();
- WsTesterTest.bot.list(0).select(oldName + "=" + oldValue);
- WsTesterTest.bot.button("Edit").click();
- SWTBot sh = WsTesterTest.bot.activeShell().bot();
+ list(type.ordinal()).select(oldName + "=" + oldValue);
+ button("Edit", type.ordinal()).click();
+ SWTBot sh = activeShell().bot();
sh.text(0).typeText(newName + "=" + newValue);
sh.button(IDialogConstants.OK_LABEL).click();
}
- public void upRequestArg(WsTesterView.Request_Arg_Type type, String name,
- String value) {
- SWTBotTabItem ti = WsTesterTest.bot.tabItem(type.getType());
- ti.activate();
- list(0).select(name + "=" + value);
- WsTesterTest.bot.button("Up").click();
- }
-
- public void downRequestArg(WsTesterView.Request_Arg_Type type, String name,
- String value) {
- SWTBotTabItem ti = WsTesterTest.bot.tabItem(type.getType());
- ti.activate();
- list(0).select(name + "=" + value);
- WsTesterTest.bot.button("Down").click();
- }
-
public void removeRequestArg(WsTesterView.Request_Arg_Type type,
String name, String value) {
- SWTBotTabItem ti = WsTesterTest.bot.tabItem(type.getType());
- ti.activate();
- list(0).select(name + "=" + value);
- WsTesterTest.bot.button("Remove").click();
+ list(type.ordinal()).select(name + "=" + value);
+ button("Remove", type.ordinal()).click();
}
public void clearRequestArgs(WsTesterView.Request_Arg_Type type) {
- SWTBotTabItem ti = WsTesterTest.bot.tabItem(type.getType());
- ti.activate();
- SWTBotButton b = WsTesterTest.bot.button("Clear All");
- if (b.isEnabled()) {
- b.click();
- }
+ SWTBotButton b = button("Clear All", type.ordinal());
+ b.click();
}
public String getResponseBody() {
- SWTBotTabItem ti = tabItem(JBossWSUIMessages.JAXRSWSTestView_Results_Body_Label);
- ti.activate();
- return WsTesterTest.bot.text(2).getText();
+ return textWithLabel(JBossWSUIMessages.JAXRSWSTestView2_ResponseBody_Section).getText();
}
public String[] getResponseHeaders() {
- SWTBotTabItem ti = tabItem(JBossWSUIMessages.JAXRSWSTestView_Results_Header_Label);
- ti.activate();
- return list(1).getItems();
+ return listWithLabel(JBossWSUIMessages.JAXRSWSTestView2_ResponseHeaders_Section).getItems();
}
public void invoke() {
- String dlgTitle = JBossWSUIMessages.JAXRSWSTestView_Invoke_Label;
- button(dlgTitle).click();
- waitWhile(Conditions.shellIsActive(dlgTitle), 120000);
+ toolbarButtonWithTooltip(JBossWSUIMessages.JAXRSWSTestView2_Go_Tooltip).click();
+ waitWhile(Conditions.shellIsActive(JBossWSUIMessages.JAXRSWSTestView_Invoke_Label), 120000);
sleep(500);
}
public SelectWSDLDialog getFromWSDL() {
- button(JBossWSUIMessages.JAXRSWSTestView_Button_Get_From_WSDL).click();
+ toolbarButtonWithTooltip(JBossWSUIMessages.JAXRSWSTestView2_GetFromWSDL_Tooltip).click();
return new SelectWSDLDialog(activeShell().widget);
}
- public void openMonitor() {
- button(JBossWSUIMessages.JAXRSWSTestView_Open_Monitor_Button).click();
- }
-
- public void configureMonitor() {
- button(JBossWSUIMessages.JAXRSWSTestView_Configure_Monitor_Button).click();
- }
-
private String getStringFromBundle(String key) {
return Platform.getResourceString(WSUI_BUNDLE, key);
}
- private SWTBotCombo getHTTPTypeCombo() {
+ private SWTBotCombo getRequestTypeCombo() {
// HTTP Method:
- return comboBoxWithLabel(JBossWSUIMessages.JAXRSWSTestView_HTTP_Method_Label);
+ return comboBox(1);
}
private SWTBotCombo getServiceURLCombo() {
// Service URL:
- return comboBoxWithLabel(JBossWSUIMessages.JAXRSWSTestView_Service_URL_Label);
+ return comboBox(0);
}
- private SWTBotText getActionURLText() {
- // Action URL:
- return textWithLabel(JBossWSUIMessages.JAXRSWSTestView_Action_URL_Label);
- }
}
\ No newline at end of file
15 years, 9 months
JBoss Tools SVN: r23658 - in trunk/vpe/plugins/org.jboss.tools.vpe: src/org/jboss/tools/vpe/editor/preferences and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-07-22 05:43:16 -0400 (Thu, 22 Jul 2010)
New Revision: 23658
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportImportUserTagsTemplatesWizardDialog.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUserTagsTemplatesMenuWizard.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUserTagsTemplatesMenuWizardPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUserTagsTemplatesWizard.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUserTagsTemplatesWizardPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUserTagsTemplatesMenuWizard.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUserTagsTemplatesMenuWizardPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUserTagsTemplatesWizard.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUserTagsTemplatesWizardPage.java
Removed:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportImportUnknownTagsTemplatesWizardDialog.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesMenuWizard.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesMenuWizardPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizard.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizardPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesMenuWizard.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesMenuWizardPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizard.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/TemplatesPreferencePage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeEditAnyDialog.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
Log:
https://jira.jboss.org/browse/JBIDE-6689 :
Broken language in Export Visual Page Editor Templates
- Changed filenames and messages from 'unknown templates' to 'user templates'.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties 2010-07-22 08:14:03 UTC (rev 23657)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties 2010-07-22 09:43:16 UTC (rev 23658)
@@ -9,7 +9,7 @@
PreferencePage_ElVariables=El Variables
visualEditorImpl_name=XulRunner Visual Editor
PreferencePage_VpeEditor=Visual Page Editor
-exportUnknownTagsTemplatesWizardName=Unknown tags templates
-exportUnknownTagsTemplatesWizardDescription=Export unknown tags templates to the external file
-importUnknownTagsTemplatesWizardName=Unknown tags templates
-importUnknownTagsTemplatesWizardDescription=Import unknown tags templates from the external file
+exportUserTagsTemplatesWizardName=User specified tag templates
+exportUserTagsTemplatesWizardDescription=Export User specified tag templates to the local file system
+importUserTagsTemplatesWizardName=User specified tag templates
+importUserTagsTemplatesWizardDescription=Import User specified tag templates from the local file system
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2010-07-22 08:14:03 UTC (rev 23657)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2010-07-22 09:43:16 UTC (rev 23658)
@@ -131,12 +131,12 @@
<extension
point="org.eclipse.ui.exportWizards">
<wizard
- id="org.jboss.tools.vpe.editor.wizards.ExportUnknownTagsTemplatesWizard"
- class="org.jboss.tools.vpe.editor.wizards.ExportUnknownTagsTemplatesMenuWizard"
- name="%exportUnknownTagsTemplatesWizardName"
+ id="org.jboss.tools.vpe.editor.wizards.ExportUserTagsTemplatesMenuWizard"
+ class="org.jboss.tools.vpe.editor.wizards.ExportUserTagsTemplatesMenuWizard"
+ name="%exportUserTagsTemplatesWizardName"
icon="$nl$/resources/org/jboss/tools/vpe/wizards/icons/export_wizard.gif">
<description>
- %exportUnknownTagsTemplatesWizardDescription
+ %exportUserTagsTemplatesWizardDescription
</description>
</wizard>
</extension>
@@ -144,12 +144,12 @@
<extension
point="org.eclipse.ui.importWizards">
<wizard
- id="org.jboss.tools.vpe.editor.wizards.ImportUnknownTagsTemplatesWizard"
- class="org.jboss.tools.vpe.editor.wizards.ImportUnknownTagsTemplatesMenuWizard"
- name="%importUnknownTagsTemplatesWizardName"
+ id="org.jboss.tools.vpe.editor.wizards.ImportUserTagsTemplatesMenuWizard"
+ class="org.jboss.tools.vpe.editor.wizards.ImportUserTagsTemplatesMenuWizard"
+ name="%importUserTagsTemplatesWizardName"
icon="resources/org/jboss/tools/vpe/wizards/icons/import_wizard.gif">
<description>
- %importUnknownTagsTemplatesWizardDescription
+ %importUserTagsTemplatesWizardDescription
</description>
</wizard>
</extension>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/TemplatesPreferencePage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/TemplatesPreferencePage.java 2010-07-22 08:14:03 UTC (rev 23657)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/TemplatesPreferencePage.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -44,9 +44,9 @@
import org.jboss.tools.vpe.editor.template.VpeEditAnyDialog;
import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
import org.jboss.tools.vpe.editor.util.Constants;
-import org.jboss.tools.vpe.editor.wizards.ExportImportUnknownTagsTemplatesWizardDialog;
-import org.jboss.tools.vpe.editor.wizards.ExportUnknownTagsTemplatesWizard;
-import org.jboss.tools.vpe.editor.wizards.ImportUnknownTagsTemplatesWizard;
+import org.jboss.tools.vpe.editor.wizards.ExportImportUserTagsTemplatesWizardDialog;
+import org.jboss.tools.vpe.editor.wizards.ExportUserTagsTemplatesWizard;
+import org.jboss.tools.vpe.editor.wizards.ImportUserTagsTemplatesWizard;
import org.jboss.tools.vpe.editor.wizards.VpeImportExportWizardsUtils;
import org.jboss.tools.vpe.messages.VpeUIMessages;
@@ -95,7 +95,7 @@
composite.setFont(parent.getFont());
/*
- * Create data-table with the list of unknown tags
+ * Create data-table with the list of user specified templates
*/
tagsTable = new Table(composite, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
TableLayout layout = new TableLayout();
@@ -214,17 +214,17 @@
/*
* Export templates
*/
- ExportImportUnknownTagsTemplatesWizardDialog dlg = new ExportImportUnknownTagsTemplatesWizardDialog(
+ ExportImportUserTagsTemplatesWizardDialog dlg = new ExportImportUserTagsTemplatesWizardDialog(
PlatformUI.getWorkbench().getDisplay().getActiveShell(),
- new ExportUnknownTagsTemplatesWizard(tagsList));
+ new ExportUserTagsTemplatesWizard(tagsList));
dlg.open();
} else if (source == importButton) {
/*
* Import templates
*/
- ExportImportUnknownTagsTemplatesWizardDialog dlg = new ExportImportUnknownTagsTemplatesWizardDialog(
+ ExportImportUserTagsTemplatesWizardDialog dlg = new ExportImportUserTagsTemplatesWizardDialog(
PlatformUI.getWorkbench().getDisplay().getActiveShell(),
- new ImportUnknownTagsTemplatesWizard(tagsList));
+ new ImportUserTagsTemplatesWizard(tagsList));
dlg.open();
/*
* Re-initialize tags list from the file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeEditAnyDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeEditAnyDialog.java 2010-07-22 08:14:03 UTC (rev 23657)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeEditAnyDialog.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -107,7 +107,7 @@
setTitle(VpeUIMessages.TAG_ATTRIBUTES);
setTitleImage(ModelUIImages.getImageDescriptor(
ModelUIImages.WIZARD_DEFAULT).createImage(null));
- setMessage(VpeUIMessages.UNKNOWN_TAGS_DIALOG_DESCRIPTION);
+ setMessage(VpeUIMessages.USER_SPECIFIED_TAG_DIALOG_DESCRIPTION);
/*
* Create validator
@@ -487,7 +487,7 @@
/*
* Initialize the message with the description
*/
- IMessageProvider message = new Message(VpeUIMessages.UNKNOWN_TAGS_DIALOG_DESCRIPTION,
+ IMessageProvider message = new Message(VpeUIMessages.USER_SPECIFIED_TAG_DIALOG_DESCRIPTION,
IMessageProvider.NONE);
List<IMessageProvider> statuses = new ArrayList<IMessageProvider>();
/*
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportImportUnknownTagsTemplatesWizardDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportImportUnknownTagsTemplatesWizardDialog.java 2010-07-22 08:14:03 UTC (rev 23657)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportImportUnknownTagsTemplatesWizardDialog.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2009 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.vpe.editor.wizards;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.jboss.tools.vpe.editor.template.VpeAnyData;
-
-public class ExportImportUnknownTagsTemplatesWizardDialog extends WizardDialog {
-
- public ExportImportUnknownTagsTemplatesWizardDialog(Shell parentShell,
- IWizard newWizard) {
- super(parentShell, newWizard);
- setHelpAvailable(false);
- }
-
- @Override
- public void setMinimumPageSize(int minWidth, int minHeight) {
- super.setMinimumPageSize(500, 400);
- }
-
- public List<VpeAnyData> getImportedList() {
- if (getWizard() instanceof ImportUnknownTagsTemplatesWizard) {
- return ((ImportUnknownTagsTemplatesWizard)getWizard()).getImportedList();
- } else {
- return new ArrayList<VpeAnyData>();
- }
- }
-}
Copied: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportImportUserTagsTemplatesWizardDialog.java (from rev 23657, trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportImportUnknownTagsTemplatesWizardDialog.java)
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportImportUserTagsTemplatesWizardDialog.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportImportUserTagsTemplatesWizardDialog.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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.vpe.editor.wizards;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.jboss.tools.vpe.editor.template.VpeAnyData;
+
+public class ExportImportUserTagsTemplatesWizardDialog extends WizardDialog {
+
+ public ExportImportUserTagsTemplatesWizardDialog(Shell parentShell,
+ IWizard newWizard) {
+ super(parentShell, newWizard);
+ setHelpAvailable(false);
+ }
+
+ @Override
+ public void setMinimumPageSize(int minWidth, int minHeight) {
+ super.setMinimumPageSize(500, 400);
+ }
+
+ public List<VpeAnyData> getImportedList() {
+ if (getWizard() instanceof ImportUserTagsTemplatesWizard) {
+ return ((ImportUserTagsTemplatesWizard)getWizard()).getImportedList();
+ } else {
+ return new ArrayList<VpeAnyData>();
+ }
+ }
+}
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesMenuWizard.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesMenuWizard.java 2010-07-22 08:14:03 UTC (rev 23657)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesMenuWizard.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2009 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.vpe.editor.wizards;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.IExportWizard;
-import org.eclipse.ui.IWorkbench;
-import org.jboss.tools.vpe.messages.VpeUIMessages;
-
-/**
- * Wizard that exports Unknown Tags Templates from Preference Page
- * to the vpe-templates-auto.xml file.
- *
- * @author dmaliarevich
- */
-public class ExportUnknownTagsTemplatesMenuWizard extends Wizard implements
- IExportWizard {
-
- private IStructuredSelection selection;
- private ExportUnknownTagsTemplatesMenuWizardPage mainPage;
-
- /**
- * Constructor
- */
- public ExportUnknownTagsTemplatesMenuWizard() {
- setWindowTitle(VpeUIMessages.EXPORT_UNKNOWN_TAGS_PAGE_TITLE);
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
-
- }
-
- @Override
- public void addPages() {
- super.addPages();
- mainPage = new ExportUnknownTagsTemplatesMenuWizardPage(
- VpeUIMessages.EXPORT_UNKNOWN_TAGS_TEMPLATES_WIZARD_PAGE,
- selection);
- addPage(mainPage);
- }
-
- @Override
- public boolean canFinish() {
- return mainPage.isPageComplete();
- }
-
- @Override
- public boolean performFinish() {
- return mainPage.finish();
- }
-
-}
\ No newline at end of file
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesMenuWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesMenuWizardPage.java 2010-07-22 08:14:03 UTC (rev 23657)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesMenuWizardPage.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2009 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.vpe.editor.wizards;
-
-import java.io.File;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.viewers.ColumnLayoutData;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.WizardExportResourcesPage;
-import org.jboss.tools.vpe.editor.template.VpeAnyData;
-import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
-import org.jboss.tools.vpe.editor.util.Constants;
-import org.jboss.tools.vpe.messages.VpeUIMessages;
-import org.jboss.tools.vpe.resref.core.ReferenceWizardPage;
-
-/**
- * Page for exporting unknown tags templates.
- *
- * @author dmaliarevich
- */
-public class ExportUnknownTagsTemplatesMenuWizardPage extends
- WizardExportResourcesPage implements VpeImportExportWizardPage {
-
- private String pathString;
- private Table tagsTable;
- private List<VpeAnyData> tagsList;
-
- /**
- * Constructor
- *
- * @param pageName
- * @param selection
- */
- public ExportUnknownTagsTemplatesMenuWizardPage(String pageName,
- IStructuredSelection selection) {
- super(pageName, selection);
- setTitle(VpeUIMessages.EXPORT_UNKNOWN_TAGS_PAGE_TITLE);
- setDescription(VpeUIMessages.EXPORT_UNKNOWN_TAGS_PAGE_DESCRIPTION);
- setImageDescriptor(ReferenceWizardPage.getImageDescriptor());
- /*
- * Initialize tags list
- */
- tagsList = VpeTemplateManager.getInstance().getAnyTemplates();
- }
-
- @Override
- public void createControl(Composite parent) {
- /*
- * Create main composite element with grid layout.
- * Two columns.
- */
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(3, false));
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
- composite.setFont(parent.getFont());
-
- /*
- * Create datatable with the list of unknown tags
- */
- tagsTable = new Table(composite, SWT.BORDER);
- TableLayout layout = new TableLayout();
- tagsTable.setLayout(layout);
- tagsTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
- tagsTable.setHeaderVisible(true);
- tagsTable.setLinesVisible(true);
-
- /*
- * Create columns in the table
- */
- ColumnLayoutData columnLayoutData;
- for (int i = 0; i < COLUMNS_NAMES.length; i++) {
- TableColumn column = new TableColumn(tagsTable, SWT.NONE);
- column.setText(COLUMNS_NAMES[i]);
- columnLayoutData = new ColumnWeightData(COLUMNS_WIDTHS[i], true);
- layout.addColumnData(columnLayoutData);
- }
- /*
- * Fill the table with stored tags
- */
- VpeImportExportWizardsUtils.updateTagsTable(tagsTable, tagsList, true);
-
- /*
- * Add label
- */
- Label fileNamaLabel = new Label(composite, SWT.NONE);
- fileNamaLabel.setLayoutData(new GridData(SWT.LEFT, SWT.BOTTOM, false, false, 1, 1));
- fileNamaLabel.setText(VpeUIMessages.FILE_NAME_LABEL);
- /*
- * Add output path
- */
- final Text pathText = new Text(composite, SWT.BORDER);
- pathText.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, false, 1, 1));
- pathText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- pathString = ((Text)e.getSource()).getText();
- setPageComplete(isPageComplete());
- }
- });
- /*
- * Add browse button
- */
- Button browseButton = new Button(composite, SWT.NONE);
- browseButton.setText(VpeUIMessages.BROWSE_BUTTON_TEXT);
- browseButton.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, false, 1, 1));
- browseButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- FileDialog dialog = new FileDialog(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getShell(), SWT.NONE);
- String path = dialog.open();
- if (path != null) {
- File file = new File(path);
- pathString = file.toString();
- /*
- * Then modifyText event will be dispatched.
- */
- pathText.setText(pathString);
- }
- }
- });
-
- /*
- * Finishing the initialization
- */
- updateWidgetEnablements();
- setPageComplete(determinePageCompletion());
- setErrorMessage(null); // should not initially have error message
-
- setControl(composite);
- }
-
- @Override
- protected void createDestinationGroup(Composite parent) {
- /*
- * Create nothing
- */
- }
-
- public void handleEvent(Event event) {
- /*
- * Do nothing
- */
- }
-
- @Override
- public boolean isPageComplete() {
- boolean isPageComplete = false;
- if ((pathString != null)
- && !Constants.EMPTY.equalsIgnoreCase(pathString)
- && (Path.ROOT.isValidPath(pathString))) {
- isPageComplete = true;
- }
- return isPageComplete;
- }
-
- public boolean finish() {
- List<VpeAnyData> templates = VpeTemplateManager.getInstance().getAnyTemplates();
- IPath path = new Path(pathString);
- VpeTemplateManager.getInstance().setAnyTemplates(templates, path);
- return true;
- }
-
-}
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizard.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizard.java 2010-07-22 08:14:03 UTC (rev 23657)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizard.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2009 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.vpe.editor.wizards;
-
-import java.util.List;
-
-import org.eclipse.jface.wizard.Wizard;
-import org.jboss.tools.vpe.editor.template.VpeAnyData;
-import org.jboss.tools.vpe.messages.VpeUIMessages;
-
-public class ExportUnknownTagsTemplatesWizard extends Wizard {
-
- private ExportUnknownTagsTemplatesWizardPage mainPage;
- private List<VpeAnyData> currentList;
-
- /**
- * Constructor
- */
- public ExportUnknownTagsTemplatesWizard(List<VpeAnyData> currentList) {
- setWindowTitle(VpeUIMessages.EXPORT_UNKNOWN_TAGS_PAGE_TITLE);
- this.currentList = currentList;
- }
-
- @Override
- public void addPages() {
- super.addPages();
- mainPage = new ExportUnknownTagsTemplatesWizardPage(
- VpeUIMessages.EXPORT_UNKNOWN_TAGS_TEMPLATES_WIZARD_PAGE,
- currentList);
- addPage(mainPage);
- }
-
- @Override
- public boolean canFinish() {
- return mainPage.isPageComplete();
- }
-
- @Override
- public boolean performFinish() {
- return mainPage.finish();
- }
-
-}
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizardPage.java 2010-07-22 08:14:03 UTC (rev 23657)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizardPage.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2009 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.vpe.editor.wizards;
-
-import java.io.File;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.viewers.ColumnLayoutData;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.jboss.tools.vpe.editor.template.VpeAnyData;
-import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
-import org.jboss.tools.vpe.editor.util.Constants;
-import org.jboss.tools.vpe.messages.VpeUIMessages;
-import org.jboss.tools.vpe.resref.core.ReferenceWizardPage;
-
-public class ExportUnknownTagsTemplatesWizardPage extends WizardPage implements
- VpeImportExportWizardPage {
-
- private String pathString;
- private Table tagsTable;
- private List<VpeAnyData> tagsList;
-
- protected ExportUnknownTagsTemplatesWizardPage(String pageName, List<VpeAnyData> currentList) {
- super(pageName);
- setTitle(VpeUIMessages.EXPORT_UNKNOWN_TAGS_PAGE_TITLE);
- setDescription(VpeUIMessages.EXPORT_UNKNOWN_TAGS_PAGE_DESCRIPTION);
- setImageDescriptor(ReferenceWizardPage.getImageDescriptor());
- /*
- * Initialize tags list
- */
- tagsList = currentList;
- }
-
- public void createControl(Composite parent) {
- /*
- * Create main composite element with grid layout.
- * Two columns.
- */
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(3, false));
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
- composite.setFont(parent.getFont());
-
- /*
- * Create datatable with the list of unknown tags
- */
- tagsTable = new Table(composite, SWT.BORDER);
- TableLayout layout = new TableLayout();
- tagsTable.setLayout(layout);
- tagsTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
- tagsTable.setHeaderVisible(true);
- tagsTable.setLinesVisible(true);
-
- /*
- * Create columns in the table
- */
- ColumnLayoutData columnLayoutData;
- for (int i = 0; i < COLUMNS_NAMES.length; i++) {
- TableColumn column = new TableColumn(tagsTable, SWT.NONE);
- column.setText(COLUMNS_NAMES[i]);
- columnLayoutData = new ColumnWeightData(COLUMNS_WIDTHS[i], true);
- layout.addColumnData(columnLayoutData);
- }
- /*
- * Fill the table with stored tags
- */
- VpeImportExportWizardsUtils.updateTagsTable(tagsTable, tagsList, true);
-
- /*
- * Add label
- */
- Label fileNamaLabel = new Label(composite, SWT.NONE);
- fileNamaLabel.setLayoutData(new GridData(SWT.LEFT, SWT.BOTTOM, false, false, 1, 1));
- fileNamaLabel.setText(VpeUIMessages.FILE_NAME_LABEL);
- /*
- * Add output path
- */
- final Text pathText = new Text(composite, SWT.BORDER);
- pathText.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, false, 1, 1));
- pathText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- pathString = ((Text)e.getSource()).getText();
- setPageComplete(isPageComplete());
- }
- });
- /*
- * Add browse button
- */
- Button browseButton = new Button(composite, SWT.NONE);
- browseButton.setText(VpeUIMessages.BROWSE_BUTTON_TEXT);
- browseButton.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, false, 1, 1));
- browseButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- FileDialog dialog = new FileDialog(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getShell(), SWT.NONE);
- String path = dialog.open();
- if (path != null) {
- File file = new File(path);
- pathString = file.toString();
- /*
- * Then modifyText event will be dispatched.
- */
- pathText.setText(pathString);
- }
- }
- });
-
- /*
- * Finishing the initialization
- */
- setPageComplete(isPageComplete());
- setErrorMessage(null); // should not initially have error message
-
- setControl(composite);
- }
-
- @Override
- public boolean isPageComplete() {
- boolean isPageComplete = false;
- if ((pathString != null)
- && !Constants.EMPTY.equalsIgnoreCase(pathString)
- && (Path.ROOT.isValidPath(pathString))) {
- isPageComplete = true;
- }
- return isPageComplete;
- }
-
- public boolean finish() {
- IPath path = new Path(pathString);
- /*
- * Export the current list to the specified location.
- */
- VpeTemplateManager.getInstance().setAnyTemplates(tagsList, path);
- return true;
- }
-
-}
Copied: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUserTagsTemplatesMenuWizard.java (from rev 23657, trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesMenuWizard.java)
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUserTagsTemplatesMenuWizard.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUserTagsTemplatesMenuWizard.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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.vpe.editor.wizards;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.IExportWizard;
+import org.eclipse.ui.IWorkbench;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+
+/**
+ * Wizard that exports User specified tag templates from Preference Page
+ * to the vpe-templates-auto.xml file.
+ *
+ * @author dmaliarevich
+ */
+public class ExportUserTagsTemplatesMenuWizard extends Wizard implements
+ IExportWizard {
+
+ private IStructuredSelection selection;
+ private ExportUserTagsTemplatesMenuWizardPage mainPage;
+
+ /**
+ * Constructor
+ */
+ public ExportUserTagsTemplatesMenuWizard() {
+ setWindowTitle(VpeUIMessages.EXPORT_USER_TAGS_PAGE_TITLE);
+ }
+
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+
+ }
+
+ @Override
+ public void addPages() {
+ super.addPages();
+ mainPage = new ExportUserTagsTemplatesMenuWizardPage(
+ VpeUIMessages.EXPORT_USER_TAGS_TEMPLATES_WIZARD_PAGE,
+ selection);
+ addPage(mainPage);
+ }
+
+ @Override
+ public boolean canFinish() {
+ return mainPage.isPageComplete();
+ }
+
+ @Override
+ public boolean performFinish() {
+ return mainPage.finish();
+ }
+
+}
\ No newline at end of file
Copied: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUserTagsTemplatesMenuWizardPage.java (from rev 23657, trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesMenuWizardPage.java)
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUserTagsTemplatesMenuWizardPage.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUserTagsTemplatesMenuWizardPage.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -0,0 +1,191 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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.vpe.editor.wizards;
+
+import java.io.File;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.viewers.ColumnLayoutData;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.WizardExportResourcesPage;
+import org.jboss.tools.vpe.editor.template.VpeAnyData;
+import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
+import org.jboss.tools.vpe.editor.util.Constants;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+import org.jboss.tools.vpe.resref.core.ReferenceWizardPage;
+
+/**
+ * Page for exporting user specified tag templates templates.
+ *
+ * @author dmaliarevich
+ */
+public class ExportUserTagsTemplatesMenuWizardPage extends
+ WizardExportResourcesPage implements VpeImportExportWizardPage {
+
+ private String pathString;
+ private Table tagsTable;
+ private List<VpeAnyData> tagsList;
+
+ /**
+ * Constructor
+ *
+ * @param pageName
+ * @param selection
+ */
+ public ExportUserTagsTemplatesMenuWizardPage(String pageName,
+ IStructuredSelection selection) {
+ super(pageName, selection);
+ setTitle(VpeUIMessages.EXPORT_USER_TAGS_PAGE_TITLE);
+ setDescription(VpeUIMessages.EXPORT_USER_TAGS_PAGE_DESCRIPTION);
+ setImageDescriptor(ReferenceWizardPage.getImageDescriptor());
+ /*
+ * Initialize tags list
+ */
+ tagsList = VpeTemplateManager.getInstance().getAnyTemplates();
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ /*
+ * Create main composite element with grid layout.
+ * Two columns.
+ */
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(new GridLayout(3, false));
+ composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+ composite.setFont(parent.getFont());
+
+ /*
+ * Create datatable with the list of user specified tag templates
+ */
+ tagsTable = new Table(composite, SWT.BORDER);
+ TableLayout layout = new TableLayout();
+ tagsTable.setLayout(layout);
+ tagsTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
+ tagsTable.setHeaderVisible(true);
+ tagsTable.setLinesVisible(true);
+
+ /*
+ * Create columns in the table
+ */
+ ColumnLayoutData columnLayoutData;
+ for (int i = 0; i < COLUMNS_NAMES.length; i++) {
+ TableColumn column = new TableColumn(tagsTable, SWT.NONE);
+ column.setText(COLUMNS_NAMES[i]);
+ columnLayoutData = new ColumnWeightData(COLUMNS_WIDTHS[i], true);
+ layout.addColumnData(columnLayoutData);
+ }
+ /*
+ * Fill the table with stored tags
+ */
+ VpeImportExportWizardsUtils.updateTagsTable(tagsTable, tagsList, true);
+
+ /*
+ * Add label
+ */
+ Label fileNamaLabel = new Label(composite, SWT.NONE);
+ fileNamaLabel.setLayoutData(new GridData(SWT.LEFT, SWT.BOTTOM, false, false, 1, 1));
+ fileNamaLabel.setText(VpeUIMessages.FILE_NAME_LABEL);
+ /*
+ * Add output path
+ */
+ final Text pathText = new Text(composite, SWT.BORDER);
+ pathText.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, false, 1, 1));
+ pathText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ pathString = ((Text)e.getSource()).getText();
+ setPageComplete(isPageComplete());
+ }
+ });
+ /*
+ * Add browse button
+ */
+ Button browseButton = new Button(composite, SWT.NONE);
+ browseButton.setText(VpeUIMessages.BROWSE_BUTTON_TEXT);
+ browseButton.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, false, 1, 1));
+ browseButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ FileDialog dialog = new FileDialog(PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getShell(), SWT.NONE);
+ String path = dialog.open();
+ if (path != null) {
+ File file = new File(path);
+ pathString = file.toString();
+ /*
+ * Then modifyText event will be dispatched.
+ */
+ pathText.setText(pathString);
+ }
+ }
+ });
+
+ /*
+ * Finishing the initialization
+ */
+ updateWidgetEnablements();
+ setPageComplete(determinePageCompletion());
+ setErrorMessage(null); // should not initially have error message
+
+ setControl(composite);
+ }
+
+ @Override
+ protected void createDestinationGroup(Composite parent) {
+ /*
+ * Create nothing
+ */
+ }
+
+ public void handleEvent(Event event) {
+ /*
+ * Do nothing
+ */
+ }
+
+ @Override
+ public boolean isPageComplete() {
+ boolean isPageComplete = false;
+ if ((pathString != null)
+ && !Constants.EMPTY.equalsIgnoreCase(pathString)
+ && (Path.ROOT.isValidPath(pathString))) {
+ isPageComplete = true;
+ }
+ return isPageComplete;
+ }
+
+ public boolean finish() {
+ List<VpeAnyData> templates = VpeTemplateManager.getInstance().getAnyTemplates();
+ IPath path = new Path(pathString);
+ VpeTemplateManager.getInstance().setAnyTemplates(templates, path);
+ return true;
+ }
+
+}
Copied: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUserTagsTemplatesWizard.java (from rev 23657, trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizard.java)
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUserTagsTemplatesWizard.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUserTagsTemplatesWizard.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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.vpe.editor.wizards;
+
+import java.util.List;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.jboss.tools.vpe.editor.template.VpeAnyData;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+
+public class ExportUserTagsTemplatesWizard extends Wizard {
+
+ private ExportUserTagsTemplatesWizardPage mainPage;
+ private List<VpeAnyData> currentList;
+
+ /**
+ * Constructor
+ */
+ public ExportUserTagsTemplatesWizard(List<VpeAnyData> currentList) {
+ setWindowTitle(VpeUIMessages.EXPORT_USER_TAGS_PAGE_TITLE);
+ this.currentList = currentList;
+ }
+
+ @Override
+ public void addPages() {
+ super.addPages();
+ mainPage = new ExportUserTagsTemplatesWizardPage(
+ VpeUIMessages.EXPORT_USER_TAGS_TEMPLATES_WIZARD_PAGE,
+ currentList);
+ addPage(mainPage);
+ }
+
+ @Override
+ public boolean canFinish() {
+ return mainPage.isPageComplete();
+ }
+
+ @Override
+ public boolean performFinish() {
+ return mainPage.finish();
+ }
+
+}
Copied: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUserTagsTemplatesWizardPage.java (from rev 23657, trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizardPage.java)
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUserTagsTemplatesWizardPage.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUserTagsTemplatesWizardPage.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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.vpe.editor.wizards;
+
+import java.io.File;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.viewers.ColumnLayoutData;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.vpe.editor.template.VpeAnyData;
+import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
+import org.jboss.tools.vpe.editor.util.Constants;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+import org.jboss.tools.vpe.resref.core.ReferenceWizardPage;
+
+public class ExportUserTagsTemplatesWizardPage extends WizardPage implements
+ VpeImportExportWizardPage {
+
+ private String pathString;
+ private Table tagsTable;
+ private List<VpeAnyData> tagsList;
+
+ protected ExportUserTagsTemplatesWizardPage(String pageName, List<VpeAnyData> currentList) {
+ super(pageName);
+ setTitle(VpeUIMessages.EXPORT_USER_TAGS_PAGE_TITLE);
+ setDescription(VpeUIMessages.EXPORT_USER_TAGS_PAGE_DESCRIPTION);
+ setImageDescriptor(ReferenceWizardPage.getImageDescriptor());
+ /*
+ * Initialize tags list
+ */
+ tagsList = currentList;
+ }
+
+ public void createControl(Composite parent) {
+ /*
+ * Create main composite element with grid layout.
+ * Two columns.
+ */
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(new GridLayout(3, false));
+ composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+ composite.setFont(parent.getFont());
+
+ /*
+ * Create datatable with the list of user specified tag templates
+ */
+ tagsTable = new Table(composite, SWT.BORDER);
+ TableLayout layout = new TableLayout();
+ tagsTable.setLayout(layout);
+ tagsTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
+ tagsTable.setHeaderVisible(true);
+ tagsTable.setLinesVisible(true);
+
+ /*
+ * Create columns in the table
+ */
+ ColumnLayoutData columnLayoutData;
+ for (int i = 0; i < COLUMNS_NAMES.length; i++) {
+ TableColumn column = new TableColumn(tagsTable, SWT.NONE);
+ column.setText(COLUMNS_NAMES[i]);
+ columnLayoutData = new ColumnWeightData(COLUMNS_WIDTHS[i], true);
+ layout.addColumnData(columnLayoutData);
+ }
+ /*
+ * Fill the table with stored tags
+ */
+ VpeImportExportWizardsUtils.updateTagsTable(tagsTable, tagsList, true);
+
+ /*
+ * Add label
+ */
+ Label fileNamaLabel = new Label(composite, SWT.NONE);
+ fileNamaLabel.setLayoutData(new GridData(SWT.LEFT, SWT.BOTTOM, false, false, 1, 1));
+ fileNamaLabel.setText(VpeUIMessages.FILE_NAME_LABEL);
+ /*
+ * Add output path
+ */
+ final Text pathText = new Text(composite, SWT.BORDER);
+ pathText.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, false, 1, 1));
+ pathText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ pathString = ((Text)e.getSource()).getText();
+ setPageComplete(isPageComplete());
+ }
+ });
+ /*
+ * Add browse button
+ */
+ Button browseButton = new Button(composite, SWT.NONE);
+ browseButton.setText(VpeUIMessages.BROWSE_BUTTON_TEXT);
+ browseButton.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, false, 1, 1));
+ browseButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ FileDialog dialog = new FileDialog(PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getShell(), SWT.NONE);
+ String path = dialog.open();
+ if (path != null) {
+ File file = new File(path);
+ pathString = file.toString();
+ /*
+ * Then modifyText event will be dispatched.
+ */
+ pathText.setText(pathString);
+ }
+ }
+ });
+
+ /*
+ * Finishing the initialization
+ */
+ setPageComplete(isPageComplete());
+ setErrorMessage(null); // should not initially have error message
+
+ setControl(composite);
+ }
+
+ @Override
+ public boolean isPageComplete() {
+ boolean isPageComplete = false;
+ if ((pathString != null)
+ && !Constants.EMPTY.equalsIgnoreCase(pathString)
+ && (Path.ROOT.isValidPath(pathString))) {
+ isPageComplete = true;
+ }
+ return isPageComplete;
+ }
+
+ public boolean finish() {
+ IPath path = new Path(pathString);
+ /*
+ * Export the current list to the specified location.
+ */
+ VpeTemplateManager.getInstance().setAnyTemplates(tagsList, path);
+ return true;
+ }
+
+}
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesMenuWizard.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesMenuWizard.java 2010-07-22 08:14:03 UTC (rev 23657)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesMenuWizard.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2009 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.vpe.editor.wizards;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.IWorkbench;
-import org.jboss.tools.vpe.messages.VpeUIMessages;
-
-/**
- *
- * Wizard that imports Unknown Tags Templates from external xml file.
- *
- * @author dmaliarevich
- */
-public class ImportUnknownTagsTemplatesMenuWizard extends Wizard implements
- IImportWizard {
-
- private IStructuredSelection selection;
- private ImportUnknownTagsTemplatesMenuWizardPage mainPage;
-
- /**
- * Constructor
- */
- public ImportUnknownTagsTemplatesMenuWizard() {
- super();
- setWindowTitle(VpeUIMessages.IMPORT_UNKNOWN_TAGS_PAGE_TITLE);
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- this.selection = selection;
- setWindowTitle(VpeUIMessages.IMPORT_UNKNOWN_TAGS_PAGE_TITLE);
- }
-
- @Override
- public void addPages() {
- super.addPages();
- mainPage = new ImportUnknownTagsTemplatesMenuWizardPage(
- VpeUIMessages.IMPORT_UNKNOWN_TAGS_TEMPLATES_WIZARD_PAGE,
- selection);
- addPage(mainPage);
- }
-
- @Override
- public boolean canFinish() {
- return mainPage.isPageComplete();
- }
-
- @Override
- public boolean performFinish() {
- return mainPage.finish();
- }
-
-}
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesMenuWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesMenuWizardPage.java 2010-07-22 08:14:03 UTC (rev 23657)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesMenuWizardPage.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2009 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.vpe.editor.wizards;
-
-import java.io.File;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.viewers.ColumnLayoutData;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.WizardResourceImportPage;
-import org.jboss.tools.vpe.VpePlugin;
-import org.jboss.tools.vpe.editor.template.VpeAnyData;
-import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
-import org.jboss.tools.vpe.editor.util.Constants;
-import org.jboss.tools.vpe.messages.VpeUIMessages;
-import org.jboss.tools.vpe.resref.core.ReferenceWizardPage;
-
-/**
- * Page for importing unknown tags templates.
- *
- * @author dmaliarevich
- */
-public class ImportUnknownTagsTemplatesMenuWizardPage extends
- WizardResourceImportPage implements VpeImportExportWizardPage {
-
- private String pathString;
- private Table tagsTable;
- private List<VpeAnyData> tagsList;
-
- /**
- * Constructor
- *
- * @param name
- * @param selection
- */
- public ImportUnknownTagsTemplatesMenuWizardPage(String name,
- IStructuredSelection selection) {
- super(name, selection);
- setTitle(VpeUIMessages.IMPORT_UNKNOWN_TAGS_PAGE_TITLE);
- setDescription(VpeUIMessages.IMPORT_UNKNOWN_TAGS_PAGE_DESCRIPTION);
- setImageDescriptor(ReferenceWizardPage.getImageDescriptor());
- }
-
- @Override
- public void createControl(Composite parent) {
- /*
- * Create main composite element with grid layout.
- * Two columns.
- */
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(3, false));
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
- composite.setFont(parent.getFont());
-
- /*
- * Add label
- */
- Label fileNamaLabel = new Label(composite, SWT.NONE);
- fileNamaLabel.setLayoutData(new GridData(SWT.LEFT, SWT.BOTTOM, false, false, 1, 1));
- fileNamaLabel.setText(VpeUIMessages.FILE_NAME_LABEL);
- /*
- * Add output path
- */
- final Text pathText = new Text(composite, SWT.BORDER);
- pathText.setEditable(true);
- pathText.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, false, 1, 1));
- pathText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- pathString = ((Text)e.getSource()).getText();
- IPath enteredPath = null;
- /*
- * Load templates if the path is valid
- */
- if ((Path.ROOT.isValidPath(pathString))
- && (enteredPath = Path.fromOSString(pathString)).toFile().exists()) {
- /*
- * Load tags list from the specified location.
- */
- tagsList = VpeTemplateManager.getInstance()
- .getAnyTemplates(enteredPath);
-
- } else {
- /*
- * Reset taglist, show empty table
- */
- if (tagsList != null) {
- tagsList.clear();
- }
- }
- /*
- * Update table tags list based on the loaded file.
- */
- VpeImportExportWizardsUtils.updateTagsTable(tagsTable, tagsList, true);
- /*
- * Check if the page is complete.
- */
- setPageComplete(isPageComplete());
- }
- });
- /*
- * Add browse button
- */
- Button browseButton = new Button(composite, SWT.NONE);
- browseButton.setText(VpeUIMessages.BROWSE_BUTTON_TEXT);
- browseButton.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, false, 1, 1));
- browseButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- FileDialog dialog = new FileDialog(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getShell(), SWT.NONE);
- String path = dialog.open();
- if (path != null) {
- File file = new File(path);
- pathString = file.toString();
- /*
- * Then modifyText event will be dispatched.
- */
- pathText.setText(pathString);
- }
- }
- });
-
- /*
- * Create datatable with the list of unknown tags
- */
- tagsTable = new Table(composite, SWT.BORDER);
- TableLayout layout = new TableLayout();
- tagsTable.setLayout(layout);
- tagsTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
- tagsTable.setHeaderVisible(true);
- tagsTable.setLinesVisible(true);
-
- /*
- * Create columns in the table
- */
- ColumnLayoutData columnLayoutData;
- for (int i = 0; i < COLUMNS_NAMES.length; i++) {
- TableColumn column = new TableColumn(tagsTable, SWT.NONE);
- column.setText(COLUMNS_NAMES[i]);
- columnLayoutData = new ColumnWeightData(COLUMNS_WIDTHS[i], true);
- layout.addColumnData(columnLayoutData);
- }
-
- /*
- * Finishing the initialization
- */
- setErrorMessage(null); // should not initially have error message
- setControl(composite);
-
- }
-
- @Override
- public boolean isPageComplete() {
- boolean isPageComplete = false;
- if ((pathString != null)
- && !Constants.EMPTY.equalsIgnoreCase(pathString)
- && (Path.ROOT.isValidPath(pathString))
- && ((Path.fromOSString(pathString)).toFile().exists())) {
- isPageComplete = true;
- }
- return isPageComplete;
- }
-
- public boolean finish() {
- /*
- * Currently used templates list
- */
- List<VpeAnyData> currentList = VpeTemplateManager.getInstance().getAnyTemplates();
-
- /*
- * Uploading will add only missing templates.
- * So here all duplicated templates will be deleted from the tagsList.
- */
- Iterator<VpeAnyData> iterator = tagsList.iterator();
- while (iterator.hasNext()) {
- VpeAnyData loadedTemplate = (VpeAnyData) iterator.next();
- for (VpeAnyData currentTemplate : currentList) {
- if (loadedTemplate.equals(currentTemplate)) {
- iterator.remove();
- }
- }
- }
- /*
- * Add unique templates to the current list.
- */
- if (currentList.addAll(tagsList)) {
- /*
- * Store loaded templates to the default auto-templates location.
- */
- VpeTemplateManager.getInstance().setAnyTemplates(currentList);
- } else {
- /*
- * Log WARNING if the operation could not be performed.
- */
- VpePlugin.getDefault().logWarning(VpeUIMessages.NONE_TEMPLATES_WERE_ADDED);
- }
- return true;
- }
-
- @Override
- protected void createSourceGroup(Composite parent) {
- /*
- * Create nothing.
- */
- }
-
- @Override
- protected ITreeContentProvider getFileProvider() {
- return null;
- }
-
- @Override
- protected ITreeContentProvider getFolderProvider() {
- return null;
- }
-
-}
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizard.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizard.java 2010-07-22 08:14:03 UTC (rev 23657)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizard.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -1,49 +0,0 @@
-package org.jboss.tools.vpe.editor.wizards;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.wizard.Wizard;
-import org.jboss.tools.vpe.editor.template.VpeAnyData;
-import org.jboss.tools.vpe.messages.VpeUIMessages;
-
-public class ImportUnknownTagsTemplatesWizard extends Wizard {
-
- private ImportUnknownTagsTemplatesWizardPage mainPage;
- private List<VpeAnyData> importedList = new ArrayList<VpeAnyData>();
- private List<VpeAnyData> currentList;
-
- public ImportUnknownTagsTemplatesWizard(List<VpeAnyData> currentList) {
- super();
- setWindowTitle(VpeUIMessages.IMPORT_UNKNOWN_TAGS_PAGE_TITLE);
- this.currentList = currentList;
- }
-
- @Override
- public void addPages() {
- super.addPages();
- mainPage = new ImportUnknownTagsTemplatesWizardPage(
- VpeUIMessages.IMPORT_UNKNOWN_TAGS_TEMPLATES_WIZARD_PAGE,
- currentList);
- addPage(mainPage);
- }
-
- @Override
- public boolean canFinish() {
- return mainPage.isPageComplete();
- }
-
- @Override
- public boolean performFinish() {
- boolean pageFinished = mainPage.finish();
- if (pageFinished) {
- importedList = mainPage.getImportedList();
- }
- return pageFinished;
- }
-
- public List<VpeAnyData> getImportedList() {
- return importedList;
- }
-
-}
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java 2010-07-22 08:14:03 UTC (rev 23657)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -1,207 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2009 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.vpe.editor.wizards;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.viewers.ColumnLayoutData;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.jboss.tools.vpe.VpePlugin;
-import org.jboss.tools.vpe.editor.template.VpeAnyData;
-import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
-import org.jboss.tools.vpe.editor.util.Constants;
-import org.jboss.tools.vpe.messages.VpeUIMessages;
-import org.jboss.tools.vpe.resref.core.ReferenceWizardPage;
-
-public class ImportUnknownTagsTemplatesWizardPage extends WizardPage implements
- VpeImportExportWizardPage {
-
- private String pathString;
- private Table tagsTable;
- private List<VpeAnyData> tagsList;
- private List<VpeAnyData> currentList;
- private List<VpeAnyData> importedList = new ArrayList<VpeAnyData>();
-
- protected ImportUnknownTagsTemplatesWizardPage(String pageName, List<VpeAnyData> currentList) {
- super(pageName);
- this.currentList = currentList;
- setTitle(VpeUIMessages.IMPORT_UNKNOWN_TAGS_PAGE_TITLE);
- setDescription(VpeUIMessages.IMPORT_UNKNOWN_TAGS_PAGE_DESCRIPTION);
- setImageDescriptor(ReferenceWizardPage.getImageDescriptor());
- }
-
- public void createControl(Composite parent) {
- /*
- * Create main composite element with grid layout.
- * Two columns.
- */
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(3, false));
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
- composite.setFont(parent.getFont());
-
- /*
- * Add label
- */
- Label fileNamaLabel = new Label(composite, SWT.NONE);
- fileNamaLabel.setLayoutData(new GridData(SWT.LEFT, SWT.BOTTOM, false, false, 1, 1));
- fileNamaLabel.setText(VpeUIMessages.FILE_NAME_LABEL);
- /*
- * Add output path
- */
- final Text pathText = new Text(composite, SWT.BORDER);
- pathText.setEditable(true);
- pathText.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, false, 1, 1));
- pathText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- pathString = ((Text)e.getSource()).getText();
- IPath enteredPath = null;
- /*
- * Load templates if the path is valid
- */
- if ((Path.ROOT.isValidPath(pathString))
- && (enteredPath = Path.fromOSString(pathString)).toFile().exists()) {
- /*
- * Load tags list from the specified location.
- */
- tagsList = VpeTemplateManager.getInstance()
- .getAnyTemplates(enteredPath);
-
- } else {
- /*
- * Reset taglist, show empty table
- */
- if (tagsList != null) {
- tagsList.clear();
- }
- }
- /*
- * Update table tags list based on the loaded file.
- */
- VpeImportExportWizardsUtils.updateTagsTable(tagsTable, tagsList, true);
- /*
- * Check if the page is complete.
- */
- setPageComplete(isPageComplete());
- }
- });
- /*
- * Add browse button
- */
- Button browseButton = new Button(composite, SWT.NONE);
- browseButton.setText(VpeUIMessages.BROWSE_BUTTON_TEXT);
- browseButton.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, false, 1, 1));
- browseButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- FileDialog dialog = new FileDialog(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getShell(), SWT.NONE);
- String path = dialog.open();
- if (path != null) {
- File file = new File(path);
- pathString = file.toString();
- /*
- * Then modifyText event will be dispatched.
- */
- pathText.setText(pathString);
- }
- }
- });
-
- /*
- * Create datatable with the list of unknown tags
- */
- tagsTable = new Table(composite, SWT.BORDER);
- TableLayout layout = new TableLayout();
- tagsTable.setLayout(layout);
- tagsTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
- tagsTable.setHeaderVisible(true);
- tagsTable.setLinesVisible(true);
-
- /*
- * Create columns in the table
- */
- ColumnLayoutData columnLayoutData;
- for (int i = 0; i < COLUMNS_NAMES.length; i++) {
- TableColumn column = new TableColumn(tagsTable, SWT.NONE);
- column.setText(COLUMNS_NAMES[i]);
- columnLayoutData = new ColumnWeightData(COLUMNS_WIDTHS[i], true);
- layout.addColumnData(columnLayoutData);
- }
-
- /*
- * Finishing the initialization
- */
- setErrorMessage(null); // should not initially have error message
- setControl(composite);
- }
-
- @Override
- public boolean isPageComplete() {
- boolean isPageComplete = false;
- if ((pathString != null)
- && !Constants.EMPTY.equalsIgnoreCase(pathString)
- && (Path.ROOT.isValidPath(pathString))
- && ((Path.fromOSString(pathString)).toFile().exists())) {
- isPageComplete = true;
- }
- return isPageComplete;
- }
-
-
-
- public boolean finish() {
- /*
- * Uploading will add only missing templates.
- * So here all duplicated templates will be deleted from the tagsList.
- */
- importedList.clear();
- importedList.addAll(tagsList);
- Iterator<VpeAnyData> iterator = importedList.iterator();
- while (iterator.hasNext()) {
- VpeAnyData loadedTemplate = (VpeAnyData) iterator.next();
- for (VpeAnyData currentTemplate : currentList) {
- if (loadedTemplate.equals(currentTemplate)) {
- iterator.remove();
- }
- }
- }
- /*
- * Add unique templates to the current list.
- */
- return true;
- }
-
- public List<VpeAnyData> getImportedList() {
- return importedList;
- }
-}
Copied: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUserTagsTemplatesMenuWizard.java (from rev 23657, trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesMenuWizard.java)
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUserTagsTemplatesMenuWizard.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUserTagsTemplatesMenuWizard.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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.vpe.editor.wizards;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.IImportWizard;
+import org.eclipse.ui.IWorkbench;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+
+/**
+ *
+ * Wizard that imports user specified tag templates from external xml file.
+ *
+ * @author dmaliarevich
+ */
+public class ImportUserTagsTemplatesMenuWizard extends Wizard implements
+ IImportWizard {
+
+ private IStructuredSelection selection;
+ private ImportUserTagsTemplatesMenuWizardPage mainPage;
+
+ /**
+ * Constructor
+ */
+ public ImportUserTagsTemplatesMenuWizard() {
+ super();
+ setWindowTitle(VpeUIMessages.IMPORT_USER_TAGS_PAGE_TITLE);
+ }
+
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.selection = selection;
+ setWindowTitle(VpeUIMessages.IMPORT_USER_TAGS_PAGE_TITLE);
+ }
+
+ @Override
+ public void addPages() {
+ super.addPages();
+ mainPage = new ImportUserTagsTemplatesMenuWizardPage(
+ VpeUIMessages.IMPORT_USER_TAGS_TEMPLATES_WIZARD_PAGE,
+ selection);
+ addPage(mainPage);
+ }
+
+ @Override
+ public boolean canFinish() {
+ return mainPage.isPageComplete();
+ }
+
+ @Override
+ public boolean performFinish() {
+ return mainPage.finish();
+ }
+
+}
Copied: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUserTagsTemplatesMenuWizardPage.java (from rev 23657, trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesMenuWizardPage.java)
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUserTagsTemplatesMenuWizardPage.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUserTagsTemplatesMenuWizardPage.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -0,0 +1,245 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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.vpe.editor.wizards;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.viewers.ColumnLayoutData;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.WizardResourceImportPage;
+import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.editor.template.VpeAnyData;
+import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
+import org.jboss.tools.vpe.editor.util.Constants;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+import org.jboss.tools.vpe.resref.core.ReferenceWizardPage;
+
+/**
+ * Page for importing user specified tag templates.
+ *
+ * @author dmaliarevich
+ */
+public class ImportUserTagsTemplatesMenuWizardPage extends
+ WizardResourceImportPage implements VpeImportExportWizardPage {
+
+ private String pathString;
+ private Table tagsTable;
+ private List<VpeAnyData> tagsList;
+
+ /**
+ * Constructor
+ *
+ * @param name
+ * @param selection
+ */
+ public ImportUserTagsTemplatesMenuWizardPage(String name,
+ IStructuredSelection selection) {
+ super(name, selection);
+ setTitle(VpeUIMessages.IMPORT_USER_TAGS_PAGE_TITLE);
+ setDescription(VpeUIMessages.IMPORT_USER_TAGS_PAGE_DESCRIPTION);
+ setImageDescriptor(ReferenceWizardPage.getImageDescriptor());
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ /*
+ * Create main composite element with grid layout.
+ * Two columns.
+ */
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(new GridLayout(3, false));
+ composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+ composite.setFont(parent.getFont());
+
+ /*
+ * Add label
+ */
+ Label fileNamaLabel = new Label(composite, SWT.NONE);
+ fileNamaLabel.setLayoutData(new GridData(SWT.LEFT, SWT.BOTTOM, false, false, 1, 1));
+ fileNamaLabel.setText(VpeUIMessages.FILE_NAME_LABEL);
+ /*
+ * Add output path
+ */
+ final Text pathText = new Text(composite, SWT.BORDER);
+ pathText.setEditable(true);
+ pathText.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, false, 1, 1));
+ pathText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ pathString = ((Text)e.getSource()).getText();
+ IPath enteredPath = null;
+ /*
+ * Load templates if the path is valid
+ */
+ if ((Path.ROOT.isValidPath(pathString))
+ && (enteredPath = Path.fromOSString(pathString)).toFile().exists()) {
+ /*
+ * Load tags list from the specified location.
+ */
+ tagsList = VpeTemplateManager.getInstance()
+ .getAnyTemplates(enteredPath);
+
+ } else {
+ /*
+ * Reset taglist, show empty table
+ */
+ if (tagsList != null) {
+ tagsList.clear();
+ }
+ }
+ /*
+ * Update table tags list based on the loaded file.
+ */
+ VpeImportExportWizardsUtils.updateTagsTable(tagsTable, tagsList, true);
+ /*
+ * Check if the page is complete.
+ */
+ setPageComplete(isPageComplete());
+ }
+ });
+ /*
+ * Add browse button
+ */
+ Button browseButton = new Button(composite, SWT.NONE);
+ browseButton.setText(VpeUIMessages.BROWSE_BUTTON_TEXT);
+ browseButton.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, false, 1, 1));
+ browseButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ FileDialog dialog = new FileDialog(PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getShell(), SWT.NONE);
+ String path = dialog.open();
+ if (path != null) {
+ File file = new File(path);
+ pathString = file.toString();
+ /*
+ * Then modifyText event will be dispatched.
+ */
+ pathText.setText(pathString);
+ }
+ }
+ });
+
+ /*
+ * Create datatable with the list of user specified tag templates
+ */
+ tagsTable = new Table(composite, SWT.BORDER);
+ TableLayout layout = new TableLayout();
+ tagsTable.setLayout(layout);
+ tagsTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
+ tagsTable.setHeaderVisible(true);
+ tagsTable.setLinesVisible(true);
+
+ /*
+ * Create columns in the table
+ */
+ ColumnLayoutData columnLayoutData;
+ for (int i = 0; i < COLUMNS_NAMES.length; i++) {
+ TableColumn column = new TableColumn(tagsTable, SWT.NONE);
+ column.setText(COLUMNS_NAMES[i]);
+ columnLayoutData = new ColumnWeightData(COLUMNS_WIDTHS[i], true);
+ layout.addColumnData(columnLayoutData);
+ }
+
+ /*
+ * Finishing the initialization
+ */
+ setErrorMessage(null); // should not initially have error message
+ setControl(composite);
+
+ }
+
+ @Override
+ public boolean isPageComplete() {
+ boolean isPageComplete = false;
+ if ((pathString != null)
+ && !Constants.EMPTY.equalsIgnoreCase(pathString)
+ && (Path.ROOT.isValidPath(pathString))
+ && ((Path.fromOSString(pathString)).toFile().exists())) {
+ isPageComplete = true;
+ }
+ return isPageComplete;
+ }
+
+ public boolean finish() {
+ /*
+ * Currently used templates list
+ */
+ List<VpeAnyData> currentList = VpeTemplateManager.getInstance().getAnyTemplates();
+
+ /*
+ * Uploading will add only missing templates.
+ * So here all duplicated templates will be deleted from the tagsList.
+ */
+ Iterator<VpeAnyData> iterator = tagsList.iterator();
+ while (iterator.hasNext()) {
+ VpeAnyData loadedTemplate = (VpeAnyData) iterator.next();
+ for (VpeAnyData currentTemplate : currentList) {
+ if (loadedTemplate.equals(currentTemplate)) {
+ iterator.remove();
+ }
+ }
+ }
+ /*
+ * Add unique templates to the current list.
+ */
+ if (currentList.addAll(tagsList)) {
+ /*
+ * Store loaded templates to the default auto-templates location.
+ */
+ VpeTemplateManager.getInstance().setAnyTemplates(currentList);
+ } else {
+ /*
+ * Log WARNING if the operation could not be performed.
+ */
+ VpePlugin.getDefault().logWarning(VpeUIMessages.NONE_TEMPLATES_WERE_ADDED);
+ }
+ return true;
+ }
+
+ @Override
+ protected void createSourceGroup(Composite parent) {
+ /*
+ * Create nothing.
+ */
+ }
+
+ @Override
+ protected ITreeContentProvider getFileProvider() {
+ return null;
+ }
+
+ @Override
+ protected ITreeContentProvider getFolderProvider() {
+ return null;
+ }
+
+}
Copied: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUserTagsTemplatesWizard.java (from rev 23657, trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizard.java)
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUserTagsTemplatesWizard.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUserTagsTemplatesWizard.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -0,0 +1,49 @@
+package org.jboss.tools.vpe.editor.wizards;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.jboss.tools.vpe.editor.template.VpeAnyData;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+
+public class ImportUserTagsTemplatesWizard extends Wizard {
+
+ private ImportUserTagsTemplatesWizardPage mainPage;
+ private List<VpeAnyData> importedList = new ArrayList<VpeAnyData>();
+ private List<VpeAnyData> currentList;
+
+ public ImportUserTagsTemplatesWizard(List<VpeAnyData> currentList) {
+ super();
+ setWindowTitle(VpeUIMessages.IMPORT_USER_TAGS_PAGE_TITLE);
+ this.currentList = currentList;
+ }
+
+ @Override
+ public void addPages() {
+ super.addPages();
+ mainPage = new ImportUserTagsTemplatesWizardPage(
+ VpeUIMessages.IMPORT_USER_TAGS_TEMPLATES_WIZARD_PAGE,
+ currentList);
+ addPage(mainPage);
+ }
+
+ @Override
+ public boolean canFinish() {
+ return mainPage.isPageComplete();
+ }
+
+ @Override
+ public boolean performFinish() {
+ boolean pageFinished = mainPage.finish();
+ if (pageFinished) {
+ importedList = mainPage.getImportedList();
+ }
+ return pageFinished;
+ }
+
+ public List<VpeAnyData> getImportedList() {
+ return importedList;
+ }
+
+}
Copied: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUserTagsTemplatesWizardPage.java (from rev 23657, trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java)
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUserTagsTemplatesWizardPage.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUserTagsTemplatesWizardPage.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -0,0 +1,207 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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.vpe.editor.wizards;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.viewers.ColumnLayoutData;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.editor.template.VpeAnyData;
+import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
+import org.jboss.tools.vpe.editor.util.Constants;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+import org.jboss.tools.vpe.resref.core.ReferenceWizardPage;
+
+public class ImportUserTagsTemplatesWizardPage extends WizardPage implements
+ VpeImportExportWizardPage {
+
+ private String pathString;
+ private Table tagsTable;
+ private List<VpeAnyData> tagsList;
+ private List<VpeAnyData> currentList;
+ private List<VpeAnyData> importedList = new ArrayList<VpeAnyData>();
+
+ protected ImportUserTagsTemplatesWizardPage(String pageName, List<VpeAnyData> currentList) {
+ super(pageName);
+ this.currentList = currentList;
+ setTitle(VpeUIMessages.IMPORT_USER_TAGS_PAGE_TITLE);
+ setDescription(VpeUIMessages.IMPORT_USER_TAGS_PAGE_DESCRIPTION);
+ setImageDescriptor(ReferenceWizardPage.getImageDescriptor());
+ }
+
+ public void createControl(Composite parent) {
+ /*
+ * Create main composite element with grid layout.
+ * Two columns.
+ */
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(new GridLayout(3, false));
+ composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+ composite.setFont(parent.getFont());
+
+ /*
+ * Add label
+ */
+ Label fileNamaLabel = new Label(composite, SWT.NONE);
+ fileNamaLabel.setLayoutData(new GridData(SWT.LEFT, SWT.BOTTOM, false, false, 1, 1));
+ fileNamaLabel.setText(VpeUIMessages.FILE_NAME_LABEL);
+ /*
+ * Add output path
+ */
+ final Text pathText = new Text(composite, SWT.BORDER);
+ pathText.setEditable(true);
+ pathText.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, false, 1, 1));
+ pathText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ pathString = ((Text)e.getSource()).getText();
+ IPath enteredPath = null;
+ /*
+ * Load templates if the path is valid
+ */
+ if ((Path.ROOT.isValidPath(pathString))
+ && (enteredPath = Path.fromOSString(pathString)).toFile().exists()) {
+ /*
+ * Load tags list from the specified location.
+ */
+ tagsList = VpeTemplateManager.getInstance()
+ .getAnyTemplates(enteredPath);
+
+ } else {
+ /*
+ * Reset taglist, show empty table
+ */
+ if (tagsList != null) {
+ tagsList.clear();
+ }
+ }
+ /*
+ * Update table tags list based on the loaded file.
+ */
+ VpeImportExportWizardsUtils.updateTagsTable(tagsTable, tagsList, true);
+ /*
+ * Check if the page is complete.
+ */
+ setPageComplete(isPageComplete());
+ }
+ });
+ /*
+ * Add browse button
+ */
+ Button browseButton = new Button(composite, SWT.NONE);
+ browseButton.setText(VpeUIMessages.BROWSE_BUTTON_TEXT);
+ browseButton.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, false, 1, 1));
+ browseButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ FileDialog dialog = new FileDialog(PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getShell(), SWT.NONE);
+ String path = dialog.open();
+ if (path != null) {
+ File file = new File(path);
+ pathString = file.toString();
+ /*
+ * Then modifyText event will be dispatched.
+ */
+ pathText.setText(pathString);
+ }
+ }
+ });
+
+ /*
+ * Create datatable with the list of user specified tag templates
+ */
+ tagsTable = new Table(composite, SWT.BORDER);
+ TableLayout layout = new TableLayout();
+ tagsTable.setLayout(layout);
+ tagsTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
+ tagsTable.setHeaderVisible(true);
+ tagsTable.setLinesVisible(true);
+
+ /*
+ * Create columns in the table
+ */
+ ColumnLayoutData columnLayoutData;
+ for (int i = 0; i < COLUMNS_NAMES.length; i++) {
+ TableColumn column = new TableColumn(tagsTable, SWT.NONE);
+ column.setText(COLUMNS_NAMES[i]);
+ columnLayoutData = new ColumnWeightData(COLUMNS_WIDTHS[i], true);
+ layout.addColumnData(columnLayoutData);
+ }
+
+ /*
+ * Finishing the initialization
+ */
+ setErrorMessage(null); // should not initially have error message
+ setControl(composite);
+ }
+
+ @Override
+ public boolean isPageComplete() {
+ boolean isPageComplete = false;
+ if ((pathString != null)
+ && !Constants.EMPTY.equalsIgnoreCase(pathString)
+ && (Path.ROOT.isValidPath(pathString))
+ && ((Path.fromOSString(pathString)).toFile().exists())) {
+ isPageComplete = true;
+ }
+ return isPageComplete;
+ }
+
+
+
+ public boolean finish() {
+ /*
+ * Uploading will add only missing templates.
+ * So here all duplicated templates will be deleted from the tagsList.
+ */
+ importedList.clear();
+ importedList.addAll(tagsList);
+ Iterator<VpeAnyData> iterator = importedList.iterator();
+ while (iterator.hasNext()) {
+ VpeAnyData loadedTemplate = (VpeAnyData) iterator.next();
+ for (VpeAnyData currentTemplate : currentList) {
+ if (loadedTemplate.equals(currentTemplate)) {
+ iterator.remove();
+ }
+ }
+ }
+ /*
+ * Add unique templates to the current list.
+ */
+ return true;
+ }
+
+ public List<VpeAnyData> getImportedList() {
+ return importedList;
+ }
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2010-07-22 08:14:03 UTC (rev 23657)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2010-07-22 09:43:16 UTC (rev 23658)
@@ -37,7 +37,7 @@
public static String GENERAL;
public static String TEMPLATES;
public static String TEMPLATE;
- public static String UNKNOWN_TAGS_DIALOG_DESCRIPTION;
+ public static String USER_SPECIFIED_TAG_DIALOG_DESCRIPTION;
public static String TAG_ATTRIBUTES;
public static String TAG_NAME;
public static String TAG_URI;
@@ -148,12 +148,12 @@
public static String VISUAL_APPEARANCE_GROUP_TITLE;
public static String CONFIRMATION_GROUP_TITLE;
public static String TABS_GROUP_TITLE;
- public static String IMPORT_UNKNOWN_TAGS_TEMPLATES_WIZARD_PAGE;
- public static String EXPORT_UNKNOWN_TAGS_TEMPLATES_WIZARD_PAGE;
- public static String EXPORT_UNKNOWN_TAGS_PAGE_TITLE;
- public static String EXPORT_UNKNOWN_TAGS_PAGE_DESCRIPTION;
- public static String IMPORT_UNKNOWN_TAGS_PAGE_TITLE;
- public static String IMPORT_UNKNOWN_TAGS_PAGE_DESCRIPTION;
+ public static String IMPORT_USER_TAGS_TEMPLATES_WIZARD_PAGE;
+ public static String EXPORT_USER_TAGS_TEMPLATES_WIZARD_PAGE;
+ public static String EXPORT_USER_TAGS_PAGE_TITLE;
+ public static String EXPORT_USER_TAGS_PAGE_DESCRIPTION;
+ public static String IMPORT_USER_TAGS_PAGE_TITLE;
+ public static String IMPORT_USER_TAGS_PAGE_DESCRIPTION;
public static String SELECT_ALL;
public static String DESELECT_ALL;
public static String BROWSE_BUTTON_TEXT;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2010-07-22 08:14:03 UTC (rev 23657)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2010-07-22 09:43:16 UTC (rev 23658)
@@ -15,10 +15,10 @@
# END NON-TRANSLATABLE
GENERAL=General
-# Unknown tags templates dialog messages
+# User specified tag templates templates dialog messages
TEMPLATES=Visual Templates
-TEMPLATE=Unknown tag template
-UNKNOWN_TAGS_DIALOG_DESCRIPTION=Set up parameters for the unknown tag
+TEMPLATE=User specified tag template
+USER_SPECIFIED_TAG_DIALOG_DESCRIPTION=Set up parameters for the template
TAG_ATTRIBUTES=Set up tag attributes
TAG_NAME=Tag name:
TAG_URI=Tag URI:
@@ -134,17 +134,17 @@
SPLITTING_HORIZ_LEFT_SOURCE=Horizontal splitting with Source Editor to the left
SPLITTING_HORIZ_LEFT_VISUAL=Horizontal splitting with Visual Editor to the left
-# Import/Export Unknown Tags Templates Messages
-IMPORT_UNKNOWN_TAGS_TEMPLATES_WIZARD_PAGE=Import unknown tags templates wizard page
-EXPORT_UNKNOWN_TAGS_TEMPLATES_WIZARD_PAGE=Export unknown tags templates wizard page
+# Import/Export user specified tag templates messages
+IMPORT_USER_TAGS_TEMPLATES_WIZARD_PAGE=Import user specified tag templates wizard page
+EXPORT_USER_TAGS_TEMPLATES_WIZARD_PAGE=Export user specified tag templates wizard page
SELECT_ALL=Select All
DESELECT_ALL=Deselect All
BROWSE_BUTTON_TEXT=Browse...
FILE_NAME_LABEL=File name:
-EXPORT_UNKNOWN_TAGS_PAGE_TITLE=Export Unknown Tags Templates
-EXPORT_UNKNOWN_TAGS_PAGE_DESCRIPTION=Export unknown tags templates to the external file
-IMPORT_UNKNOWN_TAGS_PAGE_TITLE=Import Unknown Tags Templates
-IMPORT_UNKNOWN_TAGS_PAGE_DESCRIPTION=Import unknown tags templates from the external file
+EXPORT_USER_TAGS_PAGE_TITLE=Export user specified tag templates
+EXPORT_USER_TAGS_PAGE_DESCRIPTION=Export user specified tag templates to the local file system.
+IMPORT_USER_TAGS_PAGE_TITLE=Import user specified tag templates
+IMPORT_USER_TAGS_PAGE_DESCRIPTION=Import user specified tag templates from the local file system.
NONE_TEMPLATES_WERE_ADDED=None of the templates were added.
COULD_NOT_SET_TABLE_SELECTION=Could not set table selection.
LIST_IS_EMPTY=List is empty
15 years, 9 months
JBoss Tools SVN: r23657 - in trunk/documentation/whatsnew: hibernate and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2010-07-22 04:14:03 -0400 (Thu, 22 Jul 2010)
New Revision: 23657
Modified:
trunk/documentation/whatsnew/hibernate/hibernate-news-3.4.0.M1.html
trunk/documentation/whatsnew/upload.sh
Log:
fixed hibernate link
Modified: trunk/documentation/whatsnew/hibernate/hibernate-news-3.4.0.M1.html
===================================================================
--- trunk/documentation/whatsnew/hibernate/hibernate-news-3.4.0.M1.html 2010-07-22 07:28:05 UTC (rev 23656)
+++ trunk/documentation/whatsnew/hibernate/hibernate-news-3.4.0.M1.html 2010-07-22 08:14:03 UTC (rev 23657)
@@ -11,7 +11,8 @@
<body>
<h1>Hibernate tools 3.4.0.M1 What's New</h1>
-<p align="right"><a href="../core/core-news-3.2.0.M1.html">< Core/General</a> <a href="../jst/jst-news-3.2.0.M1.html">JST Tools ></a></p>
+<p align="right"<a href="../index.html">< Main
+ Index</a> <a href="../jst/jst-news-3.2.0.M1.html">JST Tools ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
Modified: trunk/documentation/whatsnew/upload.sh
===================================================================
--- trunk/documentation/whatsnew/upload.sh 2010-07-22 07:28:05 UTC (rev 23656)
+++ trunk/documentation/whatsnew/upload.sh 2010-07-22 08:14:03 UTC (rev 23657)
@@ -1 +1 @@
-rsync -i -t -e ssh -C --exclude=.project -avz . tools@filemgmt.jboss.org:/docs_htdocs/tools/whatsnew/
+rsync -i -t -e ssh -C --exclude-from '.rsyncexclude' -avz . tools@filemgmt.jboss.org:/docs_htdocs/tools/whatsnew/
15 years, 9 months
JBoss Tools SVN: r23656 - trunk/documentation/whatsnew/drools.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2010-07-22 03:28:05 -0400 (Thu, 22 Jul 2010)
New Revision: 23656
Modified:
trunk/documentation/whatsnew/drools/guvnor-tools-news-5.1.0.M1.html
Log:
Modified: trunk/documentation/whatsnew/drools/guvnor-tools-news-5.1.0.M1.html
===================================================================
--- trunk/documentation/whatsnew/drools/guvnor-tools-news-5.1.0.M1.html 2010-07-22 06:21:05 UTC (rev 23655)
+++ trunk/documentation/whatsnew/drools/guvnor-tools-news-5.1.0.M1.html 2010-07-22 07:28:05 UTC (rev 23656)
@@ -6,13 +6,12 @@
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../whatsnew.css"/>
-<title>Hibernate tools 3.4.0.M1 What's New</title>
+<title>Drools Guvnor 5.1.0.M1 What's New</title>
</head>
<body>
<h1>Drools Guvnor 5.1.0.M1 What's New</h1>
-<p align="right"><a href="../index.html">< Main Index</a> <a
-href="../jbpm/jbpm-news-3.2.0.M1.html">jBPM Tools ></a></p>
+<p align="right"><a href="../index.html">< Main Index ></a> </p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
15 years, 9 months
JBoss Tools SVN: r23655 - trunk/documentation/whatsnew/ws.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2010-07-22 02:21:05 -0400 (Thu, 22 Jul 2010)
New Revision: 23655
Removed:
trunk/documentation/whatsnew/ws/.project
Log:
don't want nested projects in whatsnew
Deleted: trunk/documentation/whatsnew/ws/.project
===================================================================
--- trunk/documentation/whatsnew/ws/.project 2010-07-22 06:13:56 UTC (rev 23654)
+++ trunk/documentation/whatsnew/ws/.project 2010-07-22 06:21:05 UTC (rev 23655)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>ws</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
15 years, 9 months
JBoss Tools SVN: r23654 - trunk/documentation/whatsnew.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2010-07-22 02:13:56 -0400 (Thu, 22 Jul 2010)
New Revision: 23654
Added:
trunk/documentation/whatsnew/upload.sh
Log:
added upload.sh that uses rsync
Added: trunk/documentation/whatsnew/upload.sh
===================================================================
--- trunk/documentation/whatsnew/upload.sh (rev 0)
+++ trunk/documentation/whatsnew/upload.sh 2010-07-22 06:13:56 UTC (rev 23654)
@@ -0,0 +1 @@
+rsync -i -t -e ssh -C --exclude=.project -avz . tools@filemgmt.jboss.org:/docs_htdocs/tools/whatsnew/
Property changes on: trunk/documentation/whatsnew/upload.sh
___________________________________________________________________
Name: svn:executable
+ *
15 years, 9 months
JBoss Tools SVN: r23653 - in branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui: META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2010-07-22 02:10:20 -0400 (Thu, 22 Jul 2010)
New Revision: 23653
Added:
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Messages.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigFileHandle.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigfileContentDescriber.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/messages.properties
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/Messages.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksFileContainerSelectionPage.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/messages.properties
Modified:
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/plugin.xml
Log:
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2010-07-22 05:51:41 UTC (rev 23652)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2010-07-22 06:10:20 UTC (rev 23653)
@@ -9,7 +9,8 @@
org.eclipse.jface.text,
org.eclipse.core.resources,
org.eclipse.ui.editors,
- org.eclipse.ui.forms
+ org.eclipse.ui.forms,
+ org.eclipse.ui.ide;bundle-version="3.6.0"
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/plugin.xml
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/plugin.xml 2010-07-22 05:51:41 UTC (rev 23652)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/plugin.xml 2010-07-22 06:10:20 UTC (rev 23653)
@@ -1,8 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
-
-
-
-
+ <extension
+ point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ base-type="org.eclipse.core.runtime.xml"
+ describer="org.jboss.tools.smooks.configuration.editors.SmooksConfigfileContentDescriber"
+ file-extensions="xml"
+ id="org.jboss.tools.smooks.ui.smooks.contentType"
+ name="Smooks Configuration File"
+ priority="low">
+ </content-type>
+ </extension>
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <category
+ name="Smooks"
+ id="org.jboss.tools.smooks.configuration">
+ </category>
+ <wizard
+ name="Smooks Configuration File"
+ icon="icons/smooks-sm.gif"
+ category="org.jboss.tools.smooks.configuration"
+ class="org.jboss.tools.smooks.configuration.wizards.SmooksConfigurationFileNewWizard"
+ id="org.jboss.tools.smooks.configuration.wizards.NewConfigurationFileWizard">
+ </wizard>
+ </extension>
</plugin>
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java 2010-07-22 06:10:20 UTC (rev 23653)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com)
+ * Date Apr 1, 2009
+ */
+public class SmooksConstants {
+ public static final String SMOOKS_EXTENTION_NAME = "xml"; //$NON-NLS-1$
+
+ public static final String SMOOKS_GRAPHICSEXT_EXTENTION_NAME = "ext"; //$NON-NLS-1$
+
+ public static final String SMOOKS_EXTENTION_NAME_WITHDOT = "." + SMOOKS_EXTENTION_NAME; //$NON-NLS-1$
+
+ public static final String SMOOKS_GRAPHICSEXT_EXTENTION_NAME_WITHDOT = "." + SMOOKS_GRAPHICSEXT_EXTENTION_NAME; //$NON-NLS-1$
+
+// public static final String VERSION_1_1 = "1.1"; //$NON-NLS-1$
+
+ public static final String VERSION_1_2 = "1.2"; //$NON-NLS-1$
+
+ public static final String[] SMOOKS_VERSIONS = new String[]{VERSION_1_2};
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Messages.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Messages.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Messages.java 2010-07-22 06:10:20 UTC (rev 23653)
@@ -0,0 +1,93 @@
+package org.jboss.tools.smooks.configuration.editors;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.smooks.configuration.editors.messages"; //$NON-NLS-1$
+ public static String ChildrenSelectionWizardPage_selectchilderror;
+ public static String ChildrenSelectionWizardPage_wizardtitle;
+ public static String FileSelectionWizard_WizardPageName;
+ public static String FileSelectionWizard_WizardTitle;
+ public static String FileSelectionWizardPage_PageDescription;
+ public static String FileSelectionWizardPage_PageTitle;
+ public static String ModelChildrenTablePanelCreator_DownButtonLable;
+ public static String ModelChildrenTablePanelCreator_NewButtonLabel;
+ public static String ModelChildrenTablePanelCreator_PropertiesButtonLabel;
+ public static String ModelChildrenTablePanelCreator_RemoveButtonLabel;
+ public static String ModelChildrenTablePanelCreator_UpButtonLabel;
+ public static String NewOrModifySmooksElementDialog_CloseButtonLabel;
+ public static String PropertyUICreator_browsebutton;
+ public static String PropertyUICreator_namelabel;
+ public static String PropertyUICreator_nslabel;
+ public static String SelectorCreationDialog_AddInputLinkLabel;
+ public static String SelectorCreationDialog_DialogTitle;
+ public static String SelectorCreationDialog_FullPathPolicy;
+ public static String SelectorCreationDialog_InputViewerlabel;
+ public static String SelectorCreationDialog_OnlyNamePolicy;
+ public static String SelectorCreationDialog_PolicyLabel;
+ public static String SelectorCreationDialog_SperatorCharlabel;
+ public static String SmooksActionBarContributor_33;
+ public static String SmooksActionBarContributor_AddSmooksReasourceActionLabel;
+ public static String SmooksActionBarContributor_AddSmooksResourceActionLabel;
+ public static String SmooksActionBarContributor_CreateSiblingActionLabel;
+ public static String SmooksActionBarContributor_NewSiblingActionLabel;
+ public static String SmooksActionBarContributor_OpenProperyViewActionLabel;
+ public static String SmooksActionBarContributor_RefreshViewActionLabel;
+ public static String SmooksActionBarContributor_ValidateActionLabel;
+ public static String SmooksConfigFileHandle_exception;
+ public static String SmooksConfigurationOverviewPage_ConfigurationSectionTitle;
+ public static String SmooksConfigurationOverviewPage_FilterSettingSectionTitle;
+ public static String SmooksConfigurationOverviewPage_FilterTypeLabel;
+ public static String SmooksConfigurationOverviewPage_SerializationLabel;
+ public static String SmooksConfigurationOverviewPage_VersionLabel;
+ public static String SmooksConfigurationReaderPage_AddInputButtonLabel;
+ public static String SmooksConfigurationReaderPage_DeleteInputButtonLabel;
+ public static String SmooksConfigurationReaderPage_EditReaderDes;
+ public static String SmooksConfigurationReaderPage_InputSectionTitle;
+ public static String SmooksConfigurationReaderPage_InputTableExtensionLabel;
+ public static String SmooksConfigurationReaderPage_InputTablePathColumnLabel;
+ public static String SmooksConfigurationReaderPage_InputTableTypeColumnText;
+ public static String SmooksConfigurationReaderPage_NewReaderDes;
+ public static String SmooksConfigurationReaderPage_NewReaderTitle;
+ public static String SmooksConfigurationReaderPage_PageTitle;
+ public static String SmooksConfigurationReaderPage_ReaderSectionTitle;
+ public static String SmooksConfigurationResourceConfigPage_FormTitle;
+ public static String SmooksConfigurationResourceConfigPage_SectionTitle;
+ public static String SmooksMasterDetailBlock_AddButtonLabel;
+ public static String SmooksMasterDetailBlock_DownButtonLabel;
+ public static String SmooksMasterDetailBlock_RemoveButtonlabel;
+ public static String SmooksMasterDetailBlock_UpButtonLabel;
+ public static String SmooksMultiFormEditor_opetiontab_label;
+ public static String SmooksMultiFormEditor_optinepage_name;
+ public static String SmooksMultiFormEditor_processpage_name;
+ public static String SmooksMultiFormEditor_processtabel_label;
+ public static String SmooksReaderFormPage_AddButtonLabel;
+ public static String SmooksReaderFormPage_CantFindTypeErrorTitle;
+ public static String SmooksReaderFormPage_DeleteButtonLabel;
+ public static String SmooksReaderFormPage_Error_Creating_Input_Model;
+ public static String SmooksReaderFormPage_Input_Error;
+ public static String SmooksReaderFormPage_InputConfigurationSectionDes;
+ public static String SmooksReaderFormPage_InputConfigurationSectionTitle;
+ public static String SmooksReaderFormPage_InputDataSectionDes;
+ public static String SmooksReaderFormPage_InputDataSectionTitle;
+ public static String SmooksReaderFormPage_InputSectionTitle;
+ public static String SmooksReaderFormPage_InputTypeLabel;
+ public static String SmooksReaderFormPage_InputTypeSectionTitle;
+ public static String SmooksReaderFormPage_JavaReaderComboText;
+ public static String SmooksReaderFormPage_NoInputComboText;
+ public static String SmooksReaderFormPage_OpenFileErrorTitle;
+ public static String SmooksReaderFormPage_PathColumnText;
+ public static String SmooksReaderFormPage_RefreshLinkLabel;
+ public static String SmooksReaderFormPage_TypeColumnText;
+ public static String SmooksReaderFormPage_Warning_Specify_Input_Type;
+ public static String SmooksReaderFormPage_Warning_Specify_Sample_Data;
+ public static String SmooksReaderFormPage_XMLReaderComboText;
+ public static String SmooksReaderFormPage_XSDReaderComboText;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Messages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigFileHandle.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigFileHandle.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigFileHandle.java 2010-07-22 06:10:20 UTC (rev 23653)
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors;
+
+import java.io.IOException;
+import java.io.StringReader;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * @author Dart dpeng(a)redhat.com
+ *
+ */
+public class SmooksConfigFileHandle extends DefaultHandler {
+ private boolean correctContentFile = false;
+
+ // private static final String SMOOKS_RESOURCE_LIST = "smooks-resource-list"; //$NON-NLS-1$
+
+ private String[] smooksSpportURI = null;
+
+ private SAXParserFactory fFactory;
+
+ public SmooksConfigFileHandle() {
+ super();
+ smooksSpportURI = createSupportURI();
+ }
+
+ protected String[] createSupportURI() {
+ return new String[] { "http://www.milyn.org/xsd/smooks-1.1.xsd",
+ "http://www.milyn.org/xsd/smooks-1.0.xsd", "http://www.milyn.org/xsd/smooks/freemarker-1.1.xsd" }; //$NON-NLS-1$
+ }
+
+ private final SAXParser createParser(SAXParserFactory parserFactory) throws ParserConfigurationException,
+ SAXException, SAXNotRecognizedException, SAXNotSupportedException {
+ // Initialize the parser.
+ final SAXParser parser = parserFactory.newSAXParser();
+ final XMLReader reader = parser.getXMLReader();
+ // disable DTD validation
+ try {
+ reader.setFeature("http://xml.org/sax/features/validation", false); //$NON-NLS-1$
+ reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); //$NON-NLS-1$
+ } catch (SAXNotRecognizedException e) {
+ } catch (SAXNotSupportedException e) {
+ }
+ return parser;
+ }
+
+ private SAXParserFactory getFactory() {
+ synchronized (this) {
+ if (fFactory != null) {
+ return fFactory;
+ }
+ fFactory = SAXParserFactory.newInstance();
+ fFactory.setNamespaceAware(true);
+ }
+ return fFactory;
+ }
+
+ public boolean parseContents(InputSource contents) throws ParserConfigurationException, IOException {
+ try {
+ fFactory = getFactory();
+ if (fFactory == null) {
+ return false;
+ }
+ final SAXParser parser = createParser(fFactory);
+ contents.setSystemId("/"); //$NON-NLS-1$
+ parser.parse(contents, this);
+ } catch (SAXException e) {
+ // stop parsing
+ }
+ return true;
+ }
+
+ /*
+ * Resolve external entity definitions to an empty string. This is to speed
+ * up processing of files with external DTDs. Not resolving the contents of
+ * the DTD is ok, as only the System ID of the DTD declaration is used.
+ *
+ * @see org.xml.sax.helpers.DefaultHandler#resolveEntity(java.lang.String,
+ * java.lang.String)
+ */
+ public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
+ return new InputSource(new StringReader("")); //$NON-NLS-1$
+ }
+
+ @Override
+ public void startPrefixMapping(String prefix, String uri) throws SAXException {
+ super.startPrefixMapping(prefix, uri);
+ if (containtSmooksURI(uri)) {
+ setCorrectContentFile(true);
+ throw new SAXException(Messages.SmooksConfigFileHandle_exception);
+ }
+ }
+
+ private boolean unSupportUIR(String uri) {
+ // if (EdiPackage.eNS_URI.equals(uri)) {
+ // return true;
+ // }
+ return false;
+ }
+
+ private boolean containtSmooksURI(String uri) {
+ for (int i = 0; i < smooksSpportURI.length; i++) {
+ if (uri != null) {
+ if (uri.trim().equalsIgnoreCase(smooksSpportURI[i])) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.xml.sax.ContentHandler#startElement(java.lang.String,
+ * java.lang.String, java.lang.String, org.xml.sax.Attributes)
+ */
+ public final void startElement(final String uri, final String elementName, final String qualifiedName,
+ final Attributes attributes) throws SAXException {
+ if (isCorrectContentFile()) {
+ throw new SAXException(Messages.SmooksConfigFileHandle_exception);
+ }
+ if (containtSmooksURI(uri)) {
+ setCorrectContentFile(true);
+ throw new SAXException(Messages.SmooksConfigFileHandle_exception);
+ }
+ }
+
+ public boolean isCorrectContentFile() {
+ return correctContentFile;
+ }
+
+ public void setCorrectContentFile(boolean correctContentFile) {
+ this.correctContentFile = correctContentFile;
+ }
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigFileHandle.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigfileContentDescriber.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigfileContentDescriber.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigfileContentDescriber.java 2010-07-22 06:10:20 UTC (rev 23653)
@@ -0,0 +1,203 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExecutableExtension;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.ITextContentDescriber;
+import org.xml.sax.InputSource;
+
+/**
+ * @author Dart (dpeng(a)redhat.com) note : Many codes comes from
+ * org.eclipse.core.internal.content.XMLConentDescriber
+ */
+public class SmooksConfigfileContentDescriber implements ITextContentDescriber, IExecutableExtension {
+
+ private static final QualifiedName[] SUPPORTED_OPTIONS = new QualifiedName[] { IContentDescription.CHARSET,
+ IContentDescription.BYTE_ORDER_MARK };
+
+ private static final String ENCODING = "encoding="; //$NON-NLS-1$
+
+ private static final String XML_PREFIX = "<?xml "; //$NON-NLS-1$
+
+ /**
+ *
+ */
+ public SmooksConfigfileContentDescriber() {
+ // TODO Auto-generated constructor stub
+ }
+
+ public void setInitializationData(IConfigurationElement config, String propertyName, Object data)
+ throws CoreException {
+
+ }
+
+ public int describeXMLFile(InputStream input, IContentDescription description) throws IOException {
+ byte[] bom = getByteOrderMark(input);
+ String xmlDeclEncoding = "UTF-8"; //$NON-NLS-1$
+ input.reset();
+ if (bom != null) {
+ if (bom == IContentDescription.BOM_UTF_16BE)
+ xmlDeclEncoding = "UTF-16BE"; //$NON-NLS-1$
+ else if (bom == IContentDescription.BOM_UTF_16LE)
+ xmlDeclEncoding = "UTF-16LE"; //$NON-NLS-1$
+ // skip BOM to make comparison simpler
+ input.skip(bom.length);
+ // set the BOM in the description if requested
+ if (description != null && description.isRequested(IContentDescription.BYTE_ORDER_MARK))
+ description.setProperty(IContentDescription.BYTE_ORDER_MARK, bom);
+ }
+ byte[] xmlPrefixBytes = XML_PREFIX.getBytes(xmlDeclEncoding);
+ byte[] prefix = new byte[xmlPrefixBytes.length];
+ if (input.read(prefix) < prefix.length)
+ // there is not enough info to say anything
+ return INDETERMINATE;
+ for (int i = 0; i < prefix.length; i++)
+ if (prefix[i] != xmlPrefixBytes[i])
+ // we don't have a XMLDecl... there is not enough info to say
+ // anything
+ return INDETERMINATE;
+ if (description == null)
+ return VALID;
+ // describe charset if requested
+ if (description.isRequested(IContentDescription.CHARSET)) {
+ String fullXMLDecl = readFullXMLDecl(input, xmlDeclEncoding);
+ if (fullXMLDecl != null) {
+ String charset = getCharset(fullXMLDecl);
+ if (charset != null && !"UTF-8".equalsIgnoreCase(charset)) //$NON-NLS-1$
+ // only set property if value is not default (avoid using a
+ // non-default content description)
+ description.setProperty(IContentDescription.CHARSET, getCharset(fullXMLDecl));
+ }
+ }
+ return VALID;
+ }
+
+ public int describeXMLType(Reader input, IContentDescription description) throws IOException {
+ BufferedReader reader = new BufferedReader(input);
+ String line = reader.readLine();
+ // end of stream
+ if (line == null)
+ return INDETERMINATE;
+ // XMLDecl should be the first string (no blanks allowed)
+ if (!line.startsWith(XML_PREFIX))
+ return INDETERMINATE;
+ if (description == null)
+ return VALID;
+ // describe charset if requested
+ if ((description.isRequested(IContentDescription.CHARSET)))
+ description.setProperty(IContentDescription.CHARSET, getCharset(line));
+ return VALID;
+ }
+
+ public int describe(InputStream input, IContentDescription description) throws IOException {
+ if (this.describeXMLFile(input, description) == INVALID) {
+ return INVALID;
+ }
+ input.reset();
+ return checkCriteria(new InputSource(input));
+ }
+
+ private String readFullXMLDecl(InputStream input, String unicodeEncoding) throws IOException {
+ byte[] xmlDecl = new byte[100];
+ int c = 0;
+ // looks for XMLDecl ending char (?)
+ int read = 0;
+ while (read < xmlDecl.length && (c = input.read()) != -1 && c != '?')
+ xmlDecl[read++] = (byte) c;
+ return c == '?' ? new String(xmlDecl, 0, read, unicodeEncoding) : null;
+ }
+
+ public int describe(Reader input, IContentDescription description) throws IOException {
+ if (this.describeXMLType(input, description) == INVALID) {
+ return INVALID;
+ }
+ input.reset();
+ return checkCriteria(new InputSource(input));
+ }
+
+ protected SmooksConfigFileHandle createHandle(){
+ return new SmooksConfigFileHandle();
+ }
+
+ /**
+ * To check the namespaces of the file
+ *
+ * @param contents
+ * @return
+ * @throws IOException
+ */
+ private int checkCriteria(InputSource contents) throws IOException {
+ SmooksConfigFileHandle handle = createHandle();
+ try {
+ if (!handle.parseContents(contents)) {
+ return INDETERMINATE;
+ }
+ } catch (ParserConfigurationException e) {
+ return INDETERMINATE;
+ }
+ if (handle.isCorrectContentFile()) {
+ return VALID;
+ }
+ return INDETERMINATE;
+ }
+
+ private String getCharset(String firstLine) {
+ int encodingPos = firstLine.indexOf(ENCODING);
+ if (encodingPos == -1)
+ return null;
+ char quoteChar = '"';
+ int firstQuote = firstLine.indexOf(quoteChar, encodingPos);
+ if (firstQuote == -1) {
+ quoteChar = '\'';
+ firstQuote = firstLine.indexOf(quoteChar, encodingPos);
+ }
+ if (firstQuote == -1 || firstLine.length() == firstQuote - 1)
+ return null;
+ int secondQuote = firstLine.indexOf(quoteChar, firstQuote + 1);
+ if (secondQuote == -1)
+ return null;
+ return firstLine.substring(firstQuote + 1, secondQuote);
+ }
+
+ public QualifiedName[] getSupportedOptions() {
+ return SUPPORTED_OPTIONS;
+ }
+
+ byte[] getByteOrderMark(InputStream input) throws IOException {
+ int first = input.read();
+ if (first == 0xEF) {
+ // look for the UTF-8 Byte Order Mark (BOM)
+ int second = input.read();
+ int third = input.read();
+ if (second == 0xBB && third == 0xBF)
+ return IContentDescription.BOM_UTF_8;
+ } else if (first == 0xFE) {
+ // look for the UTF-16 BOM
+ if (input.read() == 0xFF)
+ return IContentDescription.BOM_UTF_16BE;
+ } else if (first == 0xFF) {
+ if (input.read() == 0xFE)
+ return IContentDescription.BOM_UTF_16LE;
+ }
+ return null;
+ }
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigfileContentDescriber.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/messages.properties
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/messages.properties (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/messages.properties 2010-07-22 06:10:20 UTC (rev 23653)
@@ -0,0 +1,79 @@
+ChildrenSelectionWizardPage_selectchilderror=Please choose a child type
+ChildrenSelectionWizardPage_wizardtitle=Select a Child's Type
+FileSelectionWizard_WizardPageName=File Selection
+FileSelectionWizard_WizardTitle=File Selection
+FileSelectionWizardPage_PageDescription=Select the file from workspace or from file system.
+FileSelectionWizardPage_PageTitle=File Selection
+ModelChildrenTablePanelCreator_DownButtonLable=Down
+ModelChildrenTablePanelCreator_NewButtonLabel=New
+ModelChildrenTablePanelCreator_PropertiesButtonLabel=Properties..
+ModelChildrenTablePanelCreator_RemoveButtonLabel=Remove
+ModelChildrenTablePanelCreator_UpButtonLabel=Up
+NewOrModifySmooksElementDialog_CloseButtonLabel=Close
+PropertyUICreator_browsebutton=Browse
+PropertyUICreator_namelabel=Name
+PropertyUICreator_nslabel=Namespace
+SelectorCreationDialog_AddInputLinkLabel=Click to add Input Data
+SelectorCreationDialog_DialogTitle=Selector generate dialog
+SelectorCreationDialog_FullPathPolicy=Full Path
+SelectorCreationDialog_InputViewerlabel=Input Message:
+SelectorCreationDialog_OnlyNamePolicy=Only Name
+SelectorCreationDialog_PolicyLabel=Selector generate policy :
+SelectorCreationDialog_SperatorCharlabel=Sperator Char :
+SmooksActionBarContributor_33=
+SmooksActionBarContributor_AddSmooksReasourceActionLabel=Add Smooks Resource
+SmooksActionBarContributor_AddSmooksResourceActionLabel=Add Smooks Resource
+SmooksActionBarContributor_CreateSiblingActionLabel=Create Sibling
+SmooksActionBarContributor_NewSiblingActionLabel=New Sibling
+SmooksActionBarContributor_OpenProperyViewActionLabel=Show Properties
+SmooksActionBarContributor_RefreshViewActionLabel=Refresh Viewer
+SmooksActionBarContributor_ValidateActionLabel=Validate
+SmooksConfigFileHandle_exception=Stop parsing
+SmooksConfigurationOverviewPage_ConfigurationSectionTitle=Smooks configuration
+SmooksConfigurationOverviewPage_FilterSettingSectionTitle=Filter Settings
+SmooksConfigurationOverviewPage_FilterTypeLabel=Stream Filter Type:
+SmooksConfigurationOverviewPage_SerializationLabel=Default Serialization is On:
+SmooksConfigurationOverviewPage_VersionLabel=Smooks Platform Version :
+SmooksConfigurationReaderPage_AddInputButtonLabel=Add
+SmooksConfigurationReaderPage_DeleteInputButtonLabel=Delete
+SmooksConfigurationReaderPage_EditReaderDes=Edit the smooks readers
+SmooksConfigurationReaderPage_InputSectionTitle=Input Data
+SmooksConfigurationReaderPage_InputTableExtensionLabel=Extension Paramers
+SmooksConfigurationReaderPage_InputTablePathColumnLabel=Path
+SmooksConfigurationReaderPage_InputTableTypeColumnText=Type
+SmooksConfigurationReaderPage_NewReaderDes=create new smooks reader
+SmooksConfigurationReaderPage_NewReaderTitle=New Smooks Reader
+SmooksConfigurationReaderPage_PageTitle=Reader/Input
+SmooksConfigurationReaderPage_ReaderSectionTitle=Reader
+SmooksConfigurationResourceConfigPage_FormTitle=Message Filter
+SmooksConfigurationResourceConfigPage_SectionTitle=Message Filtering Resources
+SmooksMasterDetailBlock_AddButtonLabel=Add...
+SmooksMasterDetailBlock_DownButtonLabel=Down
+SmooksMasterDetailBlock_RemoveButtonlabel=Remove
+SmooksMasterDetailBlock_UpButtonLabel=Up
+SmooksMultiFormEditor_opetiontab_label=Options
+SmooksMultiFormEditor_optinepage_name=Options
+SmooksMultiFormEditor_processpage_name=Processing
+SmooksMultiFormEditor_processtabel_label=Process
+SmooksReaderFormPage_AddButtonLabel=Add
+SmooksReaderFormPage_CantFindTypeErrorTitle=Can't find type
+SmooksReaderFormPage_DeleteButtonLabel=Delete
+SmooksReaderFormPage_Error_Creating_Input_Model=Check Input Task configuration. Error creating Input Model from Sample Input Data. Error: "
+SmooksReaderFormPage_Input_Error=Input Error
+SmooksReaderFormPage_InputConfigurationSectionDes=Specify reader details
+SmooksReaderFormPage_InputConfigurationSectionTitle=Input Configuration
+SmooksReaderFormPage_InputDataSectionDes=Select a sample data file
+SmooksReaderFormPage_InputDataSectionTitle=Input Data
+SmooksReaderFormPage_InputSectionTitle=Input Model View
+SmooksReaderFormPage_InputTypeLabel=Input Type:
+SmooksReaderFormPage_InputTypeSectionTitle=Input Type
+SmooksReaderFormPage_JavaReaderComboText=Java
+SmooksReaderFormPage_NoInputComboText=No Input
+SmooksReaderFormPage_OpenFileErrorTitle=Open File
+SmooksReaderFormPage_PathColumnText=Path
+SmooksReaderFormPage_RefreshLinkLabel=Refresh
+SmooksReaderFormPage_TypeColumnText=Type
+SmooksReaderFormPage_Warning_Specify_Input_Type=Input type should be specified.
+SmooksReaderFormPage_Warning_Specify_Sample_Data=Specify sample data in the Input Data section.
+SmooksReaderFormPage_XMLReaderComboText=XML
+SmooksReaderFormPage_XSDReaderComboText=XSD/WSDL
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/Messages.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/Messages.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/Messages.java 2010-07-22 06:10:20 UTC (rev 23653)
@@ -0,0 +1,26 @@
+package org.jboss.tools.smooks.configuration.wizards;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.smooks.configuration.wizards.messages"; //$NON-NLS-1$
+ public static String NewSmooksElementWizard_Smooks_Elements;
+ public static String NewSmooksElementWizardPage_Page_Description;
+ public static String NewSmooksElementWizardPage_Page_Title;
+ public static String SmooksConfigurationFileNewWizard_0;
+ public static String SmooksConfigurationFileNewWizard_ErrorDialogTitle;
+ public static String SmooksConfigurationFileNewWizard_PageName;
+/* public static String SmooksConfigurationFileNewWizard_VersionPageName; */
+ public static String SmooksFileContainerSelectionPage_Page_Description;
+ public static String SmooksFileContainerSelectionPage_Page_Title;
+ public static String SmooksVersionSelectionPage_Label_Smooks_Version;
+ public static String SmooksVersionSelectionPage_Page_Description;
+ public static String SmooksVersionSelectionPage_Page_Title;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/Messages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java 2010-07-22 06:10:20 UTC (rev 23653)
@@ -0,0 +1,215 @@
+package org.jboss.tools.smooks.configuration.wizards;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWizard;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
+import org.jboss.tools.smooks.configuration.SmooksConstants;
+//import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+
+/**
+ *
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 1, 2009
+ */
+public class SmooksConfigurationFileNewWizard extends Wizard implements INewWizard {
+ private SmooksFileContainerSelectionPage containerSelectionPage;
+// private SmooksVersionSelectionPage versionSelectionPage;
+ private ISelection selection;
+
+ /**
+ * Constructor for SampleNewWizard.
+ */
+ public SmooksConfigurationFileNewWizard() {
+ super();
+ setNeedsProgressMonitor(true);
+ setDefaultPageImageDescriptor(SmooksConfigurationActivator.getImageDescriptor(Messages.SmooksConfigurationFileNewWizard_0));
+ }
+
+ /**
+ * Adding the page to the wizard.
+ */
+
+ public void addPages() {
+ containerSelectionPage = new SmooksFileContainerSelectionPage(Messages.SmooksConfigurationFileNewWizard_PageName,
+ (IStructuredSelection) selection);
+ addPage(containerSelectionPage);
+
+// versionSelectionPage = new SmooksVersionSelectionPage(Messages.SmooksConfigurationFileNewWizard_VersionPageName);
+// addPage(versionSelectionPage);
+ }
+
+ /**
+ * This method is called when 'Finish' button is pressed in the wizard. We
+ * will create an operation and run it using wizard as execution context.
+ */
+ public boolean performFinish() {
+ final IPath containerPath = containerSelectionPage.getContainerFullPath();
+ final String fileName = containerSelectionPage.getFileName();
+ final String version = SmooksConstants.VERSION_1_2;
+ IRunnableWithProgress op = new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException {
+ try {
+ doFinish(containerPath, fileName, monitor, version);
+ } catch (CoreException e) {
+ throw new InvocationTargetException(e);
+ } finally {
+ monitor.done();
+ }
+ }
+ };
+ try {
+ getContainer().run(true, false, op);
+ } catch (InterruptedException e) {
+ return false;
+ } catch (InvocationTargetException e) {
+ Throwable realException = e.getTargetException();
+ MessageDialog.openError(getShell(), Messages.SmooksConfigurationFileNewWizard_ErrorDialogTitle, realException.getMessage());
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * The worker method. It will find the container, create the file if missing
+ * or just replace its contents, and open the editor on the newly created
+ * file.
+ */
+
+ private void doFinish(IPath containerPath, String fileName, IProgressMonitor monitor, String version)
+ throws CoreException {
+ // create a sample file
+ monitor.beginTask("Creating " + fileName, 2); //$NON-NLS-1$
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IResource resource = root.findMember(containerPath);
+ IContainer container = null;
+ if (resource.exists() && resource instanceof IContainer) {
+ container = (IContainer) resource;
+ }
+ if (container == null)
+ throwCoreException("Container \"" + containerPath.toPortableString() + "\" does not exist."); //$NON-NLS-1$ //$NON-NLS-2$
+ final IFile configFile = container.getFile(new Path(fileName));
+ // String extFileName = fileName + ".ext";
+ // final IFile extFile = container.getFile(new Path(extFileName));
+ try {
+ // create config file
+ InputStream stream = openContentStream(version);
+ if (configFile.exists()) {
+ configFile.setContents(stream, true, true, monitor);
+ } else {
+ configFile.create(stream, true, monitor);
+ }
+ stream.close();
+ // create ext file:
+ // createExtentionFile(extFile, version, null, monitor);
+ } catch (IOException e) {
+ SmooksConfigurationActivator.getDefault().log(e);
+ }
+ monitor.worked(1);
+ monitor.setTaskName("Opening file with Smooks Editor."); //$NON-NLS-1$
+ final String fversion = version;
+ getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ FileEditorInput editorInput = new FileEditorInput(configFile);
+ try {
+ if ( fversion.equals(SmooksConstants.VERSION_1_2)) {
+ page.openEditor(editorInput, "org.jboss.tools.smooks.configuration.editors.MultiPageEditor", true);
+ }
+ } catch (PartInitException e) {
+ SmooksConfigurationActivator.getDefault().log(e);
+ }
+ }
+ });
+ monitor.worked(1);
+ }
+
+ public static void createExtentionFile(IFile file, String version, String inputType, IProgressMonitor monitor)
+ throws CoreException, IOException {
+ if (monitor == null) {
+ monitor = new NullProgressMonitor();
+ }
+ InputStream stream1 = createExtContentStream(version, inputType);
+ if (file.exists()) {
+ file.setContents(stream1, true, true, monitor);
+ } else {
+ file.create(stream1, true, monitor);
+ }
+ stream1.close();
+ }
+
+ public static InputStream createExtContentStream(String version, String inputType) {
+ String typeContents = null;
+ if (inputType != null) {
+ typeContents = "inputType = \"" + inputType + "\""; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ String contents = ""; //$NON-NLS-1$
+ if (typeContents == null) {
+ contents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; // + " <smooks-graphics-ext platformVersion = \"" //$NON-NLS-1$
+// + version + "\" xmlns=\"http://www.jboss.org/jbosstools/smooks/smooks-graphics-ext.xsd\"/>";
+ } else {
+ contents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";// + " <smooks-graphics-ext platformVersion = \"" //$NON-NLS-1$
+// + version + "\" " + typeContents
+// + " xmlns=\"http://www.jboss.org/jbosstools/smooks/smooks-graphics-ext.xsd\"/>";
+ }
+ return new ByteArrayInputStream(contents.getBytes());
+ }
+
+ /**
+ * We will initialize file contents with different smooks config file
+ * version.
+ */
+
+ private InputStream openContentStream(String version) {
+ String contents = ""; //$NON-NLS-1$
+ if (SmooksConstants.VERSION_1_2.equals(version)) {
+ contents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" //$NON-NLS-1$
+ + "<smooks-resource-list xmlns=\"http://www.milyn.org/xsd/smooks-1.1.xsd\">\n"// xmlns:graph = \"http://www.jboss.org/jbosstools/smooks/smooks-graphics-ext.xsd\">\n"//$NON-NLS-1$
+ + " <params>\n"//$NON-NLS-1$
+ + " <param name=\"stream.filter.type\">SAX</param>\n"//$NON-NLS-1$
+ + " </params>\n"//$NON-NLS-1$
+ + "</smooks-resource-list>"; //$NON-NLS-1$
+ }
+ return new ByteArrayInputStream(contents.getBytes());
+ }
+
+ private void throwCoreException(String message) throws CoreException {
+ IStatus status = new Status(IStatus.ERROR, SmooksConfigurationActivator.PLUGIN_ID, IStatus.OK, message, null);
+ throw new CoreException(status);
+ }
+
+ /**
+ * We will accept the selection in the workbench to see if we can initialize
+ * from it.
+ *
+ * @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.selection = selection;
+ }
+}
\ No newline at end of file
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksFileContainerSelectionPage.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksFileContainerSelectionPage.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksFileContainerSelectionPage.java 2010-07-22 06:10:20 UTC (rev 23653)
@@ -0,0 +1,26 @@
+package org.jboss.tools.smooks.configuration.wizards;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+
+/**
+ *
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 1, 2009
+ */
+public class SmooksFileContainerSelectionPage extends WizardNewFileCreationPage {
+
+ public SmooksFileContainerSelectionPage(String pageName, IStructuredSelection selection) {
+ super(pageName, selection);
+ setTitle(Messages.SmooksFileContainerSelectionPage_Page_Title);
+ setDescription(Messages.SmooksFileContainerSelectionPage_Page_Description);
+ setFileExtension("xml"); //$NON-NLS-1$
+ setFileName("smooks-config.xml"); //$NON-NLS-1$
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ validatePage();
+ }
+}
\ No newline at end of file
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksFileContainerSelectionPage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/messages.properties
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/messages.properties (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/messages.properties 2010-07-22 06:10:20 UTC (rev 23653)
@@ -0,0 +1,12 @@
+NewSmooksElementWizard_Smooks_Elements=Smooks Elements
+NewSmooksElementWizardPage_Page_Description=Add Smooks Elements
+NewSmooksElementWizardPage_Page_Title=Add Child
+SmooksConfigurationFileNewWizard_0=icons/smooks-wiz.gif
+SmooksConfigurationFileNewWizard_ErrorDialogTitle=Error
+SmooksConfigurationFileNewWizard_PageName=Smooks Configuration File
+#SmooksConfigurationFileNewWizard_VersionPageName=Smooks Version Selection
+SmooksFileContainerSelectionPage_Page_Description=Create a new Smooks configuration file.
+SmooksFileContainerSelectionPage_Page_Title=Smooks Configuration File Wizard Page
+SmooksVersionSelectionPage_Label_Smooks_Version=Smooks platform version
+SmooksVersionSelectionPage_Page_Description=Please select Smooks configuration file version
+SmooksVersionSelectionPage_Page_Title=Smooks configuration file version selection
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 9 months
JBoss Tools SVN: r23652 - trunk/documentation/whatsnew/core.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2010-07-22 01:51:41 -0400 (Thu, 22 Jul 2010)
New Revision: 23652
Modified:
trunk/documentation/whatsnew/core/core-news-3.2.0.M1.html
Log:
update core because of missing commit
Modified: trunk/documentation/whatsnew/core/core-news-3.2.0.M1.html
===================================================================
--- trunk/documentation/whatsnew/core/core-news-3.2.0.M1.html 2010-07-22 04:28:44 UTC (rev 23651)
+++ trunk/documentation/whatsnew/core/core-news-3.2.0.M1.html 2010-07-22 05:51:41 UTC (rev 23652)
@@ -12,7 +12,7 @@
<h1>What's New Core/General</h1>
<p align="right"><a href="../index.html">< Main Index</a> <a
- href="../hibernate/hibernate-news-3.4.0.M1.html">Hibernate Tools ></a></p>
+ href="../as/as-news-3.1.0.CR2.html">AS Tools ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
<tr>
<td colspan="2">
@@ -22,20 +22,25 @@
</td>
</tr>
<tr>
- <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Eclipse 3.6</b></td>
+ <td valign="top" align="left"><a name="itemname3"
+ id="itemname3"></a><b>Eclipse 3.6 (Helios)</b></td>
<td valign="top">
- <p>JBoss Tools 3.2 is targeting running on Eclipse 3.6
- to benefit from all the bugfixes and new API's that
- are made available. Running on version of Eclipse
- before 3.6 might work for some plugins, but is not
- supported.</p>
-
+ <p>All JBoss Tools now targets Eclipse 3.6; this
+ allows us to use the new API's and provide better integrated
+ user experience within Eclipse. Some plugins will possibly
+ still run on previous Eclipse versions but we cannot guarantee
+ it. If you want to stay on Eclipse 3.5 then use JBoss Tools 3.1.</p>
+
<p><small><a
href="https://jira.jboss.org/browse/JBIDE-6329">Related Jira</a></small></p>
</td>
</tr>
-</table>
+
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
</body>
15 years, 9 months