JBoss Tools SVN: r29901 - trunk/hibernatetools/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-03-17 20:42:10 -0400 (Thu, 17 Mar 2011)
New Revision: 29901
Modified:
trunk/hibernatetools/docs/reference/en-US/ant.xml
trunk/hibernatetools/docs/reference/en-US/introduction.xml
Log:
"Fixed spelling errors"
Modified: trunk/hibernatetools/docs/reference/en-US/ant.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en-US/ant.xml 2011-03-18 00:38:06 UTC (rev 29900)
+++ trunk/hibernatetools/docs/reference/en-US/ant.xml 2011-03-18 00:42:10 UTC (rev 29901)
@@ -8,7 +8,7 @@
<title>Introduction</title>
<para>
- The <filename>hibernate-tools.jar</filename> file, available from <ulink url="http://www.hibernate.org/subprojects/tools.html">tools.hibernate.org</ulink>, contains the core code for <productname>Hibernate Tools</productname>. It is used as the basis for both the Ant tasks described in this document and the Eclipse plugins availble as part of JBoss Developer Studio. The <filename>hibernate-tools.jar</filename> file is located in your Eclipse plugins directory at <filename>/plugins/org.hibernate.eclipse.x.x.x/lib/tools/hibernate-tools.jar</filename>.
+ The <filename>hibernate-tools.jar</filename> file, available from <ulink url="http://www.hibernate.org/subprojects/tools.html">tools.hibernate.org</ulink>, contains the core code for <productname>Hibernate Tools</productname>. It is used as the basis for both the Ant tasks described in this document and the Eclipse plugins available as part of JBoss Developer Studio. The <filename>hibernate-tools.jar</filename> file is located in your Eclipse plugins directory at <filename>/plugins/org.hibernate.eclipse.x.x.x/lib/tools/hibernate-tools.jar</filename>.
</para>
<para>This jar is 100% independent from the Eclipse platform and can thus be used independently of Eclipse.</para>
Modified: trunk/hibernatetools/docs/reference/en-US/introduction.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en-US/introduction.xml 2011-03-18 00:38:06 UTC (rev 29900)
+++ trunk/hibernatetools/docs/reference/en-US/introduction.xml 2011-03-18 00:42:10 UTC (rev 29901)
@@ -51,7 +51,7 @@
</entry>
<entry>
<para>
- A set of wizards are provided with the <productname>Hibernate Eclipse Tools</productname> to quickly create common <productname>Hibernate</productname> files such as configuration (<filename>cfg.xml</filename>) files, mapping files and <filename>revenge.xml</filename> as well. The Code Generation wizard helps by generating a series of various artifacts, and there is even support for completely reverse engineering an existing database schema.
+ A set of wizards are provided with the <productname>Hibernate Eclipse Tools</productname> to quickly create common <productname>Hibernate</productname> files such as configuration (<filename>cfg.xml</filename>) files, mapping files and <filename>reveng.xml</filename> as well. The Code Generation wizard helps by generating a series of various artifacts, and there is even support for completely reverse engineering an existing database schema.
</para>
</entry>
<entry>
15 years
JBoss Tools SVN: r29900 - trunk/drools/docs/guvnor_ref/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-03-17 20:38:06 -0400 (Thu, 17 Mar 2011)
New Revision: 29900
Modified:
trunk/drools/docs/guvnor_ref/en-US/Book_Info.xml
Log:
"Fixed spelling errors"
Modified: trunk/drools/docs/guvnor_ref/en-US/Book_Info.xml
===================================================================
--- trunk/drools/docs/guvnor_ref/en-US/Book_Info.xml 2011-03-17 23:40:42 UTC (rev 29899)
+++ trunk/drools/docs/guvnor_ref/en-US/Book_Info.xml 2011-03-18 00:38:06 UTC (rev 29900)
@@ -9,7 +9,7 @@
<edition>4.0.0</edition>
<pubsnumber>10</pubsnumber>
<abstract>
- <para>The Eclipse Guvnor Tools Reference Guide explains how to use the Eclipse Guvnor Tools to gain access to resources controled by the Guvnor repository policies.</para>
+ <para>The Eclipse Guvnor Tools Reference Guide explains how to use the Eclipse Guvnor Tools to gain access to resources controlled by the Guvnor repository policies.</para>
</abstract>
<corpauthor>
<inlinemediaobject>
15 years
JBoss Tools SVN: r29899 - trunk/birt/docs/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-03-17 19:40:42 -0400 (Thu, 17 Mar 2011)
New Revision: 29899
Modified:
trunk/birt/docs/en-US/birt_reports_deployment.xml
trunk/birt/docs/en-US/links.xml
Log:
"Fixed spelling errors"
Modified: trunk/birt/docs/en-US/birt_reports_deployment.xml
===================================================================
--- trunk/birt/docs/en-US/birt_reports_deployment.xml 2011-03-17 23:31:54 UTC (rev 29898)
+++ trunk/birt/docs/en-US/birt_reports_deployment.xml 2011-03-17 23:40:42 UTC (rev 29899)
@@ -248,7 +248,7 @@
</note>
<para>
- In conclusion, the main goal of this document is to describe the full feature set that <property>JBoss BIRT Tools</property> provide. If you have any questions, comments or suggestions on the topic, please feel free to ask in the <ulink url="http://www.jboss.org/index.html?module=bb&op=viewforum&f=201">JBoss Tools Forum</ulink>. You can also influence on how you want to see JBoss Tools docs infuture leaving your vote on the article <ulink url="http://www.jboss.org/community/docs/DOC-10795">Overview of the improvements required by JBossTools/JBDS Docs users</ulink>.
+ In conclusion, the main goal of this document is to describe the full feature set that <property>JBoss BIRT Tools</property> provide. If you have any questions, comments or suggestions on the topic, please feel free to ask in the <ulink url="http://www.jboss.org/index.html?module=bb&op=viewforum&f=201">JBoss Tools Forum</ulink>. You can also influence on how you want to see JBoss Tools docs in future leaving your vote on the article <ulink url="http://www.jboss.org/community/docs/DOC-10795">Overview of the improvements required by JBossTools/JBDS Docs users</ulink>.
</para>
</section>
Modified: trunk/birt/docs/en-US/links.xml
===================================================================
--- trunk/birt/docs/en-US/links.xml 2011-03-17 23:31:54 UTC (rev 29898)
+++ trunk/birt/docs/en-US/links.xml 2011-03-17 23:40:42 UTC (rev 29899)
@@ -15,7 +15,7 @@
<title>Other Relevant Resources on the Topic</title>
- <para>You can find aditional JBoss Developer Studio documentation at <ulink url="http://docs.redhat.com/docs/en-US/JBoss_Developer_Studio/index.html">RedHat documentaion</ulink> website.</para>
+ <para>You can find additional JBoss Developer Studio documentation at <ulink url="http://docs.redhat.com/docs/en-US/JBoss_Developer_Studio/index.html">RedHat documentation</ulink> website.</para>
<para>The latest documentation builds are available through the <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">JBoss Tools Nightly Docs Builds</ulink>.
</para>
15 years
JBoss Tools SVN: r29898 - in trunk: jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/META-INF and 14 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-03-17 19:31:54 -0400 (Thu, 17 Mar 2011)
New Revision: 29898
Added:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/resources/stylesheet/
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/resources/stylesheet/style.css
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CSSStylesheetOpenOnTest.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/plugin.xml
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/pom.xml
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/pom.xml
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/pages/inputname.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JsfTextExtAllTests.java
trunk/jst/plugins/org.jboss.tools.jst.text.ext/META-INF/MANIFEST.MF
trunk/jst/plugins/org.jboss.tools.jst.text.ext/pom.xml
trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/CSSClassHyperlink.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/META-INF/MANIFEST.MF
trunk/jst/plugins/org.jboss.tools.jst.web.kb/pom.xml
trunk/jst/plugins/org.jboss.tools.jst.web.kb/schema/include.exsd
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeContextBuilder.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeContextDefinition.java
Log:
JBIDE-8216
jsf-tags breaks wtp-capibilites
Issue is fixed
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/META-INF/MANIFEST.MF 2011-03-17 23:02:50 UTC (rev 29897)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/META-INF/MANIFEST.MF 2011-03-17 23:31:54 UTC (rev 29898)
@@ -14,5 +14,5 @@
org.jboss.tools.jsf.text.ext
Export-Package: org.jboss.tools.jsf.text.ext.facelets,
org.jboss.tools.jsf.text.ext.facelets.hyperlink
-Bundle-Version: 3.2.0.qualifier
+Bundle-Version: 3.3.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/plugin.xml 2011-03-17 23:02:50 UTC (rev 29897)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/plugin.xml 2011-03-17 23:31:54 UTC (rev 29898)
@@ -324,5 +324,10 @@
<attribute name="src" />
</tag>
</include>
+ <jsf2cssholder uri="http://java.sun.com/jsf/html">
+ <tag name="outputStylesheet">
+ <attribute name="name" />
+ </tag>
+ </jsf2cssholder>
</extension>
</plugin>
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/pom.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/pom.xml 2011-03-17 23:02:50 UTC (rev 29897)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/pom.xml 2011-03-17 23:31:54 UTC (rev 29898)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.jsf.plugins</groupId>
<artifactId>org.jboss.tools.jsf.text.ext.facelets</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/META-INF/MANIFEST.MF 2011-03-17 23:02:50 UTC (rev 29897)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/META-INF/MANIFEST.MF 2011-03-17 23:31:54 UTC (rev 29898)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.jboss.tools.jsf.text.ext.test
-Bundle-Version: 3.2.0.qualifier
+Bundle-Version: 3.3.0.qualifier
Require-Bundle: org.junit,
org.jboss.tools.jsf.text.ext,
org.eclipse.ui.workbench.texteditor,
@@ -11,18 +11,18 @@
org.jboss.tools.common.text.ext,
org.jboss.tools.common.model,
org.jboss.tools.tests,
- org.jboss.tools.common.model.ui;bundle-version="3.1.0",
- org.eclipse.core.commands;bundle-version="3.5.0",
- org.eclipse.jface;bundle-version="3.5.2",
- org.jboss.tools.jst.jsp;bundle-version="3.1.0",
- org.jboss.tools.vpe;bundle-version="3.1.0",
- org.jboss.tools.jst.web.ui;bundle-version="3.1.0",
- org.jboss.tools.jst.css;bundle-version="3.1.0",
- org.jboss.tools.common.el.core;bundle-version="3.1.0",
- org.jboss.tools.jst.text.ext;bundle-version="3.1.0",
- org.jboss.tools.jsf.text.ext.facelets;bundle-version="3.1.0",
- org.jboss.tools.jsf.text.ext.richfaces;bundle-version="3.1.0",
- org.jboss.tools.jsf.ui;bundle-version="3.1.0",
+ org.jboss.tools.common.model.ui,
+ org.eclipse.core.commands,
+ org.eclipse.jface,
+ org.jboss.tools.jst.jsp,
+ org.jboss.tools.vpe,
+ org.jboss.tools.jst.web.ui,
+ org.jboss.tools.jst.css,
+ org.jboss.tools.common.el.core,
+ org.jboss.tools.jst.text.ext,
+ org.jboss.tools.jsf.text.ext.facelets,
+ org.jboss.tools.jsf.text.ext.richfaces,
+ org.jboss.tools.jsf.ui,
org.eclipse.jst.standard.schemas
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/pom.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/pom.xml 2011-03-17 23:02:50 UTC (rev 29897)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/pom.xml 2011-03-17 23:31:54 UTC (rev 29898)
@@ -10,7 +10,7 @@
</parent>
<groupId>org.jboss.tools.jsf.tests</groupId>
<artifactId>org.jboss.tools.jsf.text.ext.test</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/pages/inputname.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/pages/inputname.xhtml 2011-03-17 23:02:50 UTC (rev 29897)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/pages/inputname.xhtml 2011-03-17 23:31:54 UTC (rev 29898)
@@ -12,6 +12,8 @@
xmlns:jar="http://java.sun.com/jsf/composite/jarPage"
xmlns:jar1="http://java.sun.com/jsf/composite/jarPage1">
+ <h:outputStylesheet name="stylesheet/style.css" type="text/css"/>
+
<ui:define name="pageTitle">Input User Name</ui:define>
<ui:define name="pageHeader">Facelets Hello Application</ui:define>
@@ -21,13 +23,14 @@
<h:outputText value="${registeredMsgs['demo.long.named.property']}" />
<h:outputText value="${pageMsgs.prompt}" />
<h:outputText value="${pageMsgs['demo.long.named.property']}" />
+ <div class="info">
<form>
<jar:echo1 echo="Hello" />
<jar:echo echo="Hello" />
<jar:echo anknownAttr="1" echo="Hello" />
<jar1:echo echo="Hello" />
</form>
-
+ </div>
</ui:define>
</ui:composition>
</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/resources/stylesheet/style.css
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/resources/stylesheet/style.css (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/resources/stylesheet/style.css 2011-03-17 23:31:54 UTC (rev 29898)
@@ -0,0 +1,29 @@
+html {
+ overflow-y: scroll;
+}
+
+body {
+ font-size: 12px;
+ margin: 0px;
+}
+
+a img {
+ border: none;
+}
+
+h1 {
+ font-size: 1.6em;
+ margin-top: 0;
+}
+
+div.info {
+ font-size: 1.2em;
+}
+
+ul.bullets {
+ list-style: square;
+}
+
+ul.bullets li {
+ padding-bottom: 2px;
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/resources/stylesheet/style.css
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CSSStylesheetOpenOnTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CSSStylesheetOpenOnTest.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CSSStylesheetOpenOnTest.java 2011-03-17 23:31:54 UTC (rev 29898)
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.jsf.text.ext.test;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.FindReplaceDocumentAdapter;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.common.text.ext.hyperlink.HyperlinkDetector;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.WorkbenchUtils;
+
+/**
+ *
+ * @author jeremy
+ *
+ */
+public class JSF2CSSStylesheetOpenOnTest extends TestCase {
+ private static final String PROJECT_NAME = "JSF2CompositeOpenOn";
+ private static final String PAGE_NAME = PROJECT_NAME+"/WebContent/pages/inputname.xhtml";
+
+ public IProject project = null;
+
+ protected void setUp() {
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject(
+ PROJECT_NAME);
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllEditors(false);
+ JobUtils.waitForIdle();
+ }
+
+ protected void tearDown() {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllEditors(false);
+ }
+
+ public JSF2CSSStylesheetOpenOnTest() {
+ super("JSF2 OpenOn on CSS Stylesheets test");
+ }
+
+ public void testJSF2CSSStylesheetOpenOn() throws PartInitException, BadLocationException {
+ final String editorName = "style.css";
+ final String tagName = "outputStylesheet";
+ final String valueToFind = "style.css";
+ IEditorPart editor = WorkbenchUtils.openEditor(PAGE_NAME);
+ assertTrue(editor instanceof JSPMultiPageEditor);
+ JobUtils.waitForIdle();
+ JSPMultiPageEditor jspMultyPageEditor = (JSPMultiPageEditor) editor;
+ ISourceViewer viewer = jspMultyPageEditor.getSourceEditor().getTextViewer();
+
+ IDocument document = viewer.getDocument();
+ IRegion reg = new FindReplaceDocumentAdapter(document).find(0,
+ tagName, true, true, false, false);
+ assertNotNull("Tag:"+tagName+" not found",reg);
+
+ reg = new FindReplaceDocumentAdapter(document).find(reg.getOffset(),
+ valueToFind, true, true, false, false);
+ assertNotNull("Value to find:"+valueToFind+" not found",reg);
+
+ IHyperlink[] links = HyperlinkDetector.getInstance().detectHyperlinks(viewer, reg, true); // new Region(reg.getOffset() + reg.getLength(), 0)
+
+ assertNotNull("Hyperlinks for value:"+valueToFind+" are not found",links);
+
+ assertTrue("Hyperlinks for value:"+valueToFind+" are not found",links.length!=0);
+
+ boolean found = false;
+ for(IHyperlink link : links){
+ assertNotNull(link.toString());
+
+ link.open();
+ JobUtils.waitForIdle(2000);
+
+ IEditorPart resultEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if(editorName.equals(resultEditor.getTitle())){
+ found = true;
+ return;
+ }
+ }
+ assertTrue("OpenOn have not opened "+editorName+" editor",found);
+ }
+
+ public void testJSF2CSSClassOpenOn() throws PartInitException, BadLocationException {
+ final String editorName = "style.css";
+ final String tagName = "div";
+ final String valueToFind = "info";
+ IEditorPart editor = WorkbenchUtils.openEditor(PAGE_NAME);
+ assertTrue(editor instanceof JSPMultiPageEditor);
+ JobUtils.waitForIdle();
+ JSPMultiPageEditor jspMultyPageEditor = (JSPMultiPageEditor) editor;
+ ISourceViewer viewer = jspMultyPageEditor.getSourceEditor().getTextViewer();
+
+ IDocument document = viewer.getDocument();
+ IRegion reg = new FindReplaceDocumentAdapter(document).find(0,
+ tagName, true, true, false, false);
+ assertNotNull("Tag:"+tagName+" not found",reg);
+
+ reg = new FindReplaceDocumentAdapter(document).find(reg.getOffset(),
+ valueToFind, true, true, false, false);
+ assertNotNull("Value to find:"+valueToFind+" not found",reg);
+
+ IHyperlink[] links = HyperlinkDetector.getInstance().detectHyperlinks(viewer, reg, true); // new Region(reg.getOffset() + reg.getLength(), 0)
+
+ assertNotNull("Hyperlinks for value:"+valueToFind+" are not found",links);
+
+ assertTrue("Hyperlinks for value:"+valueToFind+" are not found",links.length!=0);
+
+ boolean found = false;
+ for(IHyperlink link : links){
+ assertNotNull(link.toString());
+
+ link.open();
+ JobUtils.waitForIdle(2000);
+
+ IEditorPart resultEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if(editorName.equals(resultEditor.getTitle())){
+ found = true;
+ return;
+ }
+ }
+ assertTrue("OpenOn have not opened "+editorName+" editor",found);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CSSStylesheetOpenOnTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JsfTextExtAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JsfTextExtAllTests.java 2011-03-17 23:02:50 UTC (rev 29897)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JsfTextExtAllTests.java 2011-03-17 23:31:54 UTC (rev 29898)
@@ -31,6 +31,10 @@
"org.jboss.tools.jsf.text.ext.test",
new String[]{"projects/JSF2CompositeOpenOn"},
new String[]{"JSF2CompositeOpenOn"}));
+ suite.addTest(new ProjectImportTestSetup(new TestSuite(JSF2CSSStylesheetOpenOnTest.class),
+ "org.jboss.tools.jsf.text.ext.test",
+ new String[]{"projects/JSF2CompositeOpenOn"},
+ new String[]{"JSF2CompositeOpenOn"}));
return suite;
}
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.text.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.text.ext/META-INF/MANIFEST.MF 2011-03-17 23:02:50 UTC (rev 29897)
+++ trunk/jst/plugins/org.jboss.tools.jst.text.ext/META-INF/MANIFEST.MF 2011-03-17 23:31:54 UTC (rev 29898)
@@ -5,7 +5,7 @@
org.jboss.tools.jst.text.ext.hyperlink,
org.jboss.tools.jst.text.ext.hyperlink.jsp,
org.jboss.tools.jst.text.ext.util
-Bundle-Version: 3.2.0.qualifier
+Bundle-Version: 3.3.0.qualifier
Bundle-Name: %Bundle-Name.0
Bundle-ManifestVersion: 2
Bundle-Vendor: %providerName
@@ -25,8 +25,8 @@
org.eclipse.jst.jsp.core;visibility:=reexport,
org.eclipse.wst.common.modulecore;visibility:=reexport,
org.eclipse.pde.ui,
- org.jboss.tools.common.el.core;bundle-version="2.0.0",
- org.eclipse.emf.ecore;bundle-version="2.5.0",
+ org.jboss.tools.common.el.core,
+ org.eclipse.emf.ecore,
org.eclipse.wst.css.core,
org.eclipse.wst.html.core,
org.jboss.tools.jst.web.kb
Modified: trunk/jst/plugins/org.jboss.tools.jst.text.ext/pom.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.text.ext/pom.xml 2011-03-17 23:02:50 UTC (rev 29897)
+++ trunk/jst/plugins/org.jboss.tools.jst.text.ext/pom.xml 2011-03-17 23:31:54 UTC (rev 29898)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.jst.plugins</groupId>
<artifactId>org.jboss.tools.jst.text.ext</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/CSSClassHyperlink.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/CSSClassHyperlink.java 2011-03-17 23:02:50 UTC (rev 29897)
+++ trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/CSSClassHyperlink.java 2011-03-17 23:31:54 UTC (rev 29898)
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2011 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
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.jst.text.ext.hyperlink;
@@ -76,7 +76,7 @@
for (int r = 0; rules != null && r < rules.getLength(); r++) {
if (isRuleMatch(rules.item(r), getStyleName(region))) {
CSSRule rule = rules.item(r);
- IFile file = findFileForCSSStyleSheet(descr.source);
+ IFile file = findFileForCSSStyleSheet(descr.getFilePath());
if (file != null) {
int startOffset = 0;
if (descr.sheet.getOwnerNode() != null) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/META-INF/MANIFEST.MF 2011-03-17 23:02:50 UTC (rev 29897)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/META-INF/MANIFEST.MF 2011-03-17 23:31:54 UTC (rev 29898)
@@ -3,7 +3,7 @@
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.jboss.tools.jst.web.kb;singleton:=true
Bundle-Localization: plugin
-Bundle-Version: 3.2.0.qualifier
+Bundle-Version: 3.3.0.qualifier
Bundle-Activator: org.jboss.tools.jst.web.kb.WebKbPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/pom.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/pom.xml 2011-03-17 23:02:50 UTC (rev 29897)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/pom.xml 2011-03-17 23:31:54 UTC (rev 29898)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.jst.tests</groupId>
<artifactId>org.jboss.tools.jst.web.kb</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/schema/include.exsd
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/schema/include.exsd 2011-03-17 23:02:50 UTC (rev 29897)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/schema/include.exsd 2011-03-17 23:31:54 UTC (rev 29898)
@@ -166,6 +166,27 @@
</complexType>
</element>
+ <element name="jsf2cssholder">
+ <annotation>
+ <documentation>
+ Defines a CSS holder item.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="tag" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="attribute" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="uri" type="string" use="required">
+ <annotation>
+ <documentation>
+ An URI for this element.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
<annotation>
<appInfo>
<meta.section type="since"/>
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2011-03-17 23:02:50 UTC (rev 29897)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2011-03-17 23:31:54 UTC (rev 29898)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
+ * Copyright (c) 2011 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,
@@ -631,14 +631,23 @@
}
if (context instanceof ICSSContainerSupport) {
if(IncludeContextBuilder.isCSSStyleSheetContainer(uri, tagName)) {
- fillCSSStyleSheetFromElement(node, (ICSSContainerSupport)context);
+ fillCSSStyleSheetFromElement(node, (ICSSContainerSupport)context, false);
+ } else if(IncludeContextBuilder.isJSF2CSSStyleSheetContainer(uri, tagName)) {
+ fillCSSStyleSheetFromElement(node, (ICSSContainerSupport)context, true);
} else {
String[] cssAttributes = IncludeContextBuilder.getCSSStyleSheetAttributes(uri, tagName);
if (cssAttributes != null) {
for (String attr : cssAttributes) {
- fillCSSStyleSheetFromAttribute(node, attr, (ICSSContainerSupport)context);
+ fillCSSStyleSheetFromAttribute(node, attr, (ICSSContainerSupport)context, false);
}
}
+ cssAttributes = IncludeContextBuilder.getJSF2CSSStyleSheetAttributes(uri, tagName);
+ if (cssAttributes != null) {
+ for (String attr : cssAttributes) {
+ fillCSSStyleSheetFromAttribute(node, attr, (ICSSContainerSupport)context, true);
+ }
+ }
+
}
}
}
@@ -744,27 +753,62 @@
}
private void fillCSSStyleSheetFromAttribute(IDOMElement node,
- String attribute, ICSSContainerSupport context) {
- CSSStyleSheetDescriptor descr = getSheetForTagAttribute(node, attribute);
+ String attribute, ICSSContainerSupport context, boolean jsf2Source) {
+ CSSStyleSheetDescriptor descr = getSheetForTagAttribute(node, attribute, jsf2Source);
if (descr != null)
context.addCSSStyleSheetDescriptor(descr);
}
private void fillCSSStyleSheetFromElement(IDOMElement node,
- ICSSContainerSupport context) {
+ ICSSContainerSupport context, boolean jsf2Source) {
CSSStyleSheet sheet = getSheetForTag(node);
- if (sheet != null)
- context.addCSSStyleSheetDescriptor(new CSSStyleSheetDescriptor(context.getResource().getFullPath().toString(), sheet));
+ if (sheet != null) {
+ String library = null;
+ if (jsf2Source) {
+ Attr libraryAttr = node.getAttributeNode("library"); //$NON-NLS-1$
+ if (libraryAttr != null && libraryAttr.getNodeValue() != null) {
+ library = libraryAttr.getNodeValue().trim();
+ library = library.length() == 0 ? null : library;
+ }
+ }
+
+ context.addCSSStyleSheetDescriptor(new CSSStyleSheetDescriptor(context.getResource().getFullPath().toString(), sheet, jsf2Source, library));
+ }
}
+ private static final String JSF2_RESOURCES_FOLDER = "/resources"; //$NON-NLS-1$
+
public static class CSSStyleSheetDescriptor {
public CSSStyleSheet sheet;
public String source;
+ public boolean jsf2Source;
+ public String jsf2Library;
+ /*
CSSStyleSheetDescriptor (String source, CSSStyleSheet sheet) {
+ this(source, sheet, false);
+ }
+ */
+
+ CSSStyleSheetDescriptor (String source, CSSStyleSheet sheet, boolean jsf2Source, String jsf2Library) {
this.source = source;
this.sheet = sheet;
+ this.jsf2Source = jsf2Source;
+ this.jsf2Library = jsf2Library;
}
+
+ public String getFilePath() {
+ if (!jsf2Source)
+ return source;
+
+ if (jsf2Library != null) {
+ String library = jsf2Library.trim();
+ if (library.length() != 0) {
+ return JSF2_RESOURCES_FOLDER + '/' + library + '/' + source;
+ }
+ }
+ return JSF2_RESOURCES_FOLDER + '/' + source;
+ }
}
/**
@@ -772,7 +816,7 @@
* @param stylesContainer
* @return
*/
- private CSSStyleSheetDescriptor getSheetForTagAttribute(final Node stylesContainer, String attribute) {
+ private CSSStyleSheetDescriptor getSheetForTagAttribute(final Node stylesContainer, String attribute, boolean jsf2Source) {
INodeNotifier notifier = (INodeNotifier) stylesContainer;
CSSStyleSheet sheet = null;
String source = null;
@@ -783,7 +827,7 @@
if (!(adapter instanceof ExtendedLinkElementAdapter)) {
notifier.removeAdapter(adapter);
adapter = new ExtendedLinkElementAdapter(
- (Element) stylesContainer, attribute);
+ (Element) stylesContainer, attribute, jsf2Source);
sheet = (CSSStyleSheet) adapter.getSheet();
source = ((ExtendedLinkElementAdapter)adapter).getSource();
if (sheet != null && source != null) {
@@ -798,7 +842,16 @@
}
- return sheet == null || source == null ? null : new CSSStyleSheetDescriptor(source, sheet);
+ String library = null;
+ if (jsf2Source && stylesContainer instanceof Element) {
+ Attr libraryAttr = ((Element)stylesContainer).getAttributeNode("library"); //$NON-NLS-1$
+ if (libraryAttr != null && libraryAttr.getNodeValue() != null) {
+ library = libraryAttr.getNodeValue().trim();
+ library = library.length() == 0 ? null : library;
+ }
+ }
+
+ return sheet == null || source == null ? null : new CSSStyleSheetDescriptor(source, sheet, jsf2Source, library);
}
/**
@@ -1018,10 +1071,13 @@
private Element element;
private String hrefAttrName;
private String source = null;
+ private boolean jsf2Source;
+ private String prefix = null;
- public ExtendedLinkElementAdapter(Element element, String hrefAttrName) {
+ public ExtendedLinkElementAdapter(Element element, String hrefAttrName, boolean jsf2Source) {
this.element = element;
this.hrefAttrName = hrefAttrName;
+ this.jsf2Source = jsf2Source;
}
@Override
@@ -1051,6 +1107,19 @@
if (super.isValidAttribute()) {
source = getSourceFromAttribute("href"); //$NON-NLS-1$
} else if (isValidAttribute()) {
+ if (jsf2Source) {
+ String library = null;
+ Attr libraryAttr = element.getAttributeNode("library"); //$NON-NLS-1$
+ if (libraryAttr != null && libraryAttr.getNodeValue() != null) {
+ library = libraryAttr.getNodeValue().trim();
+ library = library.length() == 0 ? null : library;
+ }
+ if (library != null) {
+ prefix = JSF2_RESOURCES_FOLDER + '/' + library + '/';
+ } else {
+ prefix = JSF2_RESOURCES_FOLDER + '/';
+ }
+ }
source = getSourceFromAttribute(hrefAttrName);
} else {
return null;
@@ -1091,7 +1160,7 @@
URLModelProvider provider = new URLModelProvider();
try {
IStructuredModel newModel = provider.getModelForRead(baseModel,
- source);
+ prefix == null ? source : prefix + source);
if (newModel == null)
return null;
if (!(newModel instanceof ICSSModel)) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeContextBuilder.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeContextBuilder.java 2011-03-17 23:02:50 UTC (rev 29897)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeContextBuilder.java 2011-03-17 23:31:54 UTC (rev 29898)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
+ * Copyright (c) 2011 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,
@@ -36,6 +36,7 @@
public static final String TAG_CONTEXTTYPE = "contexttype"; //$NON-NLS-1$
public static final String TAG_CONTENTTYPE = "contenttype"; //$NON-NLS-1$
public static final String TAG_CSSHOLDER = "cssholder"; //$NON-NLS-1$
+ public static final String TAG_JSF2CSSHOLDER = "jsf2cssholder"; //$NON-NLS-1$
public static final String ATT_ID = "id"; //$NON-NLS-1$
public static final String ATT_URI = "uri"; //$NON-NLS-1$
@@ -205,7 +206,7 @@
protected boolean readElement(IConfigurationElement element) {
String tag = element.getName();
- if (tag.equals(TAG_INCLUDE) || tag.equals(TAG_CSSHOLDER)) {
+ if (tag.equals(TAG_INCLUDE) || tag.equals(TAG_CSSHOLDER) || tag.equals(TAG_JSF2CSSHOLDER)) {
processIncludeContextElement(element);
// make sure processing of current open on tag resulted in a current definition
@@ -364,6 +365,43 @@
}
/**
+ * Checks if the specified tag is a JSF2 CSS Style Sheet container
+ *
+ * @param uri
+ * @param tagName
+ * @return
+ */
+ public static boolean isJSF2CSSStyleSheetContainer(String uri, String tagName) {
+ if (uri == null)
+ return false;
+
+ List<IncludeContextDefinition> defs = IncludeContextBuilder.getInstance().getIncludeContextDefinitions();
+ if (defs == null)
+ return false;
+
+ boolean isHolder = false;
+ for (IncludeContextDefinition def : defs) {
+ if (uri.equals(def.getUri())) {
+ String[] defTags = def.getJSF2CSSTags();
+ if (defTags != null) {
+ for (String tag : defTags) {
+ if (tagName.equals(tag) || ("".equals(uri) && tagName.equalsIgnoreCase(tag))) { //$NON-NLS-1$
+ isHolder = true;
+ // Check that the tag have no attributes defined
+ // If so - the tag itself is used to define the CSS
+ // But if the tag has at least one attribute defined - it's not the holder
+ String[] attrs = def.getJSF2CSSTagAttributes(tagName);
+ isHolder ^= (attrs != null && attrs.length > 0);
+ }
+ }
+ }
+ }
+ }
+
+ return isHolder;
+ }
+
+ /**
* Returns the CSS Style Sheet attributes that represent a CSS Style Sheet container
*
* @param uri
@@ -392,4 +430,34 @@
return attrs.size() == 0 ? null : attrs.toArray(new String[attrs.size()]);
}
+
+ /**
+ * Returns the JSF2 CSS Style Sheet attributes that represent a CSS Style Sheet container
+ *
+ * @param uri
+ * @param tagName
+ * @return
+ */
+ public static String[] getJSF2CSSStyleSheetAttributes(String uri, String tagName) {
+ if (uri == null)
+ return null;
+
+ List<IncludeContextDefinition> defs = IncludeContextBuilder.getInstance().getIncludeContextDefinitions();
+ if (defs == null)
+ return null;
+
+ List<String> attrs = new ArrayList<String>();
+
+ for (IncludeContextDefinition def : defs) {
+ if (uri.equals(def.getUri())) {
+ String[] defAttrs = def.getJSF2CSSTagAttributes(tagName);
+ if (defAttrs != null) {
+ for (String attr : defAttrs) attrs.add(attr);
+ }
+ }
+ }
+
+ return attrs.size() == 0 ? null : attrs.toArray(new String[attrs.size()]);
+
+ }
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeContextDefinition.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeContextDefinition.java 2011-03-17 23:02:50 UTC (rev 29897)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeContextDefinition.java 2011-03-17 23:31:54 UTC (rev 29898)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
+ * Copyright (c) 2011 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,
@@ -27,6 +27,7 @@
private String fUri;
private Map<String, Set<String>> fIncludeTags; // Map<TagName, Set<AttributeName>>
private Map<String, Set<String>> fCSSTags; // Map<TagName, Set<AttributeName>>
+ private Map<String, Set<String>> fJSF2CSSTags; // Map<TagName, Set<AttributeName>>
private Map<String, Set<String>> fContexts; // Map<ContextType, Set<ContentType>>
/**
@@ -72,6 +73,9 @@
} else if (isInParentElements(element, IncludeContextBuilder.TAG_CSSHOLDER)) {
addCSSTag(tagName, element);
return true;
+ } else if (isInParentElements(element, IncludeContextBuilder.TAG_JSF2CSSHOLDER)) {
+ addJSF2CSSTag(tagName, element);
+ return true;
}
return false;
}
@@ -109,6 +113,23 @@
fCSSTags.put(tagName, tagSet);
}
}
+
+ /**
+ * Adds a CSS Style Sheet holder to the Definition
+ *
+ * @param tagName
+ * @param element
+ */
+ private void addJSF2CSSTag(String tagName, IConfigurationElement element) {
+ if (fJSF2CSSTags == null) {
+ fJSF2CSSTags = new HashMap<String, Set<String>>();
+ }
+ Set<String> tagSet = fJSF2CSSTags.get(tagName);
+ if (tagSet == null) {
+ tagSet = new HashSet<String>();
+ fJSF2CSSTags.put(tagName, tagSet);
+ }
+ }
/**
* Adds a Tag Attribute to the Definition
@@ -145,6 +166,12 @@
}
fCSSTags.get(parentTagName).add(attributeName);
+ } else if (isInParentElements(element, IncludeContextBuilder.TAG_JSF2CSSHOLDER)) {
+ if (fJSF2CSSTags.get(parentTagName) == null) {
+ addJSF2CSSTag(parentTagName, parentTagElement);
+ }
+
+ fJSF2CSSTags.get(parentTagName).add(attributeName);
}
}
@@ -235,6 +262,15 @@
return fCSSTags == null ? EMPTY_CHILDREN :
(String[])fCSSTags.keySet().toArray(new String[fCSSTags.size()]);
}
+ /**
+ * Returns the JSF2 CSS Style Sheet holder Tags stored in the Definition
+ *
+ * @return
+ */
+ public String[] getJSF2CSSTags() {
+ return fJSF2CSSTags == null ? EMPTY_CHILDREN :
+ (String[])fJSF2CSSTags.keySet().toArray(new String[fJSF2CSSTags.size()]);
+ }
/**
* Returns the Attributes for the Include Tag with the specified Name
@@ -243,13 +279,17 @@
* @return
*/
public String[] getIncludeTagAttributes(String tagName) {
- if ("".equals(fUri)) //$NON-NLS-1$
- tagName = tagName.toLowerCase();
+ return getTagAttributes(fIncludeTags, tagName);
+ }
- Set<String> attrSet = fIncludeTags == null ? null : fIncludeTags.get(tagName);
-
- return attrSet == null ? EMPTY_CHILDREN :
- (String[])attrSet.toArray(new String[attrSet.size()]);
+ /**
+ * Returns the Attributes for the CSS Style Sheet Holder Tag with the specified Name
+ *
+ * @param tagName
+ * @return
+ */
+ public String[] getCSSTagAttributes(String tagName) {
+ return getTagAttributes(fCSSTags, tagName);
}
/**
@@ -258,11 +298,15 @@
* @param tagName
* @return
*/
- public String[] getCSSTagAttributes(String tagName) {
+ public String[] getJSF2CSSTagAttributes(String tagName) {
+ return getTagAttributes(fJSF2CSSTags, tagName);
+ }
+
+ private String[] getTagAttributes (Map<String, Set<String>> tags, String tagName) {
if ("".equals(fUri)) //$NON-NLS-1$
tagName = tagName.toLowerCase();
- Set<String> attrSet = fCSSTags == null ? null : fCSSTags.get(tagName);
+ Set<String> attrSet = tags == null ? null : tags.get(tagName);
return attrSet == null ? EMPTY_CHILDREN :
(String[])attrSet.toArray(new String[attrSet.size()]);
15 years
JBoss Tools SVN: r29897 - in trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui: internal/wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-03-17 19:02:50 -0400 (Thu, 17 Mar 2011)
New Revision: 29897
Modified:
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/Messages.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/PortletUIActivator.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/AddJBossPortletWizardPage.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/AddPortletWizardPage.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassDataModelProvider.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/messages.properties
Log:
JBIDE-7755 Portlet wizard allows creating portlets with same name
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/Messages.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/Messages.java 2011-03-17 23:02:18 UTC (rev 29896)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/Messages.java 2011-03-17 23:02:50 UTC (rev 29897)
@@ -16,6 +16,7 @@
public static String NewJSFPortletClassWizardPage_Choose_a_Seam_portlet_class;
public static String NewJSFPortletClassWizardPage_New_JSF_Portlet;
public static String NewJSFPortletClassWizardPage_New_Seam_Portlet;
+ public static String NewPortletClassDataModelProvider_The_portlet_already_exists;
public static String NewPortletClassWizardPage_Choose_a_portlet_class;
public static String NewPortletClassWizardPage_New_Portlet;
public static String NewPortletClassWizardPage_Use_an_existing_Portlet_class;
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/PortletUIActivator.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/PortletUIActivator.java 2011-03-17 23:02:18 UTC (rev 29896)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/PortletUIActivator.java 2011-03-17 23:02:50 UTC (rev 29897)
@@ -3,6 +3,8 @@
import static org.eclipse.wst.common.componentcore.internal.operation.IArtifactEditOperationDataModelProperties.PROJECT_NAME;
import java.io.File;
+import java.util.HashSet;
+import java.util.Set;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
@@ -22,11 +24,18 @@
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.tools.portlet.core.IPortletConstants;
import org.jboss.tools.portlet.core.PortletCoreActivator;
import org.osgi.framework.BundleContext;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
/**
* The activator class controls the plug-in life cycle
@@ -183,4 +192,46 @@
return null;
}
}
+
+ public static Set<String> getPortletNames(IFile portletFile) {
+ Set<String> portletNames = new HashSet<String>();
+ if (portletFile == null || !portletFile.exists()) {
+ return portletNames;
+ }
+ IDOMModel domModel = null;
+ try {
+ domModel = (IDOMModel) StructuredModelManager.getModelManager()
+ .getModelForRead(portletFile);
+ Document document = domModel.getDocument();
+ NodeList portlets = document.getElementsByTagName("portlet-name"); //$NON-NLS-1$
+ if (portlets == null || portlets.getLength() == 0) {
+ return portletNames;
+ }
+ for (int i = 0; i < portlets.getLength(); i++) {
+ Node node = portlets.item(i);
+ NodeList children = node.getChildNodes();
+ if (children == null || children.getLength() != 1) {
+ continue;
+ }
+ Node child = children.item(0);
+ if (child == null || Node.TEXT_NODE != child.getNodeType()) {
+ continue;
+ }
+ IStructuredDocumentRegion structuredDocumentRegion = ((IDOMNode) child)
+ .getFirstStructuredDocumentRegion();
+ String value = structuredDocumentRegion.getFullText();
+ if (value == null) {
+ continue;
+ }
+ portletNames.add(value.trim());
+ }
+ } catch (Exception e) {
+ PortletCoreActivator.log(e);
+ } finally {
+ if (domModel != null) {
+ domModel.releaseFromRead();
+ }
+ }
+ return portletNames;
+ }
}
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/AddJBossPortletWizardPage.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/AddJBossPortletWizardPage.java 2011-03-17 23:02:18 UTC (rev 29896)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/AddJBossPortletWizardPage.java 2011-03-17 23:02:50 UTC (rev 29897)
@@ -11,6 +11,7 @@
import static org.jboss.tools.portlet.ui.INewPortletClassDataModelProperties.IF_EXISTS;
import static org.jboss.tools.portlet.ui.INewPortletClassDataModelProperties.INITIAL_WINDOW_STATE;
import static org.jboss.tools.portlet.ui.INewPortletClassDataModelProperties.INSTANCE_NAME;
+import static org.jboss.tools.portlet.ui.INewPortletClassDataModelProperties.NAME;
import static org.jboss.tools.portlet.ui.INewPortletClassDataModelProperties.IS_JSF_PORTLET;
import static org.jboss.tools.portlet.ui.INewPortletClassDataModelProperties.IS_SEAM_PORTLET;
import static org.jboss.tools.portlet.ui.INewPortletClassDataModelProperties.JBOSS_APP;
@@ -81,7 +82,7 @@
* @see org.eclipse.jem.util.ui.wizard.WTPWizardPage#getValidationPropertyNames()
*/
protected String[] getValidationPropertyNames() {
- return new String[] { INSTANCE_NAME, WINDOW_NAME };
+ return new String[] { NAME, INSTANCE_NAME, WINDOW_NAME };
}
protected Composite createTopLevelComposite(Composite parent) {
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/AddPortletWizardPage.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/AddPortletWizardPage.java 2011-03-17 23:02:18 UTC (rev 29896)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/AddPortletWizardPage.java 2011-03-17 23:02:50 UTC (rev 29897)
@@ -68,7 +68,7 @@
* @see org.eclipse.jem.util.ui.wizard.WTPWizardPage#getValidationPropertyNames()
*/
protected String[] getValidationPropertyNames() {
- return new String[] { DISPLAY_NAME, INIT_PARAM };
+ return new String[] { NAME, DISPLAY_NAME, INIT_PARAM };
}
protected Composite createTopLevelComposite(Composite parent) {
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassDataModelProvider.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassDataModelProvider.java 2011-03-17 23:02:18 UTC (rev 29896)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassDataModelProvider.java 2011-03-17 23:02:50 UTC (rev 29897)
@@ -2,12 +2,11 @@
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.SOURCE_FOLDER;
-
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -26,22 +25,17 @@
import org.eclipse.jem.util.logger.proxy.Logger;
import org.eclipse.jst.j2ee.internal.common.J2EECommonMessages;
import org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties;
-import org.eclipse.jst.j2ee.internal.common.operations.NewJavaClassDataModelProvider;
import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties;
import org.eclipse.jst.j2ee.internal.web.operations.NewServletClassDataModelProvider;
-import org.eclipse.jst.j2ee.internal.web.operations.NewServletClassOperation;
import org.eclipse.jst.j2ee.internal.web.operations.NewWebClassDataModelProvider;
-import org.eclipse.jst.j2ee.internal.web.operations.WebMessages;
-import org.eclipse.jst.j2ee.web.validation.UrlPattern;
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin;
import org.jboss.tools.portlet.operations.AddPortletOperation;
import org.jboss.tools.portlet.ui.INewPortletClassDataModelProperties;
import org.jboss.tools.portlet.ui.Messages;
+import org.jboss.tools.portlet.ui.PortletUIActivator;
/**
*
@@ -354,6 +348,24 @@
return validateSuperClassName(getStringProperty(propertyName));
}
+ if (propertyName.equals(NAME)) {
+ IProject project = (IProject) getProperty(PROJECT);
+ IFile portletFile = PortletUIActivator.getPortletXmlFile(project);
+ if (portletFile == null || !portletFile.exists()) {
+ return Status.OK_STATUS;
+ }
+ Set<String> portletNames = PortletUIActivator.getPortletNames(portletFile);
+ String name = getStringProperty(NAME);
+ if (name != null) {
+ name = name.trim();
+ }
+ if (portletNames.contains(name)) {
+ IStatus status = new Status(IStatus.ERROR, PortletUIActivator.PLUGIN_ID,
+ NLS.bind(Messages.NewPortletClassDataModelProvider_The_portlet_already_exists, name));
+ return status;
+ }
+ return Status.OK_STATUS;
+ }
if ((isJSFPortlet || isSeamPortlet) && propertyName.equals(CLASS_NAME)) {
if (getStringProperty(propertyName).length()!=0) {
return Status.OK_STATUS;
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/messages.properties
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/messages.properties 2011-03-17 23:02:18 UTC (rev 29896)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/messages.properties 2011-03-17 23:02:50 UTC (rev 29897)
@@ -40,6 +40,7 @@
NewJSFPortletClassWizardPage_Choose_a_Seam_portlet_class=Choose a Seam portlet class:
NewJSFPortletClassWizardPage_New_JSF_Portlet=New JSF Portlet
NewJSFPortletClassWizardPage_New_Seam_Portlet=New Seam Portlet
+NewPortletClassDataModelProvider_The_portlet_already_exists=The ''{0}'' portlet already exists.
NewPortletClassWizardPage_Choose_a_portlet_class=Choose a portlet class:
NewPortletClassWizardPage_New_Portlet=New Portlet
NewPortletClassWizardPage_Use_an_existing_Portlet_class=Use an existing Portlet class
15 years
JBoss Tools SVN: r29896 - branches/3.3.indigo/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-03-17 19:02:18 -0400 (Thu, 17 Mar 2011)
New Revision: 29896
Modified:
branches/3.3.indigo/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemBuffer.java
Log:
https://issues.jboss.org/browse/JBIDE-8549
Modified: branches/3.3.indigo/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemBuffer.java
===================================================================
--- branches/3.3.indigo/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemBuffer.java 2011-03-17 22:24:25 UTC (rev 29895)
+++ branches/3.3.indigo/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemBuffer.java 2011-03-17 23:02:18 UTC (rev 29896)
@@ -12,11 +12,8 @@
import java.io.File;
-import org.eclipse.core.internal.runtime.PlatformLogWriter;
import org.eclipse.core.runtime.ILogListener;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.adaptor.EclipseLog;
import org.eclipse.osgi.framework.log.FrameworkLog;
import org.jboss.tools.common.util.FileUtil;
import org.osgi.framework.Bundle;
@@ -29,14 +26,14 @@
ProblemBuffer() {}
- /**
- * IProblemReporter implementation.
- * @param status
- */
- public void writeToBuffer(IStatus status) {
- getEclipseLog();
- writer.logging(status, "org.jboss.tools.common"); //$NON-NLS-1$
- }
+// /**
+// * IProblemReporter implementation.
+// * @param status
+// */
+// public void writeToBuffer(IStatus status) {
+// getEclipseLog();
+// writer.logging(status, "org.jboss.tools.common"); //$NON-NLS-1$
+// }
/**
* Returns number of entries in .log file.
@@ -105,13 +102,13 @@
FrameworkLog log;
ILogListener writer;
- private FrameworkLog getEclipseLog() {
- if(log == null) {
- log = new EclipseLog(getLogFile());
- writer = new PlatformLogWriter(log);
- }
- return log;
- }
+// private FrameworkLog getEclipseLog() {
+// if(log == null) {
+// log = new EclipseLog(getLogFile());
+// writer = new PlatformLogWriter(log);
+// }
+// return log;
+// }
private File getLogFile() {
Bundle b = Platform.getBundle("org.jboss.tools.common"); //$NON-NLS-1$
15 years
JBoss Tools SVN: r29895 - branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-03-17 18:24:25 -0400 (Thu, 17 Mar 2011)
New Revision: 29895
Modified:
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
Log:
JBIDE-8567
https://issues.jboss.org/browse/JBIDE-8567
Modified: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2011-03-17 22:22:12 UTC (rev 29894)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2011-03-17 22:24:25 UTC (rev 29895)
@@ -16,6 +16,7 @@
<PAIR name="org.jboss.soa.esb.actions.Notifier" value="ESBPreActionNotifier"/>
<PAIR name="org.jboss.soa.esb.actions.StaticRouter" value="ESBPreActionStaticRouter"/>
<PAIR name="org.jboss.soa.esb.actions.StaticWiretap" value="ESBPreActionStaticWiretap"/>
+ <PAIR name="org.jboss.soa.esb.actions.SyncServiceInvoker" value="ESBPreActionSyncServiceInvoker"/>
<PAIR name="org.jboss.soa.esb.actions.SystemPrintln" value="ESBPreActionSystemPrintln"/>
<PAIR name="org.jboss.soa.esb.actions.converters.ByteArrayToString" value="ESBPreActionByteArrayToString"/>
<PAIR name="org.jboss.soa.esb.actions.converters.LongToDateConverter" value="ESBPreActionLongToDateConverter"/>
@@ -767,6 +768,15 @@
</Constraint>
<Editor name="ListString"/>
</XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=general"
+ name="rule agent properties" xmlname="ruleAgentProperties">
+ <Constraint loader="Tree">
+ <value name="ESBResourceTree"/>
+ <value name="extensions=properties"/>
+ <value name="linkAction=OpenRuleAgent"/>
+ </Constraint>
+ <Editor name="TreeChooser"/>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=general" name="process" xmlname="process">
<Constraint loader="ListString">
<value name="process"/>
@@ -788,6 +798,11 @@
ICON="action.empty"
PROPERTIES="actionpath=Open;attribute=rule language"
displayName="Open Rule Language" kind="action" name="OpenRuleLanguage"/>
+ <XActionItem
+ HandlerClassName="org.jboss.tools.esb.core.model.handlers.OpenESBResourceHandler"
+ ICON="action.empty"
+ PROPERTIES="actionpath=Open;attribute=rule agent properties"
+ displayName="Open Rule Agent Properties" kind="action" name="OpenRuleAgent"/>
<XActionItem kind="list" name="CreateActions">
<XActionItem
HandlerClassName="org.jboss.tools.esb.core.model.handlers.AddRouteToForCBRHandler"
@@ -2521,7 +2536,7 @@
<XDependencies/>
</XModelEntity>
<XModelEntity ImplementingClass="%ESB%"
- PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;formDependencies=org.jboss.tools.esb.ui.editor.attribute.adapter.RoutingFormDependency"
XMLSUBPATH="action" name="ESBPreActionSyncServiceInvoker120">
<XChildrenEntities>
<XChildEntity name="ESBProperty"/>
@@ -2543,9 +2558,15 @@
<Editor name="Uneditable"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced;pre=true;save=always"
- name="service category" xmlname="service-category"/>
+ name="service category" xmlname="service-category">
+ <Constraint loader="ListString"/>
+ <Editor name="ESBServiceCategoryList"/>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced;pre=true;save=always"
- name="service name" xmlname="service-name"/>
+ name="service name" xmlname="service-name">
+ <Constraint loader="ListString"/>
+ <Editor name="ESBServiceNameList"/>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=general;pre=true"
default="default(true)" name="fail on exception" xmlname="failOnException">
<Constraint loader="ListString">
@@ -3308,7 +3329,7 @@
</XModelEntity>
<XModelEntity
ImplementingClass="org.jboss.tools.esb.core.model.ESBRouteToImpl"
- PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;converter=route"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;converter=route;formDependencies=org.jboss.tools.esb.ui.editor.attribute.adapter.RoutingFormDependency"
XMLSUBPATH="route-to" name="ESBPreRouteTo">
<XChildrenEntities/>
<XEntityRenderer>
@@ -3323,9 +3344,15 @@
<XModelAttribute PROPERTIES="category=general"
name="destination name" xmlname="destination-name"/>
<XModelAttribute PROPERTIES="category=general"
- name="service category" xmlname="service-category"/>
+ name="service category" xmlname="service-category">
+ <Constraint loader="ListString"/>
+ <Editor name="ESBServiceCategoryList"/>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
- name="service name" xmlname="service-name"/>
+ name="service name" xmlname="service-name">
+ <Constraint loader="ListString"/>
+ <Editor name="ESBServiceNameList"/>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=general" name="expression" xmlname="expression"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
@@ -3373,7 +3400,7 @@
</XModelEntity>
<XModelEntity
ImplementingClass="org.jboss.tools.esb.core.model.ESBRouteToImpl"
- PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;converter=send"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;converter=send;formDependencies=org.jboss.tools.esb.ui.editor.attribute.adapter.RoutingFormDependency"
XMLSUBPATH="send-to" name="ESBPreSendTo">
<XChildrenEntities/>
<XEntityRenderer>
@@ -3388,8 +3415,14 @@
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
name="channel name" xmlname="channel-name"/>
<XModelAttribute PROPERTIES="category=general"
- name="service category" xmlname="service-category"/>
- <XModelAttribute PROPERTIES="category=general" name="service name" xmlname="service-name"/>
+ name="service category" xmlname="service-category">
+ <Constraint loader="ListString"/>
+ <Editor name="ESBServiceCategoryList"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="service name" xmlname="service-name">
+ <Constraint loader="ListString"/>
+ <Editor name="ESBServiceNameList"/>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=general" name="channel class" xmlname="channel-class">
<Editor name="AccessibleJava"/>
</XModelAttribute>
15 years
JBoss Tools SVN: r29894 - trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-03-17 18:22:12 -0400 (Thu, 17 Mar 2011)
New Revision: 29894
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
Log:
JBIDE-8567
https://issues.jboss.org/browse/JBIDE-8567
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2011-03-17 22:20:34 UTC (rev 29893)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2011-03-17 22:22:12 UTC (rev 29894)
@@ -16,6 +16,7 @@
<PAIR name="org.jboss.soa.esb.actions.Notifier" value="ESBPreActionNotifier"/>
<PAIR name="org.jboss.soa.esb.actions.StaticRouter" value="ESBPreActionStaticRouter"/>
<PAIR name="org.jboss.soa.esb.actions.StaticWiretap" value="ESBPreActionStaticWiretap"/>
+ <PAIR name="org.jboss.soa.esb.actions.SyncServiceInvoker" value="ESBPreActionSyncServiceInvoker"/>
<PAIR name="org.jboss.soa.esb.actions.SystemPrintln" value="ESBPreActionSystemPrintln"/>
<PAIR name="org.jboss.soa.esb.actions.converters.ByteArrayToString" value="ESBPreActionByteArrayToString"/>
<PAIR name="org.jboss.soa.esb.actions.converters.LongToDateConverter" value="ESBPreActionLongToDateConverter"/>
@@ -767,6 +768,15 @@
</Constraint>
<Editor name="ListString"/>
</XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=general"
+ name="rule agent properties" xmlname="ruleAgentProperties">
+ <Constraint loader="Tree">
+ <value name="ESBResourceTree"/>
+ <value name="extensions=properties"/>
+ <value name="linkAction=OpenRuleAgent"/>
+ </Constraint>
+ <Editor name="TreeChooser"/>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=general" name="process" xmlname="process">
<Constraint loader="ListString">
<value name="process"/>
@@ -788,6 +798,11 @@
ICON="action.empty"
PROPERTIES="actionpath=Open;attribute=rule language"
displayName="Open Rule Language" kind="action" name="OpenRuleLanguage"/>
+ <XActionItem
+ HandlerClassName="org.jboss.tools.esb.core.model.handlers.OpenESBResourceHandler"
+ ICON="action.empty"
+ PROPERTIES="actionpath=Open;attribute=rule agent properties"
+ displayName="Open Rule Agent Properties" kind="action" name="OpenRuleAgent"/>
<XActionItem kind="list" name="CreateActions">
<XActionItem
HandlerClassName="org.jboss.tools.esb.core.model.handlers.AddRouteToForCBRHandler"
@@ -2521,7 +2536,7 @@
<XDependencies/>
</XModelEntity>
<XModelEntity ImplementingClass="%ESB%"
- PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;formDependencies=org.jboss.tools.esb.ui.editor.attribute.adapter.RoutingFormDependency"
XMLSUBPATH="action" name="ESBPreActionSyncServiceInvoker120">
<XChildrenEntities>
<XChildEntity name="ESBProperty"/>
@@ -2543,9 +2558,15 @@
<Editor name="Uneditable"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced;pre=true;save=always"
- name="service category" xmlname="service-category"/>
+ name="service category" xmlname="service-category">
+ <Constraint loader="ListString"/>
+ <Editor name="ESBServiceCategoryList"/>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced;pre=true;save=always"
- name="service name" xmlname="service-name"/>
+ name="service name" xmlname="service-name">
+ <Constraint loader="ListString"/>
+ <Editor name="ESBServiceNameList"/>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=general;pre=true"
default="default(true)" name="fail on exception" xmlname="failOnException">
<Constraint loader="ListString">
@@ -3308,7 +3329,7 @@
</XModelEntity>
<XModelEntity
ImplementingClass="org.jboss.tools.esb.core.model.ESBRouteToImpl"
- PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;converter=route"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;converter=route;formDependencies=org.jboss.tools.esb.ui.editor.attribute.adapter.RoutingFormDependency"
XMLSUBPATH="route-to" name="ESBPreRouteTo">
<XChildrenEntities/>
<XEntityRenderer>
@@ -3323,9 +3344,15 @@
<XModelAttribute PROPERTIES="category=general"
name="destination name" xmlname="destination-name"/>
<XModelAttribute PROPERTIES="category=general"
- name="service category" xmlname="service-category"/>
+ name="service category" xmlname="service-category">
+ <Constraint loader="ListString"/>
+ <Editor name="ESBServiceCategoryList"/>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
- name="service name" xmlname="service-name"/>
+ name="service name" xmlname="service-name">
+ <Constraint loader="ListString"/>
+ <Editor name="ESBServiceNameList"/>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=general" name="expression" xmlname="expression"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
@@ -3373,7 +3400,7 @@
</XModelEntity>
<XModelEntity
ImplementingClass="org.jboss.tools.esb.core.model.ESBRouteToImpl"
- PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;converter=send"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;converter=send;formDependencies=org.jboss.tools.esb.ui.editor.attribute.adapter.RoutingFormDependency"
XMLSUBPATH="send-to" name="ESBPreSendTo">
<XChildrenEntities/>
<XEntityRenderer>
@@ -3388,8 +3415,14 @@
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
name="channel name" xmlname="channel-name"/>
<XModelAttribute PROPERTIES="category=general"
- name="service category" xmlname="service-category"/>
- <XModelAttribute PROPERTIES="category=general" name="service name" xmlname="service-name"/>
+ name="service category" xmlname="service-category">
+ <Constraint loader="ListString"/>
+ <Editor name="ESBServiceCategoryList"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="service name" xmlname="service-name">
+ <Constraint loader="ListString"/>
+ <Editor name="ESBServiceNameList"/>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=general" name="channel class" xmlname="channel-class">
<Editor name="AccessibleJava"/>
</XModelAttribute>
15 years
JBoss Tools SVN: r29893 - in branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui: src/org/jboss/tools/esb/ui/editor/attribute/adapter and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-03-17 18:20:34 -0400 (Thu, 17 Mar 2011)
New Revision: 29893
Added:
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/RoutingFormDependency.java
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceCategoryListAdapter.java
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceNameListAdapter.java
Modified:
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/plugin.xml
Log:
JBIDE-8567
https://issues.jboss.org/browse/JBIDE-8567
Modified: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/plugin.xml
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/plugin.xml 2011-03-17 22:16:09 UTC (rev 29892)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/plugin.xml 2011-03-17 22:20:34 UTC (rev 29893)
@@ -56,14 +56,20 @@
<xclass id="org.jboss.tools.esb.ui.wizard.NewActionWizard"
class="org.jboss.tools.esb.ui.wizard.NewActionWizard"/>
+ <xclass id="org.jboss.tools.esb.ui.editor.attribute.adapter.RoutingFormDependency"
+ class="org.jboss.tools.esb.ui.editor.attribute.adapter.RoutingFormDependency"/>
</extension>
<extension point="org.jboss.tools.common.model.ui.attributeAdapter">
<attributeAdapter class="org.jboss.tools.esb.ui.editor.attribute.adapter.BusListAdapter" id="ESBBusList"/>
+ <attributeAdapter class="org.jboss.tools.esb.ui.editor.attribute.adapter.ServiceCategoryListAdapter" id="ESBServiceCategoryList"/>
+ <attributeAdapter class="org.jboss.tools.esb.ui.editor.attribute.adapter.ServiceNameListAdapter" id="ESBServiceNameList"/>
</extension>
<extension point="org.jboss.tools.common.model.ui.attributeEditor">
<attributeEditor class="org.jboss.tools.common.model.ui.attribute.editor.ComboBoxEditor" id="ESBBusList"/>
+ <attributeEditor class="org.jboss.tools.common.model.ui.attribute.editor.ComboBoxEditor" id="ESBServiceCategoryList"/>
+ <attributeEditor class="org.jboss.tools.common.model.ui.attribute.editor.ComboBoxEditor" id="ESBServiceNameList"/>
</extension>
Added: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/RoutingFormDependency.java
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/RoutingFormDependency.java (rev 0)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/RoutingFormDependency.java 2011-03-17 22:20:34 UTC (rev 29893)
@@ -0,0 +1,38 @@
+package org.jboss.tools.esb.ui.editor.attribute.adapter;
+
+import java.beans.PropertyChangeEvent;
+
+import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.common.model.ui.attribute.XAttributeSupport;
+import org.jboss.tools.common.model.ui.attribute.XAttributeSupport.IAttributeDependency;
+import org.jboss.tools.common.model.ui.attribute.editor.ComboBoxFieldEditor;
+import org.jboss.tools.common.model.ui.attribute.editor.IPropertyEditor;
+
+public class RoutingFormDependency implements IAttributeDependency {
+ XAttributeSupport support;
+
+ public RoutingFormDependency() {}
+
+ public void setSupport(XAttributeSupport support) {
+ this.support = support;
+ }
+
+ public void propertyChange(PropertyChangeEvent evt) {
+ Object source = evt.getSource();
+ if(source instanceof ServiceCategoryListAdapter) {
+ final ComboBoxFieldEditor f = (ComboBoxFieldEditor)support.getFieldEditorByName("service name");
+ if(f == null) return;
+ final PropertyChangeEvent evt1 = new PropertyChangeEvent(this, IPropertyEditor.LIST_CONTENT, "old", "new");
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ ComboBoxFieldEditor f1 = (ComboBoxFieldEditor)support.getFieldEditorByName("service category");
+ if(f1 == null) return;
+ f.propertyChange(evt1);
+ f1.setFocusAndKeepSelection();
+ }
+ });
+ }
+
+ }
+
+}
Property changes on: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/RoutingFormDependency.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceCategoryListAdapter.java
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceCategoryListAdapter.java (rev 0)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceCategoryListAdapter.java 2011-03-17 22:20:34 UTC (rev 29893)
@@ -0,0 +1,45 @@
+package org.jboss.tools.esb.ui.editor.attribute.adapter;
+
+import java.util.TreeSet;
+
+import org.jboss.tools.common.meta.XAttribute;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.ui.attribute.IListContentProvider;
+import org.jboss.tools.common.model.ui.attribute.adapter.DefaultComboBoxValueAdapter;
+import org.jboss.tools.common.model.ui.attribute.adapter.DefaultXAttributeListContentProvider;
+import org.jboss.tools.esb.core.model.ESBConstants;
+
+public class ServiceCategoryListAdapter extends DefaultComboBoxValueAdapter {
+
+ protected IListContentProvider createListContentProvider(XAttribute attribute) {
+ ServiceCategoryListContentProvider p = new ServiceCategoryListContentProvider();
+ p.setContext(modelObject);
+ p.setAttribute(attribute);
+ return p;
+ }
+
+}
+
+class ServiceCategoryListContentProvider extends DefaultXAttributeListContentProvider {
+ private XModelObject context;
+
+ public void setContext(XModelObject context) {
+ this.context = context;
+ }
+
+ protected void loadTags() {
+ XModelObject f = context;
+ while(f != null && f.getFileType() != XModelObject.FILE) f = f.getParent();
+ if(f == null) return;
+ XModelObject servicesFolder = f.getChildByPath("Services");
+ if(servicesFolder == null) return;
+ TreeSet<String> set = new TreeSet<String>();
+ XModelObject[] services = servicesFolder.getChildren();
+ for (int i = 0; i < services.length; i++) {
+ set.add(services[i].getAttributeValue("category"));
+ }
+ tags = set.toArray(new String[0]);
+ }
+
+}
+
Property changes on: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceCategoryListAdapter.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceNameListAdapter.java
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceNameListAdapter.java (rev 0)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceNameListAdapter.java 2011-03-17 22:20:34 UTC (rev 29893)
@@ -0,0 +1,67 @@
+package org.jboss.tools.esb.ui.editor.attribute.adapter;
+
+import java.util.TreeSet;
+
+import org.jboss.tools.common.meta.XAttribute;
+import org.jboss.tools.common.meta.action.XAttributeData;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.ui.attribute.IListContentProvider;
+import org.jboss.tools.common.model.ui.attribute.adapter.DefaultComboBoxValueAdapter;
+import org.jboss.tools.common.model.ui.attribute.adapter.DefaultXAttributeListContentProvider;
+import org.jboss.tools.esb.core.model.ESBConstants;
+
+public class ServiceNameListAdapter extends DefaultComboBoxValueAdapter {
+
+ protected IListContentProvider createListContentProvider(XAttribute attribute) {
+ ServiceNameListContentProvider p = new ServiceNameListContentProvider();
+ p.setContext(modelObject);
+ p.setAttribute(attribute);
+ p.setData(this.attributeData);
+ return p;
+ }
+
+}
+
+class ServiceNameListContentProvider extends DefaultXAttributeListContentProvider {
+ static String ATTR_SERVICE_CATEGORY = "service category";
+ private XModelObject context;
+ XAttributeData data;
+
+ public void setContext(XModelObject context) {
+ this.context = context;
+ }
+
+ public void setData(XAttributeData data) {
+ this.data = data;
+ }
+
+ protected void loadTags() {
+ XModelObject f = context;
+ while(f != null && f.getFileType() != XModelObject.FILE) f = f.getParent();
+ if(f == null) return;
+ XModelObject servicesFolder = f.getChildByPath("Services");
+ if(servicesFolder == null) return;
+ String category = getCategory();
+ if(category != null && category.trim().length() == 0) category = null;
+ TreeSet<String> set = new TreeSet<String>();
+ XModelObject[] services = servicesFolder.getChildren();
+ for (int i = 0; i < services.length; i++) {
+ if(category != null && !services[i].getAttributeValue("category").equals(category)) {
+ continue;
+ }
+ set.add(services[i].getAttributeValue("name"));
+ }
+ tags = set.toArray(new String[0]);
+ }
+
+ String getCategory() {
+ if(data != null) {
+ return data.getEntityData().getValue(ATTR_SERVICE_CATEGORY);
+ } else if(context != null && context.getModelEntity().getAttribute(ATTR_SERVICE_CATEGORY) != null) {
+ return context.getAttributeValue(ATTR_SERVICE_CATEGORY);
+ }
+ return ATTR_SERVICE_CATEGORY;
+ }
+
+}
+
Property changes on: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceNameListAdapter.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
15 years
JBoss Tools SVN: r29892 - in trunk/esb/plugins/org.jboss.tools.esb.ui: src/org/jboss/tools/esb/ui/editor/attribute/adapter and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-03-17 18:16:09 -0400 (Thu, 17 Mar 2011)
New Revision: 29892
Added:
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/RoutingFormDependency.java
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceCategoryListAdapter.java
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceNameListAdapter.java
Modified:
trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml
Log:
JBIDE-8567
https://issues.jboss.org/browse/JBIDE-8567
Modified: trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml 2011-03-17 22:14:22 UTC (rev 29891)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml 2011-03-17 22:16:09 UTC (rev 29892)
@@ -56,14 +56,20 @@
<xclass id="org.jboss.tools.esb.ui.wizard.NewActionWizard"
class="org.jboss.tools.esb.ui.wizard.NewActionWizard"/>
+ <xclass id="org.jboss.tools.esb.ui.editor.attribute.adapter.RoutingFormDependency"
+ class="org.jboss.tools.esb.ui.editor.attribute.adapter.RoutingFormDependency"/>
</extension>
<extension point="org.jboss.tools.common.model.ui.attributeAdapter">
<attributeAdapter class="org.jboss.tools.esb.ui.editor.attribute.adapter.BusListAdapter" id="ESBBusList"/>
+ <attributeAdapter class="org.jboss.tools.esb.ui.editor.attribute.adapter.ServiceCategoryListAdapter" id="ESBServiceCategoryList"/>
+ <attributeAdapter class="org.jboss.tools.esb.ui.editor.attribute.adapter.ServiceNameListAdapter" id="ESBServiceNameList"/>
</extension>
<extension point="org.jboss.tools.common.model.ui.attributeEditor">
<attributeEditor class="org.jboss.tools.common.model.ui.attribute.editor.ComboBoxEditor" id="ESBBusList"/>
+ <attributeEditor class="org.jboss.tools.common.model.ui.attribute.editor.ComboBoxEditor" id="ESBServiceCategoryList"/>
+ <attributeEditor class="org.jboss.tools.common.model.ui.attribute.editor.ComboBoxEditor" id="ESBServiceNameList"/>
</extension>
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/RoutingFormDependency.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/RoutingFormDependency.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/RoutingFormDependency.java 2011-03-17 22:16:09 UTC (rev 29892)
@@ -0,0 +1,38 @@
+package org.jboss.tools.esb.ui.editor.attribute.adapter;
+
+import java.beans.PropertyChangeEvent;
+
+import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.common.model.ui.attribute.XAttributeSupport;
+import org.jboss.tools.common.model.ui.attribute.XAttributeSupport.IAttributeDependency;
+import org.jboss.tools.common.model.ui.attribute.editor.ComboBoxFieldEditor;
+import org.jboss.tools.common.model.ui.attribute.editor.IPropertyEditor;
+
+public class RoutingFormDependency implements IAttributeDependency {
+ XAttributeSupport support;
+
+ public RoutingFormDependency() {}
+
+ public void setSupport(XAttributeSupport support) {
+ this.support = support;
+ }
+
+ public void propertyChange(PropertyChangeEvent evt) {
+ Object source = evt.getSource();
+ if(source instanceof ServiceCategoryListAdapter) {
+ final ComboBoxFieldEditor f = (ComboBoxFieldEditor)support.getFieldEditorByName("service name");
+ if(f == null) return;
+ final PropertyChangeEvent evt1 = new PropertyChangeEvent(this, IPropertyEditor.LIST_CONTENT, "old", "new");
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ ComboBoxFieldEditor f1 = (ComboBoxFieldEditor)support.getFieldEditorByName("service category");
+ if(f1 == null) return;
+ f.propertyChange(evt1);
+ f1.setFocusAndKeepSelection();
+ }
+ });
+ }
+
+ }
+
+}
Property changes on: trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/RoutingFormDependency.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceCategoryListAdapter.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceCategoryListAdapter.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceCategoryListAdapter.java 2011-03-17 22:16:09 UTC (rev 29892)
@@ -0,0 +1,45 @@
+package org.jboss.tools.esb.ui.editor.attribute.adapter;
+
+import java.util.TreeSet;
+
+import org.jboss.tools.common.meta.XAttribute;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.ui.attribute.IListContentProvider;
+import org.jboss.tools.common.model.ui.attribute.adapter.DefaultComboBoxValueAdapter;
+import org.jboss.tools.common.model.ui.attribute.adapter.DefaultXAttributeListContentProvider;
+import org.jboss.tools.esb.core.model.ESBConstants;
+
+public class ServiceCategoryListAdapter extends DefaultComboBoxValueAdapter {
+
+ protected IListContentProvider createListContentProvider(XAttribute attribute) {
+ ServiceCategoryListContentProvider p = new ServiceCategoryListContentProvider();
+ p.setContext(modelObject);
+ p.setAttribute(attribute);
+ return p;
+ }
+
+}
+
+class ServiceCategoryListContentProvider extends DefaultXAttributeListContentProvider {
+ private XModelObject context;
+
+ public void setContext(XModelObject context) {
+ this.context = context;
+ }
+
+ protected void loadTags() {
+ XModelObject f = context;
+ while(f != null && f.getFileType() != XModelObject.FILE) f = f.getParent();
+ if(f == null) return;
+ XModelObject servicesFolder = f.getChildByPath("Services");
+ if(servicesFolder == null) return;
+ TreeSet<String> set = new TreeSet<String>();
+ XModelObject[] services = servicesFolder.getChildren();
+ for (int i = 0; i < services.length; i++) {
+ set.add(services[i].getAttributeValue("category"));
+ }
+ tags = set.toArray(new String[0]);
+ }
+
+}
+
Property changes on: trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceCategoryListAdapter.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceNameListAdapter.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceNameListAdapter.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceNameListAdapter.java 2011-03-17 22:16:09 UTC (rev 29892)
@@ -0,0 +1,67 @@
+package org.jboss.tools.esb.ui.editor.attribute.adapter;
+
+import java.util.TreeSet;
+
+import org.jboss.tools.common.meta.XAttribute;
+import org.jboss.tools.common.meta.action.XAttributeData;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.ui.attribute.IListContentProvider;
+import org.jboss.tools.common.model.ui.attribute.adapter.DefaultComboBoxValueAdapter;
+import org.jboss.tools.common.model.ui.attribute.adapter.DefaultXAttributeListContentProvider;
+import org.jboss.tools.esb.core.model.ESBConstants;
+
+public class ServiceNameListAdapter extends DefaultComboBoxValueAdapter {
+
+ protected IListContentProvider createListContentProvider(XAttribute attribute) {
+ ServiceNameListContentProvider p = new ServiceNameListContentProvider();
+ p.setContext(modelObject);
+ p.setAttribute(attribute);
+ p.setData(this.attributeData);
+ return p;
+ }
+
+}
+
+class ServiceNameListContentProvider extends DefaultXAttributeListContentProvider {
+ static String ATTR_SERVICE_CATEGORY = "service category";
+ private XModelObject context;
+ XAttributeData data;
+
+ public void setContext(XModelObject context) {
+ this.context = context;
+ }
+
+ public void setData(XAttributeData data) {
+ this.data = data;
+ }
+
+ protected void loadTags() {
+ XModelObject f = context;
+ while(f != null && f.getFileType() != XModelObject.FILE) f = f.getParent();
+ if(f == null) return;
+ XModelObject servicesFolder = f.getChildByPath("Services");
+ if(servicesFolder == null) return;
+ String category = getCategory();
+ if(category != null && category.trim().length() == 0) category = null;
+ TreeSet<String> set = new TreeSet<String>();
+ XModelObject[] services = servicesFolder.getChildren();
+ for (int i = 0; i < services.length; i++) {
+ if(category != null && !services[i].getAttributeValue("category").equals(category)) {
+ continue;
+ }
+ set.add(services[i].getAttributeValue("name"));
+ }
+ tags = set.toArray(new String[0]);
+ }
+
+ String getCategory() {
+ if(data != null) {
+ return data.getEntityData().getValue(ATTR_SERVICE_CATEGORY);
+ } else if(context != null && context.getModelEntity().getAttribute(ATTR_SERVICE_CATEGORY) != null) {
+ return context.getAttributeValue(ATTR_SERVICE_CATEGORY);
+ }
+ return ATTR_SERVICE_CATEGORY;
+ }
+
+}
+
Property changes on: trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/editor/attribute/adapter/ServiceNameListAdapter.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
15 years