JBoss Tools SVN: r27488 - trunk/documentation/guides/JBDS_Release_Notes/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-12-14 20:54:01 -0500 (Tue, 14 Dec 2010)
New Revision: 27488
Modified:
trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
Log:
updated with new fixed issues
Modified: trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
===================================================================
--- trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-12-14 23:42:27 UTC (rev 27487)
+++ trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-12-15 01:54:01 UTC (rev 27488)
@@ -23,28 +23,12 @@
<title>Contexts and Dependency Injection (CDI)</title>
<para>
<itemizedlist>
- <listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7842">JBIDE-7842</ulink>: A new wizard has been added for the <filename>beans.xml</filename> file. This new wizard uses the <guilabel>New File</guilabel> wizard as a foundation, setting the <guilabel>File Name</guilabel> input field set to <filename>beans.xml</filename> and the <guilabel>Parent Folder</guilabel> to the projects <filename>beans.xml</filename> default location (if determinable).
+ </para>
+ <listitem>
<para>
- <ulink url="https://jira.jboss.org/browse/JBIDE-2708">JBIDE-2708</ulink>: The <productname>CDI Validator</productname> now implements all the definitions, non-portable behaviors and deployment problems mentioned in <ulink url="http://docs.jboss.org/cdi/spec/1.0/html/index.html">JSR-299</ulink> with the exception of those that can not be tracked at design time. You can view the complete list of implemented rules in the <ulink url="https://anonsvn.jboss.org/repos/jbosstools/trunk/cdi/plugins/org.jboss.to...">errorList.txt</ulink> file.
- </para>
- <para>
- The severity levels for optional CDI Validation rules can be set 2 ways:
- <orderedlist>
- <listitem>
- <para>
- Globally for all projects by selecting <menuchoice><guimenuitem>JBoss Tools</guimenuitem><guimenuitem>Web</guimenuitem><guimenuitem>CDI</guimenuitem><guimenuitem>Validator</guimenuitem></menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- At the project level, overriding the global preferences, by selecting <menuchoice><guimenuitem>Project</guimenuitem><guimenuitem>Properties</guimenuitem><guimenuitem>CDI Settings</guimenuitem><guimenuitem>Validator</guimenuitem></menuchoice>
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- <listitem>
- <para>
<ulink url="https://jira.jboss.org/browse/JBIDE-7823">JBIDE-7823</ulink>: A new option has been added to the <guilabel>Dynamic Web Project</guilabel> wizard which enables support for <productname>CDI</productname>. The new option can be accessed using the following steps:
<orderedlist>
<listitem>
@@ -72,6 +56,11 @@
When the <option>Dynamic Web Project with CDI (Context and Dependency Injection)</option> option is selected the <productname>CDI Facet</productname> will be installed along with all required and preferred dependencies such as JSF 2, Java 6 and Servlets 3.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7803">JBIDE-7803</ulink>: After creating a project for the Web Tools Platform (WTP), a user would have to manually create the <filename>beans.xml</filename> file that will located at <filename>WEB-INF/beans.xml</filename> for WAR files and <filename>META-INF/beans.xml</filename> for EJB files. The CDI facet has now been updated to ensure that an empty <filename>beans.xml</filename> file is generated in the correct locations during the creation of a WTP project when the <guilabel>Generate beans.xml</guilabel> box is checked. This update helps to ensure the necessary CDI file exists for the WTP project.
+ </para>
+ <listitem>
<listitem>
<para>
<ulink url="https://jira.jboss.org/browse/JBIDE-7721">JBIDE-7721</ulink>: It is possible to declare custom decorators and interceptors without using the @Decorator and @Interceptor annotations, like so:
@@ -239,6 +228,37 @@
and press <guibutton>Next</guibutton>. The interceptor wizard declares an interceptor for an existing web bean, and implements <property>@Interceptor</property> annotation.
</para>
</listitem>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="https://jira.jboss.org/browse/JBIDE-2708">JBIDE-2708</ulink>: The <productname>CDI Validator</productname> now implements all the definitions, non-portable behaviors and deployment problems mentioned in <ulink url="http://docs.jboss.org/cdi/spec/1.0/html/index.html">JSR-299</ulink> with the exception of those that can not be tracked at design time. You can view the complete list of implemented rules in the <ulink url="https://anonsvn.jboss.org/repos/jbosstools/trunk/cdi/plugins/org.jboss.to...">errorList.txt</ulink> file.
+ </para>
+ <para>
+ The severity levels for optional CDI Validation rules can be set 2 ways:
+ <orderedlist>
+ <listitem>
+ <para>
+ Globally for all projects by selecting <menuchoice>
+ <guimenuitem>JBoss Tools</guimenuitem>
+ <guimenuitem>Web</guimenuitem>
+ <guimenuitem>CDI</guimenuitem>
+ <guimenuitem>Validator</guimenuitem>
+ </menuchoice>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ At the project level, overriding the global preferences, by selecting <menuchoice>
+ <guimenuitem>Project</guimenuitem>
+ <guimenuitem>Properties</guimenuitem>
+ <guimenuitem>CDI Settings</guimenuitem>
+ <guimenuitem>Validator</guimenuitem>
+ </menuchoice>
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ </listitem>
<listitem>
<para>
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-2704">JBIDE-2704</ulink>: The CDI tool set has been enhanced with code completion added for relevant types and annotations in <filename>beans.xml</filename>.
@@ -630,6 +650,11 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-5677">JBIDE-5677</ulink>: JSF 2 is now supported for web projects. When a user is configuring Project Facets and selects to add JSF support, JSF 2 is now an available option.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5661">JBIDE-5661</ulink>: JavaServer Pages Standard Tag Library (JSTL) functions (<code>fn:*</code>) were not supported and an empty panel would appear in a users workspace after attempting to add a JSTL function to a project. Support has been added for JSTL functions with this release. Support has been achieved through the modification of the following files: <filename>TLDToPaletteHelper.java</filename>, <filename>JSPAdopt.java</filename> and <filename>JSPPaletteInsertHelper.java</filename>.
+ </para>
+ </listitem>
<listitem>
<para>
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-5219">JBIDE-5219</ulink>: The JSF 2 kick start project template has been added and is now available within the <guilabel>New JSF Project Wizard</guilabel>.
@@ -1116,6 +1141,11 @@
<title>General Issues</title>
<para>
<itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7830">JBIDE-7830</ulink>: The wizard that would display available attributes for JSP and HTML tags has been updated to improve usability. In the past the wizard would show a complete list of attributes for a tag, in one list. This could potentially overwhelm a user with options and make it hard to define the necessary attribute items for a tag. This update for the wizard ensures that required and preferable attributes are seperated from the others by placing them under a <guilabel>General</guilabel> tab, with the rest being listed under the <guilabel>Advanced</guilabel> tab.
+ </para>
+ </listitem>
<!-- These two issues only in release notes for JBT -->
<!-- <listitem>
<para>
14 years, 1 month
JBoss Tools SVN: r27487 - trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2010-12-14 18:42:27 -0500 (Tue, 14 Dec 2010)
New Revision: 27487
Modified:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view/Bpmn2DefinitionsPageImpl.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view/Bpmn2DetailsPageImpl.java
Log:
id should not be set when not required (doesn't seem to be supported in the model)
Modified: trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view/Bpmn2DefinitionsPageImpl.java
===================================================================
--- trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view/Bpmn2DefinitionsPageImpl.java 2010-12-14 23:07:41 UTC (rev 27486)
+++ trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view/Bpmn2DefinitionsPageImpl.java 2010-12-14 23:42:27 UTC (rev 27487)
@@ -321,7 +321,7 @@
if (eventType == Notification.ADD || eventType == Notification.SET) {
Object object = notification.getNewValue();
if (object instanceof EObject) {
- setIdIfNotSet((EObject)object);
+ setIdIfNeeded((EObject)object);
updateTreeSelection(object);
}
}
@@ -335,10 +335,10 @@
});
}
- protected void setIdIfNotSet(EObject obj) {
+ protected void setIdIfNeeded(EObject obj) {
if (obj.eClass() != null) {
EStructuralFeature idAttr = obj.eClass().getEIDAttribute();
- if (idAttr != null && !obj.eIsSet(idAttr)) {
+ if (idAttr != null && idAttr.isRequired() && !obj.eIsSet(idAttr)) {
CommandParameter commandParameter = new CommandParameter(obj, idAttr, EcoreUtil.generateUUID(), CommandParameter.NO_INDEX);
Command command = editor.getEditingDomain().createCommand(SetCommand.class, commandParameter);
editor.getEditingDomain().getCommandStack().execute(command);
Modified: trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view/Bpmn2DetailsPageImpl.java
===================================================================
--- trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view/Bpmn2DetailsPageImpl.java 2010-12-14 23:07:41 UTC (rev 27486)
+++ trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view/Bpmn2DetailsPageImpl.java 2010-12-14 23:42:27 UTC (rev 27487)
@@ -348,7 +348,7 @@
if (eventType == Notification.ADD || eventType == Notification.SET) {
Object object = notification.getNewValue();
if (object instanceof EObject) {
- setIdIfNotSet((EObject)object);
+ setIdIfNeeded((EObject)object);
updateTreeSelection(object);
}
}
@@ -362,10 +362,10 @@
});
}
- protected void setIdIfNotSet(EObject obj) {
+ protected void setIdIfNeeded(EObject obj) {
if (obj.eClass() != null) {
EStructuralFeature idAttr = obj.eClass().getEIDAttribute();
- if (idAttr != null && !obj.eIsSet(idAttr)) {
+ if (idAttr != null && idAttr.isRequired() && !obj.eIsSet(idAttr)) {
CommandParameter commandParameter = new CommandParameter(obj, idAttr, EcoreUtil.generateUUID(), CommandParameter.NO_INDEX);
Command command = editor.getEditingDomain().createCommand(SetCommand.class, commandParameter);
editor.getEditingDomain().getCommandStack().execute(command);
14 years, 1 month
JBoss Tools SVN: r27486 - trunk/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-12-14 18:07:41 -0500 (Tue, 14 Dec 2010)
New Revision: 27486
Modified:
trunk/site/site.xml
Log:
remove upstream components from nightly site to force aggregation to happen once, not twice
Modified: trunk/site/site.xml
===================================================================
--- trunk/site/site.xml 2010-12-14 22:55:00 UTC (rev 27485)
+++ trunk/site/site.xml 2010-12-14 23:07:41 UTC (rev 27486)
@@ -6,23 +6,6 @@
JBoss Tools 3.2.0 Update Site / p2 Repo
</description>
- <!-- only in JBDS -->
- <!--
- <feature url="features/com.jboss.jbds.product.feature_0.0.0.jar"
- id="com.jboss.jbds.product.feature"
- version="0.0.0"
- patch="false"
- >
- <category name="AllTools" />
- </feature>
- <feature url="features/org.jboss.tools.runtime.feature_0.0.0.jar"
- id="org.jboss.tools.runtime.feature"
- version="0.0.0"
- patch="false"
- >
- <category name="AllTools" />
- </feature>
- -->
<feature url="features/org.jboss.tools.richfaces.feature_0.0.0.jar" id="org.jboss.tools.richfaces.feature" version="0.0.0">
<category name="AllTools" />
<category name="WebTools" />
@@ -31,15 +14,6 @@
<category name="AllTools" />
<category name="WebTools" />
</feature>
- <feature url="features/org.jboss.tools.cdi.feature_0.0.0.jar" id="org.jboss.tools.cdi.feature" version="0.0.0">
- <category name="AllTools" />
- <category name="WebTools" />
- <category name="GeneralTools" />
- </feature>
- <feature url="features/org.jboss.tools.jmx.feature_0.0.0.jar" id="org.jboss.tools.jmx.feature" version="0.0.0">
- <category name="AllTools" />
- <category name="GeneralTools" />
- </feature>
<feature url="features/org.jboss.ide.eclipse.as.feature_0.0.0.jar" id="org.jboss.ide.eclipse.as.feature" version="0.0.0">
<category name="AllTools" />
<category name="WebTools" />
@@ -62,10 +36,6 @@
<category name="AllTools" />
<category name="WebTools" />
</feature>
- <feature url="features/org.jboss.tools.esb.feature_0.0.0.jar" id="org.jboss.tools.esb.feature" version="0.0.0">
- <category name="AllTools" />
- <category name="SOATools" />
- </feature>
<feature url="features/org.jboss.tools.ws.feature_0.0.0.jar" id="org.jboss.tools.ws.feature" version="0.0.0">
<category name="AllTools" />
<category name="SOATools" />
@@ -83,39 +53,8 @@
<category name="DataTools" />
<category name="GeneralTools" />
</feature>
- <!-- remove Drools because it's now built externally; see aggregate site.xml instead -->
- <!--feature url="features/org.drools.eclipse.feature_0.0.0.jar" id="org.drools.eclipse.feature" version="0.0.0">
- <category name="AllTools" />
- <category name="SOATools" />
- <category name="GeneralTools" />
- </feature>
- <feature url="features/org.drools.eclipse.task.feature_0.0.0.jar" id="org.drools.eclipse.task.feature" version="0.0.0">
- <category name="AllTools" />
- <category name="SOATools" />
- </feature>
- <feature url="features/org.guvnor.tools.feature_0.0.0.jar" id="org.guvnor.tools.feature" version="0.0.0">
- <category name="AllTools" />
- <category name="SOATools" />
- </feature-->
- <feature url="features/org.jboss.tools.project.examples.feature_0.0.0.jar" id="org.jboss.tools.project.examples.feature" version="0.0.0">
- <category name="AllTools" />
- <category name="GeneralTools" />
- </feature>
- <!-- DISABLED for now -->
- <!--
- <feature url="features/org.jboss.tools.profiler.feature_0.0.0.jar" id="org.jboss.tools.profiler.feature" version="0.0.0">
- <category name="AllTools"/>
- </feature>
- -->
-
<!-- only in JBT -->
- <feature url="features/org.jboss.tools.community.project.examples.feature_0.0.0.jar"
- id="org.jboss.tools.community.project.examples.feature"
- version="0.0.0">
- <category name="AllTools" />
- <category name="GeneralTools" />
- </feature>
<feature url="features/org.jboss.tools.birt.feature_0.0.0.jar" id="org.jboss.tools.birt.feature" version="0.0.0">
<category name="ReportTools" />
</feature>
@@ -138,71 +77,10 @@
<category name="MavenTools" />
</feature>
- <feature url="features/org.jboss.tools.xulrunner.feature_0.0.0.jar" id="org.jboss.tools.xulrunner.feature" version="0.0.0">
- <category name="AllTools" />
- <category name="WebTools" />
- </feature>
-
- <!-- TODO: enable SDK features once we can build source plugins w/ Tycho -->
- <!-- <feature url="features/org.jboss.tools.jmx.sdk.feature_0.0.0.jar" id="org.jboss.tools.jmx.sdk.feature"
- version="0.0.0"> <category name="SDKTools"/> </feature> <feature url="features/org.jboss.ide.eclipse.freemarker.sdk.feature_0.0.0.jar"
- id="org.jboss.ide.eclipse.freemarker.sdk.feature" version="0.0.0"> <category
- name="SDKTools"/> </feature> -->
- <!-- TODO: enable SDK features once we can build source plugins w/ Tycho -->
- <!-- Only in JBT -->
- <!--
- <feature url="features/org.jboss.tools.bpel.sdk.feature_0.0.0.jar"
- id="org.jboss.tools.bpel.sdk.feature" version="0.0.0"> <category name="AllTools"/>
- <category name="SOATools"/> </feature> <feature url="features/org.jboss.tools.maven.sdk.feature_0.0.0.jar"
- id="org.jboss.tools.maven.sdk.feature" version="0.0.0"> <category name="SDKTools"/>
- </feature>
- -->
-
- <!-- jBPM Tools & Flow features -->
- <feature url="features/org.jboss.tools.jbpm.convert.feature_0.0.0.jar" id="org.jboss.tools.jbpm.convert.feature" version="0.0.0">
- <category name="AllTools" />
- <category name="SOATools" />
- </feature>
- <feature url="features/org.jboss.tools.jbpm.common.feature_0.0.0.jar" id="org.jboss.tools.jbpm.common.feature" version="0.0.0">
- <category name="AllTools" />
- <category name="SOATools" />
- </feature>
- <feature url="features/org.jboss.tools.jbpm3.feature_0.0.0.jar" id="org.jboss.tools.jbpm3.feature" version="0.0.0">
- <category name="AllTools" />
- <category name="SOATools" />
- </feature>
- <feature url="features/org.jboss.tools.jbpm4.feature_0.0.0.jar" id="org.jboss.tools.jbpm4.feature" version="0.0.0">
- <category name="AllTools" />
- <category name="SOATools" />
- </feature>
-
- <feature url="features/org.jboss.tools.bpel.feature_0.0.0.jar" id="org.jboss.tools.bpel.feature" version="0.0.0">
- <category name="AllTools" />
- <category name="SOATools" />
- </feature>
-
- <feature url="features/org.jboss.tools.modeshape.rest.feature_0.0.0.jar" id="org.jboss.tools.modeshape.rest.feature" version="0.0.0">
- <category name="AllTools" />
- <category name="GeneralTools" />
- </feature>
-
<feature url="features/org.jboss.tools.runtime.feature_0.0.0.jar" id="org.jboss.tools.runtime.feature" version="0.0.0">
<category name="AllTools" />
</feature>
- <!-- JBIDE- 6836 DO NOT PUT IN AllTools CATEGORY -->
- <feature url="features/org.jboss.tools.gwt.feature_0.0.0.jar" id="org.jboss.tools.gwt.feature" version="0.0.0">
- <category name="GeneralTools" />
- </feature>
-
- <feature url="features/org.jboss.tools.deltacloud.feature_0.0.0.jar" id="org.jboss.tools.deltacloud.feature" version="0.0.0">
- <category name="CloudTools" />
- </feature>
-
- <feature url="features/org.jboss.tools.usage.feature_0.0.0.jar" id="org.jboss.tools.usage.feature" version="0.0.0">
- <category name="AllTools" />
- </feature>
-
<!-- categories - see also ../../../common/aggregateRepos.*.properties -->
<category-def name="SDKTools" label="JBoss Tools SDK">
<description>JBoss Tools SDK contains plugins where an SDK package
14 years, 1 month
JBoss Tools SVN: r27484 - trunk/cdi.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-12-14 17:35:12 -0500 (Tue, 14 Dec 2010)
New Revision: 27484
Modified:
trunk/cdi/pom-with-deps.xml
Log:
drop extraneous test dep
Modified: trunk/cdi/pom-with-deps.xml
===================================================================
--- trunk/cdi/pom-with-deps.xml 2010-12-14 21:47:25 UTC (rev 27483)
+++ trunk/cdi/pom-with-deps.xml 2010-12-14 22:35:12 UTC (rev 27484)
@@ -8,7 +8,6 @@
<packaging>pom</packaging>
<modules>
<!-- check out deps into folder parallel to this one in Hudson workspace -->
- <module>../org.jboss.tools.jst.jsp.test</module>
<module>../org.jboss.tools.jst.jsp.base.test</module>
<module>plugins</module>
14 years, 1 month
JBoss Tools SVN: r27483 - trunk/cdi.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-12-14 16:47:25 -0500 (Tue, 14 Dec 2010)
New Revision: 27483
Added:
trunk/cdi/pom-with-deps.xml
Log:
add pom which includes deps
Added: trunk/cdi/pom-with-deps.xml
===================================================================
--- trunk/cdi/pom-with-deps.xml (rev 0)
+++ trunk/cdi/pom-with-deps.xml 2010-12-14 21:47:25 UTC (rev 27483)
@@ -0,0 +1,20 @@
+<project
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>cdi</artifactId>
+ <name>cdi.all</name>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <!-- check out deps into folder parallel to this one in Hudson workspace -->
+ <module>../org.jboss.tools.jst.jsp.test</module>
+ <module>../org.jboss.tools.jst.jsp.base.test</module>
+
+ <module>plugins</module>
+ <module>features</module>
+ <module>tests</module>
+ <module>site</module>
+ </modules>
+</project>
+
14 years, 1 month
JBoss Tools SVN: r27482 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-12-14 15:57:59 -0500 (Tue, 14 Dec 2010)
New Revision: 27482
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
Log:
https://issues.jboss.org/browse/JBIDE-7841 :
Fix spring tests
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2010-12-14 20:19:53 UTC (rev 27481)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2010-12-14 20:57:59 UTC (rev 27482)
@@ -1008,25 +1008,28 @@
String nameSpaceIdentifyer = templateElement
.getAttribute(VpeTemplateManager.NAMESPACE_IDENTIFIER_ATTRIBUTE);
if (templateClassName != null && templateClassName.length() > 0) {
- try {
- Bundle bundle;
- if (nameSpaceIdentifyer == null
- || nameSpaceIdentifyer.length() == 0) {
- nameSpaceIdentifyer = confElement.getNamespaceIdentifier();
+ if (nameSpaceIdentifyer == null
+ || nameSpaceIdentifyer.length() == 0) {
+ nameSpaceIdentifyer = confElement.getNamespaceIdentifier();
+ }
+
+ Bundle bundle = Platform.getBundle(nameSpaceIdentifyer);
+ if (bundle == null) {
+ template = null;
+ } else {
+ try {
+ Class templateClass = bundle.loadClass(templateClassName);
+ template = (VpeTemplate) templateClass.newInstance();
+ } catch (ClassNotFoundException e) {
+ template = handleTemplateClassLoadException(template,
+ templateClassName, nameSpaceIdentifyer, e);
+ } catch (IllegalAccessException e) {
+ template = handleTemplateClassLoadException(template,
+ templateClassName, nameSpaceIdentifyer, e);
+ } catch (InstantiationException e) {
+ template = handleTemplateClassLoadException(template,
+ templateClassName, nameSpaceIdentifyer, e);
}
- bundle = Platform.getBundle(nameSpaceIdentifyer);
-
- Class templateClass = bundle.loadClass(templateClassName);
- template = (VpeTemplate) templateClass.newInstance();
- } catch (ClassNotFoundException e) {
- template = handleTemplateClassLoadException(template,
- templateClassName, nameSpaceIdentifyer, e);
- } catch (IllegalAccessException e) {
- template = handleTemplateClassLoadException(template,
- templateClassName, nameSpaceIdentifyer, e);
- } catch (InstantiationException e) {
- template = handleTemplateClassLoadException(template,
- templateClassName, nameSpaceIdentifyer, e);
}
} else {
template = new VpeHtmlTemplate();
14 years, 1 month
JBoss Tools SVN: r27481 - in trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test: editor/selectionbar and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-12-14 15:19:53 -0500 (Tue, 14 Dec 2010)
New Revision: 27481
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/selectionbar/SelectionBarTest.java
Log:
Update SelectionBarTest and add it to test suite.
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2010-12-14 19:53:38 UTC (rev 27480)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2010-12-14 20:19:53 UTC (rev 27481)
@@ -27,6 +27,7 @@
import org.jboss.tools.vpe.ui.bot.test.editor.preferences.ShowNonVisualTagsTest;
import org.jboss.tools.vpe.ui.bot.test.editor.preferences.ShowResourceBundlesUsageasELexpressionsTest;
import org.jboss.tools.vpe.ui.bot.test.editor.preferences.ShowSelectionTagBarTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.selectionbar.SelectionBarTest;
import org.jboss.tools.vpe.ui.bot.test.jbide.JBIDE4556Test;
import org.jboss.tools.vpe.ui.bot.test.palette.CancelTagLibDefenitionTest;
import org.jboss.tools.vpe.ui.bot.test.palette.ImportTagsFromTLDFileTest;
@@ -84,6 +85,8 @@
suite.addTestSuite(MinMaxPanesTest.class);
suite.addTestSuite(EditingELValueTest.class);
suite.addTestSuite(ManipulatingELValueTest.class);
+ suite.addTestSuite(SelectionBarTest.class);
+
return new TestSetup(suite);
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2010-12-14 19:53:38 UTC (rev 27480)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2010-12-14 20:19:53 UTC (rev 27481)
@@ -1,5 +1,7 @@
package org.jboss.tools.vpe.ui.bot.test;
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.widgetOfType;
+
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -13,14 +15,18 @@
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.VoidResult;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.test.TestProperties;
import org.jboss.tools.vpe.ui.bot.test.Activator;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTJBTExt;
import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.vpe.editor.xpl.CustomSashForm;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.test.JBTSWTBotTestCase;
import org.jboss.tools.ui.bot.test.SWTBotJSPMultiPageEditor;
@@ -488,4 +494,76 @@
bot.shell("Confirm Delete").activate(); //$NON-NLS-1$
bot.button("OK").click(); //$NON-NLS-1$
}
+ /**
+ * Maximize Source Pane
+ * @param botExt
+ * @param pageName
+ */
+ public void maximizeSourcePane(SWTBotExt botExt, String pageName) {
+ botExt.swtBotEditorExtByTitle(pageName).selectPage(
+ IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
+
+ final org.jboss.tools.vpe.editor.xpl.CustomSashForm csf =
+ bot.widgets(widgetOfType(CustomSashForm.class)).get(0);
+ UIThreadRunnable.syncExec(new VoidResult() {
+ @Override
+ public void run() {
+ csf.maxDown();
+ }
+ });
+ }
+ /**
+ * Maximize Visual Pane
+ * @param botExt
+ * @param pageName
+ */
+ public void maximizeVisualPane(SWTBotExt botExt, String pageName) {
+ botExt.swtBotEditorExtByTitle(pageName).selectPage(
+ IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
+
+ final org.jboss.tools.vpe.editor.xpl.CustomSashForm csf =
+ bot.widgets(widgetOfType(CustomSashForm.class)).get(0);
+ UIThreadRunnable.syncExec(new VoidResult() {
+ @Override
+ public void run() {
+ csf.maxUp();
+ }
+ });
+ }
+ /**
+ * Restore Source Pane
+ * @param botExt
+ * @param pageName
+ */
+ public void restoreSourcePane(SWTBotExt botExt, String pageName) {
+ botExt.swtBotEditorExtByTitle(pageName).selectPage(
+ IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
+
+ final org.jboss.tools.vpe.editor.xpl.CustomSashForm csf =
+ bot.widgets(widgetOfType(CustomSashForm.class)).get(0);
+ UIThreadRunnable.syncExec(new VoidResult() {
+ @Override
+ public void run() {
+ csf.downClicked();
+ }
+ });
+ }
+ /**
+ * Restore Visual Pane
+ * @param botExt
+ * @param pageName
+ */
+ public void restoreVisualPane(SWTBotExt botExt, String pageName) {
+ botExt.swtBotEditorExtByTitle(pageName).selectPage(
+ IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
+
+ final org.jboss.tools.vpe.editor.xpl.CustomSashForm csf =
+ bot.widgets(widgetOfType(CustomSashForm.class)).get(0);
+ UIThreadRunnable.syncExec(new VoidResult() {
+ @Override
+ public void run() {
+ csf.upClicked();
+ }
+ });
+ }
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/selectionbar/SelectionBarTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/selectionbar/SelectionBarTest.java 2010-12-14 19:53:38 UTC (rev 27480)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/selectionbar/SelectionBarTest.java 2010-12-14 20:19:53 UTC (rev 27481)
@@ -13,7 +13,10 @@
import java.awt.event.KeyEvent;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.helper.KeyboardHelper;
import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
@@ -22,11 +25,15 @@
*/
public class SelectionBarTest extends VPEAutoTestCase {
- private final String SELECTED_TEXT = "<h:inputText value=\"#{user.name}\" required=\"true\"> <f:validateLength maximum=\"30\" minimum=\"3\"/> </h:inputText>"; //$NON-NLS-1$
- private final String SELECTED_TEXT2 = "<f:validateLength maximum=\"30\" minimum=\"3\"/>"; //$NON-NLS-1$
+ private static final String SELECTED_TEXT = "<h:inputText value=\"#{user.name}\" required=\"true\"> <f:validateLength maximum=\"30\" minimum=\"3\"/> </h:inputText>"; //$NON-NLS-1$
+ private static final String SELECTED_TEXT2 = "<f:validateLength maximum=\"30\" minimum=\"3\"/>"; //$NON-NLS-1$
+ private SWTBotExt botExt = null;
+ private String sashStatus = "restored";
+
public SelectionBarTest() {
super();
+ botExt = new SWTBotExt();
}
@Override
@@ -41,32 +48,88 @@
return false;
}
- public void testSelectionBarTagsList() throws Throwable {
+ public void testSelectionBarContent () {
SWTBotEditor editor = SWTTestExt.packageExplorer.openFile(JBT_TEST_PROJECT_NAME,
- "WebContent", "pages", TEST_PAGE); //$NON-NLS-1$ //$NON-NLS-2$
+ "WebContent", "pages", VPEAutoTestCase.TEST_PAGE); //$NON-NLS-1$ //$NON-NLS-2$
editor.setFocus();
/*
* Navigate to '<h:inputText value="#{user.name}" required="true">'
*/
editor.toTextEditor().navigateTo(18, 10);
- /*
- * Send key press event to fire VPE listeners
- */
- KeyboardHelper.typeKeyCodeUsingAWT(KeyEvent.VK_LEFT);
- /*
- * Click on the tag in the selection bar
- */
- bot.toolbarDropDownButton("h:inputText").click(); //$NON-NLS-1$
-
- String line = editor.toTextEditor().getSelection();
- line = line.replaceAll("\n", ""); //$NON-NLS-1$ //$NON-NLS-2$
- line = line.replaceAll("\r", ""); //$NON-NLS-1$ //$NON-NLS-2$
- line = line.replaceAll("\t", ""); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("<h:inputText> should be selected", SELECTED_TEXT, line); //$NON-NLS-1$
-
- bot.toolbarDropDownButton("h:inputText").menuItem("f:validateLength").click(); //$NON-NLS-1$ //$NON-NLS-2$
- line = editor.toTextEditor().getSelection();
- assertEquals("<f:validateLength> should be selected", SELECTED_TEXT2, line); //$NON-NLS-1$
+ bot.sleep(Timing.time3S());
+ String errorMessage = checkSelectionBarContent();
+ assertNull(errorMessage,errorMessage);
+ maximizeVisualPane(botExt, VPEAutoTestCase.TEST_PAGE);
+ sashStatus = "VisualPageMaximized";
+ errorMessage = checkSelectionBarContent();
+ assertNull(errorMessage,errorMessage);
+ maximizeSourcePane(botExt, VPEAutoTestCase.TEST_PAGE);
+ sashStatus = "SourcePageMaximized";
+ errorMessage = checkSelectionBarContent();
+ assertNull(errorMessage,errorMessage);
+ restoreVisualPane(botExt, VPEAutoTestCase.TEST_PAGE);
+ sashStatus = "restored";
+
}
+ public void testSelectionBarButtonSelection () {
+ SWTBotEditor editor = SWTTestExt.packageExplorer.openFile(JBT_TEST_PROJECT_NAME,
+ "WebContent", "pages", TEST_PAGE); //$NON-NLS-1$ //$NON-NLS-2$
+ editor.setFocus();
+ /*
+ * Navigate to '<h:inputText value="#{user.name}" required="true">'
+ */
+ editor.toTextEditor().navigateTo(18, 10);
+ /*
+ * Send key press event to fire VPE listeners
+ */
+ KeyboardHelper.typeKeyCodeUsingAWT(KeyEvent.VK_LEFT);
+ /*
+ * Click on the tag in the selection bar
+ */
+ bot.toolbarDropDownButton("h:inputText").click(); //$NON-NLS-1$
+
+ String line = editor.toTextEditor().getSelection();
+ line = line.replaceAll("\n", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ line = line.replaceAll("\r", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ line = line.replaceAll("\t", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("<h:inputText> should be selected", SELECTED_TEXT, line); //$NON-NLS-1$
+
+ bot.toolbarDropDownButton("h:inputText").menuItem("f:validateLength").click(); //$NON-NLS-1$ //$NON-NLS-2$
+ line = editor.toTextEditor().getSelection();
+ assertEquals("<f:validateLength> should be selected", SELECTED_TEXT2, line); //$NON-NLS-1$
+ }
+ /**
+ * Checks if Selection Bar has proper buttons
+ * @return error message when Selection Bar has wrong content
+ */
+ private String checkSelectionBarContent () {
+ String errorMessage = null;
+ String buttonLabel = "html";
+ try {
+ bot.toolbarDropDownButton(buttonLabel);
+ buttonLabel = "body";
+ bot.toolbarDropDownButton(buttonLabel);
+ buttonLabel = "f:view";
+ bot.toolbarDropDownButton(buttonLabel);
+ buttonLabel = "h:inputText";
+ bot.toolbarDropDownButton(buttonLabel);
+ } catch (WidgetNotFoundException wnfe){
+ errorMessage = "Selection Bar has to contain Drop Down Button with label "
+ + buttonLabel
+ + " but it doesn't.";
+ }
+
+ return errorMessage;
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ if (sashStatus.equals("VisualPageMaximized")){
+ restoreSourcePane(botExt, VPEAutoTestCase.TEST_PAGE);
+ } else if (sashStatus.equals("SourcePageMaximized")){
+ restoreVisualPane(botExt, VPEAutoTestCase.TEST_PAGE);
+ }
+ super.tearDown();
+ }
}
14 years, 1 month
JBoss Tools SVN: r27480 - in trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2: view and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2010-12-14 14:53:38 -0500 (Tue, 14 Dec 2010)
New Revision: 27480
Modified:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/sheet/Bpmn2PropertySheetPage.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view/Bpmn2DefinitionsPageImpl.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view/Bpmn2DetailsPageImpl.java
Log:
add delete in details en definitions view, use a different PropertySheetEntry to work around update problem
Modified: trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/sheet/Bpmn2PropertySheetPage.java
===================================================================
--- trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/sheet/Bpmn2PropertySheetPage.java 2010-12-14 19:43:56 UTC (rev 27479)
+++ trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/sheet/Bpmn2PropertySheetPage.java 2010-12-14 19:53:38 UTC (rev 27480)
@@ -1,16 +1,15 @@
package org.jboss.tools.bpmn2.process.diagram.sheet;
import org.eclipse.bpmn2.provider.Bpmn2ItemProviderAdapterFactory;
-import org.eclipse.core.commands.operations.OperationHistoryFactory;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.emf.ui.properties.sections.UndoableModelPropertySheetEntry;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.PropertySheetEntry;
import org.eclipse.ui.views.properties.PropertySheetPage;
import org.jboss.tools.bpmn2.process.diagram.part.Bpmn2DiagramEditor;
@@ -28,8 +27,9 @@
public Bpmn2PropertySheetPage(Bpmn2DiagramEditor editor) {
this.editor = editor;
- UndoableModelPropertySheetEntry root = new UndoableModelPropertySheetEntry(
- OperationHistoryFactory.getOperationHistory());
+ PropertySheetEntry root = new PropertySheetEntry();
+// UndoableModelPropertySheetEntry root = new UndoableModelPropertySheetEntry(
+// OperationHistoryFactory.getOperationHistory());
root.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
setRootEntry(root);
}
Modified: trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view/Bpmn2DefinitionsPageImpl.java
===================================================================
--- trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view/Bpmn2DefinitionsPageImpl.java 2010-12-14 19:43:56 UTC (rev 27479)
+++ trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view/Bpmn2DefinitionsPageImpl.java 2010-12-14 19:53:38 UTC (rev 27480)
@@ -21,9 +21,11 @@
import org.eclipse.emf.edit.command.SetCommand;
import org.eclipse.emf.edit.ui.action.CreateChildAction;
import org.eclipse.emf.edit.ui.action.CreateSiblingAction;
+import org.eclipse.emf.edit.ui.action.DeleteAction;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
@@ -45,6 +47,7 @@
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Tree;
+import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.part.Page;
import org.jboss.tools.bpmn2.process.diagram.part.Bpmn2DiagramEditor;
@@ -73,6 +76,7 @@
private AdapterFactory adapterFactory = new Bpmn2ItemProviderAdapterFactory();
private Menu popupMenu, addChildSubmenu, addSiblingSubmenu;
private SelectedElementObserver selectedElementObserver = new SelectedElementObserver();
+ private ImageDescriptor deleteImageDescriptor;
public Bpmn2DefinitionsPageImpl(Bpmn2DiagramEditor editor) {
this.editor = editor;
@@ -162,8 +166,39 @@
private void populatePopupMenu() {
createAddChildSubmenu();
createAddSiblingSubmenu();
+ if (!(selectedTreeObject instanceof Definitions)) {
+ createSeparator();
+ createDeleteMenuItem();
+ }
}
+ private void createSeparator() {
+ new MenuItem(popupMenu, SWT.SEPARATOR);
+ }
+
+ private ImageDescriptor getDeleteImageDescriptor() {
+ if (deleteImageDescriptor == null) {
+ ISharedImages sharedImages = getSite().getWorkbenchWindow().getWorkbench().getSharedImages();
+ deleteImageDescriptor = sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE);
+ }
+ return deleteImageDescriptor;
+ }
+
+ private void createDeleteMenuItem() {
+ MenuItem deleteMenuItem = new MenuItem(popupMenu, SWT.PUSH);
+ DeleteAction deleteAction = new DeleteAction(editor.getEditingDomain());
+ deleteMenuItem.setText(deleteAction.getText());
+ deleteMenuItem.setImage(getDeleteImageDescriptor().createImage());
+ ArrayList<EObject> selection = new ArrayList<EObject>();
+ selection.add(selectedTreeObject);
+ final Command deleteCommand = deleteAction.createCommand(selection);
+ deleteMenuItem.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ editor.getEditingDomain().getCommandStack().execute(deleteCommand);
+ }
+ });
+ }
+
private void createAddChildSubmenu() {
MenuItem addChildMenuItem = new MenuItem(popupMenu, SWT.CASCADE);
addChildMenuItem.setText("&New Child");
Modified: trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view/Bpmn2DetailsPageImpl.java
===================================================================
--- trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view/Bpmn2DetailsPageImpl.java 2010-12-14 19:43:56 UTC (rev 27479)
+++ trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/view/Bpmn2DetailsPageImpl.java 2010-12-14 19:53:38 UTC (rev 27480)
@@ -18,11 +18,13 @@
import org.eclipse.emf.edit.command.SetCommand;
import org.eclipse.emf.edit.ui.action.CreateChildAction;
import org.eclipse.emf.edit.ui.action.CreateSiblingAction;
+import org.eclipse.emf.edit.ui.action.DeleteAction;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
@@ -44,6 +46,7 @@
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Tree;
+import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.part.IPageSite;
import org.eclipse.ui.part.Page;
@@ -83,6 +86,7 @@
private AdapterFactory adapterFactory = new Bpmn2ItemProviderAdapterFactory();
private Menu popupMenu, addChildSubmenu, addSiblingSubmenu;
private SelectedElementObserver selectedElementObserver = new SelectedElementObserver();
+ private ImageDescriptor deleteImageDescriptor;
public Bpmn2DetailsPageImpl(Bpmn2DiagramEditor editor) {
this.editor = editor;
@@ -157,8 +161,43 @@
private void populatePopupMenu() {
createAddChildSubmenu();
createAddSiblingSubmenu();
+ if (!rootSelected()) {
+ createSeparator();
+ createDeleteMenuItem();
+ }
}
+ private boolean rootSelected() {
+ return selectedTreeObject == selectedEditorObject;
+ }
+
+ private void createSeparator() {
+ new MenuItem(popupMenu, SWT.SEPARATOR);
+ }
+
+ private ImageDescriptor getDeleteImageDescriptor() {
+ if (deleteImageDescriptor == null) {
+ ISharedImages sharedImages = getSite().getWorkbenchWindow().getWorkbench().getSharedImages();
+ deleteImageDescriptor = sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE);
+ }
+ return deleteImageDescriptor;
+ }
+
+ private void createDeleteMenuItem() {
+ MenuItem deleteMenuItem = new MenuItem(popupMenu, SWT.PUSH);
+ DeleteAction deleteAction = new DeleteAction(editor.getEditingDomain());
+ deleteMenuItem.setText(deleteAction.getText());
+ deleteMenuItem.setImage(getDeleteImageDescriptor().createImage());
+ ArrayList<EObject> selection = new ArrayList<EObject>();
+ selection.add(selectedTreeObject);
+ final Command deleteCommand = deleteAction.createCommand(selection);
+ deleteMenuItem.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ editor.getEditingDomain().getCommandStack().execute(deleteCommand);
+ }
+ });
+ }
+
private void createAddChildSubmenu() {
MenuItem addChildMenuItem = new MenuItem(popupMenu, SWT.CASCADE);
addChildMenuItem.setText("&New Child");
@@ -171,7 +210,7 @@
if (descriptor instanceof CommandParameter) {
CommandParameter commandParameter = (CommandParameter)descriptor;
Object value = commandParameter.getValue();
- if (value instanceof FlowElement || value instanceof Artifact || !(value instanceof BaseElement)) continue;
+ if (value instanceof FlowElement || value instanceof Artifact || !(value instanceof EObject)) continue;
actions.add(new CreateChildAction(editor.getEditingDomain(), treeViewer.getSelection(), descriptor));
}
}
@@ -181,7 +220,6 @@
menuItem.setText(action.getText());
menuItem.setImage(action.getImageDescriptor().createImage());
menuItem.addSelectionListener(new SelectionAdapter() {
- @Override
public void widgetSelected(SelectionEvent e) {
action.run();
}
14 years, 1 month
JBoss Tools SVN: r27479 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-12-14 14:43:56 -0500 (Tue, 14 Dec 2010)
New Revision: 27479
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/FileRenameHelper.java
Log:
Fixes for JBDS 4.0.0.Beta2
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/FileRenameHelper.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/FileRenameHelper.java 2010-12-14 19:20:57 UTC (rev 27478)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/FileRenameHelper.java 2010-12-14 19:43:56 UTC (rev 27479)
@@ -95,6 +95,7 @@
return "Renamed File " + newFileName + " was not found.";
}
// Editor Title was renamed
+ bot.sleep(Timing.time2S());
try{
bot.editorByTitle(newFileName);
}catch (WidgetNotFoundException wnfe) {
14 years, 1 month