JBoss Tools SVN: r11963 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-11-22 05:51:55 -0500 (Sat, 22 Nov 2008)
New Revision: 11963
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlComponentDeclaration.java
Log:
Fixed compilation error
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlComponentDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlComponentDeclaration.java 2008-11-22 01:20:06 UTC (rev 11962)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlComponentDeclaration.java 2008-11-22 10:51:55 UTC (rev 11963)
@@ -215,7 +215,8 @@
className = XMLScanner.getImpliedClassName(c, source);
isClassNameGuessed = true;
} else {
- className = XMLScanner.getDefaultClassName(c);
+ // FIXME
+ className = XMLScanner.getDefaultClassName(c, null, null);
isClassNameGuessed = true;
}
}
17 years, 5 months
JBoss Tools SVN: r11962 - trunk/birt/features/org.jboss.tools.birt.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2008-11-21 20:20:06 -0500 (Fri, 21 Nov 2008)
New Revision: 11962
Modified:
trunk/birt/features/org.jboss.tools.birt.feature/feature.properties
trunk/birt/features/org.jboss.tools.birt.feature/feature.xml
Log:
[JBIDE-3239] add birt.integration.wtp.feature to contain birt.integration.wtp.ui plugin, copied to update site (like xulrunner)
Modified: trunk/birt/features/org.jboss.tools.birt.feature/feature.properties
===================================================================
--- trunk/birt/features/org.jboss.tools.birt.feature/feature.properties 2008-11-22 01:19:38 UTC (rev 11961)
+++ trunk/birt/features/org.jboss.tools.birt.feature/feature.properties 2008-11-22 01:20:06 UTC (rev 11962)
@@ -22,7 +22,7 @@
# "updateSiteName" property - label for the update site
updateSiteName=JBossTools Update Site
-birtUpdateSiteName=Business Intellegence and Reporting Tool (BIRT) Updates
+birtUpdateSiteName=Business Intelligence and Reporting Tools (BIRT) Updates
# "description" property - description of the feature
description=JBoss BIRT Integration
Modified: trunk/birt/features/org.jboss.tools.birt.feature/feature.xml
===================================================================
--- trunk/birt/features/org.jboss.tools.birt.feature/feature.xml 2008-11-22 01:19:38 UTC (rev 11961)
+++ trunk/birt/features/org.jboss.tools.birt.feature/feature.xml 2008-11-22 01:20:06 UTC (rev 11962)
@@ -1,52 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.jboss.tools.birt.feature"
- label="%featureName"
- version="1.0.0"
- provider-name="%providerName"
- plugin="org.jboss.tools.birt.oda.ui">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.jboss.org/jbosstools/updates/stable"/>
- <discovery label="%birtUpdateSiteName" url="http://download.eclipse.org/birt/update-site/2.3"/>
- </url>
-
- <requires>
- <import feature="org.eclipse.birt" version="2.3.1.v20080630-7N7Y7AAYdlIXLgz-SLsyMQ21x2fI"/>
- <import feature="org.eclipse.birt.integration.wtp" version="2.3.1.v20080630-4518s733I3J5E"/>
- </requires>
-
- <plugin
- id="org.jboss.tools.birt.oda"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.jboss.tools.birt.oda.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.jboss.tools.birt.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.birt.feature"
+ label="%featureName"
+ version="1.0.0"
+ provider-name="%providerName"
+ plugin="org.jboss.tools.birt.oda.ui">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%updateSiteName" url="http://download.jboss.org/jbosstools/updates/stable"/>
+ <discovery label="%birtUpdateSiteName" url="http://download.eclipse.org/birt/update-site/2.3"/>
+ </url>
+
+ <requires>
+ <import feature="org.eclipse.birt" version="2.3.1"/>
+ <import feature="org.jboss.tools.birt.integration.wtp.feature"/>
+ </requires>
+
+ <plugin
+ id="org.jboss.tools.birt.oda"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.birt.oda.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.birt.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
17 years, 5 months
JBoss Tools SVN: r11961 - trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2008-11-21 20:19:38 -0500 (Fri, 21 Nov 2008)
New Revision: 11961
Modified:
trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/feature.properties
trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/feature.xml
Log:
[JBIDE-3239] add birt.integration.wtp.feature to contain birt.integration.wtp.ui plugin, copied to update site (like xulrunner)
Modified: trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/feature.properties
===================================================================
--- trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/feature.properties 2008-11-22 01:17:13 UTC (rev 11960)
+++ trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/feature.properties 2008-11-22 01:19:38 UTC (rev 11961)
@@ -22,6 +22,7 @@
# "updateSiteName" property - label for the update site
updateSiteName=JBossTools Update Site
+birtUpdateSiteName=Business Intelligence and Reporting Tools (BIRT) Updates
# "description" property - description of the feature
description=JBoss BIRT Web Tools Integration
Modified: trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/feature.xml
===================================================================
--- trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/feature.xml 2008-11-22 01:17:13 UTC (rev 11960)
+++ trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/feature.xml 2008-11-22 01:19:38 UTC (rev 11961)
@@ -19,6 +19,7 @@
<url>
<update label="%updateSiteName" url="http://download.jboss.org/jbosstools/updates/stable"/>
+ <discovery label="%birtUpdateSiteName" url="http://download.eclipse.org/birt/update-site/2.3"/>
</url>
<plugin
17 years, 5 months
JBoss Tools SVN: r11960 - in trunk/birt/features: org.jboss.tools.birt.integration.wtp.feature and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2008-11-21 20:17:13 -0500 (Fri, 21 Nov 2008)
New Revision: 11960
Added:
trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/
trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/.project
trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/build.properties
trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/feature.properties
trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/feature.xml
trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/license.html
Log:
[JBIDE-3239] add birt.integration.wtp.feature to contain birt.integration.wtp.ui plugin, copied to update site (like xulrunner)
Added: trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/.project
===================================================================
--- trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/.project (rev 0)
+++ trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/.project 2008-11-22 01:17:13 UTC (rev 11960)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.birt.integration.wtp.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/build.properties
===================================================================
--- trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/build.properties (rev 0)
+++ trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/build.properties 2008-11-22 01:17:13 UTC (rev 11960)
@@ -0,0 +1,2 @@
+bin.includes = feature.xml,\
+ feature.properties
Added: trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/feature.properties
===================================================================
--- trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/feature.properties (rev 0)
+++ trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/feature.properties 2008-11-22 01:17:13 UTC (rev 11960)
@@ -0,0 +1,41 @@
+###############################################################################
+# Copyright (c) 2008 JBoss, a division of Red Hat and others.
+# All rights reserved. This program and the accompanying materials
+# are 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:
+# JBoss, a division of Red Hat - Initial implementation.
+##############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=JBoss BIRT Web Tools Integration
+
+# "providerName" property - name of the company that provides the feature
+providerName=JBoss, a division of Red Hat
+
+# "updateSiteName" property - label for the update site
+updateSiteName=JBossTools Update Site
+
+# "description" property - description of the feature
+description=JBoss BIRT Web Tools Integration
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=Copyright (c) 2008 JBoss, a division of Red Hat and others.\nAll rights reserved. This program and the accompanying materials\n
+are made available under the terms of the Eclipse Public License v1.0\nwhich accompanies this distribution, and is available at\nhttp\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\nJBoss, a division of Red Hat - Initial implementation.\n
+ ############### end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\nMarch 17, 2005\n\nUsage Of Content\n\nTHE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\nOTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\nUSE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\nAGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\nNOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\nAGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\nAND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\nOR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\nTERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\nOF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\nBELOW, THEN YOU MAY NOT USE THE CONTENT.\n\nApplicable Licenses\n\nUnless otherwise indicated, all Content made available by the Eclipse Foundation\nis provided to you under the terms and conditio!
ns of the Eclipse Public\nLicense Version 1.0 ("EPL"). A copy of the EPL is provided with this\nContent and is also available at http\://www.eclipse.org/legal/epl-v10.html.\nFor purposes of the EPL, "Program" will mean the Content.\n\nContent includes, but is not limited to, source code, object code,\ndocumentation and other files maintained in the Eclipse.org CVS\nrepository ("Repository") in CVS modules ("Modules") and made available\nas downloadable archives ("Downloads").\n\n- Content may be structured and packaged into modules to facilitate delivering,\nextending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\nplug-in fragments ("Fragments"), and features ("Features").\n- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\nin a directory named "plugins".\n- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\nEach Feature may be packaged as a sub-directory in a directory!
named "features".\nWithin a Feature, files named "feature.xml" may co
ntain a list of the names and version\nnumbers of the Plug-ins and/or Fragments associated with that Feature.\n- Features may also include other Features ("Included Features"). Within a Feature, files\nnamed "feature.xml" may contain a list of the names and version numbers of Included Features.\n\nFeatures may also include other Features ("Included Features"). Files named\n"feature.xml" may contain a list of the names and version numbers of\nIncluded Features.\n\nThe terms and conditions governing Plug-ins and Fragments should be\ncontained in files named "about.html" ("Abouts"). The terms and\nconditions governing Features and Included Features should be contained\nin files named "license.html" ("Feature Licenses"). Abouts and Feature\nLicenses may be located in any directory of a Download or Module\nincluding, but not limited to the following locations\:\n\n- The top-level (root) directory\n- Plug-in and Fragment directories\n- Inside Plug-ins and Fragments packaged as JAR!
s\n- Sub-directories of the directory named "src" of certain Plug-ins\n- Feature directories\n\nNote\: if a Feature made available by the Eclipse Foundation is installed using the\nEclipse Update Manager, you must agree to a license ("Feature Update\nLicense") during the installation process. If the Feature contains\nIncluded Features, the Feature Update License should either provide you\nwith the terms and conditions governing the Included Features or inform\nyou where you can locate them. Feature Update Licenses may be found in\nthe "license" property of files named "feature.properties". Such Abouts,\nFeature Licenses and Feature Update Licenses contain the terms and\nconditions (or references to such terms and conditions) that govern your\nuse of the associated Content in that directory.\n\nTHE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\nTO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\nSOME OF THESE OTHER LICENSE AGREEMENTS MA!
Y INCLUDE (BUT ARE NOT LIMITED TO)\:\n\n- Common Public License Versio
n 1.0 (available at http\://www.eclipse.org/legal/cpl-v10.html)\n- Apache Software License 1.1 (available at http\://www.apache.org/licenses/LICENSE)\n- Apache Software License 2.0 (available at http\://www.apache.org/licenses/LICENSE-2.0)\n- IBM Public License 1.0 (available at http\://oss.software.ibm.com/developerworks/opensource/license10.html)\n- Metro Link Public License 1.00 (available at http\://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n- Mozilla Public License Version 1.1 (available at http\://www.mozilla.org/MPL/MPL-1.1.html)\n\nIT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\nTO USE OF THE CONTENT. If no About, Feature License or Feature Update License\nis provided, please contact the Eclipse Foundation to determine what terms and conditions\ngovern that particular Content.\n\nCryptography\n\nContent may contain encryption software. The country in which you are\ncurrently may have restrictions on the import, posse!
ssion, and use,\nand/or re-export to another country, of encryption software. BEFORE\nusing any encryption software, please check the country's laws,\nregulations and policies concerning the import, possession, or use,\nand re-export of encryption software, to see if this is permitted.\n\nJava and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
Added: trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/feature.xml
===================================================================
--- trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/feature.xml (rev 0)
+++ trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/feature.xml 2008-11-22 01:17:13 UTC (rev 11960)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.birt.integration.wtp.feature"
+ label="%featureName"
+ version="0.0.1"
+ provider-name="%providerName">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%updateSiteName" url="http://download.jboss.org/jbosstools/updates/stable"/>
+ </url>
+
+ <plugin
+ id="org.eclipse.birt.integration.wtp.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0">
+
+</feature>
Added: trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/license.html
===================================================================
--- trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/license.html (rev 0)
+++ trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/license.html 2008-11-22 01:17:13 UTC (rev 11960)
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
17 years, 5 months
JBoss Tools SVN: r11959 - in trunk/jmx/plugins: org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-11-21 19:37:55 -0500 (Fri, 21 Nov 2008)
New Revision: 11959
Modified:
trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/DomainWrapper.java
trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/MBeanAttributeInfoWrapper.java
trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/MBeanInfoWrapper.java
trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/DomainNode.java
trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/ObjectNameNode.java
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/dialogs/OpenMBeanSelectionDialog.java
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/MBeanExplorerContentProvider.java
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/QueryContribution.java
Log:
JBIDE-3253 - search bar much improved
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/DomainWrapper.java
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/DomainWrapper.java 2008-11-21 18:30:00 UTC (rev 11958)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/DomainWrapper.java 2008-11-22 00:37:55 UTC (rev 11959)
@@ -47,7 +47,7 @@
for (Iterator iter = set.iterator(); iter.hasNext();) {
ObjectName on = (ObjectName) iter.next();
MBeanInfo info = mbsc.getMBeanInfo(on);
- instances[i] = new MBeanInfoWrapper(on, info, mbsc);
+ instances[i] = new MBeanInfoWrapper(on, info, mbsc, this);
i++;
}
return instances;
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/MBeanAttributeInfoWrapper.java
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/MBeanAttributeInfoWrapper.java 2008-11-21 18:30:00 UTC (rev 11958)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/MBeanAttributeInfoWrapper.java 2008-11-22 00:37:55 UTC (rev 11959)
@@ -38,12 +38,9 @@
}
public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (!super.equals(obj))
- return false;
- if (getClass() != obj.getClass())
- return false;
+ if( !super.equals(obj))
+ return false;
+
final MBeanAttributeInfoWrapper other = (MBeanAttributeInfoWrapper) obj;
if (info == null) {
if (other.info != null)
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/MBeanInfoWrapper.java
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/MBeanInfoWrapper.java 2008-11-21 18:30:00 UTC (rev 11958)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/MBeanInfoWrapper.java 2008-11-22 00:37:55 UTC (rev 11959)
@@ -20,21 +20,25 @@
public class MBeanInfoWrapper implements Comparable {
private final ObjectName on;
-
private final MBeanInfo info;
-
private final MBeanServerConnection mbsc;
+ private final Object parent;
public MBeanInfoWrapper(ObjectName on, MBeanInfo info,
- MBeanServerConnection mbsc) {
+ MBeanServerConnection mbsc, Object parent) {
Assert.isNotNull(on);
Assert.isNotNull(info);
Assert.isNotNull(mbsc);
this.on = on;
this.info = info;
this.mbsc = mbsc;
+ this.parent = parent;
}
+ public Object getParent() {
+ return parent;
+ }
+
public ObjectName getObjectName() {
return on;
}
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/DomainNode.java
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/DomainNode.java 2008-11-21 18:30:00 UTC (rev 11958)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/DomainNode.java 2008-11-22 00:37:55 UTC (rev 11959)
@@ -43,8 +43,7 @@
return false;
final DomainNode other = (DomainNode) obj;
if (domain == null) {
- if (other.domain != null)
- return false;
+ return other.domain == null;
} else if (!domain.equals(other.domain))
return false;
return true;
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/ObjectNameNode.java
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/ObjectNameNode.java 2008-11-21 18:30:00 UTC (rev 11958)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/tree/ObjectNameNode.java 2008-11-22 00:37:55 UTC (rev 11959)
@@ -31,7 +31,7 @@
try {
connectionWrapper.run(new IJMXRunnable() {
public void run(MBeanServerConnection mbsc) throws Exception {
- array[0] = new MBeanInfoWrapper(on2, mbsc.getMBeanInfo(on2), mbsc);
+ array[0] = new MBeanInfoWrapper(on2, mbsc.getMBeanInfo(on2), mbsc, ObjectNameNode.this);
}
});
} catch( JMXException ce ) {
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/dialogs/OpenMBeanSelectionDialog.java
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/dialogs/OpenMBeanSelectionDialog.java 2008-11-21 18:30:00 UTC (rev 11958)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/dialogs/OpenMBeanSelectionDialog.java 2008-11-22 00:37:55 UTC (rev 11959)
@@ -82,7 +82,7 @@
while (iter.hasNext()) {
ObjectName objectName = (ObjectName) iter.next();
MBeanInfo info = mbsc.getMBeanInfo(objectName);
- mbeans.add(new MBeanInfoWrapper(objectName, info, mbsc));
+ mbeans.add(new MBeanInfoWrapper(objectName, info, mbsc, null));
}
Collections.sort(mbeans);
viewer.setInput(mbeans);
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/MBeanExplorerContentProvider.java
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/MBeanExplorerContentProvider.java 2008-11-21 18:30:00 UTC (rev 11958)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/MBeanExplorerContentProvider.java 2008-11-22 00:37:55 UTC (rev 11959)
@@ -27,6 +27,7 @@
import org.jboss.tools.jmx.core.IConnectionProviderListener;
import org.jboss.tools.jmx.core.IConnectionWrapper;
import org.jboss.tools.jmx.core.MBeanFeatureInfoWrapper;
+import org.jboss.tools.jmx.core.MBeanOperationInfoWrapper;
import org.jboss.tools.jmx.core.tree.DomainNode;
import org.jboss.tools.jmx.core.tree.Node;
import org.jboss.tools.jmx.core.tree.ObjectNameNode;
@@ -64,10 +65,12 @@
}
public Object getParent(Object child) {
- if (child instanceof Node) {
- Node node = (Node) child;
- return node.getParent();
- }
+ if( child instanceof Root )
+ return ((Root)child).getConnection();
+ if (child instanceof Node)
+ return ((Node) child).getParent();
+ if( child instanceof MBeanFeatureInfoWrapper )
+ return ((MBeanFeatureInfoWrapper)child).getMBeanInfoWrapper().getParent();
return null;
}
@@ -79,14 +82,6 @@
if( parent instanceof IConnectionWrapper && ((IConnectionWrapper)parent).isConnected()) {
return loadAndGetRootChildren(parent);
}
- if (parent instanceof Root) {
- Root root = (Root) parent;
- return root.getChildren();
- }
- if (parent instanceof DomainNode) {
- DomainNode node = (DomainNode) parent;
- return node.getChildren();
- }
if (parent instanceof ObjectNameNode) {
ObjectNameNode node = (ObjectNameNode) parent;
return node.getMbeanInfoWrapper().getMBeanFeatureInfos();
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/QueryContribution.java
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/QueryContribution.java 2008-11-21 18:30:00 UTC (rev 11958)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/QueryContribution.java 2008-11-22 00:37:55 UTC (rev 11959)
@@ -11,7 +11,9 @@
package org.jboss.tools.jmx.ui.internal.views.navigator;
import java.util.HashMap;
-import java.util.concurrent.ConcurrentHashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
@@ -21,7 +23,7 @@
import org.eclipse.swt.widgets.Display;
public class QueryContribution {
-
+ private static Boolean TRUE_BOOL = new Boolean(true);
private static HashMap<Viewer, QueryContribution> map =
new HashMap<Viewer, QueryContribution>();
@@ -51,11 +53,12 @@
}
- private String filterText, oldFilterText;
- private ConcurrentHashMap<Object, Boolean> cache = new ConcurrentHashMap<Object, Boolean>();
+ private String filterText;
private Navigator navigator;
- private boolean requiresRefine;
- private RefineThread refineThread = null;
+ private HashMap<Object, Boolean> matches = null;
+ private HashMap<Object, Boolean> shouldShow = null;
+ private RefineThread refineThread;
+
public QueryContribution(final Navigator navigator) {
this.navigator = navigator;
map.put(navigator.getCommonViewer(), this);
@@ -65,104 +68,248 @@
protected void addListener() {
navigator.getFilterText().addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- oldFilterText = filterText;
- filterText = navigator.getFilterText().getText();
- final String old = oldFilterText == null ? "" : oldFilterText;
- final String neww = filterText == null ? "" : filterText;
-
- if( old.equals("") || neww.equals("") || !neww.startsWith(old)) {
- clearCache();
- } else if(neww.startsWith(old) && !neww.equals(old)) {
- requiresRefine = true;
+ boolean searchNew = matches == null || filterText == null || filterText.equals("")
+ || !navigator.getFilterText().getText().startsWith(filterText);
+ RefineThread thread = new RefineThread(searchNew,
+ navigator.getFilterText().getText(),
+ matches, shouldShow);
+ if( !navigator.getFilterText().getText().equals("")) {
+ if( refineThread != null )
+ refineThread.cancel();
+ refineThread = thread;
+ refineThread.start();
+ } else {
+ matches = null;
+ shouldShow = null;
+ refreshView();
}
- if( refineThread != null )
- refineThread.cancel();
- refineThread = new RefineThread();
- refineThread.start();
}
});
}
- protected class RefineThread extends Thread {
+ protected void refreshView() {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ navigator.getCommonViewer().refresh();
+ }
+ });
+ }
+
+ public class RefineThread extends Thread {
private boolean canceled = false;
- public void run() {
- cacheEntry(requiresRefine, (ITreeContentProvider)navigator.getCommonViewer().getContentProvider());
- refineThread = null;
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- navigator.getCommonViewer().refresh();
- }
- } );
+ private boolean searchNew;
+ private String newFilter;
+ private HashMap<Object, Boolean> matchClone;
+ private HashMap<Object, Boolean> showClone;
+ public RefineThread(
+ boolean searchNew, String newFilter,
+ HashMap<Object, Boolean> matches,
+ HashMap<Object, Boolean> shouldShow) {
+ this.searchNew = searchNew;
+ this.newFilter = newFilter;
+ this.matchClone = matches == null ?
+ new HashMap<Object, Boolean>() :
+ (HashMap<Object, Boolean>) matches.clone();
+ this.showClone = shouldShow == null ?
+ new HashMap<Object, Boolean>() :
+ (HashMap<Object, Boolean>) shouldShow.clone();
}
- public void cancel() {
- canceled = true;
+
+ /*
+ * TODO MAKE SURE YOU FIX THE CONTENT PROVIDER
+ * IT IS NOT RETURNING GETPARENT AS IT SHOULD!!!
+ *
+ */
+ public void run() {
+ if( searchNew )
+ searchNew();
+ else
+ refine();
+
+ if( !canceled ) {
+ threadFinished(matchClone, showClone, newFilter);
+ }
}
- protected void cacheEntry(boolean refine, ITreeContentProvider provider) {
+ protected void searchNew() {
+ ITreeContentProvider provider = (ITreeContentProvider)navigator.getCommonViewer().getContentProvider();
Object[] elements = provider.getElements(navigator.getCommonViewer().getInput());
for( int i = 0; i < elements.length; i++ )
if( !canceled )
- cache(elements[i], refine, provider);
+ fullCache(elements[i], provider);
}
+
+ protected void fullCache(Object o, ITreeContentProvider provider) {
+ boolean found = false;
+ String elementAsString = MBeanExplorerLabelProvider.getText2(o);
+ if( elementAsString.contains(newFilter)) {
+ matchClone.put(o, TRUE_BOOL);
+ recurse(o, provider, true);
+ } else {
+ // if I don't match, then if ANY of my children match, I also match
+ Object[] children = provider.getChildren(o);
+ for( int i = 0; i < children.length; i++ )
+ if( !canceled )
+ fullCache(children[i], provider);
- protected boolean cache(Object o, boolean refine, ITreeContentProvider provider) {
- if( !refine ) {
- Boolean val = cache.get(o);
- if( val != null ) {
- return val.booleanValue();
+ if( found ) {
+ showClone.put(o, TRUE_BOOL);
+ found = true;
}
}
-
- // If I match, all my children and grandchildren must match
- String elementAsString = MBeanExplorerLabelProvider.getText2(o);
- if( elementAsString.contains(filterText)) {
- recurseTrue(o, provider);
- return true;
- }
-
- // if I don't match, then if ANY of my children match, I also match
- boolean belongs = false;
- Object tmp;
+ }
+
+ protected void recurse(Object o, ITreeContentProvider provider, boolean match) {
Object[] children = provider.getChildren(o);
for( int i = 0; i < children.length; i++ ) {
- if( !canceled ) {
- tmp = cache.get(children[i]);
- if( !refine || (tmp != null && ((Boolean)tmp).booleanValue())) {
- belongs |= cache(children[i], refine, provider);
- }
+ if( match )
+ showClone.put(children[i], TRUE_BOOL);
+ else
+ showClone.remove(children[i]);
+ recurse(children[i], provider, match);
+ }
+ Object parent = provider.getParent(o);
+ if( match ) {
+ while( parent != null ) {
+ showClone.put(parent, TRUE_BOOL);
+ parent = provider.getParent(parent);
}
+ } else {
+ while( parent != null ) {
+ showClone.remove(parent);
+ parent = provider.getParent(parent);
+ }
}
- cache.put(o, new Boolean(canceled || belongs));
- return belongs;
}
+
+
+ protected void refine() {
+ ITreeContentProvider provider = (ITreeContentProvider)navigator.getCommonViewer().getContentProvider();
+ Iterator i = matchClone.keySet().iterator();
+ Set<Object> toRemove = new HashSet<Object>();
+ Set<Object> mustRemain = new HashSet<Object>();
- protected void recurseTrue(Object o, ITreeContentProvider provider) {
- cache.put(o, new Boolean(true));
- Object[] children = provider.getChildren(o);
- for( int i = 0; i < children.length; i++ )
- recurseTrue(children[i], provider);
+ Object o;
+ String elementAsString;
+
+ while(i.hasNext() && !canceled) {
+ o = i.next();
+ elementAsString = MBeanExplorerLabelProvider.getText2(o);
+ if( !elementAsString.contains(newFilter)) {
+ toRemove.add(o);
+ } else {
+ mustRemain.add(o);
+ }
+ }
+
+ for( Object o2 : toRemove ) {
+ matchClone.remove(o2);
+ recurse(o2, provider, false);
+ }
+
+ for( Object o2 : mustRemain ) {
+ matchClone.put(o2, TRUE_BOOL);
+ recurse(o2, provider, true);
+ }
}
+
+ public void cancel() {
+ canceled = true;
+ }
}
-
- protected void clearCache() {
- cache = new ConcurrentHashMap<Object,Boolean>();
- requiresRefine = false;
+
+ protected synchronized void threadFinished(
+ HashMap<Object, Boolean> newMatches,
+ HashMap<Object, Boolean> newShow, String filter) {
+ matches = newMatches;
+ shouldShow = newShow;
+ filterText = filter;
+ refineThread = null;
+ refreshView();
}
public boolean shouldShow(Object element, Object parentElement) {
- String filterText = this.filterText;
- if( filterText != null && filterText.length() > 0 ) {
- boolean tmp = cache.get(element) != null && cache.get(element).booleanValue();
- return tmp;
- }
- return true;
+ return matches == null || matches.containsKey(element)
+ || shouldShow.containsKey(element);
}
public void dispose() {
- clearCache();
- oldFilterText = null;
- filterText = null;
}
+
+
+
+
+
+
+
+//
+// protected class RefineThread extends Thread {
+// private boolean canceled = false;
+// public void run() {
+// cacheEntry(requiresRefine, (ITreeContentProvider)navigator.getCommonViewer().getContentProvider());
+// refineThread = null;
+// Display.getDefault().asyncExec(new Runnable() {
+// public void run() {
+// navigator.getCommonViewer().refresh();
+// }
+// } );
+// }
+//
+// public void cancel() {
+// canceled = true;
+// }
+//
+// protected void cacheEntry(boolean refine, ITreeContentProvider provider) {
+// Object[] elements = provider.getElements(navigator.getCommonViewer().getInput());
+// for( int i = 0; i < elements.length; i++ )
+// if( !canceled )
+// cache(elements[i], refine, provider);
+// }
+//
+// protected boolean cache(Object o, boolean refine, ITreeContentProvider provider) {
+// if( !refine ) {
+// Boolean val = cache.get(o);
+// if( val != null ) {
+// return val.booleanValue();
+// }
+// }
+//
+// // If I match, all my children and grandchildren must match
+// String elementAsString = MBeanExplorerLabelProvider.getText2(o);
+// if( elementAsString.contains(filterText)) {
+// recurseTrue(o, provider);
+// return true;
+// }
+//
+// // if I don't match, then if ANY of my children match, I also match
+// boolean belongs = false;
+// Object tmp;
+// Object[] children = provider.getChildren(o);
+// for( int i = 0; i < children.length; i++ ) {
+// if( !canceled ) {
+// tmp = cache.get(children[i]);
+// if( !refine || (tmp != null && ((Boolean)tmp).booleanValue())) {
+// belongs |= cache(children[i], refine, provider);
+// }
+// }
+// }
+// cache.put(o, new Boolean(canceled || belongs));
+// return belongs;
+// }
+//
+// protected void recurseTrue(Object o, ITreeContentProvider provider) {
+// cache.put(o, new Boolean(true));
+// Object[] children = provider.getChildren(o);
+// for( int i = 0; i < children.length; i++ )
+// recurseTrue(children[i], provider);
+// }
+// }
+//
+// protected void clearCache() {
+//// cache = new ConcurrentHashMap<Object,Boolean>();
+//// requiresRefine = false;
+// }
+
}
17 years, 5 months
JBoss Tools SVN: r11958 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog.
by jbosstools-commits@lists.jboss.org
Author: izhukov
Date: 2008-11-21 13:30:00 -0500 (Fri, 21 Nov 2008)
New Revision: 11958
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
Log:
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2008-11-21 17:05:01 UTC (rev 11957)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2008-11-21 18:30:00 UTC (rev 11958)
@@ -75,6 +75,8 @@
*/
public class CSSClassDialog extends TitleAreaDialog implements MouseListener, FocusListener {
+ public static final String ID = "org.jboss.tools.jst.jsp.outline.cssdialog.CSSClassDialog"; //$NON-NLS-1$
+
// TODO: take out to the property manager file
public final static String WIZARD_TITLE = "CSS Class";
public final static String WIZARD_DESCRIPTION = "Create New CSS Class.";
@@ -292,6 +294,9 @@
dialog.setInput(project);
dialog.setAllowMultiple(false);
dialog.setDoubleClickSelects(false);
+ if (currentFile != null) {
+ dialog.setInitialSelection(currentFile);
+ }
dialog.setEmptyListMessage(JstUIMessages.CSS_FILE_SELECT_DIALOG_EMPTY_MESSAGE);
if (dialog.open() == Window.OK) {
17 years, 5 months
JBoss Tools SVN: r11957 - in trunk/vpe/tests/org.jboss.tools.vpe.html.test: src/org/jboss/tools/vpe/html/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-11-21 12:05:01 -0500 (Fri, 21 Nov 2008)
New Revision: 11957
Added:
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/abbr.html.xml
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/acronym.html.xml
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/b.html.xml
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/big.html.xml
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/blockquote.html.xml
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/br.html.xml
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/cite.html.xml
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/code.html.xml
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/del.html.xml
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/dfn.html.xml
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/em.html.xml
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/hr.html.xml
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/i.html.xml
trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlComponentContentTest.java
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/code.html
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/del.html
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/dfn.html
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/em.html
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/hr.html
trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlAllTests.java
trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlComponentTest.java
Log:
JBIDE-2854
Added: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/abbr.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/abbr.html.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/abbr.html.xml 2008-11-21 17:05:01 UTC (rev 11957)
@@ -0,0 +1,9 @@
+<tests>
+ <test id="abbr">
+ <ABBR ID="color:red" CLASS="abbrClass" STYLE="color: red;">
+ <SPAN>
+ abbreviation
+ </SPAN>
+ </ABBR>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/acronym.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/acronym.html.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/acronym.html.xml 2008-11-21 17:05:01 UTC (rev 11957)
@@ -0,0 +1,7 @@
+<tests>
+ <test id="acronym">
+ <SPAN>
+ acronym
+ </SPAN>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/b.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/b.html.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/b.html.xml 2008-11-21 17:05:01 UTC (rev 11957)
@@ -0,0 +1,9 @@
+<tests>
+ <test id="b">
+ <B STYLE="color: red;" ID="b" CLASS="bClass">
+ <SPAN>
+ some bold text
+ </SPAN>
+ </B>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/big.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/big.html.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/big.html.xml 2008-11-21 17:05:01 UTC (rev 11957)
@@ -0,0 +1,10 @@
+<tests>
+ <test id="b">
+ <BIG STYLE="color: red;" ID="big" CLASS="bigClass">
+ <SPAN>
+ big
+ text
+ </SPAN>
+ </BIG>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/blockquote.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/blockquote.html.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/blockquote.html.xml 2008-11-21 17:05:01 UTC (rev 11957)
@@ -0,0 +1,9 @@
+<tests>
+ <test id="blockquote">
+ <BLOCKQUOTE ID="blockquote" STYLE="color: red;" CLASS="blockquoteClass">
+ <SPAN>
+ Some Text
+ </SPAN>
+ </BLOCKQUOTE>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/br.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/br.html.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/br.html.xml 2008-11-21 17:05:01 UTC (rev 11957)
@@ -0,0 +1,5 @@
+<tests>
+ <test id="br">
+ <BR STYLE="color: red;" ID="br" CLASS="brClass" />
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/cite.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/cite.html.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/cite.html.xml 2008-11-21 17:05:01 UTC (rev 11957)
@@ -0,0 +1,9 @@
+<tests>
+ <test id="cite">
+ <CITE STYLE="color: red;" ID="cite" CLASS="citeClass">
+ <SPAN>
+ some text
+ </SPAN>
+ </CITE>
+ </test>
+</tests>
\ No newline at end of file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/code.html
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/code.html 2008-11-21 16:58:18 UTC (rev 11956)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/code.html 2008-11-21 17:05:01 UTC (rev 11957)
@@ -5,7 +5,7 @@
<h1>code</h1>
-<code>
+<code id="" class="codeClass" style="color:red">
function checkParent (src, dest) {<br>
while (src != null) {<br>
if (src.tagName == dest) return src<br>
Added: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/code.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/code.html.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/code.html.xml 2008-11-21 17:05:01 UTC (rev 11957)
@@ -0,0 +1,39 @@
+<tests>
+ <test id="code">
+ <CODE ID="" CLASS="codeClass" STYLE="color: red; -moz-user-modify: read-write;">
+ <SPAN>
+ function checkParent (src, dest) {
+</SPAN>
+ <BR STYLE="-moz-user-modify: read-write;" />
+
+ <SPAN>
+ while (src != null) {
+</SPAN>
+ <BR STYLE="-moz-user-modify: read-write;" />
+
+ <SPAN>
+ if (src.tagName == dest) return src
+</SPAN>
+ <BR STYLE="-moz-user-modify: read-write;" />
+
+ <SPAN>
+ src = src.parentElement
+</SPAN>
+ <BR STYLE="-moz-user-modify: read-write;" />
+
+ <SPAN>
+ }
+</SPAN>
+ <BR STYLE="-moz-user-modify: read-write;" />
+
+ <SPAN>
+ return null
+</SPAN>
+ <BR STYLE="-moz-user-modify: read-write;" />
+
+ <SPAN>
+ }
+</SPAN>
+ </CODE>
+ </test>
+</tests>
\ No newline at end of file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/del.html
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/del.html 2008-11-21 16:58:18 UTC (rev 11956)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/del.html 2008-11-21 17:05:01 UTC (rev 11957)
@@ -5,7 +5,7 @@
<h1>del</h1>
-<del>Some Text</del>
+<del id="del" class="delClass" style="color: red">Some Text</del>
</body>
</html>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/del.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/del.html.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/del.html.xml 2008-11-21 17:05:01 UTC (rev 11957)
@@ -0,0 +1,9 @@
+<tests>
+ <test id="del">
+ <DEL STYLE="color: red;" ID="del" CLASS="delClass">
+ <SPAN>
+ Some Text
+ </SPAN>
+ </DEL>
+ </test>
+</tests>
\ No newline at end of file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/dfn.html
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/dfn.html 2008-11-21 16:58:18 UTC (rev 11956)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/dfn.html 2008-11-21 17:05:01 UTC (rev 11957)
@@ -5,7 +5,7 @@
<h1>dfn</h1>
-<dfn>Some Text</dfn>
+<dfn id="dfn" class="dfnClass" style="color: red">Some Text</dfn>
</body>
</html>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/dfn.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/dfn.html.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/dfn.html.xml 2008-11-21 17:05:01 UTC (rev 11957)
@@ -0,0 +1,9 @@
+<tests>
+ <test id="dfn">
+ <DFN STYLE="color: red;" ID="dfn" CLASS="dfnClass">
+ <SPAN>
+ Some Text
+ </SPAN>
+ </DFN>
+ </test>
+</tests>
\ No newline at end of file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/em.html
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/em.html 2008-11-21 16:58:18 UTC (rev 11956)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/em.html 2008-11-21 17:05:01 UTC (rev 11957)
@@ -5,7 +5,7 @@
<h1>em</h1>
-<em>Some Text</em>
+<em id="em" class="emClass" style="color:red">Some Text</em>
</body>
</html>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/em.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/em.html.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/em.html.xml 2008-11-21 17:05:01 UTC (rev 11957)
@@ -0,0 +1,9 @@
+<tests>
+ <test id="em">
+ <EM ID="em" CLASS="emClass" STYLE="color: red; -moz-user-modify: read-write;">
+ <SPAN>
+ Some Text
+ </SPAN>
+ </EM>
+ </test>
+</tests>
\ No newline at end of file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/hr.html
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/hr.html 2008-11-21 16:58:18 UTC (rev 11956)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/hr.html 2008-11-21 17:05:01 UTC (rev 11957)
@@ -6,7 +6,7 @@
<h1>hr</h1>
String 1
-<hr>
+<hr id="hr" class="hrClass" size="20" style="background: red">
String 2
</body>
Added: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/hr.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/hr.html.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/hr.html.xml 2008-11-21 17:05:01 UTC (rev 11957)
@@ -0,0 +1,7 @@
+<tests>
+ <test id="hr">
+ <HR SIZE="20"
+ STYLE="background: red none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"
+ CLASS="hrClass" ID="hr" />
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/i.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/i.html.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/i.html.xml 2008-11-21 17:05:01 UTC (rev 11957)
@@ -0,0 +1,7 @@
+<tests>
+ <test id="hr">
+ <HR SIZE="20"
+ STYLE="background: red none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"
+ CLASS="hrClass" ID="hr" />
+ </test>
+</tests>
\ No newline at end of file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlAllTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlAllTests.java 2008-11-21 16:58:18 UTC (rev 11956)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlAllTests.java 2008-11-21 17:05:01 UTC (rev 11957)
@@ -28,16 +28,19 @@
*/
public class HtmlAllTests {
-
+
+ // import project name
+ public static final String IMPORT_PROJECT_NAME = "htmlTest"; //$NON-NLS-1$
+
public static Test suite() {
- TestSuite suite = new TestSuite("Tests for Vpe Jsf components"); // $NON-NLS-1$
+ TestSuite suite = new TestSuite("Tests for Vpe Jsf components"); //$NON-NLS-1$
// $JUnit-BEGIN$
suite.addTestSuite(HtmlComponentTest.class);
List<ImportBean> projectToImport = new ArrayList<ImportBean>();
ImportBean importBean = new ImportBean();
- importBean.setImportProjectName(HtmlComponentTest.IMPORT_PROJECT_NAME);
+ importBean.setImportProjectName(IMPORT_PROJECT_NAME);
importBean.setImportProjectPath(HtmlTestPlugin.getPluginResourcePath());
projectToImport.add(importBean);
return new VpeTestSetup(suite,projectToImport);
Added: trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlComponentContentTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlComponentContentTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlComponentContentTest.java 2008-11-21 17:05:01 UTC (rev 11957)
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.html.test;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.vpe.ui.test.ComponentContentTest;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+
+/**
+ * Class for testing all jsf components
+ *
+ * @author sdzmitrovich
+ *
+ */
+public class HtmlComponentContentTest extends ComponentContentTest {
+
+ public HtmlComponentContentTest(String name) {
+ super(name);
+ setCheckWarning(false);
+ }
+
+ /*
+ * test for text html tags
+ */
+
+ public void testAbbr() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testAcronym() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testB() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testBig() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testBlockquote() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testBr() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testCite() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testCode() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testDel() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testDfn() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testEm() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testHr() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testI() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testIns() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testKbd() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testP() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testPre() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testQ() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testSamp() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testSmall() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testStrong() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testSub() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testSup() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testTt() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ public void testVar() throws Throwable {
+ fail( "it is necessary to add body of the test");
+ }
+
+ protected String getTestProjectName() {
+ return HtmlAllTests.IMPORT_PROJECT_NAME;
+ }
+
+}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlComponentTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlComponentTest.java 2008-11-21 16:58:18 UTC (rev 11956)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlComponentTest.java 2008-11-21 17:05:01 UTC (rev 11957)
@@ -21,10 +21,9 @@
*
*/
public class HtmlComponentTest extends VpeTest {
-
// import project name
- public static final String IMPORT_PROJECT_NAME = "htmlTest";
-
+ public static final String IMPORT_PROJECT_NAME = "htmlTest"; //$NON-NLS-1$
+
public HtmlComponentTest(String name) {
super(name);
setCheckWarning(false);
@@ -36,22 +35,22 @@
public void testDiv() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/block/div.html", IMPORT_PROJECT_NAME));
+ "components/block/div.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDl() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/block/dl.html", IMPORT_PROJECT_NAME));
+ "components/block/dl.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testLists() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/block/lists.html", IMPORT_PROJECT_NAME));
+ "components/block/lists.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSpan() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/block/span.html", IMPORT_PROJECT_NAME));
+ "components/block/span.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
/*
@@ -60,47 +59,47 @@
public void testA() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/core/a.html", IMPORT_PROJECT_NAME));
+ "components/core/a.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testAddress() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/core/address.html", IMPORT_PROJECT_NAME));
+ "components/core/address.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testBasic() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/core/basic.html", IMPORT_PROJECT_NAME));
+ "components/core/basic.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testImg() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/core/img.html", IMPORT_PROJECT_NAME));
+ "components/core/img.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testLink() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/core/link.html", IMPORT_PROJECT_NAME));
+ "components/core/link.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testMap() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/core/map.html", IMPORT_PROJECT_NAME));
+ "components/core/map.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testObject() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/core/object.html", IMPORT_PROJECT_NAME));
+ "components/core/object.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testStyle() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/core/style.html", IMPORT_PROJECT_NAME));
+ "components/core/style.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testTitle() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/core/title.html", IMPORT_PROJECT_NAME));
+ "components/core/title.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
/*
@@ -109,37 +108,37 @@
public void testButton() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/form/button.html", IMPORT_PROJECT_NAME));
+ "components/form/button.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testFieldset() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/form/fieldset.html", IMPORT_PROJECT_NAME));
+ "components/form/fieldset.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testForm() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/form/form.html", IMPORT_PROJECT_NAME));
+ "components/form/form.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testInput() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/form/input.html", IMPORT_PROJECT_NAME));
+ "components/form/input.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testLabel() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/form/label.html", IMPORT_PROJECT_NAME));
+ "components/form/label.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSelect() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/form/select.html", IMPORT_PROJECT_NAME));
+ "components/form/select.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testTextArea() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/form/textArea.html", IMPORT_PROJECT_NAME));
+ "components/form/textArea.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
/*
@@ -148,12 +147,12 @@
public void testFrameset() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/frames/frameset.html", IMPORT_PROJECT_NAME));
+ "components/frames/frameset.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testIframe() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/frames/iframe.html", IMPORT_PROJECT_NAME));
+ "components/frames/iframe.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
/*
@@ -162,7 +161,7 @@
public void testScript() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/scripts/script.html", IMPORT_PROJECT_NAME));
+ "components/scripts/script.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
/*
@@ -171,12 +170,12 @@
public void testComplexTable() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/table/complex_table.html", IMPORT_PROJECT_NAME));
+ "components/table/complex_table.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testTable() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/table/table.html", IMPORT_PROJECT_NAME));
+ "components/table/table.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
/*
@@ -185,127 +184,127 @@
public void testAbbr() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/abbr.html", IMPORT_PROJECT_NAME));
+ "components/text/abbr.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testAcronym() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/acronym.html", IMPORT_PROJECT_NAME));
+ "components/text/acronym.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testB() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/b.html", IMPORT_PROJECT_NAME));
+ "components/text/b.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testBig() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/big.html", IMPORT_PROJECT_NAME));
+ "components/text/big.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testBlockquote() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/blockquote.html", IMPORT_PROJECT_NAME));
+ "components/text/blockquote.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testBr() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/br.html", IMPORT_PROJECT_NAME));
+ "components/text/br.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testCite() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/cite.html", IMPORT_PROJECT_NAME));
+ "components/text/cite.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testCode() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/code.html", IMPORT_PROJECT_NAME));
+ "components/text/code.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDel() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/del.html", IMPORT_PROJECT_NAME));
+ "components/text/del.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDfn() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/dfn.html", IMPORT_PROJECT_NAME));
+ "components/text/dfn.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testEm() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/em.html", IMPORT_PROJECT_NAME));
+ "components/text/em.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testHr() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/hr.html", IMPORT_PROJECT_NAME));
+ "components/text/hr.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testI() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/i.html", IMPORT_PROJECT_NAME));
+ "components/text/i.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testIns() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/ins.html", IMPORT_PROJECT_NAME));
+ "components/text/ins.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testKbd() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/kbd.html", IMPORT_PROJECT_NAME));
+ "components/text/kbd.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testP() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/p.html", IMPORT_PROJECT_NAME));
+ "components/text/p.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testPre() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/pre.html", IMPORT_PROJECT_NAME));
+ "components/text/pre.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testQ() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/q.html", IMPORT_PROJECT_NAME));
+ "components/text/q.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSamp() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/samp.html", IMPORT_PROJECT_NAME));
+ "components/text/samp.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSmall() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/small.html", IMPORT_PROJECT_NAME));
+ "components/text/small.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testStrong() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/strong.html", IMPORT_PROJECT_NAME));
+ "components/text/strong.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSub() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/sub.html", IMPORT_PROJECT_NAME));
+ "components/text/sub.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSup() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/sup.html", IMPORT_PROJECT_NAME));
+ "components/text/sup.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testTt() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/tt.html", IMPORT_PROJECT_NAME));
+ "components/text/tt.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testVar() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/text/var.html", IMPORT_PROJECT_NAME));
+ "components/text/var.html", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
}
17 years, 5 months
JBoss Tools SVN: r11956 - in trunk/vpe/plugins: org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-11-21 11:58:18 -0500 (Fri, 21 Nov 2008)
New Revision: 11956
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/util/DOMTreeDumper.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/NodesManagingUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2961
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-11-21 16:55:26 UTC (rev 11955)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-11-21 16:58:18 UTC (rev 11956)
@@ -11,6 +11,7 @@
package org.jboss.tools.vpe.editor;
import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -148,6 +149,7 @@
import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
import org.jboss.tools.vpe.editor.toolbar.format.FormatControllerManager;
import org.jboss.tools.vpe.editor.util.DocTypeUtil;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.NodesManagingUtil;
import org.jboss.tools.vpe.editor.util.SelectionUtil;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
@@ -1341,7 +1343,7 @@
/*
* JBIDE-2670
*/
- keyEvent.stopPropagation();
+ keyEvent.preventDefault();
switcher
.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL);
try {
@@ -1352,8 +1354,8 @@
// trying to edit of read-only elements
// TODO check editing and if are appear errors then
// uncommented next code
- // sourceSelectionChanged(true);
- // visualSelectionController.setCaretEnabled(true);
+// sourceSelectionChanged(true);
+// visualSelectionController.setCaretEnabled(true);
} finally {
switcher.stopActiveEditor();
@@ -1639,6 +1641,9 @@
DOMTreeDumper dumper = new DOMTreeDumper(
VpeDebug.VISUAL_DUMP_PRINT_HASH);
+ List<String> ignoredAttributes = new ArrayList<String>();
+ ignoredAttributes.add(HTML.ATTR_TITLE);
+ dumper.setIgnoredAttributes(ignoredAttributes);
dumper.dumpNode(nodeMapping.getVisualNode());
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/NodesManagingUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/NodesManagingUtil.java 2008-11-21 16:55:26 UTC (rev 11955)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/NodesManagingUtil.java 2008-11-21 16:58:18 UTC (rev 11956)
@@ -104,7 +104,9 @@
*/
public static int getEndOffsetNode(Node node) {
- if (node instanceof IndexedRegion) {
+ if (node instanceof IDOMAttr) {
+ return getStartOffsetNode(node) + getNodeLength(node);
+ } else if (node instanceof IndexedRegion) {
return ((IndexedRegion) node).getEndOffset();
}
return 0;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/util/DOMTreeDumper.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/util/DOMTreeDumper.java 2008-11-21 16:55:26 UTC (rev 11955)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/util/DOMTreeDumper.java 2008-11-21 16:58:18 UTC (rev 11956)
@@ -14,6 +14,7 @@
import java.io.PrintStream;
+import java.util.List;
import org.mozilla.interfaces.nsIDOMAttr;
import org.mozilla.interfaces.nsIDOMDocument;
@@ -51,6 +52,8 @@
"LINK", //$NON-NLS-1$
"META", //$NON-NLS-1$
"PARAM" }; //$NON-NLS-1$
+
+ private List<String> ignoredAttributes = null;
/**
* The Constructor.
@@ -165,8 +168,12 @@
}
ps.print("<" + name); //$NON-NLS-1$
dumpAttributes(node);
- ps.print(">"); //$NON-NLS-1$
-
+
+ if (endTagForbidden(name)) {
+ ps.print("/>"); //$NON-NLS-1$
+ } else {
+ ps.print(">"); //$NON-NLS-1$
+ }
printHashCode(node);
dumpChildren(node);
@@ -180,11 +187,15 @@
case nsIDOMNode.ATTRIBUTE_NODE:
nsIDOMAttr attr = (nsIDOMAttr) node.queryInterface(nsIDOMAttr.NS_IDOMATTR_IID);
- if (attr.getSpecified()) {
- ps.print(" " + attr.getName().toUpperCase() + "=\"" + attr.getValue() + "\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- } else {
- ps.print(" " + attr.getName().toUpperCase()); //$NON-NLS-1$
- }
+
+ if (!(ignoredAttributes != null && listContains(ignoredAttributes,
+ attr.getName())))
+ if (attr.getSpecified()) {
+ ps
+ .print(" " + attr.getName().toUpperCase() + "=\"" + attr.getValue() + "\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ } else {
+ ps.print(" " + attr.getName().toUpperCase()); //$NON-NLS-1$
+ }
break;
case nsIDOMNode.TEXT_NODE:
@@ -299,7 +310,17 @@
}
return false;
}
+
+ private boolean listContains(List<String> list, String string) {
+ for (String listString : list) {
+ if (string.equalsIgnoreCase(listString))
+ return true;
+ }
+ return false;
+
+ }
+
/**
* Prints the hash code.
*
@@ -310,4 +331,12 @@
ps.print("(" + o.hashCode() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
+
+ public List<String> getIgnoredAttributes() {
+ return ignoredAttributes;
+ }
+
+ public void setIgnoredAttributes(List<String> ignoredAttributes) {
+ this.ignoredAttributes = ignoredAttributes;
+ }
}
\ No newline at end of file
17 years, 5 months
JBoss Tools SVN: r11955 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-11-21 11:55:26 -0500 (Fri, 21 Nov 2008)
New Revision: 11955
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2961
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java 2008-11-21 16:31:44 UTC (rev 11954)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java 2008-11-21 16:55:26 UTC (rev 11955)
@@ -22,6 +22,7 @@
import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
import org.jboss.tools.vpe.editor.selection.VpeSelectionController;
+import org.jboss.tools.vpe.editor.util.NodesManagingUtil;
import org.jboss.tools.vpe.editor.util.SelectionUtil;
import org.jboss.tools.vpe.editor.util.TextUtil;
import org.mozilla.interfaces.nsIDOMKeyEvent;
@@ -52,9 +53,10 @@
* page context
*/
private VpePageContext pageContext;
-
+
public KeyEventManager(StructuredTextEditor sourceEditor,
- VpeDomMapping domMapping, VpePageContext pageContext, VpeSelectionController selectionController) {
+ VpeDomMapping domMapping, VpePageContext pageContext,
+ VpeSelectionController selectionController) {
this.sourceEditor = sourceEditor;
this.domMapping = domMapping;
this.pageContext = pageContext;
@@ -93,11 +95,11 @@
} else if ((keyCode == nsIDOMKeyEvent.DOM_VK_BACK_SPACE)
&& (!keyEvent.getShiftKey())) {
- return handleDelete(keyEvent,ST.DELETE_PREVIOUS);
+ return handleDelete(keyEvent, ST.DELETE_PREVIOUS);
} else if ((keyCode == nsIDOMKeyEvent.DOM_VK_DELETE)
&& (!keyEvent.getShiftKey())) {
- return handleDelete(keyEvent,ST.DELETE_NEXT);
+ return handleDelete(keyEvent, ST.DELETE_NEXT);
} else if ((keyCode == nsIDOMKeyEvent.DOM_VK_PAGE_UP)
&& (!keyEvent.getShiftKey())) {
@@ -196,6 +198,7 @@
return true;
}
+
/**
* Default implementation of a handling of a pressing the "delete" event
*
@@ -203,7 +206,8 @@
*
* @param keyEvent
* - event
- * @param deleteDirection - direction of deleted Text
+ * @param deleteDirection
+ * - direction of deleted Text
* @return whether handled event
*/
private boolean handleDelete(nsIDOMKeyEvent keyEvent, int delete) {
@@ -233,9 +237,9 @@
domMapping);
if (nodeData != null) {
- editable = nodeData.isEditable();
- if (editable && nodeData.getType() == NodeData.ATTRIBUTE
+ if (nodeData.isEditable()
+ && nodeData.getType() == NodeData.ATTRIBUTE
&& nodeData.getSourceNode() == null) {
Node newNode = createAttribute(
@@ -251,10 +255,21 @@
}
+ editable = nodeData.isEditable()
+ && !isBorderPosition(
+ nodeData.getSourceNode(),
+ SelectionUtil
+ .getSourceSelectionRange(getSourceEditor()),
+ delete);
+
}
// if template can't give necessary information
else {
- editable = false;
+
+ if (delete == ST.DELETE_NEXT)
+ editable = true;
+ else
+ editable = false;
}
}
// if node is simple text
@@ -263,8 +278,7 @@
}
if (editable) {
- sourceEditor.getTextViewer().getTextWidget().invokeAction(
- delete);
+ sourceEditor.getTextViewer().getTextWidget().invokeAction(delete);
}
return true;
@@ -408,4 +422,20 @@
return null;
}
+
+ private boolean isBorderPosition(Node node, Point selectionRange, int delete) {
+
+ if (selectionRange.y == 0) {
+
+ if (delete == ST.DELETE_PREVIOUS) {
+
+ return NodesManagingUtil.getStartOffsetNode(node) == selectionRange.x;
+
+ }
+ if (delete == ST.DELETE_NEXT) {
+ return NodesManagingUtil.getEndOffsetNode(node) == selectionRange.x;
+ }
+ }
+ return false;
+ }
}
17 years, 5 months
JBoss Tools SVN: r11954 - in trunk/hibernatetools: tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-11-21 11:31:44 -0500 (Fri, 21 Nov 2008)
New Revision: 11954
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Foto.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Person.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java
Log:
JBIDE-3033
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2008-11-21 16:21:06 UTC (rev 11953)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2008-11-21 16:31:44 UTC (rev 11954)
@@ -272,6 +272,14 @@
pi.refEntityInfo2.mappedBy = pi.fieldId;
}
}
+ else if (pi.refEntityInfo.refType == RefType.MANY2ONE) {
+ if (pi.refEntityInfo2.refType == RefType.MANY2ONE) {
+ pi.refEntityInfo.refType = RefType.ONE2ONE;
+ pi.refEntityInfo.mappedBy = pi.fieldId2;
+ pi.refEntityInfo2.refType = RefType.ONE2ONE;
+ pi.refEntityInfo2.mappedBy = pi.fieldId;
+ }
+ }
}
return true;
}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Foto.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Foto.java 2008-11-21 16:21:06 UTC (rev 11953)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Foto.java 2008-11-21 16:31:44 UTC (rev 11954)
@@ -13,7 +13,7 @@
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
-import javax.persistence.ManyToOne;
+import javax.persistence.OneToOne;
@Entity
public class Foto {
@@ -23,7 +23,7 @@
@Id @GeneratedValue
protected Short id;
- @ManyToOne
+ @OneToOne(mappedBy="foto")
protected Person person;
protected Short width_IDtest;
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Person.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Person.java 2008-11-21 16:21:06 UTC (rev 11953)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Person.java 2008-11-21 16:31:44 UTC (rev 11954)
@@ -15,8 +15,8 @@
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
+import javax.persistence.OneToOne;
import javax.persistence.OneToMany;
-import javax.persistence.ManyToOne;
@Entity
public class Person {
@@ -27,7 +27,7 @@
@OneToMany(mappedBy="documentOwner")
protected Set<Document> documents;
- @ManyToOne
+ @OneToOne(mappedBy="person")
protected Foto foto;
protected Set someTestSet;
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java 2008-11-21 16:21:06 UTC (rev 11953)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java 2008-11-21 16:31:44 UTC (rev 11954)
@@ -101,6 +101,10 @@
"test.annotated.Passport"); //$NON-NLS-1$
ICompilationUnit icu2 = Utils.findCompilationUnit(javaProject,
"test.annotated.Staff"); //$NON-NLS-1$
+ //ICompilationUnit icu = Utils.findCompilationUnit(javaProject,
+ // "test.annotated.Foto"); //$NON-NLS-1$
+ //ICompilationUnit icu2 = Utils.findCompilationUnit(javaProject,
+ // "test.annotated.Person"); //$NON-NLS-1$
assertNotNull(icu);
assertNotNull(icu2);
collector.initCollector(javaProject);
17 years, 5 months