JBoss Tools SVN: r21194 - branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-04-01 10:41:29 -0400 (Thu, 01 Apr 2010)
New Revision: 21194
Removed:
branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipBaseTest.java
branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipBaseTestCase.java
Log:
refactored to AbstractZipTestCase
Deleted: branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipBaseTest.java
===================================================================
--- branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipBaseTest.java 2010-04-01 14:37:08 UTC (rev 21193)
+++ branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipBaseTest.java 2010-04-01 14:41:29 UTC (rev 21194)
@@ -1,37 +0,0 @@
-package org.jboss.tools.common.zip.test;
-
-import java.io.File;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Platform;
-
-import junit.framework.TestCase;
-
-public class ZipBaseTest extends TestCase {
-
- public static final String JAVA_IO_TMPDIR = "java.io.tmpdir";
- public static final String ORG_ECLIPSE_CORE_RUNTIME_ID = "org.eclipse.core.runtime";
-
- private File zip;
- private File temp;
-
- @Override
- protected void setUp() throws Exception {
- zip = FileLocator.getBundleFile(Platform.getBundle(ORG_ECLIPSE_CORE_RUNTIME_ID));
- temp = new File(System.getProperty(JAVA_IO_TMPDIR));
- }
-
- @Override
- protected void tearDown() throws Exception {
- zip = null;
- temp = null;
- }
-
- public File getZip() {
- return zip;
- }
-
- public File getTemp() {
- return temp;
- }
-}
Deleted: branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipBaseTestCase.java
===================================================================
--- branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipBaseTestCase.java 2010-04-01 14:37:08 UTC (rev 21193)
+++ branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipBaseTestCase.java 2010-04-01 14:41:29 UTC (rev 21194)
@@ -1,37 +0,0 @@
-package org.jboss.tools.common.zip.test;
-
-import java.io.File;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Platform;
-
-import junit.framework.TestCase;
-
-public class ZipBaseTestCase extends TestCase {
-
- public static final String JAVA_IO_TMPDIR = "java.io.tmpdir";
- public static final String ORG_ECLIPSE_CORE_RUNTIME_ID = "org.eclipse.core.runtime";
-
- private File zip;
- private File temp;
-
- @Override
- protected void setUp() throws Exception {
- zip = FileLocator.getBundleFile(Platform.getBundle(ORG_ECLIPSE_CORE_RUNTIME_ID));
- temp = new File(System.getProperty(JAVA_IO_TMPDIR));
- }
-
- @Override
- protected void tearDown() throws Exception {
- zip = null;
- temp = null;
- }
-
- public File getZip() {
- return zip;
- }
-
- public File getTemp() {
- return temp;
- }
-}
14 years, 9 months
JBoss Tools SVN: r21193 - branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-04-01 10:37:08 -0400 (Thu, 01 Apr 2010)
New Revision: 21193
Added:
branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/AbstractZipTestCase.java
Modified:
branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/UnzipOperationTest.java
branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipArchiveTest.java
Log:
rename to avoid maven executing base classes for tests as tests
Copied: branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/AbstractZipTestCase.java (from rev 21192, branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipBaseTestCase.java)
===================================================================
--- branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/AbstractZipTestCase.java (rev 0)
+++ branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/AbstractZipTestCase.java 2010-04-01 14:37:08 UTC (rev 21193)
@@ -0,0 +1,37 @@
+package org.jboss.tools.common.zip.test;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+
+import junit.framework.TestCase;
+
+public class AbstractZipTestCase extends TestCase {
+
+ public static final String JAVA_IO_TMPDIR = "java.io.tmpdir";
+ public static final String ORG_ECLIPSE_CORE_RUNTIME_ID = "org.eclipse.core.runtime";
+
+ private File zip;
+ private File temp;
+
+ @Override
+ protected void setUp() throws Exception {
+ zip = FileLocator.getBundleFile(Platform.getBundle(ORG_ECLIPSE_CORE_RUNTIME_ID));
+ temp = new File(System.getProperty(JAVA_IO_TMPDIR));
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ zip = null;
+ temp = null;
+ }
+
+ public File getZip() {
+ return zip;
+ }
+
+ public File getTemp() {
+ return temp;
+ }
+}
Property changes on: branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/AbstractZipTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/UnzipOperationTest.java
===================================================================
--- branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/UnzipOperationTest.java 2010-04-01 14:31:16 UTC (rev 21192)
+++ branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/UnzipOperationTest.java 2010-04-01 14:37:08 UTC (rev 21193)
@@ -9,7 +9,7 @@
import org.eclipse.core.runtime.Platform;
import org.jboss.tools.common.zip.UnzipOperation;
-public class UnzipOperationTest extends ZipBaseTestCase {
+public class UnzipOperationTest extends AbstractZipTestCase {
private static final String ORG_PACKAGE_FILTER = "org.*";
Modified: branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipArchiveTest.java
===================================================================
--- branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipArchiveTest.java 2010-04-01 14:31:16 UTC (rev 21192)
+++ branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipArchiveTest.java 2010-04-01 14:37:08 UTC (rev 21193)
@@ -21,7 +21,7 @@
* @author eskimo
*
*/
-public class ZipArchiveTest extends ZipBaseTestCase {
+public class ZipArchiveTest extends AbstractZipTestCase {
/**
* Test method for {@link org.jboss.tools.common.zip.ZipArchive#ZipArchive(java.lang.String)}.
14 years, 9 months
JBoss Tools SVN: r21192 - branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-04-01 10:31:16 -0400 (Thu, 01 Apr 2010)
New Revision: 21192
Added:
branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipBaseTestCase.java
Modified:
branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/UnzipOperationTest.java
branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipArchiveTest.java
Log:
rename to avoid maven executing base classes for tests as tests
Modified: branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/UnzipOperationTest.java
===================================================================
--- branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/UnzipOperationTest.java 2010-04-01 13:48:28 UTC (rev 21191)
+++ branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/UnzipOperationTest.java 2010-04-01 14:31:16 UTC (rev 21192)
@@ -9,7 +9,7 @@
import org.eclipse.core.runtime.Platform;
import org.jboss.tools.common.zip.UnzipOperation;
-public class UnzipOperationTest extends ZipBaseTest {
+public class UnzipOperationTest extends ZipBaseTestCase {
private static final String ORG_PACKAGE_FILTER = "org.*";
Modified: branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipArchiveTest.java
===================================================================
--- branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipArchiveTest.java 2010-04-01 13:48:28 UTC (rev 21191)
+++ branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipArchiveTest.java 2010-04-01 14:31:16 UTC (rev 21192)
@@ -21,7 +21,7 @@
* @author eskimo
*
*/
-public class ZipArchiveTest extends ZipBaseTest {
+public class ZipArchiveTest extends ZipBaseTestCase {
/**
* Test method for {@link org.jboss.tools.common.zip.ZipArchive#ZipArchive(java.lang.String)}.
Copied: branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipBaseTestCase.java (from rev 21090, branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipBaseTest.java)
===================================================================
--- branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipBaseTestCase.java (rev 0)
+++ branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipBaseTestCase.java 2010-04-01 14:31:16 UTC (rev 21192)
@@ -0,0 +1,37 @@
+package org.jboss.tools.common.zip.test;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+
+import junit.framework.TestCase;
+
+public class ZipBaseTestCase extends TestCase {
+
+ public static final String JAVA_IO_TMPDIR = "java.io.tmpdir";
+ public static final String ORG_ECLIPSE_CORE_RUNTIME_ID = "org.eclipse.core.runtime";
+
+ private File zip;
+ private File temp;
+
+ @Override
+ protected void setUp() throws Exception {
+ zip = FileLocator.getBundleFile(Platform.getBundle(ORG_ECLIPSE_CORE_RUNTIME_ID));
+ temp = new File(System.getProperty(JAVA_IO_TMPDIR));
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ zip = null;
+ temp = null;
+ }
+
+ public File getZip() {
+ return zip;
+ }
+
+ public File getTemp() {
+ return temp;
+ }
+}
Property changes on: branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/zip/test/ZipBaseTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 9 months
JBoss Tools SVN: r21191 - in branches/modular_build/bpel/features: org.jboss.tools.bpel.tests.sdk.feature and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-04-01 09:48:28 -0400 (Thu, 01 Apr 2010)
New Revision: 21191
Added:
branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/feature.properties
branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/feature.xml
branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/license.html
Modified:
branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.sdk.feature/feature.properties
Log:
split bpel tests into core feature and Athena-friendly SDK feature (includes o.e.test and other reqs)
Added: branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/feature.properties
===================================================================
--- branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/feature.properties (rev 0)
+++ branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/feature.properties 2010-04-01 13:48:28 UTC (rev 21191)
@@ -0,0 +1,27 @@
+# properties file for org.jboss.tools.bpel.*.test*
+featureName=JBoss BPEL Editor Tests
+featureProvider=JBoss by Red Hat
+
+# "updateSiteName" property - label for the update site
+updateSiteName=JBossTools Update Site
+
+# "description" property - description of the feature
+description=JBoss BPEL Editor Tests
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# START NON-TRANSLATABLE
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=Red Hat, Inc. licenses these features and plugins to you under
+certain open source licenses (or aggregations of such licenses), which
+in a particular case may include the Eclipse Public License, the GNU
+Lesser General Public License, and/or certain other open source
+licenses. For precise licensing details, consult the corresponding
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+Raleigh NC 27606 USA.
+# END NON-TRANSLATABLE
+########### end of license property ##########################################
+
\ No newline at end of file
Property changes on: branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/feature.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/feature.xml
===================================================================
--- branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/feature.xml (rev 0)
+++ branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/feature.xml 2010-04-01 13:48:28 UTC (rev 21191)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.bpel.tests.feature"
+ label="%featureName"
+ version="1.0.0.qualifier"
+ provider-name="%featureProvider"
+ image="eclipse_update_120.jpg">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <includes
+ id="org.jboss.tools.bpel.tests.feature"
+ version="0.0.0"/>
+
+ <requires>
+ <import plugin="org.junit" version="3.8.1" match="compatible"/>
+ <import plugin="org.eclipse.core.runtime" version="3.3.0" match="compatible"/>
+ <import plugin="org.eclipse.core.resources" version="3.3.0" match="compatible"/>
+ <import plugin="org.apache.ant"/>
+ <import plugin="org.eclipse.ant.core" version="3.1.100" match="compatible"/>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.ui.ide"/>
+ <import plugin="org.eclipse.ui.ide.application"/>
+ <import plugin="org.eclipse.core.resources" version="3.2.0" match="compatible"/>
+ <import plugin="org.eclipse.core.runtime" version="3.2.0" match="compatible"/>
+ <import plugin="org.eclipse.equinox.app"/>
+ <import plugin="org.eclipse.debug.core" version="3.2.0" match="compatible"/>
+ <import plugin="org.junit" version="3.8.2" match="greaterOrEqual"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.ant.optional.junit"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"/>
+
+ <plugin
+ id="org.eclipse.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.jboss.tools.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.jboss.tools.common.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.jboss.tools.bpel.ui.test.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+</feature>
Property changes on: branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/feature.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/license.html
===================================================================
--- branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/license.html (rev 0)
+++ branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/license.html 2010-04-01 13:48:28 UTC (rev 21191)
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+
+<body>
+<p>Red Hat, Inc. licenses these features and plugins to you under
+certain open source licenses (or aggregations of such licenses), which
+in a particular case may include the Eclipse Public License, the GNU
+Lesser General Public License, and/or certain other open source
+licenses. For precise licensing details, consult the corresponding
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+Raleigh NC 27606 USA.
+</p>
+</body>
+</html>
\ No newline at end of file
Property changes on: branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/license.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.sdk.feature/feature.properties
===================================================================
--- branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.sdk.feature/feature.properties 2010-04-01 13:45:12 UTC (rev 21190)
+++ branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.sdk.feature/feature.properties 2010-04-01 13:48:28 UTC (rev 21191)
@@ -6,7 +6,7 @@
updateSiteName=JBossTools Update Site
# "description" property - description of the feature
-description=JBoss BPEL Editor Tests
+description=JBoss BPEL Editor Tests SDK (includes sources and dependencies)
# "licenseURL" property - URL of the "Feature License"
# do not translate value - just change to point to a locale-specific HTML page
14 years, 9 months
JBoss Tools SVN: r21190 - in branches/modular_build/bpel/features: org.jboss.tools.bpel.tests.feature and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-04-01 09:45:12 -0400 (Thu, 01 Apr 2010)
New Revision: 21190
Added:
branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/
branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/build.properties
Log:
split bpel tests into core feature and Athena-friendly SDK feature (includes o.e.test and other reqs)
Added: branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/build.properties
===================================================================
--- branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/build.properties (rev 0)
+++ branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/build.properties 2010-04-01 13:45:12 UTC (rev 21190)
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+ feature.properties,\
+ license.html
Property changes on: branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 9 months
JBoss Tools SVN: r21189 - in branches/modular_build/bpel/features: org.jboss.tools.bpel.tests.sdk.feature and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-04-01 09:44:38 -0400 (Thu, 01 Apr 2010)
New Revision: 21189
Added:
branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.sdk.feature/
Removed:
branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/
Modified:
branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.sdk.feature/feature.properties
branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.sdk.feature/feature.xml
Log:
split bpel tests into core feature and Athena-friendly SDK feature (includes o.e.test and other reqs)
Copied: branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.sdk.feature (from rev 21096, branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature)
Modified: branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.sdk.feature/feature.properties
===================================================================
--- branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/feature.properties 2010-03-28 17:43:05 UTC (rev 21096)
+++ branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.sdk.feature/feature.properties 2010-04-01 13:44:38 UTC (rev 21189)
@@ -1,5 +1,5 @@
# properties file for org.jboss.tools.bpel.*.test*
-featureName=JBoss BPEL Editor Tests
+featureName=JBoss BPEL Editor Tests SDK
featureProvider=JBoss by Red Hat
# "updateSiteName" property - label for the update site
Modified: branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.sdk.feature/feature.xml
===================================================================
--- branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.feature/feature.xml 2010-03-28 17:43:05 UTC (rev 21096)
+++ branches/modular_build/bpel/features/org.jboss.tools.bpel.tests.sdk.feature/feature.xml 2010-04-01 13:44:38 UTC (rev 21189)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
- id="org.jboss.tools.bpel.tests.feature"
+ id="org.jboss.tools.bpel.tests.sdk.feature"
label="%featureName"
version="1.0.0.qualifier"
provider-name="%featureProvider"
@@ -37,6 +37,10 @@
<import plugin="org.junit" version="3.8.2" match="greaterOrEqual"/>
</requires>
+ <includes
+ id="org.jboss.tools.bpel.tests.feature"
+ version="0.0.0"/>
+
<plugin
id="org.eclipse.ant.optional.junit"
download-size="0"
@@ -63,12 +67,6 @@
version="0.0.0"/>
<plugin
- id="org.jboss.tools.bpel.ui.test"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
id="org.jboss.tools.bpel.ui.test.source"
download-size="0"
install-size="0"
14 years, 9 months
JBoss Tools SVN: r21188 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe: editor/util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-04-01 09:30:15 -0400 (Thu, 01 Apr 2010)
New Revision: 21188
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DraggablePattern.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5042
Enhance DnD support in VPE:
- Now the element being dragged is shown in Drag&Drop session.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DraggablePattern.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DraggablePattern.java 2010-04-01 12:50:02 UTC (rev 21187)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DraggablePattern.java 2010-04-01 13:30:15 UTC (rev 21188)
@@ -17,7 +17,6 @@
import org.jboss.tools.vpe.xulrunner.editor.XulRunnerVpeUtils;
import org.mozilla.interfaces.nsIDOMCSSStyleDeclaration;
import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMElementCSSInlineStyle;
import org.mozilla.interfaces.nsIDOMMouseEvent;
import org.mozilla.interfaces.nsIDOMNode;
@@ -28,22 +27,32 @@
*/
public class DraggablePattern {
private static final String DRAGGING_OPACITY = "0.5"; //$NON-NLS-1$
+ private static final int ICON_HEIGHT = 20;
private static final String DRAG_ICON_ID = "dragIcon"; //$NON-NLS-1$
private static final String DRAG_ICON_FILE = "dragIcon.gif"; //$NON-NLS-1$
- private static final String DEFAULT_DISPLAY = ""; //$NON-NLS-1$
- private static final String NONE_DISPLAY = "none"; //$NON-NLS-1$
private static final String ABSOLUTE_POSITION = "absolute"; //$NON-NLS-1$
private static final String IMPORTANT_PRIORITY = "important"; //$NON-NLS-1$
- private static final String DEFAULT_PRIORITY = ""; //$NON-NLS-1$
- private static final String DRAG_ICON_STYLE
- = "display:none; position: absolute; cursor: move"; //$NON-NLS-1$
+
+ /** @see #getTransparentDiv() */
+ private static final String TRANSPARENT_DIV_ID = "transparentDragDiv"; //$NON-NLS-1$
+ /** @see #getTransparentDiv() */
+ private static final int TRANSPARENT_DIV_SIZE = 360;
+ /** @see #getTransparentDiv() */
+ private static final String TRANSPARENT_DIV_STYLE
+ = "background-color: rgba(255, 0, 0, 0.0);" //$NON-NLS-1$
+ + "height:"+TRANSPARENT_DIV_SIZE+"px;"//$NON-NLS-1$//$NON-NLS-2$
+ + "width:"+TRANSPARENT_DIV_SIZE+"px;" //$NON-NLS-1$//$NON-NLS-2$
+ + "position:absolute;"; //$NON-NLS-1$
+ private static final String DRAG_ICON_STYLE
+ = "display:none;" //$NON-NLS-1$
+ + "position: absolute;" //$NON-NLS-1$
+ + "cursor: move;"; //$NON-NLS-1$
private int offsetX;
private int offsetY;
private boolean sessionStarted;
- private nsIDOMNode nodeCopy;
- private nsIDOMNode node;
- private nsIDOMCSSStyleDeclaration nodeCopyStyle;
+ private nsIDOMElement nodeCopy;
+ private nsIDOMElement node;
private final MozillaEditor mozillaEditor;
public DraggablePattern(MozillaEditor mozillaEditor) {
@@ -51,26 +60,21 @@
this.mozillaEditor = mozillaEditor;
}
- public void showDragIcon(nsIDOMNode node) {
- this.node = node;
- Rectangle bounds = XulRunnerVpeUtils.getElementBounds(node);
- DragIcon dragIcon = getDragIcon();
- dragIcon.setStyleProperty(HTML.STYLE_PARAMETER_DISPLAY,
- DEFAULT_DISPLAY, DEFAULT_PRIORITY);
- dragIcon.setStyleProperty(HTML.STYLE_PARAMETER_LEFT,
- VpeStyleUtil.toPxPosition(bounds.x), DEFAULT_PRIORITY);
- dragIcon.setStyleProperty(HTML.STYLE_PARAMETER_TOP,
- VpeStyleUtil.toPxPosition(bounds.y - 20), DEFAULT_PRIORITY);
+ public void showDragIcon(nsIDOMElement element) {
+ this.node = element;
+ Rectangle bounds = XulRunnerVpeUtils.getElementBounds(element);
+ nsIDOMElement dragIcon = getDragIcon();
+
+ VpeStyleUtil.setElementVisible(dragIcon, true);
+ VpeStyleUtil.moveElementTo(dragIcon, bounds.x, bounds.y - ICON_HEIGHT);
}
public void hideDragIcon() {
this.node = null;
- DragIcon dragIcon = getDragIcon();
- dragIcon.setStyleProperty(HTML.STYLE_PARAMETER_DISPLAY,
- NONE_DISPLAY, DEFAULT_PRIORITY);
+ VpeStyleUtil.setElementVisible(getDragIcon(), false);
}
- public DragIcon getDragIcon() {
+ private nsIDOMElement getDragIcon() {
nsIDOMElement dragIconElement = mozillaEditor.getDomDocument()
.getElementById(DRAG_ICON_ID);
if (dragIconElement == null) {
@@ -84,13 +88,39 @@
VpeStyleUtil.getAbsoluteResourcePathUrl(DRAG_ICON_FILE));
dragIconElement.setAttribute(HTML.ATTR_STYLE, DRAG_ICON_STYLE);
}
- return new DragIcon(dragIconElement);
+ return dragIconElement;
}
+
+
+ /**
+ * This transparent DIV is needed to move the draggable pattern
+ * over empty areas. Without it the dragover event is not fired by
+ * XULRunner.
+ */
+ private nsIDOMElement getTransparentDiv() {
+ nsIDOMElement transparentDiv = mozillaEditor.getDomDocument()
+ .getElementById(TRANSPARENT_DIV_ID);
+ if (transparentDiv == null) {
+ transparentDiv = mozillaEditor.getDomDocument()
+ .createElement(HTML.TAG_DIV);
+ DndUtil.setTemporaryDndElement(transparentDiv, true);
+ mozillaEditor.getDomDocument().getElementsByTagName(HTML.TAG_BODY)
+ .item(0).appendChild(transparentDiv);
+ transparentDiv.setAttribute(HTML.ATTR_ID, TRANSPARENT_DIV_ID);
+ transparentDiv.setAttribute(HTML.ATTR_STYLE, TRANSPARENT_DIV_STYLE);
+ }
+
+ return transparentDiv;
+ }
public boolean isDragIconClicked(nsIDOMMouseEvent mouseEvent) {
- nsIDOMNode targetNode = (nsIDOMNode) mouseEvent.getTarget()
- .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
- return getDragIcon().getElement().equals(targetNode);
+ nsIDOMElement targetElement = (nsIDOMElement) mouseEvent.getTarget()
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ if (targetElement != null) {
+ return DRAG_ICON_ID.equals(targetElement.getAttribute(HTML.ATTR_ID));
+ } else {
+ return false;
+ }
}
public nsIDOMNode getNode() {
@@ -111,90 +141,55 @@
offsetX = nodeBounds.x - mouseStartX;
offsetY = nodeBounds.y - mouseStartY;
- nodeCopy = node.cloneNode(true);
+ nodeCopy = (nsIDOMElement) node.cloneNode(true)
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
if (nodeCopy.getNodeType() == nsIDOMNode.ELEMENT_NODE) {
nsIDOMElement elementCopy = (nsIDOMElement) nodeCopy.queryInterface(
nsIDOMElement.NS_IDOMELEMENT_IID);
DndUtil.setTemporaryDndElement(elementCopy, true);
}
- nodeCopyStyle = ((nsIDOMElementCSSInlineStyle)
- nodeCopy.queryInterface(
- nsIDOMElementCSSInlineStyle
- .NS_IDOMELEMENTCSSINLINESTYLE_IID)).getStyle();
+ nsIDOMCSSStyleDeclaration nodeCopyStyle
+ = VpeStyleUtil.getStyle(nodeCopy);
+
nodeCopyStyle.setProperty(HTML.STYLE_PARAMETER_POSITION,
ABSOLUTE_POSITION, IMPORTANT_PRIORITY);
nodeCopyStyle.setProperty(HTML.STYLE_PARAMETER_OPACITY,
DRAGGING_OPACITY, IMPORTANT_PRIORITY);
+
setVisible(false);
node.getParentNode().appendChild(nodeCopy);
- move(mouseStartX, mouseStartY);
+ moveTo(mouseStartX, mouseStartY);
setVisible(true);
sessionStarted = true;
}
public void closeSession() {
- if (!sessionStarted) {
- new IllegalStateException(
- "Session is already closed."); //$NON-NLS-1$
+ if (sessionStarted) {
+ setVisible(false);
+ nsIDOMNode parent = nodeCopy.getParentNode();
+ if (parent != null) {
+ parent.removeChild(nodeCopy);
+ }
+
+ hideDragIcon();
+ nodeCopy = null;
+ sessionStarted = false;
}
-
- nsIDOMNode parent = nodeCopy.getParentNode();
- if (parent != null) {
- parent.removeChild(nodeCopy);
- }
-
- hideDragIcon();
- nodeCopy = null;
- nodeCopyStyle = null;
- sessionStarted = false;
}
public void setVisible(boolean visible) {
- nodeCopyStyle.setProperty(HTML.STYLE_PARAMETER_DISPLAY,
- visible ? DEFAULT_DISPLAY : NONE_DISPLAY, IMPORTANT_PRIORITY);
- DragIcon dragIcon = getDragIcon();
- dragIcon.setStyleProperty(HTML.STYLE_PARAMETER_DISPLAY,
- visible ? DEFAULT_DISPLAY : NONE_DISPLAY, DEFAULT_PRIORITY);
+ VpeStyleUtil.setElementVisible(nodeCopy, visible);
+ VpeStyleUtil.setElementVisible(getTransparentDiv(), visible);
+ VpeStyleUtil.setElementVisible(getDragIcon(), visible);
}
- public void move(int mouseX, int mouseY) {
- nodeCopyStyle.setProperty(HTML.STYLE_PARAMETER_LEFT,
- VpeStyleUtil.toPxPosition(offsetX + mouseX),
- IMPORTANT_PRIORITY);
- nodeCopyStyle.setProperty(HTML.STYLE_PARAMETER_TOP,
- VpeStyleUtil.toPxPosition(offsetY + mouseY),
- IMPORTANT_PRIORITY);
-
- DragIcon dragIcon = getDragIcon();
- dragIcon.setStyleProperty(HTML.STYLE_PARAMETER_LEFT,
- VpeStyleUtil.toPxPosition(offsetX + mouseX),
- DEFAULT_PRIORITY);
- dragIcon.setStyleProperty(HTML.STYLE_PARAMETER_TOP,
- VpeStyleUtil.toPxPosition(offsetY + mouseY - 20),
- DEFAULT_PRIORITY);
+ public void moveTo(int mouseX, int mouseY) {
+ VpeStyleUtil.moveElementTo(nodeCopy, offsetX + mouseX, offsetY + mouseY);
+ VpeStyleUtil.moveElementTo(getTransparentDiv(),
+ offsetX + mouseX - TRANSPARENT_DIV_SIZE / 2,
+ offsetY + mouseY - TRANSPARENT_DIV_SIZE / 2);
+ VpeStyleUtil.moveElementTo(getDragIcon(),
+ offsetX + mouseX, offsetY + mouseY - ICON_HEIGHT);
}
-
- public class DragIcon {
- private final nsIDOMElement element;
- private final nsIDOMCSSStyleDeclaration style;
-
- public DragIcon(nsIDOMElement element) {
- this.element = element;
- style = VpeStyleUtil.getStyle(element);
- }
-
- public nsIDOMElement getElement() {
- return element;
- }
-
- public nsIDOMCSSStyleDeclaration getStyle() {
- return style;
- }
-
- public void setStyleProperty(String propertyName, String value,
- String priority) {
- style.setProperty(propertyName, value, priority);
- }
- }
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2010-04-01 12:50:02 UTC (rev 21187)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2010-04-01 13:30:15 UTC (rev 21188)
@@ -50,10 +50,12 @@
import org.jboss.tools.vpe.xulrunner.XPCOM;
import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
import org.mozilla.interfaces.nsIComponentManager;
+import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMEvent;
import org.mozilla.interfaces.nsIDOMEventTarget;
import org.mozilla.interfaces.nsIDOMMouseEvent;
+import org.mozilla.interfaces.nsIDOMNSDocument;
import org.mozilla.interfaces.nsIDOMNSUIEvent;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMNodeList;
@@ -113,11 +115,20 @@
.getLastSelectedElement();
// start drag sessionvpe-element
if (isDraggable(selectedElement)) {
+ Point mousePosition = getMousePosition(domEvent);
+ draggablePattern.startSession(mousePosition.x, mousePosition.y);
startDragSession(selectedElement);
+ draggablePattern.closeSession();
domEvent.stopPropagation();
domEvent.preventDefault();
}
}
+
+ private Point getMousePosition(nsIDOMEvent domEvent) {
+ nsIDOMNSUIEvent nsuiEvent = (nsIDOMNSUIEvent)
+ domEvent.queryInterface(nsIDOMNSUIEvent.NS_IDOMNSUIEVENT_IID);
+ return new Point(nsuiEvent.getPageX(), nsuiEvent.getPageY());
+ }
/**
* Calls when drag over event ocure
@@ -126,6 +137,10 @@
public void dragOver(nsIDOMEvent event) {
final nsIDOMMouseEvent mouseEvent =
(nsIDOMMouseEvent) event.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID);
+ if (isInnerDragSession()) {
+ Point mousePosition = getMousePosition(event);
+ draggablePattern.moveTo(mousePosition.x, mousePosition.y);
+ }
final XulRunnerEditor editor = vpeController.getXulRunnerEditor();
new ScrollingSupport(editor).scroll(mouseEvent);
refreshCanDrop(event);
@@ -138,12 +153,13 @@
* @param vpeController
*/
public void dragDrop(nsIDOMEvent domEvent) {
- if(getDragService().getCurrentSession().getSourceDocument()==null) {
+ if(isInnerDragSession()) {
+ // in this case it's is an internal drag
+ draggablePattern.closeSession();
+ innerDrop((nsIDOMMouseEvent)domEvent.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID));
+ } else {
//in this case it's is external drag
externalDrop((nsIDOMMouseEvent)domEvent.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID), VpeController.MODEL_FLAVOR, ""); //$NON-NLS-1$
- } else {
- // in this case it's is an internal drag
- innerDrop((nsIDOMMouseEvent)domEvent.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID));
}
vpeController.onRefresh();
}
@@ -280,6 +296,10 @@
dropCommand.execute(dropData);
}
+ private boolean isInnerDragSession() {
+ return getDragService().getCurrentSession().getSourceDocument() != null;
+ }
+
private boolean isDraggable(nsIDOMElement element) {
vpeController.onHideTooltip();
@@ -749,8 +769,24 @@
int dropOffset = 0;
int mouseX = nsuiEvent.getPageX();
int mouseY = nsuiEvent.getPageY();
- nsIDOMNode originalNode = vpeController.getVisualBuilder()
- .getOriginalTargetNode(event);
+
+ nsIDOMDocument document = vpeController.getVisualBuilder()
+ .getOriginalTargetNode(event).getOwnerDocument();
+
+ nsIDOMNSDocument nsDocument = (nsIDOMNSDocument) document
+ .queryInterface(nsIDOMNSDocument.NS_IDOMNSDOCUMENT_IID);
+ nsIDOMNode originalNode = DndUtil.getElementFromPoint(nsDocument, mouseX, mouseY);
+// if (originalNode != null) {
+// if (dropableArea == null) {
+// dropableArea = new DropableArea(document);
+// dropableArea.setDropSpots(EnumSet.allOf(DropSpot.class));
+// }
+// dropableArea.setNode(originalNode);
+// dropableArea.setHighlightedSpot(mouseX, mouseY);
+// dropableArea.setVisible(true);
+// dropableArea.redraw();
+// }
+
if (originalNode == null || originalNode.getParentNode() == null ||
originalNode.getParentNode().getNodeType() == Node.DOCUMENT_NODE) {
return new VpeVisualInnerDropInfo(null, 0, mouseX, mouseY);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2010-04-01 12:50:02 UTC (rev 21187)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2010-04-01 13:30:15 UTC (rev 21188)
@@ -138,6 +138,7 @@
public static final String VALUE_BLOCK = "block"; //$NON-NLS-1$
public static final String STYLE_PARAMETER_DISPLAY = "display"; //$NON-NLS-1$
+ public static final String STYLE_VALUE_DEFAULT_DISPLAY = ""; //$NON-NLS-1$
public static final String STYLE_VALUE_NONE = "none"; //$NON-NLS-1$
public static final String STYLE_PARAMETER_WIDTH = "width"; //$NON-NLS-1$
public static final String STYLE_PARAMETER_TOP = "top"; //$NON-NLS-1$
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2010-04-01 12:50:02 UTC (rev 21187)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2010-04-01 13:30:15 UTC (rev 21188)
@@ -27,7 +27,6 @@
import org.eclipse.ui.editors.text.ILocationProvider;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.project.IModelNature;
-import org.jboss.tools.common.model.ui.views.navigator.NDeleteAction;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.resref.core.ResourceReference;
import org.jboss.tools.jst.web.project.WebProject;
@@ -40,7 +39,6 @@
import org.mozilla.interfaces.nsIDOMElementCSSInlineStyle;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMNodeList;
-import org.mozilla.interfaces.nsIDebug;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -887,4 +885,29 @@
+ FileUtil.getFile(resolvedValue, file).getLocation()
.toPortableString();
}
-}
\ No newline at end of file
+
+ /**
+ * Applies CSS attributes {@code left:x;top:y;} to the specified
+ * {@code element}.
+ */
+ public static void moveElementTo(nsIDOMElement element, int x, int y) {
+ nsIDOMCSSStyleDeclaration style = VpeStyleUtil.getStyle(element);
+ style.setProperty(HTML.STYLE_PARAMETER_LEFT,
+ VpeStyleUtil.toPxPosition(x), HTML.STYLE_PRIORITY_IMPORTANT);
+ style.setProperty(HTML.STYLE_PARAMETER_TOP,
+ VpeStyleUtil.toPxPosition(y), HTML.STYLE_PRIORITY_IMPORTANT);
+ }
+
+ /**
+ * Applies CSS attribute {@code display} to the specified
+ * {@code element} according to the {@code visible} parameter.
+ */
+ public static void setElementVisible(nsIDOMElement element,
+ boolean visible) {
+ nsIDOMCSSStyleDeclaration style = VpeStyleUtil.getStyle(element);
+ style.setProperty(HTML.STYLE_PARAMETER_DISPLAY,
+ visible ? HTML.STYLE_VALUE_DEFAULT_DISPLAY
+ : HTML.STYLE_VALUE_NONE, HTML.STYLE_PRIORITY_IMPORTANT);
+
+ }
+}
14 years, 9 months
JBoss Tools SVN: r21187 - trunk/hibernatetools/docs/reference/en-US/images/plugins.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-04-01 08:50:02 -0400 (Thu, 01 Apr 2010)
New Revision: 21187
Modified:
trunk/hibernatetools/docs/reference/en-US/images/plugins/plugins_16.png
Log:
JBDS-1175 Primary Key element icon is added in reveng xml editor - screen is updated
Modified: trunk/hibernatetools/docs/reference/en-US/images/plugins/plugins_16.png
===================================================================
(Binary files differ)
14 years, 9 months
JBoss Tools SVN: r21186 - in trunk: jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/check and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2010-04-01 08:26:12 -0400 (Thu, 01 Apr 2010)
New Revision: 21186
Added:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/check/
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/check/ProjectNaturesChecker.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/check/ProjectNaturesInfoDialog.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/util/FileUtil.java
Removed:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesChecker.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesInfoDialog.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JspEditorPlugin.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6125 - natures checker is moved to *jst.jsp plug-in directory.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JspEditorPlugin.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JspEditorPlugin.java 2010-04-01 09:23:01 UTC (rev 21185)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JspEditorPlugin.java 2010-04-01 12:26:12 UTC (rev 21186)
@@ -35,8 +35,10 @@
import org.jboss.tools.common.log.BaseUIPlugin;
import org.jboss.tools.common.log.IPluginLog;
import org.jboss.tools.common.text.xml.XmlEditorPlugin;
+import org.jboss.tools.jst.jsp.check.ProjectNaturesChecker;
import org.jboss.tools.jst.jsp.preferences.JSPOccurrencePreferenceConstants;
import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
/**
* The main plugin class to be used in the desktop.
@@ -279,4 +281,12 @@
}
return fImageDescRegistry;
}
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ ProjectNaturesChecker naturesChecker = ProjectNaturesChecker.getInstance();
+ naturesChecker.dispose();
+ naturesChecker = null;
+ super.stop(context);
+ }
}
\ No newline at end of file
Copied: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/check/ProjectNaturesChecker.java (from rev 21185, trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesChecker.java)
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/check/ProjectNaturesChecker.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/check/ProjectNaturesChecker.java 2010-04-01 12:26:12 UTC (rev 21186)
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 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.jst.jsp.check;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.common.reporting.ProblemReportingHelper;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.util.FileUtil;
+import org.jboss.tools.jst.web.kb.IKbProject;
+import org.jboss.tools.jst.web.kb.internal.KbProject;
+import org.jboss.tools.jst.web.project.WebProject;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class ProjectNaturesChecker implements IResourceChangeListener {
+
+ private static final String SEARCH_CLASS = "javax.faces.webapp.FacesServlet"; //$NON-NLS-1$
+ public static final QualifiedName IS_NATURES_CHECK_NEED = new QualifiedName(
+ "", "Is natures check"); //$NON-NLS-1$ //$NON-NLS-2$
+ public static final QualifiedName IS_JSF_CHECK_NEED = new QualifiedName(
+ "", "Is JSF check"); //$NON-NLS-1$ //$NON-NLS-2$
+ private Set<IProject> projectsCollection;
+ private static final String JSF_NATURE = "JavaServer Faces Nature"; //$NON-NLS-1$
+ private static final String KB_NATURE = "Knowledge Base Nature"; //$NON-NLS-1$
+
+ private static ProjectNaturesChecker checker;
+
+ public static ProjectNaturesChecker getInstance(){
+ if (checker == null) {
+ checker = new ProjectNaturesChecker();
+ }
+ return checker;
+ }
+
+ private ProjectNaturesChecker() {
+ projectsCollection = new HashSet<IProject>(0);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(this,
+ IResourceChangeEvent.POST_CHANGE);
+ }
+
+ public void resourceChanged(final IResourceChangeEvent event) {
+ Display display = Display.getDefault();
+ if (display != null) {
+ display.asyncExec(new Runnable() {
+ public void run() {
+ handleResourceChangeEvent(event);
+ }
+ });
+ }
+ }
+
+ public void checkNatures(IProject project) throws CoreException {
+ if (project == null) {
+ return;
+ }
+ addProject(project);
+ boolean isJSFCheck = true;
+ boolean isNaturesCheck = true;
+ updateProjectPersistentProperties(project);
+ isJSFCheck = Boolean.parseBoolean(project
+ .getPersistentProperty(IS_JSF_CHECK_NEED));
+ isNaturesCheck = Boolean.parseBoolean(project
+ .getPersistentProperty(IS_NATURES_CHECK_NEED));
+ if (isJSFCheck) {
+ if (isNaturesCheck) {
+ String[] missingNatures = getMissingNatures(project);
+ if (missingNatures != null) {
+ KbProject.checkKBBuilderInstalled(project);
+ ProjectNaturesInfoDialog dialog = new ProjectNaturesInfoDialog(
+ missingNatures, project);
+ dialog.open();
+ }
+ }
+ }
+ }
+
+ private String[] getMissingNatures(IProject project) throws CoreException {
+ List<String> missimgNatures = new ArrayList<String>(0);
+ if (project.getNature(IKbProject.NATURE_ID) == null) {
+ missimgNatures.add(JSF_NATURE);
+ }
+ if (project.getNature(WebProject.JSF_NATURE_ID) == null) {
+ missimgNatures.add(KB_NATURE);
+ }
+ if (missimgNatures.size() == 0) {
+ return null;
+ }
+ return missimgNatures.toArray(new String[0]);
+ }
+
+ private void handleResourceChangeEvent(IResourceChangeEvent changeEvent) {
+ IResourceDelta[] affectedChildren = changeEvent.getDelta()
+ .getAffectedChildren();
+ if (affectedChildren == null) {
+ return;
+ }
+ for (int i = 0; i < affectedChildren.length; i++) {
+ IResourceDelta resourceDelta = affectedChildren[i];
+ if (resourceDelta.getResource() instanceof IProject) {
+ IProject project = (IProject) resourceDelta.getResource();
+ if (resourceDelta.getKind() == IResourceDelta.ADDED) {
+ processAddProject(project);
+ continue;
+ }
+ if (resourceDelta.getKind() == IResourceDelta.REMOVED) {
+ processRemoveProject(project);
+ continue;
+ }
+ try {
+ updateProjectJSFPersistents(project);
+ } catch (CoreException e) {
+ ProblemReportingHelper.reportProblem(JspEditorPlugin.PLUGIN_ID, e);
+ }
+ }
+ }
+ }
+
+ private void updateProjectPersistentProperties(IProject project)
+ throws CoreException {
+ if (project.isAccessible()) {
+ String jsfCheckString = project
+ .getPersistentProperty(IS_JSF_CHECK_NEED);
+ if (jsfCheckString == null) {
+ updateProjectJSFPersistents(project);
+ }
+ if (project.getPersistentProperty(IS_NATURES_CHECK_NEED) == null) {
+ project.setPersistentProperty(IS_NATURES_CHECK_NEED, "true"); //$NON-NLS-1$
+ }
+ }
+ }
+
+ public IProject getProject(IProject project) {
+ return projectsCollection.contains(project) ? project : null;
+ }
+
+ public void addProject(IProject project) {
+ if (getProject(project) == null) {
+ projectsCollection.add(project);
+ }
+ }
+
+ public void dispose() {
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
+ projectsCollection.clear();
+ }
+
+ private void processAddProject(IProject project) {
+ addProject(project);
+ try {
+ updateProjectJSFPersistents(project);
+ } catch (CoreException e) {
+ ProblemReportingHelper.reportProblem(JspEditorPlugin.PLUGIN_ID, e);
+ }
+ }
+
+ private void processRemoveProject(IProject project) {
+ projectsCollection.remove(project);
+ }
+
+ private void updateProjectJSFPersistents(IProject project)
+ throws CoreException {
+ if (project.isAccessible()) {
+ try {
+ IJavaElement javaElement = FileUtil.searchForClass(JavaCore
+ .create(project), SEARCH_CLASS);
+ if (javaElement == null) {
+ project.setPersistentProperty(IS_JSF_CHECK_NEED, "false"); //$NON-NLS-1$
+ } else {
+ project.setPersistentProperty(IS_JSF_CHECK_NEED, "true"); //$NON-NLS-1$
+ }
+ } catch (CoreException e) {
+ project.setPersistentProperty(IS_JSF_CHECK_NEED, "false"); //$NON-NLS-1$
+ }
+ }
+ }
+
+}
Copied: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/check/ProjectNaturesInfoDialog.java (from rev 21185, trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesInfoDialog.java)
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/check/ProjectNaturesInfoDialog.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/check/ProjectNaturesInfoDialog.java 2010-04-01 12:26:12 UTC (rev 21186)
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 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.jst.jsp.check;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+import org.jboss.tools.common.reporting.ProblemReportingHelper;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.messages.JstUIMessages;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class ProjectNaturesInfoDialog extends MessageDialog {
+
+ private Button button;
+ private Link link;
+ private boolean isRemember = false;
+ private static final String QUESTION = "Do not show this dialog again!"; //$NON-NLS-1$
+ private static final String TITLE = "Missing Natures"; //$NON-NLS-1$
+ private IProject project;
+
+ public ProjectNaturesInfoDialog(String[] missingNatures, IProject project) {
+ super(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ TITLE, null, "", INFORMATION, //$NON-NLS-1$
+ new String[] { IDialogConstants.OK_LABEL }, 0);
+ this.project = project;
+ message = getMessageInfo(missingNatures, project);
+ }
+
+ @Override
+ protected Control createCustomArea(Composite parent) {
+
+ GridLayout gridLayout = (GridLayout) parent.getLayout();
+ gridLayout.numColumns = 2;
+ gridLayout.makeColumnsEqualWidth = true;
+ parent.setLayout(gridLayout);
+ button = new Button(parent, SWT.CHECK);
+ GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+ button.setLayoutData(gridData);
+ button.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ isRemember = !isRemember;
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ isRemember = !isRemember;
+ }
+ });
+ button.setText(QUESTION);
+ link = new Link(parent, SWT.NONE);
+ gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
+ gridData.grabExcessHorizontalSpace = true;
+ link.setLayoutData(gridData);
+ link.setText("<A>" + JstUIMessages.DOCS_INFO_LINK_TEXT + "</A>"); //$NON-NLS-1$ //$NON-NLS-2$
+ link.setToolTipText(JstUIMessages.DOCS_INFO_LINK);
+ link.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ processLink(link);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ processLink(link);
+ }
+
+ });
+ return parent;
+ }
+
+ @Override
+ protected void buttonPressed(int buttonId) {
+ if (buttonId == 0) {
+ try {
+ project.setPersistentProperty(
+ ProjectNaturesChecker.IS_NATURES_CHECK_NEED, Boolean
+ .toString(!isRemember));
+ } catch (CoreException e) {
+ }
+ }
+ super.buttonPressed(buttonId);
+ }
+
+ private void processLink(Link link) {
+ BusyIndicator.showWhile(link.getDisplay(), new Runnable() {
+ public void run() {
+ URL theURL = null;
+ ;
+ try {
+ theURL = new URL(JstUIMessages.DOCS_INFO_LINK);
+ } catch (MalformedURLException e) {
+ ProblemReportingHelper.reportProblem(
+ JspEditorPlugin.PLUGIN_ID, e);
+ }
+ IWorkbenchBrowserSupport support = PlatformUI.getWorkbench()
+ .getBrowserSupport();
+ try {
+ support.getExternalBrowser().openURL(theURL);
+ } catch (PartInitException e) {
+ ProblemReportingHelper.reportProblem(
+ JspEditorPlugin.PLUGIN_ID, e);
+ }
+ }
+ });
+ }
+
+ @SuppressWarnings("unused")
+ private String arrayToString(String[] strings) {
+ StringBuilder builder = new StringBuilder(""); //$NON-NLS-1$
+ for (int i = 0; i < strings.length; i++) {
+ builder.append(strings[i] + "\n"); //$NON-NLS-1$
+ }
+ return builder.toString();
+ }
+
+ private String getMessageInfo(String[] missingNatures, IProject project) {
+ String dialogMessage = "JBoss Tools Visual Editor might not fully work in project \"" + project.getName() + //$NON-NLS-1$
+ "\" because it does not have JSF and code completion enabled completely.\n\n"
+ + //$NON-NLS-1$
+ "Please use the Configure menu on the project to enable JSF if "
+ + //$NON-NLS-1$
+ "you want all features of the editor working."; //$NON-NLS-1$
+ return dialogMessage;
+ }
+
+}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java 2010-04-01 09:23:01 UTC (rev 21185)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java 2010-04-01 12:26:12 UTC (rev 21186)
@@ -7,12 +7,13 @@
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.jst.jsp.jspeditor;
import java.util.ArrayList;
import java.util.Iterator;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.util.SafeRunnable;
@@ -32,16 +33,23 @@
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IKeyBindingService;
import org.eclipse.ui.INestableKeyBindingService;
+import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.part.EditorPart;
import org.eclipse.ui.part.MultiPageEditorActionBarContributor;
import org.eclipse.ui.part.MultiPageEditorSite;
import org.eclipse.ui.part.MultiPageSelectionProvider;
import org.jboss.tools.common.core.resources.XModelObjectEditorInput;
+import org.jboss.tools.common.reporting.ProblemReportingHelper;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.check.ProjectNaturesChecker;
+import org.jboss.tools.jst.jsp.preferences.IVpePreferencesPage;
/**
*
@@ -52,6 +60,8 @@
private ArrayList nestedEditors = new ArrayList(3);
+ private ActivationListener activationListener = new ActivationListener();
+
protected JSPMultiPageEditorPart() {
super();
}
@@ -123,6 +133,8 @@
public final void createPartControl(Composite parent) {
this.container = createContainer(parent);
createPages();
+ IWorkbenchWindow window = getSite().getWorkbenchWindow();
+ window.getPartService().addPartListener(activationListener);
// set the active page (page 0 by default), unless it has already been
// done
if (getActivePage() == -1)
@@ -132,6 +144,11 @@
protected abstract IEditorSite createSite(IEditorPart editor);
public void dispose() {
+ if (activationListener != null) {
+ IWorkbenchWindow window = getSite().getWorkbenchWindow();
+ window.getPartService().removePartListener(activationListener);
+ activationListener = null;
+ }
getSite().setSelectionProvider(null);
for (int i = 0; i < nestedEditors.size(); ++i) {
IEditorPart editor = (IEditorPart) nestedEditors.get(i);
@@ -291,7 +308,7 @@
if (service instanceof INestableKeyBindingService) {
final INestableKeyBindingService nestableService = (INestableKeyBindingService) service;
nestableService.activateKeyBindingService(null);
- }
+ }
return;
}
@@ -327,4 +344,58 @@
protected void setPageText(int pageIndex, String text) {
getItem(pageIndex).setText(text);
}
+
+ private void checkNaturesFromPart(IWorkbenchPart part) throws CoreException {
+ if (part == this) {
+ IEditorInput editorInput = getEditorInput();
+ if (editorInput instanceof IFileEditorInput) {
+ ProjectNaturesChecker.getInstance()
+ .checkNatures(
+ ((IFileEditorInput) editorInput).getFile()
+ .getProject());
+ }
+ }
+ }
+
+ private class ActivationListener implements IPartListener {
+
+ public void partActivated(IWorkbenchPart part) {
+
+ }
+
+ public void partBroughtToTop(IWorkbenchPart part) {
+
+ }
+
+ public void partClosed(IWorkbenchPart part) {
+
+ }
+
+ public void partDeactivated(IWorkbenchPart part) {
+
+ }
+
+ public void partOpened(IWorkbenchPart part) {
+ boolean isCheck = true;
+ String isCheckString = System
+ .getProperty("org.jboss.tools.vpe.ENABLE_PROJECT_NATURES_CHECKER"); //$NON-NLS-1$
+ if (isCheckString != null) {
+ isCheck = Boolean.parseBoolean(isCheckString);
+ }
+ if (isCheck) {
+ if (JspEditorPlugin
+ .getDefault()
+ .getPreferenceStore()
+ .getBoolean(
+ IVpePreferencesPage.INFORM_WHEN_PROJECT_MIGHT_NOT_BE_CONFIGURED_PROPERLY_FOR_VPE)) {
+ try {
+ checkNaturesFromPart(part);
+ } catch (CoreException e) {
+ ProblemReportingHelper.reportProblem(
+ JspEditorPlugin.PLUGIN_ID, e);
+ }
+ }
+ }
+ }
+ }
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java 2010-04-01 09:23:01 UTC (rev 21185)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java 2010-04-01 12:26:12 UTC (rev 21186)
@@ -120,4 +120,7 @@
public static String CSS_REMOVE_CSS_CLASS_TIP;
public static String CSS_MOVE_UP_CSS_CLASS_TIP;
public static String CSS_MOVE_DOWN_CSS_CLASS_TIP;
+ public static String INFORM_WHEN_PROJECT_MIGHT_NOT_BE_CONFIGURED_PROPERLY_FOR_VPE;
+ public static String DOCS_INFO_LINK;
+ public static String DOCS_INFO_LINK_TEXT;
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties 2010-04-01 09:23:01 UTC (rev 21185)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties 2010-04-01 12:26:12 UTC (rev 21186)
@@ -96,4 +96,8 @@
JSPDialogContentProposalProvider_NewELExpression=New EL Expression
PROPERTY_NAME_COLUMN=Attribute
-PROPERTY_VALUE_COLUMN=Value
\ No newline at end of file
+PROPERTY_VALUE_COLUMN=Value
+
+INFORM_WHEN_PROJECT_MIGHT_NOT_BE_CONFIGURED_PROPERLY_FOR_VPE=Inform when a project might not be configured properly for Visual Page Editor
+DOCS_INFO_LINK=http://www.jboss.org/community/docs/DOC-10862
+DOCS_INFO_LINK_TEXT=See JBoss Tools Visual Editor FAQ
\ No newline at end of file
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/util/FileUtil.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/util/FileUtil.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/util/FileUtil.java 2010-04-01 12:26:12 UTC (rev 21186)
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 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.jst.jsp.util;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.search.IJavaSearchConstants;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.core.search.SearchEngine;
+import org.eclipse.jdt.core.search.SearchMatch;
+import org.eclipse.jdt.core.search.SearchParticipant;
+import org.eclipse.jdt.core.search.SearchPattern;
+import org.eclipse.jdt.core.search.SearchRequestor;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class FileUtil {
+
+ public static IJavaElement searchForClass(IJavaProject javaProject, String className) throws JavaModelException {
+// Get the search pattern
+ SearchPattern pattern = SearchPattern.createPattern(className, IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE);
+ // Get the search scope
+ IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] { javaProject });
+
+ final List<SearchMatch> matches = new ArrayList<SearchMatch>();
+ // Get the search requestor
+ SearchRequestor requestor = new SearchRequestor() {
+ public void acceptSearchMatch(SearchMatch match) throws CoreException {
+ matches.add(match);
+ }
+ };
+
+ // Search
+ SearchEngine searchEngine = new SearchEngine();
+ try {
+ searchEngine.search(pattern, new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()}, scope, requestor, null);
+ } catch (CoreException ex) {
+ // Ignore
+// ExtensionsPlugin.log(ex);
+ }
+ for (Iterator i = matches.iterator(); i != null && i.hasNext();) {
+ IJavaElement element = (IJavaElement)((SearchMatch)i.next()).getElement();
+ String classQualifiedName = getQualifiedClassName(element);
+ if (className.equals(classQualifiedName))
+ return element;
+ }
+ return javaProject.findType(className, new NullProgressMonitor());
+ }
+
+ private static String getQualifiedClassName(IJavaElement element) {
+ if(element instanceof IType) {
+ return ((IType)element).getFullyQualifiedName('.');
+ }
+ return null;
+ }
+
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2010-04-01 09:23:01 UTC (rev 21185)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2010-04-01 12:26:12 UTC (rev 21186)
@@ -18,7 +18,6 @@
import org.jboss.tools.common.log.BaseUIPlugin;
import org.jboss.tools.common.log.IPluginLog;
import org.jboss.tools.common.reporting.ProblemReportingHelper;
-import org.jboss.tools.vpe.editor.util.ProjectNaturesChecker;
import org.jboss.tools.vpe.xulrunner.browser.XulRunnerBrowser;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -54,9 +53,6 @@
* This method is called when the plug-in is stopped
*/
public void stop(BundleContext context) throws Exception {
- ProjectNaturesChecker naturesChecker = ProjectNaturesChecker.getInstance();
- naturesChecker.dispose();
- naturesChecker = null;
super.stop(context);
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2010-04-01 09:23:01 UTC (rev 21185)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2010-04-01 12:26:12 UTC (rev 21186)
@@ -79,7 +79,6 @@
import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
import org.jboss.tools.vpe.editor.mozilla.MozillaPreview;
import org.jboss.tools.vpe.editor.mozilla.listener.EditorLoadWindowListener;
-import org.jboss.tools.vpe.editor.util.ProjectNaturesChecker;
import org.jboss.tools.vpe.editor.xpl.CustomSashForm;
import org.jboss.tools.vpe.editor.xpl.EditorSettings;
import org.jboss.tools.vpe.editor.xpl.SashSetting;
@@ -121,7 +120,6 @@
private Splitter verticalToolbarSplitter = null;
private Composite verticalToolbarEmpty = null;
private ToolBar toolBar = null;
- private ProjectNaturesChecker naturesChecker;
public StructuredTextEditor getSourceEditor() {
return sourceEditor;
@@ -1016,21 +1014,7 @@
}
public void partOpened(IWorkbenchPart part) {
- boolean isCheck = true;
- String isCheckString = System.getProperty("org.jboss.tools.vpe.ENABLE_PROJECT_NATURES_CHECKER"); //$NON-NLS-1$
- if (isCheckString != null) {
- isCheck = Boolean.parseBoolean(isCheckString);
- }
- if (isCheck) {
- if (JspEditorPlugin.getDefault().getPreferenceStore().
- getBoolean(IVpePreferencesPage.INFORM_WHEN_PROJECT_MIGHT_NOT_BE_CONFIGURED_PROPERLY_FOR_VPE)) {
- try {
- checkNaturesFromPart(part);
- } catch (CoreException e) {
- VpePlugin.getPluginLog().logError(e);
- }
- }
- }
+
}
@Override
@@ -1250,14 +1234,4 @@
}
}
- private void checkNaturesFromPart(IWorkbenchPart part) throws CoreException{
- if (part == multiPageEditor) {
- IEditorInput editorInput = multiPageEditor.getEditorInput();
- if (editorInput instanceof IFileEditorInput) {
- naturesChecker = ProjectNaturesChecker.getInstance();
- naturesChecker.checkNatures(((IFileEditorInput)editorInput).getFile().getProject());
- }
- }
- }
-
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2010-04-01 09:23:01 UTC (rev 21185)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2010-04-01 12:26:12 UTC (rev 21186)
@@ -326,42 +326,4 @@
return inputPath;
}
- public static IJavaElement searchForClass(IJavaProject javaProject, String className) throws JavaModelException {
-// Get the search pattern
- SearchPattern pattern = SearchPattern.createPattern(className, IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE);
- // Get the search scope
- IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] { javaProject });
-
- final List<SearchMatch> matches = new ArrayList<SearchMatch>();
- // Get the search requestor
- SearchRequestor requestor = new SearchRequestor() {
- public void acceptSearchMatch(SearchMatch match) throws CoreException {
- matches.add(match);
- }
- };
-
- // Search
- SearchEngine searchEngine = new SearchEngine();
- try {
- searchEngine.search(pattern, new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()}, scope, requestor, null);
- } catch (CoreException ex) {
- // Ignore
-// ExtensionsPlugin.log(ex);
- }
- for (Iterator i = matches.iterator(); i != null && i.hasNext();) {
- IJavaElement element = (IJavaElement)((SearchMatch)i.next()).getElement();
- String classQualifiedName = getQualifiedClassName(element);
- if (className.equals(classQualifiedName))
- return element;
- }
- return javaProject.findType(className, new NullProgressMonitor());
- }
-
- private static String getQualifiedClassName(IJavaElement element) {
- if(element instanceof IType) {
- return ((IType)element).getFullyQualifiedName('.');
- }
- return null;
- }
-
}
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesChecker.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesChecker.java 2010-04-01 09:23:01 UTC (rev 21185)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesChecker.java 2010-04-01 12:26:12 UTC (rev 21186)
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.vpe.editor.util;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.swt.widgets.Display;
-import org.jboss.tools.jst.web.kb.IKbProject;
-import org.jboss.tools.jst.web.kb.internal.KbProject;
-import org.jboss.tools.jst.web.project.WebProject;
-import org.jboss.tools.vpe.VpePlugin;
-
-/**
- *
- * @author yzhishko
- *
- */
-
-public class ProjectNaturesChecker implements IResourceChangeListener {
-
- private static final String SEARCH_CLASS = "javax.faces.webapp.FacesServlet"; //$NON-NLS-1$
- public static final QualifiedName IS_NATURES_CHECK_NEED = new QualifiedName(
- "", "Is natures check"); //$NON-NLS-1$ //$NON-NLS-2$
- public static final QualifiedName IS_JSF_CHECK_NEED = new QualifiedName(
- "", "Is JSF check"); //$NON-NLS-1$ //$NON-NLS-2$
- private Set<IProject> projectsCollection;
- private static final String JSF_NATURE = "JavaServer Faces Nature"; //$NON-NLS-1$
- private static final String KB_NATURE = "Knowledge Base Nature"; //$NON-NLS-1$
-
- private static ProjectNaturesChecker checker;
-
- public static ProjectNaturesChecker getInstance(){
- if (checker == null) {
- checker = new ProjectNaturesChecker();
- }
- return checker;
- }
-
- private ProjectNaturesChecker() {
- projectsCollection = new HashSet<IProject>(0);
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this,
- IResourceChangeEvent.POST_CHANGE);
- }
-
- public void resourceChanged(final IResourceChangeEvent event) {
- Display display = Display.getDefault();
- if (display != null) {
- display.asyncExec(new Runnable() {
- public void run() {
- handleResourceChangeEvent(event);
- }
- });
- }
- }
-
- public void checkNatures(IProject project) throws CoreException {
- if (project == null) {
- return;
- }
- addProject(project);
- boolean isJSFCheck = true;
- boolean isNaturesCheck = true;
- updateProjectPersistentProperties(project);
- isJSFCheck = Boolean.parseBoolean(project
- .getPersistentProperty(IS_JSF_CHECK_NEED));
- isNaturesCheck = Boolean.parseBoolean(project
- .getPersistentProperty(IS_NATURES_CHECK_NEED));
- if (isJSFCheck) {
- if (isNaturesCheck) {
- String[] missingNatures = getMissingNatures(project);
- if (missingNatures != null) {
- KbProject.checkKBBuilderInstalled(project);
- ProjectNaturesInfoDialog dialog = new ProjectNaturesInfoDialog(
- missingNatures, project);
- dialog.open();
- }
- }
- }
- }
-
- private String[] getMissingNatures(IProject project) throws CoreException {
- List<String> missimgNatures = new ArrayList<String>(0);
- if (project.getNature(IKbProject.NATURE_ID) == null) {
- missimgNatures.add(JSF_NATURE);
- }
- if (project.getNature(WebProject.JSF_NATURE_ID) == null) {
- missimgNatures.add(KB_NATURE);
- }
- if (missimgNatures.size() == 0) {
- return null;
- }
- return missimgNatures.toArray(new String[0]);
- }
-
- private void handleResourceChangeEvent(IResourceChangeEvent changeEvent) {
- IResourceDelta[] affectedChildren = changeEvent.getDelta()
- .getAffectedChildren();
- if (affectedChildren == null) {
- return;
- }
- for (int i = 0; i < affectedChildren.length; i++) {
- IResourceDelta resourceDelta = affectedChildren[i];
- if (resourceDelta.getResource() instanceof IProject) {
- IProject project = (IProject) resourceDelta.getResource();
- if (resourceDelta.getKind() == IResourceDelta.ADDED) {
- processAddProject(project);
- continue;
- }
- if (resourceDelta.getKind() == IResourceDelta.REMOVED) {
- processRemoveProject(project);
- continue;
- }
- try {
- updateProjectJSFPersistents(project);
- } catch (CoreException e) {
- VpePlugin.getPluginLog().logError(e);
- }
- }
- }
- }
-
- private void updateProjectPersistentProperties(IProject project)
- throws CoreException {
- if (project.isAccessible()) {
- String jsfCheckString = project
- .getPersistentProperty(IS_JSF_CHECK_NEED);
- if (jsfCheckString == null) {
- updateProjectJSFPersistents(project);
- }
- if (project.getPersistentProperty(IS_NATURES_CHECK_NEED) == null) {
- project.setPersistentProperty(IS_NATURES_CHECK_NEED, "true"); //$NON-NLS-1$
- }
- }
- }
-
- public IProject getProject(IProject project) {
- return projectsCollection.contains(project) ? project : null;
- }
-
- public void addProject(IProject project) {
- if (getProject(project) == null) {
- projectsCollection.add(project);
- }
- }
-
- public void dispose() {
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
- projectsCollection.clear();
- }
-
- private void processAddProject(IProject project) {
- addProject(project);
- try {
- updateProjectJSFPersistents(project);
- } catch (CoreException e) {
- VpePlugin.getPluginLog().logError(e);
- }
- }
-
- private void processRemoveProject(IProject project) {
- projectsCollection.remove(project);
- }
-
- private void updateProjectJSFPersistents(IProject project)
- throws CoreException {
- if (project.isAccessible()) {
- try {
- IJavaElement javaElement = FileUtil.searchForClass(JavaCore
- .create(project), SEARCH_CLASS);
- if (javaElement == null) {
- project.setPersistentProperty(IS_JSF_CHECK_NEED, "false"); //$NON-NLS-1$
- } else {
- project.setPersistentProperty(IS_JSF_CHECK_NEED, "true"); //$NON-NLS-1$
- }
- } catch (CoreException e) {
- project.setPersistentProperty(IS_JSF_CHECK_NEED, "false"); //$NON-NLS-1$
- }
- }
- }
-
-}
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesInfoDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesInfoDialog.java 2010-04-01 09:23:01 UTC (rev 21185)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesInfoDialog.java 2010-04-01 12:26:12 UTC (rev 21186)
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.vpe.editor.util;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
-import org.jboss.tools.vpe.VpePlugin;
-import org.jboss.tools.vpe.messages.VpeUIMessages;
-
-/**
- *
- * @author yzhishko
- *
- */
-
-public class ProjectNaturesInfoDialog extends MessageDialog {
-
- private Button button;
- private Link link;
- private boolean isRemember = false;
- private static final String QUESTION = "Do not show this dialog again!"; //$NON-NLS-1$
- private static final String TITLE = "Missing Natures"; //$NON-NLS-1$
- private IProject project;
-
- public ProjectNaturesInfoDialog(String[] missingNatures, IProject project) {
- super(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- TITLE, null, "", INFORMATION, //$NON-NLS-1$
- new String[] { IDialogConstants.OK_LABEL }, 0);
- this.project = project;
- message = getMessageInfo(missingNatures, project);
- }
-
- @Override
- protected Control createCustomArea(Composite parent) {
-
- GridLayout gridLayout = (GridLayout) parent.getLayout();
- gridLayout.numColumns = 2;
- gridLayout.makeColumnsEqualWidth = true;
- parent.setLayout(gridLayout);
- button = new Button(parent, SWT.CHECK);
- GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- button.setLayoutData(gridData);
- button.addSelectionListener(new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- isRemember = !isRemember;
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- isRemember = !isRemember;
- }
- });
- button.setText(QUESTION);
- link = new Link(parent, SWT.NONE);
- gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
- gridData.grabExcessHorizontalSpace = true;
- link.setLayoutData(gridData);
- link.setText("<A>" + VpeUIMessages.MOZILLA_LOADING_ERROR_LINK_TEXT + "</A>"); //$NON-NLS-1$ //$NON-NLS-2$
- link.setToolTipText(VpeUIMessages.MOZILLA_LOADING_ERROR_LINK);
- link.addSelectionListener(new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- processLink(link);
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- processLink(link);
- }
-
- });
- return parent;
- }
-
- @Override
- protected void buttonPressed(int buttonId) {
- if (buttonId == 0) {
- try {
- project.setPersistentProperty(ProjectNaturesChecker.IS_NATURES_CHECK_NEED, Boolean.toString(!isRemember));
- } catch (CoreException e) {
- }
- }
- super.buttonPressed(buttonId);
- }
-
- private void processLink(Link link) {
- BusyIndicator.showWhile(link.getDisplay(), new Runnable() {
- public void run() {
- URL theURL = null;
- ;
- try {
- theURL = new URL(VpeUIMessages.MOZILLA_LOADING_ERROR_LINK);
- } catch (MalformedURLException e) {
- VpePlugin.reportProblem(e);
- }
- IWorkbenchBrowserSupport support = PlatformUI.getWorkbench()
- .getBrowserSupport();
- try {
- support.getExternalBrowser().openURL(theURL);
- } catch (PartInitException e) {
- VpePlugin.reportProblem(e);
- }
- }
- });
- }
-
- @SuppressWarnings("unused")
- private String arrayToString(String[] strings){
- StringBuilder builder = new StringBuilder(""); //$NON-NLS-1$
- for (int i = 0; i < strings.length; i++) {
- builder.append(strings[i]+"\n"); //$NON-NLS-1$
- }
- return builder.toString();
- }
-
- private String getMessageInfo(String[] missingNatures, IProject project){
- String dialogMessage = "JBoss Tools Visual Editor might not fully work in project \"" + project.getName() + //$NON-NLS-1$
- "\" because it does not have JSF and code completion enabled completely.\n\n" + //$NON-NLS-1$
- "Please use the Configure menu on the project to enable JSF if " + //$NON-NLS-1$
- "you want all features of the editor working."; //$NON-NLS-1$
- return dialogMessage;
- }
-
-}
14 years, 9 months
JBoss Tools SVN: r21185 - trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2010-04-01 05:23:01 -0400 (Thu, 01 Apr 2010)
New Revision: 21185
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/WSDL2JavaCodeGenConfigWidget.java
Log:
JBIDE-5934: fix a little shortage to trunk
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/WSDL2JavaCodeGenConfigWidget.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/WSDL2JavaCodeGenConfigWidget.java 2010-04-01 09:17:28 UTC (rev 21184)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/WSDL2JavaCodeGenConfigWidget.java 2010-04-01 09:23:01 UTC (rev 21185)
@@ -62,7 +62,6 @@
lblCustomPakage
.setText(JBossWSCreationCoreMessages.Label_Custom_Package_Name);
final Text txtCustomPkgName = new Text(configCom, SWT.BORDER);
- txtCustomPkgName.setText(model.getCustomPackage());
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
txtCustomPkgName.setLayoutData(gd);
@@ -75,6 +74,7 @@
statusListener.handleEvent(null);
}
});
+ txtCustomPkgName.setText(model.getCustomPackage());
// target
new Label(configCom, SWT.NONE)
14 years, 9 months