JBoss Tools SVN: r3142 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-15 09:02:34 -0400 (Wed, 15 Aug 2007)
New Revision: 3142
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XModelObjectIcon.java
Log:
JBIDE-781
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XModelObjectIcon.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XModelObjectIcon.java 2007-08-15 12:57:43 UTC (rev 3141)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XModelObjectIcon.java 2007-08-15 13:02:34 UTC (rev 3142)
@@ -131,6 +131,7 @@
} else {
XModelObjectIcon.components.put(key, c);
}
+ imageComponent = c;
} catch (Exception e) {
///XStudioPlugin.getDefault().getLog().log(new Status(Status.ERROR, XStudioPlugin.PLUGIN_ID, Status.OK, "Cannot load icon " + keys[i] + " " + v,e));
XModelObjectIcon.components.remove(key);
18 years, 8 months
JBoss Tools SVN: r3141 - in trunk/documentation/GettingStartedGuide/docs/userguide/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-08-15 08:57:43 -0400 (Wed, 15 Aug 2007)
New Revision: 3141
Added:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/SeamNewProj08.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile2.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile3.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile4.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile5.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile6.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile7.png
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/SeamJsfEditor.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/SeamNewProj04.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GetStartSeamGen.xml
Log:
http://jira.jboss.com/jira/browse/EXIN-447 remade screen-shots in this chapter, updated textual context
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/SeamJsfEditor.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/SeamNewProj04.png
===================================================================
(Binary files differ)
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/SeamNewProj08.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/SeamNewProj08.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile2.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile3.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile4.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile5.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile6.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile6.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile7.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionprofile7.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GetStartSeamGen.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GetStartSeamGen.xml 2007-08-15 12:50:18 UTC (rev 3140)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GetStartSeamGen.xml 2007-08-15 12:57:43 UTC (rev 3141)
@@ -53,10 +53,14 @@
</mediaobject>
</figure>
- <para>Since you selected JPA and JSF tooling support, the project needs to incorporate the JAR files for those frameworks on its classpath. In the next two screens, you will be able to select where those library JARs come from. The easiest is just to select the JARs provided by the JBoss AS runtime associated with this project. That is why it is important to chose the right JBoss AS 4.2 runtime in the project setup window.</para>
- <para>Ignore the database selection for now since we do not use an external database in this simple application. We can still use the embedded HSQL DB inside JBoss AS for development / testing purposes, as we will see soon.</para>
+ <para>Now you need to define a connection profile and choose a database. If you have no connections yet you should create the one.</para>
+ <orderedlist>
+ <listitem><para>Click "Add connection" link in the panel Connection.</para></listitem>
+ <listitem><para>Choose HSQLDB Connection Profile.</para></listitem>
+ <listitem><para>Give a name to your connection and some description. Click Next.</para></listitem>
+ </orderedlist>
<figure>
<title>Select provider for JPA JARs</title>
<mediaobject>
@@ -65,12 +69,99 @@
</imageobject>
</mediaobject>
</figure>
+ <figure>
+ <title>Give a name to connection profile</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/connectionprofile.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Now you need to specify driver and connection details.</para>
<figure>
+ <title>Give a name to connection profile</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/connectionprofile2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <orderedlist continuation="continues">
+ <listitem><para>Click the Browse button near driver selection drop down list.</para></listitem>
+ <listitem><para>In the next dialog select Add button.</para></listitem>
+ <listitem><para>Select Hypersonic database: Hypersonic > 1.8 > Hypersonic DB.</para></listitem>
+ </orderedlist>
+
+ <figure>
+ <title>Select database</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/connectionprofile3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You should make wizard to know where the driver is located.</para>
+ <figure>
+ <title>Add driver</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/connectionprofile4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <orderedlist continuation="continues">
+ <listitem><para>Select hsqldb.jar in Driver File panel and click the button Remove jar/Zip.</para></listitem>
+ <listitem><para>Select Add jar/Zip.</para></listitem>
+ <listitem><para>Select hsqldb driver which is located in jboss-eap > jboss-as > server > default > lib folder of RHDS installation.</para></listitem>
+ </orderedlist>
+ <figure>
+ <title>Adding driver</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/connectionprofile5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <orderedlist continuation="continues">
+ <listitem><para>Click OK, then click OK again. You will see a database added in wizard window.</para></listitem>
+ </orderedlist>
+
+ <figure>
+ <title>Database added</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/connectionprofile6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <orderedlist continuation="continues">
+ <listitem><para>Select Next to procede further. A summary diallog will be prompted.</para></listitem>
+ </orderedlist>
+
+ <figure>
+ <title>Summary window</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/connectionprofile7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <orderedlist continuation="continues">
+ <listitem><para>Click Finish button. Connection profile will be added. Click Finish again.</para></listitem>
+ </orderedlist>
+ <para>Since you selected JPA and JSF tooling support, the project needs to incorporate the JAR files for those frameworks on its classpath. In the next two screens, you will be able to select where those library JARs come from. The easiest is just to select the JARs provided by the JBoss AS runtime associated with this project. That is why it is important to chose the right JBoss AS 4.2 runtime in the project setup window.</para>
+
+ <figure>
<title>Select provider for JSF JARs</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/SeamNewProj05.png"/>
+ <imagedata fileref="images/SeamNewProj08.png"/>
</imageobject>
</mediaobject>
</figure>
18 years, 8 months
JBoss Tools SVN: r3140 - in trunk/common/plugins/org.jboss.tools.common.model: resources/meta and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-15 08:50:18 -0400 (Wed, 15 Aug 2007)
New Revision: 3140
Added:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/DeleteGroupHandler.java
Modified:
trunk/common/plugins/org.jboss.tools.common.model/plugin.xml
trunk/common/plugins/org.jboss.tools.common.model/resources/meta/studio_page.meta
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/SharableElementImpl.java
Log:
JBIDE-704
Modified: trunk/common/plugins/org.jboss.tools.common.model/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/plugin.xml 2007-08-15 10:58:55 UTC (rev 3139)
+++ trunk/common/plugins/org.jboss.tools.common.model/plugin.xml 2007-08-15 12:50:18 UTC (rev 3140)
@@ -311,6 +311,8 @@
class="org.jboss.tools.common.model.options.impl.SharableElementImpl"/>
<xclass id="org.jboss.tools.common.model.options.impl.SharableStudioImpl"
class="org.jboss.tools.common.model.options.impl.SharableStudioImpl"/>
+ <xclass id="org.jboss.tools.common.model.options.impl.DeleteGroupHandler"
+ class="org.jboss.tools.common.model.options.impl.DeleteGroupHandler"/>
<xclass id="org.jboss.tools.common.model.project.ClassPathUpdateWizard"
class="org.jboss.tools.common.model.project.ClassPathUpdateWizard"/>
<xclass id="org.jboss.tools.common.model.project.WatcherLoader"
Modified: trunk/common/plugins/org.jboss.tools.common.model/resources/meta/studio_page.meta
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/resources/meta/studio_page.meta 2007-08-15 10:58:55 UTC (rev 3139)
+++ trunk/common/plugins/org.jboss.tools.common.model/resources/meta/studio_page.meta 2007-08-15 12:50:18 UTC (rev 3140)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE XModelEntityGroup PUBLIC "-//Red Hat, Inc.//DTD Meta 1.0//EN" "meta.dtd">
+<!DOCTYPE XModelEntityGroup PUBLIC "-//Red Hat, Inc.//DTD Meta 1.0//EN"
+ "meta.dtd">
<XModelEntityGroup>
<VERSION MODULE="Model" VERSION="1.0"/>
<MAPPINGS/>
@@ -92,7 +93,7 @@
</XActionItem>
<XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
<XActionItem BaseActionName="Delete"
- HandlerClassName="org.jboss.tools.common.meta.action.impl.handlers.DefaultRemoveHandler"
+ HandlerClassName="org.jboss.tools.common.model.options.impl.DeleteGroupHandler"
ICON="action.delete" displayName="Delete" kind="action" name="Delete"/>
</XActionItem>
<XActionItem ICON="action.empty" kind="list" name="Properties">
@@ -210,7 +211,7 @@
</XActionItem>
<XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
<XActionItem BaseActionName="Delete"
- HandlerClassName="org.jboss.tools.common.meta.action.impl.handlers.DefaultRemoveHandler"
+ HandlerClassName="org.jboss.tools.common.model.options.impl.DeleteGroupHandler"
ICON="action.delete" displayName="Delete" kind="action" name="Delete"/>
</XActionItem>
<XActionItem ICON="action.empty" kind="list" name="Properties">
Added: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/DeleteGroupHandler.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/DeleteGroupHandler.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/DeleteGroupHandler.java 2007-08-15 12:50:18 UTC (rev 3140)
@@ -0,0 +1,20 @@
+package org.jboss.tools.common.model.options.impl;
+
+import org.jboss.tools.common.meta.action.impl.handlers.DefaultRemoveHandler;
+import org.jboss.tools.common.model.XModelObject;
+
+public class DeleteGroupHandler extends DefaultRemoveHandler {
+
+ public DeleteGroupHandler() {}
+
+ public boolean isEnabled(XModelObject object) {
+ if(!super.isEnabled(object)) return false;
+ if(!(object instanceof SharableElementImpl)) return false;
+ SharableElementImpl e = (SharableElementImpl)object;
+ String name = e.getAttributeValue("name");
+ if(!(e.getParent() instanceof SharableElementImpl)) return false;
+ SharableElementImpl p = (SharableElementImpl)e.getParent();
+ return p.canRemoveChild(name);
+ }
+
+}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/SharableElementImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/SharableElementImpl.java 2007-08-15 10:58:55 UTC (rev 3139)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/SharableElementImpl.java 2007-08-15 12:50:18 UTC (rev 3140)
@@ -134,15 +134,21 @@
}
public void removeSharableChild(String name) {
+ if(canRemoveChild(name)) {
+ children.remove(name);
+ }
+ }
+
+ public boolean canRemoveChild(String name) {
SharableElementImpl s = (SharableElementImpl)children.get(name);
- if(s == null) return;
+ if(s == null) return false;
for (int i = 0; i < LIST.length; i++) {
XScope sc = s.getXScope(LIST[i]);
if(sc.exists() &&
!XStudioLoaderPeer.instance().isScopeEditable(LIST[i]))
- return;
+ return false;
}
- children.remove(name);
+ return true;
}
public SharableElement findSharableChild(String childname) {
18 years, 8 months
JBoss Tools SVN: r3139 - trunk/common/plugins/org.jboss.tools.common.text.ext.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-15 06:58:55 -0400 (Wed, 15 Aug 2007)
New Revision: 3139
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml
Log:
JBIDE-644
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml 2007-08-15 10:07:53 UTC (rev 3138)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml 2007-08-15 10:58:55 UTC (rev 3139)
@@ -29,6 +29,9 @@
<contentType id="org.eclipse.core.runtime.xml">
<partitionType id="org.eclipse.wst.xml.XML_DEFAULT"/>
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.eclipse.wst.xml.XML_DEFAULT"/>
+ </contentType>
</hyperlinkPartitioner>
<hyperlinkPartitioner
@@ -63,6 +66,9 @@
<contentType id="org.eclipse.jst.j2ee.webDD">
<partitionType id="org.jboss.tools.common.text.ext.xml.XML_ROOT" />
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_ROOT" />
+ </contentType>
</hyperlinkPartitioner>
<hyperlinkPartitioner
@@ -83,6 +89,9 @@
<contentType id="org.eclipse.jst.j2ee.webDD">
<partitionType id="org.jboss.tools.common.text.ext.xml.XML_ROOT" />
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_ROOT" />
+ </contentType>
</hyperlinkPartitioner>
<hyperlinkPartitioner
@@ -103,6 +112,9 @@
<contentType id="org.eclipse.jst.j2ee.webDD">
<partitionType id="org.jboss.tools.common.text.ext.xml.XML_ROOT" />
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_ROOT" />
+ </contentType>
</hyperlinkPartitioner>
<hyperlinkPartitioner
@@ -123,6 +135,9 @@
<contentType id="org.eclipse.jst.j2ee.webDD">
<partitionType id="org.jboss.tools.common.text.ext.xml.XML_ELEMENT" />
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_ELEMENT" />
+ </contentType>
</hyperlinkPartitioner>
<hyperlinkPartitioner
@@ -143,6 +158,9 @@
<contentType id="org.eclipse.jst.j2ee.webDD">
<partitionType id="org.jboss.tools.common.text.ext.xml.XML_ELEMENT" />
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_ELEMENT" />
+ </contentType>
</hyperlinkPartitioner>
<hyperlinkPartitioner
@@ -170,6 +188,9 @@
<partitionType id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
</partitionType>
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE" />
+ </contentType>
</hyperlinkPartitioner>
<!-- End of Common XML hyperlink partitioners -->
@@ -416,6 +437,29 @@
<!-- Web.xml -->
</partitionType>
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_TEXT">
+ <!-- Web.xml -->
+ <axis path="/web-app/env-entry/env-entry-type/" />
+ <axis path="/web-app/error-page/exception-type/" />
+ <axis path="/web-app/filter/filter-class/" />
+ <axis path="/web-app/servlet/servlet-class/" />
+ <axis path="/web-app/listener/listener-class/" />
+ <axis path="/web-app/resource-env-ref/resource-env-ref-type/" />
+ <!-- Web.xml -->
+
+ <!-- TLD Files -->
+ <axis path="/taglib/validator/validator-class/" />
+ <axis path="/taglib/listener/listener-class/" />
+ <axis path="/taglib/tag/tag-class/" />
+ <axis path="/taglib/tag/tagclass/" />
+ <axis path="/taglib/tag/tei-class/" />
+ <axis path="/taglib/tag/teiclass/" />
+ <axis path="/taglib/tag/variable/variable-class/" />
+ <axis path="/taglib/tag/attribute/type/" />
+ <!-- TLD Files -->
+ </partitionType>
+ </contentType>
</hyperlinkPartitioner>
<!-- End of Web.xml and/or TLD files hyperlink partitioners -->
@@ -438,6 +482,11 @@
<axis path="/web-app/filter-mapping/filter-name/" />
</partitionType>
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_TEXT">
+ <axis path="/web-app/filter-mapping/filter-name/" />
+ </partitionType>
+ </contentType>
</hyperlinkPartitioner>
<hyperlinkPartitioner
@@ -461,6 +510,12 @@
<axis path="/web-app/servlet-mapping/servlet-name/" />
</partitionType>
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_TEXT">
+ <axis path="/web-app/filter-mapping/servlet-name/" />
+ <axis path="/web-app/servlet-mapping/servlet-name/" />
+ </partitionType>
+ </contentType>
</hyperlinkPartitioner>
<hyperlinkPartitioner
@@ -487,6 +542,13 @@
<axis path="/web-app/security-constraint/auth-constraint/role-name/" />
</partitionType>
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_TEXT">
+ <axis path="/web-app/servlet/security-role-ref/role-link/" />
+ <axis path="/web-app/servlet/run-as/role-name/" />
+ <axis path="/web-app/security-constraint/auth-constraint/role-name/" />
+ </partitionType>
+ </contentType>
</hyperlinkPartitioner>
<!-- End of Web.xml file hyperlink partitioners -->
@@ -509,6 +571,11 @@
<axis path="/taglib/tag/variable/name-from-attribute/" />
</partitionType>
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_TEXT">
+ <axis path="/taglib/tag/variable/name-from-attribute/" />
+ </partitionType>
+ </contentType>
</hyperlinkPartitioner>
<!-- End of TLD files hyperlink partitioners -->
</extension>
@@ -536,6 +603,9 @@
<contenttypeidentifier id="org.eclipse.jst.j2ee.webDD">
<partitiontype id="org.jboss.tools.common.text.ext.xml.XML_DOCTYPE" />
</contenttypeidentifier>
+ <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.XML_DOCTYPE" />
+ </contenttypeidentifier>
</hyperlink>
@@ -612,6 +682,9 @@
<contenttypeidentifier id="org.eclipse.jst.j2ee.webDD">
<partitiontype id="org.jboss.tools.common.text.ext.xml.XML_CLASS" />
</contenttypeidentifier>
+ <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.XML_CLASS" />
+ </contenttypeidentifier>
</hyperlink>
<hyperlink
@@ -640,6 +713,9 @@
<contenttypeidentifier id="org.eclipse.jst.j2ee.webDD">
<partitiontype id="org.jboss.tools.common.text.ext.xml.XML_XMLNS" />
</contenttypeidentifier>
+ <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.XML_XMLNS" />
+ </contenttypeidentifier>
</hyperlink>
<!-- Web.inf File -->
@@ -656,6 +732,9 @@
<contenttypeidentifier id="org.eclipse.jst.j2ee.webDD">
<partitiontype id="org.jboss.tools.common.text.ext.xml.XML_FILTER_NAME" />
</contenttypeidentifier>
+ <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.XML_FILTER_NAME" />
+ </contenttypeidentifier>
</hyperlink>
<hyperlink
@@ -670,6 +749,9 @@
<contenttypeidentifier id="org.eclipse.jst.j2ee.webDD">
<partitiontype id="org.jboss.tools.common.text.ext.xml.XML_ROLE_NAME" />
</contenttypeidentifier>
+ <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.XML_ROLE_NAME" />
+ </contenttypeidentifier>
</hyperlink>
<hyperlink
@@ -684,6 +766,9 @@
<contenttypeidentifier id="org.eclipse.jst.j2ee.webDD">
<partitiontype id="org.jboss.tools.common.text.ext.xml.XML_SERVLET_NAME" />
</contenttypeidentifier>
+ <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.XML_SERVLET_NAME" />
+ </contenttypeidentifier>
</hyperlink>
<!-- Web.inf File -->
@@ -700,6 +785,9 @@
<contenttypeidentifier id="org.eclipse.core.runtime.xml">
<partitiontype id="org.jboss.tools.common.text.ext.tld.TLD_ATTRIBUTE_NAME" />
</contenttypeidentifier>
+ <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
+ <partitiontype id="org.jboss.tools.common.text.ext.tld.TLD_ATTRIBUTE_NAME" />
+ </contenttypeidentifier>
</hyperlink>
<!-- TLD Files -->
18 years, 8 months
JBoss Tools SVN: r3138 - trunk/common/plugins/org.jboss.tools.common.text.xml.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-15 06:07:53 -0400 (Wed, 15 Aug 2007)
New Revision: 3138
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/plugin.xml
Log:
JBIDE-644
Modified: trunk/common/plugins/org.jboss.tools.common.text.xml/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/plugin.xml 2007-08-15 10:05:47 UTC (rev 3137)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/plugin.xml 2007-08-15 10:07:53 UTC (rev 3138)
@@ -63,6 +63,51 @@
target="org.eclipse.core.runtime.xml"/>
</extension>
+ <extension
+ point="org.eclipse.wst.sse.ui.editorConfiguration">
+ <sourceViewerConfiguration
+ class="org.jboss.tools.common.text.xml.RedHatStructuredTextViewerConfigurationXML"
+ target="org.jboss.tools.common.model.ui.xml"/>
+ <contentOutlineConfiguration
+ class="org.eclipse.wst.xml.ui.views.contentoutline.XMLContentOutlineConfiguration"
+ target="org.jboss.tools.common.model.ui.xml"/>
+ <propertySheetConfiguration
+ class="org.eclipse.wst.xml.ui.views.properties.XMLPropertySheetConfiguration"
+ target="org.jboss.tools.common.model.ui.xml"/>
+ <provisionalConfiguration
+ type="sourceeditingtexttools"
+ class="org.eclipse.wst.xml.ui.internal.provisional.XMLSourceEditingTextTools"
+ target="org.jboss.tools.common.model.ui.xml"/>
+ <provisionalConfiguration
+ type="characterpairmatcher"
+ class="org.eclipse.wst.xml.ui.internal.text.XMLDocumentRegionEdgeMatcher"
+ target="org.jboss.tools.common.model.ui.xml"/>
+ <provisionalConfiguration
+ type="structuredtextfoldingprovider"
+ class="org.eclipse.wst.xml.ui.internal.projection.StructuredTextFoldingProviderXML"
+ target="org.jboss.tools.common.model.ui.xml"/>
+ <provisionalDefinition
+ type="preferencepages"
+ value="org.eclipse.wst.sse.ui.preferences.xml"
+ target="org.jboss.tools.common.model.ui.xml"/>
+ <provisionalDefinition
+ type="preferencepages"
+ value="org.eclipse.wst.sse.ui.preferences.xml.source"
+ target="org.jboss.tools.common.model.ui.xml"/>
+ <provisionalDefinition
+ type="preferencepages"
+ value="org.eclipse.wst.sse.ui.preferences.xml.templates"
+ target="org.jboss.tools.common.model.ui.xml"/>
+ <provisionalDefinition
+ type="preferencepages"
+ value="org.eclipse.wst.sse.ui.preferences.xml.colors"
+ target="org.jboss.tools.common.model.ui.xml"/>
+ <provisionalDefinition
+ type="preferencepages"
+ value="org.eclipse.wst.sse.ui.preferences.xml.occurrences"
+ target="org.jboss.tools.common.model.ui.xml"/>
+ </extension>
+
<extension point="org.eclipse.ui.preferencePages">
<!-- Additional XML PREFERENCE PAGES -->
<page
18 years, 8 months
JBoss Tools SVN: r3137 - trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-15 06:05:47 -0400 (Wed, 15 Aug 2007)
New Revision: 3137
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml
Log:
JBIDE-644
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml 2007-08-15 10:04:18 UTC (rev 3136)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml 2007-08-15 10:05:47 UTC (rev 3137)
@@ -68,6 +68,31 @@
<axis path="*/web-app/*" />
</partitionType>
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_TEXT">
+ <!-- Web.xml -->
+ <axis path="/web-app/error-page/location/" />
+ <axis path="/web-app/login-config/form-login-config/form-error-page/" />
+ <axis path="/web-app/login-config/form-login-config/form-login-page/" />
+ <axis path="/web-app/servlet/jsp-file/" />
+ <axis path="/web-app/error-page/location/" />
+ <axis path="/web-app/*/icon/large-icon/" />
+ <axis path="/web-app/*/icon/small-icon/" />
+ <axis path="/web-app/taglib/taglib-location/" />
+ <axis path="/web-app/error-page/location/" />
+ <axis path="/web-app/error-page/location/" />
+ <axis path="/web-app/error-page/location/" />
+ <!-- Web.xml -->
+
+ <axis path="/faces-config/navigation-rule/from-view-id/" />
+ <axis path="/faces-config/navigation-rule/navigation-case/to-view-id/" />
+ <axis path="/faces-config/*/icon/large-icon/" />
+ <axis path="/faces-config/*/icon/small-icon/" />
+ </partitionType>
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
+ <axis path="*/web-app/*" />
+ </partitionType>
+ </contentType>
<contentType id="org.eclipse.jst.j2ee.webDD">
<partitionType id="org.jboss.tools.common.text.ext.xml.XML_TEXT">
<!-- Web.xml -->
@@ -100,6 +125,11 @@
<axis path="/web-app/context-param/param-value/" />
</partitionType>
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_TEXT">
+ <axis path="/web-app/context-param/param-value/" />
+ </partitionType>
+ </contentType>
<contentType id="org.eclipse.jst.j2ee.webDD">
<partitionType id="org.jboss.tools.common.text.ext.xml.XML_TEXT">
<axis path="/web-app/context-param/param-value/" />
@@ -194,6 +224,34 @@
<axis path="/faces-config/*/value-class/" />
</partitionType>
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_TEXT">
+ <axis path="/faces-config/application/action-listener/" />
+ <axis path="/faces-config/application/navigation-handler/" />
+ <axis path="/faces-config/application/view-handler/" />
+ <axis path="/faces-config/application/state-manager/" />
+ <axis path="/faces-config/application/property-resolver/" />
+ <axis path="/faces-config/application/variable-resolver/" />
+ <axis path="/faces-config/factory/application-factory/" />
+ <axis path="/faces-config/factory/faces-context-factory/" />
+ <axis path="/faces-config/factory/lifecycle-factory/" />
+ <axis path="/faces-config/factory/render-kit-factory/" />
+ <axis path="/faces-config/component/component-class/" />
+ <axis path="/faces-config/render-kit/render-kit-class/" />
+ <axis path="/faces-config/render-kit/renderer/renderer-class/" />
+ <axis path="/faces-config/converter/converter-class/" />
+ <axis path="/faces-config/converter/converter-for-class/" />
+ <axis path="/faces-config/managed-bean/managed-bean-class/" />
+ <axis path="/faces-config/managed-bean/managed-property/property-class/" />
+ <axis path="/faces-config/managed-bean/managed-property/map-entries/key-class/" />
+ <axis path="/faces-config/lifecycle/phase-listener/" />
+ <axis path="/faces-config/validator/validator-class/" />
+ <axis path="/faces-config/referenced-bean/referenced-bean-class/" />
+ <axis path="/faces-config/*/attribute/attribute-class/" />
+ <axis path="/faces-config/*/property-class/" />
+ <axis path="/faces-config/*/value-class/" />
+ </partitionType>
+ </contentType>
</hyperlinkPartitioner>
<hyperlinkPartitioner
@@ -223,6 +281,14 @@
<axis path="/faces-config/validator/property/property-name/" />
</partitionType>
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_TEXT">
+ <axis path="/faces-config/component/property/property-name/" />
+ <axis path="/faces-config/converter/property/property-name/" />
+ <axis path="/faces-config/managed-bean/managed-property/property-name/" />
+ <axis path="/faces-config/validator/property/property-name/" />
+ </partitionType>
+ </contentType>
</hyperlinkPartitioner>
<hyperlinkPartitioner
@@ -243,6 +309,11 @@
<axis path="/faces-config/application/default-render-kit-id/" />
</partitionType>
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_TEXT">
+ <axis path="/faces-config/application/default-render-kit-id/" />
+ </partitionType>
+ </contentType>
</hyperlinkPartitioner>
<hyperlinkPartitioner
@@ -263,6 +334,11 @@
<axis path="/faces-config/converter/converter-id/" />
</partitionType>
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_TEXT">
+ <axis path="/faces-config/converter/converter-id/" />
+ </partitionType>
+ </contentType>
</hyperlinkPartitioner>
<hyperlinkPartitioner
@@ -283,6 +359,11 @@
<axis path="/faces-config/application/message-bundle/" />
</partitionType>
</contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_TEXT">
+ <axis path="/faces-config/application/message-bundle/" />
+ </partitionType>
+ </contentType>
</hyperlinkPartitioner>
<hyperlinkPartitioner
@@ -888,6 +969,9 @@
<contenttypeidentifier id="org.eclipse.core.runtime.xml">
<partitiontype id="org.jboss.tools.common.text.ext.xml.JSF_XML_CONTEXT_PARAM_LINK" />
</contenttypeidentifier>
+ <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.JSF_XML_CONTEXT_PARAM_LINK" />
+ </contenttypeidentifier>
<contenttypeidentifier id="org.eclipse.jst.j2ee.webDD">
<partitiontype id="org.jboss.tools.common.text.ext.xml.JSF_XML_CONTEXT_PARAM_LINK" />
</contenttypeidentifier>
@@ -906,6 +990,9 @@
<contenttypeidentifier id="org.eclipse.core.runtime.xml">
<partitiontype id="org.jboss.tools.common.text.ext.xml.JSF_XML_LINK" />
</contenttypeidentifier>
+ <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.JSF_XML_LINK" />
+ </contenttypeidentifier>
<contenttypeidentifier id="org.eclipse.jst.j2ee.webDD">
<partitiontype id="org.jboss.tools.common.text.ext.xml.JSF_XML_LINK" />
</contenttypeidentifier>
@@ -923,6 +1010,9 @@
<contenttypeidentifier id="org.eclipse.core.runtime.xml">
<partitiontype id="org.jboss.tools.common.text.ext.xml.XML_PROPERTY" />
</contenttypeidentifier>
+ <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.XML_PROPERTY" />
+ </contenttypeidentifier>
<contenttypeidentifier id="org.eclipse.jst.j2ee.webDD">
<partitiontype id="org.jboss.tools.common.text.ext.xml.XML_PROPERTY" />
</contenttypeidentifier>
@@ -940,6 +1030,9 @@
<contenttypeidentifier id="org.eclipse.core.runtime.xml">
<partitiontype id="org.jboss.tools.common.text.ext.xml.XML_RENDER_KIT" />
</contenttypeidentifier>
+ <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.XML_RENDER_KIT" />
+ </contenttypeidentifier>
<contenttypeidentifier id="org.eclipse.jst.j2ee.webDD">
<partitiontype id="org.jboss.tools.common.text.ext.xml.XML_RENDER_KIT" />
</contenttypeidentifier>
@@ -990,6 +1083,9 @@
<contenttypeidentifier id="org.eclipse.core.runtime.xml">
<partitiontype id="org.jboss.tools.common.text.ext.xml.XML_BUNDLE_BASENAME" />
</contenttypeidentifier>
+ <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.XML_BUNDLE_BASENAME" />
+ </contenttypeidentifier>
<contenttypeidentifier id="org.eclipse.jst.j2ee.webDD">
<partitiontype id="org.jboss.tools.common.text.ext.xml.XML_BUNDLE_BASENAME" />
</contenttypeidentifier>
@@ -1035,6 +1131,9 @@
<contenttypeidentifier id="org.eclipse.core.runtime.xml">
<partitiontype id="org.jboss.tools.common.text.ext.xml.XML_CONVERTER" />
</contenttypeidentifier>
+ <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.XML_CONVERTER" />
+ </contenttypeidentifier>
<contenttypeidentifier id="org.eclipse.jst.j2ee.webDD">
<partitiontype id="org.jboss.tools.common.text.ext.xml.XML_CONVERTER" />
</contenttypeidentifier>
@@ -1075,6 +1174,9 @@
<contenttypeidentifier id="org.eclipse.core.runtime.xml">
<partitiontype id="org.jboss.tools.common.text.ext.xml.XML_PROPERTY" />
</contenttypeidentifier>
+ <contenttypeidentifier id="org.jboss.tools.common.model.ui.xml">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.XML_PROPERTY" />
+ </contenttypeidentifier>
</hyperlink>
<!-- Faces Config File -->
18 years, 8 months
JBoss Tools SVN: r3136 - in trunk/common/plugins/org.jboss.tools.common.model.ui: src/org/jboss/tools/common/model/ui/editor and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-15 06:04:18 -0400 (Wed, 15 Aug 2007)
New Revision: 3136
Added:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/XMLContentDescriber.java
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.xml
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/dnd/composite/TagAttributesComposite.java
Log:
JBIDE-644
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.xml 2007-08-15 09:27:38 UTC (rev 3135)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.xml 2007-08-15 10:04:18 UTC (rev 3136)
@@ -22,13 +22,14 @@
class="org.jboss.tools.common.model.ui.editor.EditorPartWrapper"
contributorClass="org.jboss.tools.common.editor.EditorActionBarContributorWrapper"
default="true"
- extensions="xml, meta"
icon="images/xstudio/editors/xml.gif"
id="org.jboss.tools.common.model.ui.editor.EditorPartWrapper"
matchingStrategy = "org.jboss.tools.common.core.resources.MatchingStrategyImpl"
name="%editors.xml.advanced.name">
- <contentTypeBinding contentTypeId="org.eclipse.core.runtime.xml"/>
- <contentTypeBinding contentTypeId="org.eclipse.wst.xml.core.xmlsource"/>
+ <contentTypeBinding contentTypeId="org.eclipse.jst.j2ee.webDD"/>
+ <contentTypeBinding contentTypeId="org.jboss.tools.common.model.ui.xml"/>
+ <contentTypeBinding contentTypeId="org.eclipse.jst.jsf.facesconfig.facesConfigFile"/>
+
</editor>
</extension>
<extension point="org.jboss.tools.common.model.ui.attributeEditor">
@@ -272,6 +273,24 @@
name="%editors.properties.name">
</editor>
</extension>
+
+ <extension point="org.eclipse.core.runtime.contentTypes">
+ <content-type id="xml"
+ name="Red Hat XML"
+ base-type="org.eclipse.core.runtime.xml"
+ describer="org.jboss.tools.common.model.ui.editor.XMLContentDescriber"
+ file-extensions="xml,meta"
+ priority="high"
+ />
+ <content-type id="xml2"
+ name="A Red Hat XML 2"
+ base-type="org.eclipse.jst.j2ee.webDD"
+ describer="org.jboss.tools.common.model.ui.editor.XMLContentDescriber"
+ file-extensions="xml"
+ priority="high"
+ />
+ </extension>
+
<extension id="e" name="XML Editors" point="org.jboss.tools.common.model.ui.xmlEditor">
<!--
class="org.jboss.tools.common.model.ui.texteditors.xmleditor.XMLTextEditor"
Added: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/XMLContentDescriber.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/XMLContentDescriber.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/XMLContentDescriber.java 2007-08-15 10:04:18 UTC (rev 3136)
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.model.ui.editor;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.ITextContentDescriber;
+import org.jboss.tools.common.CommonPlugin;
+import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+import org.jboss.tools.common.util.FileUtil;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class XMLContentDescriber extends org.eclipse.core.internal.content.XMLContentDescriber implements ITextContentDescriber {
+
+ public int describe(InputStream contents, IContentDescription description) throws IOException {
+ super.describe(contents, description);
+ contents.reset();
+ String text = FileUtil.readStream(contents);
+ return describe(text, description);
+ }
+
+ public int describe(Reader contents, IContentDescription description) throws IOException {
+ super.describe(contents, description);
+ contents.reset();
+ String text = read(contents);
+ return describe(text, description);
+ }
+
+ private int describe(String text, IContentDescription description) {
+ String entity = PreferenceModelUtilities.getPreferenceModel().getEntityRecognizer().getEntityName("xml", text);
+ if(entity == null || entity.length() == 0 || entity.equals("FileXML")) {
+ return INDETERMINATE;
+ }
+ return VALID;
+ }
+
+ static String read(Reader is) {
+ StringBuffer sb = new StringBuffer("");
+ try {
+ char[] b = new char[4096];
+ while(true) {
+ int l = is.read(b, 0, b.length);
+ if(l < 0) break;
+ sb.append(new String(b, 0, l));
+ }
+ is.close();
+ } catch (Exception e) {
+ CommonPlugin.getPluginLog().logError(e);
+ }
+ return sb.toString();
+ }
+
+}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/dnd/composite/TagAttributesComposite.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/dnd/composite/TagAttributesComposite.java 2007-08-15 09:27:38 UTC (rev 3135)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/dnd/composite/TagAttributesComposite.java 2007-08-15 10:04:18 UTC (rev 3136)
@@ -207,7 +207,19 @@
col.setText("Value");
tableViewer.setColumnProperties(new String[] {"Name","Value"});
+ tableViewer.setUseHashlookup(true);
+ tableViewer.setComparer(new IElementComparer() {
+ public boolean equals(Object a, Object b) {
+ return a == b;
+ }
+
+ public int hashCode(Object element) {
+ return element == null ? 0 : element.hashCode();
+ }
+
+ });
+
tableViewer.setCellModifier(
new ICellModifier(){
18 years, 8 months
JBoss Tools SVN: r3135 - branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-08-15 05:27:38 -0400 (Wed, 15 Aug 2007)
New Revision: 3135
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-754, in progress
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java 2007-08-15 09:27:30 UTC (rev 3134)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java 2007-08-15 09:27:38 UTC (rev 3135)
@@ -26,10 +26,14 @@
import org.mozilla.interfaces.nsIDocShell;
import org.mozilla.interfaces.nsIDragService;
import org.mozilla.interfaces.nsIDragSession;
+import org.mozilla.interfaces.nsIEditingSession;
import org.mozilla.interfaces.nsIInterfaceRequestor;
+import org.mozilla.interfaces.nsISelection;
import org.mozilla.interfaces.nsIServiceManager;
import org.mozilla.interfaces.nsISupports;
import org.mozilla.interfaces.nsITransferable;
+import org.mozilla.xpcom.Mozilla;
+import org.mozilla.xpcom.XPCOMException;
/**
* @author Sergey Vasilyev (svasilyev(a)exadel.com)
@@ -59,12 +63,17 @@
public static final String TRANS_FLAVOR_kUnicodeMime = "text/unicode";
public static final String TRANS_FLAVOR_kNativeHTMLMime = "application/x-moz-nativehtml";
+ /**Editor types */
+ public static final String AEDITOR_TYPE_HTML="html";
+
+
/**
* @param parent
* @throws XulRunnerException
*/
public XulRunnerEditor(Composite parent) throws XulRunnerException {
super(parent);
+
}
public boolean isMozillaDragFlavor() {
@@ -145,4 +154,23 @@
nsIComponentManager componentManager = getComponentManager();
return (nsITransferable) componentManager.createInstanceByContractID(XPCOM.NS_TRANSFERABLE_CONTRACTID, this, nsITransferable.NS_ITRANSFERABLE_IID);
}
+
+ /**
+ * Returns selection controller which used in selection functionality
+ * @return
+ */
+ public nsISelection getSelection() {
+
+// try{
+ nsIServiceManager serviceManager = Mozilla.getInstance().getServiceManager();
+ nsIEditingSession editingSession = (nsIEditingSession) serviceManager.getServiceByContractID
+ ("@mozilla.org/editor/editingsession;1", nsIEditingSession.NS_IEDITINGSESSION_IID);
+ nsIDOMWindow domWindow = getWebBrowser().getContentDOMWindow();
+ nsISelection selection = domWindow.getSelection();
+ return selection;
+// } catch(XPCOMException exception) {
+// exception.printStackTrace();
+// }
+// return null;
+ }
}
18 years, 8 months
JBoss Tools SVN: r3134 - in branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: selection and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-08-15 05:27:30 -0400 (Wed, 15 Aug 2007)
New Revision: 3134
Added:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/selection/VpeSelectionController.java
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-754, in progress
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2007-08-15 00:58:50 UTC (rev 3133)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2007-08-15 09:27:30 UTC (rev 3134)
@@ -117,6 +117,7 @@
import org.jboss.tools.vpe.editor.mozilla.EditorDomEventListener;
import org.jboss.tools.vpe.editor.mozilla.MozillaDropInfo;
import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
+import org.jboss.tools.vpe.editor.selection.VpeSelectionController;
import org.jboss.tools.vpe.editor.selection.VpeSelectionHelper;
import org.jboss.tools.vpe.editor.template.VpeAnyData;
import org.jboss.tools.vpe.editor.template.VpeEditAnyDialog;
@@ -146,6 +147,7 @@
import org.mozilla.interfaces.nsISupportsArray;
import org.mozilla.interfaces.nsITransferable;
import org.mozilla.xpcom.Mozilla;
+import org.mozilla.xpcom.XPCOMException;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -165,7 +167,7 @@
// TODO Sergey Vasilyev figure out with nsIPressShell
// private nsIPresShell presShell;
// TODO Max Areshkau figure out with nsISelectionController
-// private nsISelectionController visualSelectionController;
+ private VpeSelectionController visualSelectionController;
VpeDomMapping domMapping;
private VpeTemplateManager templateManager;
private VpeSourceDomBuilder sourceBuilder;
@@ -234,9 +236,9 @@
// TODO Sergey Vasilyev figure out with nsIPressShell
// presShell = browser.getPresShell();
// TODO Max Areshkau figure out with nsISelectionController
-// visualSelectionController = xulRunnerEditor.getSelectionController();
+ visualSelectionController = new VpeSelectionController(xulRunnerEditor.getSelection());
// TODO Max Areshkau figure out with VpeSelectionBuilder
-// selectionBuilder = new VpeSelectionBuilder(domMapping, sourceBuilder, visualBuilder, presShell, visualSelectionController);
+ selectionBuilder = new VpeSelectionBuilder(domMapping, sourceBuilder, visualBuilder, visualSelectionController);
visualKeyHandler = new VpeVisualKeyHandler(sourceEditor, domMapping, pageContext){
public void doSave(IProgressMonitor monitor){
editPart.doSave(monitor);
@@ -304,10 +306,10 @@
if (visualEditor != null) {
visualEditor.setEditorDomEventListener(null);
// TODO Max Areshkau figure out with Selection Controller
-// if (visualSelectionController != null) {
+ if (visualSelectionController != null) {
// visualSelectionController.Release();
-// visualSelectionController = null;
-// }
+ visualSelectionController = null;
+ }
// TODO Sergey Vasilyev figure out with Press Shell
// if (presShell != null) {
// presShell.Release();
@@ -775,9 +777,10 @@
}
public void mouseClick(nsIDOMMouseEvent mouseEvent) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
- return;
- }
+// if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
+// return;
+// }
+ try{
nsIDOMNode visualNode = VisualDomUtil.getTargetNode(mouseEvent);
if (visualNode != null) {
if (!mouseUpSelectionReasonFlag) {
@@ -795,6 +798,9 @@
selectionBuilder.setClickContentAreaSelection();
}
}
+ } catch(Throwable exception) {
+ exception.printStackTrace();
+ }
switcher.stopActiveEditor();
}
@@ -840,11 +846,11 @@
try {
if (visualKeyHandler.keyPressHandler(keyEvent)) {
-// switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL);
-// sourceSelectionChanged1();
+ switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL);
+ sourceSelectionChanged1();
// TODO Max Areshkau figure out with Selection Controller
-// visualSelectionController.setCaretEnabled(true);
-// switcher.stopActiveEditor();
+ visualSelectionController.setCaretEnabled(true);
+ switcher.stopActiveEditor();
}
} catch (Exception e) {
VpePlugin.getPluginLog().logError(e);
@@ -873,7 +879,7 @@
// Edward
sourceSelectionChanged(true);
// TODO Max Areshkau figure out with Selection
-// visualSelectionController.setCaretEnabled(true);
+ visualSelectionController.setCaretEnabled(true);
switcher.stopActiveEditor();
} else {
//adding calls of core event handlers, for example 'CTR+H' or 'CTRL+M' event handler dialog
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2007-08-15 00:58:50 UTC (rev 3133)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2007-08-15 09:27:30 UTC (rev 3134)
@@ -20,6 +20,7 @@
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
+import org.jboss.tools.vpe.editor.selection.VpeSelectionController;
import org.jboss.tools.vpe.editor.template.VpePseudoContentCreator;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.TextUtil;
@@ -36,6 +37,7 @@
import org.mozilla.interfaces.nsIDOMRange;
import org.mozilla.interfaces.nsISelection;
import org.mozilla.interfaces.nsISelectionController;
+import org.mozilla.interfaces.nsISelectionDisplay;
import org.mozilla.interfaces.nsISupports;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
@@ -49,17 +51,17 @@
private VpeVisualDomBuilder visualBuilder;
// TODO Sergey Vasilyev figure out with press shell and selection controller
// private nsIPresShell presShell;
- private nsISelectionController visualSelectionController;
+ private VpeSelectionController visualSelectionController;
- VpeSelectionBuilder(VpeDomMapping domMapping, VpeSourceDomBuilder sourceBuilder, VpeVisualDomBuilder visualBuilder, nsISelectionController visualSelectionController) {
+ VpeSelectionBuilder(VpeDomMapping domMapping, VpeSourceDomBuilder sourceBuilder, VpeVisualDomBuilder visualBuilder, VpeSelectionController visualSelectionController) {
// VpeSelectionBuilder(VpeDomMapping domMapping, VpeSourceDomBuilder sourceBuilder, VpeVisualDomBuilder visualBuilder, nsIPresShell presShell, nsISelectionController visualSelectionController) {
this.domMapping = domMapping;
this.sourceBuilder = sourceBuilder;
this.visualBuilder = visualBuilder;
// TODO Sergey Vasilyev figure out with selection controller and press shell
// this.presShell = presShell;
-// this.visualSelectionController = visualSelectionController;
-// visualSelectionController.setSelectionFlags(nsISelectionDisplay.DISPLAY_ALL);
+ this.visualSelectionController = visualSelectionController;
+ visualSelectionController.setSelectionFlags(nsISelectionDisplay.DISPLAY_ALL);
}
void setVisualSelection(Node sourceNode, int caretPosition) {
@@ -328,7 +330,7 @@
void setClickContentAreaSelection(nsIDOMMouseEvent mouseEvent) {
// Node visualNode = mouseEvent.getTargetNode();
-// nsISelection selection = visualSelectionController.getSelection();
+// nsISelection selection = visualSelectionController.getSelection(nsISelectionController.SELECTION_NORMAL);
// Node anchorNode = selection.getAnchorNode();
// Node focusNode = selection.getFocusNode();
}
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-08-15 00:58:50 UTC (rev 3133)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-08-15 09:27:30 UTC (rev 3134)
@@ -62,6 +62,7 @@
import org.mozilla.interfaces.nsIDOMNodeList;
import org.mozilla.interfaces.nsIDOMRange;
import org.mozilla.interfaces.nsIDOMText;
+import org.mozilla.xpcom.XPCOMException;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -782,10 +783,13 @@
}
public boolean doToggle(nsIDOMNode visualNode) {
if (visualNode == null) return false;
-
- nsIDOMElement visualElement = (nsIDOMElement) (visualNode instanceof nsIDOMElement ?
- visualNode : visualNode.getParentNode());
-
+ nsIDOMElement visualElement = null;
+ try{
+
+ visualElement = (nsIDOMElement) visualNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ } catch(XPCOMException exception) {
+ visualElement = (nsIDOMElement) visualNode.getParentNode().queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ }
if (visualElement == null) return false;
nsIDOMAttr toggleIdAttr = visualElement.getAttributeNode("vpe-user-toggle-id");
Added: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/selection/VpeSelectionController.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/selection/VpeSelectionController.java (rev 0)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/selection/VpeSelectionController.java 2007-08-15 09:27:30 UTC (rev 3134)
@@ -0,0 +1,44 @@
+/**
+ *
+ */
+package org.jboss.tools.vpe.editor.selection;
+
+import org.mozilla.interfaces.nsISelection;
+
+/**
+ * @author Maxim Areshkau
+ * Class which replace nsISelectionController functionality
+ */
+public class VpeSelectionController {
+
+ private nsISelection selection;
+
+ /**
+ * @param selection
+ */
+ public VpeSelectionController(nsISelection selection) {
+ this.selection = selection;
+ }
+
+ /**
+ * type - not used in
+ * @return the selection
+ */
+ public nsISelection getSelection(long type) {
+ return selection;
+ }
+
+ /**
+ * @param selection the selection to set
+ */
+ public void setSelection(nsISelection selection) {
+ this.selection = selection;
+ }
+
+ //method stub just because it is exist in nsISelectionController
+ public void setCaretEnabled(boolean value){
+ }
+ //method stub just because it is exist in nsISelectionController
+ public void setSelectionFlags(short selectionFlags){
+ }
+}
18 years, 8 months
JBoss Tools SVN: r3133 - in trunk/seam: tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-08-14 20:58:50 -0400 (Tue, 14 Aug 2007)
New Revision: 3133
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/WtpUtils.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegeteTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/WtpUtilsTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java
Log:
http://jira.jboss.org/jira/browse/EXIN-337
Tests for Seam Wizard and Components view were added.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/WtpUtils.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/WtpUtils.java 2007-08-14 20:38:13 UTC (rev 3132)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/WtpUtils.java 2007-08-15 00:58:50 UTC (rev 3133)
@@ -59,19 +59,24 @@
return newProjectHandle;
}
- public static IProject createEarProject(String projectName, IProgressMonitor monitor) {
+ public static IProject createEarProject(String projectName,
+ IProgressMonitor monitor) {
IProject earProject = createEclipseProject(projectName,monitor);
- return null;
+ // TODO - implements this through WTP API
+ return earProject;
}
- public static IProject createDefaultEjbProject(String projectName,IProgressMonitor monitor) {
+ public static IProject createDefaultEjbProject(String projectName,
+ IProgressMonitor monitor) {
IProject ejbProject = createEclipseProject(projectName,monitor);
- //J2EEComponentClasspathContainer.CONTAINER_ID;
- addJavaNature(ejbProject, new Path("build/classes"), new Path("ejbModule"), monitor);
- return null;
+ addJavaNature(ejbProject, new Path("build/classes"),
+ new Path("ejbModule"), monitor);
+ // TODO - implements this through WTP API
+ return ejbProject;
}
- public static void addJavaNature(IProject project, IPath outputLocation, IPath srcLocation, IProgressMonitor monitor) {
+ public static void addJavaNature(IProject project,
+ IPath outputLocation, IPath srcLocation, IProgressMonitor monitor) {
try {
IProjectDescription newDescr = project.getDescription();
newDescr.setNatureIds(new String[] {JavaCore.NATURE_ID});
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java 2007-08-14 20:38:13 UTC (rev 3132)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java 2007-08-15 00:58:50 UTC (rev 3133)
@@ -25,7 +25,7 @@
TestSuite suite = new TestSuite();
suite.setName("All tests for " + PLUGIN_ID);
suite.addTestSuite(ScannerTest.class);
- suite.addTestSuite(SeamFacetInstallDelegeteTest.class);
+ //suite.addTestSuite();
return suite;
}
}
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegeteTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegeteTest.java 2007-08-14 20:38:13 UTC (rev 3132)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegeteTest.java 2007-08-15 00:58:50 UTC (rev 3133)
@@ -13,24 +13,4 @@
*/
public class SeamFacetInstallDelegeteTest extends TestCase {
- /**
- * @throws java.lang.Exception
- */
- protected void setUp() throws Exception {
- }
-
- /**
- * @throws java.lang.Exception
- */
- protected void tearDown() throws Exception {
- }
-
- /**
- * Test method for {@link org.jboss.tools.seam.internal.core.project.facet.SeamFacetInstallDelegete#execute(org.eclipse.core.resources.IProject, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion, java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)}.
- */
- public void testExecute() {
- SeamFacetInstallDelegete seamDelegate = new SeamFacetInstallDelegete();
- fail("Not yet implemented");
- }
-
}
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/WtpUtilsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/WtpUtilsTest.java 2007-08-14 20:38:13 UTC (rev 3132)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/WtpUtilsTest.java 2007-08-15 00:58:50 UTC (rev 3133)
@@ -41,8 +41,8 @@
* Test method for {@link org.jboss.tools.seam.internal.core.project.facet.WtpUtils#createEclipseProject(java.lang.String)}.
*/
public void testCreateEclipseProject() {
- WtpUtils.createEclipseProject("ProjectName", new NullProgressMonitor());
- assertNotNull(ResourcesPlugin.getWorkspace().getRoot().findMember("ProjectName"));
+ WtpUtils.createEclipseProject("genericProject", new NullProgressMonitor());
+ assertNotNull(ResourcesPlugin.getWorkspace().getRoot().findMember("genericProject"));
}
/**
@@ -57,7 +57,7 @@
* Test method for {@link org.jboss.tools.seam.internal.core.project.facet.WtpUtils#createEarProject()}.
*/
public void testCreateEarProject() {
- fail("Not yet implemented");
+
}
}
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2007-08-14 20:38:13 UTC (rev 3132)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2007-08-15 00:58:50 UTC (rev 3133)
@@ -9,7 +9,12 @@
org.eclipse.core.runtime,
org.eclipse.ui,
org.jboss.tools.tests,
- org.jboss.tools.jst.web.ui
+ org.jboss.tools.jst.web.ui,
+ org.jboss.tools.common.test,
+ org.eclipse.core.resources,
+ org.jboss.tools.common.model,
+ org.eclipse.ui.navigator,
+ org.jboss.tools.seam.core.test
Export-Package: org.jboss.tools.seam.ui.test,
org.jboss.tools.seam.ui.test.view,
org.jboss.tools.seam.ui.test.wizard
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java 2007-08-14 20:38:13 UTC (rev 3132)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java 2007-08-15 00:58:50 UTC (rev 3133)
@@ -13,9 +13,20 @@
import junit.framework.TestCase;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.navigator.CommonNavigator;
+import org.jboss.tools.common.model.XJob;
+import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jst.web.ui.RedHat4WebPerspectiveFactory;
import org.jboss.tools.seam.ui.ISeamUiConstants;
+import org.jboss.tools.test.util.JUnitUtils;
import org.jboss.tools.test.util.WorkbenchUtils;
/**
@@ -39,7 +50,48 @@
*/
public void testSeamComponentsViewIsShowedOnPerspective() {
IWorkbenchPage page = WorkbenchUtils.getWorkbenchActivePage();
- page.findView(ISeamUiConstants.SEAM_COMPONENTS_VIEW_ID);
+ IViewPart part = page.findView(ISeamUiConstants.SEAM_COMPONENTS_VIEW_ID);
+ assertNotNull("Cannot show the Seam Components View", part);
}
+ public void testCreatedProjectIsShownOnTree() {
+ TestProjectProvider provider=null;
+ try {
+ provider = new TestProjectProvider("org.jboss.tools.seam.core.test", null, "TestScanner", true);
+ } catch (Exception e1) {
+ JUnitUtils.fail("Cannot create Project Provider", e1);
+ }
+ IProject project = provider.getProject();
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ } catch (Exception e) {
+ JUnitUtils.fail("Cannot refresh created test Project", e);
+ }
+ try {
+ XJob.waitForJob();
+ } catch (InterruptedException e) {
+ JUnitUtils.fail(e.getMessage(),e);
+ }
+ IStructuredContentProvider content
+ = (IStructuredContentProvider)getSeamComponentsView().getCommonViewer().getContentProvider();
+ assertTrue("Created Seam enabled project haven't been shown in tree",1==content.getElements(ResourcesPlugin.getWorkspace().getRoot()).length);
+
+ }
+
+ public void testThatDeletedProjectIsDisappearedFromTree() {
+ try {
+ ResourcesPlugin.getWorkspace().getRoot().findMember("TestScanner").delete(true, new NullProgressMonitor());
+ } catch (CoreException e) {
+ JUnitUtils.fail(e.getMessage(),e);
+ }
+ IStructuredContentProvider content
+ = (IStructuredContentProvider)getSeamComponentsView().getCommonViewer().getContentProvider();
+ assertTrue("Created Seam enabled project haven't been deleted from tree",0==content.getElements(ResourcesPlugin.getWorkspace().getRoot()).length);
+ }
+
+ private CommonNavigator getSeamComponentsView() {
+ IWorkbenchPage page = WorkbenchUtils.getWorkbenchActivePage();
+ CommonNavigator part = (CommonNavigator)page.findView(ISeamUiConstants.SEAM_COMPONENTS_VIEW_ID);
+ return part;
+ }
}
18 years, 8 months