moving XUL Runner-based embedded browser and WebPreview modules to contrib
authorS. Aubrecht <saubrecht@netbeans.org>
Thu, 22 Nov 2012 15:44:15 +0100
changeset 17896806b3109b1c8
parent 17895 b402d81fc130
child 17897 bf236c501b20
moving XUL Runner-based embedded browser and WebPreview modules to contrib
core.browser.xulrunner.linux/build.xml
core.browser.xulrunner.linux/external/binaries-list
core.browser.xulrunner.linux/external/xulrunner-linux-license.txt
core.browser.xulrunner.linux/manifest.mf
core.browser.xulrunner.linux/nbproject/project.properties
core.browser.xulrunner.linux/nbproject/project.xml
core.browser.xulrunner.linux/src/org/netbeans/core/browser/xulrunner/linux/Bundle.properties
core.browser.xulrunner.macosx/build.xml
core.browser.xulrunner.macosx/external/binaries-list
core.browser.xulrunner.macosx/external/xulrunner-macosx-license.txt
core.browser.xulrunner.macosx/manifest.mf
core.browser.xulrunner.macosx/nbproject/project.properties
core.browser.xulrunner.macosx/nbproject/project.xml
core.browser.xulrunner.macosx/src/org/netbeans/core/browser/xulrunner/macosx/Bundle.properties
core.browser.xulrunner.solaris/build.xml
core.browser.xulrunner.solaris/external/binaries-list
core.browser.xulrunner.solaris/external/xulrunner-solaris-x86-license.txt
core.browser.xulrunner.solaris/manifest.mf
core.browser.xulrunner.solaris/nbproject/project.properties
core.browser.xulrunner.solaris/nbproject/project.xml
core.browser.xulrunner.solaris/src/org/netbeans/core/browser/xulrunner/solaris/Bundle.properties
core.browser.xulrunner.win/build.xml
core.browser.xulrunner.win/external/binaries-list
core.browser.xulrunner.win/external/xulrunner-win32-license.txt
core.browser.xulrunner.win/manifest.mf
core.browser.xulrunner.win/nbproject/project.properties
core.browser.xulrunner.win/nbproject/project.xml
core.browser.xulrunner.win/src/org/netbeans/core/browser/xulrunner/win/Bundle.properties
core.browser.xulrunner/build.xml
core.browser.xulrunner/external/binaries-list
core.browser.xulrunner/external/xulrunner-license.txt
core.browser.xulrunner/manifest.mf
core.browser.xulrunner/nbproject/project.properties
core.browser.xulrunner/nbproject/project.xml
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/BrowserCallback.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/BrowserFactory.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/BrowserFactoryBeanInfo.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/BrowserManager.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/BrowserPanel.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/Bundle.properties
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/DownloadPanel.form
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/DownloadPanel.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/EmbeddedBrowserEditor.form
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/EmbeddedBrowserEditor.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/EmbeddedBrowserFactoryImpl.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/HtmlBrowserImpl.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/Installer.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/Platform.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/WebBrowserEventImpl.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/WebBrowserImpl.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/layer.xml
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/modules/Bundle.properties
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/modules/FindComponentModules.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/modules/ModulesActivator.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/modules/ModulesInstaller.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/modules/ProgressMonitor.java
core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/mozillaBrowser.xml
webpreview/build.xml
webpreview/manifest.mf
webpreview/nbproject/project.properties
webpreview/nbproject/project.xml
webpreview/src/org/netbeans/modules/webpreview/Accessor.java
webpreview/src/org/netbeans/modules/webpreview/Bundle.properties
webpreview/src/org/netbeans/modules/webpreview/HTMLPreviewAction.java
webpreview/src/org/netbeans/modules/webpreview/HTMLWebPreviewable.java
webpreview/src/org/netbeans/modules/webpreview/Installer.java
webpreview/src/org/netbeans/modules/webpreview/WebPreviewControler.java
webpreview/src/org/netbeans/modules/webpreview/WebPreviewTopComponent.form
webpreview/src/org/netbeans/modules/webpreview/WebPreviewTopComponent.java
webpreview/src/org/netbeans/modules/webpreview/api/AccessorImpl.java
webpreview/src/org/netbeans/modules/webpreview/api/WebPreviewable.java
webpreview/src/org/netbeans/modules/webpreview/resources/Bundle.properties
webpreview/src/org/netbeans/modules/webpreview/resources/WebPreviewTopComponentSettings.xml
webpreview/src/org/netbeans/modules/webpreview/resources/WebPreviewTopComponentWstcref.xml
webpreview/src/org/netbeans/modules/webpreview/resources/layer.xml
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/core.browser.xulrunner.linux/build.xml	Thu Nov 22 15:44:15 2012 +0100
     1.3 @@ -0,0 +1,10 @@
     1.4 +<?xml version="1.0" encoding="UTF-8"?>
     1.5 +<project basedir="." default="netbeans" name="core.browser.xulrunner.linux">
     1.6 +    <import file="../nbbuild/templates/projectized.xml"/>
     1.7 +
     1.8 +    <target name="netbeans-extra">
     1.9 +        <mkdir dir="${cluster}/modules/lib"/>
    1.10 +        <unzip src="external/xulrunner-linux.zip" dest="${cluster}/modules/lib"/>
    1.11 +    </target>
    1.12 +    
    1.13 +</project>
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/core.browser.xulrunner.linux/external/binaries-list	Thu Nov 22 15:44:15 2012 +0100
     2.3 @@ -0,0 +1,1 @@
     2.4 +F6584C5B55541AC95A295F51C9377736530772CC xulrunner-linux.zip
     2.5 \ No newline at end of file
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/core.browser.xulrunner.linux/external/xulrunner-linux-license.txt	Thu Nov 22 15:44:15 2012 +0100
     3.3 @@ -0,0 +1,578 @@
     3.4 +Name: XUL Runner Linux - specific binaries
     3.5 +Version: N/A
     3.6 +Files: xulrunner-linux.zip
     3.7 +Description: XUL Runner binaries for Linux operating systems.
     3.8 +License: MPL 1.1
     3.9 +Origin: http://sourceforge.net/projects/mozswing/files/
    3.10 +OSR: 12289
    3.11 +
    3.12 +*******************************************************************************
    3.13 +
    3.14 +                          MOZILLA PUBLIC LICENSE
    3.15 +                                Version 1.1
    3.16 +
    3.17 +                              ---------------
    3.18 +
    3.19 +1. Definitions.
    3.20 +
    3.21 +     1.0.1. "Commercial Use" means distribution or otherwise making the
    3.22 +     Covered Code available to a third party.
    3.23 +
    3.24 +     1.1. "Contributor" means each entity that creates or contributes to
    3.25 +     the creation of Modifications.
    3.26 +
    3.27 +     1.2. "Contributor Version" means the combination of the Original
    3.28 +     Code, prior Modifications used by a Contributor, and the Modifications
    3.29 +     made by that particular Contributor.
    3.30 +
    3.31 +     1.3. "Covered Code" means the Original Code or Modifications or the
    3.32 +     combination of the Original Code and Modifications, in each case
    3.33 +     including portions thereof.
    3.34 +
    3.35 +     1.4. "Electronic Distribution Mechanism" means a mechanism generally
    3.36 +     accepted in the software development community for the electronic
    3.37 +     transfer of data.
    3.38 +
    3.39 +     1.5. "Executable" means Covered Code in any form other than Source
    3.40 +     Code.
    3.41 +
    3.42 +     1.6. "Initial Developer" means the individual or entity identified
    3.43 +     as the Initial Developer in the Source Code notice required by Exhibit
    3.44 +     A.
    3.45 +
    3.46 +     1.7. "Larger Work" means a work which combines Covered Code or
    3.47 +     portions thereof with code not governed by the terms of this License.
    3.48 +
    3.49 +     1.8. "License" means this document.
    3.50 +
    3.51 +     1.8.1. "Licensable" means having the right to grant, to the maximum
    3.52 +     extent possible, whether at the time of the initial grant or
    3.53 +     subsequently acquired, any and all of the rights conveyed herein.
    3.54 +
    3.55 +     1.9. "Modifications" means any addition to or deletion from the
    3.56 +     substance or structure of either the Original Code or any previous
    3.57 +     Modifications. When Covered Code is released as a series of files, a
    3.58 +     Modification is:
    3.59 +          A. Any addition to or deletion from the contents of a file
    3.60 +          containing Original Code or previous Modifications.
    3.61 +
    3.62 +          B. Any new file that contains any part of the Original Code or
    3.63 +          previous Modifications.
    3.64 +
    3.65 +     1.10. "Original Code" means Source Code of computer software code
    3.66 +     which is described in the Source Code notice required by Exhibit A as
    3.67 +     Original Code, and which, at the time of its release under this
    3.68 +     License is not already Covered Code governed by this License.
    3.69 +
    3.70 +     1.10.1. "Patent Claims" means any patent claim(s), now owned or
    3.71 +     hereafter acquired, including without limitation,  method, process,
    3.72 +     and apparatus claims, in any patent Licensable by grantor.
    3.73 +
    3.74 +     1.11. "Source Code" means the preferred form of the Covered Code for
    3.75 +     making modifications to it, including all modules it contains, plus
    3.76 +     any associated interface definition files, scripts used to control
    3.77 +     compilation and installation of an Executable, or source code
    3.78 +     differential comparisons against either the Original Code or another
    3.79 +     well known, available Covered Code of the Contributor's choice. The
    3.80 +     Source Code can be in a compressed or archival form, provided the
    3.81 +     appropriate decompression or de-archiving software is widely available
    3.82 +     for no charge.
    3.83 +
    3.84 +     1.12. "You" (or "Your")  means an individual or a legal entity
    3.85 +     exercising rights under, and complying with all of the terms of, this
    3.86 +     License or a future version of this License issued under Section 6.1.
    3.87 +     For legal entities, "You" includes any entity which controls, is
    3.88 +     controlled by, or is under common control with You. For purposes of
    3.89 +     this definition, "control" means (a) the power, direct or indirect,
    3.90 +     to cause the direction or management of such entity, whether by
    3.91 +     contract or otherwise, or (b) ownership of more than fifty percent
    3.92 +     (50%) of the outstanding shares or beneficial ownership of such
    3.93 +     entity.
    3.94 +
    3.95 +2. Source Code License.
    3.96 +
    3.97 +     2.1. The Initial Developer Grant.
    3.98 +     The Initial Developer hereby grants You a world-wide, royalty-free,
    3.99 +     non-exclusive license, subject to third party intellectual property
   3.100 +     claims:
   3.101 +          (a)  under intellectual property rights (other than patent or
   3.102 +          trademark) Licensable by Initial Developer to use, reproduce,
   3.103 +          modify, display, perform, sublicense and distribute the Original
   3.104 +          Code (or portions thereof) with or without Modifications, and/or
   3.105 +          as part of a Larger Work; and
   3.106 +
   3.107 +          (b) under Patents Claims infringed by the making, using or
   3.108 +          selling of Original Code, to make, have made, use, practice,
   3.109 +          sell, and offer for sale, and/or otherwise dispose of the
   3.110 +          Original Code (or portions thereof).
   3.111 +
   3.112 +          (c) the licenses granted in this Section 2.1(a) and (b) are
   3.113 +          effective on the date Initial Developer first distributes
   3.114 +          Original Code under the terms of this License.
   3.115 +
   3.116 +          (d) Notwithstanding Section 2.1(b) above, no patent license is
   3.117 +          granted: 1) for code that You delete from the Original Code; 2)
   3.118 +          separate from the Original Code;  or 3) for infringements caused
   3.119 +          by: i) the modification of the Original Code or ii) the
   3.120 +          combination of the Original Code with other software or devices.
   3.121 +
   3.122 +     2.2. Contributor Grant.
   3.123 +     Subject to third party intellectual property claims, each Contributor
   3.124 +     hereby grants You a world-wide, royalty-free, non-exclusive license
   3.125 +
   3.126 +          (a)  under intellectual property rights (other than patent or
   3.127 +          trademark) Licensable by Contributor, to use, reproduce, modify,
   3.128 +          display, perform, sublicense and distribute the Modifications
   3.129 +          created by such Contributor (or portions thereof) either on an
   3.130 +          unmodified basis, with other Modifications, as Covered Code
   3.131 +          and/or as part of a Larger Work; and
   3.132 +
   3.133 +          (b) under Patent Claims infringed by the making, using, or
   3.134 +          selling of  Modifications made by that Contributor either alone
   3.135 +          and/or in combination with its Contributor Version (or portions
   3.136 +          of such combination), to make, use, sell, offer for sale, have
   3.137 +          made, and/or otherwise dispose of: 1) Modifications made by that
   3.138 +          Contributor (or portions thereof); and 2) the combination of
   3.139 +          Modifications made by that Contributor with its Contributor
   3.140 +          Version (or portions of such combination).
   3.141 +
   3.142 +          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
   3.143 +          effective on the date Contributor first makes Commercial Use of
   3.144 +          the Covered Code.
   3.145 +
   3.146 +          (d)    Notwithstanding Section 2.2(b) above, no patent license is
   3.147 +          granted: 1) for any code that Contributor has deleted from the
   3.148 +          Contributor Version; 2)  separate from the Contributor Version;
   3.149 +          3)  for infringements caused by: i) third party modifications of
   3.150 +          Contributor Version or ii)  the combination of Modifications made
   3.151 +          by that Contributor with other software  (except as part of the
   3.152 +          Contributor Version) or other devices; or 4) under Patent Claims
   3.153 +          infringed by Covered Code in the absence of Modifications made by
   3.154 +          that Contributor.
   3.155 +
   3.156 +3. Distribution Obligations.
   3.157 +
   3.158 +     3.1. Application of License.
   3.159 +     The Modifications which You create or to which You contribute are
   3.160 +     governed by the terms of this License, including without limitation
   3.161 +     Section 2.2. The Source Code version of Covered Code may be
   3.162 +     distributed only under the terms of this License or a future version
   3.163 +     of this License released under Section 6.1, and You must include a
   3.164 +     copy of this License with every copy of the Source Code You
   3.165 +     distribute. You may not offer or impose any terms on any Source Code
   3.166 +     version that alters or restricts the applicable version of this
   3.167 +     License or the recipients' rights hereunder. However, You may include
   3.168 +     an additional document offering the additional rights described in
   3.169 +     Section 3.5.
   3.170 +
   3.171 +     3.2. Availability of Source Code.
   3.172 +     Any Modification which You create or to which You contribute must be
   3.173 +     made available in Source Code form under the terms of this License
   3.174 +     either on the same media as an Executable version or via an accepted
   3.175 +     Electronic Distribution Mechanism to anyone to whom you made an
   3.176 +     Executable version available; and if made available via Electronic
   3.177 +     Distribution Mechanism, must remain available for at least twelve (12)
   3.178 +     months after the date it initially became available, or at least six
   3.179 +     (6) months after a subsequent version of that particular Modification
   3.180 +     has been made available to such recipients. You are responsible for
   3.181 +     ensuring that the Source Code version remains available even if the
   3.182 +     Electronic Distribution Mechanism is maintained by a third party.
   3.183 +
   3.184 +     3.3. Description of Modifications.
   3.185 +     You must cause all Covered Code to which You contribute to contain a
   3.186 +     file documenting the changes You made to create that Covered Code and
   3.187 +     the date of any change. You must include a prominent statement that
   3.188 +     the Modification is derived, directly or indirectly, from Original
   3.189 +     Code provided by the Initial Developer and including the name of the
   3.190 +     Initial Developer in (a) the Source Code, and (b) in any notice in an
   3.191 +     Executable version or related documentation in which You describe the
   3.192 +     origin or ownership of the Covered Code.
   3.193 +
   3.194 +     3.4. Intellectual Property Matters
   3.195 +          (a) Third Party Claims.
   3.196 +          If Contributor has knowledge that a license under a third party's
   3.197 +          intellectual property rights is required to exercise the rights
   3.198 +          granted by such Contributor under Sections 2.1 or 2.2,
   3.199 +          Contributor must include a text file with the Source Code
   3.200 +          distribution titled "LEGAL" which describes the claim and the
   3.201 +          party making the claim in sufficient detail that a recipient will
   3.202 +          know whom to contact. If Contributor obtains such knowledge after
   3.203 +          the Modification is made available as described in Section 3.2,
   3.204 +          Contributor shall promptly modify the LEGAL file in all copies
   3.205 +          Contributor makes available thereafter and shall take other steps
   3.206 +          (such as notifying appropriate mailing lists or newsgroups)
   3.207 +          reasonably calculated to inform those who received the Covered
   3.208 +          Code that new knowledge has been obtained.
   3.209 +
   3.210 +          (b) Contributor APIs.
   3.211 +          If Contributor's Modifications include an application programming
   3.212 +          interface and Contributor has knowledge of patent licenses which
   3.213 +          are reasonably necessary to implement that API, Contributor must
   3.214 +          also include this information in the LEGAL file.
   3.215 +
   3.216 +               (c)    Representations.
   3.217 +          Contributor represents that, except as disclosed pursuant to
   3.218 +          Section 3.4(a) above, Contributor believes that Contributor's
   3.219 +          Modifications are Contributor's original creation(s) and/or
   3.220 +          Contributor has sufficient rights to grant the rights conveyed by
   3.221 +          this License.
   3.222 +
   3.223 +     3.5. Required Notices.
   3.224 +     You must duplicate the notice in Exhibit A in each file of the Source
   3.225 +     Code.  If it is not possible to put such notice in a particular Source
   3.226 +     Code file due to its structure, then You must include such notice in a
   3.227 +     location (such as a relevant directory) where a user would be likely
   3.228 +     to look for such a notice.  If You created one or more Modification(s)
   3.229 +     You may add your name as a Contributor to the notice described in
   3.230 +     Exhibit A.  You must also duplicate this License in any documentation
   3.231 +     for the Source Code where You describe recipients' rights or ownership
   3.232 +     rights relating to Covered Code.  You may choose to offer, and to
   3.233 +     charge a fee for, warranty, support, indemnity or liability
   3.234 +     obligations to one or more recipients of Covered Code. However, You
   3.235 +     may do so only on Your own behalf, and not on behalf of the Initial
   3.236 +     Developer or any Contributor. You must make it absolutely clear than
   3.237 +     any such warranty, support, indemnity or liability obligation is
   3.238 +     offered by You alone, and You hereby agree to indemnify the Initial
   3.239 +     Developer and every Contributor for any liability incurred by the
   3.240 +     Initial Developer or such Contributor as a result of warranty,
   3.241 +     support, indemnity or liability terms You offer.
   3.242 +
   3.243 +     3.6. Distribution of Executable Versions.
   3.244 +     You may distribute Covered Code in Executable form only if the
   3.245 +     requirements of Section 3.1-3.5 have been met for that Covered Code,
   3.246 +     and if You include a notice stating that the Source Code version of
   3.247 +     the Covered Code is available under the terms of this License,
   3.248 +     including a description of how and where You have fulfilled the
   3.249 +     obligations of Section 3.2. The notice must be conspicuously included
   3.250 +     in any notice in an Executable version, related documentation or
   3.251 +     collateral in which You describe recipients' rights relating to the
   3.252 +     Covered Code. You may distribute the Executable version of Covered
   3.253 +     Code or ownership rights under a license of Your choice, which may
   3.254 +     contain terms different from this License, provided that You are in
   3.255 +     compliance with the terms of this License and that the license for the
   3.256 +     Executable version does not attempt to limit or alter the recipient's
   3.257 +     rights in the Source Code version from the rights set forth in this
   3.258 +     License. If You distribute the Executable version under a different
   3.259 +     license You must make it absolutely clear that any terms which differ
   3.260 +     from this License are offered by You alone, not by the Initial
   3.261 +     Developer or any Contributor. You hereby agree to indemnify the
   3.262 +     Initial Developer and every Contributor for any liability incurred by
   3.263 +     the Initial Developer or such Contributor as a result of any such
   3.264 +     terms You offer.
   3.265 +
   3.266 +     3.7. Larger Works.
   3.267 +     You may create a Larger Work by combining Covered Code with other code
   3.268 +     not governed by the terms of this License and distribute the Larger
   3.269 +     Work as a single product. In such a case, You must make sure the
   3.270 +     requirements of this License are fulfilled for the Covered Code.
   3.271 +
   3.272 +4. Inability to Comply Due to Statute or Regulation.
   3.273 +
   3.274 +     If it is impossible for You to comply with any of the terms of this
   3.275 +     License with respect to some or all of the Covered Code due to
   3.276 +     statute, judicial order, or regulation then You must: (a) comply with
   3.277 +     the terms of this License to the maximum extent possible; and (b)
   3.278 +     describe the limitations and the code they affect. Such description
   3.279 +     must be included in the LEGAL file described in Section 3.4 and must
   3.280 +     be included with all distributions of the Source Code. Except to the
   3.281 +     extent prohibited by statute or regulation, such description must be
   3.282 +     sufficiently detailed for a recipient of ordinary skill to be able to
   3.283 +     understand it.
   3.284 +
   3.285 +5. Application of this License.
   3.286 +
   3.287 +     This License applies to code to which the Initial Developer has
   3.288 +     attached the notice in Exhibit A and to related Covered Code.
   3.289 +
   3.290 +6. Versions of the License.
   3.291 +
   3.292 +     6.1. New Versions.
   3.293 +     Netscape Communications Corporation ("Netscape") may publish revised
   3.294 +     and/or new versions of the License from time to time. Each version
   3.295 +     will be given a distinguishing version number.
   3.296 +
   3.297 +     6.2. Effect of New Versions.
   3.298 +     Once Covered Code has been published under a particular version of the
   3.299 +     License, You may always continue to use it under the terms of that
   3.300 +     version. You may also choose to use such Covered Code under the terms
   3.301 +     of any subsequent version of the License published by Netscape. No one
   3.302 +     other than Netscape has the right to modify the terms applicable to
   3.303 +     Covered Code created under this License.
   3.304 +
   3.305 +     6.3. Derivative Works.
   3.306 +     If You create or use a modified version of this License (which you may
   3.307 +     only do in order to apply it to code which is not already Covered Code
   3.308 +     governed by this License), You must (a) rename Your license so that
   3.309 +     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
   3.310 +     "MPL", "NPL" or any confusingly similar phrase do not appear in your
   3.311 +     license (except to note that your license differs from this License)
   3.312 +     and (b) otherwise make it clear that Your version of the license
   3.313 +     contains terms which differ from the Mozilla Public License and
   3.314 +     Netscape Public License. (Filling in the name of the Initial
   3.315 +     Developer, Original Code or Contributor in the notice described in
   3.316 +     Exhibit A shall not of themselves be deemed to be modifications of
   3.317 +     this License.)
   3.318 +
   3.319 +7. DISCLAIMER OF WARRANTY.
   3.320 +
   3.321 +     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
   3.322 +     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
   3.323 +     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
   3.324 +     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
   3.325 +     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
   3.326 +     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
   3.327 +     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
   3.328 +     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
   3.329 +     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
   3.330 +     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
   3.331 +
   3.332 +8. TERMINATION.
   3.333 +
   3.334 +     8.1.  This License and the rights granted hereunder will terminate
   3.335 +     automatically if You fail to comply with terms herein and fail to cure
   3.336 +     such breach within 30 days of becoming aware of the breach. All
   3.337 +     sublicenses to the Covered Code which are properly granted shall
   3.338 +     survive any termination of this License. Provisions which, by their
   3.339 +     nature, must remain in effect beyond the termination of this License
   3.340 +     shall survive.
   3.341 +
   3.342 +     8.2.  If You initiate litigation by asserting a patent infringement
   3.343 +     claim (excluding declatory judgment actions) against Initial Developer
   3.344 +     or a Contributor (the Initial Developer or Contributor against whom
   3.345 +     You file such action is referred to as "Participant")  alleging that:
   3.346 +
   3.347 +     (a)  such Participant's Contributor Version directly or indirectly
   3.348 +     infringes any patent, then any and all rights granted by such
   3.349 +     Participant to You under Sections 2.1 and/or 2.2 of this License
   3.350 +     shall, upon 60 days notice from Participant terminate prospectively,
   3.351 +     unless if within 60 days after receipt of notice You either: (i)
   3.352 +     agree in writing to pay Participant a mutually agreeable reasonable
   3.353 +     royalty for Your past and future use of Modifications made by such
   3.354 +     Participant, or (ii) withdraw Your litigation claim with respect to
   3.355 +     the Contributor Version against such Participant.  If within 60 days
   3.356 +     of notice, a reasonable royalty and payment arrangement are not
   3.357 +     mutually agreed upon in writing by the parties or the litigation claim
   3.358 +     is not withdrawn, the rights granted by Participant to You under
   3.359 +     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
   3.360 +     the 60 day notice period specified above.
   3.361 +
   3.362 +     (b)  any software, hardware, or device, other than such Participant's
   3.363 +     Contributor Version, directly or indirectly infringes any patent, then
   3.364 +     any rights granted to You by such Participant under Sections 2.1(b)
   3.365 +     and 2.2(b) are revoked effective as of the date You first made, used,
   3.366 +     sold, distributed, or had made, Modifications made by that
   3.367 +     Participant.
   3.368 +
   3.369 +     8.3.  If You assert a patent infringement claim against Participant
   3.370 +     alleging that such Participant's Contributor Version directly or
   3.371 +     indirectly infringes any patent where such claim is resolved (such as
   3.372 +     by license or settlement) prior to the initiation of patent
   3.373 +     infringement litigation, then the reasonable value of the licenses
   3.374 +     granted by such Participant under Sections 2.1 or 2.2 shall be taken
   3.375 +     into account in determining the amount or value of any payment or
   3.376 +     license.
   3.377 +
   3.378 +     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
   3.379 +     all end user license agreements (excluding distributors and resellers)
   3.380 +     which have been validly granted by You or any distributor hereunder
   3.381 +     prior to termination shall survive termination.
   3.382 +
   3.383 +9. LIMITATION OF LIABILITY.
   3.384 +
   3.385 +     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
   3.386 +     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
   3.387 +     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
   3.388 +     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
   3.389 +     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
   3.390 +     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
   3.391 +     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
   3.392 +     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
   3.393 +     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
   3.394 +     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
   3.395 +     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
   3.396 +     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
   3.397 +     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
   3.398 +     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
   3.399 +
   3.400 +10. U.S. GOVERNMENT END USERS.
   3.401 +
   3.402 +     The Covered Code is a "commercial item," as that term is defined in
   3.403 +     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
   3.404 +     software" and "commercial computer software documentation," as such
   3.405 +     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
   3.406 +     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
   3.407 +     all U.S. Government End Users acquire Covered Code with only those
   3.408 +     rights set forth herein.
   3.409 +
   3.410 +11. MISCELLANEOUS.
   3.411 +
   3.412 +     This License represents the complete agreement concerning subject
   3.413 +     matter hereof. If any provision of this License is held to be
   3.414 +     unenforceable, such provision shall be reformed only to the extent
   3.415 +     necessary to make it enforceable. This License shall be governed by
   3.416 +     California law provisions (except to the extent applicable law, if
   3.417 +     any, provides otherwise), excluding its conflict-of-law provisions.
   3.418 +     With respect to disputes in which at least one party is a citizen of,
   3.419 +     or an entity chartered or registered to do business in the United
   3.420 +     States of America, any litigation relating to this License shall be
   3.421 +     subject to the jurisdiction of the Federal Courts of the Northern
   3.422 +     District of California, with venue lying in Santa Clara County,
   3.423 +     California, with the losing party responsible for costs, including
   3.424 +     without limitation, court costs and reasonable attorneys' fees and
   3.425 +     expenses. The application of the United Nations Convention on
   3.426 +     Contracts for the International Sale of Goods is expressly excluded.
   3.427 +     Any law or regulation which provides that the language of a contract
   3.428 +     shall be construed against the drafter shall not apply to this
   3.429 +     License.
   3.430 +
   3.431 +12. RESPONSIBILITY FOR CLAIMS.
   3.432 +
   3.433 +     As between Initial Developer and the Contributors, each party is
   3.434 +     responsible for claims and damages arising, directly or indirectly,
   3.435 +     out of its utilization of rights under this License and You agree to
   3.436 +     work with Initial Developer and Contributors to distribute such
   3.437 +     responsibility on an equitable basis. Nothing herein is intended or
   3.438 +     shall be deemed to constitute any admission of liability.
   3.439 +
   3.440 +13. MULTIPLE-LICENSED CODE.
   3.441 +
   3.442 +     Initial Developer may designate portions of the Covered Code as
   3.443 +     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
   3.444 +     Developer permits you to utilize portions of the Covered Code under
   3.445 +     Your choice of the NPL or the alternative licenses, if any, specified
   3.446 +     by the Initial Developer in the file described in Exhibit A.
   3.447 +
   3.448 +EXHIBIT A -Mozilla Public License.
   3.449 +
   3.450 +     ``The contents of this file are subject to the Mozilla Public License
   3.451 +     Version 1.1 (the "License"); you may not use this file except in
   3.452 +     compliance with the License. You may obtain a copy of the License at
   3.453 +     http://www.mozilla.org/MPL/
   3.454 +
   3.455 +     Software distributed under the License is distributed on an "AS IS"
   3.456 +     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
   3.457 +     License for the specific language governing rights and limitations
   3.458 +     under the License.
   3.459 +
   3.460 +     The Original Code is ______________________________________.
   3.461 +
   3.462 +     The Initial Developer of the Original Code is ________________________.
   3.463 +     Portions created by ______________________ are Copyright (C) ______
   3.464 +     _______________________. All Rights Reserved.
   3.465 +
   3.466 +     Contributor(s): ______________________________________.
   3.467 +
   3.468 +     Alternatively, the contents of this file may be used under the terms
   3.469 +     of the _____ license (the  "[___] License"), in which case the
   3.470 +     provisions of [______] License are applicable instead of those
   3.471 +     above.  If you wish to allow use of your version of this file only
   3.472 +     under the terms of the [____] License and not to allow others to use
   3.473 +     your version of this file under the MPL, indicate your decision by
   3.474 +     deleting  the provisions above and replace  them with the notice and
   3.475 +     other provisions required by the [___] License.  If you do not delete
   3.476 +     the provisions above, a recipient may use your version of this file
   3.477 +     under either the MPL or the [___] License."
   3.478 +
   3.479 +     [NOTE: The text of this Exhibit A may differ slightly from the text of
   3.480 +     the notices in the Source Code files of the Original Code. You should
   3.481 +     use the text of this Exhibit A rather than the text found in the
   3.482 +     Original Code Source Code for Your Modifications.]
   3.483 +
   3.484 +     ----------------------------------------------------------------------
   3.485 +
   3.486 +     AMENDMENTS
   3.487 +
   3.488 +     The Netscape Public License Version 1.1 ("NPL") consists of the
   3.489 +     Mozilla Public License Version 1.1 with the following Amendments,
   3.490 +     including Exhibit A-Netscape Public License.  Files identified with
   3.491 +     "Exhibit A-Netscape Public License" are governed by the Netscape
   3.492 +     Public License Version 1.1.
   3.493 +
   3.494 +     Additional Terms applicable to the Netscape Public License.
   3.495 +          I. Effect.
   3.496 +          These additional terms described in this Netscape Public
   3.497 +          License -- Amendments shall apply to the Mozilla Communicator
   3.498 +          client code and to all Covered Code under this License.
   3.499 +
   3.500 +          II. "Netscape's Branded Code" means Covered Code that Netscape
   3.501 +          distributes and/or permits others to distribute under one or more
   3.502 +          trademark(s) which are controlled by Netscape but which are not
   3.503 +          licensed for use under this License.
   3.504 +
   3.505 +          III. Netscape and logo.
   3.506 +          This License does not grant any rights to use the trademarks
   3.507 +          "Netscape", the "Netscape N and horizon" logo or the "Netscape
   3.508 +          lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript",
   3.509 +          "Smart Browsing" even if such marks are included in the Original
   3.510 +          Code or Modifications.
   3.511 +
   3.512 +          IV. Inability to Comply Due to Contractual Obligation.
   3.513 +          Prior to licensing the Original Code under this License, Netscape
   3.514 +          has licensed third party code for use in Netscape's Branded Code.
   3.515 +          To the extent that Netscape is limited contractually from making
   3.516 +          such third party code available under this License, Netscape may
   3.517 +          choose to reintegrate such code into Covered Code without being
   3.518 +          required to distribute such code in Source Code form, even if
   3.519 +          such code would otherwise be considered "Modifications" under
   3.520 +          this License.
   3.521 +
   3.522 +          V. Use of Modifications and Covered Code by Initial Developer.
   3.523 +               V.1. In General.
   3.524 +               The obligations of Section 3 apply to Netscape, except to
   3.525 +               the extent specified in this Amendment, Section V.2 and V.3.
   3.526 +
   3.527 +               V.2. Other Products.
   3.528 +               Netscape may include Covered Code in products other than the
   3.529 +               Netscape's Branded Code which are released by Netscape
   3.530 +               during the two (2) years following the release date of the
   3.531 +               Original Code, without such additional products becoming
   3.532 +               subject to the terms of this License, and may license such
   3.533 +               additional products on different terms from those contained
   3.534 +               in this License.
   3.535 +
   3.536 +               V.3. Alternative Licensing.
   3.537 +               Netscape may license the Source Code of Netscape's Branded
   3.538 +               Code, including Modifications incorporated therein, without
   3.539 +               such Netscape Branded Code becoming subject to the terms of
   3.540 +               this License, and may license such Netscape Branded Code on
   3.541 +               different terms from those contained in this License.
   3.542 +
   3.543 +          VI. Litigation.
   3.544 +          Notwithstanding the limitations of Section 11 above, the
   3.545 +          provisions regarding litigation in Section 11(a), (b) and (c) of
   3.546 +          the License shall apply to all disputes relating to this License.
   3.547 +
   3.548 +     EXHIBIT A-Netscape Public License.
   3.549 +
   3.550 +          "The contents of this file are subject to the Netscape Public
   3.551 +          License Version 1.1 (the "License"); you may not use this file
   3.552 +          except in compliance with the License. You may obtain a copy of
   3.553 +          the License at http://www.mozilla.org/NPL/
   3.554 +
   3.555 +          Software distributed under the License is distributed on an "AS
   3.556 +          IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
   3.557 +          implied. See the License for the specific language governing
   3.558 +          rights and limitations under the License.
   3.559 +
   3.560 +          The Original Code is Mozilla Communicator client code, released
   3.561 +          March 31, 1998.
   3.562 +
   3.563 +          The Initial Developer of the Original Code is Netscape
   3.564 +          Communications Corporation. Portions created by Netscape are
   3.565 +          Copyright (C) 1998-1999 Netscape Communications Corporation. All
   3.566 +          Rights Reserved.
   3.567 +
   3.568 +          Contributor(s): ______________________________________.
   3.569 +
   3.570 +          Alternatively, the contents of this file may be used under the
   3.571 +          terms of the _____ license (the "[___] License"), in which case
   3.572 +          the provisions of [______] License are applicable  instead of
   3.573 +          those above.  If you wish to allow use of your version of this
   3.574 +          file only under the terms of the [____] License and not to allow
   3.575 +          others to use your version of this file under the NPL, indicate
   3.576 +          your decision by deleting  the provisions above and replace  them
   3.577 +          with the notice and other provisions required by the [___]
   3.578 +          License.  If you do not delete the provisions above, a recipient
   3.579 +          may use your version of this file under either the NPL or the
   3.580 +          [___] License."
   3.581 +
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/core.browser.xulrunner.linux/manifest.mf	Thu Nov 22 15:44:15 2012 +0100
     4.3 @@ -0,0 +1,6 @@
     4.4 +Manifest-Version: 1.0
     4.5 +OpenIDE-Module: org.netbeans.core.browser.xulrunner.linux/1
     4.6 +OpenIDE-Module-Implementation-Version: 1
     4.7 +OpenIDE-Module-Localizing-Bundle: org/netbeans/core/browser/xulrunner/linux/Bundle.properties
     4.8 +AutoUpdate-Show-In-Client: false
     4.9 +OpenIDE-Module-Requires: org.openide.modules.os.Linux
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/core.browser.xulrunner.linux/nbproject/project.properties	Thu Nov 22 15:44:15 2012 +0100
     5.3 @@ -0,0 +1,5 @@
     5.4 +is.autoload=true
     5.5 +javac.source=1.6
     5.6 +javac.compilerargs=-Xlint -Xlint:-serial
     5.7 +spec.version.base=1.2.0
     5.8 +extra.module.files=modules/lib/native/linux/
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/core.browser.xulrunner.linux/nbproject/project.xml	Thu Nov 22 15:44:15 2012 +0100
     6.3 @@ -0,0 +1,11 @@
     6.4 +<?xml version="1.0" encoding="UTF-8"?>
     6.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
     6.6 +    <type>org.netbeans.modules.apisupport.project</type>
     6.7 +    <configuration>
     6.8 +        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
     6.9 +            <code-name-base>org.netbeans.core.browser.xulrunner.linux</code-name-base>
    6.10 +            <module-dependencies/>
    6.11 +            <public-packages/>
    6.12 +        </data>
    6.13 +    </configuration>
    6.14 +</project>
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/core.browser.xulrunner.linux/src/org/netbeans/core/browser/xulrunner/linux/Bundle.properties	Thu Nov 22 15:44:15 2012 +0100
     7.3 @@ -0,0 +1,5 @@
     7.4 +OpenIDE-Module-Display-Category=Base IDE
     7.5 +OpenIDE-Module-Long-Description=\
     7.6 +    <html>Linux-specific binaries for embedded browser.\
     7.7 +    <br><b>Warning:</b> the embedded browser is known to cause JVM crashes when running under GTK look & feel, use at your own risk!
     7.8 +OpenIDE-Module-Name=XUL Runner Linux
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/core.browser.xulrunner.macosx/build.xml	Thu Nov 22 15:44:15 2012 +0100
     8.3 @@ -0,0 +1,13 @@
     8.4 +<?xml version="1.0" encoding="UTF-8"?>
     8.5 +<project basedir="." default="netbeans" name="core.browser.xulrunner.macosx">
     8.6 +
     8.7 +    <import file="../nbbuild/templates/projectized.xml"/>
     8.8 +
     8.9 +    <target name="netbeans-extra">
    8.10 +        <mkdir dir="${cluster}/modules/lib"/>
    8.11 +        <unzip src="external/xulrunner-macosx.zip" dest="${cluster}/modules/lib">
    8.12 +            <patternset excludes="**/CVS/"/><!-- XXX mistakenly included in ZIP -->
    8.13 +        </unzip>
    8.14 +    </target>
    8.15 +    
    8.16 +</project>
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/core.browser.xulrunner.macosx/external/binaries-list	Thu Nov 22 15:44:15 2012 +0100
     9.3 @@ -0,0 +1,1 @@
     9.4 +AD6C3E5926051810258ED58521286BCD98AC7785 xulrunner-macosx.zip
     9.5 \ No newline at end of file
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/core.browser.xulrunner.macosx/external/xulrunner-macosx-license.txt	Thu Nov 22 15:44:15 2012 +0100
    10.3 @@ -0,0 +1,578 @@
    10.4 +Name: XUL Runner Mac OS X - specific binaries
    10.5 +Version: N/A
    10.6 +Files: xulrunner-macosx.zip
    10.7 +Description: XUL Runner binaries for Mac OS X operating systems.
    10.8 +License: MPL 1.1
    10.9 +Origin: http://sourceforge.net/projects/mozswing/files/
   10.10 +OSR: 12289
   10.11 +
   10.12 +*******************************************************************************
   10.13 +
   10.14 +                          MOZILLA PUBLIC LICENSE
   10.15 +                                Version 1.1
   10.16 +
   10.17 +                              ---------------
   10.18 +
   10.19 +1. Definitions.
   10.20 +
   10.21 +     1.0.1. "Commercial Use" means distribution or otherwise making the
   10.22 +     Covered Code available to a third party.
   10.23 +
   10.24 +     1.1. "Contributor" means each entity that creates or contributes to
   10.25 +     the creation of Modifications.
   10.26 +
   10.27 +     1.2. "Contributor Version" means the combination of the Original
   10.28 +     Code, prior Modifications used by a Contributor, and the Modifications
   10.29 +     made by that particular Contributor.
   10.30 +
   10.31 +     1.3. "Covered Code" means the Original Code or Modifications or the
   10.32 +     combination of the Original Code and Modifications, in each case
   10.33 +     including portions thereof.
   10.34 +
   10.35 +     1.4. "Electronic Distribution Mechanism" means a mechanism generally
   10.36 +     accepted in the software development community for the electronic
   10.37 +     transfer of data.
   10.38 +
   10.39 +     1.5. "Executable" means Covered Code in any form other than Source
   10.40 +     Code.
   10.41 +
   10.42 +     1.6. "Initial Developer" means the individual or entity identified
   10.43 +     as the Initial Developer in the Source Code notice required by Exhibit
   10.44 +     A.
   10.45 +
   10.46 +     1.7. "Larger Work" means a work which combines Covered Code or
   10.47 +     portions thereof with code not governed by the terms of this License.
   10.48 +
   10.49 +     1.8. "License" means this document.
   10.50 +
   10.51 +     1.8.1. "Licensable" means having the right to grant, to the maximum
   10.52 +     extent possible, whether at the time of the initial grant or
   10.53 +     subsequently acquired, any and all of the rights conveyed herein.
   10.54 +
   10.55 +     1.9. "Modifications" means any addition to or deletion from the
   10.56 +     substance or structure of either the Original Code or any previous
   10.57 +     Modifications. When Covered Code is released as a series of files, a
   10.58 +     Modification is:
   10.59 +          A. Any addition to or deletion from the contents of a file
   10.60 +          containing Original Code or previous Modifications.
   10.61 +
   10.62 +          B. Any new file that contains any part of the Original Code or
   10.63 +          previous Modifications.
   10.64 +
   10.65 +     1.10. "Original Code" means Source Code of computer software code
   10.66 +     which is described in the Source Code notice required by Exhibit A as
   10.67 +     Original Code, and which, at the time of its release under this
   10.68 +     License is not already Covered Code governed by this License.
   10.69 +
   10.70 +     1.10.1. "Patent Claims" means any patent claim(s), now owned or
   10.71 +     hereafter acquired, including without limitation,  method, process,
   10.72 +     and apparatus claims, in any patent Licensable by grantor.
   10.73 +
   10.74 +     1.11. "Source Code" means the preferred form of the Covered Code for
   10.75 +     making modifications to it, including all modules it contains, plus
   10.76 +     any associated interface definition files, scripts used to control
   10.77 +     compilation and installation of an Executable, or source code
   10.78 +     differential comparisons against either the Original Code or another
   10.79 +     well known, available Covered Code of the Contributor's choice. The
   10.80 +     Source Code can be in a compressed or archival form, provided the
   10.81 +     appropriate decompression or de-archiving software is widely available
   10.82 +     for no charge.
   10.83 +
   10.84 +     1.12. "You" (or "Your")  means an individual or a legal entity
   10.85 +     exercising rights under, and complying with all of the terms of, this
   10.86 +     License or a future version of this License issued under Section 6.1.
   10.87 +     For legal entities, "You" includes any entity which controls, is
   10.88 +     controlled by, or is under common control with You. For purposes of
   10.89 +     this definition, "control" means (a) the power, direct or indirect,
   10.90 +     to cause the direction or management of such entity, whether by
   10.91 +     contract or otherwise, or (b) ownership of more than fifty percent
   10.92 +     (50%) of the outstanding shares or beneficial ownership of such
   10.93 +     entity.
   10.94 +
   10.95 +2. Source Code License.
   10.96 +
   10.97 +     2.1. The Initial Developer Grant.
   10.98 +     The Initial Developer hereby grants You a world-wide, royalty-free,
   10.99 +     non-exclusive license, subject to third party intellectual property
  10.100 +     claims:
  10.101 +          (a)  under intellectual property rights (other than patent or
  10.102 +          trademark) Licensable by Initial Developer to use, reproduce,
  10.103 +          modify, display, perform, sublicense and distribute the Original
  10.104 +          Code (or portions thereof) with or without Modifications, and/or
  10.105 +          as part of a Larger Work; and
  10.106 +
  10.107 +          (b) under Patents Claims infringed by the making, using or
  10.108 +          selling of Original Code, to make, have made, use, practice,
  10.109 +          sell, and offer for sale, and/or otherwise dispose of the
  10.110 +          Original Code (or portions thereof).
  10.111 +
  10.112 +          (c) the licenses granted in this Section 2.1(a) and (b) are
  10.113 +          effective on the date Initial Developer first distributes
  10.114 +          Original Code under the terms of this License.
  10.115 +
  10.116 +          (d) Notwithstanding Section 2.1(b) above, no patent license is
  10.117 +          granted: 1) for code that You delete from the Original Code; 2)
  10.118 +          separate from the Original Code;  or 3) for infringements caused
  10.119 +          by: i) the modification of the Original Code or ii) the
  10.120 +          combination of the Original Code with other software or devices.
  10.121 +
  10.122 +     2.2. Contributor Grant.
  10.123 +     Subject to third party intellectual property claims, each Contributor
  10.124 +     hereby grants You a world-wide, royalty-free, non-exclusive license
  10.125 +
  10.126 +          (a)  under intellectual property rights (other than patent or
  10.127 +          trademark) Licensable by Contributor, to use, reproduce, modify,
  10.128 +          display, perform, sublicense and distribute the Modifications
  10.129 +          created by such Contributor (or portions thereof) either on an
  10.130 +          unmodified basis, with other Modifications, as Covered Code
  10.131 +          and/or as part of a Larger Work; and
  10.132 +
  10.133 +          (b) under Patent Claims infringed by the making, using, or
  10.134 +          selling of  Modifications made by that Contributor either alone
  10.135 +          and/or in combination with its Contributor Version (or portions
  10.136 +          of such combination), to make, use, sell, offer for sale, have
  10.137 +          made, and/or otherwise dispose of: 1) Modifications made by that
  10.138 +          Contributor (or portions thereof); and 2) the combination of
  10.139 +          Modifications made by that Contributor with its Contributor
  10.140 +          Version (or portions of such combination).
  10.141 +
  10.142 +          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
  10.143 +          effective on the date Contributor first makes Commercial Use of
  10.144 +          the Covered Code.
  10.145 +
  10.146 +          (d)    Notwithstanding Section 2.2(b) above, no patent license is
  10.147 +          granted: 1) for any code that Contributor has deleted from the
  10.148 +          Contributor Version; 2)  separate from the Contributor Version;
  10.149 +          3)  for infringements caused by: i) third party modifications of
  10.150 +          Contributor Version or ii)  the combination of Modifications made
  10.151 +          by that Contributor with other software  (except as part of the
  10.152 +          Contributor Version) or other devices; or 4) under Patent Claims
  10.153 +          infringed by Covered Code in the absence of Modifications made by
  10.154 +          that Contributor.
  10.155 +
  10.156 +3. Distribution Obligations.
  10.157 +
  10.158 +     3.1. Application of License.
  10.159 +     The Modifications which You create or to which You contribute are
  10.160 +     governed by the terms of this License, including without limitation
  10.161 +     Section 2.2. The Source Code version of Covered Code may be
  10.162 +     distributed only under the terms of this License or a future version
  10.163 +     of this License released under Section 6.1, and You must include a
  10.164 +     copy of this License with every copy of the Source Code You
  10.165 +     distribute. You may not offer or impose any terms on any Source Code
  10.166 +     version that alters or restricts the applicable version of this
  10.167 +     License or the recipients' rights hereunder. However, You may include
  10.168 +     an additional document offering the additional rights described in
  10.169 +     Section 3.5.
  10.170 +
  10.171 +     3.2. Availability of Source Code.
  10.172 +     Any Modification which You create or to which You contribute must be
  10.173 +     made available in Source Code form under the terms of this License
  10.174 +     either on the same media as an Executable version or via an accepted
  10.175 +     Electronic Distribution Mechanism to anyone to whom you made an
  10.176 +     Executable version available; and if made available via Electronic
  10.177 +     Distribution Mechanism, must remain available for at least twelve (12)
  10.178 +     months after the date it initially became available, or at least six
  10.179 +     (6) months after a subsequent version of that particular Modification
  10.180 +     has been made available to such recipients. You are responsible for
  10.181 +     ensuring that the Source Code version remains available even if the
  10.182 +     Electronic Distribution Mechanism is maintained by a third party.
  10.183 +
  10.184 +     3.3. Description of Modifications.
  10.185 +     You must cause all Covered Code to which You contribute to contain a
  10.186 +     file documenting the changes You made to create that Covered Code and
  10.187 +     the date of any change. You must include a prominent statement that
  10.188 +     the Modification is derived, directly or indirectly, from Original
  10.189 +     Code provided by the Initial Developer and including the name of the
  10.190 +     Initial Developer in (a) the Source Code, and (b) in any notice in an
  10.191 +     Executable version or related documentation in which You describe the
  10.192 +     origin or ownership of the Covered Code.
  10.193 +
  10.194 +     3.4. Intellectual Property Matters
  10.195 +          (a) Third Party Claims.
  10.196 +          If Contributor has knowledge that a license under a third party's
  10.197 +          intellectual property rights is required to exercise the rights
  10.198 +          granted by such Contributor under Sections 2.1 or 2.2,
  10.199 +          Contributor must include a text file with the Source Code
  10.200 +          distribution titled "LEGAL" which describes the claim and the
  10.201 +          party making the claim in sufficient detail that a recipient will
  10.202 +          know whom to contact. If Contributor obtains such knowledge after
  10.203 +          the Modification is made available as described in Section 3.2,
  10.204 +          Contributor shall promptly modify the LEGAL file in all copies
  10.205 +          Contributor makes available thereafter and shall take other steps
  10.206 +          (such as notifying appropriate mailing lists or newsgroups)
  10.207 +          reasonably calculated to inform those who received the Covered
  10.208 +          Code that new knowledge has been obtained.
  10.209 +
  10.210 +          (b) Contributor APIs.
  10.211 +          If Contributor's Modifications include an application programming
  10.212 +          interface and Contributor has knowledge of patent licenses which
  10.213 +          are reasonably necessary to implement that API, Contributor must
  10.214 +          also include this information in the LEGAL file.
  10.215 +
  10.216 +               (c)    Representations.
  10.217 +          Contributor represents that, except as disclosed pursuant to
  10.218 +          Section 3.4(a) above, Contributor believes that Contributor's
  10.219 +          Modifications are Contributor's original creation(s) and/or
  10.220 +          Contributor has sufficient rights to grant the rights conveyed by
  10.221 +          this License.
  10.222 +
  10.223 +     3.5. Required Notices.
  10.224 +     You must duplicate the notice in Exhibit A in each file of the Source
  10.225 +     Code.  If it is not possible to put such notice in a particular Source
  10.226 +     Code file due to its structure, then You must include such notice in a
  10.227 +     location (such as a relevant directory) where a user would be likely
  10.228 +     to look for such a notice.  If You created one or more Modification(s)
  10.229 +     You may add your name as a Contributor to the notice described in
  10.230 +     Exhibit A.  You must also duplicate this License in any documentation
  10.231 +     for the Source Code where You describe recipients' rights or ownership
  10.232 +     rights relating to Covered Code.  You may choose to offer, and to
  10.233 +     charge a fee for, warranty, support, indemnity or liability
  10.234 +     obligations to one or more recipients of Covered Code. However, You
  10.235 +     may do so only on Your own behalf, and not on behalf of the Initial
  10.236 +     Developer or any Contributor. You must make it absolutely clear than
  10.237 +     any such warranty, support, indemnity or liability obligation is
  10.238 +     offered by You alone, and You hereby agree to indemnify the Initial
  10.239 +     Developer and every Contributor for any liability incurred by the
  10.240 +     Initial Developer or such Contributor as a result of warranty,
  10.241 +     support, indemnity or liability terms You offer.
  10.242 +
  10.243 +     3.6. Distribution of Executable Versions.
  10.244 +     You may distribute Covered Code in Executable form only if the
  10.245 +     requirements of Section 3.1-3.5 have been met for that Covered Code,
  10.246 +     and if You include a notice stating that the Source Code version of
  10.247 +     the Covered Code is available under the terms of this License,
  10.248 +     including a description of how and where You have fulfilled the
  10.249 +     obligations of Section 3.2. The notice must be conspicuously included
  10.250 +     in any notice in an Executable version, related documentation or
  10.251 +     collateral in which You describe recipients' rights relating to the
  10.252 +     Covered Code. You may distribute the Executable version of Covered
  10.253 +     Code or ownership rights under a license of Your choice, which may
  10.254 +     contain terms different from this License, provided that You are in
  10.255 +     compliance with the terms of this License and that the license for the
  10.256 +     Executable version does not attempt to limit or alter the recipient's
  10.257 +     rights in the Source Code version from the rights set forth in this
  10.258 +     License. If You distribute the Executable version under a different
  10.259 +     license You must make it absolutely clear that any terms which differ
  10.260 +     from this License are offered by You alone, not by the Initial
  10.261 +     Developer or any Contributor. You hereby agree to indemnify the
  10.262 +     Initial Developer and every Contributor for any liability incurred by
  10.263 +     the Initial Developer or such Contributor as a result of any such
  10.264 +     terms You offer.
  10.265 +
  10.266 +     3.7. Larger Works.
  10.267 +     You may create a Larger Work by combining Covered Code with other code
  10.268 +     not governed by the terms of this License and distribute the Larger
  10.269 +     Work as a single product. In such a case, You must make sure the
  10.270 +     requirements of this License are fulfilled for the Covered Code.
  10.271 +
  10.272 +4. Inability to Comply Due to Statute or Regulation.
  10.273 +
  10.274 +     If it is impossible for You to comply with any of the terms of this
  10.275 +     License with respect to some or all of the Covered Code due to
  10.276 +     statute, judicial order, or regulation then You must: (a) comply with
  10.277 +     the terms of this License to the maximum extent possible; and (b)
  10.278 +     describe the limitations and the code they affect. Such description
  10.279 +     must be included in the LEGAL file described in Section 3.4 and must
  10.280 +     be included with all distributions of the Source Code. Except to the
  10.281 +     extent prohibited by statute or regulation, such description must be
  10.282 +     sufficiently detailed for a recipient of ordinary skill to be able to
  10.283 +     understand it.
  10.284 +
  10.285 +5. Application of this License.
  10.286 +
  10.287 +     This License applies to code to which the Initial Developer has
  10.288 +     attached the notice in Exhibit A and to related Covered Code.
  10.289 +
  10.290 +6. Versions of the License.
  10.291 +
  10.292 +     6.1. New Versions.
  10.293 +     Netscape Communications Corporation ("Netscape") may publish revised
  10.294 +     and/or new versions of the License from time to time. Each version
  10.295 +     will be given a distinguishing version number.
  10.296 +
  10.297 +     6.2. Effect of New Versions.
  10.298 +     Once Covered Code has been published under a particular version of the
  10.299 +     License, You may always continue to use it under the terms of that
  10.300 +     version. You may also choose to use such Covered Code under the terms
  10.301 +     of any subsequent version of the License published by Netscape. No one
  10.302 +     other than Netscape has the right to modify the terms applicable to
  10.303 +     Covered Code created under this License.
  10.304 +
  10.305 +     6.3. Derivative Works.
  10.306 +     If You create or use a modified version of this License (which you may
  10.307 +     only do in order to apply it to code which is not already Covered Code
  10.308 +     governed by this License), You must (a) rename Your license so that
  10.309 +     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
  10.310 +     "MPL", "NPL" or any confusingly similar phrase do not appear in your
  10.311 +     license (except to note that your license differs from this License)
  10.312 +     and (b) otherwise make it clear that Your version of the license
  10.313 +     contains terms which differ from the Mozilla Public License and
  10.314 +     Netscape Public License. (Filling in the name of the Initial
  10.315 +     Developer, Original Code or Contributor in the notice described in
  10.316 +     Exhibit A shall not of themselves be deemed to be modifications of
  10.317 +     this License.)
  10.318 +
  10.319 +7. DISCLAIMER OF WARRANTY.
  10.320 +
  10.321 +     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
  10.322 +     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
  10.323 +     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
  10.324 +     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
  10.325 +     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
  10.326 +     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
  10.327 +     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
  10.328 +     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
  10.329 +     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
  10.330 +     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
  10.331 +
  10.332 +8. TERMINATION.
  10.333 +
  10.334 +     8.1.  This License and the rights granted hereunder will terminate
  10.335 +     automatically if You fail to comply with terms herein and fail to cure
  10.336 +     such breach within 30 days of becoming aware of the breach. All
  10.337 +     sublicenses to the Covered Code which are properly granted shall
  10.338 +     survive any termination of this License. Provisions which, by their
  10.339 +     nature, must remain in effect beyond the termination of this License
  10.340 +     shall survive.
  10.341 +
  10.342 +     8.2.  If You initiate litigation by asserting a patent infringement
  10.343 +     claim (excluding declatory judgment actions) against Initial Developer
  10.344 +     or a Contributor (the Initial Developer or Contributor against whom
  10.345 +     You file such action is referred to as "Participant")  alleging that:
  10.346 +
  10.347 +     (a)  such Participant's Contributor Version directly or indirectly
  10.348 +     infringes any patent, then any and all rights granted by such
  10.349 +     Participant to You under Sections 2.1 and/or 2.2 of this License
  10.350 +     shall, upon 60 days notice from Participant terminate prospectively,
  10.351 +     unless if within 60 days after receipt of notice You either: (i)
  10.352 +     agree in writing to pay Participant a mutually agreeable reasonable
  10.353 +     royalty for Your past and future use of Modifications made by such
  10.354 +     Participant, or (ii) withdraw Your litigation claim with respect to
  10.355 +     the Contributor Version against such Participant.  If within 60 days
  10.356 +     of notice, a reasonable royalty and payment arrangement are not
  10.357 +     mutually agreed upon in writing by the parties or the litigation claim
  10.358 +     is not withdrawn, the rights granted by Participant to You under
  10.359 +     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
  10.360 +     the 60 day notice period specified above.
  10.361 +
  10.362 +     (b)  any software, hardware, or device, other than such Participant's
  10.363 +     Contributor Version, directly or indirectly infringes any patent, then
  10.364 +     any rights granted to You by such Participant under Sections 2.1(b)
  10.365 +     and 2.2(b) are revoked effective as of the date You first made, used,
  10.366 +     sold, distributed, or had made, Modifications made by that
  10.367 +     Participant.
  10.368 +
  10.369 +     8.3.  If You assert a patent infringement claim against Participant
  10.370 +     alleging that such Participant's Contributor Version directly or
  10.371 +     indirectly infringes any patent where such claim is resolved (such as
  10.372 +     by license or settlement) prior to the initiation of patent
  10.373 +     infringement litigation, then the reasonable value of the licenses
  10.374 +     granted by such Participant under Sections 2.1 or 2.2 shall be taken
  10.375 +     into account in determining the amount or value of any payment or
  10.376 +     license.
  10.377 +
  10.378 +     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
  10.379 +     all end user license agreements (excluding distributors and resellers)
  10.380 +     which have been validly granted by You or any distributor hereunder
  10.381 +     prior to termination shall survive termination.
  10.382 +
  10.383 +9. LIMITATION OF LIABILITY.
  10.384 +
  10.385 +     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
  10.386 +     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
  10.387 +     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
  10.388 +     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
  10.389 +     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
  10.390 +     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
  10.391 +     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
  10.392 +     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
  10.393 +     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
  10.394 +     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
  10.395 +     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
  10.396 +     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
  10.397 +     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
  10.398 +     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
  10.399 +
  10.400 +10. U.S. GOVERNMENT END USERS.
  10.401 +
  10.402 +     The Covered Code is a "commercial item," as that term is defined in
  10.403 +     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
  10.404 +     software" and "commercial computer software documentation," as such
  10.405 +     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
  10.406 +     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
  10.407 +     all U.S. Government End Users acquire Covered Code with only those
  10.408 +     rights set forth herein.
  10.409 +
  10.410 +11. MISCELLANEOUS.
  10.411 +
  10.412 +     This License represents the complete agreement concerning subject
  10.413 +     matter hereof. If any provision of this License is held to be
  10.414 +     unenforceable, such provision shall be reformed only to the extent
  10.415 +     necessary to make it enforceable. This License shall be governed by
  10.416 +     California law provisions (except to the extent applicable law, if
  10.417 +     any, provides otherwise), excluding its conflict-of-law provisions.
  10.418 +     With respect to disputes in which at least one party is a citizen of,
  10.419 +     or an entity chartered or registered to do business in the United
  10.420 +     States of America, any litigation relating to this License shall be
  10.421 +     subject to the jurisdiction of the Federal Courts of the Northern
  10.422 +     District of California, with venue lying in Santa Clara County,
  10.423 +     California, with the losing party responsible for costs, including
  10.424 +     without limitation, court costs and reasonable attorneys' fees and
  10.425 +     expenses. The application of the United Nations Convention on
  10.426 +     Contracts for the International Sale of Goods is expressly excluded.
  10.427 +     Any law or regulation which provides that the language of a contract
  10.428 +     shall be construed against the drafter shall not apply to this
  10.429 +     License.
  10.430 +
  10.431 +12. RESPONSIBILITY FOR CLAIMS.
  10.432 +
  10.433 +     As between Initial Developer and the Contributors, each party is
  10.434 +     responsible for claims and damages arising, directly or indirectly,
  10.435 +     out of its utilization of rights under this License and You agree to
  10.436 +     work with Initial Developer and Contributors to distribute such
  10.437 +     responsibility on an equitable basis. Nothing herein is intended or
  10.438 +     shall be deemed to constitute any admission of liability.
  10.439 +
  10.440 +13. MULTIPLE-LICENSED CODE.
  10.441 +
  10.442 +     Initial Developer may designate portions of the Covered Code as
  10.443 +     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
  10.444 +     Developer permits you to utilize portions of the Covered Code under
  10.445 +     Your choice of the NPL or the alternative licenses, if any, specified
  10.446 +     by the Initial Developer in the file described in Exhibit A.
  10.447 +
  10.448 +EXHIBIT A -Mozilla Public License.
  10.449 +
  10.450 +     ``The contents of this file are subject to the Mozilla Public License
  10.451 +     Version 1.1 (the "License"); you may not use this file except in
  10.452 +     compliance with the License. You may obtain a copy of the License at
  10.453 +     http://www.mozilla.org/MPL/
  10.454 +
  10.455 +     Software distributed under the License is distributed on an "AS IS"
  10.456 +     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  10.457 +     License for the specific language governing rights and limitations
  10.458 +     under the License.
  10.459 +
  10.460 +     The Original Code is ______________________________________.
  10.461 +
  10.462 +     The Initial Developer of the Original Code is ________________________.
  10.463 +     Portions created by ______________________ are Copyright (C) ______
  10.464 +     _______________________. All Rights Reserved.
  10.465 +
  10.466 +     Contributor(s): ______________________________________.
  10.467 +
  10.468 +     Alternatively, the contents of this file may be used under the terms
  10.469 +     of the _____ license (the  "[___] License"), in which case the
  10.470 +     provisions of [______] License are applicable instead of those
  10.471 +     above.  If you wish to allow use of your version of this file only
  10.472 +     under the terms of the [____] License and not to allow others to use
  10.473 +     your version of this file under the MPL, indicate your decision by
  10.474 +     deleting  the provisions above and replace  them with the notice and
  10.475 +     other provisions required by the [___] License.  If you do not delete
  10.476 +     the provisions above, a recipient may use your version of this file
  10.477 +     under either the MPL or the [___] License."
  10.478 +
  10.479 +     [NOTE: The text of this Exhibit A may differ slightly from the text of
  10.480 +     the notices in the Source Code files of the Original Code. You should
  10.481 +     use the text of this Exhibit A rather than the text found in the
  10.482 +     Original Code Source Code for Your Modifications.]
  10.483 +
  10.484 +     ----------------------------------------------------------------------
  10.485 +
  10.486 +     AMENDMENTS
  10.487 +
  10.488 +     The Netscape Public License Version 1.1 ("NPL") consists of the
  10.489 +     Mozilla Public License Version 1.1 with the following Amendments,
  10.490 +     including Exhibit A-Netscape Public License.  Files identified with
  10.491 +     "Exhibit A-Netscape Public License" are governed by the Netscape
  10.492 +     Public License Version 1.1.
  10.493 +
  10.494 +     Additional Terms applicable to the Netscape Public License.
  10.495 +          I. Effect.
  10.496 +          These additional terms described in this Netscape Public
  10.497 +          License -- Amendments shall apply to the Mozilla Communicator
  10.498 +          client code and to all Covered Code under this License.
  10.499 +
  10.500 +          II. "Netscape's Branded Code" means Covered Code that Netscape
  10.501 +          distributes and/or permits others to distribute under one or more
  10.502 +          trademark(s) which are controlled by Netscape but which are not
  10.503 +          licensed for use under this License.
  10.504 +
  10.505 +          III. Netscape and logo.
  10.506 +          This License does not grant any rights to use the trademarks
  10.507 +          "Netscape", the "Netscape N and horizon" logo or the "Netscape
  10.508 +          lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript",
  10.509 +          "Smart Browsing" even if such marks are included in the Original
  10.510 +          Code or Modifications.
  10.511 +
  10.512 +          IV. Inability to Comply Due to Contractual Obligation.
  10.513 +          Prior to licensing the Original Code under this License, Netscape
  10.514 +          has licensed third party code for use in Netscape's Branded Code.
  10.515 +          To the extent that Netscape is limited contractually from making
  10.516 +          such third party code available under this License, Netscape may
  10.517 +          choose to reintegrate such code into Covered Code without being
  10.518 +          required to distribute such code in Source Code form, even if
  10.519 +          such code would otherwise be considered "Modifications" under
  10.520 +          this License.
  10.521 +
  10.522 +          V. Use of Modifications and Covered Code by Initial Developer.
  10.523 +               V.1. In General.
  10.524 +               The obligations of Section 3 apply to Netscape, except to
  10.525 +               the extent specified in this Amendment, Section V.2 and V.3.
  10.526 +
  10.527 +               V.2. Other Products.
  10.528 +               Netscape may include Covered Code in products other than the
  10.529 +               Netscape's Branded Code which are released by Netscape
  10.530 +               during the two (2) years following the release date of the
  10.531 +               Original Code, without such additional products becoming
  10.532 +               subject to the terms of this License, and may license such
  10.533 +               additional products on different terms from those contained
  10.534 +               in this License.
  10.535 +
  10.536 +               V.3. Alternative Licensing.
  10.537 +               Netscape may license the Source Code of Netscape's Branded
  10.538 +               Code, including Modifications incorporated therein, without
  10.539 +               such Netscape Branded Code becoming subject to the terms of
  10.540 +               this License, and may license such Netscape Branded Code on
  10.541 +               different terms from those contained in this License.
  10.542 +
  10.543 +          VI. Litigation.
  10.544 +          Notwithstanding the limitations of Section 11 above, the
  10.545 +          provisions regarding litigation in Section 11(a), (b) and (c) of
  10.546 +          the License shall apply to all disputes relating to this License.
  10.547 +
  10.548 +     EXHIBIT A-Netscape Public License.
  10.549 +
  10.550 +          "The contents of this file are subject to the Netscape Public
  10.551 +          License Version 1.1 (the "License"); you may not use this file
  10.552 +          except in compliance with the License. You may obtain a copy of
  10.553 +          the License at http://www.mozilla.org/NPL/
  10.554 +
  10.555 +          Software distributed under the License is distributed on an "AS
  10.556 +          IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  10.557 +          implied. See the License for the specific language governing
  10.558 +          rights and limitations under the License.
  10.559 +
  10.560 +          The Original Code is Mozilla Communicator client code, released
  10.561 +          March 31, 1998.
  10.562 +
  10.563 +          The Initial Developer of the Original Code is Netscape
  10.564 +          Communications Corporation. Portions created by Netscape are
  10.565 +          Copyright (C) 1998-1999 Netscape Communications Corporation. All
  10.566 +          Rights Reserved.
  10.567 +
  10.568 +          Contributor(s): ______________________________________.
  10.569 +
  10.570 +          Alternatively, the contents of this file may be used under the
  10.571 +          terms of the _____ license (the "[___] License"), in which case
  10.572 +          the provisions of [______] License are applicable  instead of
  10.573 +          those above.  If you wish to allow use of your version of this
  10.574 +          file only under the terms of the [____] License and not to allow
  10.575 +          others to use your version of this file under the NPL, indicate
  10.576 +          your decision by deleting  the provisions above and replace  them
  10.577 +          with the notice and other provisions required by the [___]
  10.578 +          License.  If you do not delete the provisions above, a recipient
  10.579 +          may use your version of this file under either the NPL or the
  10.580 +          [___] License."
  10.581 +
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/core.browser.xulrunner.macosx/manifest.mf	Thu Nov 22 15:44:15 2012 +0100
    11.3 @@ -0,0 +1,6 @@
    11.4 +Manifest-Version: 1.0
    11.5 +OpenIDE-Module: org.netbeans.core.browser.xulrunner.macosx/1
    11.6 +OpenIDE-Module-Implementation-Version: 1
    11.7 +OpenIDE-Module-Localizing-Bundle: org/netbeans/core/browser/xulrunner/macosx/Bundle.properties
    11.8 +AutoUpdate-Show-In-Client: false
    11.9 +OpenIDE-Module-Requires: org.openide.modules.os.MacOSX
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/core.browser.xulrunner.macosx/nbproject/project.properties	Thu Nov 22 15:44:15 2012 +0100
    12.3 @@ -0,0 +1,5 @@
    12.4 +is.autoload=true
    12.5 +javac.source=1.6
    12.6 +javac.compilerargs=-Xlint -Xlint:-serial
    12.7 +spec.version.base=1.2.0
    12.8 +extra.module.files=modules/lib/native/macosx/
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/core.browser.xulrunner.macosx/nbproject/project.xml	Thu Nov 22 15:44:15 2012 +0100
    13.3 @@ -0,0 +1,11 @@
    13.4 +<?xml version="1.0" encoding="UTF-8"?>
    13.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
    13.6 +    <type>org.netbeans.modules.apisupport.project</type>
    13.7 +    <configuration>
    13.8 +        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
    13.9 +            <code-name-base>org.netbeans.core.browser.xulrunner.macosx</code-name-base>
   13.10 +            <module-dependencies/>
   13.11 +            <public-packages/>
   13.12 +        </data>
   13.13 +    </configuration>
   13.14 +</project>
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/core.browser.xulrunner.macosx/src/org/netbeans/core/browser/xulrunner/macosx/Bundle.properties	Thu Nov 22 15:44:15 2012 +0100
    14.3 @@ -0,0 +1,5 @@
    14.4 +OpenIDE-Module-Display-Category=Base IDE
    14.5 +OpenIDE-Module-Long-Description=\
    14.6 +    <html>Mac OS X-specific binaries for embedded browser.\
    14.7 +    <br><b>Warning:</b> the embedded browser is known to cause JVM crashes, use at your own risk!
    14.8 +OpenIDE-Module-Name=XUL Runner Mac OS X
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/core.browser.xulrunner.solaris/build.xml	Thu Nov 22 15:44:15 2012 +0100
    15.3 @@ -0,0 +1,11 @@
    15.4 +<?xml version="1.0" encoding="UTF-8"?>
    15.5 +<project basedir="." default="netbeans" name="core.browser.xulrunner.solaris">
    15.6 +
    15.7 +    <import file="../nbbuild/templates/projectized.xml"/>
    15.8 +
    15.9 +    <target name="netbeans-extra">
   15.10 +        <mkdir dir="${cluster}/modules/lib"/>
   15.11 +        <unzip src="external/xulrunner-solaris-x86.zip" dest="${cluster}/modules/lib"/>
   15.12 +    </target>
   15.13 +    
   15.14 +</project>
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/core.browser.xulrunner.solaris/external/binaries-list	Thu Nov 22 15:44:15 2012 +0100
    16.3 @@ -0,0 +1,1 @@
    16.4 +15332D84513E65E8150C4879CC710F283C5F19A2 xulrunner-solaris-x86.zip
    16.5 \ No newline at end of file
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/core.browser.xulrunner.solaris/external/xulrunner-solaris-x86-license.txt	Thu Nov 22 15:44:15 2012 +0100
    17.3 @@ -0,0 +1,578 @@
    17.4 +Name: XUL Runner Solaris x86 - specific binaries
    17.5 +Version: N/A
    17.6 +Files: xulrunner-solaris-x86.zip
    17.7 +Description: XUL Runner binaries for Solaris x86 operating systems.
    17.8 +License: MPL 1.1
    17.9 +Origin: http://sourceforge.net/projects/mozswing/files/
   17.10 +OSR: 12289
   17.11 +
   17.12 +*******************************************************************************
   17.13 +
   17.14 +                          MOZILLA PUBLIC LICENSE
   17.15 +                                Version 1.1
   17.16 +
   17.17 +                              ---------------
   17.18 +
   17.19 +1. Definitions.
   17.20 +
   17.21 +     1.0.1. "Commercial Use" means distribution or otherwise making the
   17.22 +     Covered Code available to a third party.
   17.23 +
   17.24 +     1.1. "Contributor" means each entity that creates or contributes to
   17.25 +     the creation of Modifications.
   17.26 +
   17.27 +     1.2. "Contributor Version" means the combination of the Original
   17.28 +     Code, prior Modifications used by a Contributor, and the Modifications
   17.29 +     made by that particular Contributor.
   17.30 +
   17.31 +     1.3. "Covered Code" means the Original Code or Modifications or the
   17.32 +     combination of the Original Code and Modifications, in each case
   17.33 +     including portions thereof.
   17.34 +
   17.35 +     1.4. "Electronic Distribution Mechanism" means a mechanism generally
   17.36 +     accepted in the software development community for the electronic
   17.37 +     transfer of data.
   17.38 +
   17.39 +     1.5. "Executable" means Covered Code in any form other than Source
   17.40 +     Code.
   17.41 +
   17.42 +     1.6. "Initial Developer" means the individual or entity identified
   17.43 +     as the Initial Developer in the Source Code notice required by Exhibit
   17.44 +     A.
   17.45 +
   17.46 +     1.7. "Larger Work" means a work which combines Covered Code or
   17.47 +     portions thereof with code not governed by the terms of this License.
   17.48 +
   17.49 +     1.8. "License" means this document.
   17.50 +
   17.51 +     1.8.1. "Licensable" means having the right to grant, to the maximum
   17.52 +     extent possible, whether at the time of the initial grant or
   17.53 +     subsequently acquired, any and all of the rights conveyed herein.
   17.54 +
   17.55 +     1.9. "Modifications" means any addition to or deletion from the
   17.56 +     substance or structure of either the Original Code or any previous
   17.57 +     Modifications. When Covered Code is released as a series of files, a
   17.58 +     Modification is:
   17.59 +          A. Any addition to or deletion from the contents of a file
   17.60 +          containing Original Code or previous Modifications.
   17.61 +
   17.62 +          B. Any new file that contains any part of the Original Code or
   17.63 +          previous Modifications.
   17.64 +
   17.65 +     1.10. "Original Code" means Source Code of computer software code
   17.66 +     which is described in the Source Code notice required by Exhibit A as
   17.67 +     Original Code, and which, at the time of its release under this
   17.68 +     License is not already Covered Code governed by this License.
   17.69 +
   17.70 +     1.10.1. "Patent Claims" means any patent claim(s), now owned or
   17.71 +     hereafter acquired, including without limitation,  method, process,
   17.72 +     and apparatus claims, in any patent Licensable by grantor.
   17.73 +
   17.74 +     1.11. "Source Code" means the preferred form of the Covered Code for
   17.75 +     making modifications to it, including all modules it contains, plus
   17.76 +     any associated interface definition files, scripts used to control
   17.77 +     compilation and installation of an Executable, or source code
   17.78 +     differential comparisons against either the Original Code or another
   17.79 +     well known, available Covered Code of the Contributor's choice. The
   17.80 +     Source Code can be in a compressed or archival form, provided the
   17.81 +     appropriate decompression or de-archiving software is widely available
   17.82 +     for no charge.
   17.83 +
   17.84 +     1.12. "You" (or "Your")  means an individual or a legal entity
   17.85 +     exercising rights under, and complying with all of the terms of, this
   17.86 +     License or a future version of this License issued under Section 6.1.
   17.87 +     For legal entities, "You" includes any entity which controls, is
   17.88 +     controlled by, or is under common control with You. For purposes of
   17.89 +     this definition, "control" means (a) the power, direct or indirect,
   17.90 +     to cause the direction or management of such entity, whether by
   17.91 +     contract or otherwise, or (b) ownership of more than fifty percent
   17.92 +     (50%) of the outstanding shares or beneficial ownership of such
   17.93 +     entity.
   17.94 +
   17.95 +2. Source Code License.
   17.96 +
   17.97 +     2.1. The Initial Developer Grant.
   17.98 +     The Initial Developer hereby grants You a world-wide, royalty-free,
   17.99 +     non-exclusive license, subject to third party intellectual property
  17.100 +     claims:
  17.101 +          (a)  under intellectual property rights (other than patent or
  17.102 +          trademark) Licensable by Initial Developer to use, reproduce,
  17.103 +          modify, display, perform, sublicense and distribute the Original
  17.104 +          Code (or portions thereof) with or without Modifications, and/or
  17.105 +          as part of a Larger Work; and
  17.106 +
  17.107 +          (b) under Patents Claims infringed by the making, using or
  17.108 +          selling of Original Code, to make, have made, use, practice,
  17.109 +          sell, and offer for sale, and/or otherwise dispose of the
  17.110 +          Original Code (or portions thereof).
  17.111 +
  17.112 +          (c) the licenses granted in this Section 2.1(a) and (b) are
  17.113 +          effective on the date Initial Developer first distributes
  17.114 +          Original Code under the terms of this License.
  17.115 +
  17.116 +          (d) Notwithstanding Section 2.1(b) above, no patent license is
  17.117 +          granted: 1) for code that You delete from the Original Code; 2)
  17.118 +          separate from the Original Code;  or 3) for infringements caused
  17.119 +          by: i) the modification of the Original Code or ii) the
  17.120 +          combination of the Original Code with other software or devices.
  17.121 +
  17.122 +     2.2. Contributor Grant.
  17.123 +     Subject to third party intellectual property claims, each Contributor
  17.124 +     hereby grants You a world-wide, royalty-free, non-exclusive license
  17.125 +
  17.126 +          (a)  under intellectual property rights (other than patent or
  17.127 +          trademark) Licensable by Contributor, to use, reproduce, modify,
  17.128 +          display, perform, sublicense and distribute the Modifications
  17.129 +          created by such Contributor (or portions thereof) either on an
  17.130 +          unmodified basis, with other Modifications, as Covered Code
  17.131 +          and/or as part of a Larger Work; and
  17.132 +
  17.133 +          (b) under Patent Claims infringed by the making, using, or
  17.134 +          selling of  Modifications made by that Contributor either alone
  17.135 +          and/or in combination with its Contributor Version (or portions
  17.136 +          of such combination), to make, use, sell, offer for sale, have
  17.137 +          made, and/or otherwise dispose of: 1) Modifications made by that
  17.138 +          Contributor (or portions thereof); and 2) the combination of
  17.139 +          Modifications made by that Contributor with its Contributor
  17.140 +          Version (or portions of such combination).
  17.141 +
  17.142 +          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
  17.143 +          effective on the date Contributor first makes Commercial Use of
  17.144 +          the Covered Code.
  17.145 +
  17.146 +          (d)    Notwithstanding Section 2.2(b) above, no patent license is
  17.147 +          granted: 1) for any code that Contributor has deleted from the
  17.148 +          Contributor Version; 2)  separate from the Contributor Version;
  17.149 +          3)  for infringements caused by: i) third party modifications of
  17.150 +          Contributor Version or ii)  the combination of Modifications made
  17.151 +          by that Contributor with other software  (except as part of the
  17.152 +          Contributor Version) or other devices; or 4) under Patent Claims
  17.153 +          infringed by Covered Code in the absence of Modifications made by
  17.154 +          that Contributor.
  17.155 +
  17.156 +3. Distribution Obligations.
  17.157 +
  17.158 +     3.1. Application of License.
  17.159 +     The Modifications which You create or to which You contribute are
  17.160 +     governed by the terms of this License, including without limitation
  17.161 +     Section 2.2. The Source Code version of Covered Code may be
  17.162 +     distributed only under the terms of this License or a future version
  17.163 +     of this License released under Section 6.1, and You must include a
  17.164 +     copy of this License with every copy of the Source Code You
  17.165 +     distribute. You may not offer or impose any terms on any Source Code
  17.166 +     version that alters or restricts the applicable version of this
  17.167 +     License or the recipients' rights hereunder. However, You may include
  17.168 +     an additional document offering the additional rights described in
  17.169 +     Section 3.5.
  17.170 +
  17.171 +     3.2. Availability of Source Code.
  17.172 +     Any Modification which You create or to which You contribute must be
  17.173 +     made available in Source Code form under the terms of this License
  17.174 +     either on the same media as an Executable version or via an accepted
  17.175 +     Electronic Distribution Mechanism to anyone to whom you made an
  17.176 +     Executable version available; and if made available via Electronic
  17.177 +     Distribution Mechanism, must remain available for at least twelve (12)
  17.178 +     months after the date it initially became available, or at least six
  17.179 +     (6) months after a subsequent version of that particular Modification
  17.180 +     has been made available to such recipients. You are responsible for
  17.181 +     ensuring that the Source Code version remains available even if the
  17.182 +     Electronic Distribution Mechanism is maintained by a third party.
  17.183 +
  17.184 +     3.3. Description of Modifications.
  17.185 +     You must cause all Covered Code to which You contribute to contain a
  17.186 +     file documenting the changes You made to create that Covered Code and
  17.187 +     the date of any change. You must include a prominent statement that
  17.188 +     the Modification is derived, directly or indirectly, from Original
  17.189 +     Code provided by the Initial Developer and including the name of the
  17.190 +     Initial Developer in (a) the Source Code, and (b) in any notice in an
  17.191 +     Executable version or related documentation in which You describe the
  17.192 +     origin or ownership of the Covered Code.
  17.193 +
  17.194 +     3.4. Intellectual Property Matters
  17.195 +          (a) Third Party Claims.
  17.196 +          If Contributor has knowledge that a license under a third party's
  17.197 +          intellectual property rights is required to exercise the rights
  17.198 +          granted by such Contributor under Sections 2.1 or 2.2,
  17.199 +          Contributor must include a text file with the Source Code
  17.200 +          distribution titled "LEGAL" which describes the claim and the
  17.201 +          party making the claim in sufficient detail that a recipient will
  17.202 +          know whom to contact. If Contributor obtains such knowledge after
  17.203 +          the Modification is made available as described in Section 3.2,
  17.204 +          Contributor shall promptly modify the LEGAL file in all copies
  17.205 +          Contributor makes available thereafter and shall take other steps
  17.206 +          (such as notifying appropriate mailing lists or newsgroups)
  17.207 +          reasonably calculated to inform those who received the Covered
  17.208 +          Code that new knowledge has been obtained.
  17.209 +
  17.210 +          (b) Contributor APIs.
  17.211 +          If Contributor's Modifications include an application programming
  17.212 +          interface and Contributor has knowledge of patent licenses which
  17.213 +          are reasonably necessary to implement that API, Contributor must
  17.214 +          also include this information in the LEGAL file.
  17.215 +
  17.216 +               (c)    Representations.
  17.217 +          Contributor represents that, except as disclosed pursuant to
  17.218 +          Section 3.4(a) above, Contributor believes that Contributor's
  17.219 +          Modifications are Contributor's original creation(s) and/or
  17.220 +          Contributor has sufficient rights to grant the rights conveyed by
  17.221 +          this License.
  17.222 +
  17.223 +     3.5. Required Notices.
  17.224 +     You must duplicate the notice in Exhibit A in each file of the Source
  17.225 +     Code.  If it is not possible to put such notice in a particular Source
  17.226 +     Code file due to its structure, then You must include such notice in a
  17.227 +     location (such as a relevant directory) where a user would be likely
  17.228 +     to look for such a notice.  If You created one or more Modification(s)
  17.229 +     You may add your name as a Contributor to the notice described in
  17.230 +     Exhibit A.  You must also duplicate this License in any documentation
  17.231 +     for the Source Code where You describe recipients' rights or ownership
  17.232 +     rights relating to Covered Code.  You may choose to offer, and to
  17.233 +     charge a fee for, warranty, support, indemnity or liability
  17.234 +     obligations to one or more recipients of Covered Code. However, You
  17.235 +     may do so only on Your own behalf, and not on behalf of the Initial
  17.236 +     Developer or any Contributor. You must make it absolutely clear than
  17.237 +     any such warranty, support, indemnity or liability obligation is
  17.238 +     offered by You alone, and You hereby agree to indemnify the Initial
  17.239 +     Developer and every Contributor for any liability incurred by the
  17.240 +     Initial Developer or such Contributor as a result of warranty,
  17.241 +     support, indemnity or liability terms You offer.
  17.242 +
  17.243 +     3.6. Distribution of Executable Versions.
  17.244 +     You may distribute Covered Code in Executable form only if the
  17.245 +     requirements of Section 3.1-3.5 have been met for that Covered Code,
  17.246 +     and if You include a notice stating that the Source Code version of
  17.247 +     the Covered Code is available under the terms of this License,
  17.248 +     including a description of how and where You have fulfilled the
  17.249 +     obligations of Section 3.2. The notice must be conspicuously included
  17.250 +     in any notice in an Executable version, related documentation or
  17.251 +     collateral in which You describe recipients' rights relating to the
  17.252 +     Covered Code. You may distribute the Executable version of Covered
  17.253 +     Code or ownership rights under a license of Your choice, which may
  17.254 +     contain terms different from this License, provided that You are in
  17.255 +     compliance with the terms of this License and that the license for the
  17.256 +     Executable version does not attempt to limit or alter the recipient's
  17.257 +     rights in the Source Code version from the rights set forth in this
  17.258 +     License. If You distribute the Executable version under a different
  17.259 +     license You must make it absolutely clear that any terms which differ
  17.260 +     from this License are offered by You alone, not by the Initial
  17.261 +     Developer or any Contributor. You hereby agree to indemnify the
  17.262 +     Initial Developer and every Contributor for any liability incurred by
  17.263 +     the Initial Developer or such Contributor as a result of any such
  17.264 +     terms You offer.
  17.265 +
  17.266 +     3.7. Larger Works.
  17.267 +     You may create a Larger Work by combining Covered Code with other code
  17.268 +     not governed by the terms of this License and distribute the Larger
  17.269 +     Work as a single product. In such a case, You must make sure the
  17.270 +     requirements of this License are fulfilled for the Covered Code.
  17.271 +
  17.272 +4. Inability to Comply Due to Statute or Regulation.
  17.273 +
  17.274 +     If it is impossible for You to comply with any of the terms of this
  17.275 +     License with respect to some or all of the Covered Code due to
  17.276 +     statute, judicial order, or regulation then You must: (a) comply with
  17.277 +     the terms of this License to the maximum extent possible; and (b)
  17.278 +     describe the limitations and the code they affect. Such description
  17.279 +     must be included in the LEGAL file described in Section 3.4 and must
  17.280 +     be included with all distributions of the Source Code. Except to the
  17.281 +     extent prohibited by statute or regulation, such description must be
  17.282 +     sufficiently detailed for a recipient of ordinary skill to be able to
  17.283 +     understand it.
  17.284 +
  17.285 +5. Application of this License.
  17.286 +
  17.287 +     This License applies to code to which the Initial Developer has
  17.288 +     attached the notice in Exhibit A and to related Covered Code.
  17.289 +
  17.290 +6. Versions of the License.
  17.291 +
  17.292 +     6.1. New Versions.
  17.293 +     Netscape Communications Corporation ("Netscape") may publish revised
  17.294 +     and/or new versions of the License from time to time. Each version
  17.295 +     will be given a distinguishing version number.
  17.296 +
  17.297 +     6.2. Effect of New Versions.
  17.298 +     Once Covered Code has been published under a particular version of the
  17.299 +     License, You may always continue to use it under the terms of that
  17.300 +     version. You may also choose to use such Covered Code under the terms
  17.301 +     of any subsequent version of the License published by Netscape. No one
  17.302 +     other than Netscape has the right to modify the terms applicable to
  17.303 +     Covered Code created under this License.
  17.304 +
  17.305 +     6.3. Derivative Works.
  17.306 +     If You create or use a modified version of this License (which you may
  17.307 +     only do in order to apply it to code which is not already Covered Code
  17.308 +     governed by this License), You must (a) rename Your license so that
  17.309 +     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
  17.310 +     "MPL", "NPL" or any confusingly similar phrase do not appear in your
  17.311 +     license (except to note that your license differs from this License)
  17.312 +     and (b) otherwise make it clear that Your version of the license
  17.313 +     contains terms which differ from the Mozilla Public License and
  17.314 +     Netscape Public License. (Filling in the name of the Initial
  17.315 +     Developer, Original Code or Contributor in the notice described in
  17.316 +     Exhibit A shall not of themselves be deemed to be modifications of
  17.317 +     this License.)
  17.318 +
  17.319 +7. DISCLAIMER OF WARRANTY.
  17.320 +
  17.321 +     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
  17.322 +     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
  17.323 +     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
  17.324 +     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
  17.325 +     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
  17.326 +     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
  17.327 +     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
  17.328 +     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
  17.329 +     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
  17.330 +     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
  17.331 +
  17.332 +8. TERMINATION.
  17.333 +
  17.334 +     8.1.  This License and the rights granted hereunder will terminate
  17.335 +     automatically if You fail to comply with terms herein and fail to cure
  17.336 +     such breach within 30 days of becoming aware of the breach. All
  17.337 +     sublicenses to the Covered Code which are properly granted shall
  17.338 +     survive any termination of this License. Provisions which, by their
  17.339 +     nature, must remain in effect beyond the termination of this License
  17.340 +     shall survive.
  17.341 +
  17.342 +     8.2.  If You initiate litigation by asserting a patent infringement
  17.343 +     claim (excluding declatory judgment actions) against Initial Developer
  17.344 +     or a Contributor (the Initial Developer or Contributor against whom
  17.345 +     You file such action is referred to as "Participant")  alleging that:
  17.346 +
  17.347 +     (a)  such Participant's Contributor Version directly or indirectly
  17.348 +     infringes any patent, then any and all rights granted by such
  17.349 +     Participant to You under Sections 2.1 and/or 2.2 of this License
  17.350 +     shall, upon 60 days notice from Participant terminate prospectively,
  17.351 +     unless if within 60 days after receipt of notice You either: (i)
  17.352 +     agree in writing to pay Participant a mutually agreeable reasonable
  17.353 +     royalty for Your past and future use of Modifications made by such
  17.354 +     Participant, or (ii) withdraw Your litigation claim with respect to
  17.355 +     the Contributor Version against such Participant.  If within 60 days
  17.356 +     of notice, a reasonable royalty and payment arrangement are not
  17.357 +     mutually agreed upon in writing by the parties or the litigation claim
  17.358 +     is not withdrawn, the rights granted by Participant to You under
  17.359 +     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
  17.360 +     the 60 day notice period specified above.
  17.361 +
  17.362 +     (b)  any software, hardware, or device, other than such Participant's
  17.363 +     Contributor Version, directly or indirectly infringes any patent, then
  17.364 +     any rights granted to You by such Participant under Sections 2.1(b)
  17.365 +     and 2.2(b) are revoked effective as of the date You first made, used,
  17.366 +     sold, distributed, or had made, Modifications made by that
  17.367 +     Participant.
  17.368 +
  17.369 +     8.3.  If You assert a patent infringement claim against Participant
  17.370 +     alleging that such Participant's Contributor Version directly or
  17.371 +     indirectly infringes any patent where such claim is resolved (such as
  17.372 +     by license or settlement) prior to the initiation of patent
  17.373 +     infringement litigation, then the reasonable value of the licenses
  17.374 +     granted by such Participant under Sections 2.1 or 2.2 shall be taken
  17.375 +     into account in determining the amount or value of any payment or
  17.376 +     license.
  17.377 +
  17.378 +     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
  17.379 +     all end user license agreements (excluding distributors and resellers)
  17.380 +     which have been validly granted by You or any distributor hereunder
  17.381 +     prior to termination shall survive termination.
  17.382 +
  17.383 +9. LIMITATION OF LIABILITY.
  17.384 +
  17.385 +     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
  17.386 +     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
  17.387 +     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
  17.388 +     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
  17.389 +     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
  17.390 +     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
  17.391 +     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
  17.392 +     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
  17.393 +     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
  17.394 +     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
  17.395 +     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
  17.396 +     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
  17.397 +     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
  17.398 +     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
  17.399 +
  17.400 +10. U.S. GOVERNMENT END USERS.
  17.401 +
  17.402 +     The Covered Code is a "commercial item," as that term is defined in
  17.403 +     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
  17.404 +     software" and "commercial computer software documentation," as such
  17.405 +     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
  17.406 +     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
  17.407 +     all U.S. Government End Users acquire Covered Code with only those
  17.408 +     rights set forth herein.
  17.409 +
  17.410 +11. MISCELLANEOUS.
  17.411 +
  17.412 +     This License represents the complete agreement concerning subject
  17.413 +     matter hereof. If any provision of this License is held to be
  17.414 +     unenforceable, such provision shall be reformed only to the extent
  17.415 +     necessary to make it enforceable. This License shall be governed by
  17.416 +     California law provisions (except to the extent applicable law, if
  17.417 +     any, provides otherwise), excluding its conflict-of-law provisions.
  17.418 +     With respect to disputes in which at least one party is a citizen of,
  17.419 +     or an entity chartered or registered to do business in the United
  17.420 +     States of America, any litigation relating to this License shall be
  17.421 +     subject to the jurisdiction of the Federal Courts of the Northern
  17.422 +     District of California, with venue lying in Santa Clara County,
  17.423 +     California, with the losing party responsible for costs, including
  17.424 +     without limitation, court costs and reasonable attorneys' fees and
  17.425 +     expenses. The application of the United Nations Convention on
  17.426 +     Contracts for the International Sale of Goods is expressly excluded.
  17.427 +     Any law or regulation which provides that the language of a contract
  17.428 +     shall be construed against the drafter shall not apply to this
  17.429 +     License.
  17.430 +
  17.431 +12. RESPONSIBILITY FOR CLAIMS.
  17.432 +
  17.433 +     As between Initial Developer and the Contributors, each party is
  17.434 +     responsible for claims and damages arising, directly or indirectly,
  17.435 +     out of its utilization of rights under this License and You agree to
  17.436 +     work with Initial Developer and Contributors to distribute such
  17.437 +     responsibility on an equitable basis. Nothing herein is intended or
  17.438 +     shall be deemed to constitute any admission of liability.
  17.439 +
  17.440 +13. MULTIPLE-LICENSED CODE.
  17.441 +
  17.442 +     Initial Developer may designate portions of the Covered Code as
  17.443 +     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
  17.444 +     Developer permits you to utilize portions of the Covered Code under
  17.445 +     Your choice of the NPL or the alternative licenses, if any, specified
  17.446 +     by the Initial Developer in the file described in Exhibit A.
  17.447 +
  17.448 +EXHIBIT A -Mozilla Public License.
  17.449 +
  17.450 +     ``The contents of this file are subject to the Mozilla Public License
  17.451 +     Version 1.1 (the "License"); you may not use this file except in
  17.452 +     compliance with the License. You may obtain a copy of the License at
  17.453 +     http://www.mozilla.org/MPL/
  17.454 +
  17.455 +     Software distributed under the License is distributed on an "AS IS"
  17.456 +     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  17.457 +     License for the specific language governing rights and limitations
  17.458 +     under the License.
  17.459 +
  17.460 +     The Original Code is ______________________________________.
  17.461 +
  17.462 +     The Initial Developer of the Original Code is ________________________.
  17.463 +     Portions created by ______________________ are Copyright (C) ______
  17.464 +     _______________________. All Rights Reserved.
  17.465 +
  17.466 +     Contributor(s): ______________________________________.
  17.467 +
  17.468 +     Alternatively, the contents of this file may be used under the terms
  17.469 +     of the _____ license (the  "[___] License"), in which case the
  17.470 +     provisions of [______] License are applicable instead of those
  17.471 +     above.  If you wish to allow use of your version of this file only
  17.472 +     under the terms of the [____] License and not to allow others to use
  17.473 +     your version of this file under the MPL, indicate your decision by
  17.474 +     deleting  the provisions above and replace  them with the notice and
  17.475 +     other provisions required by the [___] License.  If you do not delete
  17.476 +     the provisions above, a recipient may use your version of this file
  17.477 +     under either the MPL or the [___] License."
  17.478 +
  17.479 +     [NOTE: The text of this Exhibit A may differ slightly from the text of
  17.480 +     the notices in the Source Code files of the Original Code. You should
  17.481 +     use the text of this Exhibit A rather than the text found in the
  17.482 +     Original Code Source Code for Your Modifications.]
  17.483 +
  17.484 +     ----------------------------------------------------------------------
  17.485 +
  17.486 +     AMENDMENTS
  17.487 +
  17.488 +     The Netscape Public License Version 1.1 ("NPL") consists of the
  17.489 +     Mozilla Public License Version 1.1 with the following Amendments,
  17.490 +     including Exhibit A-Netscape Public License.  Files identified with
  17.491 +     "Exhibit A-Netscape Public License" are governed by the Netscape
  17.492 +     Public License Version 1.1.
  17.493 +
  17.494 +     Additional Terms applicable to the Netscape Public License.
  17.495 +          I. Effect.
  17.496 +          These additional terms described in this Netscape Public
  17.497 +          License -- Amendments shall apply to the Mozilla Communicator
  17.498 +          client code and to all Covered Code under this License.
  17.499 +
  17.500 +          II. "Netscape's Branded Code" means Covered Code that Netscape
  17.501 +          distributes and/or permits others to distribute under one or more
  17.502 +          trademark(s) which are controlled by Netscape but which are not
  17.503 +          licensed for use under this License.
  17.504 +
  17.505 +          III. Netscape and logo.
  17.506 +          This License does not grant any rights to use the trademarks
  17.507 +          "Netscape", the "Netscape N and horizon" logo or the "Netscape
  17.508 +          lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript",
  17.509 +          "Smart Browsing" even if such marks are included in the Original
  17.510 +          Code or Modifications.
  17.511 +
  17.512 +          IV. Inability to Comply Due to Contractual Obligation.
  17.513 +          Prior to licensing the Original Code under this License, Netscape
  17.514 +          has licensed third party code for use in Netscape's Branded Code.
  17.515 +          To the extent that Netscape is limited contractually from making
  17.516 +          such third party code available under this License, Netscape may
  17.517 +          choose to reintegrate such code into Covered Code without being
  17.518 +          required to distribute such code in Source Code form, even if
  17.519 +          such code would otherwise be considered "Modifications" under
  17.520 +          this License.
  17.521 +
  17.522 +          V. Use of Modifications and Covered Code by Initial Developer.
  17.523 +               V.1. In General.
  17.524 +               The obligations of Section 3 apply to Netscape, except to
  17.525 +               the extent specified in this Amendment, Section V.2 and V.3.
  17.526 +
  17.527 +               V.2. Other Products.
  17.528 +               Netscape may include Covered Code in products other than the
  17.529 +               Netscape's Branded Code which are released by Netscape
  17.530 +               during the two (2) years following the release date of the
  17.531 +               Original Code, without such additional products becoming
  17.532 +               subject to the terms of this License, and may license such
  17.533 +               additional products on different terms from those contained
  17.534 +               in this License.
  17.535 +
  17.536 +               V.3. Alternative Licensing.
  17.537 +               Netscape may license the Source Code of Netscape's Branded
  17.538 +               Code, including Modifications incorporated therein, without
  17.539 +               such Netscape Branded Code becoming subject to the terms of
  17.540 +               this License, and may license such Netscape Branded Code on
  17.541 +               different terms from those contained in this License.
  17.542 +
  17.543 +          VI. Litigation.
  17.544 +          Notwithstanding the limitations of Section 11 above, the
  17.545 +          provisions regarding litigation in Section 11(a), (b) and (c) of
  17.546 +          the License shall apply to all disputes relating to this License.
  17.547 +
  17.548 +     EXHIBIT A-Netscape Public License.
  17.549 +
  17.550 +          "The contents of this file are subject to the Netscape Public
  17.551 +          License Version 1.1 (the "License"); you may not use this file
  17.552 +          except in compliance with the License. You may obtain a copy of
  17.553 +          the License at http://www.mozilla.org/NPL/
  17.554 +
  17.555 +          Software distributed under the License is distributed on an "AS
  17.556 +          IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  17.557 +          implied. See the License for the specific language governing
  17.558 +          rights and limitations under the License.
  17.559 +
  17.560 +          The Original Code is Mozilla Communicator client code, released
  17.561 +          March 31, 1998.
  17.562 +
  17.563 +          The Initial Developer of the Original Code is Netscape
  17.564 +          Communications Corporation. Portions created by Netscape are
  17.565 +          Copyright (C) 1998-1999 Netscape Communications Corporation. All
  17.566 +          Rights Reserved.
  17.567 +
  17.568 +          Contributor(s): ______________________________________.
  17.569 +
  17.570 +          Alternatively, the contents of this file may be used under the
  17.571 +          terms of the _____ license (the "[___] License"), in which case
  17.572 +          the provisions of [______] License are applicable  instead of
  17.573 +          those above.  If you wish to allow use of your version of this
  17.574 +          file only under the terms of the [____] License and not to allow
  17.575 +          others to use your version of this file under the NPL, indicate
  17.576 +          your decision by deleting  the provisions above and replace  them
  17.577 +          with the notice and other provisions required by the [___]
  17.578 +          License.  If you do not delete the provisions above, a recipient
  17.579 +          may use your version of this file under either the NPL or the
  17.580 +          [___] License."
  17.581 +
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/core.browser.xulrunner.solaris/manifest.mf	Thu Nov 22 15:44:15 2012 +0100
    18.3 @@ -0,0 +1,6 @@
    18.4 +Manifest-Version: 1.0
    18.5 +OpenIDE-Module: org.netbeans.core.browser.xulrunner.solaris/1
    18.6 +OpenIDE-Module-Implementation-Version: 1
    18.7 +OpenIDE-Module-Localizing-Bundle: org/netbeans/core/browser/xulrunner/solaris/Bundle.properties
    18.8 +AutoUpdate-Show-In-Client: false
    18.9 +OpenIDE-Module-Requires: org.openide.modules.os.Solaris
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/core.browser.xulrunner.solaris/nbproject/project.properties	Thu Nov 22 15:44:15 2012 +0100
    19.3 @@ -0,0 +1,5 @@
    19.4 +is.autoload=true
    19.5 +javac.source=1.6
    19.6 +javac.compilerargs=-Xlint -Xlint:-serial
    19.7 +spec.version.base=1.2.0
    19.8 +extra.module.files=modules/lib/native/solaris-x86/
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/core.browser.xulrunner.solaris/nbproject/project.xml	Thu Nov 22 15:44:15 2012 +0100
    20.3 @@ -0,0 +1,11 @@
    20.4 +<?xml version="1.0" encoding="UTF-8"?>
    20.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
    20.6 +    <type>org.netbeans.modules.apisupport.project</type>
    20.7 +    <configuration>
    20.8 +        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
    20.9 +            <code-name-base>org.netbeans.core.browser.xulrunner.solaris</code-name-base>
   20.10 +            <module-dependencies/>
   20.11 +            <public-packages/>
   20.12 +        </data>
   20.13 +    </configuration>
   20.14 +</project>
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/core.browser.xulrunner.solaris/src/org/netbeans/core/browser/xulrunner/solaris/Bundle.properties	Thu Nov 22 15:44:15 2012 +0100
    21.3 @@ -0,0 +1,5 @@
    21.4 +OpenIDE-Module-Display-Category=Base IDE
    21.5 +OpenIDE-Module-Long-Description=\
    21.6 +    <html>Solaris-specific binaries for embedded browser.\
    21.7 +    <br><b>Warning:</b> the embedded browser is known to cause JVM crashes when running under GTK look & feel, use at your own risk!
    21.8 +OpenIDE-Module-Name=XUL Runner Solaris
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/core.browser.xulrunner.win/build.xml	Thu Nov 22 15:44:15 2012 +0100
    22.3 @@ -0,0 +1,11 @@
    22.4 +<?xml version="1.0" encoding="UTF-8"?>
    22.5 +<project basedir="." default="netbeans" name="core.browser.xulrunner.win">
    22.6 +
    22.7 +    <import file="../nbbuild/templates/projectized.xml"/>
    22.8 +
    22.9 +    <target name="netbeans-extra">
   22.10 +        <mkdir dir="${cluster}/modules/lib"/>
   22.11 +        <unzip src="external/xulrunner-win32.zip" dest="${cluster}/modules/lib"/>
   22.12 +    </target>
   22.13 +    
   22.14 +</project>
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/core.browser.xulrunner.win/external/binaries-list	Thu Nov 22 15:44:15 2012 +0100
    23.3 @@ -0,0 +1,1 @@
    23.4 +FC59FE8BE0224B853715D2C7C70458535678441E xulrunner-win32.zip
    23.5 \ No newline at end of file
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/core.browser.xulrunner.win/external/xulrunner-win32-license.txt	Thu Nov 22 15:44:15 2012 +0100
    24.3 @@ -0,0 +1,1144 @@
    24.4 +Name: XUL Runner MS Windows - specific binaries
    24.5 +Version: N/A
    24.6 +Files: xulrunner-win32.zip (includes msvcr71.dll and msvcp71.dll)
    24.7 +Description: XUL Runner binaries for MS Windows 32bit operating systems.
    24.8 +License: MPL 1.1 and MS EULA for Visual Studio .Net 2003
    24.9 +Origin: http://sourceforge.net/projects/mozswing/files/
   24.10 +OSR: 12289, 12290
   24.11 +
   24.12 +*******************************************************************************
   24.13 +
   24.14 +                          MOZILLA PUBLIC LICENSE
   24.15 +                                Version 1.1
   24.16 +
   24.17 +                              ---------------
   24.18 +
   24.19 +1. Definitions.
   24.20 +
   24.21 +     1.0.1. "Commercial Use" means distribution or otherwise making the
   24.22 +     Covered Code available to a third party.
   24.23 +
   24.24 +     1.1. "Contributor" means each entity that creates or contributes to
   24.25 +     the creation of Modifications.
   24.26 +
   24.27 +     1.2. "Contributor Version" means the combination of the Original
   24.28 +     Code, prior Modifications used by a Contributor, and the Modifications
   24.29 +     made by that particular Contributor.
   24.30 +
   24.31 +     1.3. "Covered Code" means the Original Code or Modifications or the
   24.32 +     combination of the Original Code and Modifications, in each case
   24.33 +     including portions thereof.
   24.34 +
   24.35 +     1.4. "Electronic Distribution Mechanism" means a mechanism generally
   24.36 +     accepted in the software development community for the electronic
   24.37 +     transfer of data.
   24.38 +
   24.39 +     1.5. "Executable" means Covered Code in any form other than Source
   24.40 +     Code.
   24.41 +
   24.42 +     1.6. "Initial Developer" means the individual or entity identified
   24.43 +     as the Initial Developer in the Source Code notice required by Exhibit
   24.44 +     A.
   24.45 +
   24.46 +     1.7. "Larger Work" means a work which combines Covered Code or
   24.47 +     portions thereof with code not governed by the terms of this License.
   24.48 +
   24.49 +     1.8. "License" means this document.
   24.50 +
   24.51 +     1.8.1. "Licensable" means having the right to grant, to the maximum
   24.52 +     extent possible, whether at the time of the initial grant or
   24.53 +     subsequently acquired, any and all of the rights conveyed herein.
   24.54 +
   24.55 +     1.9. "Modifications" means any addition to or deletion from the
   24.56 +     substance or structure of either the Original Code or any previous
   24.57 +     Modifications. When Covered Code is released as a series of files, a
   24.58 +     Modification is:
   24.59 +          A. Any addition to or deletion from the contents of a file
   24.60 +          containing Original Code or previous Modifications.
   24.61 +
   24.62 +          B. Any new file that contains any part of the Original Code or
   24.63 +          previous Modifications.
   24.64 +
   24.65 +     1.10. "Original Code" means Source Code of computer software code
   24.66 +     which is described in the Source Code notice required by Exhibit A as
   24.67 +     Original Code, and which, at the time of its release under this
   24.68 +     License is not already Covered Code governed by this License.
   24.69 +
   24.70 +     1.10.1. "Patent Claims" means any patent claim(s), now owned or
   24.71 +     hereafter acquired, including without limitation,  method, process,
   24.72 +     and apparatus claims, in any patent Licensable by grantor.
   24.73 +
   24.74 +     1.11. "Source Code" means the preferred form of the Covered Code for
   24.75 +     making modifications to it, including all modules it contains, plus
   24.76 +     any associated interface definition files, scripts used to control
   24.77 +     compilation and installation of an Executable, or source code
   24.78 +     differential comparisons against either the Original Code or another
   24.79 +     well known, available Covered Code of the Contributor's choice. The
   24.80 +     Source Code can be in a compressed or archival form, provided the
   24.81 +     appropriate decompression or de-archiving software is widely available
   24.82 +     for no charge.
   24.83 +
   24.84 +     1.12. "You" (or "Your")  means an individual or a legal entity
   24.85 +     exercising rights under, and complying with all of the terms of, this
   24.86 +     License or a future version of this License issued under Section 6.1.
   24.87 +     For legal entities, "You" includes any entity which controls, is
   24.88 +     controlled by, or is under common control with You. For purposes of
   24.89 +     this definition, "control" means (a) the power, direct or indirect,
   24.90 +     to cause the direction or management of such entity, whether by
   24.91 +     contract or otherwise, or (b) ownership of more than fifty percent
   24.92 +     (50%) of the outstanding shares or beneficial ownership of such
   24.93 +     entity.
   24.94 +
   24.95 +2. Source Code License.
   24.96 +
   24.97 +     2.1. The Initial Developer Grant.
   24.98 +     The Initial Developer hereby grants You a world-wide, royalty-free,
   24.99 +     non-exclusive license, subject to third party intellectual property
  24.100 +     claims:
  24.101 +          (a)  under intellectual property rights (other than patent or
  24.102 +          trademark) Licensable by Initial Developer to use, reproduce,
  24.103 +          modify, display, perform, sublicense and distribute the Original
  24.104 +          Code (or portions thereof) with or without Modifications, and/or
  24.105 +          as part of a Larger Work; and
  24.106 +
  24.107 +          (b) under Patents Claims infringed by the making, using or
  24.108 +          selling of Original Code, to make, have made, use, practice,
  24.109 +          sell, and offer for sale, and/or otherwise dispose of the
  24.110 +          Original Code (or portions thereof).
  24.111 +
  24.112 +          (c) the licenses granted in this Section 2.1(a) and (b) are
  24.113 +          effective on the date Initial Developer first distributes
  24.114 +          Original Code under the terms of this License.
  24.115 +
  24.116 +          (d) Notwithstanding Section 2.1(b) above, no patent license is
  24.117 +          granted: 1) for code that You delete from the Original Code; 2)
  24.118 +          separate from the Original Code;  or 3) for infringements caused
  24.119 +          by: i) the modification of the Original Code or ii) the
  24.120 +          combination of the Original Code with other software or devices.
  24.121 +
  24.122 +     2.2. Contributor Grant.
  24.123 +     Subject to third party intellectual property claims, each Contributor
  24.124 +     hereby grants You a world-wide, royalty-free, non-exclusive license
  24.125 +
  24.126 +          (a)  under intellectual property rights (other than patent or
  24.127 +          trademark) Licensable by Contributor, to use, reproduce, modify,
  24.128 +          display, perform, sublicense and distribute the Modifications
  24.129 +          created by such Contributor (or portions thereof) either on an
  24.130 +          unmodified basis, with other Modifications, as Covered Code
  24.131 +          and/or as part of a Larger Work; and
  24.132 +
  24.133 +          (b) under Patent Claims infringed by the making, using, or
  24.134 +          selling of  Modifications made by that Contributor either alone
  24.135 +          and/or in combination with its Contributor Version (or portions
  24.136 +          of such combination), to make, use, sell, offer for sale, have
  24.137 +          made, and/or otherwise dispose of: 1) Modifications made by that
  24.138 +          Contributor (or portions thereof); and 2) the combination of
  24.139 +          Modifications made by that Contributor with its Contributor
  24.140 +          Version (or portions of such combination).
  24.141 +
  24.142 +          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
  24.143 +          effective on the date Contributor first makes Commercial Use of
  24.144 +          the Covered Code.
  24.145 +
  24.146 +          (d)    Notwithstanding Section 2.2(b) above, no patent license is
  24.147 +          granted: 1) for any code that Contributor has deleted from the
  24.148 +          Contributor Version; 2)  separate from the Contributor Version;
  24.149 +          3)  for infringements caused by: i) third party modifications of
  24.150 +          Contributor Version or ii)  the combination of Modifications made
  24.151 +          by that Contributor with other software  (except as part of the
  24.152 +          Contributor Version) or other devices; or 4) under Patent Claims
  24.153 +          infringed by Covered Code in the absence of Modifications made by
  24.154 +          that Contributor.
  24.155 +
  24.156 +3. Distribution Obligations.
  24.157 +
  24.158 +     3.1. Application of License.
  24.159 +     The Modifications which You create or to which You contribute are
  24.160 +     governed by the terms of this License, including without limitation
  24.161 +     Section 2.2. The Source Code version of Covered Code may be
  24.162 +     distributed only under the terms of this License or a future version
  24.163 +     of this License released under Section 6.1, and You must include a
  24.164 +     copy of this License with every copy of the Source Code You
  24.165 +     distribute. You may not offer or impose any terms on any Source Code
  24.166 +     version that alters or restricts the applicable version of this
  24.167 +     License or the recipients' rights hereunder. However, You may include
  24.168 +     an additional document offering the additional rights described in
  24.169 +     Section 3.5.
  24.170 +
  24.171 +     3.2. Availability of Source Code.
  24.172 +     Any Modification which You create or to which You contribute must be
  24.173 +     made available in Source Code form under the terms of this License
  24.174 +     either on the same media as an Executable version or via an accepted
  24.175 +     Electronic Distribution Mechanism to anyone to whom you made an
  24.176 +     Executable version available; and if made available via Electronic
  24.177 +     Distribution Mechanism, must remain available for at least twelve (12)
  24.178 +     months after the date it initially became available, or at least six
  24.179 +     (6) months after a subsequent version of that particular Modification
  24.180 +     has been made available to such recipients. You are responsible for
  24.181 +     ensuring that the Source Code version remains available even if the
  24.182 +     Electronic Distribution Mechanism is maintained by a third party.
  24.183 +
  24.184 +     3.3. Description of Modifications.
  24.185 +     You must cause all Covered Code to which You contribute to contain a
  24.186 +     file documenting the changes You made to create that Covered Code and
  24.187 +     the date of any change. You must include a prominent statement that
  24.188 +     the Modification is derived, directly or indirectly, from Original
  24.189 +     Code provided by the Initial Developer and including the name of the
  24.190 +     Initial Developer in (a) the Source Code, and (b) in any notice in an
  24.191 +     Executable version or related documentation in which You describe the
  24.192 +     origin or ownership of the Covered Code.
  24.193 +
  24.194 +     3.4. Intellectual Property Matters
  24.195 +          (a) Third Party Claims.
  24.196 +          If Contributor has knowledge that a license under a third party's
  24.197 +          intellectual property rights is required to exercise the rights
  24.198 +          granted by such Contributor under Sections 2.1 or 2.2,
  24.199 +          Contributor must include a text file with the Source Code
  24.200 +          distribution titled "LEGAL" which describes the claim and the
  24.201 +          party making the claim in sufficient detail that a recipient will
  24.202 +          know whom to contact. If Contributor obtains such knowledge after
  24.203 +          the Modification is made available as described in Section 3.2,
  24.204 +          Contributor shall promptly modify the LEGAL file in all copies
  24.205 +          Contributor makes available thereafter and shall take other steps
  24.206 +          (such as notifying appropriate mailing lists or newsgroups)
  24.207 +          reasonably calculated to inform those who received the Covered
  24.208 +          Code that new knowledge has been obtained.
  24.209 +
  24.210 +          (b) Contributor APIs.
  24.211 +          If Contributor's Modifications include an application programming
  24.212 +          interface and Contributor has knowledge of patent licenses which
  24.213 +          are reasonably necessary to implement that API, Contributor must
  24.214 +          also include this information in the LEGAL file.
  24.215 +
  24.216 +               (c)    Representations.
  24.217 +          Contributor represents that, except as disclosed pursuant to
  24.218 +          Section 3.4(a) above, Contributor believes that Contributor's
  24.219 +          Modifications are Contributor's original creation(s) and/or
  24.220 +          Contributor has sufficient rights to grant the rights conveyed by
  24.221 +          this License.
  24.222 +
  24.223 +     3.5. Required Notices.
  24.224 +     You must duplicate the notice in Exhibit A in each file of the Source
  24.225 +     Code.  If it is not possible to put such notice in a particular Source
  24.226 +     Code file due to its structure, then You must include such notice in a
  24.227 +     location (such as a relevant directory) where a user would be likely
  24.228 +     to look for such a notice.  If You created one or more Modification(s)
  24.229 +     You may add your name as a Contributor to the notice described in
  24.230 +     Exhibit A.  You must also duplicate this License in any documentation
  24.231 +     for the Source Code where You describe recipients' rights or ownership
  24.232 +     rights relating to Covered Code.  You may choose to offer, and to
  24.233 +     charge a fee for, warranty, support, indemnity or liability
  24.234 +     obligations to one or more recipients of Covered Code. However, You
  24.235 +     may do so only on Your own behalf, and not on behalf of the Initial
  24.236 +     Developer or any Contributor. You must make it absolutely clear than
  24.237 +     any such warranty, support, indemnity or liability obligation is
  24.238 +     offered by You alone, and You hereby agree to indemnify the Initial
  24.239 +     Developer and every Contributor for any liability incurred by the
  24.240 +     Initial Developer or such Contributor as a result of warranty,
  24.241 +     support, indemnity or liability terms You offer.
  24.242 +
  24.243 +     3.6. Distribution of Executable Versions.
  24.244 +     You may distribute Covered Code in Executable form only if the
  24.245 +     requirements of Section 3.1-3.5 have been met for that Covered Code,
  24.246 +     and if You include a notice stating that the Source Code version of
  24.247 +     the Covered Code is available under the terms of this License,
  24.248 +     including a description of how and where You have fulfilled the
  24.249 +     obligations of Section 3.2. The notice must be conspicuously included
  24.250 +     in any notice in an Executable version, related documentation or
  24.251 +     collateral in which You describe recipients' rights relating to the
  24.252 +     Covered Code. You may distribute the Executable version of Covered
  24.253 +     Code or ownership rights under a license of Your choice, which may
  24.254 +     contain terms different from this License, provided that You are in
  24.255 +     compliance with the terms of this License and that the license for the
  24.256 +     Executable version does not attempt to limit or alter the recipient's
  24.257 +     rights in the Source Code version from the rights set forth in this
  24.258 +     License. If You distribute the Executable version under a different
  24.259 +     license You must make it absolutely clear that any terms which differ
  24.260 +     from this License are offered by You alone, not by the Initial
  24.261 +     Developer or any Contributor. You hereby agree to indemnify the
  24.262 +     Initial Developer and every Contributor for any liability incurred by
  24.263 +     the Initial Developer or such Contributor as a result of any such
  24.264 +     terms You offer.
  24.265 +
  24.266 +     3.7. Larger Works.
  24.267 +     You may create a Larger Work by combining Covered Code with other code
  24.268 +     not governed by the terms of this License and distribute the Larger
  24.269 +     Work as a single product. In such a case, You must make sure the
  24.270 +     requirements of this License are fulfilled for the Covered Code.
  24.271 +
  24.272 +4. Inability to Comply Due to Statute or Regulation.
  24.273 +
  24.274 +     If it is impossible for You to comply with any of the terms of this
  24.275 +     License with respect to some or all of the Covered Code due to
  24.276 +     statute, judicial order, or regulation then You must: (a) comply with
  24.277 +     the terms of this License to the maximum extent possible; and (b)
  24.278 +     describe the limitations and the code they affect. Such description
  24.279 +     must be included in the LEGAL file described in Section 3.4 and must
  24.280 +     be included with all distributions of the Source Code. Except to the
  24.281 +     extent prohibited by statute or regulation, such description must be
  24.282 +     sufficiently detailed for a recipient of ordinary skill to be able to
  24.283 +     understand it.
  24.284 +
  24.285 +5. Application of this License.
  24.286 +
  24.287 +     This License applies to code to which the Initial Developer has
  24.288 +     attached the notice in Exhibit A and to related Covered Code.
  24.289 +
  24.290 +6. Versions of the License.
  24.291 +
  24.292 +     6.1. New Versions.
  24.293 +     Netscape Communications Corporation ("Netscape") may publish revised
  24.294 +     and/or new versions of the License from time to time. Each version
  24.295 +     will be given a distinguishing version number.
  24.296 +
  24.297 +     6.2. Effect of New Versions.
  24.298 +     Once Covered Code has been published under a particular version of the
  24.299 +     License, You may always continue to use it under the terms of that
  24.300 +     version. You may also choose to use such Covered Code under the terms
  24.301 +     of any subsequent version of the License published by Netscape. No one
  24.302 +     other than Netscape has the right to modify the terms applicable to
  24.303 +     Covered Code created under this License.
  24.304 +
  24.305 +     6.3. Derivative Works.
  24.306 +     If You create or use a modified version of this License (which you may
  24.307 +     only do in order to apply it to code which is not already Covered Code
  24.308 +     governed by this License), You must (a) rename Your license so that
  24.309 +     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
  24.310 +     "MPL", "NPL" or any confusingly similar phrase do not appear in your
  24.311 +     license (except to note that your license differs from this License)
  24.312 +     and (b) otherwise make it clear that Your version of the license
  24.313 +     contains terms which differ from the Mozilla Public License and
  24.314 +     Netscape Public License. (Filling in the name of the Initial
  24.315 +     Developer, Original Code or Contributor in the notice described in
  24.316 +     Exhibit A shall not of themselves be deemed to be modifications of
  24.317 +     this License.)
  24.318 +
  24.319 +7. DISCLAIMER OF WARRANTY.
  24.320 +
  24.321 +     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
  24.322 +     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
  24.323 +     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
  24.324 +     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
  24.325 +     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
  24.326 +     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
  24.327 +     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
  24.328 +     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
  24.329 +     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
  24.330 +     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
  24.331 +
  24.332 +8. TERMINATION.
  24.333 +
  24.334 +     8.1.  This License and the rights granted hereunder will terminate
  24.335 +     automatically if You fail to comply with terms herein and fail to cure
  24.336 +     such breach within 30 days of becoming aware of the breach. All
  24.337 +     sublicenses to the Covered Code which are properly granted shall
  24.338 +     survive any termination of this License. Provisions which, by their
  24.339 +     nature, must remain in effect beyond the termination of this License
  24.340 +     shall survive.
  24.341 +
  24.342 +     8.2.  If You initiate litigation by asserting a patent infringement
  24.343 +     claim (excluding declatory judgment actions) against Initial Developer
  24.344 +     or a Contributor (the Initial Developer or Contributor against whom
  24.345 +     You file such action is referred to as "Participant")  alleging that:
  24.346 +
  24.347 +     (a)  such Participant's Contributor Version directly or indirectly
  24.348 +     infringes any patent, then any and all rights granted by such
  24.349 +     Participant to You under Sections 2.1 and/or 2.2 of this License
  24.350 +     shall, upon 60 days notice from Participant terminate prospectively,
  24.351 +     unless if within 60 days after receipt of notice You either: (i)
  24.352 +     agree in writing to pay Participant a mutually agreeable reasonable
  24.353 +     royalty for Your past and future use of Modifications made by such
  24.354 +     Participant, or (ii) withdraw Your litigation claim with respect to
  24.355 +     the Contributor Version against such Participant.  If within 60 days
  24.356 +     of notice, a reasonable royalty and payment arrangement are not
  24.357 +     mutually agreed upon in writing by the parties or the litigation claim
  24.358 +     is not withdrawn, the rights granted by Participant to You under
  24.359 +     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
  24.360 +     the 60 day notice period specified above.
  24.361 +
  24.362 +     (b)  any software, hardware, or device, other than such Participant's
  24.363 +     Contributor Version, directly or indirectly infringes any patent, then
  24.364 +     any rights granted to You by such Participant under Sections 2.1(b)
  24.365 +     and 2.2(b) are revoked effective as of the date You first made, used,
  24.366 +     sold, distributed, or had made, Modifications made by that
  24.367 +     Participant.
  24.368 +
  24.369 +     8.3.  If You assert a patent infringement claim against Participant
  24.370 +     alleging that such Participant's Contributor Version directly or
  24.371 +     indirectly infringes any patent where such claim is resolved (such as
  24.372 +     by license or settlement) prior to the initiation of patent
  24.373 +     infringement litigation, then the reasonable value of the licenses
  24.374 +     granted by such Participant under Sections 2.1 or 2.2 shall be taken
  24.375 +     into account in determining the amount or value of any payment or
  24.376 +     license.
  24.377 +
  24.378 +     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
  24.379 +     all end user license agreements (excluding distributors and resellers)
  24.380 +     which have been validly granted by You or any distributor hereunder
  24.381 +     prior to termination shall survive termination.
  24.382 +
  24.383 +9. LIMITATION OF LIABILITY.
  24.384 +
  24.385 +     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
  24.386 +     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
  24.387 +     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
  24.388 +     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
  24.389 +     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
  24.390 +     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
  24.391 +     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
  24.392 +     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
  24.393 +     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
  24.394 +     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
  24.395 +     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
  24.396 +     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
  24.397 +     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
  24.398 +     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
  24.399 +
  24.400 +10. U.S. GOVERNMENT END USERS.
  24.401 +
  24.402 +     The Covered Code is a "commercial item," as that term is defined in
  24.403 +     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
  24.404 +     software" and "commercial computer software documentation," as such
  24.405 +     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
  24.406 +     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
  24.407 +     all U.S. Government End Users acquire Covered Code with only those
  24.408 +     rights set forth herein.
  24.409 +
  24.410 +11. MISCELLANEOUS.
  24.411 +
  24.412 +     This License represents the complete agreement concerning subject
  24.413 +     matter hereof. If any provision of this License is held to be
  24.414 +     unenforceable, such provision shall be reformed only to the extent
  24.415 +     necessary to make it enforceable. This License shall be governed by
  24.416 +     California law provisions (except to the extent applicable law, if
  24.417 +     any, provides otherwise), excluding its conflict-of-law provisions.
  24.418 +     With respect to disputes in which at least one party is a citizen of,
  24.419 +     or an entity chartered or registered to do business in the United
  24.420 +     States of America, any litigation relating to this License shall be
  24.421 +     subject to the jurisdiction of the Federal Courts of the Northern
  24.422 +     District of California, with venue lying in Santa Clara County,
  24.423 +     California, with the losing party responsible for costs, including
  24.424 +     without limitation, court costs and reasonable attorneys' fees and
  24.425 +     expenses. The application of the United Nations Convention on
  24.426 +     Contracts for the International Sale of Goods is expressly excluded.
  24.427 +     Any law or regulation which provides that the language of a contract
  24.428 +     shall be construed against the drafter shall not apply to this
  24.429 +     License.
  24.430 +
  24.431 +12. RESPONSIBILITY FOR CLAIMS.
  24.432 +
  24.433 +     As between Initial Developer and the Contributors, each party is
  24.434 +     responsible for claims and damages arising, directly or indirectly,
  24.435 +     out of its utilization of rights under this License and You agree to
  24.436 +     work with Initial Developer and Contributors to distribute such
  24.437 +     responsibility on an equitable basis. Nothing herein is intended or
  24.438 +     shall be deemed to constitute any admission of liability.
  24.439 +
  24.440 +13. MULTIPLE-LICENSED CODE.
  24.441 +
  24.442 +     Initial Developer may designate portions of the Covered Code as
  24.443 +     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
  24.444 +     Developer permits you to utilize portions of the Covered Code under
  24.445 +     Your choice of the NPL or the alternative licenses, if any, specified
  24.446 +     by the Initial Developer in the file described in Exhibit A.
  24.447 +
  24.448 +EXHIBIT A -Mozilla Public License.
  24.449 +
  24.450 +     ``The contents of this file are subject to the Mozilla Public License
  24.451 +     Version 1.1 (the "License"); you may not use this file except in
  24.452 +     compliance with the License. You may obtain a copy of the License at
  24.453 +     http://www.mozilla.org/MPL/
  24.454 +
  24.455 +     Software distributed under the License is distributed on an "AS IS"
  24.456 +     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  24.457 +     License for the specific language governing rights and limitations
  24.458 +     under the License.
  24.459 +
  24.460 +     The Original Code is ______________________________________.
  24.461 +
  24.462 +     The Initial Developer of the Original Code is ________________________.
  24.463 +     Portions created by ______________________ are Copyright (C) ______
  24.464 +     _______________________. All Rights Reserved.
  24.465 +
  24.466 +     Contributor(s): ______________________________________.
  24.467 +
  24.468 +     Alternatively, the contents of this file may be used under the terms
  24.469 +     of the _____ license (the  "[___] License"), in which case the
  24.470 +     provisions of [______] License are applicable instead of those
  24.471 +     above.  If you wish to allow use of your version of this file only
  24.472 +     under the terms of the [____] License and not to allow others to use
  24.473 +     your version of this file under the MPL, indicate your decision by
  24.474 +     deleting  the provisions above and replace  them with the notice and
  24.475 +     other provisions required by the [___] License.  If you do not delete
  24.476 +     the provisions above, a recipient may use your version of this file
  24.477 +     under either the MPL or the [___] License."
  24.478 +
  24.479 +     [NOTE: The text of this Exhibit A may differ slightly from the text of
  24.480 +     the notices in the Source Code files of the Original Code. You should
  24.481 +     use the text of this Exhibit A rather than the text found in the
  24.482 +     Original Code Source Code for Your Modifications.]
  24.483 +
  24.484 +     ----------------------------------------------------------------------
  24.485 +
  24.486 +     AMENDMENTS
  24.487 +
  24.488 +     The Netscape Public License Version 1.1 ("NPL") consists of the
  24.489 +     Mozilla Public License Version 1.1 with the following Amendments,
  24.490 +     including Exhibit A-Netscape Public License.  Files identified with
  24.491 +     "Exhibit A-Netscape Public License" are governed by the Netscape
  24.492 +     Public License Version 1.1.
  24.493 +
  24.494 +     Additional Terms applicable to the Netscape Public License.
  24.495 +          I. Effect.
  24.496 +          These additional terms described in this Netscape Public
  24.497 +          License -- Amendments shall apply to the Mozilla Communicator
  24.498 +          client code and to all Covered Code under this License.
  24.499 +
  24.500 +          II. "Netscape's Branded Code" means Covered Code that Netscape
  24.501 +          distributes and/or permits others to distribute under one or more
  24.502 +          trademark(s) which are controlled by Netscape but which are not
  24.503 +          licensed for use under this License.
  24.504 +
  24.505 +          III. Netscape and logo.
  24.506 +          This License does not grant any rights to use the trademarks
  24.507 +          "Netscape", the "Netscape N and horizon" logo or the "Netscape
  24.508 +          lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript",
  24.509 +          "Smart Browsing" even if such marks are included in the Original
  24.510 +          Code or Modifications.
  24.511 +
  24.512 +          IV. Inability to Comply Due to Contractual Obligation.
  24.513 +          Prior to licensing the Original Code under this License, Netscape
  24.514 +          has licensed third party code for use in Netscape's Branded Code.
  24.515 +          To the extent that Netscape is limited contractually from making
  24.516 +          such third party code available under this License, Netscape may
  24.517 +          choose to reintegrate such code into Covered Code without being
  24.518 +          required to distribute such code in Source Code form, even if
  24.519 +          such code would otherwise be considered "Modifications" under
  24.520 +          this License.
  24.521 +
  24.522 +          V. Use of Modifications and Covered Code by Initial Developer.
  24.523 +               V.1. In General.
  24.524 +               The obligations of Section 3 apply to Netscape, except to
  24.525 +               the extent specified in this Amendment, Section V.2 and V.3.
  24.526 +
  24.527 +               V.2. Other Products.
  24.528 +               Netscape may include Covered Code in products other than the
  24.529 +               Netscape's Branded Code which are released by Netscape
  24.530 +               during the two (2) years following the release date of the
  24.531 +               Original Code, without such additional products becoming
  24.532 +               subject to the terms of this License, and may license such
  24.533 +               additional products on different terms from those contained
  24.534 +               in this License.
  24.535 +
  24.536 +               V.3. Alternative Licensing.
  24.537 +               Netscape may license the Source Code of Netscape's Branded
  24.538 +               Code, including Modifications incorporated therein, without
  24.539 +               such Netscape Branded Code becoming subject to the terms of
  24.540 +               this License, and may license such Netscape Branded Code on
  24.541 +               different terms from those contained in this License.
  24.542 +
  24.543 +          VI. Litigation.
  24.544 +          Notwithstanding the limitations of Section 11 above, the
  24.545 +          provisions regarding litigation in Section 11(a), (b) and (c) of
  24.546 +          the License shall apply to all disputes relating to this License.
  24.547 +
  24.548 +     EXHIBIT A-Netscape Public License.
  24.549 +
  24.550 +          "The contents of this file are subject to the Netscape Public
  24.551 +          License Version 1.1 (the "License"); you may not use this file
  24.552 +          except in compliance with the License. You may obtain a copy of
  24.553 +          the License at http://www.mozilla.org/NPL/
  24.554 +
  24.555 +          Software distributed under the License is distributed on an "AS
  24.556 +          IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  24.557 +          implied. See the License for the specific language governing
  24.558 +          rights and limitations under the License.
  24.559 +
  24.560 +          The Original Code is Mozilla Communicator client code, released
  24.561 +          March 31, 1998.
  24.562 +
  24.563 +          The Initial Developer of the Original Code is Netscape
  24.564 +          Communications Corporation. Portions created by Netscape are
  24.565 +          Copyright (C) 1998-1999 Netscape Communications Corporation. All
  24.566 +          Rights Reserved.
  24.567 +
  24.568 +          Contributor(s): ______________________________________.
  24.569 +
  24.570 +          Alternatively, the contents of this file may be used under the
  24.571 +          terms of the _____ license (the "[___] License"), in which case
  24.572 +          the provisions of [______] License are applicable  instead of
  24.573 +          those above.  If you wish to allow use of your version of this
  24.574 +          file only under the terms of the [____] License and not to allow
  24.575 +          others to use your version of this file under the NPL, indicate
  24.576 +          your decision by deleting  the provisions above and replace  them
  24.577 +          with the notice and other provisions required by the [___]
  24.578 +          License.  If you do not delete the provisions above, a recipient
  24.579 +          may use your version of this file under either the NPL or the
  24.580 +          [___] License."
  24.581 +
  24.582 +*******************************************************************************
  24.583 +END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE
  24.584 +IMPORTANT-READ CAREFULLY: This End-User License Agreement ("EULA") is a
  24.585 +legal agreement between you (either an individual or a single entity) and
  24.586 +Microsoft Corporation ("Microsoft") for the Microsoft software that
  24.587 +accompanies this EULA, which includes computer software and may include
  24.588 +associated media, printed materials, "online" or electronic documentation,
  24.589 +and Internet-based services ("Software"). An amendment or addendum to this
  24.590 +EULA may accompany the Software. YOU AGREE TO BE BOUND BY THE TERMS OF THIS
  24.591 +EULA BY INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE. IF YOU DO NOT
  24.592 +AGREE, DO NOT INSTALL, COPY, OR USE THE SOFTWARE; YOU MAY RETURN IT TO YOUR
  24.593 +PLACE OF PURCHASE (IF APPLICABLE) FOR A FULL REFUND.
  24.594 +
  24.595 +MICROSOFT SOFTWARE LICENSE
  24.596 +1. GRANTS OF LICENSE. Microsoft grants you the rights described in this EULA
  24.597 +provided that you comply with all terms and conditions of this EULA.
  24.598 +1.1 General License Grant. Microsoft grants to you as an individual,
  24.599 +a personal, nonexclusive license to use the Software, and to make and use
  24.600 +copies of the Software for the purposes of designing, developing, testing,
  24.601 +and demonstrating your software product(s), provided that you are the only
  24.602 +individual using the Software.
  24.603 +If you are an entity, Microsoft grants to you a personal,
  24.604 +nonexclusive license to use the Software, and to make and use copies of the
  24.605 +Software, provided that for each individual using the Software within your
  24.606 +organization, you have acquired a separate and valid license for each such
  24.607 +individual.
  24.608 +1.2 Documentation. You may make and use an unlimited number of
  24.609 +copies of any documentation, provided that such copies shall be used only
  24.610 +for personal purposes and are not to be republished or distributed (either
  24.611 +in hard copy or electronic form) beyond your premises.
  24.612 +1.3 Storage/Network Use. You may also store or install a copy of the
  24.613 +Software on a storage device, such as a network server, used only to install
  24.614 +or run the Software on computers used by licensed end users in accordance
  24.615 +with Section 1.1. A single license for the Software may not be shared or
  24.616 +used concurrently by multiple end users.
  24.617 +1.4 Effect of EULA. The Software may contain development tools,
  24.618 +utilities and other Microsoft software programs (each such tool or software
  24.619 +program, a "Component"); such Components may include a separate end-user
  24.620 +license agreement (each, a "Component EULA"). Except as provided in Section
  24.621 +4 ("Prerelease Code"), in the event of inconsistencies between this EULA and
  24.622 +any Component EULA, the terms of this EULA shall control. The Software may
  24.623 +also contain thirdparty software programs. Any such software is provided
  24.624 +for your use as a convenience and your use is subject to the terms and
  24.625 +conditions of any license agreement contained in that software.
  24.626 +2. ADDITIONAL LICENSE RIGHTS -- REDISTRIBUTABLE CODE. In addition to the
  24.627 +rights granted in Section 1, certain portions of the Software, as described
  24.628 +in this Section 2, are provided to you with additional license rights.
  24.629 +These additional license rights are conditioned upon your compliance with
  24.630 +the distribution requirements and license limitations described in Section
  24.631 +3.
  24.632 +2.1 Sample Code. Microsoft grants you a limited, nonexclusive,
  24.633 +royalty-free license to: (a) use and modify the source code version of those
  24.634 +portions of the Software identified as "Samples" in REDIST.TXT or elsewhere
  24.635 +in the Software ("Sample Code") for the sole purposes of designing,
  24.636 +developing, and testing your software product(s), and (b) reproduce and
  24.637 +distribute the Sample Code, along with any modifications thereof, in object
  24.638 +and/or source code form. For applicable redistribution requirements for
  24.639 +Sample Code, see Section 3.1 below.
  24.640 +2.2 Redistributable Code-General. Microsoft grants you a limited,
  24.641 +nonexclusive, royalty-free license to reproduce and distribute the object
  24.642 +code form of any portion of the Software listed in REDIST.TXT
  24.643 +("Redistributable Code"). For general redistribution requirements for
  24.644 +Redistributable Code, see Section 3.1 below.
  24.645 +2.3 Redistributable Code-Microsoft Merge Modules ("MSM"). Microsoft
  24.646 +grants you a limited, nonexclusive, royalty-free license to reproduce and
  24.647 +distribute the content of MSM file(s) listed in REDIST.TXT in the manner
  24.648 +described in the Software documentation only so long as you redistribute
  24.649 +such content in its entirety and do not modify such content in any way. For
  24.650 +all other applicable redistribution requirements for MSM files, see Section
  24.651 +3.1 below.
  24.652 +2.4 Redistributable Code-Visual C++: Microsoft Foundation Classes
  24.653 +(MFC), Active Template Libraries (ATL), and C runtimes (CRTs). If this EULA
  24.654 +accompanies Visual C++, then in addition to the rights granted in Section 1,
  24.655 +Microsoft grants you a license to use and modify the source code version of
  24.656 +those portions of the Software that are identified as MFC, ATL, or CRTs
  24.657 +(collectively, the "VC Redistributables"), for the sole purposes of
  24.658 +designing, developing, and testing your software product(s). Provided you
  24.659 +comply with Section 3.1 and you rename any files created by you that are
  24.660 +included in the Licensee Software (defined below), Microsoft grants you a
  24.661 +limited, nonexclusive, royalty-free license to reproduce and distribute the
  24.662 +object code version of the VC Redistributables, including any modifications
  24.663 +you make. For purposes of this section, "modifications" shall mean
  24.664 +enhancements to the functionality of the VC Redistributables. For all other
  24.665 +applicable redistribution requirements for VC Redistributables, see Section
  24.666 +3.1 below.
  24.667 +3. DISTRIBUTION REQUIREMENTS AND OTHER LICENSE RIGHTS AND LIMITATIONS. If
  24.668 +you choose to exercise your rights under Section 2, any redistribution by
  24.669 +you is subject to your compliance with Section 3.1; some of the
  24.670 +Redistributable Code has additional limited use rights described in Section
  24.671 +3.2.
  24.672 +3.1 General Distribution Requirements.
  24.673 +(a) If you choose to redistribute Sample Code, or
  24.674 +Redistributable Code (collectively, the "Redistributables") as described in
  24.675 +Section 2, you agree: (i) except as otherwise noted in Section 2.1 (Sample
  24.676 +Code), to distribute the Redistributables only in object code form and in
  24.677 +conjunction with and as a part of a software application product developed
  24.678 +by you that adds significant and primary functionality to the
  24.679 +Redistributables ("Licensee Software"); (ii) that the Redistributables only
  24.680 +operate in conjunction with Microsoft Windows platforms; (iii) that if the
  24.681 +Licensee Software is distributed beyond Licensee's premises or externally
  24.682 +from Licensee's organization, to distribute the Licensee Software containing
  24.683 +the Redistributables pursuant to an end user license agreement (which may be
  24.684 +"break-the-seal", "click-wrap" or signed), with terms no less protective
  24.685 +than those contained in this EULA; (iv) not to use Microsoft's name, logo,
  24.686 +or trademarks to market the Licensee Software; (v) to display your own valid
  24.687 +copyright notice which shall be sufficient to protect Microsoft's copyright
  24.688 +in the Software; (vi) not to remove or obscure any copyright, trademark or
  24.689 +patent notices that appear on the Software as delivered to you; (vii) to
  24.690 +indemnify, hold harmless, and defend Microsoft from and against any claims
  24.691 +or lawsuits, including attorney's fees, that arise or result from the use or
  24.692 +distribution of the Licensee Software; (viii) to otherwise comply with the
  24.693 +terms of this EULA; and (ix) agree that Microsoft reserves all rights not
  24.694 +expressly granted.
  24.695 +You also agree not to permit further distribution of the
  24.696 +Redistributables by your end users except you may permit further
  24.697 +redistribution of the Redistributables by your distributors to your end-user
  24.698 +customers if your distributors only distribute the Redistributables in
  24.699 +conjunction with, and as part of, the Licensee Software, you comply with all
  24.700 +other terms of this EULA, and your distributors comply with all restrictions
  24.701 +of this EULA that are applicable to you.
  24.702 +(b) If you use the Redistributables, then in addition to your
  24.703 +compliance with the applicable distribution requirements described for the
  24.704 +Redistributables, the following also applies. Your license rights to the
  24.705 +Redistributables are conditioned upon your not (i) creating derivative works
  24.706 +of the Redistributables in any manner that would cause the Redistributables
  24.707 +in whole or in part to become subject to any of the terms of an Excluded
  24.708 +License; or (ii) distributing the Redistributables (or derivative works
  24.709 +thereof) in any manner that would cause the Redistributables to become
  24.710 +subject to any of the terms of an Excluded License. An "Excluded License"
  24.711 +is any license that requires as a condition of use, modification and/or
  24.712 +distribution of software subject to the Excluded License, that such software
  24.713 +or other software combined and/or distributed with such software be (x)
  24.714 +disclosed or distributed in source code form; (y) licensed for the purpose
  24.715 +of making derivative works; or (z) redistributable at no charge.
  24.716 +3.2 Additional Distribution Requirements for Certain Redistributable
  24.717 +Code. If you choose to redistribute the files discussed in this Section,
  24.718 +then in addition to the terms of Section 3.1, you must ALSO comply with the
  24.719 +following.
  24.720 +(a) Microsoft SQL Server Desktop Engine ("MSDE"). If you
  24.721 +redistribute MSDE you agree to comply with the following additional
  24.722 +requirements: (a) Licensee Software shall not substantially duplicate the
  24.723 +capabilities of Microsoft Access or, in the reasonable opinion of Microsoft,
  24.724 +compete with same; and (b) unless Licensee Software requires your customers
  24.725 +to license Microsoft Access in order to operate, you shall not reproduce or
  24.726 +use MSDE for commercial distribution in conjunction with a general purpose
  24.727 +word processing, spreadsheet or database management software product, or an
  24.728 +integrated work or product suite whose components include a general purpose
  24.729 +word processing, spreadsheet, or database management software product except
  24.730 +for the exclusive use of importing data to the various formats supported by
  24.731 +Microsoft Access. A product that includes limited word processing, spreadsh
  24.732 +eet or database components along with other components which provide
  24.733 +significant and primary value, such as an accounting product with limited
  24.734 +spreadsheet capability, is not considered to be a "general purpose" product.
  24.735 +(b) Microsoft Data Access Components. If you redistribute the
  24.736 +Microsoft Data Access Component file identified as MDAC_TYP.EXE, you also
  24.737 +agree to redistribute such file in object code only in conjunction with and
  24.738 +as a part of a Licensee Software developed by you with a Microsoft
  24.739 +development tool product that adds significant and primary functionality to
  24.740 +MDAC_TYP.EXE.
  24.741 +3.3 Separation of Components. The Software is licensed as a single
  24.742 +product. Its component parts may not be separated for use by more than one
  24.743 +user.
  24.744 +3.4 Benchmark Testing. The Software may contain the Microsoft .NET
  24.745 +Framework. You may not disclose the results of any benchmark test of the
  24.746 +.NET Framework component of the Software to any third party without
  24.747 +Microsoft's prior written approval.
  24.748 +4. PRERELEASE CODE. Portions of the Software may be identified as prerelease
  24.749 +code ("Prerelease Code"). Such Prerelease Code is not at the level of
  24.750 +performance and compatibility of the final, generally available product
  24.751 +offering. The Prerelease Code may not operate correctly and may be
  24.752 +substantially modified prior to first commercial shipment. Microsoft is not
  24.753 +obligated to make this or any later version of the Prerelease Code
  24.754 +commercially available. The grant of license to use Prerelease Code expires
  24.755 +upon availability of a commercial release of the Prerelease Code from
  24.756 +Microsoft. NOTE: In the event that Prerelease Code contains a separate
  24.757 +end-user license agreement, the terms and conditions of such end-user
  24.758 +license agreement shall govern your use of the corresponding Prerelease
  24.759 +Code.
  24.760 +5. RESERVATION OF RIGHTS AND OWNERSHIP. Microsoft reserves all rights not
  24.761 +expressly granted to you in this EULA. The Software is protected by
  24.762 +copyright and other intellectual property laws and treaties. Microsoft or
  24.763 +its suppliers own the title, copyright, and other intellectual property
  24.764 +rights in the Software. The Software is licensed, not sold.
  24.765 +6. LIMITATIONS ON REVERSE ENGINEERING, DECOMPILATION, AND DISASSEMBLY. You
  24.766 +may not reverse engineer, decompile, or disassemble the Software, except and
  24.767 +only to the extent that such activity is expressly permitted by applicable
  24.768 +law notwithstanding this limitation.
  24.769 +7. NO RENTAL/COMMERCIAL HOSTING. You may not rent, lease, lend or provide
  24.770 +commercial hosting services with the Software.
  24.771 +8. CONSENT TO USE OF DATA. You agree that Microsoft and its affiliates may
  24.772 +collect and use technical information gathered as part of the product
  24.773 +support services provided to you, if any, related to the Software.
  24.774 +Microsoft may use this information solely to improve our products or to
  24.775 +provide customized services or technologies to you and will not disclose
  24.776 +this information in a form that personally identifies you.
  24.777 +9. LINKS TO THIRD PARTY SITES. You may link to third party sites through
  24.778 +the use of the Software. The third party sites are not under the control of
  24.779 +Microsoft, and Microsoft is not responsible for the contents of any third
  24.780 +party sites, any links contained in third party sites, or any changes or
  24.781 +updates to third party sites. Microsoft is not responsible for webcasting
  24.782 +or any other form of transmission received from any third party sites.
  24.783 +Microsoft is providing these links to third party sites to you only as a
  24.784 +convenience, and the inclusion of any link does not imply an endorsement by
  24.785 +Microsoft of the third party site.
  24.786 +10. ADDITIONAL SOFTWARE/SERVICES. This EULA applies to updates,
  24.787 +supplements, add-on components, or Internet-based services components, of
  24.788 +the Software that Microsoft may provide to you or make available to you
  24.789 +after the date you obtain your initial copy of the Software, unless we
  24.790 +provide other terms along with the update, supplement, add-on component, or
  24.791 +Internet-based services component. Microsoft reserves the right to
  24.792 +discontinue any Internet-based services provided to you or made available to
  24.793 +you through the use of the Software.
  24.794 +11. UPGRADES/DOWNGRADES
  24.795 +11.1 Upgrades. To use a version of the Software identified as an upgrade,
  24.796 +you must first be licensed for the software identified by Microsoft as
  24.797 +eligible for the upgrade. After upgrading, you may no longer use the
  24.798 +software that formed the basis for your upgrade eligibility.
  24.799 +11.2 Downgrades. Instead of installing and using the Software, you may
  24.800 +install and use copies of an earlier version of the Software, provided that
  24.801 +you completely remove such earlier version and install the current version
  24.802 +of the Software within a reasonable time. Your use of such earlier version
  24.803 +shall be governed by this EULA, and your rights to use such earlier version
  24.804 +shall terminate when you install the Software.
  24.805 +12. NOT FOR RESALE SOFTWARE. Software identified as "Not For Resale" or
  24.806 +"NFR," may not be sold or otherwise transfered for value, or used for any
  24.807 +purpose other than demonstration, test or evaluation.
  24.808 +13. ACADEMIC EDITION SOFTWARE. To use Software identified as "Academic
  24.809 +Edition" or "AE," you must be a "Qualified Educational User." For
  24.810 +qualification-related questions, please contact the Microsoft Sales
  24.811 +Information Center/One Microsoft Way/Redmond, WA 98052-6399 or the Microsoft
  24.812 +subsidiary serving your country.
  24.813 +14. EXPORT RESTRICTIONS. You acknowledge that the Software is subject to
  24.814 +U.S. export jurisdiction. You agree to comply with all applicable
  24.815 +international and national laws that apply to the Software, including the
  24.816 +U.S. Export Administration Regulations, as well as end-user, end-use, and
  24.817 +destination restrictions issued by U.S. and other governments. For
  24.818 +additional information see <http://www.microsoft.com/exporting/>.
  24.819 +15. SOFTWARE TRANSFER. The initial user of the Software may make a one-time
  24.820 +permanent transfer of this EULA and Software to another end user, provided
  24.821 +the initial user retains no copies of the Software. This transfer must
  24.822 +include all of the Software (including all component parts, the media and
  24.823 +printed materials, any upgrades this EULA, and, if applicable, the
  24.824 +Certificate of Authenticity). The transfer may not be an indirect transfer,
  24.825 +such as a consignment. Prior to the transfer, the end user receiving the
  24.826 +Software must agree to all the EULA terms.
  24.827 +16. TERMINATION. Without prejudice to any other rights, Microsoft may
  24.828 +terminate this EULA if you fail to comply with the terms and conditions of
  24.829 +this EULA. In such event, you must destroy all copies of the Software and
  24.830 +all of its component parts.
  24.831 +
  24.832 +17. LIMITED WARRANTY FOR SOFTWARE ACQUIRED IN THE US AND CANADA.
  24.833 +Except for the Redistributables, which are provided AS IS, without warranty
  24.834 +of any kind, Microsoft warrants that the Software will perform substantially
  24.835 +in accordance with the accompanying materials for a period of ninety (90)
  24.836 +days from the date of receipt.
  24.837 +If an implied warranty or condition is created by your state/jurisdiction
  24.838 +and federal or state/provincial law prohibits disclaimer of it, you also
  24.839 +have an implied warranty or condition, BUT ONLY AS TO DEFECTS DISCOVERED
  24.840 +DURING THE PERIOD OF THIS LIMITED WARRANTY (NINETY DAYS). AS TO ANY DEFECTS
  24.841 +DISCOVERED AFTER THE NINETYDAY PERIOD, THERE IS NO WARRANTY OR CONDITION OF
  24.842 +ANY KIND. Some states/jurisdictions do not allow limitations on how long an
  24.843 +implied warranty or condition lasts, so the above limitation may not apply
  24.844 +to you.
  24.845 +Any supplements or updates to the Software, including without limitation,
  24.846 +any (if any) service packs or hot fixes provided to you after the expiration
  24.847 +of the ninety day Limited Warranty period are not covered by any warranty or
  24.848 +condition, express, implied or statutory.
  24.849 +LIMITATION ON REMEDIES; NO CONSEQUENTIAL OR OTHER DAMAGES. Your exclusive
  24.850 +remedy for any breach of this Limited Warranty is as set forth below.
  24.851 +Except for any refund elected by Microsoft, YOU ARE NOT ENTITLED TO ANY
  24.852 +DAMAGES, INCLUDING BUT NOT LIMITED TO CONSEQUENTIAL DAMAGES, if the Software
  24.853 +does not meet Microsoft's Limited Warranty, and, to the maximum extent
  24.854 +allowed by applicable law, even if any remedy fails of its essential
  24.855 +purpose. The terms of Section 19 ("Exclusion of Incidental, Consequential
  24.856 +and Certain Other Damages") are also incorporated into this Limited
  24.857 +Warranty. Some states/jurisdictions do not allow the exclusion or limitation
  24.858 +of incidental or consequential damages, so the above limitation or exclusion
  24.859 +may not apply to you. This Limited Warranty gives you specific legal
  24.860 +rights. You may have other rights which vary from state/jurisdiction to
  24.861 +state/jurisdiction. YOUR EXCLUSIVE REMEDY. Microsoft's and its suppliers'
  24.862 +entire liability and your exclusive remedy for any breach of this Limited
  24.863 +Warranty or for any other breach of this EULA or for any other liability
  24.864 +relating to the Software shall be, at Microsoft's option from time to time
  24.865 +exercised subject to applicable law, (a) return of the amount paid (if any)
  24.866 +for the Software, or (b) repair or replacement of the Software, that does
  24.867 +not meet this Limited Warranty and that is returned to Microsoft with a copy
  24.868 +of your receipt. You will receive the remedy elected by Microsoft without
  24.869 +charge, except that you are responsible for any expenses you may incur (e.g.
  24.870 +cost of shipping the Software to Microsoft). This Limited Warranty is void
  24.871 +if failure of the Software has resulted from accident, abuse,
  24.872 +misapplication, abnormal use or a virus. Any replacement Software will be
  24.873 +warranted for the remainder of the original warranty period or thirty (30)
  24.874 +days, whichever is longer, and Microsoft will use commercially reasonable
  24.875 +efforts to provide your remedy within a commercially reasonable time of your
  24.876 +compliance with Microsoft's warranty remedy procedures. Outside the United
  24.877 +States or Canada, neither these remedies nor any product support services
  24.878 +offered by Microsoft are available without proof of purchase from an
  24.879 +authorized international source. To exercise your remedy, contact:
  24.880 +Microsoft, Attn. Microsoft Sales Information Center/One Microsoft
  24.881 +Way/Redmond, WA 98052-6399, or the Microsoft subsidiary serving your
  24.882 +country.
  24.883 +
  24.884 +18. DISCLAIMER OF WARRANTIES. The Limited Warranty that appears above is the
  24.885 +only express warranty made to you and is provided in lieu of any other
  24.886 +express warranties or similar obligations (if any) created by any
  24.887 +advertising, documentation, packaging, or other communications. EXCEPT FOR
  24.888 +THE LIMITED WARRANTY AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
  24.889 +MICROSOFT AND ITS SUPPLIERS PROVIDE THE SOFTWARE AND SUPPORT SERVICES (IF
  24.890 +ANY) AS IS AND WITH ALL FAULTS, AND HEREBY DISCLAIM ALL OTHER WARRANTIES AND
  24.891 +CONDITIONS, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT
  24.892 +LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES, DUTIES OR CONDITIONS OF
  24.893 +MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF RELIABILITY OR
  24.894 +AVAILABILITY, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF
  24.895 +WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE, ALL WITH
  24.896 +REGARD TO THE SOFTWARE, AND THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT
  24.897 +OR OTHER SERVICES, INFORMATION, SOFTWARE, AND RELATED CONTENT THROUGH THE
  24.898 +SOFTWARE OR OTHERWISE ARISING OUT OF THE USE OF THE SOFTWARE. ALSO, THERE
  24.899 +IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION,
  24.900 +CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT WITH REGARD TO THE
  24.901 +SOFTWARE.
  24.902 +19. EXCLUSION OF INCIDENTAL, CONSEQUENTIAL AND CERTAIN OTHER DAMAGES. TO
  24.903 +THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL MICROSOFT
  24.904 +OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, PUNITIVE, INDIRECT,
  24.905 +OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, BUT NOT LIMITED TO, DAMAGES
  24.906 +FOR LOSS OF PROFITS OR CONFIDENTIAL OR OTHER INFORMATION, FOR BUSINESS
  24.907 +INTERRUPTION, FOR PERSONAL INJURY, FOR LOSS OF PRIVACY, FOR FAILURE TO MEET
  24.908 +ANY DUTY INCLUDING OF GOOD FAITH OR OF REASONABLE CARE, FOR NEGLIGENCE, AND
  24.909 +FOR ANY OTHER PECUNIARY OR OTHER LOSS WHATSOEVER) ARISING OUT OF OR IN ANY
  24.910 +WAY RELATED TO THE USE OF OR INABILITY TO USE THE SOFTWARE, THE PROVISION OF
  24.911 +OR FAILURE TO PROVIDE SUPPORT OR OTHER SERVICES, INFORMATION, SOFTWARE, AND
  24.912 +RELATED CONTENT THROUGH THE SOFTWARE OR OTHERWISE ARISING OUT OF THE USE OF
  24.913 +THE SOFTWARE, OR OTHERWISE UNDER OR IN CONNECTION WITH ANY PROVISION OF THIS
  24.914 +EULA, EVEN IN THE EVENT OF THE FAULT, TORT (INCLUDING NEGLIGENCE),
  24.915 +MISREPRESENTATION, STRICT LIABILITY, BREACH OF CONTRACT OR BREACH OF
  24.916 +WARRANTY OF MICROSOFT OR ANY SUPPLIER, AND EVEN IF MICROSOFT OR ANY SUPPLIER
  24.917 +HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  24.918 +20. LIMITATION OF LIABILITY AND REMEDIES. NOTWITHSTANDING ANY DAMAGES THAT
  24.919 +YOU MIGHT INCUR FOR ANY REASON WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
  24.920 +ALL DAMAGES REFERENCED HEREIN AND ALL DIRECT OR GENERAL DAMAGES IN CONTRACT
  24.921 +OR ANYTHING ELSE), THE ENTIRE LIABILITY OF MICROSOFT AND ANY OF ITS
  24.922 +SUPPLIERS UNDER ANY PROVISION OF THIS EULA AND YOUR EXCLUSIVE REMEDY
  24.923 +HEREUNDER (EXCEPT FOR ANY REMEDY OF REPAIR OR REPLACEMENT ELECTED BY
  24.924 +MICROSOFT WITH RESPECT TO ANY BREACH OF THE LIMITED WARRANTY) SHALL BE
  24.925 +LIMITED TO THE GREATER OF THE ACTUAL DAMAGES YOU INCUR IN REASONABLE
  24.926 +RELIANCE ON THE SOFTWARE UP TO THE AMOUNT ACTUALLY PAID BY YOU FOR THE
  24.927 +SOFTWARE OR US$5.00. THE FOREGOING LIMITATIONS, EXCLUSIONS AND DISCLAIMERS
  24.928 +(INCLUDING SECTIONS 17, 18, AND 19) SHALL APPLY TO THE MAXIMUM EXTENT
  24.929 +PERMITTED BY APPLICABLE LAW, EVEN IF ANY REMEDY FAILS ITS ESSENTIAL PURPOSE.
  24.930 +21. U.S. GOVERNMENT LICENSE RIGHTS. All Software provided to the U.S.
  24.931 +Government pursuant to solicitations issued on or after December 1, 1995 is
  24.932 +provided with the commercial license rights and restrictions described
  24.933 +elsewhere herein. All Software provided to the U.S. Government pursuant to
  24.934 +solicitations issued prior to December 1, 1995 is provided with "Restricted
  24.935 +Rights" as provided for in FAR, 48 CFR 52.227-14 (JUNE 1987) or DFAR, 48 CFR
  24.936 +252.227-7013 (OCT 1988), as applicable.
  24.937 +22. APPLICABLE LAW. If you acquired this Software in the United States,
  24.938 +this EULA is governed by the laws of the State of Washington. If you
  24.939 +acquired this Software in Canada, unless expressly prohibited by local law,
  24.940 +this EULA is governed by the laws in force in the Province of Ontario,
  24.941 +Canada; and, in respect of any dispute which may arise hereunder, you consen
  24.942 +t to the jurisdiction of the federal and provincial courts sitting in
  24.943 +Toronto, Ontario. If you acquired this Software in the European Union,
  24.944 +Iceland, Norway, or Switzerland, then local law applies. If you acquired
  24.945 +this Software in any other country, then local law may apply.
  24.946 +23. ENTIRE AGREEMENT; SEVERABILITY. This EULA (including any addendum or
  24.947 +amendment to this EULA which is included with the Software) are the entire
  24.948 +agreement between you and Microsoft relating to the Software and the support
  24.949 +services (if any) and they supersede all prior or contemporaneous oral or
  24.950 +written communications, proposals and representations with respect to the
  24.951 +Software or any other subject matter covered by this EULA. To the extent
  24.952 +the terms of any Microsoft policies or programs for support services
  24.953 +conflict with the terms of this EULA, the terms of this EULA shall control.
  24.954 +If any provision of this EULA is held to be void, invalid, unenforceable or
  24.955 +illegal, the other provisions shall continue in full force and effect.
  24.956 +Si vous avez acquis votre produit Microsoft au CANADA, la garantie limitée
  24.957 +suivante s'applique :
  24.958 +GARANTIE LIMITÉE
  24.959 +Sauf pur celles du "Redistributables," qui sont fournies "comme telles,"
  24.960 +Microsoft garantit que le Logiciel fonctionnera conformément aux documents
  24.961 +inclus pendant une période de 90 jours suivant la date de réception.
  24.962 +Si une garantie ou condition implicite est créée par votre État ou votre
  24.963 +territoire et qu'une loi fédérale ou provinciale ou d'un État en interdit le
  24.964 +déni, vous jouissez également d'une garantie ou condition implicite, MAIS
  24.965 +UNIQUEMENT POUR LES DÉFAUTS DÉCOUVERTS DURANT LA PÉRIODE DE LA PRÉSENTE
  24.966 +GARANTIE LIMITÉE (QUATRE-VINGT-DIX JOURS). IL N'Y A AUCUNE GARANTIE OU
  24.967 +CONDITION DE QUELQUE NATURE QUE CE SOIT QUANT AUX DÉFAUTS DÉCOUVERTS APRES
  24.968 +CETTE PÉRIODE DE QUATRE-VINGT-DIX JOURS. Certains États ou territoires ne
  24.969 +permettent pas de limiter la durée d'une garantie ou condition implicite de
  24.970 +sorte que la limitation ci­dessus peut ne pas s'appliquer a vous.
  24.971 +Tous les suppléments ou toutes les mises a jour relatifs au Logiciel,
  24.972 +notamment, les ensembles de services ou les réparations a chaud (le cas
  24.973 +échéant) qui vous sont fournis apres l'expiration de la période de
  24.974 +quatre-vingt-dix jours de la garantie limitée ne sont pas couverts par
  24.975 +quelque garantie ou condition que ce soit, expresse, implicite ou en vertu
  24.976 +de la loi.
  24.977 +LIMITATION DES RECOURS; ABSENCE DE DOMMAGES INDIRECTS OU AUTRES. Votre
  24.978 +recours exclusif pour toute violation de la présente garantie limitée est
  24.979 +décrit ci­apres. Sauf pour tout remboursement au choix de Microsoft, si le
  24.980 +Logiciel ne respecte pas la garantie limitée de Microsoft et, dans la mesure
  24.981 +maximale permise par les lois applicables, meme si tout recours n'atteint
  24.982 +pas son but essentiel, VOUS N'AVEZ DROIT A AUCUNS DOMMAGES, NOTAMMENT DES
  24.983 +DOMMAGES INDIRECTS. Les termes de la clause «Exclusion des dommages
  24.984 +accessoires, indirects et de certains autres dommages » sont également
  24.985 +intégrées a la présente garantie limitée. Certains États ou territoires ne
  24.986 +permettent pas l'exclusion ou la limitation des dommages indirects ou
  24.987 +accessoires de sorte que la limitation ou l'exclusion ci­dessus peut ne pas
  24.988 +s'appliquer a vous. La présente garantie limitée vous donne des droits
  24.989 +légaux spécifiques. Vous pouvez avoir d'autres droits qui peuvent varier d'
  24.990 +un territoire ou d'un État a un autre. VOTRE RECOURS EXCLUSIF. La seule
  24.991 +responsabilité obligation de Microsoft et de ses fournisseurs et votre
  24.992 +recours exclusif pour toute violation de la présente garantie limitée ou
  24.993 +pour toute autre violation du présent contrat ou pour toute autre
  24.994 +responsabilité relative au Logiciel seront, selon le choix de Microsoft
  24.995 +exercé de temps a autre sous réserve de toute loi applicable, a) le
  24.996 +remboursement du prix payé, le cas échéant, pour le Logiciel ou b) la
  24.997 +réparation ou le remplacement du Logiciel qui ne respecte pas la présente
  24.998 +garantie limitée et qui est retourné a Microsoft avec une copie de votre
  24.999 +reçu. Vous recevrez la compensation choisie par Microsoft, sans frais, sauf
 24.1000 +que vous etes responsable des dépenses que vous pourriez engager (p. ex.,
 24.1001 +les frais d'envoi du Logiciel a Microsoft). La présente garantie limitée est
 24.1002 +nulle si la défectuosité du Logiciel est causée par un accident, un usage
 24.1003 +abusif, une mauvaise application, un usage anormal ou un virus. Tout
 24.1004 +Logiciel de remplacement sera garanti pour le reste de la période initiale
 24.1005 +de la garantie ou pendant trente (30) jours, selon la plus longue entre ces
 24.1006 +deux périodes. A l'extérieur des États-Unis ou du Canada, ces recours ou l'
 24.1007 +un quelconque des services de soutien technique offerts par Microsoft ne
 24.1008 +sont pas disponibles sans preuve d'achat d'une source internationale
 24.1009 +autorisée. Pour exercer votre recours, vous devez communiquer avec Microsoft
 24.1010 +et vous adresser au Microsoft Sales Information Center/One Microsoft
 24.1011 +Way/Redmond, WA 98052-6399, ou a la filiale de Microsoft de votre pays.
 24.1012 +DÉNI DE GARANTIES. La garantie limitée qui apparaît ci-dessus constitue la
 24.1013 +seule garantie expresse qui vous est donnée et remplace toutes autres
 24.1014 +garanties expresses (s'il en est) crées par une publicité, un document, un
 24.1015 +emballage ou une autre communication. SAUF EN CE QUI A TRAIT A LA GARANTIE
 24.1016 +LIMITÉE ET DANS LA MESURE MAXIMALE PERMISE PAR LES LOIS APPLICABLES, LE
 24.1017 +LOGICIEL ET LES SERVICES DE SOUTIEN TECHNIQUE (LE CAS ÉCHÉANT) SONT FOURNIS
 24.1018 +TELS QUELS ET AVEC TOUS LES DÉFAUTS PAR MICROSOFT ET SES FOURNISSEURS,
 24.1019 +LESQUELS PAR LES PRÉSENTES DÉNIENT TOUTES AUTRES GARANTIES ET CONDITIONS
 24.1020 +EXPRESSES, IMPLICITES OU EN VERTU DE LA LOI, NOTAMMENT, MAIS SANS
 24.1021 +LIMITATION, (LE CAS ÉCHÉANT) LES GARANTIES, DEVOIRS OU CONDITIONS IMPLICITES
 24.1022 +DE QUALITÉ MARCHANDE, D'ADAPTATION A UNE FIN PARTICULIERE, DE FIABILITÉ OU
 24.1023 +DE DISPONIBILITÉ, D'EXACTITUDE OU D'EXHAUSTIVITÉ DES RÉPONSES, DES
 24.1024 +RÉSULTATS, DES EFFORTS DÉPLOYÉS SELON LES REGLES DE L'ART, D'ABSENCE DE
 24.1025 +VIRUS ET D'ABSENCE DE NÉGLIGENCE, LE TOUT A L'ÉGARD DU LOGICIEL ET DE LA
 24.1026 +PRESTATION OU DE L'OMISSION DE LA PRESTATION DES SERVICES DE SOUTIEN
 24.1027 +TECHNIQUE OU A L'ÉGARD DE LA FOURNITURE OU DE L'OMISSION DE LA FOURNITURE DE
 24.1028 +TOUS AUTRES SERVICES, RENSEIGNEMENTS, LOGICIELS, ET CONTENU QUI S'Y RAPPORTE
 24.1029 +GRÂCE AU LOGICIEL OU PROVENANT AUTREMENT DE L'UTILISATION DU LOGICIEL . PAR
 24.1030 +AILLEURS, IL N'Y A AUCUNE GARANTIE OU CONDITION QUANT AU TITRE DE PROPRIÉTÉ,
 24.1031 +A LA JOUISSANCE OU LA POSSESSION PAISIBLE, A LA CONCORDANCE A UNE
 24.1032 +DESCRIPTION NI QUANT A UNE ABSENCE DE CONTREFAÇON CONCERNANT LE LOGICIEL.
 24.1033 +EXCLUSION DES DOMMAGES ACCESSOIRES, INDIRECTS ET DE CERTAINS AUTRES
 24.1034 +DOMMAGES. DANS LA MESURE MAXIMALE PERMISE PAR LES LOIS APPLICABLES, EN
 24.1035 +AUCUN CAS MICROSOFT OU SES FOURNISSEURS NE SERONT RESPONSABLES DES DOMMAGES
 24.1036 +SPÉCIAUX, CONSÉCUTIFS, ACCESSOIRES OU INDIRECTS DE QUELQUE NATURE QUE CE
 24.1037 +SOIT (NOTAMMENT, LES DOMMAGES A L'ÉGARD DU MANQUE A GAGNER OU DE LA
 24.1038 +DIVULGATION DE RENSEIGNEMENTS CONFIDENTIELS OU AUTRES, DE LA PERTE D'
 24.1039 +EXPLOITATION, DE BLESSURES CORPORELLES, DE LA VIOLATION DE LA VIE PRIVÉE, DE
 24.1040 +L'OMISSION DE REMPLIR TOUT DEVOIR, Y COMPRIS D'AGIR DE BONNE FOI OU D'
 24.1041 +EXERCER UN SOIN RAISONNABLE, DE LA NÉGLIGENCE ET DE TOUTE AUTRE PERTE
 24.1042 +PÉCUNIAIRE OU AUTRE PERTE DE QUELQUE NATURE QUE CE SOIT) SE RAPPORTANT DE
 24.1043 +QUELQUE MANIERE QUE CE SOIT A L'UTILISATION DU LOGICIEL OU A L'INCAPACITÉ DE
 24.1044 +S'EN SERVIR, A LA PRESTATION OU A L'OMISSION DE LA PRESTATION DE SERVICES DE
 24.1045 +SOUTIEN TECHNIQUE OU A LA FOURNITURE OU A L'OMISSION DE LA FOURNITURE DE
 24.1046 +TOUS AUTRES SERVICES, RENSEIGNEMENTS, LOGICIELS, ET CONTENU QUI S'Y RAPPORTE
 24.1047 +GRÂCE AU LOGICIEL OU PROVENANT AUTREMENT DE L'UTILISATION DU LOGICIEL OU
 24.1048 +AUTREMENT AUX TERMES DE TOUTE DISPOSITION DE LA PRÉSENTE CONVENTION OU
 24.1049 +RELATIVEMENT A UNE TELLE DISPOSITION, MEME EN CAS DE FAUTE, DE DÉLIT CIVIL
 24.1050 +(Y COMPRIS LA NÉGLIGENCE), DE RESPONSABILITÉ STRICTE, DE VIOLATION DE
 24.1051 +CONTRAT OU DE VIOLATION DE GARANTIE DE MICROSOFT OU DE TOUT FOURNISSEUR ET
 24.1052 +MEME SI MICROSOFT OU TOUT FOURNISSEUR A ÉTÉ AVISÉ DE LA POSSIBILITÉ DE TELS
 24.1053 +DOMMAGES.
 24.1054 +LIMITATION DE RESPONSABILITÉ ET RECOURS. MALGRÉ LES DOMMAGES QUE VOUS
 24.1055 +PUISSIEZ SUBIR POUR QUELQUE MOTIF QUE CE SOIT (NOTAMMENT, MAIS SANS
 24.1056 +LIMITATION, TOUS LES DOMMAGES SUSMENTIONNÉS ET TOUS LES DOMMAGES DIRECTS OU
 24.1057 +GÉNÉRAUX OU AUTRES), LA SEULE RESPONSABILITÉ DE MICROSOFT ET DE L'UN OU L'
 24.1058 +AUTRE DE SES FOURNISSEURS AUX TERMES DE TOUTE DISPOSITION DE LA PRÉSENTE
 24.1059 +CONVENTION ET VOTRE RECOURS EXCLUSIF A L'ÉGARD DE TOUT CE QUI PRÉCEDE (SAUF
 24.1060 +EN CE QUI CONCERNE TOUT RECOURS DE RÉPARATION OU DE REMPLACEMENT CHOISI PAR
 24.1061 +MICROSOFT A L'ÉGARD DE TOUT MANQUEMENT A LA GARANTIE LIMITÉE) SE LIMITE AU
 24.1062 +PLUS ÉLEVÉ ENTRE LES MONTANTS SUIVANTS : LE MONTANT QUE VOUS AVEZ RÉELLEMENT
 24.1063 +PAYÉ POUR LE LOGICIEL OU 5,00 $US. LES LIMITES, EXCLUSIONS ET DÉNIS QUI
 24.1064 +PRÉCEDENT (Y COMPRIS LES CLAUSES CI-DESSUS), S'APPLIQUENT DANS LA MESURE
 24.1065 +MAXIMALE PERMISE PAR LES LOIS APPLICABLES, MEME SI TOUT RECOURS N'ATTEINT
 24.1066 +PAS SON BUT ESSENTIEL.
 24.1067 +A moins que cela ne soit prohibé par le droit local applicable, la présente
 24.1068 +Convention est régie par les lois de la province d'Ontario, Canada. Vous
 24.1069 +consentez a la compétence des tribunaux fédéraux et provinciaux siégeant a
 24.1070 +Toronto, dans la province d'Ontario.
 24.1071 +Au cas ou vous auriez des questions concernant cette licence ou que vous
 24.1072 +désiriez vous mettre en rapport avec Microsoft pour quelque raison que ce
 24.1073 +soit, veuillez utiliser l'information contenue dans le Logiciel pour
 24.1074 +contacter la filiale de Microsoft desservant votre pays, ou visitez
 24.1075 +Microsoft sur le World Wide Web a http://www.microsoft.com.
 24.1076 +
 24.1077 +The following MICROSOFT GUARANTEE applies to you if you acquired this
 24.1078 +Software in any other country:
 24.1079 +
 24.1080 +Statutory rights not affected - The following guarantee is not restricted to
 24.1081 +any territory and does not affect any statutory rights that you may have
 24.1082 +from your reseller or from Microsoft if you acquired the Software directly
 24.1083 +from Microsoft. If you acquired the Software or any support services in
 24.1084 +Australia, New Zealand or Malaysia, please see the "Consumer rights" section
 24.1085 +below.
 24.1086 +
 24.1087 +The guarantee - The Software is designed and offered as a general-purpose
 24.1088 +software, not for any user's particular purpose. You accept that no
 24.1089 +Software is error free and you are strongly advised to back-up your files
 24.1090 +regularly. Provided that you have a valid license, Microsoft guarantees
 24.1091 +that a) for a period of 90 days from the date of receipt of your license to
 24.1092 +use the Software or the shortest period permitted by applicable law it will
 24.1093 +perform substantially in accordance with the written materials that
 24.1094 +accompany the Software; and b) any support services provided by Microsoft
 24.1095 +shall be substantially as described in applicable written materials provided
 24.1096 +to you by Microsoft and Microsoft support engineers will use reasonable
 24.1097 +efforts, care and skill to solve any problem issues. In the event that the
 24.1098 +Software fails to comply with this guarantee, Microsoft will either (a)
 24.1099 +repair or replace the Software or (b) return the price you paid. This
 24.1100 +guarantee is void if failure of the Software results from accident, abuse or
 24.1101 +misapplication. Any replacement Software will be guaranteed for the
 24.1102 +remainder of the original guarantee period or 30 days, whichever period is
 24.1103 +longer. You agree that the above guarantee is your sole guarantee in
 24.1104 +relation to the Software and any support services.
 24.1105 +
 24.1106 +Exclusion of All Other Terms - To the maximum extent permitted by applicable
 24.1107 +law and subject to the guarantee above, Microsoft disclaims all warranties,
 24.1108 +conditions and other terms, either express or implied (whether by statute,
 24.1109 +common law, collaterally or otherwise) including but not limited to implied
 24.1110 +warranties of satisfactory quality and fitness for particular purpose with
 24.1111 +respect to the Software and the written materials that accompany the
 24.1112 +Software. Any implied warranties that cannot be excluded are limited to 90
 24.1113 +days or to the shortest period permitted by applicable law, whichever is
 24.1114 +greater.
 24.1115 +
 24.1116 +Limitation of Liability - To the maximum extent permitted by applicable law
 24.1117 +and except as provided in the Microsoft Guarantee, Microsoft and its
 24.1118 +suppliers shall not be liable for any damages whatsoever (including without
 24.1119 +limitation, damages for loss of business profits, business interruption,
 24.1120 +loss of business information or other pecuniary loss) arising out of the use
 24.1121 +or inability to use the Software, even if Microsoft has been advised of the
 24.1122 +possibility of such damages. In any case Microsoft's entire liability under
 24.1123 +any provision of this Agreement shall be limited to the amount actually paid
 24.1124 +by you for the Software. These limitations do not apply to any liabilities
 24.1125 +that cannot be excluded or limited by applicable laws.
 24.1126 +
 24.1127 +Consumer rights - Consumers in Australia, New Zealand or Malaysia may have
 24.1128 +the benefit of certain rights and remedies by reason of the Trade Practices
 24.1129 +Act and similar state and territory laws in Australia, the Consumer
 24.1130 +Guarantees Act in New Zealand and the Consumer Protection Act in Malaysia in
 24.1131 +respect of which liability cannot lawfully be modified or excluded. If you
 24.1132 +acquired the Software in New Zealand for the purposes of a business, you
 24.1133 +confirm that the Consumer Guarantees Act does not apply. If you acquired
 24.1134 +the Software in Australia and if Microsoft breaches a condition or warranty
 24.1135 +implied under any law which cannot lawfully be modified or excluded by this
 24.1136 +agreement then, to the extent permitted by law, Microsoft's liability is
 24.1137 +limited, at Microsoft's option, to: (i) in the case of the Software: a)
 24.1138 +repairing or replacing the Software; or b) the cost of such repair or
 24.1139 +replacement; and (ii) in the case of support services: a) re-supply of the
 24.1140 +services; or b) the cost of having the services supplied again.
 24.1141 +
 24.1142 +Should you have any questions concerning this EULA, or if you desire to
 24.1143 +contact Microsoft for any reason, please use the address information
 24.1144 +enclosed in this Software to contact the Microsoft subsidiary serving your
 24.1145 +country or visit Microsoft on the World Wide Web at
 24.1146 +http://www.microsoft.com.
 24.1147 +
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/core.browser.xulrunner.win/manifest.mf	Thu Nov 22 15:44:15 2012 +0100
    25.3 @@ -0,0 +1,6 @@
    25.4 +Manifest-Version: 1.0
    25.5 +OpenIDE-Module: org.netbeans.core.browser.xulrunner.win/1
    25.6 +OpenIDE-Module-Implementation-Version: 1
    25.7 +OpenIDE-Module-Localizing-Bundle: org/netbeans/core/browser/xulrunner/win/Bundle.properties
    25.8 +AutoUpdate-Show-In-Client: false
    25.9 +OpenIDE-Module-Requires: org.openide.modules.os.Windows
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/core.browser.xulrunner.win/nbproject/project.properties	Thu Nov 22 15:44:15 2012 +0100
    26.3 @@ -0,0 +1,5 @@
    26.4 +is.autoload=true
    26.5 +javac.source=1.6
    26.6 +javac.compilerargs=-Xlint -Xlint:-serial
    26.7 +spec.version.base=1.2.0
    26.8 +extra.module.files=modules/lib/native/win32/
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/core.browser.xulrunner.win/nbproject/project.xml	Thu Nov 22 15:44:15 2012 +0100
    27.3 @@ -0,0 +1,11 @@
    27.4 +<?xml version="1.0" encoding="UTF-8"?>
    27.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
    27.6 +    <type>org.netbeans.modules.apisupport.project</type>
    27.7 +    <configuration>
    27.8 +        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
    27.9 +            <code-name-base>org.netbeans.core.browser.xulrunner.win</code-name-base>
   27.10 +            <module-dependencies/>
   27.11 +            <public-packages/>
   27.12 +        </data>
   27.13 +    </configuration>
   27.14 +</project>
    28.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.2 +++ b/core.browser.xulrunner.win/src/org/netbeans/core/browser/xulrunner/win/Bundle.properties	Thu Nov 22 15:44:15 2012 +0100
    28.3 @@ -0,0 +1,4 @@
    28.4 +OpenIDE-Module-Display-Category=Base IDE
    28.5 +OpenIDE-Module-Long-Description=\
    28.6 +    <html>MS Windows-specific binaries for embedded browser.
    28.7 +OpenIDE-Module-Name=XUL Runner Windows
    29.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.2 +++ b/core.browser.xulrunner/build.xml	Thu Nov 22 15:44:15 2012 +0100
    29.3 @@ -0,0 +1,5 @@
    29.4 +<?xml version="1.0" encoding="UTF-8"?>
    29.5 +<project basedir="." default="netbeans" name="core.browser.xulrunner">
    29.6 +    <description>Builds, tests, and runs the project org.netbeans.core.browser.xulrunner</description>
    29.7 +    <import file="../nbbuild/templates/projectized.xml"/>
    29.8 +</project>
    30.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.2 +++ b/core.browser.xulrunner/external/binaries-list	Thu Nov 22 15:44:15 2012 +0100
    30.3 @@ -0,0 +1,5 @@
    30.4 +1DDC0FB6666D5398397B248EBB16A45D91D4646B base64-2.2.2.jar
    30.5 +1FB4A37064D4CB66E06855167CEEC6258BC65B31 mozdom4java.jar
    30.6 +5C3E01B8DE0041B68BB37ACF920765251BC406BF MozillaGlue-1.9.jar
    30.7 +78E8BC2D5BF3782D5BBF320C30D068E3585BA578 MozillaInterfaces-1.9.jar
    30.8 +3485053373B84611B3F76364240D2EE1E81E382C mozswing.jar
    31.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.2 +++ b/core.browser.xulrunner/external/xulrunner-license.txt	Thu Nov 22 15:44:15 2012 +0100
    31.3 @@ -0,0 +1,1971 @@
    31.4 +Name: MozSwing integration of Mozilla browser.
    31.5 +Version: N/A
    31.6 +Files: mozswing.jar, MozillaInterfaces-1.9.jar, MozillaGlue-1.9.jar, mozdom4java.jar, base64-2.2.2.jar
    31.7 +Description: Integration of embedded browser into NetBeans based on MozSwing.
    31.8 +License: MPL 1.1/GPL 2.0/LGPL 2.1 triple license
    31.9 +Origin: http://sourceforge.net/projects/mozswing/files/
   31.10 +OSR: 12288
   31.11 +
   31.12 +*******************************************************************************
   31.13 +
   31.14 +                          MOZILLA PUBLIC LICENSE
   31.15 +                                Version 1.1
   31.16 +
   31.17 +                              ---------------
   31.18 +
   31.19 +1. Definitions.
   31.20 +
   31.21 +     1.0.1. "Commercial Use" means distribution or otherwise making the
   31.22 +     Covered Code available to a third party.
   31.23 +
   31.24 +     1.1. "Contributor" means each entity that creates or contributes to
   31.25 +     the creation of Modifications.
   31.26 +
   31.27 +     1.2. "Contributor Version" means the combination of the Original
   31.28 +     Code, prior Modifications used by a Contributor, and the Modifications
   31.29 +     made by that particular Contributor.
   31.30 +
   31.31 +     1.3. "Covered Code" means the Original Code or Modifications or the
   31.32 +     combination of the Original Code and Modifications, in each case
   31.33 +     including portions thereof.
   31.34 +
   31.35 +     1.4. "Electronic Distribution Mechanism" means a mechanism generally
   31.36 +     accepted in the software development community for the electronic
   31.37 +     transfer of data.
   31.38 +
   31.39 +     1.5. "Executable" means Covered Code in any form other than Source
   31.40 +     Code.
   31.41 +
   31.42 +     1.6. "Initial Developer" means the individual or entity identified
   31.43 +     as the Initial Developer in the Source Code notice required by Exhibit
   31.44 +     A.
   31.45 +
   31.46 +     1.7. "Larger Work" means a work which combines Covered Code or
   31.47 +     portions thereof with code not governed by the terms of this License.
   31.48 +
   31.49 +     1.8. "License" means this document.
   31.50 +
   31.51 +     1.8.1. "Licensable" means having the right to grant, to the maximum
   31.52 +     extent possible, whether at the time of the initial grant or
   31.53 +     subsequently acquired, any and all of the rights conveyed herein.
   31.54 +
   31.55 +     1.9. "Modifications" means any addition to or deletion from the
   31.56 +     substance or structure of either the Original Code or any previous
   31.57 +     Modifications. When Covered Code is released as a series of files, a
   31.58 +     Modification is:
   31.59 +          A. Any addition to or deletion from the contents of a file
   31.60 +          containing Original Code or previous Modifications.
   31.61 +
   31.62 +          B. Any new file that contains any part of the Original Code or
   31.63 +          previous Modifications.
   31.64 +
   31.65 +     1.10. "Original Code" means Source Code of computer software code
   31.66 +     which is described in the Source Code notice required by Exhibit A as
   31.67 +     Original Code, and which, at the time of its release under this
   31.68 +     License is not already Covered Code governed by this License.
   31.69 +
   31.70 +     1.10.1. "Patent Claims" means any patent claim(s), now owned or
   31.71 +     hereafter acquired, including without limitation,  method, process,
   31.72 +     and apparatus claims, in any patent Licensable by grantor.
   31.73 +
   31.74 +     1.11. "Source Code" means the preferred form of the Covered Code for
   31.75 +     making modifications to it, including all modules it contains, plus
   31.76 +     any associated interface definition files, scripts used to control
   31.77 +     compilation and installation of an Executable, or source code
   31.78 +     differential comparisons against either the Original Code or another
   31.79 +     well known, available Covered Code of the Contributor's choice. The
   31.80 +     Source Code can be in a compressed or archival form, provided the
   31.81 +     appropriate decompression or de-archiving software is widely available
   31.82 +     for no charge.
   31.83 +
   31.84 +     1.12. "You" (or "Your")  means an individual or a legal entity
   31.85 +     exercising rights under, and complying with all of the terms of, this
   31.86 +     License or a future version of this License issued under Section 6.1.
   31.87 +     For legal entities, "You" includes any entity which controls, is
   31.88 +     controlled by, or is under common control with You. For purposes of
   31.89 +     this definition, "control" means (a) the power, direct or indirect,
   31.90 +     to cause the direction or management of such entity, whether by
   31.91 +     contract or otherwise, or (b) ownership of more than fifty percent
   31.92 +     (50%) of the outstanding shares or beneficial ownership of such
   31.93 +     entity.
   31.94 +
   31.95 +2. Source Code License.
   31.96 +
   31.97 +     2.1. The Initial Developer Grant.
   31.98 +     The Initial Developer hereby grants You a world-wide, royalty-free,
   31.99 +     non-exclusive license, subject to third party intellectual property
  31.100 +     claims:
  31.101 +          (a)  under intellectual property rights (other than patent or
  31.102 +          trademark) Licensable by Initial Developer to use, reproduce,
  31.103 +          modify, display, perform, sublicense and distribute the Original
  31.104 +          Code (or portions thereof) with or without Modifications, and/or
  31.105 +          as part of a Larger Work; and
  31.106 +
  31.107 +          (b) under Patents Claims infringed by the making, using or
  31.108 +          selling of Original Code, to make, have made, use, practice,
  31.109 +          sell, and offer for sale, and/or otherwise dispose of the
  31.110 +          Original Code (or portions thereof).
  31.111 +
  31.112 +          (c) the licenses granted in this Section 2.1(a) and (b) are
  31.113 +          effective on the date Initial Developer first distributes
  31.114 +          Original Code under the terms of this License.
  31.115 +
  31.116 +          (d) Notwithstanding Section 2.1(b) above, no patent license is
  31.117 +          granted: 1) for code that You delete from the Original Code; 2)
  31.118 +          separate from the Original Code;  or 3) for infringements caused
  31.119 +          by: i) the modification of the Original Code or ii) the
  31.120 +          combination of the Original Code with other software or devices.
  31.121 +
  31.122 +     2.2. Contributor Grant.
  31.123 +     Subject to third party intellectual property claims, each Contributor
  31.124 +     hereby grants You a world-wide, royalty-free, non-exclusive license
  31.125 +
  31.126 +          (a)  under intellectual property rights (other than patent or
  31.127 +          trademark) Licensable by Contributor, to use, reproduce, modify,
  31.128 +          display, perform, sublicense and distribute the Modifications
  31.129 +          created by such Contributor (or portions thereof) either on an
  31.130 +          unmodified basis, with other Modifications, as Covered Code
  31.131 +          and/or as part of a Larger Work; and
  31.132 +
  31.133 +          (b) under Patent Claims infringed by the making, using, or
  31.134 +          selling of  Modifications made by that Contributor either alone
  31.135 +          and/or in combination with its Contributor Version (or portions
  31.136 +          of such combination), to make, use, sell, offer for sale, have
  31.137 +          made, and/or otherwise dispose of: 1) Modifications made by that
  31.138 +          Contributor (or portions thereof); and 2) the combination of
  31.139 +          Modifications made by that Contributor with its Contributor
  31.140 +          Version (or portions of such combination).
  31.141 +
  31.142 +          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
  31.143 +          effective on the date Contributor first makes Commercial Use of
  31.144 +          the Covered Code.
  31.145 +
  31.146 +          (d)    Notwithstanding Section 2.2(b) above, no patent license is
  31.147 +          granted: 1) for any code that Contributor has deleted from the
  31.148 +          Contributor Version; 2)  separate from the Contributor Version;
  31.149 +          3)  for infringements caused by: i) third party modifications of
  31.150 +          Contributor Version or ii)  the combination of Modifications made
  31.151 +          by that Contributor with other software  (except as part of the
  31.152 +          Contributor Version) or other devices; or 4) under Patent Claims
  31.153 +          infringed by Covered Code in the absence of Modifications made by
  31.154 +          that Contributor.
  31.155 +
  31.156 +3. Distribution Obligations.
  31.157 +
  31.158 +     3.1. Application of License.
  31.159 +     The Modifications which You create or to which You contribute are
  31.160 +     governed by the terms of this License, including without limitation
  31.161 +     Section 2.2. The Source Code version of Covered Code may be
  31.162 +     distributed only under the terms of this License or a future version
  31.163 +     of this License released under Section 6.1, and You must include a
  31.164 +     copy of this License with every copy of the Source Code You
  31.165 +     distribute. You may not offer or impose any terms on any Source Code
  31.166 +     version that alters or restricts the applicable version of this
  31.167 +     License or the recipients' rights hereunder. However, You may include
  31.168 +     an additional document offering the additional rights described in
  31.169 +     Section 3.5.
  31.170 +
  31.171 +     3.2. Availability of Source Code.
  31.172 +     Any Modification which You create or to which You contribute must be
  31.173 +     made available in Source Code form under the terms of this License
  31.174 +     either on the same media as an Executable version or via an accepted
  31.175 +     Electronic Distribution Mechanism to anyone to whom you made an
  31.176 +     Executable version available; and if made available via Electronic
  31.177 +     Distribution Mechanism, must remain available for at least twelve (12)
  31.178 +     months after the date it initially became available, or at least six
  31.179 +     (6) months after a subsequent version of that particular Modification
  31.180 +     has been made available to such recipients. You are responsible for
  31.181 +     ensuring that the Source Code version remains available even if the
  31.182 +     Electronic Distribution Mechanism is maintained by a third party.
  31.183 +
  31.184 +     3.3. Description of Modifications.
  31.185 +     You must cause all Covered Code to which You contribute to contain a
  31.186 +     file documenting the changes You made to create that Covered Code and
  31.187 +     the date of any change. You must include a prominent statement that
  31.188 +     the Modification is derived, directly or indirectly, from Original
  31.189 +     Code provided by the Initial Developer and including the name of the
  31.190 +     Initial Developer in (a) the Source Code, and (b) in any notice in an
  31.191 +     Executable version or related documentation in which You describe the
  31.192 +     origin or ownership of the Covered Code.
  31.193 +
  31.194 +     3.4. Intellectual Property Matters
  31.195 +          (a) Third Party Claims.
  31.196 +          If Contributor has knowledge that a license under a third party's
  31.197 +          intellectual property rights is required to exercise the rights
  31.198 +          granted by such Contributor under Sections 2.1 or 2.2,
  31.199 +          Contributor must include a text file with the Source Code
  31.200 +          distribution titled "LEGAL" which describes the claim and the
  31.201 +          party making the claim in sufficient detail that a recipient will
  31.202 +          know whom to contact. If Contributor obtains such knowledge after
  31.203 +          the Modification is made available as described in Section 3.2,
  31.204 +          Contributor shall promptly modify the LEGAL file in all copies
  31.205 +          Contributor makes available thereafter and shall take other steps
  31.206 +          (such as notifying appropriate mailing lists or newsgroups)
  31.207 +          reasonably calculated to inform those who received the Covered
  31.208 +          Code that new knowledge has been obtained.
  31.209 +
  31.210 +          (b) Contributor APIs.
  31.211 +          If Contributor's Modifications include an application programming
  31.212 +          interface and Contributor has knowledge of patent licenses which
  31.213 +          are reasonably necessary to implement that API, Contributor must
  31.214 +          also include this information in the LEGAL file.
  31.215 +
  31.216 +               (c)    Representations.
  31.217 +          Contributor represents that, except as disclosed pursuant to
  31.218 +          Section 3.4(a) above, Contributor believes that Contributor's
  31.219 +          Modifications are Contributor's original creation(s) and/or
  31.220 +          Contributor has sufficient rights to grant the rights conveyed by
  31.221 +          this License.
  31.222 +
  31.223 +     3.5. Required Notices.
  31.224 +     You must duplicate the notice in Exhibit A in each file of the Source
  31.225 +     Code.  If it is not possible to put such notice in a particular Source
  31.226 +     Code file due to its structure, then You must include such notice in a
  31.227 +     location (such as a relevant directory) where a user would be likely
  31.228 +     to look for such a notice.  If You created one or more Modification(s)
  31.229 +     You may add your name as a Contributor to the notice described in
  31.230 +     Exhibit A.  You must also duplicate this License in any documentation
  31.231 +     for the Source Code where You describe recipients' rights or ownership
  31.232 +     rights relating to Covered Code.  You may choose to offer, and to
  31.233 +     charge a fee for, warranty, support, indemnity or liability
  31.234 +     obligations to one or more recipients of Covered Code. However, You
  31.235 +     may do so only on Your own behalf, and not on behalf of the Initial
  31.236 +     Developer or any Contributor. You must make it absolutely clear than
  31.237 +     any such warranty, support, indemnity or liability obligation is
  31.238 +     offered by You alone, and You hereby agree to indemnify the Initial
  31.239 +     Developer and every Contributor for any liability incurred by the
  31.240 +     Initial Developer or such Contributor as a result of warranty,
  31.241 +     support, indemnity or liability terms You offer.
  31.242 +
  31.243 +     3.6. Distribution of Executable Versions.
  31.244 +     You may distribute Covered Code in Executable form only if the
  31.245 +     requirements of Section 3.1-3.5 have been met for that Covered Code,
  31.246 +     and if You include a notice stating that the Source Code version of
  31.247 +     the Covered Code is available under the terms of this License,
  31.248 +     including a description of how and where You have fulfilled the
  31.249 +     obligations of Section 3.2. The notice must be conspicuously included
  31.250 +     in any notice in an Executable version, related documentation or
  31.251 +     collateral in which You describe recipients' rights relating to the
  31.252 +     Covered Code. You may distribute the Executable version of Covered
  31.253 +     Code or ownership rights under a license of Your choice, which may
  31.254 +     contain terms different from this License, provided that You are in
  31.255 +     compliance with the terms of this License and that the license for the
  31.256 +     Executable version does not attempt to limit or alter the recipient's
  31.257 +     rights in the Source Code version from the rights set forth in this
  31.258 +     License. If You distribute the Executable version under a different
  31.259 +     license You must make it absolutely clear that any terms which differ
  31.260 +     from this License are offered by You alone, not by the Initial
  31.261 +     Developer or any Contributor. You hereby agree to indemnify the
  31.262 +     Initial Developer and every Contributor for any liability incurred by
  31.263 +     the Initial Developer or such Contributor as a result of any such
  31.264 +     terms You offer.
  31.265 +
  31.266 +     3.7. Larger Works.
  31.267 +     You may create a Larger Work by combining Covered Code with other code
  31.268 +     not governed by the terms of this License and distribute the Larger
  31.269 +     Work as a single product. In such a case, You must make sure the
  31.270 +     requirements of this License are fulfilled for the Covered Code.
  31.271 +
  31.272 +4. Inability to Comply Due to Statute or Regulation.
  31.273 +
  31.274 +     If it is impossible for You to comply with any of the terms of this
  31.275 +     License with respect to some or all of the Covered Code due to
  31.276 +     statute, judicial order, or regulation then You must: (a) comply with
  31.277 +     the terms of this License to the maximum extent possible; and (b)
  31.278 +     describe the limitations and the code they affect. Such description
  31.279 +     must be included in the LEGAL file described in Section 3.4 and must
  31.280 +     be included with all distributions of the Source Code. Except to the
  31.281 +     extent prohibited by statute or regulation, such description must be
  31.282 +     sufficiently detailed for a recipient of ordinary skill to be able to
  31.283 +     understand it.
  31.284 +
  31.285 +5. Application of this License.
  31.286 +
  31.287 +     This License applies to code to which the Initial Developer has
  31.288 +     attached the notice in Exhibit A and to related Covered Code.
  31.289 +
  31.290 +6. Versions of the License.
  31.291 +
  31.292 +     6.1. New Versions.
  31.293 +     Netscape Communications Corporation ("Netscape") may publish revised
  31.294 +     and/or new versions of the License from time to time. Each version
  31.295 +     will be given a distinguishing version number.
  31.296 +
  31.297 +     6.2. Effect of New Versions.
  31.298 +     Once Covered Code has been published under a particular version of the
  31.299 +     License, You may always continue to use it under the terms of that
  31.300 +     version. You may also choose to use such Covered Code under the terms
  31.301 +     of any subsequent version of the License published by Netscape. No one
  31.302 +     other than Netscape has the right to modify the terms applicable to
  31.303 +     Covered Code created under this License.
  31.304 +
  31.305 +     6.3. Derivative Works.
  31.306 +     If You create or use a modified version of this License (which you may
  31.307 +     only do in order to apply it to code which is not already Covered Code
  31.308 +     governed by this License), You must (a) rename Your license so that
  31.309 +     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
  31.310 +     "MPL", "NPL" or any confusingly similar phrase do not appear in your
  31.311 +     license (except to note that your license differs from this License)
  31.312 +     and (b) otherwise make it clear that Your version of the license
  31.313 +     contains terms which differ from the Mozilla Public License and
  31.314 +     Netscape Public License. (Filling in the name of the Initial
  31.315 +     Developer, Original Code or Contributor in the notice described in
  31.316 +     Exhibit A shall not of themselves be deemed to be modifications of
  31.317 +     this License.)
  31.318 +
  31.319 +7. DISCLAIMER OF WARRANTY.
  31.320 +
  31.321 +     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
  31.322 +     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
  31.323 +     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
  31.324 +     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
  31.325 +     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
  31.326 +     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
  31.327 +     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
  31.328 +     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
  31.329 +     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
  31.330 +     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
  31.331 +
  31.332 +8. TERMINATION.
  31.333 +
  31.334 +     8.1.  This License and the rights granted hereunder will terminate
  31.335 +     automatically if You fail to comply with terms herein and fail to cure
  31.336 +     such breach within 30 days of becoming aware of the breach. All
  31.337 +     sublicenses to the Covered Code which are properly granted shall
  31.338 +     survive any termination of this License. Provisions which, by their
  31.339 +     nature, must remain in effect beyond the termination of this License
  31.340 +     shall survive.
  31.341 +
  31.342 +     8.2.  If You initiate litigation by asserting a patent infringement
  31.343 +     claim (excluding declatory judgment actions) against Initial Developer
  31.344 +     or a Contributor (the Initial Developer or Contributor against whom
  31.345 +     You file such action is referred to as "Participant")  alleging that:
  31.346 +
  31.347 +     (a)  such Participant's Contributor Version directly or indirectly
  31.348 +     infringes any patent, then any and all rights granted by such
  31.349 +     Participant to You under Sections 2.1 and/or 2.2 of this License
  31.350 +     shall, upon 60 days notice from Participant terminate prospectively,
  31.351 +     unless if within 60 days after receipt of notice You either: (i)
  31.352 +     agree in writing to pay Participant a mutually agreeable reasonable
  31.353 +     royalty for Your past and future use of Modifications made by such
  31.354 +     Participant, or (ii) withdraw Your litigation claim with respect to
  31.355 +     the Contributor Version against such Participant.  If within 60 days
  31.356 +     of notice, a reasonable royalty and payment arrangement are not
  31.357 +     mutually agreed upon in writing by the parties or the litigation claim
  31.358 +     is not withdrawn, the rights granted by Participant to You under
  31.359 +     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
  31.360 +     the 60 day notice period specified above.
  31.361 +
  31.362 +     (b)  any software, hardware, or device, other than such Participant's
  31.363 +     Contributor Version, directly or indirectly infringes any patent, then
  31.364 +     any rights granted to You by such Participant under Sections 2.1(b)
  31.365 +     and 2.2(b) are revoked effective as of the date You first made, used,
  31.366 +     sold, distributed, or had made, Modifications made by that
  31.367 +     Participant.
  31.368 +
  31.369 +     8.3.  If You assert a patent infringement claim against Participant
  31.370 +     alleging that such Participant's Contributor Version directly or
  31.371 +     indirectly infringes any patent where such claim is resolved (such as
  31.372 +     by license or settlement) prior to the initiation of patent
  31.373 +     infringement litigation, then the reasonable value of the licenses
  31.374 +     granted by such Participant under Sections 2.1 or 2.2 shall be taken
  31.375 +     into account in determining the amount or value of any payment or
  31.376 +     license.
  31.377 +
  31.378 +     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
  31.379 +     all end user license agreements (excluding distributors and resellers)
  31.380 +     which have been validly granted by You or any distributor hereunder
  31.381 +     prior to termination shall survive termination.
  31.382 +
  31.383 +9. LIMITATION OF LIABILITY.
  31.384 +
  31.385 +     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
  31.386 +     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
  31.387 +     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
  31.388 +     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
  31.389 +     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
  31.390 +     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
  31.391 +     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
  31.392 +     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
  31.393 +     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
  31.394 +     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
  31.395 +     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
  31.396 +     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
  31.397 +     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
  31.398 +     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
  31.399 +
  31.400 +10. U.S. GOVERNMENT END USERS.
  31.401 +
  31.402 +     The Covered Code is a "commercial item," as that term is defined in
  31.403 +     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
  31.404 +     software" and "commercial computer software documentation," as such
  31.405 +     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
  31.406 +     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
  31.407 +     all U.S. Government End Users acquire Covered Code with only those
  31.408 +     rights set forth herein.
  31.409 +
  31.410 +11. MISCELLANEOUS.
  31.411 +
  31.412 +     This License represents the complete agreement concerning subject
  31.413 +     matter hereof. If any provision of this License is held to be
  31.414 +     unenforceable, such provision shall be reformed only to the extent
  31.415 +     necessary to make it enforceable. This License shall be governed by
  31.416 +     California law provisions (except to the extent applicable law, if
  31.417 +     any, provides otherwise), excluding its conflict-of-law provisions.
  31.418 +     With respect to disputes in which at least one party is a citizen of,
  31.419 +     or an entity chartered or registered to do business in the United
  31.420 +     States of America, any litigation relating to this License shall be
  31.421 +     subject to the jurisdiction of the Federal Courts of the Northern
  31.422 +     District of California, with venue lying in Santa Clara County,
  31.423 +     California, with the losing party responsible for costs, including
  31.424 +     without limitation, court costs and reasonable attorneys' fees and
  31.425 +     expenses. The application of the United Nations Convention on
  31.426 +     Contracts for the International Sale of Goods is expressly excluded.
  31.427 +     Any law or regulation which provides that the language of a contract
  31.428 +     shall be construed against the drafter shall not apply to this
  31.429 +     License.
  31.430 +
  31.431 +12. RESPONSIBILITY FOR CLAIMS.
  31.432 +
  31.433 +     As between Initial Developer and the Contributors, each party is
  31.434 +     responsible for claims and damages arising, directly or indirectly,
  31.435 +     out of its utilization of rights under this License and You agree to
  31.436 +     work with Initial Developer and Contributors to distribute such
  31.437 +     responsibility on an equitable basis. Nothing herein is intended or
  31.438 +     shall be deemed to constitute any admission of liability.
  31.439 +
  31.440 +13. MULTIPLE-LICENSED CODE.
  31.441 +
  31.442 +     Initial Developer may designate portions of the Covered Code as
  31.443 +     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
  31.444 +     Developer permits you to utilize portions of the Covered Code under
  31.445 +     Your choice of the NPL or the alternative licenses, if any, specified
  31.446 +     by the Initial Developer in the file described in Exhibit A.
  31.447 +
  31.448 +EXHIBIT A -Mozilla Public License.
  31.449 +
  31.450 +     ``The contents of this file are subject to the Mozilla Public License
  31.451 +     Version 1.1 (the "License"); you may not use this file except in
  31.452 +     compliance with the License. You may obtain a copy of the License at
  31.453 +     http://www.mozilla.org/MPL/
  31.454 +
  31.455 +     Software distributed under the License is distributed on an "AS IS"
  31.456 +     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  31.457 +     License for the specific language governing rights and limitations
  31.458 +     under the License.
  31.459 +
  31.460 +     The Original Code is ______________________________________.
  31.461 +
  31.462 +     The Initial Developer of the Original Code is ________________________.
  31.463 +     Portions created by ______________________ are Copyright (C) ______
  31.464 +     _______________________. All Rights Reserved.
  31.465 +
  31.466 +     Contributor(s): ______________________________________.
  31.467 +
  31.468 +     Alternatively, the contents of this file may be used under the terms
  31.469 +     of the _____ license (the  "[___] License"), in which case the
  31.470 +     provisions of [______] License are applicable instead of those
  31.471 +     above.  If you wish to allow use of your version of this file only
  31.472 +     under the terms of the [____] License and not to allow others to use
  31.473 +     your version of this file under the MPL, indicate your decision by
  31.474 +     deleting  the provisions above and replace  them with the notice and
  31.475 +     other provisions required by the [___] License.  If you do not delete
  31.476 +     the provisions above, a recipient may use your version of this file
  31.477 +     under either the MPL or the [___] License."
  31.478 +
  31.479 +     [NOTE: The text of this Exhibit A may differ slightly from the text of
  31.480 +     the notices in the Source Code files of the Original Code. You should
  31.481 +     use the text of this Exhibit A rather than the text found in the
  31.482 +     Original Code Source Code for Your Modifications.]
  31.483 +
  31.484 +     ----------------------------------------------------------------------
  31.485 +
  31.486 +     AMENDMENTS
  31.487 +
  31.488 +     The Netscape Public License Version 1.1 ("NPL") consists of the
  31.489 +     Mozilla Public License Version 1.1 with the following Amendments,
  31.490 +     including Exhibit A-Netscape Public License.  Files identified with
  31.491 +     "Exhibit A-Netscape Public License" are governed by the Netscape
  31.492 +     Public License Version 1.1.
  31.493 +
  31.494 +     Additional Terms applicable to the Netscape Public License.
  31.495 +          I. Effect.
  31.496 +          These additional terms described in this Netscape Public
  31.497 +          License -- Amendments shall apply to the Mozilla Communicator
  31.498 +          client code and to all Covered Code under this License.
  31.499 +
  31.500 +          II. "Netscape's Branded Code" means Covered Code that Netscape
  31.501 +          distributes and/or permits others to distribute under one or more
  31.502 +          trademark(s) which are controlled by Netscape but which are not
  31.503 +          licensed for use under this License.
  31.504 +
  31.505 +          III. Netscape and logo.
  31.506 +          This License does not grant any rights to use the trademarks
  31.507 +          "Netscape", the "Netscape N and horizon" logo or the "Netscape
  31.508 +          lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript",
  31.509 +          "Smart Browsing" even if such marks are included in the Original
  31.510 +          Code or Modifications.
  31.511 +
  31.512 +          IV. Inability to Comply Due to Contractual Obligation.
  31.513 +          Prior to licensing the Original Code under this License, Netscape
  31.514 +          has licensed third party code for use in Netscape's Branded Code.
  31.515 +          To the extent that Netscape is limited contractually from making
  31.516 +          such third party code available under this License, Netscape may
  31.517 +          choose to reintegrate such code into Covered Code without being
  31.518 +          required to distribute such code in Source Code form, even if
  31.519 +          such code would otherwise be considered "Modifications" under
  31.520 +          this License.
  31.521 +
  31.522 +          V. Use of Modifications and Covered Code by Initial Developer.
  31.523 +               V.1. In General.
  31.524 +               The obligations of Section 3 apply to Netscape, except to
  31.525 +               the extent specified in this Amendment, Section V.2 and V.3.
  31.526 +
  31.527 +               V.2. Other Products.
  31.528 +               Netscape may include Covered Code in products other than the
  31.529 +               Netscape's Branded Code which are released by Netscape
  31.530 +               during the two (2) years following the release date of the
  31.531 +               Original Code, without such additional products becoming
  31.532 +               subject to the terms of this License, and may license such
  31.533 +               additional products on different terms from those contained
  31.534 +               in this License.
  31.535 +
  31.536 +               V.3. Alternative Licensing.
  31.537 +               Netscape may license the Source Code of Netscape's Branded
  31.538 +               Code, including Modifications incorporated therein, without
  31.539 +               such Netscape Branded Code becoming subject to the terms of
  31.540 +               this License, and may license such Netscape Branded Code on
  31.541 +               different terms from those contained in this License.
  31.542 +
  31.543 +          VI. Litigation.
  31.544 +          Notwithstanding the limitations of Section 11 above, the
  31.545 +          provisions regarding litigation in Section 11(a), (b) and (c) of
  31.546 +          the License shall apply to all disputes relating to this License.
  31.547 +
  31.548 +     EXHIBIT A-Netscape Public License.
  31.549 +
  31.550 +          "The contents of this file are subject to the Netscape Public
  31.551 +          License Version 1.1 (the "License"); you may not use this file
  31.552 +          except in compliance with the License. You may obtain a copy of
  31.553 +          the License at http://www.mozilla.org/NPL/
  31.554 +
  31.555 +          Software distributed under the License is distributed on an "AS
  31.556 +          IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  31.557 +          implied. See the License for the specific language governing
  31.558 +          rights and limitations under the License.
  31.559 +
  31.560 +          The Original Code is Mozilla Communicator client code, released
  31.561 +          March 31, 1998.
  31.562 +
  31.563 +          The Initial Developer of the Original Code is Netscape
  31.564 +          Communications Corporation. Portions created by Netscape are
  31.565 +          Copyright (C) 1998-1999 Netscape Communications Corporation. All
  31.566 +          Rights Reserved.
  31.567 +
  31.568 +          Contributor(s): ______________________________________.
  31.569 +
  31.570 +          Alternatively, the contents of this file may be used under the
  31.571 +          terms of the _____ license (the "[___] License"), in which case
  31.572 +          the provisions of [______] License are applicable  instead of
  31.573 +          those above.  If you wish to allow use of your version of this
  31.574 +          file only under the terms of the [____] License and not to allow
  31.575 +          others to use your version of this file under the NPL, indicate
  31.576 +          your decision by deleting  the provisions above and replace  them
  31.577 +          with the notice and other provisions required by the [___]
  31.578 +          License.  If you do not delete the provisions above, a recipient
  31.579 +          may use your version of this file under either the NPL or the
  31.580 +          [___] License."
  31.581 +
  31.582 +*******************************************************************************
  31.583 +
  31.584 +		    GNU GENERAL PUBLIC LICENSE
  31.585 +		       Version 2, June 1991
  31.586 +
  31.587 + Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  31.588 +               51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  31.589 + Everyone is permitted to copy and distribute verbatim copies
  31.590 + of this license document, but changing it is not allowed.
  31.591 +
  31.592 +			    Preamble
  31.593 +
  31.594 +  The licenses for most software are designed to take away your
  31.595 +freedom to share and change it.  By contrast, the GNU General Public
  31.596 +License is intended to guarantee your freedom to share and change free
  31.597 +software--to make sure the software is free for all its users.  This
  31.598 +General Public License applies to most of the Free Software
  31.599 +Foundation's software and to any other program whose authors commit to
  31.600 +using it.  (Some other Free Software Foundation software is covered by
  31.601 +the GNU Library General Public License instead.)  You can apply it to
  31.602 +your programs, too.
  31.603 +
  31.604 +  When we speak of free software, we are referring to freedom, not
  31.605 +price.  Our General Public Licenses are designed to make sure that you
  31.606 +have the freedom to distribute copies of free software (and charge for
  31.607 +this service if you wish), that you receive source code or can get it
  31.608 +if you want it, that you can change the software or use pieces of it
  31.609 +in new free programs; and that you know you can do these things.
  31.610 +
  31.611 +  To protect your rights, we need to make restrictions that forbid
  31.612 +anyone to deny you these rights or to ask you to surrender the rights.
  31.613 +These restrictions translate to certain responsibilities for you if you
  31.614 +distribute copies of the software, or if you modify it.
  31.615 +
  31.616 +  For example, if you distribute copies of such a program, whether
  31.617 +gratis or for a fee, you must give the recipients all the rights that
  31.618 +you have.  You must make sure that they, too, receive or can get the
  31.619 +source code.  And you must show them these terms so they know their
  31.620 +rights.
  31.621 +
  31.622 +  We protect your rights with two steps: (1) copyright the software, and
  31.623 +(2) offer you this license which gives you legal permission to copy,
  31.624 +distribute and/or modify the software.
  31.625 +
  31.626 +  Also, for each author's protection and ours, we want to make certain
  31.627 +that everyone understands that there is no warranty for this free
  31.628 +software.  If the software is modified by someone else and passed on, we
  31.629 +want its recipients to know that what they have is not the original, so
  31.630 +that any problems introduced by others will not reflect on the original
  31.631 +authors' reputations.
  31.632 +
  31.633 +  Finally, any free program is threatened constantly by software
  31.634 +patents.  We wish to avoid the danger that redistributors of a free
  31.635 +program will individually obtain patent licenses, in effect making the
  31.636 +program proprietary.  To prevent this, we have made it clear that any
  31.637 +patent must be licensed for everyone's free use or not licensed at all.
  31.638 +
  31.639 +  The precise terms and conditions for copying, distribution and
  31.640 +modification follow.
  31.641 +
  31.642 +		    GNU GENERAL PUBLIC LICENSE
  31.643 +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  31.644 +
  31.645 +  0. This License applies to any program or other work which contains
  31.646 +a notice placed by the copyright holder saying it may be distributed
  31.647 +under the terms of this General Public License.  The "Program", below,
  31.648 +refers to any such program or work, and a "work based on the Program"
  31.649 +means either the Program or any derivative work under copyright law:
  31.650 +that is to say, a work containing the Program or a portion of it,
  31.651 +either verbatim or with modifications and/or translated into another
  31.652 +language.  (Hereinafter, translation is included without limitation in
  31.653 +the term "modification".)  Each licensee is addressed as "you".
  31.654 +
  31.655 +Activities other than copying, distribution and modification are not
  31.656 +covered by this License; they are outside its scope.  The act of
  31.657 +running the Program is not restricted, and the output from the Program
  31.658 +is covered only if its contents constitute a work based on the
  31.659 +Program (independent of having been made by running the Program).
  31.660 +Whether that is true depends on what the Program does.
  31.661 +
  31.662 +  1. You may copy and distribute verbatim copies of the Program's
  31.663 +source code as you receive it, in any medium, provided that you
  31.664 +conspicuously and appropriately publish on each copy an appropriate
  31.665 +copyright notice and disclaimer of warranty; keep intact all the
  31.666 +notices that refer to this License and to the absence of any warranty;
  31.667 +and give any other recipients of the Program a copy of this License
  31.668 +along with the Program.
  31.669 +
  31.670 +You may charge a fee for the physical act of transferring a copy, and
  31.671 +you may at your option offer warranty protection in exchange for a fee.
  31.672 +
  31.673 +  2. You may modify your copy or copies of the Program or any portion
  31.674 +of it, thus forming a work based on the Program, and copy and
  31.675 +distribute such modifications or work under the terms of Section 1
  31.676 +above, provided that you also meet all of these conditions:
  31.677 +
  31.678 +    a) You must cause the modified files to carry prominent notices
  31.679 +    stating that you changed the files and the date of any change.
  31.680 +
  31.681 +    b) You must cause any work that you distribute or publish, that in
  31.682 +    whole or in part contains or is derived from the Program or any
  31.683 +    part thereof, to be licensed as a whole at no charge to all third
  31.684 +    parties under the terms of this License.
  31.685 +
  31.686 +    c) If the modified program normally reads commands interactively
  31.687 +    when run, you must cause it, when started running for such
  31.688 +    interactive use in the most ordinary way, to print or display an
  31.689 +    announcement including an appropriate copyright notice and a
  31.690 +    notice that there is no warranty (or else, saying that you provide
  31.691 +    a warranty) and that users may redistribute the program under
  31.692 +    these conditions, and telling the user how to view a copy of this
  31.693 +    License.  (Exception: if the Program itself is interactive but
  31.694 +    does not normally print such an announcement, your work based on
  31.695 +    the Program is not required to print an announcement.)
  31.696 +
  31.697 +These requirements apply to the modified work as a whole.  If
  31.698 +identifiable sections of that work are not derived from the Program,
  31.699 +and can be reasonably considered independent and separate works in
  31.700 +themselves, then this License, and its terms, do not apply to those
  31.701 +sections when you distribute them as separate works.  But when you
  31.702 +distribute the same sections as part of a whole which is a work based
  31.703 +on the Program, the distribution of the whole must be on the terms of
  31.704 +this License, whose permissions for other licensees extend to the
  31.705 +entire whole, and thus to each and every part regardless of who wrote it.
  31.706 +
  31.707 +Thus, it is not the intent of this section to claim rights or contest
  31.708 +your rights to work written entirely by you; rather, the intent is to
  31.709 +exercise the right to control the distribution of derivative or
  31.710 +collective works based on the Program.
  31.711 +
  31.712 +In addition, mere aggregation of another work not based on the Program
  31.713 +with the Program (or with a work based on the Program) on a volume of
  31.714 +a storage or distribution medium does not bring the other work under
  31.715 +the scope of this License.
  31.716 +
  31.717 +  3. You may copy and distribute the Program (or a work based on it,
  31.718 +under Section 2) in object code or executable form under the terms of
  31.719 +Sections 1 and 2 above provided that you also do one of the following:
  31.720 +
  31.721 +    a) Accompany it with the complete corresponding machine-readable
  31.722 +    source code, which must be distributed under the terms of Sections
  31.723 +    1 and 2 above on a medium customarily used for software interchange; or,
  31.724 +
  31.725 +    b) Accompany it with a written offer, valid for at least three
  31.726 +    years, to give any third party, for a charge no more than your
  31.727 +    cost of physically performing source distribution, a complete
  31.728 +    machine-readable copy of the corresponding source code, to be
  31.729 +    distributed under the terms of Sections 1 and 2 above on a medium
  31.730 +    customarily used for software interchange; or,
  31.731 +
  31.732 +    c) Accompany it with the information you received as to the offer
  31.733 +    to distribute corresponding source code.  (This alternative is
  31.734 +    allowed only for noncommercial distribution and only if you
  31.735 +    received the program in object code or executable form with such
  31.736 +    an offer, in accord with Subsection b above.)
  31.737 +
  31.738 +The source code for a work means the preferred form of the work for
  31.739 +making modifications to it.  For an executable work, complete source
  31.740 +code means all the source code for all modules it contains, plus any
  31.741 +associated interface definition files, plus the scripts used to
  31.742 +control compilation and installation of the executable.  However, as a
  31.743 +special exception, the source code distributed need not include
  31.744 +anything that is normally distributed (in either source or binary
  31.745 +form) with the major components (compiler, kernel, and so on) of the
  31.746 +operating system on which the executable runs, unless that component
  31.747 +itself accompanies the executable.
  31.748 +
  31.749 +If distribution of executable or object code is made by offering
  31.750 +access to copy from a designated place, then offering equivalent
  31.751 +access to copy the source code from the same place counts as
  31.752 +distribution of the source code, even though third parties are not
  31.753 +compelled to copy the source along with the object code.
  31.754 +
  31.755 +  4. You may not copy, modify, sublicense, or distribute the Program
  31.756 +except as expressly provided under this License.  Any attempt
  31.757 +otherwise to copy, modify, sublicense or distribute the Program is
  31.758 +void, and will automatically terminate your rights under this License.
  31.759 +However, parties who have received copies, or rights, from you under
  31.760 +this License will not have their licenses terminated so long as such
  31.761 +parties remain in full compliance.
  31.762 +
  31.763 +  5. You are not required to accept this License, since you have not
  31.764 +signed it.  However, nothing else grants you permission to modify or
  31.765 +distribute the Program or its derivative works.  These actions are
  31.766 +prohibited by law if you do not accept this License.  Therefore, by
  31.767 +modifying or distributing the Program (or any work based on the
  31.768 +Program), you indicate your acceptance of this License to do so, and
  31.769 +all its terms and conditions for copying, distributing or modifying
  31.770 +the Program or works based on it.
  31.771 +
  31.772 +  6. Each time you redistribute the Program (or any work based on the
  31.773 +Program), the recipient automatically receives a license from the
  31.774 +original licensor to copy, distribute or modify the Program subject to
  31.775 +these terms and conditions.  You may not impose any further
  31.776 +restrictions on the recipients' exercise of the rights granted herein.
  31.777 +You are not responsible for enforcing compliance by third parties to
  31.778 +this License.
  31.779 +
  31.780 +  7. If, as a consequence of a court judgment or allegation of patent
  31.781 +infringement or for any other reason (not limited to patent issues),
  31.782 +conditions are imposed on you (whether by court order, agreement or
  31.783 +otherwise) that contradict the conditions of this License, they do not
  31.784 +excuse you from the conditions of this License.  If you cannot
  31.785 +distribute so as to satisfy simultaneously your obligations under this
  31.786 +License and any other pertinent obligations, then as a consequence you
  31.787 +may not distribute the Program at all.  For example, if a patent
  31.788 +license would not permit royalty-free redistribution of the Program by
  31.789 +all those who receive copies directly or indirectly through you, then
  31.790 +the only way you could satisfy both it and this License would be to
  31.791 +refrain entirely from distribution of the Program.
  31.792 +
  31.793 +If any portion of this section is held invalid or unenforceable under
  31.794 +any particular circumstance, the balance of the section is intended to
  31.795 +apply and the section as a whole is intended to apply in other
  31.796 +circumstances.
  31.797 +
  31.798 +It is not the purpose of this section to induce you to infringe any
  31.799 +patents or other property right claims or to contest validity of any
  31.800 +such claims; this section has the sole purpose of protecting the
  31.801 +integrity of the free software distribution system, which is
  31.802 +implemented by public license practices.  Many people have made
  31.803 +generous contributions to the wide range of software distributed
  31.804 +through that system in reliance on consistent application of that
  31.805 +system; it is up to the author/donor to decide if he or she is willing
  31.806 +to distribute software through any other system and a licensee cannot
  31.807 +impose that choice.
  31.808 +
  31.809 +This section is intended to make thoroughly clear what is believed to
  31.810 +be a consequence of the rest of this License.
  31.811 +
  31.812 +  8. If the distribution and/or use of the Program is restricted in
  31.813 +certain countries either by patents or by copyrighted interfaces, the
  31.814 +original copyright holder who places the Program under this License
  31.815 +may add an explicit geographical distribution limitation excluding
  31.816 +those countries, so that distribution is permitted only in or among
  31.817 +countries not thus excluded.  In such case, this License incorporates
  31.818 +the limitation as if written in the body of this License.
  31.819 +
  31.820 +  9. The Free Software Foundation may publish revised and/or new versions
  31.821 +of the General Public License from time to time.  Such new versions will
  31.822 +be similar in spirit to the present version, but may differ in detail to
  31.823 +address new problems or concerns.
  31.824 +
  31.825 +Each version is given a distinguishing version number.  If the Program
  31.826 +specifies a version number of this License which applies to it and "any
  31.827 +later version", you have the option of following the terms and conditions
  31.828 +either of that version or of any later version published by the Free
  31.829 +Software Foundation.  If the Program does not specify a version number of
  31.830 +this License, you may choose any version ever published by the Free Software
  31.831 +Foundation.
  31.832 +
  31.833 +  10. If you wish to incorporate parts of the Program into other free
  31.834 +programs whose distribution conditions are different, write to the author
  31.835 +to ask for permission.  For software which is copyrighted by the Free
  31.836 +Software Foundation, write to the Free Software Foundation; we sometimes
  31.837 +make exceptions for this.  Our decision will be guided by the two goals
  31.838 +of preserving the free status of all derivatives of our free software and
  31.839 +of promoting the sharing and reuse of software generally.
  31.840 +
  31.841 +			    NO WARRANTY
  31.842 +
  31.843 +  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  31.844 +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
  31.845 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
  31.846 +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
  31.847 +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  31.848 +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
  31.849 +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  31.850 +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
  31.851 +REPAIR OR CORRECTION.
  31.852 +
  31.853 +  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  31.854 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  31.855 +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  31.856 +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  31.857 +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
  31.858 +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
  31.859 +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  31.860 +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  31.861 +POSSIBILITY OF SUCH DAMAGES.
  31.862 +
  31.863 +		     END OF TERMS AND CONDITIONS
  31.864 +
  31.865 +
  31.866 +	    How to Apply These Terms to Your New Programs
  31.867 +
  31.868 +  If you develop a new program, and you want it to be of the greatest
  31.869 +possible use to the public, the best way to achieve this is to make it
  31.870 +free software which everyone can redistribute and change under these terms.
  31.871 +
  31.872 +  To do so, attach the following notices to the program.  It is safest
  31.873 +to attach them to the start of each source file to most effectively
  31.874 +convey the exclusion of warranty; and each file should have at least
  31.875 +the "copyright" line and a pointer to where the full notice is found.
  31.876 +
  31.877 +    <one line to give the program's name and a brief idea of what it does.>
  31.878 +    Copyright (C) 19yy  <name of author>
  31.879 +
  31.880 +    This program is free software; you can redistribute it and/or modify
  31.881 +    it under the terms of the GNU General Public License as published by
  31.882 +    the Free Software Foundation; either version 2 of the License, or
  31.883 +    (at your option) any later version.
  31.884 +
  31.885 +    This program is distributed in the hope that it will be useful,
  31.886 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
  31.887 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  31.888 +    GNU General Public License for more details.
  31.889 +
  31.890 +    You should have received a copy of the GNU General Public License
  31.891 +    along with this program; if not, write to the Free Software
  31.892 +    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  31.893 +
  31.894 +
  31.895 +Also add information on how to contact you by electronic and paper mail.
  31.896 +
  31.897 +If the program is interactive, make it output a short notice like this
  31.898 +when it starts in an interactive mode:
  31.899 +
  31.900 +    Gnomovision version 69, Copyright (C) 19yy name of author
  31.901 +    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  31.902 +    This is free software, and you are welcome to redistribute it
  31.903 +    under certain conditions; type `show c' for details.
  31.904 +
  31.905 +The hypothetical commands `show w' and `show c' should show the appropriate
  31.906 +parts of the General Public License.  Of course, the commands you use may
  31.907 +be called something other than `show w' and `show c'; they could even be
  31.908 +mouse-clicks or menu items--whatever suits your program.
  31.909 +
  31.910 +You should also get your employer (if you work as a programmer) or your
  31.911 +school, if any, to sign a "copyright disclaimer" for the program, if
  31.912 +necessary.  Here is a sample; alter the names:
  31.913 +
  31.914 +  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  31.915 +  `Gnomovision' (which makes passes at compilers) written by James Hacker.
  31.916 +
  31.917 +  <signature of Ty Coon>, 1 April 1989
  31.918 +  Ty Coon, President of Vice
  31.919 +
  31.920 +This General Public License does not permit incorporating your program into
  31.921 +proprietary programs.  If your program is a subroutine library, you may
  31.922 +consider it more useful to permit linking proprietary applications with the
  31.923 +library.  If this is what you want to do, use the GNU Library General
  31.924 +Public License instead of this License.
  31.925 +
  31.926 +*******************************************************************************
  31.927 +
  31.928 +		  GNU LIBRARY GENERAL PUBLIC LICENSE
  31.929 +		       Version 2, June 1991
  31.930 +
  31.931 + Copyright (C) 1991 Free Software Foundation, Inc.
  31.932 +                    51 Franklin Street, Fifth Floor
  31.933 +                    Boston, MA 02110-1301, USA.
  31.934 + Everyone is permitted to copy and distribute verbatim copies
  31.935 + of this license document, but changing it is not allowed.
  31.936 +
  31.937 +[This is the first released version of the library GPL.  It is
  31.938 + numbered 2 because it goes with version 2 of the ordinary GPL.]
  31.939 +
  31.940 +			    Preamble
  31.941 +
  31.942 +  The licenses for most software are designed to take away your
  31.943 +freedom to share and change it.  By contrast, the GNU General Public
  31.944 +Licenses are intended to guarantee your freedom to share and change
  31.945 +free software--to make sure the software is free for all its users.
  31.946 +
  31.947 +  This license, the Library General Public License, applies to some
  31.948 +specially designated Free Software Foundation software, and to any
  31.949 +other libraries whose authors decide to use it.  You can use it for
  31.950 +your libraries, too.
  31.951 +
  31.952 +  When we speak of free software, we are referring to freedom, not
  31.953 +price.  Our General Public Licenses are designed to make sure that you
  31.954 +have the freedom to distribute copies of free software (and charge for
  31.955 +this service if you wish), that you receive source code or can get it
  31.956 +if you want it, that you can change the software or use pieces of it
  31.957 +in new free programs; and that you know you can do these things.
  31.958 +
  31.959 +  To protect your rights, we need to make restrictions that forbid
  31.960 +anyone to deny you these rights or to ask you to surrender the rights.
  31.961 +These restrictions translate to certain responsibilities for you if
  31.962 +you distribute copies of the library, or if you modify it.
  31.963 +
  31.964 +  For example, if you distribute copies of the library, whether gratis
  31.965 +or for a fee, you must give the recipients all the rights that we gave
  31.966 +you.  You must make sure that they, too, receive or can get the source
  31.967 +code.  If you link a program with the library, you must provide
  31.968 +complete object files to the recipients so that they can relink them
  31.969 +with the library, after making changes to the library and recompiling
  31.970 +it.  And you must show them these terms so they know their rights.
  31.971 +
  31.972 +  Our method of protecting your rights has two steps: (1) copyright
  31.973 +the library, and (2) offer you this license which gives you legal
  31.974 +permission to copy, distribute and/or modify the library.
  31.975 +
  31.976 +  Also, for each distributor's protection, we want to make certain
  31.977 +that everyone understands that there is no warranty for this free
  31.978 +library.  If the library is modified by someone else and passed on, we
  31.979 +want its recipients to know that what they have is not the original
  31.980 +version, so that any problems introduced by others will not reflect on
  31.981 +the original authors' reputations.
  31.982 +
  31.983 +  Finally, any free program is threatened constantly by software
  31.984 +patents.  We wish to avoid the danger that companies distributing free
  31.985 +software will individually obtain patent licenses, thus in effect
  31.986 +transforming the program into proprietary software.  To prevent this,
  31.987 +we have made it clear that any patent must be licensed for everyone's
  31.988 +free use or not licensed at all.
  31.989 +
  31.990 +  Most GNU software, including some libraries, is covered by the ordinary
  31.991 +GNU General Public License, which was designed for utility programs.  This
  31.992 +license, the GNU Library General Public License, applies to certain
  31.993 +designated libraries.  This license is quite different from the ordinary
  31.994 +one; be sure to read it in full, and don't assume that anything in it is
  31.995 +the same as in the ordinary license.
  31.996 +
  31.997 +  The reason we have a separate public license for some libraries is that
  31.998 +they blur the distinction we usually make between modifying or adding to a
  31.999 +program and simply using it.  Linking a program with a library, without
 31.1000 +changing the library, is in some sense simply using the library, and is
 31.1001 +analogous to running a utility program or application program.  However, in
 31.1002 +a textual and legal sense, the linked executable is a combined work, a
 31.1003 +derivative of the original library, and the ordinary General Public License
 31.1004 +treats it as such.
 31.1005 +
 31.1006 +  Because of this blurred distinction, using the ordinary General
 31.1007 +Public License for libraries did not effectively promote software
 31.1008 +sharing, because most developers did not use the libraries.  We
 31.1009 +concluded that weaker conditions might promote sharing better.
 31.1010 +
 31.1011 +  However, unrestricted linking of non-free programs would deprive the
 31.1012 +users of those programs of all benefit from the free status of the
 31.1013 +libraries themselves.  This Library General Public License is intended to
 31.1014 +permit developers of non-free programs to use free libraries, while
 31.1015 +preserving your freedom as a user of such programs to change the free
 31.1016 +libraries that are incorporated in them.  (We have not seen how to achieve
 31.1017 +this as regards changes in header files, but we have achieved it as regards
 31.1018 +changes in the actual functions of the Library.)  The hope is that this
 31.1019 +will lead to faster development of free libraries.
 31.1020 +
 31.1021 +  The precise terms and conditions for copying, distribution and
 31.1022 +modification follow.  Pay close attention to the difference between a
 31.1023 +"work based on the library" and a "work that uses the library".  The
 31.1024 +former contains code derived from the library, while the latter only
 31.1025 +works together with the library.
 31.1026 +
 31.1027 +  Note that it is possible for a library to be covered by the ordinary
 31.1028 +General Public License rather than by this special one.
 31.1029 +
 31.1030 +		  GNU LIBRARY GENERAL PUBLIC LICENSE
 31.1031 +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 31.1032 +
 31.1033 +  0. This License Agreement applies to any software library which
 31.1034 +contains a notice placed by the copyright holder or other authorized
 31.1035 +party saying it may be distributed under the terms of this Library
 31.1036 +General Public License (also called "this License").  Each licensee is
 31.1037 +addressed as "you".
 31.1038 +
 31.1039 +  A "library" means a collection of software functions and/or data
 31.1040 +prepared so as to be conveniently linked with application programs
 31.1041 +(which use some of those functions and data) to form executables.
 31.1042 +
 31.1043 +  The "Library", below, refers to any such software library or work
 31.1044 +which has been distributed under these terms.  A "work based on the
 31.1045 +Library" means either the Library or any derivative work under
 31.1046 +copyright law: that is to say, a work containing the Library or a
 31.1047 +portion of it, either verbatim or with modifications and/or translated
 31.1048 +straightforwardly into another language.  (Hereinafter, translation is
 31.1049 +included without limitation in the term "modification".)
 31.1050 +
 31.1051 +  "Source code" for a work means the preferred form of the work for
 31.1052 +making modifications to it.  For a library, complete source code means
 31.1053 +all the source code for all modules it contains, plus any associated
 31.1054 +interface definition files, plus the scripts used to control compilation
 31.1055 +and installation of the library.
 31.1056 +
 31.1057 +  Activities other than copying, distribution and modification are not
 31.1058 +covered by this License; they are outside its scope.  The act of
 31.1059 +running a program using the Library is not restricted, and output from
 31.1060 +such a program is covered only if its contents constitute a work based
 31.1061 +on the Library (independent of the use of the Library in a tool for
 31.1062 +writing it).  Whether that is true depends on what the Library does
 31.1063 +and what the program that uses the Library does.
 31.1064 +  
 31.1065 +  1. You may copy and distribute verbatim copies of the Library's
 31.1066 +complete source code as you receive it, in any medium, provided that
 31.1067 +you conspicuously and appropriately publish on each copy an
 31.1068 +appropriate copyright notice and disclaimer of warranty; keep intact
 31.1069 +all the notices that refer to this License and to the absence of any
 31.1070 +warranty; and distribute a copy of this License along with the
 31.1071 +Library.
 31.1072 +
 31.1073 +  You may charge a fee for the physical act of transferring a copy,
 31.1074 +and you may at your option offer warranty protection in exchange for a
 31.1075 +fee.
 31.1076 +
 31.1077 +  2. You may modify your copy or copies of the Library or any portion
 31.1078 +of it, thus forming a work based on the Library, and copy and
 31.1079 +distribute such modifications or work under the terms of Section 1
 31.1080 +above, provided that you also meet all of these conditions:
 31.1081 +
 31.1082 +    a) The modified work must itself be a software library.
 31.1083 +
 31.1084 +    b) You must cause the files modified to carry prominent notices
 31.1085 +    stating that you changed the files and the date of any change.
 31.1086 +
 31.1087 +    c) You must cause the whole of the work to be licensed at no
 31.1088 +    charge to all third parties under the terms of this License.
 31.1089 +
 31.1090 +    d) If a facility in the modified Library refers to a function or a
 31.1091 +    table of data to be supplied by an application program that uses
 31.1092 +    the facility, other than as an argument passed when the facility
 31.1093 +    is invoked, then you must make a good faith effort to ensure that,
 31.1094 +    in the event an application does not supply such function or
 31.1095 +    table, the facility still operates, and performs whatever part of
 31.1096 +    its purpose remains meaningful.
 31.1097 +
 31.1098 +    (For example, a function in a library to compute square roots has
 31.1099 +    a purpose that is entirely well-defined independent of the
 31.1100 +    application.  Therefore, Subsection 2d requires that any
 31.1101 +    application-supplied function or table used by this function must
 31.1102 +    be optional: if the application does not supply it, the square
 31.1103 +    root function must still compute square roots.)
 31.1104 +
 31.1105 +These requirements apply to the modified work as a whole.  If
 31.1106 +identifiable sections of that work are not derived from the Library,
 31.1107 +and can be reasonably considered independent and separate works in
 31.1108 +themselves, then this License, and its terms, do not apply to those
 31.1109 +sections when you distribute them as separate works.  But when you
 31.1110 +distribute the same sections as part of a whole which is a work based
 31.1111 +on the Library, the distribution of the whole must be on the terms of
 31.1112 +this License, whose permissions for other licensees extend to the
 31.1113 +entire whole, and thus to each and every part regardless of who wrote
 31.1114 +it.
 31.1115 +
 31.1116 +Thus, it is not the intent of this section to claim rights or contest
 31.1117 +your rights to work written entirely by you; rather, the intent is to
 31.1118 +exercise the right to control the distribution of derivative or
 31.1119 +collective works based on the Library.
 31.1120 +
 31.1121 +In addition, mere aggregation of another work not based on the Library
 31.1122 +with the Library (or with a work based on the Library) on a volume of
 31.1123 +a storage or distribution medium does not bring the other work under
 31.1124 +the scope of this License.
 31.1125 +
 31.1126 +  3. You may opt to apply the terms of the ordinary GNU General Public
 31.1127 +License instead of this License to a given copy of the Library.  To do
 31.1128 +this, you must alter all the notices that refer to this License, so
 31.1129 +that they refer to the ordinary GNU General Public License, version 2,
 31.1130 +instead of to this License.  (If a newer version than version 2 of the
 31.1131 +ordinary GNU General Public License has appeared, then you can specify
 31.1132 +that version instead if you wish.)  Do not make any other change in
 31.1133 +these notices.
 31.1134 +
 31.1135 +  Once this change is made in a given copy, it is irreversible for
 31.1136 +that copy, so the ordinary GNU General Public License applies to all
 31.1137 +subsequent copies and derivative works made from that copy.
 31.1138 +
 31.1139 +  This option is useful when you wish to copy part of the code of
 31.1140 +the Library into a program that is not a library.
 31.1141 +
 31.1142 +  4. You may copy and distribute the Library (or a portion or
 31.1143 +derivative of it, under Section 2) in object code or executable form
 31.1144 +under the terms of Sections 1 and 2 above provided that you accompany
 31.1145 +it with the complete corresponding machine-readable source code, which
 31.1146 +must be distributed under the terms of Sections 1 and 2 above on a
 31.1147 +medium customarily used for software interchange.
 31.1148 +
 31.1149 +  If distribution of object code is made by offering access to copy
 31.1150 +from a designated place, then offering equivalent access to copy the
 31.1151 +source code from the same place satisfies the requirement to
 31.1152 +distribute the source code, even though third parties are not
 31.1153 +compelled to copy the source along with the object code.
 31.1154 +
 31.1155 +  5. A program that contains no derivative of any portion of the
 31.1156 +Library, but is designed to work with the Library by being compiled or
 31.1157 +linked with it, is called a "work that uses the Library".  Such a
 31.1158 +work, in isolation, is not a derivative work of the Library, and
 31.1159 +therefore falls outside the scope of this License.
 31.1160 +
 31.1161 +  However, linking a "work that uses the Library" with the Library
 31.1162 +creates an executable that is a derivative of the Library (because it
 31.1163 +contains portions of the Library), rather than a "work that uses the
 31.1164 +library".  The executable is therefore covered by this License.
 31.1165 +Section 6 states terms for distribution of such executables.
 31.1166 +
 31.1167 +  When a "work that uses the Library" uses material from a header file
 31.1168 +that is part of the Library, the object code for the work may be a
 31.1169 +derivative work of the Library even though the source code is not.
 31.1170 +Whether this is true is especially significant if the work can be
 31.1171 +linked without the Library, or if the work is itself a library.  The
 31.1172 +threshold for this to be true is not precisely defined by law.
 31.1173 +
 31.1174 +  If such an object file uses only numerical parameters, data
 31.1175 +structure layouts and accessors, and small macros and small inline
 31.1176 +functions (ten lines or less in length), then the use of the object
 31.1177 +file is unrestricted, regardless of whether it is legally a derivative
 31.1178 +work.  (Executables containing this object code plus portions of the
 31.1179 +Library will still fall under Section 6.)
 31.1180 +
 31.1181 +  Otherwise, if the work is a derivative of the Library, you may
 31.1182 +distribute the object code for the work under the terms of Section 6.
 31.1183 +Any executables containing that work also fall under Section 6,
 31.1184 +whether or not they are linked directly with the Library itself.
 31.1185 +
 31.1186 +  6. As an exception to the Sections above, you may also compile or
 31.1187 +link a "work that uses the Library" with the Library to produce a
 31.1188 +work containing portions of the Library, and distribute that work
 31.1189 +under terms of your choice, provided that the terms permit
 31.1190 +modification of the work for the customer's own use and reverse
 31.1191 +engineering for debugging such modifications.
 31.1192 +
 31.1193 +  You must give prominent notice with each copy of the work that the
 31.1194 +Library is used in it and that the Library and its use are covered by
 31.1195 +this License.  You must supply a copy of this License.  If the work
 31.1196 +during execution displays copyright notices, you must include the
 31.1197 +copyright notice for the Library among them, as well as a reference
 31.1198 +directing the user to the copy of this License.  Also, you must do one
 31.1199 +of these things:
 31.1200 +
 31.1201 +    a) Accompany the work with the complete corresponding
 31.1202 +    machine-readable source code for the Library including whatever
 31.1203 +    changes were used in the work (which must be distributed under
 31.1204 +    Sections 1 and 2 above); and, if the work is an executable linked
 31.1205 +    with the Library, with the complete machine-readable "work that
 31.1206 +    uses the Library", as object code and/or source code, so that the
 31.1207 +    user can modify the Library and then relink to produce a modified
 31.1208 +    executable containing the modified Library.  (It is understood
 31.1209 +    that the user who changes the contents of definitions files in the
 31.1210 +    Library will not necessarily be able to recompile the application
 31.1211 +    to use the modified definitions.)
 31.1212 +
 31.1213 +    b) Accompany the work with a written offer, valid for at
 31.1214 +    least three years, to give the same user the materials
 31.1215 +    specified in Subsection 6a, above, for a charge no more
 31.1216 +    than the cost of performing this distribution.
 31.1217 +
 31.1218 +    c) If distribution of the work is made by offering access to copy
 31.1219 +    from a designated place, offer equivalent access to copy the above
 31.1220 +    specified materials from the same place.
 31.1221 +
 31.1222 +    d) Verify that the user has already received a copy of these
 31.1223 +    materials or that you have already sent this user a copy.
 31.1224 +
 31.1225 +  For an executable, the required form of the "work that uses the
 31.1226 +Library" must include any data and utility programs needed for
 31.1227 +reproducing the executable from it.  However, as a special exception,
 31.1228 +the source code distributed need not include anything that is normally
 31.1229 +distributed (in either source or binary form) with the major
 31.1230 +components (compiler, kernel, and so on) of the operating system on
 31.1231 +which the executable runs, unless that component itself accompanies
 31.1232 +the executable.
 31.1233 +
 31.1234 +  It may happen that this requirement contradicts the license
 31.1235 +restrictions of other proprietary libraries that do not normally
 31.1236 +accompany the operating system.  Such a contradiction means you cannot
 31.1237 +use both them and the Library together in an executable that you
 31.1238 +distribute.
 31.1239 +
 31.1240 +  7. You may place library facilities that are a work based on the
 31.1241 +Library side-by-side in a single library together with other library
 31.1242 +facilities not covered by this License, and distribute such a combined
 31.1243 +library, provided that the separate distribution of the work based on
 31.1244 +the Library and of the other library facilities is otherwise
 31.1245 +permitted, and provided that you do these two things:
 31.1246 +
 31.1247 +    a) Accompany the combined library with a copy of the same work
 31.1248 +    based on the Library, uncombined with any other library
 31.1249 +    facilities.  This must be distributed under the terms of the
 31.1250 +    Sections above.
 31.1251 +
 31.1252 +    b) Give prominent notice with the combined library of the fact
 31.1253 +    that part of it is a work based on the Library, and explaining
 31.1254 +    where to find the accompanying uncombined form of the same work.
 31.1255 +
 31.1256 +  8. You may not copy, modify, sublicense, link with, or distribute
 31.1257 +the Library except as expressly provided under this License.  Any
 31.1258 +attempt otherwise to copy, modify, sublicense, link with, or
 31.1259 +distribute the Library is void, and will automatically terminate your
 31.1260 +rights under this License.  However, parties who have received copies,
 31.1261 +or rights, from you under this License will not have their licenses
 31.1262 +terminated so long as such parties remain in full compliance.
 31.1263 +
 31.1264 +  9. You are not required to accept this License, since you have not
 31.1265 +signed it.  However, nothing else grants you permission to modify or
 31.1266 +distribute the Library or its derivative works.  These actions are
 31.1267 +prohibited by law if you do not accept this License.  Therefore, by
 31.1268 +modifying or distributing the Library (or any work based on the
 31.1269 +Library), you indicate your acceptance of this License to do so, and
 31.1270 +all its terms and conditions for copying, distributing or modifying
 31.1271 +the Library or works based on it.
 31.1272 +
 31.1273 +  10. Each time you redistribute the Library (or any work based on the
 31.1274 +Library), the recipient automatically receives a license from the
 31.1275 +original licensor to copy, distribute, link with or modify the Library
 31.1276 +subject to these terms and conditions.  You may not impose any further
 31.1277 +restrictions on the recipients' exercise of the rights granted herein.
 31.1278 +You are not responsible for enforcing compliance by third parties to
 31.1279 +this License.
 31.1280 +
 31.1281 +  11. If, as a consequence of a court judgment or allegation of patent
 31.1282 +infringement or for any other reason (not limited to patent issues),
 31.1283 +conditions are imposed on you (whether by court order, agreement or
 31.1284 +otherwise) that contradict the conditions of this License, they do not
 31.1285 +excuse you from the conditions of this License.  If you cannot
 31.1286 +distribute so as to satisfy simultaneously your obligations under this
 31.1287 +License and any other pertinent obligations, then as a consequence you
 31.1288 +may not distribute the Library at all.  For example, if a patent
 31.1289 +license would not permit royalty-free redistribution of the Library by
 31.1290 +all those who receive copies directly or indirectly through you, then
 31.1291 +the only way you could satisfy both it and this License would be to
 31.1292 +refrain entirely from distribution of the Library.
 31.1293 +
 31.1294 +If any portion of this section is held invalid or unenforceable under any
 31.1295 +particular circumstance, the balance of the section is intended to apply,
 31.1296 +and the section as a whole is intended to apply in other circumstances.
 31.1297 +
 31.1298 +It is not the purpose of this section to induce you to infringe any
 31.1299 +patents or other property right claims or to contest validity of any
 31.1300 +such claims; this section has the sole purpose of protecting the
 31.1301 +integrity of the free software distribution system which is
 31.1302 +implemented by public license practices.  Many people have made
 31.1303 +generous contributions to the wide range of software distributed
 31.1304 +through that system in reliance on consistent application of that
 31.1305 +system; it is up to the author/donor to decide if he or she is willing
 31.1306 +to distribute software through any other system and a licensee cannot
 31.1307 +impose that choice.
 31.1308 +
 31.1309 +This section is intended to make thoroughly clear what is believed to
 31.1310 +be a consequence of the rest of this License.
 31.1311 +
 31.1312 +  12. If the distribution and/or use of the Library is restricted in
 31.1313 +certain countries either by patents or by copyrighted interfaces, the
 31.1314 +original copyright holder who places the Library under this License may add
 31.1315 +an explicit geographical distribution limitation excluding those countries,
 31.1316 +so that distribution is permitted only in or among countries not thus
 31.1317 +excluded.  In such case, this License incorporates the limitation as if
 31.1318 +written in the body of this License.
 31.1319 +
 31.1320 +  13. The Free Software Foundation may publish revised and/or new
 31.1321 +versions of the Library General Public License from time to time.
 31.1322 +Such new versions will be similar in spirit to the present version,
 31.1323 +but may differ in detail to address new problems or concerns.
 31.1324 +
 31.1325 +Each version is given a distinguishing version number.  If the Library
 31.1326 +specifies a version number of this License which applies to it and
 31.1327 +"any later version", you have the option of following the terms and
 31.1328 +conditions either of that version or of any later version published by
 31.1329 +the Free Software Foundation.  If the Library does not specify a
 31.1330 +license version number, you may choose any version ever published by
 31.1331 +the Free Software Foundation.
 31.1332 +
 31.1333 +  14. If you wish to incorporate parts of the Library into other free
 31.1334 +programs whose distribution conditions are incompatible with these,
 31.1335 +write to the author to ask for permission.  For software which is
 31.1336 +copyrighted by the Free Software Foundation, write to the Free
 31.1337 +Software Foundation; we sometimes make exceptions for this.  Our
 31.1338 +decision will be guided by the two goals of preserving the free status
 31.1339 +of all derivatives of our free software and of promoting the sharing
 31.1340 +and reuse of software generally.
 31.1341 +
 31.1342 +			    NO WARRANTY
 31.1343 +
 31.1344 +  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
 31.1345 +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
 31.1346 +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
 31.1347 +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
 31.1348 +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
 31.1349 +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 31.1350 +PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
 31.1351 +LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
 31.1352 +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
 31.1353 +
 31.1354 +  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
 31.1355 +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
 31.1356 +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
 31.1357 +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
 31.1358 +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
 31.1359 +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
 31.1360 +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
 31.1361 +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
 31.1362 +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
 31.1363 +DAMAGES.
 31.1364 +
 31.1365 +		     END OF TERMS AND CONDITIONS
 31.1366 +
 31.1367 +           How to Apply These Terms to Your New Libraries
 31.1368 +
 31.1369 +  If you develop a new library, and you want it to be of the greatest
 31.1370 +possible use to the public, we recommend making it free software that
 31.1371 +everyone can redistribute and change.  You can do so by permitting
 31.1372 +redistribution under these terms (or, alternatively, under the terms of the
 31.1373 +ordinary General Public License).
 31.1374 +
 31.1375 +  To apply these terms, attach the following notices to the library.  It is
 31.1376 +safest to attach them to the start of each source file to most effectively
 31.1377 +convey the exclusion of warranty; and each file should have at least the
 31.1378 +"copyright" line and a pointer to where the full notice is found.
 31.1379 +
 31.1380 +    <one line to give the library's name and a brief idea of what it does.>
 31.1381 +    Copyright (C) <year>  <name of author>
 31.1382 +
 31.1383 +    This library is free software; you can redistribute it and/or
 31.1384 +    modify it under the terms of the GNU Lesser General Public
 31.1385 +    License as published by the Free Software Foundation; either
 31.1386 +    version 2 of the License, or (at your option) any later version.
 31.1387 +
 31.1388 +    This library is distributed in the hope that it will be useful,
 31.1389 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
 31.1390 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 31.1391 +    Lesser General Public License for more details.
 31.1392 +
 31.1393 +    You should have received a copy of the GNU Lesser General Public
 31.1394 +    License along with this library; if not, write to the Free Software
 31.1395 +    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 31.1396 +
 31.1397 +Also add information on how to contact you by electronic and paper mail.
 31.1398 +
 31.1399 +You should also get your employer (if you work as a programmer) or your
 31.1400 +school, if any, to sign a "copyright disclaimer" for the library, if
 31.1401 +necessary.  Here is a sample; alter the names:
 31.1402 +
 31.1403 +  Yoyodyne, Inc., hereby disclaims all copyright interest in the
 31.1404 +  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
 31.1405 +
 31.1406 +  <signature of Ty Coon>, 1 April 1990
 31.1407 +  Ty Coon, President of Vice
 31.1408 +
 31.1409 +That's all there is to it!
 31.1410 +
 31.1411 +END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE
 31.1412 +IMPORTANT-READ CAREFULLY: This End-User License Agreement ("EULA") is a
 31.1413 +legal agreement between you (either an individual or a single entity) and
 31.1414 +Microsoft Corporation ("Microsoft") for the Microsoft software that
 31.1415 +accompanies this EULA, which includes computer software and may include
 31.1416 +associated media, printed materials, "online" or electronic documentation,
 31.1417 +and Internet-based services ("Software"). An amendment or addendum to this
 31.1418 +EULA may accompany the Software. YOU AGREE TO BE BOUND BY THE TERMS OF THIS
 31.1419 +EULA BY INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE. IF YOU DO NOT
 31.1420 +AGREE, DO NOT INSTALL, COPY, OR USE THE SOFTWARE; YOU MAY RETURN IT TO YOUR
 31.1421 +PLACE OF PURCHASE (IF APPLICABLE) FOR A FULL REFUND.
 31.1422 +
 31.1423 +MICROSOFT SOFTWARE LICENSE
 31.1424 +1. GRANTS OF LICENSE. Microsoft grants you the rights described in this EULA
 31.1425 +provided that you comply with all terms and conditions of this EULA.
 31.1426 +1.1 General License Grant. Microsoft grants to you as an individual,
 31.1427 +a personal, nonexclusive license to use the Software, and to make and use
 31.1428 +copies of the Software for the purposes of designing, developing, testing,
 31.1429 +and demonstrating your software product(s), provided that you are the only
 31.1430 +individual using the Software.
 31.1431 +If you are an entity, Microsoft grants to you a personal,
 31.1432 +nonexclusive license to use the Software, and to make and use copies of the
 31.1433 +Software, provided that for each individual using the Software within your
 31.1434 +organization, you have acquired a separate and valid license for each such
 31.1435 +individual.
 31.1436 +1.2 Documentation. You may make and use an unlimited number of
 31.1437 +copies of any documentation, provided that such copies shall be used only
 31.1438 +for personal purposes and are not to be republished or distributed (either
 31.1439 +in hard copy or electronic form) beyond your premises.
 31.1440 +1.3 Storage/Network Use. You may also store or install a copy of the
 31.1441 +Software on a storage device, such as a network server, used only to install
 31.1442 +or run the Software on computers used by licensed end users in accordance
 31.1443 +with Section 1.1. A single license for the Software may not be shared or
 31.1444 +used concurrently by multiple end users.
 31.1445 +1.4 Effect of EULA. The Software may contain development tools,
 31.1446 +utilities and other Microsoft software programs (each such tool or software
 31.1447 +program, a "Component"); such Components may include a separate end-user
 31.1448 +license agreement (each, a "Component EULA"). Except as provided in Section
 31.1449 +4 ("Prerelease Code"), in the event of inconsistencies between this EULA and
 31.1450 +any Component EULA, the terms of this EULA shall control. The Software may
 31.1451 +also contain thirdparty software programs. Any such software is provided
 31.1452 +for your use as a convenience and your use is subject to the terms and
 31.1453 +conditions of any license agreement contained in that software.
 31.1454 +2. ADDITIONAL LICENSE RIGHTS -- REDISTRIBUTABLE CODE. In addition to the
 31.1455 +rights granted in Section 1, certain portions of the Software, as described
 31.1456 +in this Section 2, are provided to you with additional license rights.
 31.1457 +These additional license rights are conditioned upon your compliance with
 31.1458 +the distribution requirements and license limitations described in Section
 31.1459 +3.
 31.1460 +2.1 Sample Code. Microsoft grants you a limited, nonexclusive,
 31.1461 +royalty-free license to: (a) use and modify the source code version of those
 31.1462 +portions of the Software identified as "Samples" in REDIST.TXT or elsewhere
 31.1463 +in the Software ("Sample Code") for the sole purposes of designing,
 31.1464 +developing, and testing your software product(s), and (b) reproduce and
 31.1465 +distribute the Sample Code, along with any modifications thereof, in object
 31.1466 +and/or source code form. For applicable redistribution requirements for
 31.1467 +Sample Code, see Section 3.1 below.
 31.1468 +2.2 Redistributable Code-General. Microsoft grants you a limited,
 31.1469 +nonexclusive, royalty-free license to reproduce and distribute the object
 31.1470 +code form of any portion of the Software listed in REDIST.TXT
 31.1471 +("Redistributable Code"). For general redistribution requirements for
 31.1472 +Redistributable Code, see Section 3.1 below.
 31.1473 +2.3 Redistributable Code-Microsoft Merge Modules ("MSM"). Microsoft
 31.1474 +grants you a limited, nonexclusive, royalty-free license to reproduce and
 31.1475 +distribute the content of MSM file(s) listed in REDIST.TXT in the manner
 31.1476 +described in the Software documentation only so long as you redistribute
 31.1477 +such content in its entirety and do not modify such content in any way. For
 31.1478 +all other applicable redistribution requirements for MSM files, see Section
 31.1479 +3.1 below.
 31.1480 +2.4 Redistributable Code-Visual C++: Microsoft Foundation Classes
 31.1481 +(MFC), Active Template Libraries (ATL), and C runtimes (CRTs). If this EULA
 31.1482 +accompanies Visual C++, then in addition to the rights granted in Section 1,
 31.1483 +Microsoft grants you a license to use and modify the source code version of
 31.1484 +those portions of the Software that are identified as MFC, ATL, or CRTs
 31.1485 +(collectively, the "VC Redistributables"), for the sole purposes of
 31.1486 +designing, developing, and testing your software product(s). Provided you
 31.1487 +comply with Section 3.1 and you rename any files created by you that are
 31.1488 +included in the Licensee Software (defined below), Microsoft grants you a
 31.1489 +limited, nonexclusive, royalty-free license to reproduce and distribute the
 31.1490 +object code version of the VC Redistributables, including any modifications
 31.1491 +you make. For purposes of this section, "modifications" shall mean
 31.1492 +enhancements to the functionality of the VC Redistributables. For all other
 31.1493 +applicable redistribution requirements for VC Redistributables, see Section
 31.1494 +3.1 below.
 31.1495 +3. DISTRIBUTION REQUIREMENTS AND OTHER LICENSE RIGHTS AND LIMITATIONS. If
 31.1496 +you choose to exercise your rights under Section 2, any redistribution by
 31.1497 +you is subject to your compliance with Section 3.1; some of the
 31.1498 +Redistributable Code has additional limited use rights described in Section
 31.1499 +3.2.
 31.1500 +3.1 General Distribution Requirements.
 31.1501 +(a) If you choose to redistribute Sample Code, or
 31.1502 +Redistributable Code (collectively, the "Redistributables") as described in
 31.1503 +Section 2, you agree: (i) except as otherwise noted in Section 2.1 (Sample
 31.1504 +Code), to distribute the Redistributables only in object code form and in
 31.1505 +conjunction with and as a part of a software application product developed
 31.1506 +by you that adds significant and primary functionality to the
 31.1507 +Redistributables ("Licensee Software"); (ii) that the Redistributables only
 31.1508 +operate in conjunction with Microsoft Windows platforms; (iii) that if the
 31.1509 +Licensee Software is distributed beyond Licensee's premises or externally
 31.1510 +from Licensee's organization, to distribute the Licensee Software containing
 31.1511 +the Redistributables pursuant to an end user license agreement (which may be
 31.1512 +"break-the-seal", "click-wrap" or signed), with terms no less protective
 31.1513 +than those contained in this EULA; (iv) not to use Microsoft's name, logo,
 31.1514 +or trademarks to market the Licensee Software; (v) to display your own valid
 31.1515 +copyright notice which shall be sufficient to protect Microsoft's copyright
 31.1516 +in the Software; (vi) not to remove or obscure any copyright, trademark or
 31.1517 +patent notices that appear on the Software as delivered to you; (vii) to
 31.1518 +indemnify, hold harmless, and defend Microsoft from and against any claims
 31.1519 +or lawsuits, including attorney's fees, that arise or result from the use or
 31.1520 +distribution of the Licensee Software; (viii) to otherwise comply with the
 31.1521 +terms of this EULA; and (ix) agree that Microsoft reserves all rights not
 31.1522 +expressly granted.
 31.1523 +You also agree not to permit further distribution of the
 31.1524 +Redistributables by your end users except you may permit further
 31.1525 +redistribution of the Redistributables by your distributors to your end-user
 31.1526 +customers if your distributors only distribute the Redistributables in
 31.1527 +conjunction with, and as part of, the Licensee Software, you comply with all
 31.1528 +other terms of this EULA, and your distributors comply with all restrictions
 31.1529 +of this EULA that are applicable to you.
 31.1530 +(b) If you use the Redistributables, then in addition to your
 31.1531 +compliance with the applicable distribution requirements described for the
 31.1532 +Redistributables, the following also applies. Your license rights to the
 31.1533 +Redistributables are conditioned upon your not (i) creating derivative works
 31.1534 +of the Redistributables in any manner that would cause the Redistributables
 31.1535 +in whole or in part to become subject to any of the terms of an Excluded
 31.1536 +License; or (ii) distributing the Redistributables (or derivative works
 31.1537 +thereof) in any manner that would cause the Redistributables to become
 31.1538 +subject to any of the terms of an Excluded License. An "Excluded License"
 31.1539 +is any license that requires as a condition of use, modification and/or
 31.1540 +distribution of software subject to the Excluded License, that such software
 31.1541 +or other software combined and/or distributed with such software be (x)
 31.1542 +disclosed or distributed in source code form; (y) licensed for the purpose
 31.1543 +of making derivative works; or (z) redistributable at no charge.
 31.1544 +3.2 Additional Distribution Requirements for Certain Redistributable
 31.1545 +Code. If you choose to redistribute the files discussed in this Section,
 31.1546 +then in addition to the terms of Section 3.1, you must ALSO comply with the
 31.1547 +following.
 31.1548 +(a) Microsoft SQL Server Desktop Engine ("MSDE"). If you
 31.1549 +redistribute MSDE you agree to comply with the following additional
 31.1550 +requirements: (a) Licensee Software shall not substantially duplicate the
 31.1551 +capabilities of Microsoft Access or, in the reasonable opinion of Microsoft,
 31.1552 +compete with same; and (b) unless Licensee Software requires your customers
 31.1553 +to license Microsoft Access in order to operate, you shall not reproduce or
 31.1554 +use MSDE for commercial distribution in conjunction with a general purpose
 31.1555 +word processing, spreadsheet or database management software product, or an
 31.1556 +integrated work or product suite whose components include a general purpose
 31.1557 +word processing, spreadsheet, or database management software product except
 31.1558 +for the exclusive use of importing data to the various formats supported by
 31.1559 +Microsoft Access. A product that includes limited word processing, spreadsh
 31.1560 +eet or database components along with other components which provide
 31.1561 +significant and primary value, such as an accounting product with limited
 31.1562 +spreadsheet capability, is not considered to be a "general purpose" product.
 31.1563 +(b) Microsoft Data Access Components. If you redistribute the
 31.1564 +Microsoft Data Access Component file identified as MDAC_TYP.EXE, you also
 31.1565 +agree to redistribute such file in object code only in conjunction with and
 31.1566 +as a part of a Licensee Software developed by you with a Microsoft
 31.1567 +development tool product that adds significant and primary functionality to
 31.1568 +MDAC_TYP.EXE.
 31.1569 +3.3 Separation of Components. The Software is licensed as a single
 31.1570 +product. Its component parts may not be separated for use by more than one
 31.1571 +user.
 31.1572 +3.4 Benchmark Testing. The Software may contain the Microsoft .NET
 31.1573 +Framework. You may not disclose the results of any benchmark test of the
 31.1574 +.NET Framework component of the Software to any third party without
 31.1575 +Microsoft's prior written approval.
 31.1576 +4. PRERELEASE CODE. Portions of the Software may be identified as prerelease
 31.1577 +code ("Prerelease Code"). Such Prerelease Code is not at the level of
 31.1578 +performance and compatibility of the final, generally available product
 31.1579 +offering. The Prerelease Code may not operate correctly and may be
 31.1580 +substantially modified prior to first commercial shipment. Microsoft is not
 31.1581 +obligated to make this or any later version of the Prerelease Code
 31.1582 +commercially available. The grant of license to use Prerelease Code expires
 31.1583 +upon availability of a commercial release of the Prerelease Code from
 31.1584 +Microsoft. NOTE: In the event that Prerelease Code contains a separate
 31.1585 +end-user license agreement, the terms and conditions of such end-user
 31.1586 +license agreement shall govern your use of the corresponding Prerelease
 31.1587 +Code.
 31.1588 +5. RESERVATION OF RIGHTS AND OWNERSHIP. Microsoft reserves all rights not
 31.1589 +expressly granted to you in this EULA. The Software is protected by
 31.1590 +copyright and other intellectual property laws and treaties. Microsoft or
 31.1591 +its suppliers own the title, copyright, and other intellectual property
 31.1592 +rights in the Software. The Software is licensed, not sold.
 31.1593 +6. LIMITATIONS ON REVERSE ENGINEERING, DECOMPILATION, AND DISASSEMBLY. You
 31.1594 +may not reverse engineer, decompile, or disassemble the Software, except and
 31.1595 +only to the extent that such activity is expressly permitted by applicable
 31.1596 +law notwithstanding this limitation.
 31.1597 +7. NO RENTAL/COMMERCIAL HOSTING. You may not rent, lease, lend or provide
 31.1598 +commercial hosting services with the Software.
 31.1599 +8. CONSENT TO USE OF DATA. You agree that Microsoft and its affiliates may
 31.1600 +collect and use technical information gathered as part of the product
 31.1601 +support services provided to you, if any, related to the Software.
 31.1602 +Microsoft may use this information solely to improve our products or to
 31.1603 +provide customized services or technologies to you and will not disclose
 31.1604 +this information in a form that personally identifies you.
 31.1605 +9. LINKS TO THIRD PARTY SITES. You may link to third party sites through
 31.1606 +the use of the Software. The third party sites are not under the control of
 31.1607 +Microsoft, and Microsoft is not responsible for the contents of any third
 31.1608 +party sites, any links contained in third party sites, or any changes or
 31.1609 +updates to third party sites. Microsoft is not responsible for webcasting
 31.1610 +or any other form of transmission received from any third party sites.
 31.1611 +Microsoft is providing these links to third party sites to you only as a
 31.1612 +convenience, and the inclusion of any link does not imply an endorsement by
 31.1613 +Microsoft of the third party site.
 31.1614 +10. ADDITIONAL SOFTWARE/SERVICES. This EULA applies to updates,
 31.1615 +supplements, add-on components, or Internet-based services components, of
 31.1616 +the Software that Microsoft may provide to you or make available to you
 31.1617 +after the date you obtain your initial copy of the Software, unless we
 31.1618 +provide other terms along with the update, supplement, add-on component, or
 31.1619 +Internet-based services component. Microsoft reserves the right to
 31.1620 +discontinue any Internet-based services provided to you or made available to
 31.1621 +you through the use of the Software.
 31.1622 +11. UPGRADES/DOWNGRADES
 31.1623 +11.1 Upgrades. To use a version of the Software identified as an upgrade,
 31.1624 +you must first be licensed for the software identified by Microsoft as
 31.1625 +eligible for the upgrade. After upgrading, you may no longer use the
 31.1626 +software that formed the basis for your upgrade eligibility.
 31.1627 +11.2 Downgrades. Instead of installing and using the Software, you may
 31.1628 +install and use copies of an earlier version of the Software, provided that
 31.1629 +you completely remove such earlier version and install the current version
 31.1630 +of the Software within a reasonable time. Your use of such earlier version
 31.1631 +shall be governed by this EULA, and your rights to use such earlier version
 31.1632 +shall terminate when you install the Software.
 31.1633 +12. NOT FOR RESALE SOFTWARE. Software identified as "Not For Resale" or
 31.1634 +"NFR," may not be sold or otherwise transfered for value, or used for any
 31.1635 +purpose other than demonstration, test or evaluation.
 31.1636 +13. ACADEMIC EDITION SOFTWARE. To use Software identified as "Academic
 31.1637 +Edition" or "AE," you must be a "Qualified Educational User." For
 31.1638 +qualification-related questions, please contact the Microsoft Sales
 31.1639 +Information Center/One Microsoft Way/Redmond, WA 98052-6399 or the Microsoft
 31.1640 +subsidiary serving your country.
 31.1641 +14. EXPORT RESTRICTIONS. You acknowledge that the Software is subject to
 31.1642 +U.S. export jurisdiction. You agree to comply with all applicable
 31.1643 +international and national laws that apply to the Software, including the
 31.1644 +U.S. Export Administration Regulations, as well as end-user, end-use, and
 31.1645 +destination restrictions issued by U.S. and other governments. For
 31.1646 +additional information see <http://www.microsoft.com/exporting/>.
 31.1647 +15. SOFTWARE TRANSFER. The initial user of the Software may make a one-time
 31.1648 +permanent transfer of this EULA and Software to another end user, provided
 31.1649 +the initial user retains no copies of the Software. This transfer must
 31.1650 +include all of the Software (including all component parts, the media and
 31.1651 +printed materials, any upgrades this EULA, and, if applicable, the
 31.1652 +Certificate of Authenticity). The transfer may not be an indirect transfer,
 31.1653 +such as a consignment. Prior to the transfer, the end user receiving the
 31.1654 +Software must agree to all the EULA terms.
 31.1655 +16. TERMINATION. Without prejudice to any other rights, Microsoft may
 31.1656 +terminate this EULA if you fail to comply with the terms and conditions of
 31.1657 +this EULA. In such event, you must destroy all copies of the Software and
 31.1658 +all of its component parts.
 31.1659 +
 31.1660 +17. LIMITED WARRANTY FOR SOFTWARE ACQUIRED IN THE US AND CANADA.
 31.1661 +Except for the Redistributables, which are provided AS IS, without warranty
 31.1662 +of any kind, Microsoft warrants that the Software will perform substantially
 31.1663 +in accordance with the accompanying materials for a period of ninety (90)
 31.1664 +days from the date of receipt.
 31.1665 +If an implied warranty or condition is created by your state/jurisdiction
 31.1666 +and federal or state/provincial law prohibits disclaimer of it, you also
 31.1667 +have an implied warranty or condition, BUT ONLY AS TO DEFECTS DISCOVERED
 31.1668 +DURING THE PERIOD OF THIS LIMITED WARRANTY (NINETY DAYS). AS TO ANY DEFECTS
 31.1669 +DISCOVERED AFTER THE NINETYDAY PERIOD, THERE IS NO WARRANTY OR CONDITION OF
 31.1670 +ANY KIND. Some states/jurisdictions do not allow limitations on how long an
 31.1671 +implied warranty or condition lasts, so the above limitation may not apply
 31.1672 +to you.
 31.1673 +Any supplements or updates to the Software, including without limitation,
 31.1674 +any (if any) service packs or hot fixes provided to you after the expiration
 31.1675 +of the ninety day Limited Warranty period are not covered by any warranty or
 31.1676 +condition, express, implied or statutory.
 31.1677 +LIMITATION ON REMEDIES; NO CONSEQUENTIAL OR OTHER DAMAGES. Your exclusive
 31.1678 +remedy for any breach of this Limited Warranty is as set forth below.
 31.1679 +Except for any refund elected by Microsoft, YOU ARE NOT ENTITLED TO ANY
 31.1680 +DAMAGES, INCLUDING BUT NOT LIMITED TO CONSEQUENTIAL DAMAGES, if the Software
 31.1681 +does not meet Microsoft's Limited Warranty, and, to the maximum extent
 31.1682 +allowed by applicable law, even if any remedy fails of its essential
 31.1683 +purpose. The terms of Section 19 ("Exclusion of Incidental, Consequential
 31.1684 +and Certain Other Damages") are also incorporated into this Limited
 31.1685 +Warranty. Some states/jurisdictions do not allow the exclusion or limitation
 31.1686 +of incidental or consequential damages, so the above limitation or exclusion
 31.1687 +may not apply to you. This Limited Warranty gives you specific legal
 31.1688 +rights. You may have other rights which vary from state/jurisdiction to
 31.1689 +state/jurisdiction. YOUR EXCLUSIVE REMEDY. Microsoft's and its suppliers'
 31.1690 +entire liability and your exclusive remedy for any breach of this Limited
 31.1691 +Warranty or for any other breach of this EULA or for any other liability
 31.1692 +relating to the Software shall be, at Microsoft's option from time to time
 31.1693 +exercised subject to applicable law, (a) return of the amount paid (if any)
 31.1694 +for the Software, or (b) repair or replacement of the Software, that does
 31.1695 +not meet this Limited Warranty and that is returned to Microsoft with a copy
 31.1696 +of your receipt. You will receive the remedy elected by Microsoft without
 31.1697 +charge, except that you are responsible for any expenses you may incur (e.g.
 31.1698 +cost of shipping the Software to Microsoft). This Limited Warranty is void
 31.1699 +if failure of the Software has resulted from accident, abuse,
 31.1700 +misapplication, abnormal use or a virus. Any replacement Software will be
 31.1701 +warranted for the remainder of the original warranty period or thirty (30)
 31.1702 +days, whichever is longer, and Microsoft will use commercially reasonable
 31.1703 +efforts to provide your remedy within a commercially reasonable time of your
 31.1704 +compliance with Microsoft's warranty remedy procedures. Outside the United
 31.1705 +States or Canada, neither these remedies nor any product support services
 31.1706 +offered by Microsoft are available without proof of purchase from an
 31.1707 +authorized international source. To exercise your remedy, contact:
 31.1708 +Microsoft, Attn. Microsoft Sales Information Center/One Microsoft
 31.1709 +Way/Redmond, WA 98052-6399, or the Microsoft subsidiary serving your
 31.1710 +country.
 31.1711 +
 31.1712 +18. DISCLAIMER OF WARRANTIES. The Limited Warranty that appears above is the
 31.1713 +only express warranty made to you and is provided in lieu of any other
 31.1714 +express warranties or similar obligations (if any) created by any
 31.1715 +advertising, documentation, packaging, or other communications. EXCEPT FOR
 31.1716 +THE LIMITED WARRANTY AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
 31.1717 +MICROSOFT AND ITS SUPPLIERS PROVIDE THE SOFTWARE AND SUPPORT SERVICES (IF
 31.1718 +ANY) AS IS AND WITH ALL FAULTS, AND HEREBY DISCLAIM ALL OTHER WARRANTIES AND
 31.1719 +CONDITIONS, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT
 31.1720 +LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES, DUTIES OR CONDITIONS OF
 31.1721 +MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF RELIABILITY OR
 31.1722 +AVAILABILITY, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF
 31.1723 +WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE, ALL WITH
 31.1724 +REGARD TO THE SOFTWARE, AND THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT
 31.1725 +OR OTHER SERVICES, INFORMATION, SOFTWARE, AND RELATED CONTENT THROUGH THE
 31.1726 +SOFTWARE OR OTHERWISE ARISING OUT OF THE USE OF THE SOFTWARE. ALSO, THERE
 31.1727 +IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION,
 31.1728 +CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT WITH REGARD TO THE
 31.1729 +SOFTWARE.
 31.1730 +19. EXCLUSION OF INCIDENTAL, CONSEQUENTIAL AND CERTAIN OTHER DAMAGES. TO
 31.1731 +THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL MICROSOFT
 31.1732 +OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, PUNITIVE, INDIRECT,
 31.1733 +OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, BUT NOT LIMITED TO, DAMAGES
 31.1734 +FOR LOSS OF PROFITS OR CONFIDENTIAL OR OTHER INFORMATION, FOR BUSINESS
 31.1735 +INTERRUPTION, FOR PERSONAL INJURY, FOR LOSS OF PRIVACY, FOR FAILURE TO MEET
 31.1736 +ANY DUTY INCLUDING OF GOOD FAITH OR OF REASONABLE CARE, FOR NEGLIGENCE, AND
 31.1737 +FOR ANY OTHER PECUNIARY OR OTHER LOSS WHATSOEVER) ARISING OUT OF OR IN ANY
 31.1738 +WAY RELATED TO THE USE OF OR INABILITY TO USE THE SOFTWARE, THE PROVISION OF
 31.1739 +OR FAILURE TO PROVIDE SUPPORT OR OTHER SERVICES, INFORMATION, SOFTWARE, AND
 31.1740 +RELATED CONTENT THROUGH THE SOFTWARE OR OTHERWISE ARISING OUT OF THE USE OF
 31.1741 +THE SOFTWARE, OR OTHERWISE UNDER OR IN CONNECTION WITH ANY PROVISION OF THIS
 31.1742 +EULA, EVEN IN THE EVENT OF THE FAULT, TORT (INCLUDING NEGLIGENCE),
 31.1743 +MISREPRESENTATION, STRICT LIABILITY, BREACH OF CONTRACT OR BREACH OF
 31.1744 +WARRANTY OF MICROSOFT OR ANY SUPPLIER, AND EVEN IF MICROSOFT OR ANY SUPPLIER
 31.1745 +HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 31.1746 +20. LIMITATION OF LIABILITY AND REMEDIES. NOTWITHSTANDING ANY DAMAGES THAT
 31.1747 +YOU MIGHT INCUR FOR ANY REASON WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
 31.1748 +ALL DAMAGES REFERENCED HEREIN AND ALL DIRECT OR GENERAL DAMAGES IN CONTRACT
 31.1749 +OR ANYTHING ELSE), THE ENTIRE LIABILITY OF MICROSOFT AND ANY OF ITS
 31.1750 +SUPPLIERS UNDER ANY PROVISION OF THIS EULA AND YOUR EXCLUSIVE REMEDY
 31.1751 +HEREUNDER (EXCEPT FOR ANY REMEDY OF REPAIR OR REPLACEMENT ELECTED BY
 31.1752 +MICROSOFT WITH RESPECT TO ANY BREACH OF THE LIMITED WARRANTY) SHALL BE
 31.1753 +LIMITED TO THE GREATER OF THE ACTUAL DAMAGES YOU INCUR IN REASONABLE
 31.1754 +RELIANCE ON THE SOFTWARE UP TO THE AMOUNT ACTUALLY PAID BY YOU FOR THE
 31.1755 +SOFTWARE OR US$5.00. THE FOREGOING LIMITATIONS, EXCLUSIONS AND DISCLAIMERS
 31.1756 +(INCLUDING SECTIONS 17, 18, AND 19) SHALL APPLY TO THE MAXIMUM EXTENT
 31.1757 +PERMITTED BY APPLICABLE LAW, EVEN IF ANY REMEDY FAILS ITS ESSENTIAL PURPOSE.
 31.1758 +21. U.S. GOVERNMENT LICENSE RIGHTS. All Software provided to the U.S.
 31.1759 +Government pursuant to solicitations issued on or after December 1, 1995 is
 31.1760 +provided with the commercial license rights and restrictions described
 31.1761 +elsewhere herein. All Software provided to the U.S. Government pursuant to
 31.1762 +solicitations issued prior to December 1, 1995 is provided with "Restricted
 31.1763 +Rights" as provided for in FAR, 48 CFR 52.227-14 (JUNE 1987) or DFAR, 48 CFR
 31.1764 +252.227-7013 (OCT 1988), as applicable.
 31.1765 +22. APPLICABLE LAW. If you acquired this Software in the United States,
 31.1766 +this EULA is governed by the laws of the State of Washington. If you
 31.1767 +acquired this Software in Canada, unless expressly prohibited by local law,
 31.1768 +this EULA is governed by the laws in force in the Province of Ontario,
 31.1769 +Canada; and, in respect of any dispute which may arise hereunder, you consen
 31.1770 +t to the jurisdiction of the federal and provincial courts sitting in
 31.1771 +Toronto, Ontario. If you acquired this Software in the European Union,
 31.1772 +Iceland, Norway, or Switzerland, then local law applies. If you acquired
 31.1773 +this Software in any other country, then local law may apply.
 31.1774 +23. ENTIRE AGREEMENT; SEVERABILITY. This EULA (including any addendum or
 31.1775 +amendment to this EULA which is included with the Software) are the entire
 31.1776 +agreement between you and Microsoft relating to the Software and the support
 31.1777 +services (if any) and they supersede all prior or contemporaneous oral or
 31.1778 +written communications, proposals and representations with respect to the
 31.1779 +Software or any other subject matter covered by this EULA. To the extent
 31.1780 +the terms of any Microsoft policies or programs for support services
 31.1781 +conflict with the terms of this EULA, the terms of this EULA shall control.
 31.1782 +If any provision of this EULA is held to be void, invalid, unenforceable or
 31.1783 +illegal, the other provisions shall continue in full force and effect.
 31.1784 +Si vous avez acquis votre produit Microsoft au CANADA, la garantie limitée
 31.1785 +suivante s'applique :
 31.1786 +GARANTIE LIMITÉE
 31.1787 +Sauf pur celles du "Redistributables," qui sont fournies "comme telles,"
 31.1788 +Microsoft garantit que le Logiciel fonctionnera conformément aux documents
 31.1789 +inclus pendant une période de 90 jours suivant la date de réception.
 31.1790 +Si une garantie ou condition implicite est créée par votre État ou votre
 31.1791 +territoire et qu'une loi fédérale ou provinciale ou d'un État en interdit le
 31.1792 +déni, vous jouissez également d'une garantie ou condition implicite, MAIS
 31.1793 +UNIQUEMENT POUR LES DÉFAUTS DÉCOUVERTS DURANT LA PÉRIODE DE LA PRÉSENTE
 31.1794 +GARANTIE LIMITÉE (QUATRE-VINGT-DIX JOURS). IL N'Y A AUCUNE GARANTIE OU
 31.1795 +CONDITION DE QUELQUE NATURE QUE CE SOIT QUANT AUX DÉFAUTS DÉCOUVERTS APRES
 31.1796 +CETTE PÉRIODE DE QUATRE-VINGT-DIX JOURS. Certains États ou territoires ne
 31.1797 +permettent pas de limiter la durée d'une garantie ou condition implicite de
 31.1798 +sorte que la limitation ci­dessus peut ne pas s'appliquer a vous.
 31.1799 +Tous les suppléments ou toutes les mises a jour relatifs au Logiciel,
 31.1800 +notamment, les ensembles de services ou les réparations a chaud (le cas
 31.1801 +échéant) qui vous sont fournis apres l'expiration de la période de
 31.1802 +quatre-vingt-dix jours de la garantie limitée ne sont pas couverts par
 31.1803 +quelque garantie ou condition que ce soit, expresse, implicite ou en vertu
 31.1804 +de la loi.
 31.1805 +LIMITATION DES RECOURS; ABSENCE DE DOMMAGES INDIRECTS OU AUTRES. Votre
 31.1806 +recours exclusif pour toute violation de la présente garantie limitée est
 31.1807 +décrit ci­apres. Sauf pour tout remboursement au choix de Microsoft, si le
 31.1808 +Logiciel ne respecte pas la garantie limitée de Microsoft et, dans la mesure
 31.1809 +maximale permise par les lois applicables, meme si tout recours n'atteint
 31.1810 +pas son but essentiel, VOUS N'AVEZ DROIT A AUCUNS DOMMAGES, NOTAMMENT DES
 31.1811 +DOMMAGES INDIRECTS. Les termes de la clause «Exclusion des dommages
 31.1812 +accessoires, indirects et de certains autres dommages » sont également
 31.1813 +intégrées a la présente garantie limitée. Certains États ou territoires ne
 31.1814 +permettent pas l'exclusion ou la limitation des dommages indirects ou
 31.1815 +accessoires de sorte que la limitation ou l'exclusion ci­dessus peut ne pas
 31.1816 +s'appliquer a vous. La présente garantie limitée vous donne des droits
 31.1817 +légaux spécifiques. Vous pouvez avoir d'autres droits qui peuvent varier d'
 31.1818 +un territoire ou d'un État a un autre. VOTRE RECOURS EXCLUSIF. La seule
 31.1819 +responsabilité obligation de Microsoft et de ses fournisseurs et votre
 31.1820 +recours exclusif pour toute violation de la présente garantie limitée ou
 31.1821 +pour toute autre violation du présent contrat ou pour toute autre
 31.1822 +responsabilité relative au Logiciel seront, selon le choix de Microsoft
 31.1823 +exercé de temps a autre sous réserve de toute loi applicable, a) le
 31.1824 +remboursement du prix payé, le cas échéant, pour le Logiciel ou b) la
 31.1825 +réparation ou le remplacement du Logiciel qui ne respecte pas la présente
 31.1826 +garantie limitée et qui est retourné a Microsoft avec une copie de votre
 31.1827 +reçu. Vous recevrez la compensation choisie par Microsoft, sans frais, sauf
 31.1828 +que vous etes responsable des dépenses que vous pourriez engager (p. ex.,
 31.1829 +les frais d'envoi du Logiciel a Microsoft). La présente garantie limitée est
 31.1830 +nulle si la défectuosité du Logiciel est causée par un accident, un usage
 31.1831 +abusif, une mauvaise application, un usage anormal ou un virus. Tout
 31.1832 +Logiciel de remplacement sera garanti pour le reste de la période initiale
 31.1833 +de la garantie ou pendant trente (30) jours, selon la plus longue entre ces
 31.1834 +deux périodes. A l'extérieur des États-Unis ou du Canada, ces recours ou l'
 31.1835 +un quelconque des services de soutien technique offerts par Microsoft ne
 31.1836 +sont pas disponibles sans preuve d'achat d'une source internationale
 31.1837 +autorisée. Pour exercer votre recours, vous devez communiquer avec Microsoft
 31.1838 +et vous adresser au Microsoft Sales Information Center/One Microsoft
 31.1839 +Way/Redmond, WA 98052-6399, ou a la filiale de Microsoft de votre pays.
 31.1840 +DÉNI DE GARANTIES. La garantie limitée qui apparaît ci-dessus constitue la
 31.1841 +seule garantie expresse qui vous est donnée et remplace toutes autres
 31.1842 +garanties expresses (s'il en est) crées par une publicité, un document, un
 31.1843 +emballage ou une autre communication. SAUF EN CE QUI A TRAIT A LA GARANTIE
 31.1844 +LIMITÉE ET DANS LA MESURE MAXIMALE PERMISE PAR LES LOIS APPLICABLES, LE
 31.1845 +LOGICIEL ET LES SERVICES DE SOUTIEN TECHNIQUE (LE CAS ÉCHÉANT) SONT FOURNIS
 31.1846 +TELS QUELS ET AVEC TOUS LES DÉFAUTS PAR MICROSOFT ET SES FOURNISSEURS,
 31.1847 +LESQUELS PAR LES PRÉSENTES DÉNIENT TOUTES AUTRES GARANTIES ET CONDITIONS
 31.1848 +EXPRESSES, IMPLICITES OU EN VERTU DE LA LOI, NOTAMMENT, MAIS SANS
 31.1849 +LIMITATION, (LE CAS ÉCHÉANT) LES GARANTIES, DEVOIRS OU CONDITIONS IMPLICITES
 31.1850 +DE QUALITÉ MARCHANDE, D'ADAPTATION A UNE FIN PARTICULIERE, DE FIABILITÉ OU
 31.1851 +DE DISPONIBILITÉ, D'EXACTITUDE OU D'EXHAUSTIVITÉ DES RÉPONSES, DES
 31.1852 +RÉSULTATS, DES EFFORTS DÉPLOYÉS SELON LES REGLES DE L'ART, D'ABSENCE DE
 31.1853 +VIRUS ET D'ABSENCE DE NÉGLIGENCE, LE TOUT A L'ÉGARD DU LOGICIEL ET DE LA
 31.1854 +PRESTATION OU DE L'OMISSION DE LA PRESTATION DES SERVICES DE SOUTIEN
 31.1855 +TECHNIQUE OU A L'ÉGARD DE LA FOURNITURE OU DE L'OMISSION DE LA FOURNITURE DE
 31.1856 +TOUS AUTRES SERVICES, RENSEIGNEMENTS, LOGICIELS, ET CONTENU QUI S'Y RAPPORTE
 31.1857 +GRÂCE AU LOGICIEL OU PROVENANT AUTREMENT DE L'UTILISATION DU LOGICIEL . PAR
 31.1858 +AILLEURS, IL N'Y A AUCUNE GARANTIE OU CONDITION QUANT AU TITRE DE PROPRIÉTÉ,
 31.1859 +A LA JOUISSANCE OU LA POSSESSION PAISIBLE, A LA CONCORDANCE A UNE
 31.1860 +DESCRIPTION NI QUANT A UNE ABSENCE DE CONTREFAÇON CONCERNANT LE LOGICIEL.
 31.1861 +EXCLUSION DES DOMMAGES ACCESSOIRES, INDIRECTS ET DE CERTAINS AUTRES
 31.1862 +DOMMAGES. DANS LA MESURE MAXIMALE PERMISE PAR LES LOIS APPLICABLES, EN
 31.1863 +AUCUN CAS MICROSOFT OU SES FOURNISSEURS NE SERONT RESPONSABLES DES DOMMAGES
 31.1864 +SPÉCIAUX, CONSÉCUTIFS, ACCESSOIRES OU INDIRECTS DE QUELQUE NATURE QUE CE
 31.1865 +SOIT (NOTAMMENT, LES DOMMAGES A L'ÉGARD DU MANQUE A GAGNER OU DE LA
 31.1866 +DIVULGATION DE RENSEIGNEMENTS CONFIDENTIELS OU AUTRES, DE LA PERTE D'
 31.1867 +EXPLOITATION, DE BLESSURES CORPORELLES, DE LA VIOLATION DE LA VIE PRIVÉE, DE
 31.1868 +L'OMISSION DE REMPLIR TOUT DEVOIR, Y COMPRIS D'AGIR DE BONNE FOI OU D'
 31.1869 +EXERCER UN SOIN RAISONNABLE, DE LA NÉGLIGENCE ET DE TOUTE AUTRE PERTE
 31.1870 +PÉCUNIAIRE OU AUTRE PERTE DE QUELQUE NATURE QUE CE SOIT) SE RAPPORTANT DE
 31.1871 +QUELQUE MANIERE QUE CE SOIT A L'UTILISATION DU LOGICIEL OU A L'INCAPACITÉ DE
 31.1872 +S'EN SERVIR, A LA PRESTATION OU A L'OMISSION DE LA PRESTATION DE SERVICES DE
 31.1873 +SOUTIEN TECHNIQUE OU A LA FOURNITURE OU A L'OMISSION DE LA FOURNITURE DE
 31.1874 +TOUS AUTRES SERVICES, RENSEIGNEMENTS, LOGICIELS, ET CONTENU QUI S'Y RAPPORTE
 31.1875 +GRÂCE AU LOGICIEL OU PROVENANT AUTREMENT DE L'UTILISATION DU LOGICIEL OU
 31.1876 +AUTREMENT AUX TERMES DE TOUTE DISPOSITION DE LA PRÉSENTE CONVENTION OU
 31.1877 +RELATIVEMENT A UNE TELLE DISPOSITION, MEME EN CAS DE FAUTE, DE DÉLIT CIVIL
 31.1878 +(Y COMPRIS LA NÉGLIGENCE), DE RESPONSABILITÉ STRICTE, DE VIOLATION DE
 31.1879 +CONTRAT OU DE VIOLATION DE GARANTIE DE MICROSOFT OU DE TOUT FOURNISSEUR ET
 31.1880 +MEME SI MICROSOFT OU TOUT FOURNISSEUR A ÉTÉ AVISÉ DE LA POSSIBILITÉ DE TELS
 31.1881 +DOMMAGES.
 31.1882 +LIMITATION DE RESPONSABILITÉ ET RECOURS. MALGRÉ LES DOMMAGES QUE VOUS
 31.1883 +PUISSIEZ SUBIR POUR QUELQUE MOTIF QUE CE SOIT (NOTAMMENT, MAIS SANS
 31.1884 +LIMITATION, TOUS LES DOMMAGES SUSMENTIONNÉS ET TOUS LES DOMMAGES DIRECTS OU
 31.1885 +GÉNÉRAUX OU AUTRES), LA SEULE RESPONSABILITÉ DE MICROSOFT ET DE L'UN OU L'
 31.1886 +AUTRE DE SES FOURNISSEURS AUX TERMES DE TOUTE DISPOSITION DE LA PRÉSENTE
 31.1887 +CONVENTION ET VOTRE RECOURS EXCLUSIF A L'ÉGARD DE TOUT CE QUI PRÉCEDE (SAUF
 31.1888 +EN CE QUI CONCERNE TOUT RECOURS DE RÉPARATION OU DE REMPLACEMENT CHOISI PAR
 31.1889 +MICROSOFT A L'ÉGARD DE TOUT MANQUEMENT A LA GARANTIE LIMITÉE) SE LIMITE AU
 31.1890 +PLUS ÉLEVÉ ENTRE LES MONTANTS SUIVANTS : LE MONTANT QUE VOUS AVEZ RÉELLEMENT
 31.1891 +PAYÉ POUR LE LOGICIEL OU 5,00 $US. LES LIMITES, EXCLUSIONS ET DÉNIS QUI
 31.1892 +PRÉCEDENT (Y COMPRIS LES CLAUSES CI-DESSUS), S'APPLIQUENT DANS LA MESURE
 31.1893 +MAXIMALE PERMISE PAR LES LOIS APPLICABLES, MEME SI TOUT RECOURS N'ATTEINT
 31.1894 +PAS SON BUT ESSENTIEL.
 31.1895 +A moins que cela ne soit prohibé par le droit local applicable, la présente
 31.1896 +Convention est régie par les lois de la province d'Ontario, Canada. Vous
 31.1897 +consentez a la compétence des tribunaux fédéraux et provinciaux siégeant a
 31.1898 +Toronto, dans la province d'Ontario.
 31.1899 +Au cas ou vous auriez des questions concernant cette licence ou que vous
 31.1900 +désiriez vous mettre en rapport avec Microsoft pour quelque raison que ce
 31.1901 +soit, veuillez utiliser l'information contenue dans le Logiciel pour
 31.1902 +contacter la filiale de Microsoft desservant votre pays, ou visitez
 31.1903 +Microsoft sur le World Wide Web a http://www.microsoft.com.
 31.1904 +
 31.1905 +The following MICROSOFT GUARANTEE applies to you if you acquired this
 31.1906 +Software in any other country:
 31.1907 +
 31.1908 +Statutory rights not affected - The following guarantee is not restricted to
 31.1909 +any territory and does not affect any statutory rights that you may have
 31.1910 +from your reseller or from Microsoft if you acquired the Software directly
 31.1911 +from Microsoft. If you acquired the Software or any support services in
 31.1912 +Australia, New Zealand or Malaysia, please see the "Consumer rights" section
 31.1913 +below.
 31.1914 +
 31.1915 +The guarantee - The Software is designed and offered as a general-purpose
 31.1916 +software, not for any user's particular purpose. You accept that no
 31.1917 +Software is error free and you are strongly advised to back-up your files
 31.1918 +regularly. Provided that you have a valid license, Microsoft guarantees
 31.1919 +that a) for a period of 90 days from the date of receipt of your license to
 31.1920 +use the Software or the shortest period permitted by applicable law it will
 31.1921 +perform substantially in accordance with the written materials that
 31.1922 +accompany the Software; and b) any support services provided by Microsoft
 31.1923 +shall be substantially as described in applicable written materials provided
 31.1924 +to you by Microsoft and Microsoft support engineers will use reasonable
 31.1925 +efforts, care and skill to solve any problem issues. In the event that the
 31.1926 +Software fails to comply with this guarantee, Microsoft will either (a)
 31.1927 +repair or replace the Software or (b) return the price you paid. This
 31.1928 +guarantee is void if failure of the Software results from accident, abuse or
 31.1929 +misapplication. Any replacement Software will be guaranteed for the
 31.1930 +remainder of the original guarantee period or 30 days, whichever period is
 31.1931 +longer. You agree that the above guarantee is your sole guarantee in
 31.1932 +relation to the Software and any support services.
 31.1933 +
 31.1934 +Exclusion of All Other Terms - To the maximum extent permitted by applicable
 31.1935 +law and subject to the guarantee above, Microsoft disclaims all warranties,
 31.1936 +conditions and other terms, either express or implied (whether by statute,
 31.1937 +common law, collaterally or otherwise) including but not limited to implied
 31.1938 +warranties of satisfactory quality and fitness for particular purpose with
 31.1939 +respect to the Software and the written materials that accompany the
 31.1940 +Software. Any implied warranties that cannot be excluded are limited to 90
 31.1941 +days or to the shortest period permitted by applicable law, whichever is
 31.1942 +greater.
 31.1943 +
 31.1944 +Limitation of Liability - To the maximum extent permitted by applicable law
 31.1945 +and except as provided in the Microsoft Guarantee, Microsoft and its
 31.1946 +suppliers shall not be liable for any damages whatsoever (including without
 31.1947 +limitation, damages for loss of business profits, business interruption,
 31.1948 +loss of business information or other pecuniary loss) arising out of the use
 31.1949 +or inability to use the Software, even if Microsoft has been advised of the
 31.1950 +possibility of such damages. In any case Microsoft's entire liability under
 31.1951 +any provision of this Agreement shall be limited to the amount actually paid
 31.1952 +by you for the Software. These limitations do not apply to any liabilities
 31.1953 +that cannot be excluded or limited by applicable laws.
 31.1954 +
 31.1955 +Consumer rights - Consumers in Australia, New Zealand or Malaysia may have
 31.1956 +the benefit of certain rights and remedies by reason of the Trade Practices
 31.1957 +Act and similar state and territory laws in Australia, the Consumer
 31.1958 +Guarantees Act in New Zealand and the Consumer Protection Act in Malaysia in
 31.1959 +respect of which liability cannot lawfully be modified or excluded. If you
 31.1960 +acquired the Software in New Zealand for the purposes of a business, you
 31.1961 +confirm that the Consumer Guarantees Act does not apply. If you acquired
 31.1962 +the Software in Australia and if Microsoft breaches a condition or warranty
 31.1963 +implied under any law which cannot lawfully be modified or excluded by this
 31.1964 +agreement then, to the extent permitted by law, Microsoft's liability is
 31.1965 +limited, at Microsoft's option, to: (i) in the case of the Software: a)
 31.1966 +repairing or replacing the Software; or b) the cost of such repair or
 31.1967 +replacement; and (ii) in the case of support services: a) re-supply of the
 31.1968 +services; or b) the cost of having the services supplied again.
 31.1969 +
 31.1970 +Should you have any questions concerning this EULA, or if you desire to
 31.1971 +contact Microsoft for any reason, please use the address information
 31.1972 +enclosed in this Software to contact the Microsoft subsidiary serving your
 31.1973 +country or visit Microsoft on the World Wide Web at
 31.1974 +http://www.microsoft.com.
    32.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.2 +++ b/core.browser.xulrunner/manifest.mf	Thu Nov 22 15:44:15 2012 +0100
    32.3 @@ -0,0 +1,7 @@
    32.4 +Manifest-Version: 1.0
    32.5 +OpenIDE-Module: org.netbeans.core.browser.xulrunner/1
    32.6 +OpenIDE-Module-Implementation-Version: 1
    32.7 +OpenIDE-Module-Install: org/netbeans/core/browser/xulrunner/Installer.class
    32.8 +OpenIDE-Module-Localizing-Bundle: org/netbeans/core/browser/xulrunner/Bundle.properties
    32.9 +AutoUpdate-Show-In-Client: true
   32.10 +OpenIDE-Module-Layer: org/netbeans/core/browser/xulrunner/layer.xml
    33.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.2 +++ b/core.browser.xulrunner/nbproject/project.properties	Thu Nov 22 15:44:15 2012 +0100
    33.3 @@ -0,0 +1,10 @@
    33.4 +javac.source=1.6
    33.5 +javac.compilerargs=-Xlint -Xlint:-serial
    33.6 +
    33.7 +release.external/base64-2.2.2.jar=modules/ext/base64-2.2.2.jar
    33.8 +release.external/mozdom4java.jar=modules/ext/mozdom4java.jar
    33.9 +release.external/MozillaGlue-1.9.jar=modules/ext/MozillaGlue-1.9.jar
   33.10 +release.external/MozillaInterfaces-1.9.jar=modules/ext/MozillaInterfaces-1.9.jar
   33.11 +release.external/mozswing.jar=modules/ext/mozswing.jar
   33.12 +
   33.13 +spec.version.base=1.2.0
    34.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.2 +++ b/core.browser.xulrunner/nbproject/project.xml	Thu Nov 22 15:44:15 2012 +0100
    34.3 @@ -0,0 +1,160 @@
    34.4 +<?xml version="1.0" encoding="UTF-8"?>
    34.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
    34.6 +    <type>org.netbeans.modules.apisupport.project</type>
    34.7 +    <configuration>
    34.8 +        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
    34.9 +            <code-name-base>org.netbeans.core.browser.xulrunner</code-name-base>
   34.10 +            <module-dependencies>
   34.11 +                <dependency>
   34.12 +                    <code-name-base>org.netbeans.api.progress</code-name-base>
   34.13 +                    <build-prerequisite/>
   34.14 +                    <compile-dependency/>
   34.15 +                    <run-dependency>
   34.16 +                        <release-version>1</release-version>
   34.17 +                        <specification-version>1.14</specification-version>
   34.18 +                    </run-dependency>
   34.19 +                </dependency>
   34.20 +                <dependency>
   34.21 +                    <code-name-base>org.netbeans.core</code-name-base>
   34.22 +                    <build-prerequisite/>
   34.23 +                    <compile-dependency/>
   34.24 +                    <run-dependency>
   34.25 +                        <release-version>2</release-version>
   34.26 +                        <specification-version>3.12</specification-version>
   34.27 +                    </run-dependency>
   34.28 +                </dependency>
   34.29 +                <dependency>
   34.30 +                    <code-name-base>org.netbeans.core.browser</code-name-base>
   34.31 +                    <build-prerequisite/>
   34.32 +                    <compile-dependency/>
   34.33 +                    <run-dependency>
   34.34 +                        <release-version>1</release-version>
   34.35 +                        <implementation-version/>
   34.36 +                    </run-dependency>
   34.37 +                </dependency>
   34.38 +                <dependency>
   34.39 +                    <code-name-base>org.apache.commons.logging</code-name-base>
   34.40 +                    <run-dependency/>
   34.41 +                </dependency>
   34.42 +                <dependency>
   34.43 +                    <code-name-base>org.netbeans.libs.jna</code-name-base>
   34.44 +                    <build-prerequisite/>
   34.45 +                    <compile-dependency/>
   34.46 +                    <run-dependency>
   34.47 +                        <release-version>1</release-version>
   34.48 +                        <specification-version>1.3</specification-version>
   34.49 +                    </run-dependency>
   34.50 +                </dependency>
   34.51 +                <dependency>
   34.52 +                    <code-name-base>org.netbeans.modules.autoupdate.services</code-name-base>
   34.53 +                    <build-prerequisite/>
   34.54 +                    <compile-dependency/>
   34.55 +                    <run-dependency>
   34.56 +                        <specification-version>1.9</specification-version>
   34.57 +                    </run-dependency>
   34.58 +                </dependency>
   34.59 +                <dependency>
   34.60 +                    <code-name-base>org.openide.awt</code-name-base>
   34.61 +                    <build-prerequisite/>
   34.62 +                    <compile-dependency/>
   34.63 +                    <run-dependency>
   34.64 +                        <specification-version>7.13</specification-version>
   34.65 +                    </run-dependency>
   34.66 +                </dependency>
   34.67 +                <dependency>
   34.68 +                    <code-name-base>org.openide.dialogs</code-name-base>
   34.69 +                    <build-prerequisite/>
   34.70 +                    <compile-dependency/>
   34.71 +                    <run-dependency>
   34.72 +                        <specification-version>7.11</specification-version>
   34.73 +                    </run-dependency>
   34.74 +                </dependency>
   34.75 +                <dependency>
   34.76 +                    <code-name-base>org.openide.explorer</code-name-base>
   34.77 +                    <build-prerequisite/>
   34.78 +                    <compile-dependency/>
   34.79 +                    <run-dependency>
   34.80 +                        <specification-version>6.19</specification-version>
   34.81 +                    </run-dependency>
   34.82 +                </dependency>
   34.83 +                <dependency>
   34.84 +                    <code-name-base>org.openide.filesystems</code-name-base>
   34.85 +                    <build-prerequisite/>
   34.86 +                    <compile-dependency/>
   34.87 +                    <run-dependency>
   34.88 +                        <specification-version>7.22</specification-version>
   34.89 +                    </run-dependency>
   34.90 +                </dependency>
   34.91 +                <dependency>
   34.92 +                    <code-name-base>org.openide.loaders</code-name-base>
   34.93 +                    <build-prerequisite/>
   34.94 +                    <compile-dependency/>
   34.95 +                    <run-dependency>
   34.96 +                        <specification-version>7.6</specification-version>
   34.97 +                    </run-dependency>
   34.98 +                </dependency>
   34.99 +                <dependency>
  34.100 +                    <code-name-base>org.openide.modules</code-name-base>
  34.101 +                    <build-prerequisite/>
  34.102 +                    <compile-dependency/>
  34.103 +                    <run-dependency>
  34.104 +                        <specification-version>7.25</specification-version>
  34.105 +                    </run-dependency>
  34.106 +                </dependency>
  34.107 +                <dependency>
  34.108 +                    <code-name-base>org.openide.nodes</code-name-base>
  34.109 +                    <build-prerequisite/>
  34.110 +                    <compile-dependency/>
  34.111 +                    <run-dependency>
  34.112 +                        <specification-version>7.10</specification-version>
  34.113 +                    </run-dependency>
  34.114 +                </dependency>
  34.115 +                <dependency>
  34.116 +                    <code-name-base>org.openide.util</code-name-base>
  34.117 +                    <build-prerequisite/>
  34.118 +                    <compile-dependency/>
  34.119 +                    <run-dependency>
  34.120 +                        <specification-version>8.0</specification-version>
  34.121 +                    </run-dependency>
  34.122 +                </dependency>
  34.123 +                <dependency>
  34.124 +                    <code-name-base>org.openide.util.lookup</code-name-base>
  34.125 +                    <build-prerequisite/>
  34.126 +                    <compile-dependency/>
  34.127 +                    <run-dependency>
  34.128 +                        <specification-version>8.0</specification-version>
  34.129 +                    </run-dependency>
  34.130 +                </dependency>
  34.131 +                <dependency>
  34.132 +                    <code-name-base>org.openide.windows</code-name-base>
  34.133 +                    <build-prerequisite/>
  34.134 +                    <compile-dependency/>
  34.135 +                    <run-dependency>
  34.136 +                        <specification-version>6.28</specification-version>
  34.137 +                    </run-dependency>
  34.138 +                </dependency>
  34.139 +            </module-dependencies>
  34.140 +            <public-packages/>
  34.141 +            <class-path-extension>
  34.142 +                <runtime-relative-path>ext/base64-2.2.2.jar</runtime-relative-path>
  34.143 +                <binary-origin>external/base64-2.2.2.jar</binary-origin>
  34.144 +            </class-path-extension>
  34.145 +            <class-path-extension>
  34.146 +                <runtime-relative-path>ext/mozdom4java.jar</runtime-relative-path>
  34.147 +                <binary-origin>external/mozdom4java.jar</binary-origin>
  34.148 +            </class-path-extension>
  34.149 +            <class-path-extension>
  34.150 +                <runtime-relative-path>ext/MozillaGlue-1.9.jar</runtime-relative-path>
  34.151 +                <binary-origin>external/MozillaGlue-1.9.jar</binary-origin>
  34.152 +            </class-path-extension>
  34.153 +            <class-path-extension>
  34.154 +                <runtime-relative-path>ext/MozillaInterfaces-1.9.jar</runtime-relative-path>
  34.155 +                <binary-origin>external/MozillaInterfaces-1.9.jar</binary-origin>
  34.156 +            </class-path-extension>
  34.157 +            <class-path-extension>
  34.158 +                <runtime-relative-path>ext/mozswing.jar</runtime-relative-path>
  34.159 +                <binary-origin>external/mozswing.jar</binary-origin>
  34.160 +            </class-path-extension>
  34.161 +        </data>
  34.162 +    </configuration>
  34.163 +</project>
    35.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/BrowserCallback.java	Thu Nov 22 15:44:15 2012 +0100
    35.3 @@ -0,0 +1,58 @@
    35.4 +/*
    35.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    35.6 + *
    35.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    35.8 + *
    35.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   35.10 + * Other names may be trademarks of their respective owners.
   35.11 + *
   35.12 + * The contents of this file are subject to the terms of either the GNU
   35.13 + * General Public License Version 2 only ("GPL") or the Common
   35.14 + * Development and Distribution License("CDDL") (collectively, the
   35.15 + * "License"). You may not use this file except in compliance with the
   35.16 + * License. You can obtain a copy of the License at
   35.17 + * http://www.netbeans.org/cddl-gplv2.html
   35.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   35.19 + * specific language governing permissions and limitations under the
   35.20 + * License.  When distributing the software, include this License Header
   35.21 + * Notice in each file and include the License file at
   35.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   35.23 + * particular file as subject to the "Classpath" exception as provided
   35.24 + * by Oracle in the GPL Version 2 section of the License file that
   35.25 + * accompanied this code. If applicable, add the following below the
   35.26 + * License Header, with the fields enclosed by brackets [] replaced by
   35.27 + * your own identifying information:
   35.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   35.29 + *
   35.30 + * If you wish your version of this file to be governed by only the CDDL
   35.31 + * or only the GPL Version 2, indicate your decision by adding
   35.32 + * "[Contributor] elects to include this software in this distribution
   35.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   35.34 + * single choice of license, a recipient has the option to distribute
   35.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   35.36 + * to extend the choice of license to its licensees as provided above.
   35.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   35.38 + * Version 2 license, then the option applies only if the new code is
   35.39 + * made subject to such option by the copyright holder.
   35.40 + *
   35.41 + * Contributor(s):
   35.42 + *
   35.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   35.44 + */
   35.45 +
   35.46 +package org.netbeans.core.browser.xulrunner;
   35.47 +
   35.48 +import java.awt.AWTEvent;
   35.49 +import org.w3c.dom.Node;
   35.50 +
   35.51 +/**
   35.52 + * Callback into WebBrowserImpl to fire browser events.
   35.53 + * 
   35.54 + * @author S. Aubrecht
   35.55 + */
   35.56 +public interface BrowserCallback {
   35.57 +
   35.58 +    boolean fireBrowserEvent( int type, String url );
   35.59 +
   35.60 +    void fireBrowserEvent( int type, AWTEvent e, Node n );
   35.61 +}
    36.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/BrowserFactory.java	Thu Nov 22 15:44:15 2012 +0100
    36.3 @@ -0,0 +1,113 @@
    36.4 +/*
    36.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    36.6 + *
    36.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    36.8 + *
    36.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   36.10 + * Other names may be trademarks of their respective owners.
   36.11 + *
   36.12 + * The contents of this file are subject to the terms of either the GNU
   36.13 + * General Public License Version 2 only ("GPL") or the Common
   36.14 + * Development and Distribution License("CDDL") (collectively, the
   36.15 + * "License"). You may not use this file except in compliance with the
   36.16 + * License. You can obtain a copy of the License at
   36.17 + * http://www.netbeans.org/cddl-gplv2.html
   36.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   36.19 + * specific language governing permissions and limitations under the
   36.20 + * License.  When distributing the software, include this License Header
   36.21 + * Notice in each file and include the License file at
   36.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   36.23 + * particular file as subject to the "Classpath" exception as provided
   36.24 + * by Oracle in the GPL Version 2 section of the License file that
   36.25 + * accompanied this code. If applicable, add the following below the
   36.26 + * License Header, with the fields enclosed by brackets [] replaced by
   36.27 + * your own identifying information:
   36.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   36.29 + *
   36.30 + * If you wish your version of this file to be governed by only the CDDL
   36.31 + * or only the GPL Version 2, indicate your decision by adding
   36.32 + * "[Contributor] elects to include this software in this distribution
   36.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   36.34 + * single choice of license, a recipient has the option to distribute
   36.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   36.36 + * to extend the choice of license to its licensees as provided above.
   36.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   36.38 + * Version 2 license, then the option applies only if the new code is
   36.39 + * made subject to such option by the copyright holder.
   36.40 + *
   36.41 + * Contributor(s):
   36.42 + *
   36.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   36.44 + */
   36.45 +package org.netbeans.core.browser.xulrunner;
   36.46 +
   36.47 +import java.util.logging.Logger;
   36.48 +import java.util.prefs.Preferences;
   36.49 +import org.netbeans.core.IDESettings;
   36.50 +import org.openide.awt.HtmlBrowser;
   36.51 +import org.openide.awt.HtmlBrowser.Impl;
   36.52 +import org.openide.util.Lookup;
   36.53 +import org.openide.util.NbPreferences;
   36.54 +
   36.55 +/**
   36.56 + * Creates internal browser which uses embedded native browser.
   36.57 + *
   36.58 + * @author S. Aubrecht
   36.59 + */
   36.60 +public class BrowserFactory implements HtmlBrowser.Factory {
   36.61 +    
   36.62 +    static String PROP_EXTRA_BROWSER = "ExtraBrowser"; //NOI18N
   36.63 +
   36.64 +    public Impl createHtmlBrowserImpl() {
   36.65 +        HtmlBrowser.Factory extraFactory = _getExtraBrowser();
   36.66 +        if( null != extraFactory ) {
   36.67 +            return extraFactory.createHtmlBrowserImpl();
   36.68 +        }
   36.69 +        return new HtmlBrowserImpl();
   36.70 +    }
   36.71 +
   36.72 +    public static Boolean isHidden () {
   36.73 +        if( !BrowserManager.isSupportedPlatform() )
   36.74 +            return Boolean.TRUE;
   36.75 +        return Boolean.FALSE;
   36.76 +    }
   36.77 +
   36.78 +    public HtmlBrowser.Factory getExtraBrowser() {
   36.79 +        return _getExtraBrowser();
   36.80 +    }
   36.81 +
   36.82 +    public void setExtraBrowser( HtmlBrowser.Factory browser ) {
   36.83 +        _setExtraBrowser(browser);
   36.84 +    }
   36.85 +
   36.86 +    static HtmlBrowser.Factory _getExtraBrowser() {
   36.87 +        String id = NbPreferences.forModule(BrowserFactory.class).get("extraBrowser", null); //NOI18N
   36.88 +        if( null == id || "".equals(id) ) {
   36.89 +            return null;
   36.90 +        }
   36.91 +        Lookup.Item<HtmlBrowser.Factory> item = Lookup.getDefault ().lookupItem (new Lookup.Template<HtmlBrowser.Factory> (HtmlBrowser.Factory.class, id, null));
   36.92 +        return item == null ? null : item.getInstance ();
   36.93 +    }
   36.94 +
   36.95 +    static void _setExtraBrowser(HtmlBrowser.Factory browser) {
   36.96 +        String browserId = null;
   36.97 +        if( null != browser ) {
   36.98 +            Lookup.Item<HtmlBrowser.Factory> item = Lookup.getDefault ().lookupItem (new Lookup.Template<HtmlBrowser.Factory> (HtmlBrowser.Factory.class, null, browser));
   36.99 +            if (item != null) {
  36.100 +                browserId = item.getId ();
  36.101 +            } else {
  36.102 +                // strange
  36.103 +                Logger.getLogger (IDESettings.class.getName ()).warning ("Cannot find browser in lookup " + browser);// NOI18N
  36.104 +            }
  36.105 +        }
  36.106 +        if( null == browserId )
  36.107 +            browserId = ""; //NOI18N
  36.108 +        NbPreferences.forModule(BrowserFactory.class).put("extraBrowser", browserId); //NOI18N
  36.109 +
  36.110 +        //force reset of NbURLDisplayer
  36.111 +        Preferences idePrefs = NbPreferences.forModule(IDESettings.class);
  36.112 +        String wwwBrowser = idePrefs.get(IDESettings.PROP_WWWBROWSER, null);
  36.113 +        idePrefs.put(IDESettings.PROP_WWWBROWSER, "");
  36.114 +        idePrefs.put(IDESettings.PROP_WWWBROWSER, wwwBrowser);
  36.115 +    }
  36.116 +}
    37.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/BrowserFactoryBeanInfo.java	Thu Nov 22 15:44:15 2012 +0100
    37.3 @@ -0,0 +1,145 @@
    37.4 +/*
    37.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    37.6 + *
    37.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    37.8 + *
    37.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   37.10 + * Other names may be trademarks of their respective owners.
   37.11 + *
   37.12 + * The contents of this file are subject to the terms of either the GNU
   37.13 + * General Public License Version 2 only ("GPL") or the Common
   37.14 + * Development and Distribution License("CDDL") (collectively, the
   37.15 + * "License"). You may not use this file except in compliance with the
   37.16 + * License. You can obtain a copy of the License at
   37.17 + * http://www.netbeans.org/cddl-gplv2.html
   37.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   37.19 + * specific language governing permissions and limitations under the
   37.20 + * License.  When distributing the software, include this License Header
   37.21 + * Notice in each file and include the License file at
   37.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   37.23 + * particular file as subject to the "Classpath" exception as provided
   37.24 + * by Oracle in the GPL Version 2 section of the License file that
   37.25 + * accompanied this code. If applicable, add the following below the
   37.26 + * License Header, with the fields enclosed by brackets [] replaced by
   37.27 + * your own identifying information:
   37.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   37.29 + *
   37.30 + * Contributor(s):
   37.31 + *
   37.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   37.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
   37.34 + * Microsystems, Inc. All Rights Reserved.
   37.35 + *
   37.36 + * If you wish your version of this file to be governed by only the CDDL
   37.37 + * or only the GPL Version 2, indicate your decision by adding
   37.38 + * "[Contributor] elects to include this software in this distribution
   37.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   37.40 + * single choice of license, a recipient has the option to distribute
   37.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   37.42 + * to extend the choice of license to its licensees as provided above.
   37.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   37.44 + * Version 2 license, then the option applies only if the new code is
   37.45 + * made subject to such option by the copyright holder.
   37.46 + */
   37.47 +
   37.48 +package org.netbeans.core.browser.xulrunner;
   37.49 +
   37.50 +import java.awt.Component;
   37.51 +import java.awt.Graphics;
   37.52 +import java.awt.Rectangle;
   37.53 +import java.beans.*;
   37.54 +import org.openide.awt.HtmlBrowser;
   37.55 +import org.openide.awt.HtmlBrowser.Factory;
   37.56 +import org.openide.util.Exceptions;
   37.57 +
   37.58 +
   37.59 +public class BrowserFactoryBeanInfo extends SimpleBeanInfo {
   37.60 +
   37.61 +    @Override
   37.62 +    public BeanDescriptor getBeanDescriptor() {
   37.63 +        return new BeanDescriptor(BrowserFactory.class);
   37.64 +    }
   37.65 +
   37.66 +    @Override
   37.67 +    public PropertyDescriptor[] getPropertyDescriptors() {
   37.68 +        PropertyDescriptor[] properties;
   37.69 +        try {
   37.70 +            properties = new PropertyDescriptor [] {
   37.71 +                                new PropertyDescriptor(BrowserFactory.PROP_EXTRA_BROWSER, BrowserFactory.class)
   37.72 +                             };
   37.73 +
   37.74 +            properties[0].setDisplayName("Extra Browser");
   37.75 +            properties[0].setShortDescription ("Extra browser for web development");
   37.76 +            properties[0].setPreferred(true);
   37.77 +            properties[0].setPropertyEditorClass(EBPropertyEditor.class);
   37.78 +
   37.79 +
   37.80 +        } catch (IntrospectionException ie) {
   37.81 +            Exceptions.printStackTrace(ie);
   37.82 +            return null;
   37.83 +        }
   37.84 +        return properties;
   37.85 +    }
   37.86 +
   37.87 +
   37.88 +    public static class EBPropertyEditor implements PropertyEditor {
   37.89 +
   37.90 +        HtmlBrowser.Factory extraBrowser = BrowserFactory._getExtraBrowser();
   37.91 +
   37.92 +        public EBPropertyEditor() {
   37.93 +
   37.94 +        }
   37.95 +
   37.96 +        public void setValue(Object value) {
   37.97 +            if( value instanceof HtmlBrowser.Factory ) {
   37.98 +                extraBrowser = (Factory) value;
   37.99 +            } else {
  37.100 +                extraBrowser = null;
  37.101 +            }
  37.102 +        }
  37.103 +
  37.104 +        public Object getValue() {
  37.105 +            return extraBrowser;
  37.106 +        }
  37.107 +
  37.108 +        public boolean isPaintable() {
  37.109 +            return false;
  37.110 +        }
  37.111 +
  37.112 +        public void paintValue(Graphics gfx, Rectangle box) {
  37.113 +        }
  37.114 +
  37.115 +        public String getJavaInitializationString() {
  37.116 +            return null;
  37.117 +        }
  37.118 +
  37.119 +        public String getAsText() {
  37.120 +            return "";
  37.121 +        }
  37.122 +
  37.123 +        public void setAsText(String text) throws IllegalArgumentException {
  37.124 +        }
  37.125 +
  37.126 +        public String[] getTags() {
  37.127 +            return null;
  37.128 +        }
  37.129 +
  37.130 +        private EmbeddedBrowserEditor editor;
  37.131 +        public Component getCustomEditor() {
  37.132 +            if( null == editor ) {
  37.133 +                editor = new EmbeddedBrowserEditor(this);
  37.134 +            }
  37.135 +            return editor;
  37.136 +        }
  37.137 +
  37.138 +        public boolean supportsCustomEditor() {
  37.139 +            return true;
  37.140 +        }
  37.141 +
  37.142 +        public void addPropertyChangeListener(PropertyChangeListener listener) {
  37.143 +        }
  37.144 +
  37.145 +        public void removePropertyChangeListener(PropertyChangeListener listener) {
  37.146 +        }
  37.147 +    }
  37.148 +}
    38.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    38.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/BrowserManager.java	Thu Nov 22 15:44:15 2012 +0100
    38.3 @@ -0,0 +1,166 @@
    38.4 +/*
    38.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    38.6 + *
    38.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    38.8 + *
    38.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   38.10 + * Other names may be trademarks of their respective owners.
   38.11 + *
   38.12 + * The contents of this file are subject to the terms of either the GNU
   38.13 + * General Public License Version 2 only ("GPL") or the Common
   38.14 + * Development and Distribution License("CDDL") (collectively, the
   38.15 + * "License"). You may not use this file except in compliance with the
   38.16 + * License. You can obtain a copy of the License at
   38.17 + * http://www.netbeans.org/cddl-gplv2.html
   38.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   38.19 + * specific language governing permissions and limitations under the
   38.20 + * License.  When distributing the software, include this License Header
   38.21 + * Notice in each file and include the License file at
   38.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   38.23 + * particular file as subject to the "Classpath" exception as provided
   38.24 + * by Oracle in the GPL Version 2 section of the License file that
   38.25 + * accompanied this code. If applicable, add the following below the
   38.26 + * License Header, with the fields enclosed by brackets [] replaced by
   38.27 + * your own identifying information:
   38.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   38.29 + *
   38.30 + * If you wish your version of this file to be governed by only the CDDL
   38.31 + * or only the GPL Version 2, indicate your decision by adding
   38.32 + * "[Contributor] elects to include this software in this distribution
   38.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   38.34 + * single choice of license, a recipient has the option to distribute
   38.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   38.36 + * to extend the choice of license to its licensees as provided above.
   38.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   38.38 + * Version 2 license, then the option applies only if the new code is
   38.39 + * made subject to such option by the copyright holder.
   38.40 + *
   38.41 + * Contributor(s):
   38.42 + *
   38.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   38.44 + */
   38.45 +
   38.46 +package org.netbeans.core.browser.xulrunner;
   38.47 +
   38.48 +import java.io.File;
   38.49 +import java.util.logging.Logger;
   38.50 +import java.util.prefs.PreferenceChangeEvent;
   38.51 +import java.util.prefs.PreferenceChangeListener;
   38.52 +import javax.swing.JComponent;
   38.53 +import javax.swing.SwingUtilities;
   38.54 +import javax.swing.UIManager;
   38.55 +import javax.swing.event.ChangeEvent;
   38.56 +import javax.swing.event.ChangeListener;
   38.57 +import org.mozilla.browser.MozillaConfig;
   38.58 +import org.netbeans.core.IDESettings;
   38.59 +import org.openide.modules.InstalledFileLocator;
   38.60 +import org.openide.modules.Places;
   38.61 +import org.openide.util.ChangeSupport;
   38.62 +import org.openide.util.NbPreferences;
   38.63 +
   38.64 +/**
   38.65 + * Enables/disables embedded browser according to OS, CPU architecture etc.
   38.66 + * It also attempts to download os-specific binaries at runtime if they're not
   38.67 + * already available.
   38.68 + *
   38.69 + * @author S. Aubrecht
   38.70 + */
   38.71 +public class BrowserManager {
   38.72 +
   38.73 +    private final ChangeSupport changeSupport = new ChangeSupport(this);
   38.74 +    private final Logger LOG = Logger.getLogger(BrowserManager.class.getName());
   38.75 +
   38.76 +    private BrowserManager() {
   38.77 +        initXULRunnerHome();
   38.78 +        //TODO implement and install WindowCreator
   38.79 +        initProfileDir();
   38.80 +        NbPreferences.forModule(IDESettings.class).addPreferenceChangeListener(new PreferenceChangeListener() {
   38.81 +            public void preferenceChange(PreferenceChangeEvent evt) {
   38.82 +                changeSupport.fireChange();
   38.83 +            }
   38.84 +        });
   38.85 +    }
   38.86 +    
   38.87 +    public static BrowserManager getDefault() {
   38.88 +        return Holder.theInstance;
   38.89 +    }
   38.90 +
   38.91 +    public static final boolean isSupportedPlatform() {
   38.92 +        if( !Platform.platform.is32Bit() ) {
   38.93 +            return false;
   38.94 +        }
   38.95 +
   38.96 +        if( Platform.platform == Platform.Unsupported ) {
   38.97 +            return false;
   38.98 +        }
   38.99 +
  38.100 +        if( Platform.platform == Platform.Linux ) {
  38.101 +            if( !Platform.checkJavaVersion("1.6.0", null) ) //NOI18N
  38.102 +                return false;
  38.103 +            if( "GTK".equals(UIManager.getLookAndFeel().getID()) && !Platform.checkJavaVersion("1.6.0_14", null) ) //NOI18N
  38.104 +                return false;
  38.105 +        }
  38.106 +        return true;
  38.107 +    }
  38.108 +
  38.109 +    public final boolean isEnabled() {
  38.110 +        return IDESettings.getWWWBrowser() instanceof BrowserFactory;
  38.111 +    }
  38.112 +
  38.113 +    public void disable() {
  38.114 +        IDESettings.setWWWBrowser( IDESettings.getExternalWWWBrowser() );
  38.115 +        fireChangeEventLater();
  38.116 +    }
  38.117 +
  38.118 +    public final boolean isNativeModuleAvailable() {
  38.119 +        File xpcom = InstalledFileLocator.getDefault().locate(Platform.xulRunnerHome+"/javaxpcom.jar", null, false); //NOI18N
  38.120 +        return null != xpcom;
  38.121 +    }
  38.122 +
  38.123 +    public void addChangeListener( ChangeListener l ) {
  38.124 +        changeSupport.addChangeListener(l);
  38.125 +        if( !isEnabled() || isNativeModuleAvailable() ) {
  38.126 +            l.stateChanged(new ChangeEvent(this));
  38.127 +        }
  38.128 +    }
  38.129 +
  38.130 +    public void removeChangeListener( ChangeListener l ) {
  38.131 +        changeSupport.removeChangeListener(l);
  38.132 +    }
  38.133 +
  38.134 +    public JComponent createDownloadNativeModulePanel() {
  38.135 +        return new DownloadPanel(Platform.codeNameBase);
  38.136 +    }
  38.137 +
  38.138 +    private void fireChangeEventLater() {
  38.139 +        SwingUtilities.invokeLater(new Runnable() {
  38.140 +            public void run() {
  38.141 +                changeSupport.fireChange();
  38.142 +            }
  38.143 +        });
  38.144 +    }
  38.145 +    
  38.146 +    void nativeModuleDownloaded() {
  38.147 +        initXULRunnerHome();
  38.148 +        fireChangeEventLater();
  38.149 +    }
  38.150 +
  38.151 +    private void initXULRunnerHome() {
  38.152 +        File xpcom = InstalledFileLocator.getDefault().locate(Platform.xulRunnerHome+"/javaxpcom.jar", null, false); //NOI18N
  38.153 +        if( null != xpcom ) {
  38.154 +            File xulRunnerDir = xpcom.getParentFile();
  38.155 +            LOG.fine("Loooking for XULRunner distribution in: " + xulRunnerDir); //NOI18N
  38.156 +            MozillaConfig.setXULRunnerHome(xulRunnerDir);
  38.157 +        } else {
  38.158 +            LOG.fine("XULRunner distribution not found"); //NOI18N
  38.159 +        }
  38.160 +    }
  38.161 +
  38.162 +    private void initProfileDir() {
  38.163 +        MozillaConfig.setProfileDir(Places.getCacheSubdirectory("mozillaprofilev1")); // NOI18N
  38.164 +    }
  38.165 +
  38.166 +    private static class Holder {
  38.167 +        private static final BrowserManager theInstance = new BrowserManager();
  38.168 +    }
  38.169 +}
    39.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    39.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/BrowserPanel.java	Thu Nov 22 15:44:15 2012 +0100
    39.3 @@ -0,0 +1,279 @@
    39.4 +package org.netbeans.core.browser.xulrunner;
    39.5 +
    39.6 +import java.awt.AWTEvent;
    39.7 +import java.awt.Dimension;
    39.8 +import java.awt.event.MouseEvent;
    39.9 +import java.beans.PropertyChangeSupport;
   39.10 +import java.io.IOException;
   39.11 +import java.net.MalformedURLException;
   39.12 +import java.net.URL;
   39.13 +import javax.swing.MenuSelectionManager;
   39.14 +import javax.swing.SwingUtilities;
   39.15 +import org.mozilla.browser.MozillaExecutor;
   39.16 +import org.mozilla.browser.MozillaKeyEvent;
   39.17 +import org.mozilla.browser.MozillaMouseEvent;
   39.18 +import org.mozilla.browser.MozillaPanel;
   39.19 +import org.mozilla.browser.impl.ChromeAdapter;
   39.20 +import org.mozilla.browser.impl.DOMUtils;
   39.21 +import org.mozilla.dom.NodeFactory;
   39.22 +import org.mozilla.interfaces.nsIBaseWindow;
   39.23 +import org.mozilla.interfaces.nsIDOMRange;
   39.24 +import org.mozilla.interfaces.nsISelection;
   39.25 +import org.mozilla.interfaces.nsIWebBrowser;
   39.26 +import org.mozilla.interfaces.nsIWebBrowserFocus;
   39.27 +import org.mozilla.xpcom.XPCOMException;
   39.28 +import org.netbeans.core.browser.api.WebBrowserEvent;
   39.29 +import org.openide.awt.HtmlBrowser;
   39.30 +import org.openide.util.Exceptions;
   39.31 +import org.openide.windows.TopComponent;
   39.32 +import org.w3c.dom.Document;
   39.33 +import org.w3c.dom.NamedNodeMap;
   39.34 +import org.w3c.dom.Node;
   39.35 +import static org.mozilla.browser.XPCOMUtils.qi;
   39.36 +import static org.mozilla.browser.MozillaExecutor.mozAsyncExec;
   39.37 +
   39.38 +/**
   39.39 + * Extends MozSwing's browser component to handle various browser events.
   39.40 + *
   39.41 + * @author S. Aubrecht
   39.42 + */
   39.43 +public class BrowserPanel extends MozillaPanel {
   39.44 +
   39.45 +    private final PropertyChangeSupport propSupport;
   39.46 +    private final BrowserCallback callback;
   39.47 +    private boolean backEnabled = false;
   39.48 +    private boolean forwardEnabled = false;
   39.49 +    private String statusText;
   39.50 +    private String title;
   39.51 +    private boolean browserAttached = false;
   39.52 +
   39.53 +    public BrowserPanel(PropertyChangeSupport propSupport, BrowserCallback callback) {
   39.54 +        super(VisibilityMode.FORCED_HIDDEN, VisibilityMode.FORCED_HIDDEN);
   39.55 +        this.propSupport = propSupport;
   39.56 +        this.callback = callback;
   39.57 +        setUpdateTitle(false);
   39.58 +        setMinimumSize(new Dimension(10, 10));
   39.59 +    }
   39.60 +
   39.61 +    @Override
   39.62 +    public void attachNewBrowser() {
   39.63 +        if( browserAttached )
   39.64 +            return;
   39.65 +        super.attachNewBrowser();
   39.66 +        browserAttached = true;
   39.67 +    }
   39.68 +
   39.69 +    @Override
   39.70 +    public void onDetachBrowser() {
   39.71 +        super.onDetachBrowser();
   39.72 +        browserAttached = false;
   39.73 +    }
   39.74 +
   39.75 +    @Override
   39.76 +    public void onEnableBackButton(boolean enabled) {
   39.77 +        super.onEnableBackButton(enabled);
   39.78 +        this.backEnabled = enabled;
   39.79 +        propSupport.firePropertyChange(HtmlBrowser.Impl.PROP_BACKWARD, !enabled, enabled);
   39.80 +    }
   39.81 +
   39.82 +    @Override
   39.83 +    public void onEnableForwardButton(boolean enabled) {
   39.84 +        super.onEnableForwardButton(enabled);
   39.85 +        this.forwardEnabled = enabled;
   39.86 +        propSupport.firePropertyChange(HtmlBrowser.Impl.PROP_FORWARD, !enabled, enabled);
   39.87 +    }
   39.88 +
   39.89 +    @Override
   39.90 +    public void onLoadingEnded() {
   39.91 +        super.onLoadingEnded();
   39.92 +        statusText = null;
   39.93 +        propSupport.firePropertyChange(HtmlBrowser.Impl.PROP_STATUS_MESSAGE, false, true);
   39.94 +        callback.fireBrowserEvent( WebBrowserEvent.WBE_LOADING_ENDED, null );
   39.95 +    }
   39.96 +
   39.97 +    @Override
   39.98 +    public void onLoadingStarted() {
   39.99 +        super.onLoadingStarted();
  39.100 +        backEnabled = true;
  39.101 +        propSupport.firePropertyChange(HtmlBrowser.Impl.PROP_BACKWARD, false, true);
  39.102 +        propSupport.firePropertyChange(HtmlBrowser.Impl.PROP_STATUS_MESSAGE, false, true);
  39.103 +        callback.fireBrowserEvent( WebBrowserEvent.WBE_LOADING_STARTED, null );
  39.104 +    }
  39.105 +
  39.106 +    @Override
  39.107 +    public boolean onLoadingStarting(String url) {
  39.108 +        if( callback.fireBrowserEvent( WebBrowserEvent.WBE_LOADING_STARTING, url ) )
  39.109 +            return true;
  39.110 +        return false;
  39.111 +    }
  39.112 +
  39.113 +    @Override
  39.114 +    public void onSetStatus(String text) {
  39.115 +        super.onSetStatus(text);
  39.116 +        this.statusText = text;
  39.117 +        propSupport.firePropertyChange(HtmlBrowser.Impl.PROP_STATUS_MESSAGE, false, true);
  39.118 +    }
  39.119 +
  39.120 +    @Override
  39.121 +    public void onSetTitle(String title) {
  39.122 +        super.onSetTitle(title);
  39.123 +        this.title = title;
  39.124 +        propSupport.firePropertyChange(HtmlBrowser.Impl.PROP_TITLE, false, true);
  39.125 +    }
  39.126 +
  39.127 +    @Override
  39.128 +    public void onSetUrlbarText(String url) {
  39.129 +        super.onSetUrlbarText(url);
  39.130 +        propSupport.firePropertyChange(HtmlBrowser.Impl.PROP_URL, false, true);
  39.131 +    }
  39.132 +
  39.133 +    @Override
  39.134 +    public void onDispatchEvent(AWTEvent e) {
  39.135 +        super.onDispatchEvent(e);
  39.136 +        if( e instanceof MozillaKeyEvent ) {
  39.137 +            MozillaKeyEvent mke = (MozillaKeyEvent) e;
  39.138 +            callback.fireBrowserEvent( WebBrowserEvent.WBE_KEY_EVENT, e, mke.getSourceNode() );
  39.139 +        } else if( e instanceof MozillaMouseEvent ) {
  39.140 +            MozillaMouseEvent mme = (MozillaMouseEvent) e;
  39.141 +            fixMouseHandling(mme);
  39.142 +            callback.fireBrowserEvent( WebBrowserEvent.WBE_KEY_EVENT, e, mme.getSourceNode() );
  39.143 +        }
  39.144 +    }
  39.145 +
  39.146 +    private void fixMouseHandling( MouseEvent e ) {
  39.147 +        if( e.getID() == MouseEvent.MOUSE_PRESSED ) {
  39.148 +            MenuSelectionManager.defaultManager().clearSelectedPath();
  39.149 +            TopComponent tc = (TopComponent) SwingUtilities.getAncestorOfClass(TopComponent.class, this);
  39.150 +            if( null != tc ) {
  39.151 +                tc.requestActive();
  39.152 +            }
  39.153 +        }
  39.154 +        //todo hide sliding windows (if any)
  39.155 +    }
  39.156 +
  39.157 +    public void dispose() {
  39.158 +        if( !browserAttached || null == getChromeAdapter() )
  39.159 +            return;
  39.160 +        MozillaExecutor.mozAsyncExec(new Runnable() {
  39.161 +            public void run() {
  39.162 +                if( !browserAttached || null == getChromeAdapter() )
  39.163 +                    return;
  39.164 +                onDetachBrowser();
  39.165 +                browserAttached = false;
  39.166 +            }
  39.167 +        });
  39.168 +    }
  39.169 +
  39.170 +    private void updateCopyPaste() {
  39.171 +        MozillaExecutor.mozSyncExec(new Runnable() {
  39.172 +
  39.173 +            public void run() {
  39.174 +                nsIWebBrowser brow = getChromeAdapter().getWebBrowser();
  39.175 +                nsISelection sel = brow.getContentDOMWindow().getSelection();
  39.176 +                //addWebBrowserListener(MyMozillaPanel.this, nsISelectionListener.NS_ISELECTIONLISTENER_IID);
  39.177 +                if( sel.getRangeCount() > 0 ) {
  39.178 +                    nsIDOMRange range = sel.getRangeAt(0);
  39.179 +                    Node n = NodeFactory.getNodeInstance(range.cloneContents());
  39.180 +                    System.out.println("selection: " + n.getTextContent());
  39.181 +                }
  39.182 +            }
  39.183 +        });
  39.184 +    }
  39.185 +
  39.186 +    private void showSource() {
  39.187 +        Document source = getDocument();
  39.188 +        try {
  39.189 +            DOMUtils.writeDOMToStream(source, System.out, "UTF-8");
  39.190 +        } catch( IOException ex ) {
  39.191 +            Exceptions.printStackTrace(ex);
  39.192 +        }
  39.193 +    }
  39.194 +
  39.195 +    private URL getUrlFromNode(Node n) {
  39.196 +        if( null == n ) {
  39.197 +            return null;
  39.198 +        }
  39.199 +        NamedNodeMap attrs = n.getAttributes();
  39.200 +        if( null == attrs ) {
  39.201 +            return null;
  39.202 +        }
  39.203 +        Node href = attrs.getNamedItem("href");
  39.204 +        if( null == href ) {
  39.205 +            return null;
  39.206 +        }
  39.207 +        String urlText = href.getTextContent();
  39.208 +        String baseUrl = n.getBaseURI();
  39.209 +        if( baseUrl.indexOf("#") > 0 ) {
  39.210 +            baseUrl = baseUrl.substring(0, baseUrl.indexOf("#"));
  39.211 +        }
  39.212 +        if( urlText.startsWith("#") ) {
  39.213 +            //todo filter out existing anchor (if any)
  39.214 +            urlText = baseUrl + urlText;
  39.215 +        }
  39.216 +        try {
  39.217 +            return new URL(urlText);
  39.218 +        } catch( MalformedURLException e ) {
  39.219 +            try {
  39.220 +                return new URL(baseUrl + "/" + urlText);
  39.221 +            } catch( MalformedURLException e2 ) {
  39.222 +            }
  39.223 +            return null;
  39.224 +        }
  39.225 +    }
  39.226 +
  39.227 +    public String getStatusText() {
  39.228 +        return statusText;
  39.229 +    }
  39.230 +
  39.231 +    public boolean isForwardEnabled() {
  39.232 +        return forwardEnabled;
  39.233 +    }
  39.234 +
  39.235 +    public boolean isBackwardEnabled() {
  39.236 +        return backEnabled;
  39.237 +    }
  39.238 +
  39.239 +    public String getTitleText() {
  39.240 +        return title;
  39.241 +    }
  39.242 +
  39.243 +    public void requestFocusInBrowser() {
  39.244 +        Runnable r = new Runnable() {
  39.245 +            public void run() {
  39.246 +                ChromeAdapter ca = getChromeAdapter();
  39.247 +                if( null == ca )
  39.248 +                    return;
  39.249 +                nsIWebBrowserFocus webBrowserFocus = qi(ca.getWebBrowser(), nsIWebBrowserFocus.class);
  39.250 +                webBrowserFocus.activate();
  39.251 +            }
  39.252 +        };
  39.253 +        mozAsyncExec(r);
  39.254 +    }
  39.255 +
  39.256 +    public void requestRepaint() {
  39.257 +        Runnable r = new Runnable() {
  39.258 +            public void run() {
  39.259 +                ChromeAdapter ca = getChromeAdapter();
  39.260 +                if( null == ca )
  39.261 +                    return;
  39.262 +                nsIBaseWindow baseWindow = qi(ca.getWebBrowser(), nsIBaseWindow.class);
  39.263 +                if( null == baseWindow )
  39.264 +                    return;
  39.265 +                try {
  39.266 +                    baseWindow.repaint(false);
  39.267 +                } catch( XPCOMException e ) {
  39.268 +                    //ignore
  39.269 +                }
  39.270 +            }
  39.271 +        };
  39.272 +        mozAsyncExec(r);
  39.273 +    }
  39.274 +
  39.275 +    public void reparent() {
  39.276 +        if( !browserAttached )
  39.277 +            return;
  39.278 +        removeNotify();
  39.279 +        browserAttached = false;
  39.280 +        addNotify();
  39.281 +    }
  39.282 +}
    40.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    40.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/Bundle.properties	Thu Nov 22 15:44:15 2012 +0100
    40.3 @@ -0,0 +1,13 @@
    40.4 +OpenIDE-Module-Display-Category=Base IDE
    40.5 +OpenIDE-Module-Long-Description=\
    40.6 +    <html>Embedded browser implementation based on Mozilla's XUL Runner using <a href="http://sourceforge.net/projects/mozswing/">MozSwing</a>'s libraries.\
    40.7 +    <br> This module adds an extra option to web browser selection in Options window. \
    40.8 +    Additional OS-specific binaries are automatically downloaded from Update Center upon the first use of embedded browser.
    40.9 +OpenIDE-Module-Name=Embedded Browser UI - XUL Runner
   40.10 +Services/Browsers/EmbeddedBrowser.settings=Embedded Mozilla Browser
   40.11 +LBL_DownloadInfo=In order to use Embedded Browser, the proper module(s) must be downloaded & installed.
   40.12 +LBL_Download=Download & Install
   40.13 +MSG_DownloadFailed=Module(s) download failed.
   40.14 +DownloadPanel.disableButton.text=Disable Embedded Browser
   40.15 +LBL_EmbeddedBrowserDisabled=<embedded browser is disabled>
   40.16 +EmbeddedBrowserEditor.checkAnotherBrowser.text=Use Another Browser for Web Application Development
    41.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    41.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/DownloadPanel.form	Thu Nov 22 15:44:15 2012 +0100
    41.3 @@ -0,0 +1,95 @@
    41.4 +<?xml version="1.1" encoding="UTF-8" ?>
    41.5 +
    41.6 +<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
    41.7 +  <AuxValues>
    41.8 +    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
    41.9 +    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
   41.10 +    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="false"/>
   41.11 +    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
   41.12 +    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
   41.13 +    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
   41.14 +    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
   41.15 +    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
   41.16 +    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
   41.17 +  </AuxValues>
   41.18 +
   41.19 +  <Layout>
   41.20 +    <DimensionLayout dim="0">
   41.21 +      <Group type="103" groupAlignment="0" attributes="0">
   41.22 +          <Group type="102" alignment="0" attributes="0">
   41.23 +              <EmptySpace max="-2" attributes="0"/>
   41.24 +              <Group type="103" groupAlignment="0" attributes="0">
   41.25 +                  <Component id="progressPanel" alignment="0" pref="466" max="32767" attributes="0"/>
   41.26 +                  <Component id="infoLabel" alignment="0" min="-2" max="-2" attributes="0"/>
   41.27 +                  <Group type="102" alignment="0" attributes="0">
   41.28 +                      <Component id="downloadButton" min="-2" max="-2" attributes="0"/>
   41.29 +                      <EmptySpace max="-2" attributes="0"/>
   41.30 +                      <Component id="disableButton" min="-2" max="-2" attributes="0"/>
   41.31 +                  </Group>
   41.32 +                  <Component id="errorLabel" alignment="0" min="-2" max="-2" attributes="0"/>
   41.33 +              </Group>
   41.34 +              <EmptySpace max="-2" attributes="0"/>
   41.35 +          </Group>
   41.36 +      </Group>
   41.37 +    </DimensionLayout>
   41.38 +    <DimensionLayout dim="1">
   41.39 +      <Group type="103" groupAlignment="0" attributes="0">
   41.40 +          <Group type="102" alignment="0" attributes="0">
   41.41 +              <EmptySpace max="-2" attributes="0"/>
   41.42 +              <Component id="errorLabel" min="-2" max="-2" attributes="0"/>
   41.43 +              <EmptySpace min="-2" max="-2" attributes="0"/>
   41.44 +              <Component id="infoLabel" min="-2" max="-2" attributes="0"/>
   41.45 +              <EmptySpace min="-2" max="-2" attributes="0"/>
   41.46 +              <Group type="103" groupAlignment="3" attributes="0">
   41.47 +                  <Component id="downloadButton" alignment="3" min="-2" max="-2" attributes="0"/>
   41.48 +                  <Component id="disableButton" alignment="3" min="-2" max="-2" attributes="0"/>
   41.49 +              </Group>
   41.50 +              <EmptySpace type="separate" max="-2" attributes="0"/>
   41.51 +              <Component id="progressPanel" pref="118" max="32767" attributes="0"/>
   41.52 +              <EmptySpace max="-2" attributes="0"/>
   41.53 +          </Group>
   41.54 +      </Group>
   41.55 +    </DimensionLayout>
   41.56 +  </Layout>
   41.57 +  <SubComponents>
   41.58 +    <Component class="javax.swing.JLabel" name="errorLabel">
   41.59 +      <Properties>
   41.60 +        <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
   41.61 +          <Color blue="0" green="0" id="nb.errorForeground" palette="3" red="ff" type="palette"/>
   41.62 +        </Property>
   41.63 +        <Property name="text" type="java.lang.String" value="dummy" noResource="true"/>
   41.64 +      </Properties>
   41.65 +    </Component>
   41.66 +    <Component class="javax.swing.JLabel" name="infoLabel">
   41.67 +      <Properties>
   41.68 +        <Property name="text" type="java.lang.String" value="dummy" noResource="true"/>
   41.69 +      </Properties>
   41.70 +    </Component>
   41.71 +    <Component class="javax.swing.JButton" name="downloadButton">
   41.72 +      <Properties>
   41.73 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
   41.74 +          <ResourceString bundle="org/netbeans/modules/web/fake/frameworks/Bundle.properties" key="LBL_Download" replaceFormat="NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
   41.75 +        </Property>
   41.76 +      </Properties>
   41.77 +      <Events>
   41.78 +        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="downloadButtonActionPerformed"/>
   41.79 +      </Events>
   41.80 +    </Component>
   41.81 +    <Container class="javax.swing.JPanel" name="progressPanel">
   41.82 +
   41.83 +      <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
   41.84 +        <Property name="axis" type="int" value="3"/>
   41.85 +      </Layout>
   41.86 +    </Container>
   41.87 +    <Component class="javax.swing.JButton" name="disableButton">
   41.88 +      <Properties>
   41.89 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
   41.90 +          <ResourceString bundle="org/netbeans/core/browser/Bundle.properties" key="DownloadPanel.disableButton.text" replaceFormat="NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
   41.91 +        </Property>
   41.92 +      </Properties>
   41.93 +      <Events>
   41.94 +        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="disableButtonActionPerformed"/>
   41.95 +      </Events>
   41.96 +    </Component>
   41.97 +  </SubComponents>
   41.98 +</Form>
    42.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    42.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/DownloadPanel.java	Thu Nov 22 15:44:15 2012 +0100
    42.3 @@ -0,0 +1,265 @@
    42.4 +/*
    42.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    42.6 + *
    42.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    42.8 + *
    42.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   42.10 + * Other names may be trademarks of their respective owners.
   42.11 + *
   42.12 + * The contents of this file are subject to the terms of either the GNU
   42.13 + * General Public License Version 2 only ("GPL") or the Common
   42.14 + * Development and Distribution License("CDDL") (collectively, the
   42.15 + * "License"). You may not use this file except in compliance with the
   42.16 + * License. You can obtain a copy of the License at
   42.17 + * http://www.netbeans.org/cddl-gplv2.html
   42.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   42.19 + * specific language governing permissions and limitations under the
   42.20 + * License.  When distributing the software, include this License Header
   42.21 + * Notice in each file and include the License file at
   42.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   42.23 + * particular file as subject to the "Classpath" exception as provided
   42.24 + * by Oracle in the GPL Version 2 section of the License file that
   42.25 + * accompanied this code. If applicable, add the following below the
   42.26 + * License Header, with the fields enclosed by brackets [] replaced by
   42.27 + * your own identifying information:
   42.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   42.29 + *
   42.30 + * If you wish your version of this file to be governed by only the CDDL
   42.31 + * or only the GPL Version 2, indicate your decision by adding
   42.32 + * "[Contributor] elects to include this software in this distribution
   42.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   42.34 + * single choice of license, a recipient has the option to distribute
   42.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   42.36 + * to extend the choice of license to its licensees as provided above.
   42.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   42.38 + * Version 2 license, then the option applies only if the new code is
   42.39 + * made subject to such option by the copyright holder.
   42.40 + *
   42.41 + * Contributor(s):
   42.42 + *
   42.43 + * Portions Copyrighted 2008 Sun Microsystems, Inc.
   42.44 + */
   42.45 +
   42.46 +package org.netbeans.core.browser.xulrunner;
   42.47 +
   42.48 +import java.awt.Dimension;
   42.49 +import java.awt.event.ActionEvent;
   42.50 +import java.awt.event.ActionListener;
   42.51 +import javax.swing.Box;
   42.52 +import javax.swing.BoxLayout;
   42.53 +import javax.swing.GroupLayout.Alignment;
   42.54 +import javax.swing.JButton;
   42.55 +import javax.swing.JComponent;
   42.56 +import javax.swing.JLabel;
   42.57 +import javax.swing.JPanel;
   42.58 +import javax.swing.LayoutStyle.ComponentPlacement;
   42.59 +import javax.swing.SwingUtilities;
   42.60 +import javax.swing.UIManager;
   42.61 +import org.netbeans.api.progress.ProgressHandle;
   42.62 +import org.netbeans.api.progress.ProgressHandleFactory;
   42.63 +import org.netbeans.core.browser.xulrunner.modules.ModulesInstaller;
   42.64 +import org.netbeans.core.browser.xulrunner.modules.ProgressMonitor;
   42.65 +import org.openide.awt.Mnemonics;
   42.66 +import org.openide.util.Exceptions;
   42.67 +import org.openide.util.NbBundle;
   42.68 +import org.openide.util.RequestProcessor;
   42.69 +import org.openide.util.RequestProcessor.Task;
   42.70 +import org.openide.util.TaskListener;
   42.71 +
   42.72 +/**
   42.73 + * A component which prompts the user to download os-specific binaries for browser
   42.74 + * embedding.
   42.75 + *
   42.76 + * @author S. Aubrecht
   42.77 + */
   42.78 +public class DownloadPanel extends JPanel {
   42.79 +    private static final long serialVersionUID = 27938464212508L;
   42.80 +
   42.81 +    final ProgressMonitor progressMonitor = new DownloadProgressMonitor();
   42.82 +    private final String codeNameBase;
   42.83 +
   42.84 +    DownloadPanel(final String codeNameBase) {
   42.85 +        assert codeNameBase != null;
   42.86 +
   42.87 +        this.codeNameBase = codeNameBase;
   42.88 +
   42.89 +        initComponents();
   42.90 +
   42.91 +        String lblMsg = NbBundle.getMessage(DownloadPanel.class, "LBL_DownloadInfo", "Embedded Browser");
   42.92 +        infoLabel.setText(lblMsg);
   42.93 +        setError(" "); // NOI18N
   42.94 +    }
   42.95 +
   42.96 +    void setError(final String msg) {
   42.97 +        if( SwingUtilities.isEventDispatchThread() ) {
   42.98 +            errorLabel.setText(msg);
   42.99 +        } else {
  42.100 +            SwingUtilities.invokeLater(new Runnable() {
  42.101 +                public void run() {
  42.102 +                    setError(msg);
  42.103 +                }
  42.104 +            });
  42.105 +        }
  42.106 +    }
  42.107 +
  42.108 +    /** This method is called from within the constructor to
  42.109 +     * initialize the form.
  42.110 +     * WARNING: Do NOT modify this code. The content of this method is
  42.111 +     * always regenerated by the Form Editor.
  42.112 +     */
  42.113 +    @SuppressWarnings("unchecked")
  42.114 +    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  42.115 +    private void initComponents() {
  42.116 +
  42.117 +        errorLabel = new JLabel();
  42.118 +        infoLabel = new JLabel();
  42.119 +        downloadButton = new JButton();
  42.120 +        progressPanel = new JPanel();
  42.121 +        disableButton = new JButton();
  42.122 +
  42.123 +        errorLabel.setForeground(UIManager.getDefaults().getColor("nb.errorForeground"));
  42.124 +        Mnemonics.setLocalizedText(errorLabel, "dummy");
  42.125 +        Mnemonics.setLocalizedText(infoLabel, "dummy");
  42.126 +        Mnemonics.setLocalizedText(downloadButton, NbBundle.getMessage(DownloadPanel.class, "LBL_Download"));
  42.127 +        downloadButton.addActionListener(new ActionListener() {
  42.128 +            public void actionPerformed(ActionEvent evt) {
  42.129 +                downloadButtonActionPerformed(evt);
  42.130 +            }
  42.131 +        });
  42.132 +
  42.133 +        progressPanel.setLayout(new BoxLayout(progressPanel, BoxLayout.PAGE_AXIS));
  42.134 +        Mnemonics.setLocalizedText(disableButton, NbBundle.getMessage(DownloadPanel.class, "DownloadPanel.disableButton.text"));
  42.135 +        disableButton.addActionListener(new ActionListener() {
  42.136 +            public void actionPerformed(ActionEvent evt) {
  42.137 +                disableButtonActionPerformed(evt);
  42.138 +            }
  42.139 +        });
  42.140 +
  42.141 +        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
  42.142 +        this.setLayout(layout);
  42.143 +        layout.setHorizontalGroup(
  42.144 +            layout.createParallelGroup(Alignment.LEADING)
  42.145 +            .addGroup(layout.createSequentialGroup()
  42.146 +                .addContainerGap()
  42.147 +                .addGroup(layout.createParallelGroup(Alignment.LEADING)
  42.148 +                    .addComponent(progressPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 466, Short.MAX_VALUE)
  42.149 +                    .addComponent(infoLabel)
  42.150 +                    .addGroup(layout.createSequentialGroup()
  42.151 +                        .addComponent(downloadButton)
  42.152 +                        .addPreferredGap(ComponentPlacement.RELATED)
  42.153 +                        .addComponent(disableButton))
  42.154 +                    .addComponent(errorLabel))
  42.155 +                .addContainerGap())
  42.156 +        );
  42.157 +        layout.setVerticalGroup(
  42.158 +            layout.createParallelGroup(Alignment.LEADING)
  42.159 +            .addGroup(layout.createSequentialGroup()
  42.160 +                .addContainerGap()
  42.161 +                .addComponent(errorLabel)
  42.162 +                .addPreferredGap(ComponentPlacement.RELATED)
  42.163 +                .addComponent(infoLabel)
  42.164 +                .addPreferredGap(ComponentPlacement.RELATED)
  42.165 +                .addGroup(layout.createParallelGroup(Alignment.BASELINE)
  42.166 +                    .addComponent(downloadButton)
  42.167 +                    .addComponent(disableButton))
  42.168 +                .addGap(18, 18, 18)
  42.169 +                .addComponent(progressPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 118, Short.MAX_VALUE)
  42.170 +                .addContainerGap())
  42.171 +        );
  42.172 +    }// </editor-fold>//GEN-END:initComponents
  42.173 +
  42.174 +    private void downloadButtonActionPerformed(ActionEvent evt) {//GEN-FIRST:event_downloadButtonActionPerformed
  42.175 +        downloadButton.setEnabled(false);
  42.176 +        disableButton.setEnabled(false);
  42.177 +        final boolean[] success = new boolean[1];
  42.178 +        Task task = RequestProcessor.getDefault().create(new Runnable() {
  42.179 +            public void run() {
  42.180 +                success[0] = ModulesInstaller.installModules(progressMonitor, codeNameBase);
  42.181 +            }
  42.182 +        });
  42.183 +        task.addTaskListener(new TaskListener() {
  42.184 +            public void taskFinished(org.openide.util.Task task) {
  42.185 +                final BrowserManager bm = BrowserManager.getDefault();
  42.186 +                if (success[0]) {
  42.187 +                    // can be a bit dangerous ;)
  42.188 +                    int i = 0;
  42.189 +                    while (!bm.isNativeModuleAvailable()) {
  42.190 +                        if (++i > 10) {
  42.191 +                            // no success?! this should never happen but will try to handle it
  42.192 +                            break;
  42.193 +                        }
  42.194 +                        try {
  42.195 +                            Thread.sleep(200);
  42.196 +                        } catch (InterruptedException ex) {
  42.197 +                            Exceptions.printStackTrace(ex);
  42.198 +                        }
  42.199 +                    }
  42.200 +                }
  42.201 +                if (bm.isNativeModuleAvailable()) {
  42.202 +                    bm.nativeModuleDownloaded();
  42.203 +                } else {
  42.204 +                    SwingUtilities.invokeLater(new Runnable() {
  42.205 +                        public void run() {
  42.206 +                            String msg = NbBundle.getMessage(DownloadPanel.class, "MSG_DownloadFailed");
  42.207 +                            setError(msg);
  42.208 +                            downloadButton.setEnabled(true);
  42.209 +                            disableButton.setEnabled(true);
  42.210 +                            progressPanel.removeAll();
  42.211 +                            progressPanel.revalidate();
  42.212 +                            progressPanel.repaint();
  42.213 +                        }
  42.214 +                    });
  42.215 +                }
  42.216 +            }
  42.217 +        });
  42.218 +        task.schedule(0);
  42.219 +    }//GEN-LAST:event_downloadButtonActionPerformed
  42.220 +
  42.221 +    private void disableButtonActionPerformed(ActionEvent evt) {//GEN-FIRST:event_disableButtonActionPerformed
  42.222 +        downloadButton.setEnabled(false);
  42.223 +        disableButton.setEnabled(false);
  42.224 +        BrowserManager.getDefault().disable();
  42.225 +    }//GEN-LAST:event_disableButtonActionPerformed
  42.226 +
  42.227 +    // Variables declaration - do not modify//GEN-BEGIN:variables
  42.228 +    private JButton disableButton;
  42.229 +    private JButton downloadButton;
  42.230 +    private JLabel errorLabel;
  42.231 +    private JLabel infoLabel;
  42.232 +    private JPanel progressPanel;
  42.233 +    // End of variables declaration//GEN-END:variables
  42.234 +
  42.235 +    private final class DownloadProgressMonitor implements ProgressMonitor {
  42.236 +
  42.237 +        public void onDownload(ProgressHandle progressHandle) {
  42.238 +            updateProgress(progressHandle);
  42.239 +        }
  42.240 +
  42.241 +        public void onValidate(ProgressHandle progressHandle) {
  42.242 +            updateProgress(progressHandle);
  42.243 +        }
  42.244 +
  42.245 +        public void onInstall(ProgressHandle progressHandle) {
  42.246 +            updateProgress(progressHandle);
  42.247 +        }
  42.248 +
  42.249 +        public void onEnable(ProgressHandle progressHandle) {
  42.250 +            updateProgress(progressHandle);
  42.251 +        }
  42.252 +
  42.253 +        private void updateProgress(final ProgressHandle progressHandle) {
  42.254 +            final JLabel tmpMainLabel = ProgressHandleFactory.createMainLabelComponent(progressHandle);
  42.255 +            final JComponent tmpProgressPanel = ProgressHandleFactory.createProgressComponent(progressHandle);
  42.256 +            SwingUtilities.invokeLater(new Runnable() {
  42.257 +                public void run() {
  42.258 +                    progressPanel.removeAll();
  42.259 +                    progressPanel.add(tmpMainLabel);
  42.260 +                    progressPanel.add(Box.createRigidArea(new Dimension(0, 5)));
  42.261 +                    progressPanel.add(tmpProgressPanel);
  42.262 +                    progressPanel.revalidate();
  42.263 +                    progressPanel.repaint();
  42.264 +                }
  42.265 +            });
  42.266 +        }
  42.267 +    }
  42.268 +}
    43.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    43.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/EmbeddedBrowserEditor.form	Thu Nov 22 15:44:15 2012 +0100
    43.3 @@ -0,0 +1,55 @@
    43.4 +<?xml version="1.1" encoding="UTF-8" ?>
    43.5 +
    43.6 +<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
    43.7 +  <AuxValues>
    43.8 +    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
    43.9 +    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
   43.10 +    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
   43.11 +    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
   43.12 +    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
   43.13 +    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
   43.14 +    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
   43.15 +    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
   43.16 +    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
   43.17 +  </AuxValues>
   43.18 +
   43.19 +  <Layout>
   43.20 +    <DimensionLayout dim="0">
   43.21 +      <Group type="103" groupAlignment="0" attributes="0">
   43.22 +          <Group type="102" alignment="0" attributes="0">
   43.23 +              <EmptySpace max="-2" attributes="0"/>
   43.24 +              <Group type="103" groupAlignment="0" attributes="0">
   43.25 +                  <Group type="102" alignment="0" attributes="0">
   43.26 +                      <EmptySpace min="21" pref="21" max="21" attributes="0"/>
   43.27 +                      <Component id="comboBrowsers" pref="402" max="32767" attributes="0"/>
   43.28 +                  </Group>
   43.29 +                  <Component id="checkAnotherBrowser" alignment="0" min="-2" max="-2" attributes="0"/>
   43.30 +              </Group>
   43.31 +              <EmptySpace max="-2" attributes="0"/>
   43.32 +          </Group>
   43.33 +      </Group>
   43.34 +    </DimensionLayout>
   43.35 +    <DimensionLayout dim="1">
   43.36 +      <Group type="103" groupAlignment="0" attributes="0">
   43.37 +          <Group type="102" alignment="0" attributes="0">
   43.38 +              <EmptySpace max="-2" attributes="0"/>
   43.39 +              <Component id="checkAnotherBrowser" min="-2" max="-2" attributes="0"/>
   43.40 +              <EmptySpace max="-2" attributes="0"/>
   43.41 +              <Component id="comboBrowsers" min="-2" max="-2" attributes="0"/>
   43.42 +              <EmptySpace max="32767" attributes="0"/>
   43.43 +          </Group>
   43.44 +      </Group>
   43.45 +    </DimensionLayout>
   43.46 +  </Layout>
   43.47 +  <SubComponents>
   43.48 +    <Component class="javax.swing.JCheckBox" name="checkAnotherBrowser">
   43.49 +      <Properties>
   43.50 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
   43.51 +          <ResourceString bundle="org/netbeans/core/browser/Bundle.properties" key="EmbeddedBrowserEditor.checkAnotherBrowser.text" replaceFormat="NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
   43.52 +        </Property>
   43.53 +      </Properties>
   43.54 +    </Component>
   43.55 +    <Component class="javax.swing.JComboBox" name="comboBrowsers">
   43.56 +    </Component>
   43.57 +  </SubComponents>
   43.58 +</Form>
    44.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    44.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/EmbeddedBrowserEditor.java	Thu Nov 22 15:44:15 2012 +0100
    44.3 @@ -0,0 +1,222 @@
    44.4 +/*
    44.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    44.6 + *
    44.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    44.8 + *
    44.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   44.10 + * Other names may be trademarks of their respective owners.
   44.11 + *
   44.12 + * The contents of this file are subject to the terms of either the GNU
   44.13 + * General Public License Version 2 only ("GPL") or the Common
   44.14 + * Development and Distribution License("CDDL") (collectively, the
   44.15 + * "License"). You may not use this file except in compliance with the
   44.16 + * License. You can obtain a copy of the License at
   44.17 + * http://www.netbeans.org/cddl-gplv2.html
   44.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   44.19 + * specific language governing permissions and limitations under the
   44.20 + * License.  When distributing the software, include this License Header
   44.21 + * Notice in each file and include the License file at
   44.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   44.23 + * particular file as subject to the "Classpath" exception as provided
   44.24 + * by Oracle in the GPL Version 2 section of the License file that
   44.25 + * accompanied this code. If applicable, add the following below the
   44.26 + * License Header, with the fields enclosed by brackets [] replaced by
   44.27 + * your own identifying information:
   44.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   44.29 + *
   44.30 + * If you wish your version of this file to be governed by only the CDDL
   44.31 + * or only the GPL Version 2, indicate your decision by adding
   44.32 + * "[Contributor] elects to include this software in this distribution
   44.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   44.34 + * single choice of license, a recipient has the option to distribute
   44.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   44.36 + * to extend the choice of license to its licensees as provided above.
   44.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   44.38 + * Version 2 license, then the option applies only if the new code is
   44.39 + * made subject to such option by the copyright holder.
   44.40 + *
   44.41 + * Contributor(s):
   44.42 + *
   44.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   44.44 + */
   44.45 +
   44.46 +/*
   44.47 + * EmbeddedBrowserEditor.java
   44.48 + *
   44.49 + * Created on 11.8.2009, 13:32:26
   44.50 + */
   44.51 +
   44.52 +package org.netbeans.core.browser.xulrunner;
   44.53 +
   44.54 +import java.awt.event.ItemEvent;
   44.55 +import java.awt.event.ItemListener;
   44.56 +import java.beans.PropertyEditor;
   44.57 +import java.io.IOException;
   44.58 +import java.util.ArrayList;
   44.59 +import java.util.List;
   44.60 +import javax.swing.DefaultComboBoxModel;
   44.61 +import org.openide.awt.HtmlBrowser;
   44.62 +import org.openide.awt.HtmlBrowser.Factory;
   44.63 +import org.openide.cookies.InstanceCookie;
   44.64 +import org.openide.filesystems.FileObject;
   44.65 +import org.openide.filesystems.FileUtil;
   44.66 +import org.openide.loaders.DataFolder;
   44.67 +import org.openide.loaders.DataObject;
   44.68 +import org.openide.util.Exceptions;
   44.69 +import org.openide.util.Lookup;
   44.70 +import org.openide.util.NbBundle;
   44.71 +
   44.72 +/**
   44.73 + *
   44.74 + * @author S. Aubrecht
   44.75 + */
   44.76 +public class EmbeddedBrowserEditor extends javax.swing.JPanel implements ItemListener {
   44.77 +    
   44.78 +    private static final String BROWSERS_FOLDER = "Services/Browsers"; // NOI18N
   44.79 +
   44.80 +    private final List<? extends DataObject> browsers;
   44.81 +    private final PropertyEditor property;
   44.82 +
   44.83 +    /** Creates new form EmbeddedBrowserEditor */
   44.84 +    public EmbeddedBrowserEditor( PropertyEditor prop ) {
   44.85 +        this.property = prop;
   44.86 +        initComponents();
   44.87 +        browsers = loadBrowserList();
   44.88 +        checkAnotherBrowser.setSelected(true);
   44.89 +        String[] names = new String[browsers.size()];
   44.90 +        for( int i=0; i<browsers.size(); i++ ) {
   44.91 +            names[i] = browsers.get( i ).getNodeDelegate().getDisplayName();
   44.92 +        }
   44.93 +        checkAnotherBrowser.setSelected( prop.getValue() != null );
   44.94 +        comboBrowsers.setModel( new DefaultComboBoxModel(names));
   44.95 +        if( browsers.isEmpty() ) {
   44.96 +            checkAnotherBrowser.setEnabled(false);
   44.97 +            checkAnotherBrowser.setSelected(false);
   44.98 +            comboBrowsers.setSelectedIndex(-1);
   44.99 +        } else if( null != prop.getValue() ) {
  44.100 +            selectBrowser( (org.openide.awt.HtmlBrowser.Factory)prop.getValue() );
  44.101 +        }
  44.102 +        checkAnotherBrowser.addItemListener(this);
  44.103 +        comboBrowsers.addItemListener(this);
  44.104 +    }
  44.105 +
  44.106 +    /** This method is called from within the constructor to
  44.107 +     * initialize the form.
  44.108 +     * WARNING: Do NOT modify this code. The content of this method is
  44.109 +     * always regenerated by the Form Editor.
  44.110 +     */
  44.111 +    @SuppressWarnings("unchecked")
  44.112 +    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  44.113 +    private void initComponents() {
  44.114 +
  44.115 +        checkAnotherBrowser = new javax.swing.JCheckBox();
  44.116 +        comboBrowsers = new javax.swing.JComboBox();
  44.117 +
  44.118 +        checkAnotherBrowser.setText(NbBundle.getMessage(EmbeddedBrowserEditor.class, "EmbeddedBrowserEditor.checkAnotherBrowser.text")); // NOI18N
  44.119 +
  44.120 +        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
  44.121 +        this.setLayout(layout);
  44.122 +        layout.setHorizontalGroup(
  44.123 +            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  44.124 +            .addGroup(layout.createSequentialGroup()
  44.125 +                .addContainerGap()
  44.126 +                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  44.127 +                    .addGroup(layout.createSequentialGroup()
  44.128 +                        .addGap(21, 21, 21)
  44.129 +                        .addComponent(comboBrowsers, 0, 402, Short.MAX_VALUE))
  44.130 +                    .addComponent(checkAnotherBrowser))
  44.131 +                .addContainerGap())
  44.132 +        );
  44.133 +        layout.setVerticalGroup(
  44.134 +            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  44.135 +            .addGroup(layout.createSequentialGroup()
  44.136 +                .addContainerGap()
  44.137 +                .addComponent(checkAnotherBrowser)
  44.138 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  44.139 +                .addComponent(comboBrowsers, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  44.140 +                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  44.141 +        );
  44.142 +    }// </editor-fold>//GEN-END:initComponents
  44.143 +
  44.144 +
  44.145 +    // Variables declaration - do not modify//GEN-BEGIN:variables
  44.146 +    private javax.swing.JCheckBox checkAnotherBrowser;
  44.147 +    private javax.swing.JComboBox comboBrowsers;
  44.148 +    // End of variables declaration//GEN-END:variables
  44.149 +
  44.150 +    public void itemStateChanged(ItemEvent e) {
  44.151 +        comboBrowsers.setEnabled(checkAnotherBrowser.isSelected());
  44.152 +        storeSettings();
  44.153 +    }
  44.154 +
  44.155 +    private void storeSettings() {
  44.156 +        if( checkAnotherBrowser.isSelected() ) {
  44.157 +            DataObject dob = browsers.get(comboBrowsers.getSelectedIndex());
  44.158 +            HtmlBrowser.Factory newBrowser = null;
  44.159 +            try {
  44.160 +                newBrowser = (Factory) dob.getCookie(InstanceCookie.class).instanceCreate();
  44.161 +                Lookup.Result<HtmlBrowser.Factory> res = Lookup.getDefault ().lookupResult (HtmlBrowser.Factory.class);
  44.162 +                java.util.Iterator<? extends HtmlBrowser.Factory> it = res.allInstances ().iterator ();
  44.163 +                while (it.hasNext ()) {
  44.164 +                    HtmlBrowser.Factory brow = it.next ();
  44.165 +                    if( brow.equals(newBrowser) ) {
  44.166 +                        newBrowser = brow;
  44.167 +                        break;
  44.168 +                    }
  44.169 +                }
  44.170 +                property.setValue(newBrowser);
  44.171 +            } catch( IOException ex ) {
  44.172 +                Exceptions.printStackTrace(ex);
  44.173 +            } catch( ClassNotFoundException ex ) {
  44.174 +                Exceptions.printStackTrace(ex);
  44.175 +            }
  44.176 +        } else {
  44.177 +            property.setValue(null);
  44.178 +        }
  44.179 +    }
  44.180 +
  44.181 +    private List<? extends DataObject> loadBrowserList() {
  44.182 +        ArrayList<DataObject> res = new ArrayList<DataObject>(20);
  44.183 +
  44.184 +        FileObject servicesBrowsers = FileUtil.getConfigFile(BROWSERS_FOLDER);
  44.185 +
  44.186 +        if (servicesBrowsers != null) {
  44.187 +
  44.188 +            DataFolder folder = DataFolder.findFolder(servicesBrowsers);
  44.189 +            DataObject[] browserSettings = folder.getChildren();
  44.190 +
  44.191 +            for (DataObject browserSetting : browserSettings) {
  44.192 +
  44.193 +                InstanceCookie cookie = browserSetting.getCookie(InstanceCookie.class);
  44.194 +                FileObject primaryFile = browserSetting.getPrimaryFile();
  44.195 +                if( "EmbeddedBrowser.settings".equals(primaryFile.getNameExt()) ) {
  44.196 +                    continue;
  44.197 +                }
  44.198 +
  44.199 +                if (cookie != null && !Boolean.TRUE.equals(primaryFile.getAttribute("hidden"))) {
  44.200 +                    res.add(browserSetting);
  44.201 +                }
  44.202 +            }
  44.203 +        }
  44.204 +        return res;
  44.205 +    }
  44.206 +
  44.207 +    private void selectBrowser( HtmlBrowser.Factory browser ) {
  44.208 +        int selIndex = -1;
  44.209 +        for( int i=0; i<browsers.size(); i++ ) {
  44.210 +            DataObject dob = browsers.get(i);
  44.211 +            InstanceCookie cookie = dob.getCookie(InstanceCookie.class);
  44.212 +            try {
  44.213 +                if( browser.equals(cookie.instanceCreate()) ) {
  44.214 +                    selIndex = i;
  44.215 +                    break;
  44.216 +                }
  44.217 +            } catch( IOException ex ) {
  44.218 +                Exceptions.printStackTrace(ex);
  44.219 +            } catch( ClassNotFoundException ex ) {
  44.220 +                Exceptions.printStackTrace(ex);
  44.221 +            }
  44.222 +        }
  44.223 +        comboBrowsers.setSelectedIndex(selIndex);
  44.224 +    }
  44.225 +}
    45.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    45.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/EmbeddedBrowserFactoryImpl.java	Thu Nov 22 15:44:15 2012 +0100
    45.3 @@ -0,0 +1,91 @@
    45.4 +/*
    45.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    45.6 + *
    45.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    45.8 + *
    45.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   45.10 + * Other names may be trademarks of their respective owners.
   45.11 + *
   45.12 + * The contents of this file are subject to the terms of either the GNU
   45.13 + * General Public License Version 2 only ("GPL") or the Common
   45.14 + * Development and Distribution License("CDDL") (collectively, the
   45.15 + * "License"). You may not use this file except in compliance with the
   45.16 + * License. You can obtain a copy of the License at
   45.17 + * http://www.netbeans.org/cddl-gplv2.html
   45.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   45.19 + * specific language governing permissions and limitations under the
   45.20 + * License.  When distributing the software, include this License Header
   45.21 + * Notice in each file and include the License file at
   45.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   45.23 + * particular file as subject to the "Classpath" exception as provided
   45.24 + * by Oracle in the GPL Version 2 section of the License file that
   45.25 + * accompanied this code. If applicable, add the following below the
   45.26 + * License Header, with the fields enclosed by brackets [] replaced by
   45.27 + * your own identifying information:
   45.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   45.29 + *
   45.30 + * If you wish your version of this file to be governed by only the CDDL
   45.31 + * or only the GPL Version 2, indicate your decision by adding
   45.32 + * "[Contributor] elects to include this software in this distribution
   45.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   45.34 + * single choice of license, a recipient has the option to distribute
   45.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   45.36 + * to extend the choice of license to its licensees as provided above.
   45.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   45.38 + * Version 2 license, then the option applies only if the new code is
   45.39 + * made subject to such option by the copyright holder.
   45.40 + *
   45.41 + * Contributor(s):
   45.42 + *
   45.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   45.44 + */
   45.45 +
   45.46 +package org.netbeans.core.browser.xulrunner;
   45.47 +
   45.48 +import java.beans.PropertyChangeListener;
   45.49 +import java.beans.PropertyChangeSupport;
   45.50 +import javax.swing.event.ChangeEvent;
   45.51 +import javax.swing.event.ChangeListener;
   45.52 +import org.netbeans.core.browser.api.EmbeddedBrowserFactory;
   45.53 +import org.netbeans.core.browser.api.WebBrowser;
   45.54 +import org.openide.util.lookup.ServiceProvider;
   45.55 +
   45.56 +/**
   45.57 + * Embedded browser factory.
   45.58 + * 
   45.59 + * @author S. Aubrecht
   45.60 + */
   45.61 +@ServiceProvider(service=EmbeddedBrowserFactory.class)
   45.62 +public class EmbeddedBrowserFactoryImpl extends EmbeddedBrowserFactory {
   45.63 +
   45.64 +    private final PropertyChangeSupport propSupport = new PropertyChangeSupport(this);
   45.65 +    public EmbeddedBrowserFactoryImpl() {
   45.66 +        BrowserManager.getDefault().addChangeListener(new ChangeListener() {
   45.67 +            public void stateChanged(ChangeEvent e) {
   45.68 +                propSupport.firePropertyChange(PROP_ENABLED, null, this);
   45.69 +            }
   45.70 +        });
   45.71 +    }
   45.72 +
   45.73 +    @Override
   45.74 +    public boolean isEnabled() {
   45.75 +        return BrowserManager.isSupportedPlatform() && BrowserManager.getDefault().isEnabled();
   45.76 +    }
   45.77 +
   45.78 +    @Override
   45.79 +    public WebBrowser createEmbeddedBrowser() {
   45.80 +        if( !isEnabled() )
   45.81 +            throw new IllegalStateException();
   45.82 +        return new WebBrowserImpl();
   45.83 +    }
   45.84 +
   45.85 +    @Override
   45.86 +    public void addPropertyChangeListener(PropertyChangeListener l) {
   45.87 +        propSupport.addPropertyChangeListener(l);
   45.88 +    }
   45.89 +
   45.90 +    @Override
   45.91 +    public void removePropertyChangeListener(PropertyChangeListener l) {
   45.92 +        propSupport.removePropertyChangeListener(l);
   45.93 +    }
   45.94 +}
    46.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    46.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/HtmlBrowserImpl.java	Thu Nov 22 15:44:15 2012 +0100
    46.3 @@ -0,0 +1,137 @@
    46.4 +package org.netbeans.core.browser.xulrunner;
    46.5 +
    46.6 +import java.awt.Component;
    46.7 +import java.beans.PropertyChangeListener;
    46.8 +import java.net.MalformedURLException;
    46.9 +import java.net.URL;
   46.10 +import java.util.logging.Level;
   46.11 +import java.util.logging.Logger;
   46.12 +import org.netbeans.core.browser.api.WebBrowser;
   46.13 +import org.openide.awt.HtmlBrowser;
   46.14 +
   46.15 +/**
   46.16 + * HTML browser implementation which uses embedded native browser component.
   46.17 + *
   46.18 + * @author S. Aubrecht
   46.19 + */
   46.20 +class HtmlBrowserImpl extends HtmlBrowser.Impl {
   46.21 +
   46.22 +    private WebBrowser browser;
   46.23 +    private final Object LOCK = new Object();
   46.24 +
   46.25 +    public HtmlBrowserImpl() {
   46.26 +        super();
   46.27 +    }
   46.28 +
   46.29 +    @Override
   46.30 +    public Component getComponent() {
   46.31 +        return getBrowser().getComponent();
   46.32 +    }
   46.33 +
   46.34 +    private WebBrowser getBrowser() {
   46.35 +        synchronized( LOCK ) {
   46.36 +            if( null == browser ) {
   46.37 +                browser = new WebBrowserImpl();
   46.38 +            }
   46.39 +            return browser;
   46.40 +        }
   46.41 +    }
   46.42 +
   46.43 +    @Override
   46.44 +    public void reloadDocument() {
   46.45 +        getBrowser().reloadDocument();
   46.46 +    }
   46.47 +
   46.48 +    @Override
   46.49 +    public void stopLoading() {
   46.50 +        getBrowser().stopLoading();
   46.51 +    }
   46.52 +
   46.53 +    @Override
   46.54 +    public void setURL(URL url) {
   46.55 +        getBrowser().setURL(url.toString());
   46.56 +    }
   46.57 +
   46.58 +    @Override
   46.59 +    public URL getURL() {
   46.60 +        String strUrl = getBrowser().getURL();
   46.61 +        if( null == strUrl )
   46.62 +            return null;
   46.63 +        try {
   46.64 +            return new URL(strUrl);
   46.65 +        } catch( MalformedURLException ex ) {
   46.66 +            Logger.getLogger(HtmlBrowserImpl.class.getName()).log(Level.FINE, null, ex);
   46.67 +        }
   46.68 +        return null;
   46.69 +    }
   46.70 +
   46.71 +    @Override
   46.72 +    public String getLocation() {
   46.73 +        return getBrowser().getURL();
   46.74 +    }
   46.75 +
   46.76 +    @Override
   46.77 +    public void setLocation(String str) {
   46.78 +        getBrowser().setURL(str);
   46.79 +    }
   46.80 +
   46.81 +    @Override
   46.82 +    public String getStatusMessage() {
   46.83 +        return getBrowser().getStatusMessage();
   46.84 +    }
   46.85 +
   46.86 +    @Override
   46.87 +    public String getTitle() {
   46.88 +        return getBrowser().getTitle();
   46.89 +    }
   46.90 +
   46.91 +    @Override
   46.92 +    public boolean isForward() {
   46.93 +        return getBrowser().isForward();
   46.94 +    }
   46.95 +
   46.96 +    @Override
   46.97 +    public void forward() {
   46.98 +        getBrowser().forward();
   46.99 +    }
  46.100 +
  46.101 +    @Override
  46.102 +    public boolean isBackward() {
  46.103 +        return getBrowser().isBackward();
  46.104 +    }
  46.105 +
  46.106 +    @Override
  46.107 +    public void backward() {
  46.108 +        getBrowser().backward();
  46.109 +    }
  46.110 +
  46.111 +    @Override
  46.112 +    public boolean isHistory() {
  46.113 +        return getBrowser().isHistory();
  46.114 +    }
  46.115 +
  46.116 +    @Override
  46.117 +    public void showHistory() {
  46.118 +        getBrowser().showHistory();
  46.119 +    }
  46.120 +
  46.121 +    @Override
  46.122 +    public void addPropertyChangeListener(PropertyChangeListener l) {
  46.123 +        getBrowser().addPropertyChangeListener(l);
  46.124 +    }
  46.125 +
  46.126 +    @Override
  46.127 +    public void removePropertyChangeListener(PropertyChangeListener l) {
  46.128 +        getBrowser().removePropertyChangeListener(l);
  46.129 +    }
  46.130 +
  46.131 +    @Override
  46.132 +    public void dispose() {
  46.133 +        synchronized( LOCK ) {
  46.134 +            if( null != browser ) {
  46.135 +                browser.dispose();
  46.136 +            }
  46.137 +            browser = null;
  46.138 +        }
  46.139 +    }
  46.140 +}
    47.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    47.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/Installer.java	Thu Nov 22 15:44:15 2012 +0100
    47.3 @@ -0,0 +1,56 @@
    47.4 +/*
    47.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    47.6 + *
    47.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    47.8 + *
    47.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   47.10 + * Other names may be trademarks of their respective owners.
   47.11 + *
   47.12 + * The contents of this file are subject to the terms of either the GNU
   47.13 + * General Public License Version 2 only ("GPL") or the Common
   47.14 + * Development and Distribution License("CDDL") (collectively, the
   47.15 + * "License"). You may not use this file except in compliance with the
   47.16 + * License. You can obtain a copy of the License at
   47.17 + * http://www.netbeans.org/cddl-gplv2.html
   47.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   47.19 + * specific language governing permissions and limitations under the
   47.20 + * License.  When distributing the software, include this License Header
   47.21 + * Notice in each file and include the License file at
   47.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   47.23 + * particular file as subject to the "Classpath" exception as provided
   47.24 + * by Oracle in the GPL Version 2 section of the License file that
   47.25 + * accompanied this code. If applicable, add the following below the
   47.26 + * License Header, with the fields enclosed by brackets [] replaced by
   47.27 + * your own identifying information:
   47.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   47.29 + *
   47.30 + * If you wish your version of this file to be governed by only the CDDL
   47.31 + * or only the GPL Version 2, indicate your decision by adding
   47.32 + * "[Contributor] elects to include this software in this distribution
   47.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   47.34 + * single choice of license, a recipient has the option to distribute
   47.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   47.36 + * to extend the choice of license to its licensees as provided above.
   47.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   47.38 + * Version 2 license, then the option applies only if the new code is
   47.39 + * made subject to such option by the copyright holder.
   47.40 + *
   47.41 + * Contributor(s):
   47.42 + *
   47.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   47.44 + */
   47.45 +package org.netbeans.core.browser.xulrunner;
   47.46 +
   47.47 +import org.openide.modules.ModuleInstall;
   47.48 +
   47.49 +/**
   47.50 + * Manages a module's lifecycle. Remember that an installer is optional and
   47.51 + * often not needed at all.
   47.52 + */
   47.53 +public class Installer extends ModuleInstall {
   47.54 +
   47.55 +    @Override
   47.56 +    public void restored() {
   47.57 +        System.setProperty("mozswing.gtklaf_check", "false"); //NOI18N
   47.58 +    }
   47.59 +}
    48.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    48.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/Platform.java	Thu Nov 22 15:44:15 2012 +0100
    48.3 @@ -0,0 +1,174 @@
    48.4 +/*
    48.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    48.6 + *
    48.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    48.8 + *
    48.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   48.10 + * Other names may be trademarks of their respective owners.
   48.11 + *
   48.12 + * The contents of this file are subject to the terms of either the GNU
   48.13 + * General Public License Version 2 only ("GPL") or the Common
   48.14 + * Development and Distribution License("CDDL") (collectively, the
   48.15 + * "License"). You may not use this file except in compliance with the
   48.16 + * License. You can obtain a copy of the License at
   48.17 + * http://www.netbeans.org/cddl-gplv2.html
   48.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   48.19 + * specific language governing permissions and limitations under the
   48.20 + * License.  When distributing the software, include this License Header
   48.21 + * Notice in each file and include the License file at
   48.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   48.23 + * particular file as subject to the "Classpath" exception as provided
   48.24 + * by Oracle in the GPL Version 2 section of the License file that
   48.25 + * accompanied this code. If applicable, add the following below the
   48.26 + * License Header, with the fields enclosed by brackets [] replaced by
   48.27 + * your own identifying information:
   48.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   48.29 + *
   48.30 + * If you wish your version of this file to be governed by only the CDDL
   48.31 + * or only the GPL Version 2, indicate your decision by adding
   48.32 + * "[Contributor] elects to include this software in this distribution
   48.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   48.34 + * single choice of license, a recipient has the option to distribute
   48.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   48.36 + * to extend the choice of license to its licensees as provided above.
   48.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   48.38 + * Version 2 license, then the option applies only if the new code is
   48.39 + * made subject to such option by the copyright holder.
   48.40 + *
   48.41 + * Contributor(s):
   48.42 + *
   48.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   48.44 + */
   48.45 +package org.netbeans.core.browser.xulrunner;
   48.46 +
   48.47 +import java.util.StringTokenizer;
   48.48 +
   48.49 +/**
   48.50 + * List of supported platforms.
   48.51 + * 
   48.52 + * @author S. Aubrecht
   48.53 + */
   48.54 +public enum Platform {
   48.55 +    OSX("macosx"), Linux("linux"), Win32("win32"), Solaris("solaris-x86"), Unsupported(""); //NOI18N //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
   48.56 +
   48.57 +    public static final Platform platform;
   48.58 +    public static final String arch;
   48.59 +    public static final String codeNameBase;
   48.60 +    static final String xulRunnerHome;
   48.61 +
   48.62 +    static {
   48.63 +        String osname = System.getProperty("os.name"); //NOI18N
   48.64 +        if ("Mac OS X".equals(osname)) { //NOI18N
   48.65 +            platform = Platform.OSX;
   48.66 +            codeNameBase = "org.netbeans.core.browser.xulrunner.macosx"; //NOI18N
   48.67 +            xulRunnerHome = "modules/lib/native/macosx/xulrunner"; //NOI18N
   48.68 +        } else if ("Linux".equals(osname)) { //NOI18N
   48.69 +            platform = Platform.Linux;
   48.70 +            codeNameBase = "org.netbeans.core.browser.xulrunner.linux"; //NOI18N
   48.71 +            xulRunnerHome = "modules/lib/native/linux/xulrunner"; //NOI18N
   48.72 +        } else if ("SunOS".equals(osname)) { //NOI18N
   48.73 +            platform = Platform.Solaris;
   48.74 +            codeNameBase = "org.netbeans.core.browser.xulrunner.solaris"; //NOI18N
   48.75 +            xulRunnerHome = "modules/lib/native/solaris-x86/xulrunner"; //NOI18N
   48.76 +        } else if (osname.contains("Windows")) {
   48.77 +            platform = Platform.Win32;
   48.78 +            codeNameBase = "org.netbeans.core.browser.xulrunner.win"; //NOI18N
   48.79 +            xulRunnerHome = "modules/lib/native/win32/xulrunner"; //NOI18N
   48.80 +        } else {
   48.81 +            platform = Platform.Unsupported;
   48.82 +            codeNameBase = "org.netbeans.core.browser.xulrunner.unsupported"; //NOI18N
   48.83 +            xulRunnerHome = "modules/lib/native/unsupported/xulrunner"; //NOI18N
   48.84 +        }
   48.85 +
   48.86 +        String osarch = System.getProperty("os.arch"); //NOI18N
   48.87 +        String archTemp = osarch;
   48.88 +        for (String x : new String[]{"i386", "i486", "i586", "i686"}) { //NOI18N //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
   48.89 +            if (x.equals(osarch)) {
   48.90 +                archTemp = "x86"; //NOI18N
   48.91 +                break;
   48.92 +            }
   48.93 +        }
   48.94 +        arch = archTemp;
   48.95 +    }
   48.96 +
   48.97 +    private final String libDir;
   48.98 +
   48.99 +    private Platform(String libDir) {
  48.100 +        this.libDir = libDir;
  48.101 +    }
  48.102 +
  48.103 +    public String libDir() {
  48.104 +        return libDir;
  48.105 +    }
  48.106 +
  48.107 +    public String arch() {
  48.108 +        return arch;
  48.109 +    }
  48.110 +
  48.111 +    public boolean is32Bit() {
  48.112 +        return "x86".equals(arch);
  48.113 +    }
  48.114 +
  48.115 +    public static boolean usingGTK2Toolkit() {
  48.116 +        return platform==Linux || platform==Solaris;
  48.117 +    }
  48.118 +
  48.119 +    public static long getJavaVersion() {
  48.120 +        String v = System.getProperty("java.version"); //NOI18N
  48.121 +        return jdkVersionToNumber(v);
  48.122 +    }
  48.123 +
  48.124 +    public static boolean checkJavaVersion(String minVersion, String maxVersion) {
  48.125 +        long current = getJavaVersion();
  48.126 +
  48.127 +        if (minVersion!=null && minVersion.length()>0) {
  48.128 +            long min = jdkVersionToNumber(minVersion);
  48.129 +            if (current<min) return false;
  48.130 +        }
  48.131 +
  48.132 +        if (maxVersion!=null && maxVersion.length()>0) {
  48.133 +            long max = jdkVersionToNumber(maxVersion);
  48.134 +            if (current>max) return false;
  48.135 +        }
  48.136 +
  48.137 +        return true;
  48.138 +    }
  48.139 +
  48.140 +    private static long jdkVersionToNumber(String verStr) {
  48.141 +        try {
  48.142 +            String numStr;
  48.143 +            String buildStr;
  48.144 +            int idx = verStr.indexOf("_"); //NOI18N
  48.145 +            if (idx>=0) {
  48.146 +                numStr = verStr.substring(0, idx);
  48.147 +                buildStr = verStr.substring(idx+1);
  48.148 +            } else {
  48.149 +                numStr = verStr;
  48.150 +                buildStr = ""; //NOI18N
  48.151 +            }
  48.152 +
  48.153 +            long num = 0;
  48.154 +            StringTokenizer st = new StringTokenizer(numStr, "."); //NOI18N
  48.155 +            long shift = 100*100*100;
  48.156 +            while (st.hasMoreTokens()) {
  48.157 +                String s = st.nextToken();
  48.158 +                int n = Integer.parseInt(s);
  48.159 +                num += n*shift;
  48.160 +                shift /= 100;
  48.161 +            }
  48.162 +
  48.163 +            if (buildStr.startsWith("b")) buildStr = buildStr.substring(1); //NOI18N
  48.164 +            if( buildStr.contains("-") ) //NOI18N
  48.165 +                buildStr = buildStr.substring(0, buildStr.indexOf("-")); //NOI18N
  48.166 +            if (buildStr.length()>0) {
  48.167 +                int n = Integer.parseInt(buildStr);
  48.168 +                num += n;
  48.169 +            }
  48.170 +
  48.171 +            return num;
  48.172 +        } catch (NumberFormatException e) {
  48.173 +            throw new RuntimeException("Error parsing java version: "+verStr); //NOI18N
  48.174 +        }
  48.175 +    }
  48.176 +
  48.177 +}
    49.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    49.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/WebBrowserEventImpl.java	Thu Nov 22 15:44:15 2012 +0100
    49.3 @@ -0,0 +1,112 @@
    49.4 +/*
    49.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    49.6 + *
    49.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    49.8 + *
    49.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   49.10 + * Other names may be trademarks of their respective owners.
   49.11 + *
   49.12 + * The contents of this file are subject to the terms of either the GNU
   49.13 + * General Public License Version 2 only ("GPL") or the Common
   49.14 + * Development and Distribution License("CDDL") (collectively, the
   49.15 + * "License"). You may not use this file except in compliance with the
   49.16 + * License. You can obtain a copy of the License at
   49.17 + * http://www.netbeans.org/cddl-gplv2.html
   49.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   49.19 + * specific language governing permissions and limitations under the
   49.20 + * License.  When distributing the software, include this License Header
   49.21 + * Notice in each file and include the License file at
   49.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   49.23 + * particular file as subject to the "Classpath" exception as provided
   49.24 + * by Oracle in the GPL Version 2 section of the License file that
   49.25 + * accompanied this code. If applicable, add the following below the
   49.26 + * License Header, with the fields enclosed by brackets [] replaced by
   49.27 + * your own identifying information:
   49.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   49.29 + *
   49.30 + * If you wish your version of this file to be governed by only the CDDL
   49.31 + * or only the GPL Version 2, indicate your decision by adding
   49.32 + * "[Contributor] elects to include this software in this distribution
   49.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   49.34 + * single choice of license, a recipient has the option to distribute
   49.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   49.36 + * to extend the choice of license to its licensees as provided above.
   49.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   49.38 + * Version 2 license, then the option applies only if the new code is
   49.39 + * made subject to such option by the copyright holder.
   49.40 + *
   49.41 + * Contributor(s):
   49.42 + *
   49.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   49.44 + */
   49.45 +
   49.46 +package org.netbeans.core.browser.xulrunner;
   49.47 +
   49.48 +import org.netbeans.core.browser.api.*;
   49.49 +import java.awt.AWTEvent;
   49.50 +import org.w3c.dom.Node;
   49.51 +
   49.52 +/**
   49.53 + * Browser event implementation.
   49.54 + * 
   49.55 + * @author S. Aubrecht
   49.56 + */
   49.57 +class WebBrowserEventImpl extends WebBrowserEvent {
   49.58 +
   49.59 +    private final int type;
   49.60 +    private final WebBrowser browser;
   49.61 +    private final Node node;
   49.62 +    private final AWTEvent event;
   49.63 +    private boolean cancelled = false;
   49.64 +    private final String url;
   49.65 +
   49.66 +    public WebBrowserEventImpl( int type, WebBrowser browser, String url ) {
   49.67 +        this.type = type;
   49.68 +        this.browser = browser;
   49.69 +        this.url = url;
   49.70 +        this.event = null;
   49.71 +        this.node = null;
   49.72 +    }
   49.73 +
   49.74 +    public WebBrowserEventImpl( int type, WebBrowser browser, AWTEvent event, Node node ) {
   49.75 +        this.type = type;
   49.76 +        this.browser = browser;
   49.77 +        this.event = event;
   49.78 +        this.node = node;
   49.79 +        this.url = null;
   49.80 +    }
   49.81 +
   49.82 +    @Override
   49.83 +    public int getType() {
   49.84 +        return type;
   49.85 +    }
   49.86 +
   49.87 +    @Override
   49.88 +    public WebBrowser getWebBrowser() {
   49.89 +        return browser;
   49.90 +    }
   49.91 +
   49.92 +    @Override
   49.93 +    public String getURL() {
   49.94 +        return null != url ? url : browser.getURL();
   49.95 +    }
   49.96 +
   49.97 +    @Override
   49.98 +    public AWTEvent getAWTEvent() {
   49.99 +        return event;
  49.100 +    }
  49.101 +
  49.102 +    @Override
  49.103 +    public Node getNode() {
  49.104 +        return node;
  49.105 +    }
  49.106 +
  49.107 +    @Override
  49.108 +    public void cancel() {
  49.109 +        cancelled = true;
  49.110 +    }
  49.111 +
  49.112 +    boolean isCancelled() {
  49.113 +        return cancelled;
  49.114 +    }
  49.115 +}
    50.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    50.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/WebBrowserImpl.java	Thu Nov 22 15:44:15 2012 +0100
    50.3 @@ -0,0 +1,558 @@
    50.4 +/*
    50.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    50.6 + *
    50.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    50.8 + *
    50.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   50.10 + * Other names may be trademarks of their respective owners.
   50.11 + *
   50.12 + * The contents of this file are subject to the terms of either the GNU
   50.13 + * General Public License Version 2 only ("GPL") or the Common
   50.14 + * Development and Distribution License("CDDL") (collectively, the
   50.15 + * "License"). You may not use this file except in compliance with the
   50.16 + * License. You can obtain a copy of the License at
   50.17 + * http://www.netbeans.org/cddl-gplv2.html
   50.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   50.19 + * specific language governing permissions and limitations under the
   50.20 + * License.  When distributing the software, include this License Header
   50.21 + * Notice in each file and include the License file at
   50.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   50.23 + * particular file as subject to the "Classpath" exception as provided
   50.24 + * by Oracle in the GPL Version 2 section of the License file that
   50.25 + * accompanied this code. If applicable, add the following below the
   50.26 + * License Header, with the fields enclosed by brackets [] replaced by
   50.27 + * your own identifying information:
   50.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   50.29 + *
   50.30 + * If you wish your version of this file to be governed by only the CDDL
   50.31 + * or only the GPL Version 2, indicate your decision by adding
   50.32 + * "[Contributor] elects to include this software in this distribution
   50.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   50.34 + * single choice of license, a recipient has the option to distribute
   50.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   50.36 + * to extend the choice of license to its licensees as provided above.
   50.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   50.38 + * Version 2 license, then the option applies only if the new code is
   50.39 + * made subject to such option by the copyright holder.
   50.40 + *
   50.41 + * Contributor(s):
   50.42 + *
   50.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   50.44 + */
   50.45 +
   50.46 +package org.netbeans.core.browser.xulrunner;
   50.47 +
   50.48 +import java.awt.AWTEvent;
   50.49 +import java.awt.BorderLayout;
   50.50 +import java.awt.Component;
   50.51 +import java.awt.Dimension;
   50.52 +import java.awt.Window;
   50.53 +import java.beans.PropertyChangeEvent;
   50.54 +import java.beans.PropertyChangeListener;
   50.55 +import java.beans.PropertyChangeSupport;
   50.56 +import java.lang.ref.WeakReference;
   50.57 +import java.util.ArrayList;
   50.58 +import java.util.HashMap;
   50.59 +import java.util.List;
   50.60 +import java.util.Map;
   50.61 +import java.util.logging.Level;
   50.62 +import java.util.logging.Logger;
   50.63 +import javax.swing.JFrame;
   50.64 +import javax.swing.JLabel;
   50.65 +import javax.swing.JPanel;
   50.66 +import javax.swing.SwingUtilities;
   50.67 +import javax.swing.event.ChangeEvent;
   50.68 +import javax.swing.event.ChangeListener;
   50.69 +import org.mozilla.browser.MozillaRuntimeException;
   50.70 +import org.mozilla.browser.XPCOMUtils;
   50.71 +import org.mozilla.interfaces.nsICookie;
   50.72 +import org.mozilla.interfaces.nsICookieManager;
   50.73 +import org.mozilla.interfaces.nsICookieManager2;
   50.74 +import org.mozilla.interfaces.nsISimpleEnumerator;
   50.75 +import org.mozilla.interfaces.nsISupports;
   50.76 +import org.mozilla.xpcom.XPCOMException;
   50.77 +import org.netbeans.core.browser.api.WebBrowser;
   50.78 +import org.netbeans.core.browser.api.WebBrowserEvent;
   50.79 +import org.netbeans.core.browser.api.WebBrowserListener;
   50.80 +import org.openide.util.Lookup;
   50.81 +import org.openide.util.NbBundle;
   50.82 +import org.openide.util.Utilities;
   50.83 +import org.openide.windows.TopComponent;
   50.84 +import org.w3c.dom.Document;
   50.85 +import org.w3c.dom.Node;
   50.86 +
   50.87 +/**
   50.88 + * Browser component implementation.
   50.89 + *
   50.90 + * @author S. Aubrecht
   50.91 + */
   50.92 +class WebBrowserImpl extends WebBrowser implements BrowserCallback {
   50.93 +    private static final String SERVICE_COOKIE_MANAGER = "@mozilla.org/cookiemanager;1"; //NOI18N
   50.94 +
   50.95 +    private JPanel container;
   50.96 +    private BrowserPanel browser;
   50.97 +    private String urlToLoad;
   50.98 +    private String contentToLoad;
   50.99 +    private final PropertyChangeSupport propSupport = new PropertyChangeSupport(this);
  50.100 +    private final List<WebBrowserListener> browserListners = new ArrayList<WebBrowserListener>(10);
  50.101 +    private final Object LOCK = new Object();
  50.102 +    private PropertyChangeListener tcListener;
  50.103 +
  50.104 +    private boolean disposed = false;
  50.105 +
  50.106 +    private static final Logger LOG = Logger.getLogger(WebBrowserImpl.class.getName());
  50.107 +
  50.108 +    private static final String CA_DOMAIN = "domain"; //NOI18N
  50.109 +    private static final String CA_PATH = "path"; //NOI18N
  50.110 +    private static final String CA_NAME = "name"; //NOI18N
  50.111 +    private static final String CA_VALUE = "value"; //NOI18N
  50.112 +    private static final String CA_IS_SECURE = "isSecure"; //NOI18N
  50.113 +    private static final String CA_IS_HTTP_ONLY = "isHttpOnly"; //NOI18N
  50.114 +    private static final String CA_IS_SESSION = "isSession"; //NOI18N
  50.115 +    private static final String CA_EXPIRY = "expiry"; //NOI18N
  50.116 +
  50.117 +    public WebBrowserImpl() {
  50.118 +    }
  50.119 +
  50.120 +    @Override
  50.121 +    public Component getComponent() {
  50.122 +        synchronized( LOCK ) {
  50.123 +            if( null == container ) {
  50.124 +                final BrowserManager bm = BrowserManager.getDefault();
  50.125 +                container = new BrowserContainer();
  50.126 +                if( bm.isNativeModuleAvailable() ) {
  50.127 +                    //create browser
  50.128 +                    createBrowser();
  50.129 +                } else {
  50.130 +                    //create a prompt for the user download native binaries
  50.131 +                    container.add( bm.createDownloadNativeModulePanel(), BorderLayout.CENTER );
  50.132 +                    BrowserManager.getDefault().addChangeListener(new ChangeListener() {
  50.133 +                        public void stateChanged(ChangeEvent e) {
  50.134 +                            bm.removeChangeListener(this);
  50.135 +                            if( bm.isEnabled() ) {
  50.136 +                                createBrowser();
  50.137 +                            } else {
  50.138 +                                createDisabledLabel();
  50.139 +                            }
  50.140 +                        }
  50.141 +                    });
  50.142 +                }
  50.143 +                if( Utilities.isMac() ) {
  50.144 +                    tcListener = createTopComponentListener();
  50.145 +                    TopComponent.getRegistry().addPropertyChangeListener( tcListener );
  50.146 +                }
  50.147 +            }
  50.148 +        }
  50.149 +        return container;
  50.150 +    }
  50.151 +
  50.152 +    private void createBrowser() {
  50.153 +        synchronized( LOCK ) {
  50.154 +            container.removeAll();
  50.155 +            browser = new BrowserPanel(propSupport, this);
  50.156 +            if( null != contentToLoad ) {
  50.157 +                browser.loadHTML(contentToLoad);
  50.158 +            } else if( null != urlToLoad ) {
  50.159 +                browser.load(urlToLoad);
  50.160 +            }
  50.161 +            container.add(browser, BorderLayout.CENTER);
  50.162 +            container.revalidate();
  50.163 +            container.invalidate();
  50.164 +            container.repaint();
  50.165 +            parentWindow = new WeakReference<Window>( SwingUtilities.getWindowAncestor(container) );
  50.166 +        }
  50.167 +    }
  50.168 +
  50.169 +    private void createDisabledLabel() {
  50.170 +        synchronized( LOCK ) {
  50.171 +            container.removeAll();
  50.172 +            JLabel lbl = new JLabel(NbBundle.getMessage(WebBrowserImpl.class, "LBL_EmbeddedBrowserDisabled")); //NOI18N
  50.173 +            lbl.setVerticalAlignment(JLabel.CENTER);
  50.174 +            lbl.setHorizontalAlignment(JLabel.CENTER);
  50.175 +            lbl.setEnabled(false);
  50.176 +            container.add(lbl, BorderLayout.CENTER);
  50.177 +            container.revalidate();
  50.178 +            container.invalidate();
  50.179 +            container.repaint();
  50.180 +        }
  50.181 +    }
  50.182 +
  50.183 +    @Override
  50.184 +    public void reloadDocument() {
  50.185 +        if( !isInitialized() )
  50.186 +            return;
  50.187 +        browser.reload();
  50.188 +    }
  50.189 +
  50.190 +    @Override
  50.191 +    public void stopLoading() {
  50.192 +        if( !isInitialized() )
  50.193 +            return;
  50.194 +        browser.stop();
  50.195 +    }
  50.196 +
  50.197 +    @Override
  50.198 +    public void setURL(String url) {
  50.199 +        if( !isInitialized() ) {
  50.200 +            urlToLoad = url;
  50.201 +            return;
  50.202 +        }
  50.203 +        try {
  50.204 +            browser.load(url);
  50.205 +        } catch( MozillaRuntimeException ex ) {
  50.206 +            //invalid URL
  50.207 +            Logger.getLogger(WebBrowserImpl.class.getName()).log(Level.FINE, null, ex);
  50.208 +        } catch( XPCOMException ex ) {
  50.209 +            //invalid URL
  50.210 +            Logger.getLogger(WebBrowserImpl.class.getName()).log(Level.FINE, null, ex);
  50.211 +        }
  50.212 +    }
  50.213 +
  50.214 +    @Override
  50.215 +    public String getURL() {
  50.216 +        if( !isInitialized() )
  50.217 +            return null;
  50.218 +        try {
  50.219 +            String url = browser.getUrl();
  50.220 +            if( null == url )
  50.221 +                url = urlToLoad;
  50.222 +            return url;
  50.223 +        } catch( MozillaRuntimeException ex ) {
  50.224 +            Logger.getLogger(WebBrowserImpl.class.getName()).log(Level.FINE, null, ex);
  50.225 +        }
  50.226 +        return null;
  50.227 +    }
  50.228 +
  50.229 +    @Override
  50.230 +    public String getStatusMessage() {
  50.231 +        if( !isInitialized() )
  50.232 +            return null;
  50.233 +        return browser.getStatusText();
  50.234 +    }
  50.235 +
  50.236 +    @Override
  50.237 +    public String getTitle() {
  50.238 +        if( !isInitialized() )
  50.239 +            return null;
  50.240 +        return browser.getTitleText();
  50.241 +    }
  50.242 +
  50.243 +    @Override
  50.244 +    public boolean isForward() {
  50.245 +        if( !isInitialized() )
  50.246 +            return false;
  50.247 +        return browser.isForwardEnabled();
  50.248 +    }
  50.249 +
  50.250 +    @Override
  50.251 +    public void forward() {
  50.252 +        if( !isInitialized() )
  50.253 +            return;
  50.254 +        try {
  50.255 +            browser.goForward();
  50.256 +        } catch( MozillaRuntimeException e ) {
  50.257 +            LOG.log(Level.FINE, null, e);
  50.258 +        }
  50.259 +    }
  50.260 +
  50.261 +    @Override
  50.262 +    public boolean isBackward() {
  50.263 +        if( !isInitialized() )
  50.264 +            return false;
  50.265 +        return browser.isBackwardEnabled();
  50.266 +    }
  50.267 +
  50.268 +    @Override
  50.269 +    public void backward() {
  50.270 +        if( !isInitialized() )
  50.271 +            return;
  50.272 +        try {
  50.273 +            browser.goBack();
  50.274 +        } catch( MozillaRuntimeException e ) {
  50.275 +            LOG.log(Level.FINE, null, e);
  50.276 +        }
  50.277 +    }
  50.278 +
  50.279 +    @Override
  50.280 +    public boolean isHistory() {
  50.281 +        return false; //TODO implement this
  50.282 +    }
  50.283 +
  50.284 +    @Override
  50.285 +    public void showHistory() {
  50.286 +        //TODO implement this
  50.287 +    }
  50.288 +
  50.289 +    @Override
  50.290 +    public void addPropertyChangeListener(PropertyChangeListener l) {
  50.291 +        propSupport.addPropertyChangeListener(l);
  50.292 +    }
  50.293 +
  50.294 +    @Override
  50.295 +    public void removePropertyChangeListener(PropertyChangeListener l) {
  50.296 +        propSupport.removePropertyChangeListener(l);
  50.297 +    }
  50.298 +
  50.299 +    @Override
  50.300 +    public void setContent(String content) {
  50.301 +        if( !isInitialized() ) {
  50.302 +            contentToLoad = content;
  50.303 +            return;
  50.304 +        }
  50.305 +        browser.loadHTML(content);
  50.306 +    }
  50.307 +
  50.308 +    @Override
  50.309 +    public Document getDocument() {
  50.310 +        if( !isInitialized() )
  50.311 +            return null;
  50.312 +        return browser.getDocument();
  50.313 +    }
  50.314 +
  50.315 +    @Override
  50.316 +    public void dispose() {
  50.317 +        synchronized( LOCK ) {
  50.318 +            disposed = true;
  50.319 +            if( isInitialized() ) {
  50.320 +                container.removeAll();
  50.321 +                browser = null;
  50.322 +            }
  50.323 +            browserListners.clear();
  50.324 +            container = null;
  50.325 +        }
  50.326 +        if( null != tcListener ) {
  50.327 +            TopComponent.getRegistry().removePropertyChangeListener( tcListener );
  50.328 +        }
  50.329 +    }
  50.330 +
  50.331 +    @Override
  50.332 +    public void addWebBrowserListener(WebBrowserListener l) {
  50.333 +        synchronized( browserListners ) {
  50.334 +            browserListners.add(l);
  50.335 +        }
  50.336 +    }
  50.337 +
  50.338 +    @Override
  50.339 +    public void removeWebBrowserListener(WebBrowserListener l) {
  50.340 +        synchronized( browserListners ) {
  50.341 +            browserListners.remove(l);
  50.342 +        }
  50.343 +    }
  50.344 +
  50.345 +    @Override
  50.346 +    public Map<String, String> getCookie(String domain, String name, String path) {
  50.347 +        if( isInitialized() ) {
  50.348 +            nsICookieManager cm = XPCOMUtils.getService(SERVICE_COOKIE_MANAGER, nsICookieManager.class);
  50.349 +            if( null != cm ) {
  50.350 +                nsISimpleEnumerator enumerator = cm.getEnumerator();
  50.351 +                nsICookie theCookie = null;
  50.352 +                while( enumerator.hasMoreElements() ) {
  50.353 +                    nsISupports obj = enumerator.getNext();
  50.354 +                    nsICookie cookie = XPCOMUtils.qi(obj, nsICookie.class);
  50.355 +                    if( null == cookie )
  50.356 +                        continue;
  50.357 +                    LOG.log(Level.FINER, "Cookie: domain={0}, name={1}, path={2}, value={3}", //NOI18N
  50.358 +                        new Object[] { cookie.getHost(), cookie.getName(), cookie.getPath(), cookie.getValue() });
  50.359 +
  50.360 +                    if( (null == domain || domain.equals(cookie.getHost()))
  50.361 +                            && (null == name || name.equals(cookie.getName()))
  50.362 +                            && (null == path || path.equals(cookie.getPath()))) {
  50.363 +                        theCookie = cookie;
  50.364 +                        break;
  50.365 +                    }
  50.366 +                }
  50.367 +                if( null == theCookie ) {
  50.368 +                    LOG.log(Level.FINE, "Cookie not found, domain={0}, name={1}, path={2}", //NOI18N
  50.369 +                            new Object[] {domain, name, path} );
  50.370 +                } else {
  50.371 +                    return cookie2map( theCookie );
  50.372 +                }
  50.373 +            } else {
  50.374 +                LOG.info("CookieManager interface not found."); //NOI18N
  50.375 +            }
  50.376 +        }
  50.377 +        return new HashMap<String, String>(0);
  50.378 +
  50.379 +    }
  50.380 +
  50.381 +    @Override
  50.382 +    public void deleteCookie(String domain, String name, String path) {
  50.383 +        if( !isInitialized() )
  50.384 +            return;
  50.385 +        nsICookieManager cm = XPCOMUtils.getService(SERVICE_COOKIE_MANAGER, nsICookieManager.class);
  50.386 +        if( null != cm ) {
  50.387 +            cm.remove(domain, name, path, false);
  50.388 +            LOG.log(Level.FINE, "Cookie removed, domain={0}, name={1}, path={2}",  //NOI18N
  50.389 +                    new Object[] {domain, name, path} );
  50.390 +        } else {
  50.391 +            LOG.info("CookieManager interface not found."); //NOI18N
  50.392 +        }
  50.393 +    }
  50.394 +
  50.395 +    @Override
  50.396 +    public void addCookie(Map<String, String> cookie) {
  50.397 +        if( !isInitialized() )
  50.398 +            return;
  50.399 +        nsICookieManager2 cm = XPCOMUtils.getService(SERVICE_COOKIE_MANAGER, nsICookieManager2.class);
  50.400 +        if( null != cm ) {
  50.401 +            String aDomain = cookie.get(CA_DOMAIN);
  50.402 +            String aPath = cookie.get(CA_PATH);
  50.403 +            String aName = cookie.get(CA_NAME);
  50.404 +            String aValue = cookie.get(CA_VALUE);
  50.405 +            boolean aIsSecure = Boolean.valueOf(cookie.get(CA_IS_SECURE));
  50.406 +            boolean aIsHttpOnly = Boolean.valueOf(cookie.get(CA_IS_HTTP_ONLY));
  50.407 +            boolean aIsSession = Boolean.valueOf(cookie.get(CA_IS_SESSION));
  50.408 +            long aExpiry = 0; //TODO use default expiration interval
  50.409 +            String expiry = cookie.get(CA_EXPIRY);
  50.410 +            if( null != expiry ) {
  50.411 +                aExpiry = Long.valueOf(expiry).longValue();
  50.412 +            }
  50.413 +            cm.add(aDomain, aPath, aName, aValue, aIsSecure, aIsHttpOnly, aIsSession, aExpiry);
  50.414 +        } else {
  50.415 +            LOG.info("CookieManager2 interface not found."); //NOI18N
  50.416 +        }
  50.417 +    }
  50.418 +
  50.419 +    @Override
  50.420 +    public Object executeJavaScript(String script) {
  50.421 +        if( !isInitialized() )
  50.422 +            return null;
  50.423 +        return browser.jsexec(script);
  50.424 +    }
  50.425 +
  50.426 +    private boolean isInitialized() {
  50.427 +        synchronized( LOCK ) {
  50.428 +            return null != browser;
  50.429 +        }
  50.430 +    }
  50.431 +
  50.432 +    public boolean fireBrowserEvent(int type, String url) {
  50.433 +        WebBrowserEventImpl event = new WebBrowserEventImpl(type, this, url);
  50.434 +        urlToLoad = url;
  50.435 +        synchronized( browserListners ) {
  50.436 +            for( WebBrowserListener l : browserListners ) {
  50.437 +                l.onDispatchEvent(event);
  50.438 +            }
  50.439 +        }
  50.440 +        return event.isCancelled();
  50.441 +    }
  50.442 +
  50.443 +    public void fireBrowserEvent(int type, AWTEvent e, Node n) {
  50.444 +        WebBrowserEvent event = new WebBrowserEventImpl(type, this, e, n);
  50.445 +        synchronized( browserListners ) {
  50.446 +            for( WebBrowserListener l : browserListners ) {
  50.447 +                l.onDispatchEvent(event);
  50.448 +            }
  50.449 +        }
  50.450 +    }
  50.451 +
  50.452 +    private void forceLayout() {
  50.453 +        Window w = SwingUtilities.getWindowAncestor(browser);
  50.454 +        if( w instanceof JFrame ) {
  50.455 +            JFrame frame = (JFrame) w;
  50.456 +            frame.getRootPane().doLayout();
  50.457 +            frame.getRootPane().invalidate();
  50.458 +            frame.getRootPane().revalidate();
  50.459 +            frame.getRootPane().repaint();
  50.460 +        }
  50.461 +    }
  50.462 +
  50.463 +    private PropertyChangeListener createTopComponentListener() {
  50.464 +        return new PropertyChangeListener() {
  50.465 +
  50.466 +            public void propertyChange(PropertyChangeEvent evt) {
  50.467 +                if( TopComponent.Registry.PROP_ACTIVATED.equals(evt.getPropertyName() )
  50.468 +                    && browser != null && browser.isShowing() ) {
  50.469 +                    browser.requestRepaint();
  50.470 +                }
  50.471 +            }
  50.472 +        };
  50.473 +    }
  50.474 +
  50.475 +    private static Map<String, String> cookie2map(nsICookie cookie) {
  50.476 +        Map<String, String> res = new HashMap<String, String>(10);
  50.477 +        res.put(CA_PATH, cookie.getPath());
  50.478 +        res.put(CA_DOMAIN, cookie.getHost());
  50.479 +//        res.put(CA_EXPIRY, String.valueOf(cookie.getExpiry()));
  50.480 +//        res.put(CA_IS_HTTP_ONLY, String.valueOf(cookie.getIsHttpOnly()));
  50.481 +        res.put(CA_IS_SECURE, String.valueOf(cookie.getIsSecure()));
  50.482 +//        res.put(CA_IS_SESSION, String.valueOf(cookie.getIsSession()));
  50.483 +        res.put(CA_NAME, cookie.getName());
  50.484 +        res.put(CA_VALUE, cookie.getValue());
  50.485 +        return res;
  50.486 +    }
  50.487 +
  50.488 +    private WeakReference<Window> parentWindow;
  50.489 +
  50.490 +    @Override
  50.491 +    public Lookup getLookup() {
  50.492 +        return Lookup.EMPTY;
  50.493 +    }
  50.494 +
  50.495 +    private class BrowserContainer extends JPanel {
  50.496 +
  50.497 +
  50.498 +        public BrowserContainer() {
  50.499 +            super( new BorderLayout() );
  50.500 +            setMinimumSize(new Dimension(10, 10));
  50.501 +        }
  50.502 +
  50.503 +        @Override
  50.504 +        public void addNotify() {
  50.505 +            super.addNotify();
  50.506 +            if( isInitialized() ) {
  50.507 +                Window w = SwingUtilities.getWindowAncestor(this);
  50.508 +                if( w != getParentWindow() ) {
  50.509 +                    browser.reparent();
  50.510 +                    if( null != urlToLoad ) {
  50.511 +                        browser.load(urlToLoad);
  50.512 +                    } else {
  50.513 +                        browser.loadHTML("<html></html>"); //NOI18N
  50.514 +                    }
  50.515 +                }
  50.516 +                parentWindow = new WeakReference<Window>(w);
  50.517 +                browser.setVisible(true);
  50.518 +            }
  50.519 +        }
  50.520 +
  50.521 +        private Window getParentWindow() {
  50.522 +            return null == parentWindow ? null : parentWindow.get();
  50.523 +        }
  50.524 +
  50.525 +        @Override
  50.526 +        public void removeNotify() {
  50.527 +            if( disposed ) {
  50.528 +                super.removeNotify();
  50.529 +            } else {
  50.530 +                urlToLoad = getURL();
  50.531 +                if( isInitialized() ) {
  50.532 +                    browser.setVisible(false);
  50.533 +                    Window w = SwingUtilities.getWindowAncestor(this);
  50.534 +                    if( null == w || !w.isVisible() ) {
  50.535 +                        //something is happening with our window, probably 
  50.536 +                        //switching fullscreen mode
  50.537 +                        parentWindow = null;
  50.538 +                        browser.removeNotify();
  50.539 +                    }
  50.540 +                }
  50.541 +            }
  50.542 +        }
  50.543 +
  50.544 +        @Override
  50.545 +        public boolean requestFocusInWindow() {
  50.546 +            SwingUtilities.invokeLater( new Runnable() {
  50.547 +                public void run() {
  50.548 +                    if( null != browser ) {
  50.549 +                        browser.requestFocusInBrowser();
  50.550 +                        //for some reason the native browser has invalid
  50.551 +                        //position/size when activated in a topcomponent
  50.552 +                        if( Utilities.isWindows() ) {
  50.553 +                            forceLayout();
  50.554 +                        }
  50.555 +                    }
  50.556 +                }
  50.557 +            });
  50.558 +            return super.requestFocusInWindow();
  50.559 +        }
  50.560 +    }
  50.561 +}
    51.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    51.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/layer.xml	Thu Nov 22 15:44:15 2012 +0100
    51.3 @@ -0,0 +1,15 @@
    51.4 +<?xml version="1.0" encoding="UTF-8"?>
    51.5 +<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
    51.6 +<filesystem>
    51.7 +    <folder name="Services">
    51.8 +        <folder name="Browsers">
    51.9 +            <file name="EmbeddedBrowser.settings" url="mozillaBrowser.xml">
   51.10 +                <attr name="hidden" methodvalue="org.netbeans.core.browser.xulrunner.BrowserFactory.isHidden"/>
   51.11 +                <attr name="internal" boolvalue="true"/>
   51.12 +                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.browser.xulrunner.Bundle"/>
   51.13 +                <attr name="SystemFileSystem.icon" urlvalue="nbres:/org/netbeans/modules/extbrowser/resources/extbrowser.gif"/>
   51.14 +                <attr name="position" intvalue="10000"/>
   51.15 +            </file>
   51.16 +        </folder>
   51.17 +    </folder>
   51.18 +</filesystem>
    52.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    52.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/modules/Bundle.properties	Thu Nov 22 15:44:15 2012 +0100
    52.3 @@ -0,0 +1,51 @@
    52.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    52.5 +#
    52.6 +# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    52.7 +#
    52.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    52.9 +# Other names may be trademarks of their respective owners.
   52.10 +#
   52.11 +# The contents of this file are subject to the terms of either the GNU
   52.12 +# General Public License Version 2 only ("GPL") or the Common
   52.13 +# Development and Distribution License("CDDL") (collectively, the
   52.14 +# "License"). You may not use this file except in compliance with the
   52.15 +# License. You can obtain a copy of the License at
   52.16 +# http://www.netbeans.org/cddl-gplv2.html
   52.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   52.18 +# specific language governing permissions and limitations under the
   52.19 +# License.  When distributing the software, include this License Header
   52.20 +# Notice in each file and include the License file at
   52.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   52.22 +# particular file as subject to the "Classpath" exception as provided
   52.23 +# by Oracle in the GPL Version 2 section of the License file that
   52.24 +# accompanied this code. If applicable, add the following below the
   52.25 +# License Header, with the fields enclosed by brackets [] replaced by
   52.26 +# your own identifying information:
   52.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   52.28 +#
   52.29 +# Contributor(s):
   52.30 +#
   52.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   52.32 +# Software is Sun Microsystems, Inc. Portions Copyright 1997-2008 Sun
   52.33 +# Microsystems, Inc. All Rights Reserved.
   52.34 +#
   52.35 +# If you wish your version of this file to be governed by only the CDDL
   52.36 +# or only the GPL Version 2, indicate your decision by adding
   52.37 +# "[Contributor] elects to include this software in this distribution
   52.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   52.39 +# single choice of license, a recipient has the option to distribute
   52.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   52.41 +# to extend the choice of license to its licensees as provided above.
   52.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   52.43 +# Version 2 license, then the option applies only if the new code is
   52.44 +# made subject to such option by the copyright holder.
   52.45 +
   52.46 +
   52.47 +ModulesActivator_Enable=Activating {0}
   52.48 +InstallerMissingModules_Download=Downloading {0}
   52.49 +InstallerMissingModules_Verify=Verifing...
   52.50 +InstallerMissingModules_Install=Installing...
   52.51 +InstallerMissingModules_TryAgainButton=&Try Again
   52.52 +InstallerMissingModules_ErrorPanel_Title=Error
   52.53 +InstallerMissingModules_ErrorPanel=Installation cannot be completed due to {0} \n {1}
   52.54 +InstallerMissingModules_NeedsRestart=Restart IDE to complete instaling asked plugins.
    53.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    53.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/modules/FindComponentModules.java	Thu Nov 22 15:44:15 2012 +0100
    53.3 @@ -0,0 +1,263 @@
    53.4 +/*
    53.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    53.6 + *
    53.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    53.8 + *
    53.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   53.10 + * Other names may be trademarks of their respective owners.
   53.11 + *
   53.12 + * The contents of this file are subject to the terms of either the GNU
   53.13 + * General Public License Version 2 only ("GPL") or the Common
   53.14 + * Development and Distribution License("CDDL") (collectively, the
   53.15 + * "License"). You may not use this file except in compliance with the
   53.16 + * License. You can obtain a copy of the License at
   53.17 + * http://www.netbeans.org/cddl-gplv2.html
   53.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   53.19 + * specific language governing permissions and limitations under the
   53.20 + * License.  When distributing the software, include this License Header
   53.21 + * Notice in each file and include the License file at
   53.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   53.23 + * particular file as subject to the "Classpath" exception as provided
   53.24 + * by Oracle in the GPL Version 2 section of the License file that
   53.25 + * accompanied this code. If applicable, add the following below the
   53.26 + * License Header, with the fields enclosed by brackets [] replaced by
   53.27 + * your own identifying information:
   53.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   53.29 + *
   53.30 + * Contributor(s):
   53.31 + *
   53.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   53.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2008 Sun
   53.34 + * Microsystems, Inc. All Rights Reserved.
   53.35 + *
   53.36 + * If you wish your version of this file to be governed by only the CDDL
   53.37 + * or only the GPL Version 2, indicate your decision by adding
   53.38 + * "[Contributor] elects to include this software in this distribution
   53.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   53.40 + * single choice of license, a recipient has the option to distribute
   53.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   53.42 + * to extend the choice of license to its licensees as provided above.
   53.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   53.44 + * Version 2 license, then the option applies only if the new code is
   53.45 + * made subject to such option by the copyright holder.
   53.46 + */
   53.47 +
   53.48 +package org.netbeans.core.browser.xulrunner.modules;
   53.49 +
   53.50 +import java.util.Arrays;
   53.51 +import java.util.Collection;
   53.52 +import java.util.Collections;
   53.53 +import java.util.Enumeration;
   53.54 +import java.util.HashSet;
   53.55 +import java.util.LinkedList;
   53.56 +import java.util.Set;
   53.57 +import java.util.StringTokenizer;
   53.58 +import java.util.prefs.Preferences;
   53.59 +import javax.swing.SwingUtilities;
   53.60 +import org.netbeans.api.autoupdate.InstallSupport;
   53.61 +import org.netbeans.api.autoupdate.OperationContainer;
   53.62 +import org.netbeans.api.autoupdate.OperationSupport;
   53.63 +import org.netbeans.api.autoupdate.UpdateElement;
   53.64 +import org.netbeans.api.autoupdate.UpdateManager;
   53.65 +import org.netbeans.api.autoupdate.UpdateUnit;
   53.66 +import org.openide.util.NbPreferences;
   53.67 +import org.openide.util.RequestProcessor;
   53.68 +
   53.69 +/**
   53.70 + *
   53.71 + * @author Jirka Rechtacek
   53.72 + */
   53.73 +public final class FindComponentModules {
   53.74 +    private Collection<String> codeNames;
   53.75 +
   53.76 +    public FindComponentModules (String... components) {
   53.77 +        if (components == null) {
   53.78 +            codeNames = Collections.emptySet ();
   53.79 +        } else {
   53.80 +            codeNames = Arrays.asList (components);
   53.81 +        }
   53.82 +    }
   53.83 +
   53.84 +    public final String DO_CHECK = "do-check";
   53.85 +
   53.86 +    private final String ENABLE_LATER = "enable-later";
   53.87 +    private Collection<UpdateElement> forInstall = null;
   53.88 +    private Collection<UpdateElement> forEnable = null;
   53.89 +    private RequestProcessor.Task componentModulesFindingTask = null;
   53.90 +    private RequestProcessor.Task enableLaterTask = null;
   53.91 +
   53.92 +    public RequestProcessor.Task getFindingTask () {
   53.93 +        return componentModulesFindingTask;
   53.94 +    }
   53.95 +
   53.96 +    public RequestProcessor.Task createFindingTask () {
   53.97 +        assert componentModulesFindingTask == null || componentModulesFindingTask.isFinished () : "The Finding Task cannot be started nor scheduled.";
   53.98 +        componentModulesFindingTask = RequestProcessor.getDefault ().create (doFind);
   53.99 +        return componentModulesFindingTask;
  53.100 +    }
  53.101 +
  53.102 +    public Collection<UpdateElement> getModulesForInstall () {
  53.103 +        assert forInstall != null : "candidates cannot be null if getModulesForInstall() is called.";
  53.104 +        return forInstall;
  53.105 +    }
  53.106 +
  53.107 +    public void clearModulesForInstall () {
  53.108 +        forInstall = null;
  53.109 +        componentModulesFindingTask = null;
  53.110 +        enableLaterTask = null;
  53.111 +    }
  53.112 +
  53.113 +    public void writeEnableLater (Collection<UpdateElement> modules) {
  53.114 +        Preferences pref = FindComponentModules.getPreferences ();
  53.115 +        if (modules == null) {
  53.116 +            pref.remove (ENABLE_LATER);
  53.117 +            return ;
  53.118 +        }
  53.119 +        String value = "";
  53.120 +        for (UpdateElement m : modules) {
  53.121 +            value += value.length () == 0 ? m.getCodeName () : ", " + m.getCodeName (); // NOI18N
  53.122 +        }
  53.123 +        if (value.trim ().length () == 0) {
  53.124 +            pref.remove (ENABLE_LATER);
  53.125 +        } else {
  53.126 +            pref.put (ENABLE_LATER, value);
  53.127 +        }
  53.128 +    }
  53.129 +
  53.130 +    public Collection<UpdateElement> getModulesForEnable () {
  53.131 +        assert forEnable != null : "candidates cannot be null if getModulesForInstall() is called.";
  53.132 +        return forEnable;
  53.133 +    }
  53.134 +
  53.135 +    private Collection<UpdateElement> readEnableLater () {
  53.136 +        Set<UpdateElement> res = new HashSet<UpdateElement> ();
  53.137 +        Preferences pref = FindComponentModules.getPreferences ();
  53.138 +        String value = pref.get (ENABLE_LATER, null);
  53.139 +        if (value != null && value.trim ().length () > 0) {
  53.140 +            Enumeration en = new StringTokenizer (value, ","); // NOI18N
  53.141 +            while (en.hasMoreElements ()) {
  53.142 +                String codeName = ((String) en.nextElement ()).trim ();
  53.143 +                UpdateElement el = findUpdateElement (codeName, true);
  53.144 +                if (el != null) {
  53.145 +                    res.add (el);
  53.146 +                }
  53.147 +            }
  53.148 +        }
  53.149 +        return res;
  53.150 +    }
  53.151 +
  53.152 +    public static Collection<UpdateElement> getVisibleUpdateElements (Collection<UpdateElement> elems) {
  53.153 +        Collection<UpdateElement> res = new HashSet<UpdateElement> ();
  53.154 +        for (UpdateElement el : new LinkedList<UpdateElement> (elems)) {
  53.155 +            if (UpdateManager.TYPE.KIT_MODULE.equals (el.getUpdateUnit ().getType ())) {
  53.156 +                res.add (el);
  53.157 +            }
  53.158 +        }
  53.159 +        return res;
  53.160 +    }
  53.161 +
  53.162 +    public static Preferences getPreferences () {
  53.163 +        return NbPreferences.forModule (FindComponentModules.class);
  53.164 +    }
  53.165 +
  53.166 +    private Runnable doFind = new Runnable () {
  53.167 +        public void run() {
  53.168 +            if (SwingUtilities.isEventDispatchThread ()) {
  53.169 +                RequestProcessor.getDefault ().post (doFind);
  53.170 +                return ;
  53.171 +            }
  53.172 +            findComponentModules ();
  53.173 +        }
  53.174 +    };
  53.175 +
  53.176 +    private void findComponentModules () {
  53.177 +        Collection<UpdateUnit> units = UpdateManager.getDefault ().getUpdateUnits (UpdateManager.TYPE.MODULE);
  53.178 +
  53.179 +        // install missing modules
  53.180 +        Collection<UpdateElement> elementsForInstall = getMissingModules (units);
  53.181 +        forInstall = getAllForInstall (elementsForInstall);
  53.182 +
  53.183 +        // install disabled modules
  53.184 +        Collection<UpdateElement> elementsForEnable = getDisabledModules (units);
  53.185 +        forEnable = getAllForEnable (elementsForEnable);
  53.186 +    }
  53.187 +
  53.188 +    private Collection<UpdateElement> getMissingModules (Collection<UpdateUnit> allUnits) {
  53.189 +        Set<UpdateElement> res = new HashSet<UpdateElement> ();
  53.190 +        for (UpdateUnit unit : allUnits) {
  53.191 +            if (unit.getInstalled () == null && codeNames.contains(unit.getCodeName ())) {
  53.192 +                res.add (unit.getAvailableUpdates ().get (0));
  53.193 +            }
  53.194 +        }
  53.195 +        return res;
  53.196 +    }
  53.197 +
  53.198 +    private Collection<UpdateElement> getAllForInstall (Collection<UpdateElement> elements) {
  53.199 +        Collection<UpdateElement> all = new HashSet<UpdateElement> ();
  53.200 +        for (UpdateElement el : elements) {
  53.201 +            OperationContainer<InstallSupport> ocForInstall = OperationContainer.createForInstall ();
  53.202 +            if (ocForInstall.canBeAdded (el.getUpdateUnit (), el)) {
  53.203 +                OperationContainer.OperationInfo<InstallSupport> info = ocForInstall.add (el);
  53.204 +                if (info == null) {
  53.205 +                    continue;
  53.206 +                }
  53.207 +                Set<UpdateElement> reqs = info.getRequiredElements ();
  53.208 +                ocForInstall.add (reqs);
  53.209 +                Set<String> breaks = info.getBrokenDependencies ();
  53.210 +                if (breaks.isEmpty ()) {
  53.211 +                    all.add (el);
  53.212 +                    all.addAll (reqs);
  53.213 +                }
  53.214 +            }
  53.215 +        }
  53.216 +        return all;
  53.217 +    }
  53.218 +
  53.219 +    private Collection<UpdateElement> getDisabledModules (Collection<UpdateUnit> allUnits) {
  53.220 +        Set<UpdateElement> res = new HashSet<UpdateElement> ();
  53.221 +        for (UpdateUnit unit : allUnits) {
  53.222 +            if (unit.getInstalled () != null && codeNames.contains(unit.getCodeName ())) {
  53.223 +                if (! unit.getInstalled ().isEnabled ()) {
  53.224 +                    res.add (unit.getInstalled ());
  53.225 +                }
  53.226 +            }
  53.227 +        }
  53.228 +        return res;
  53.229 +    }
  53.230 +
  53.231 +    private Collection<UpdateElement> getAllForEnable (Collection<UpdateElement> elements) {
  53.232 +        Collection<UpdateElement> all = new HashSet<UpdateElement> ();
  53.233 +        for (UpdateElement el : elements) {
  53.234 +            OperationContainer<OperationSupport> ocForEnable = OperationContainer.createForEnable ();
  53.235 +            if (ocForEnable.canBeAdded (el.getUpdateUnit (), el)) {
  53.236 +                OperationContainer.OperationInfo<OperationSupport> info = ocForEnable.add (el);
  53.237 +                if (info == null) {
  53.238 +                    continue;
  53.239 +                }
  53.240 +                Set<UpdateElement> reqs = info.getRequiredElements ();
  53.241 +                ocForEnable.add (reqs);
  53.242 +                Set<String> breaks = info.getBrokenDependencies ();
  53.243 +                if (breaks.isEmpty ()) {
  53.244 +                    all.add (el);
  53.245 +                    all.addAll (reqs);
  53.246 +                }
  53.247 +            }
  53.248 +        }
  53.249 +        return all;
  53.250 +    }
  53.251 +
  53.252 +    private static UpdateElement findUpdateElement (String codeName, boolean isInstalled) {
  53.253 +        UpdateElement res = null;
  53.254 +        for (UpdateUnit u : UpdateManager.getDefault ().getUpdateUnits (UpdateManager.TYPE.MODULE)) {
  53.255 +            if (codeName.equals (u.getCodeName ())) {
  53.256 +                if (isInstalled && u.getInstalled () != null) {
  53.257 +                    res = u.getInstalled ();
  53.258 +                } else if (! isInstalled && ! u.getAvailableUpdates ().isEmpty ()) {
  53.259 +                    res = u.getAvailableUpdates ().get (0);
  53.260 +                }
  53.261 +                break;
  53.262 +            }
  53.263 +        }
  53.264 +        return res;
  53.265 +    }
  53.266 +}
    54.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    54.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/modules/ModulesActivator.java	Thu Nov 22 15:44:15 2012 +0100
    54.3 @@ -0,0 +1,153 @@
    54.4 +/*
    54.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    54.6 + *
    54.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    54.8 + *
    54.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   54.10 + * Other names may be trademarks of their respective owners.
   54.11 + *
   54.12 + * The contents of this file are subject to the terms of either the GNU
   54.13 + * General Public License Version 2 only ("GPL") or the Common
   54.14 + * Development and Distribution License("CDDL") (collectively, the
   54.15 + * "License"). You may not use this file except in compliance with the
   54.16 + * License. You can obtain a copy of the License at
   54.17 + * http://www.netbeans.org/cddl-gplv2.html
   54.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   54.19 + * specific language governing permissions and limitations under the
   54.20 + * License.  When distributing the software, include this License Header
   54.21 + * Notice in each file and include the License file at
   54.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   54.23 + * particular file as subject to the "Classpath" exception as provided
   54.24 + * by Oracle in the GPL Version 2 section of the License file that
   54.25 + * accompanied this code. If applicable, add the following below the
   54.26 + * License Header, with the fields enclosed by brackets [] replaced by
   54.27 + * your own identifying information:
   54.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   54.29 + *
   54.30 + * Contributor(s):
   54.31 + *
   54.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   54.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2008 Sun
   54.34 + * Microsystems, Inc. All Rights Reserved.
   54.35 + *
   54.36 + * If you wish your version of this file to be governed by only the CDDL
   54.37 + * or only the GPL Version 2, indicate your decision by adding
   54.38 + * "[Contributor] elects to include this software in this distribution
   54.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   54.40 + * single choice of license, a recipient has the option to distribute
   54.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   54.42 + * to extend the choice of license to its licensees as provided above.
   54.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   54.44 + * Version 2 license, then the option applies only if the new code is
   54.45 + * made subject to such option by the copyright holder.
   54.46 + */
   54.47 +
   54.48 +package org.netbeans.core.browser.xulrunner.modules;
   54.49 +
   54.50 +import java.util.Collection;
   54.51 +import java.util.LinkedList;
   54.52 +import javax.swing.SwingUtilities;
   54.53 +import org.netbeans.api.autoupdate.OperationContainer;
   54.54 +import org.netbeans.api.autoupdate.OperationException;
   54.55 +import org.netbeans.api.autoupdate.OperationSupport;
   54.56 +import org.netbeans.api.autoupdate.UpdateElement;
   54.57 +import org.netbeans.api.progress.ProgressHandle;
   54.58 +import org.netbeans.api.progress.ProgressHandleFactory;
   54.59 +import org.openide.util.Exceptions;
   54.60 +import org.openide.util.NbBundle;
   54.61 +import org.openide.util.RequestProcessor;
   54.62 +
   54.63 +/**
   54.64 + *
   54.65 + * @author Jirka Rechtacek
   54.66 + */
   54.67 +public class ModulesActivator {
   54.68 +
   54.69 +    private Collection<UpdateElement> modules4enable;
   54.70 +    private RequestProcessor.Task enableTask = null;
   54.71 +    private OperationContainer<OperationSupport> enableContainer;
   54.72 +    private ProgressHandle enableHandle;
   54.73 +    private final ProgressMonitor progressMonitor;
   54.74 +
   54.75 +    public ModulesActivator (Collection<UpdateElement> modules, ProgressMonitor progressMonitor) {
   54.76 +        if (modules == null || modules.isEmpty ()) {
   54.77 +            throw new IllegalArgumentException ("Cannot construct ModulesActivator with null or empty Collection " + modules);
   54.78 +        }
   54.79 +        modules4enable = modules;
   54.80 +        if (progressMonitor != null) {
   54.81 +            this.progressMonitor = progressMonitor;
   54.82 +        } else {
   54.83 +            this.progressMonitor = ProgressMonitor.DEV_NULL_PROGRESS_MONITOR;
   54.84 +        }
   54.85 +    }
   54.86 +
   54.87 +    public RequestProcessor.Task getEnableTask () {
   54.88 +        if (enableTask == null) {
   54.89 +            enableTask = createEnableTask ();
   54.90 +        }
   54.91 +        return enableTask;
   54.92 +    }
   54.93 +
   54.94 +    private RequestProcessor.Task createEnableTask () {
   54.95 +        assert enableTask == null || enableTask.isFinished () : "The Enable Task cannot be started nor scheduled.";
   54.96 +        enableTask = RequestProcessor.getDefault ().create (doEnable);
   54.97 +        return enableTask;
   54.98 +    }
   54.99 +
  54.100 +    private Runnable doEnable = new Runnable () {
  54.101 +        public void run() {
  54.102 +            enableModules ();
  54.103 +        }
  54.104 +
  54.105 +    };
  54.106 +
  54.107 +    private void enableModules () {
  54.108 +        try {
  54.109 +            doEnableModules ();
  54.110 +        } catch (Exception x) {
  54.111 +            Exceptions.printStackTrace (x);
  54.112 +        }
  54.113 +    }
  54.114 +
  54.115 +    private void doEnableModules () throws OperationException {
  54.116 +        assert ! SwingUtilities.isEventDispatchThread () : "Cannot be called in EQ.";
  54.117 +        enableContainer = null;
  54.118 +        for (UpdateElement module : modules4enable) {
  54.119 +            if (enableContainer == null) {
  54.120 +                enableContainer = OperationContainer.createForEnable ();
  54.121 +            }
  54.122 +            if (enableContainer.canBeAdded (module.getUpdateUnit (), module)) {
  54.123 +                enableContainer.add (module);
  54.124 +            }
  54.125 +        }
  54.126 +        if (enableContainer.listAll ().isEmpty ()) {
  54.127 +            return ;
  54.128 +        }
  54.129 +        assert enableContainer.listInvalid ().isEmpty () :
  54.130 +            "No invalid Update Elements " + enableContainer.listInvalid ();
  54.131 +        if (! enableContainer.listInvalid ().isEmpty ()) {
  54.132 +            throw new IllegalArgumentException ("Some are invalid for enable: " + enableContainer.listInvalid ());
  54.133 +        }
  54.134 +        OperationSupport enableSupport = enableContainer.getSupport ();
  54.135 +        if (enableHandle == null) {
  54.136 +            enableHandle = ProgressHandleFactory.createHandle (
  54.137 +                    getBundle ("ModulesActivator_Enable",
  54.138 +                    presentUpdateElements (FindComponentModules.getVisibleUpdateElements (modules4enable))));
  54.139 +            }
  54.140 +        progressMonitor.onEnable(enableHandle);
  54.141 +        enableSupport.doOperation (enableHandle);
  54.142 +    }
  54.143 +
  54.144 +    public static String presentUpdateElements (Collection<UpdateElement> elems) {
  54.145 +        String res = "";
  54.146 +        for (UpdateElement el : new LinkedList<UpdateElement> (elems)) {
  54.147 +            res += res.length () == 0 ? el.getDisplayName () : ", " + el.getDisplayName (); // NOI18N
  54.148 +        }
  54.149 +        return res;
  54.150 +    }
  54.151 +
  54.152 +    private static String getBundle (String key, Object... params) {
  54.153 +        return NbBundle.getMessage (ModulesActivator.class, key, params);
  54.154 +    }
  54.155 +
  54.156 +}
    55.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    55.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/modules/ModulesInstaller.java	Thu Nov 22 15:44:15 2012 +0100
    55.3 @@ -0,0 +1,262 @@
    55.4 +/*
    55.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    55.6 + *
    55.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    55.8 + *
    55.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   55.10 + * Other names may be trademarks of their respective owners.
   55.11 + *
   55.12 + * The contents of this file are subject to the terms of either the GNU
   55.13 + * General Public License Version 2 only ("GPL") or the Common
   55.14 + * Development and Distribution License("CDDL") (collectively, the
   55.15 + * "License"). You may not use this file except in compliance with the
   55.16 + * License. You can obtain a copy of the License at
   55.17 + * http://www.netbeans.org/cddl-gplv2.html
   55.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   55.19 + * specific language governing permissions and limitations under the
   55.20 + * License.  When distributing the software, include this License Header
   55.21 + * Notice in each file and include the License file at
   55.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   55.23 + * particular file as subject to the "Classpath" exception as provided
   55.24 + * by Oracle in the GPL Version 2 section of the License file that
   55.25 + * accompanied this code. If applicable, add the following below the
   55.26 + * License Header, with the fields enclosed by brackets [] replaced by
   55.27 + * your own identifying information:
   55.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   55.29 + *
   55.30 + * Contributor(s):
   55.31 + *
   55.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   55.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2008 Sun
   55.34 + * Microsystems, Inc. All Rights Reserved.
   55.35 + *
   55.36 + * If you wish your version of this file to be governed by only the CDDL
   55.37 + * or only the GPL Version 2, indicate your decision by adding
   55.38 + * "[Contributor] elects to include this software in this distribution
   55.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   55.40 + * single choice of license, a recipient has the option to distribute
   55.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   55.42 + * to extend the choice of license to its licensees as provided above.
   55.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   55.44 + * Version 2 license, then the option applies only if the new code is
   55.45 + * made subject to such option by the copyright holder.
   55.46 + */
   55.47 +
   55.48 +package org.netbeans.core.browser.xulrunner.modules;
   55.49 +
   55.50 +import java.awt.event.ActionEvent;
   55.51 +import java.awt.event.ActionListener;
   55.52 +import java.util.Collection;
   55.53 +import java.util.LinkedList;
   55.54 +import java.util.logging.Level;
   55.55 +import java.util.logging.Logger;
   55.56 +import javax.swing.JButton;
   55.57 +import javax.swing.JComponent;
   55.58 +import javax.swing.JTextArea;
   55.59 +import javax.swing.SwingUtilities;
   55.60 +import org.netbeans.api.autoupdate.InstallSupport;
   55.61 +import org.netbeans.api.autoupdate.InstallSupport.Installer;
   55.62 +import org.netbeans.api.autoupdate.InstallSupport.Validator;
   55.63 +import org.netbeans.api.autoupdate.OperationContainer;
   55.64 +import org.netbeans.api.autoupdate.OperationException;
   55.65 +import org.netbeans.api.autoupdate.OperationSupport.Restarter;
   55.66 +import org.netbeans.api.autoupdate.UpdateElement;
   55.67 +import org.netbeans.api.progress.ProgressHandle;
   55.68 +import org.netbeans.api.progress.ProgressHandleFactory;
   55.69 +import org.openide.DialogDisplayer;
   55.70 +import org.openide.NotifyDescriptor;
   55.71 +import org.openide.awt.Mnemonics;
   55.72 +import org.openide.util.NbBundle;
   55.73 +import org.openide.util.RequestProcessor;
   55.74 +
   55.75 +/**
   55.76 + *
   55.77 + * @author Jirka Rechtacek
   55.78 + */
   55.79 +public class ModulesInstaller {
   55.80 +
   55.81 +    private Collection<UpdateElement> modules4install;
   55.82 +    private RequestProcessor.Task installTask = null;
   55.83 +    private OperationContainer<InstallSupport> installContainer;
   55.84 +    private ProgressHandle downloadHandle;
   55.85 +    private ProgressHandle verifyHandle;
   55.86 +    private ProgressHandle installHandle;
   55.87 +    private final ProgressMonitor progressMonitor;
   55.88 +    private final static Logger LOG = Logger.getLogger(ModulesInstaller.class.getName());
   55.89 +
   55.90 +    public ModulesInstaller (Collection<UpdateElement> modules, ProgressMonitor progressMonitor) {
   55.91 +        if (modules == null || modules.isEmpty ()) {
   55.92 +            throw new IllegalArgumentException ("Cannot construct InstallerMissingModules with null or empty Collection " + modules);
   55.93 +        }
   55.94 +        modules4install = modules;
   55.95 +        if (progressMonitor != null) {
   55.96 +            this.progressMonitor = progressMonitor;
   55.97 +        } else {
   55.98 +            this.progressMonitor = ProgressMonitor.DEV_NULL_PROGRESS_MONITOR;
   55.99 +        }
  55.100 +    }
  55.101 +
  55.102 +    public static boolean installModules (String... codeNames) {
  55.103 +        return installModules(null, codeNames);
  55.104 +    }
  55.105 +
  55.106 +    public static boolean installModules (ProgressMonitor progressMonitor, String... codeNames) {
  55.107 +        assert ! SwingUtilities.isEventDispatchThread () : "Cannot run in EQ!";
  55.108 +        boolean success = false;
  55.109 +
  55.110 +        if( null != codeNames && codeNames.length > 0 ) {
  55.111 +            LOG.log(Level.FINE, "Searching for module: " + codeNames[0]); //NOI18N
  55.112 +        }
  55.113 +
  55.114 +        FindComponentModules findModules = new FindComponentModules(codeNames);
  55.115 +        findModules.createFindingTask().waitFinished();
  55.116 +
  55.117 +        Collection<UpdateElement> toInstall = findModules.getModulesForInstall();
  55.118 +        Collection<UpdateElement> toEnable = findModules.getModulesForEnable();
  55.119 +        if( toInstall == null || toInstall.isEmpty() ) {
  55.120 +            LOG.log(Level.INFO, "No modules found to install."); //NOI18N
  55.121 +        }
  55.122 +        if (toInstall != null && !toInstall.isEmpty()) {
  55.123 +            ModulesInstaller installer = new ModulesInstaller(toInstall, progressMonitor);
  55.124 +            installer.getInstallTask ().schedule (10);
  55.125 +            installer.getInstallTask ().waitFinished();
  55.126 +            findModules.createFindingTask().waitFinished();
  55.127 +            success = findModules.getModulesForInstall ().isEmpty ();
  55.128 +        } else if (toEnable != null && !toEnable.isEmpty()) {
  55.129 +            ModulesActivator enabler = new ModulesActivator(toEnable, progressMonitor);
  55.130 +            enabler.getEnableTask ().schedule (100);
  55.131 +            enabler.getEnableTask ().waitFinished();
  55.132 +            success = true;
  55.133 +        }
  55.134 +
  55.135 +        return success;
  55.136 +    }
  55.137 +
  55.138 +    public RequestProcessor.Task getInstallTask () {
  55.139 +        if (installTask == null) {
  55.140 +            installTask = createInstallTask ();
  55.141 +        }
  55.142 +        return installTask;
  55.143 +    }
  55.144 +
  55.145 +    private RequestProcessor.Task createInstallTask () {
  55.146 +        assert installTask == null || installTask.isFinished () : "The Install Task cannot be started nor scheduled.";
  55.147 +        installTask = RequestProcessor.getDefault ().create (doInstall);
  55.148 +        return installTask;
  55.149 +    }
  55.150 +
  55.151 +    private Runnable doInstall = new Runnable () {
  55.152 +        public void run() {
  55.153 +            installMissingModules ();
  55.154 +        }
  55.155 +
  55.156 +    };
  55.157 +
  55.158 +    private void installMissingModules () {
  55.159 +        try {
  55.160 +            doInstallMissingModules ();
  55.161 +        } catch (Exception x) {
  55.162 +            JButton tryAgain = new JButton ();
  55.163 +            tryAgain.addActionListener(new ActionListener () {
  55.164 +                public void actionPerformed (ActionEvent e) {
  55.165 +                    if (installContainer != null) {
  55.166 +                        try {
  55.167 +                            installContainer.getSupport ().doCancel ();
  55.168 +                        } catch (Exception ex) {
  55.169 +                            LOG.log (Level.INFO, ex.getLocalizedMessage (), ex);
  55.170 +                        }
  55.171 +                    }
  55.172 +                    RequestProcessor.Task task = getInstallTask ();
  55.173 +                    if (task != null) {
  55.174 +                        task.schedule (10);
  55.175 +                    }
  55.176 +                }
  55.177 +            });
  55.178 +            LOG.log (Level.INFO, x.getLocalizedMessage (), x);
  55.179 +            tryAgain.setEnabled (getInstallTask () != null);
  55.180 +            Mnemonics.setLocalizedText (tryAgain, getBundle ("InstallerMissingModules_TryAgainButton"));
  55.181 +            NotifyDescriptor nd = new NotifyDescriptor (
  55.182 +                    getErrorNotifyPanel (x),
  55.183 +                    getBundle ("InstallerMissingModules_ErrorPanel_Title"),
  55.184 +                    NotifyDescriptor.DEFAULT_OPTION,
  55.185 +                    NotifyDescriptor.ERROR_MESSAGE,
  55.186 +                    new Object [] { tryAgain, NotifyDescriptor.OK_OPTION },
  55.187 +                    NotifyDescriptor.OK_OPTION
  55.188 +                    );
  55.189 +            DialogDisplayer.getDefault ().notifyLater (nd);
  55.190 +        }
  55.191 +    }
  55.192 +
  55.193 +    private JComponent getErrorNotifyPanel (Exception x) {
  55.194 +        JTextArea area = new JTextArea ();
  55.195 +        area.setWrapStyleWord (true);
  55.196 +        area.setLineWrap (true);
  55.197 +        area.setEditable (false);
  55.198 +        area.setRows (15);
  55.199 +        area.setColumns (40);
  55.200 +        area.setOpaque (false);
  55.201 +        area.setText (getBundle ("InstallerMissingModules_ErrorPanel", x.getLocalizedMessage (), x));
  55.202 +        return area;
  55.203 +    }
  55.204 +
  55.205 +    private void doInstallMissingModules () throws OperationException {
  55.206 +        assert ! SwingUtilities.isEventDispatchThread () : "Cannot be called in EQ.";
  55.207 +        installContainer = null;
  55.208 +        for (UpdateElement module : modules4install) {
  55.209 +            LOG.log(Level.FINE, "Module to install: " + module.getCodeName()); //NOI18N
  55.210 +            if (installContainer == null) {
  55.211 +                boolean isNewOne = module.getUpdateUnit ().getInstalled () == null;
  55.212 +                if (isNewOne) {
  55.213 +                    installContainer = OperationContainer.createForInstall ();
  55.214 +                } else {
  55.215 +                    installContainer = OperationContainer.createForUpdate ();
  55.216 +                }
  55.217 +            }
  55.218 +            if (installContainer.canBeAdded (module.getUpdateUnit (), module)) {
  55.219 +                installContainer.add (module);
  55.220 +            }
  55.221 +        }
  55.222 +        if (installContainer.listAll ().isEmpty ()) {
  55.223 +            return ;
  55.224 +        }
  55.225 +        assert installContainer.listInvalid ().isEmpty () :
  55.226 +            "No invalid Update Elements " + installContainer.listInvalid ();
  55.227 +        if (! installContainer.listInvalid ().isEmpty ()) {
  55.228 +            throw new IllegalArgumentException ("Some are invalid for install: " + installContainer.listInvalid ());
  55.229 +        }
  55.230 +        InstallSupport installSupport = installContainer.getSupport ();
  55.231 +        if (downloadHandle == null) {
  55.232 +            downloadHandle = ProgressHandleFactory.createHandle (
  55.233 +                getBundle ("InstallerMissingModules_Download",
  55.234 +                presentUpdateElements (FindComponentModules.getVisibleUpdateElements (modules4install))));
  55.235 +        }
  55.236 +        progressMonitor.onDownload(downloadHandle);
  55.237 +        Validator v = installSupport.doDownload (downloadHandle, false);
  55.238 +        if (verifyHandle == null) {
  55.239 +            verifyHandle = ProgressHandleFactory.createHandle (
  55.240 +                    getBundle ("InstallerMissingModules_Verify"));
  55.241 +            }
  55.242 +        progressMonitor.onValidate(verifyHandle);
  55.243 +        Installer i = installSupport.doValidate (v, verifyHandle);
  55.244 +        if (installHandle == null) {
  55.245 +            installHandle = ProgressHandleFactory.createHandle (
  55.246 +                    getBundle ("InstallerMissingModules_Install"));
  55.247 +            }
  55.248 +        progressMonitor.onInstall(installHandle);
  55.249 +        Restarter r = installSupport.doInstall (i, installHandle);
  55.250 +        assert r == null : "Restart cannot be needed";
  55.251 +        /// XXX FindBrokenModules.clearModulesForRepair ();
  55.252 +    }
  55.253 +
  55.254 +    public static String presentUpdateElements (Collection<UpdateElement> elems) {
  55.255 +        String res = "";
  55.256 +        for (UpdateElement el : new LinkedList<UpdateElement> (elems)) {
  55.257 +            res += res.length () == 0 ? el.getDisplayName () : ", " + el.getDisplayName (); // NOI18N
  55.258 +        }
  55.259 +        return res;
  55.260 +    }
  55.261 +
  55.262 +    private static String getBundle (String key, Object... params) {
  55.263 +        return NbBundle.getMessage (ModulesInstaller.class, key, params);
  55.264 +    }
  55.265 +}
    56.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    56.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/modules/ProgressMonitor.java	Thu Nov 22 15:44:15 2012 +0100
    56.3 @@ -0,0 +1,78 @@
    56.4 +/*
    56.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    56.6 + *
    56.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    56.8 + *
    56.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   56.10 + * Other names may be trademarks of their respective owners.
   56.11 + *
   56.12 + * The contents of this file are subject to the terms of either the GNU
   56.13 + * General Public License Version 2 only ("GPL") or the Common
   56.14 + * Development and Distribution License("CDDL") (collectively, the
   56.15 + * "License"). You may not use this file except in compliance with the
   56.16 + * License. You can obtain a copy of the License at
   56.17 + * http://www.netbeans.org/cddl-gplv2.html
   56.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   56.19 + * specific language governing permissions and limitations under the
   56.20 + * License.  When distributing the software, include this License Header
   56.21 + * Notice in each file and include the License file at
   56.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   56.23 + * particular file as subject to the "Classpath" exception as provided
   56.24 + * by Oracle in the GPL Version 2 section of the License file that
   56.25 + * accompanied this code. If applicable, add the following below the
   56.26 + * License Header, with the fields enclosed by brackets [] replaced by
   56.27 + * your own identifying information:
   56.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   56.29 + *
   56.30 + * Contributor(s):
   56.31 + *
   56.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   56.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2008 Sun
   56.34 + * Microsystems, Inc. All Rights Reserved.
   56.35 + *
   56.36 + * If you wish your version of this file to be governed by only the CDDL
   56.37 + * or only the GPL Version 2, indicate your decision by adding
   56.38 + * "[Contributor] elects to include this software in this distribution
   56.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   56.40 + * single choice of license, a recipient has the option to distribute
   56.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   56.42 + * to extend the choice of license to its licensees as provided above.
   56.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   56.44 + * Version 2 license, then the option applies only if the new code is
   56.45 + * made subject to such option by the copyright holder.
   56.46 + */
   56.47 +
   56.48 +package org.netbeans.core.browser.xulrunner.modules;
   56.49 +
   56.50 +import org.netbeans.api.progress.ProgressHandle;
   56.51 +
   56.52 +/**
   56.53 + * Progress monitor for downloading/validating/installing/enabling modules.
   56.54 + * For empty implementation one can use {@link #DEV_NULL_PROGRESS_MONITOR}.
   56.55 + * @author Tomas Mysik
   56.56 + */
   56.57 +public interface ProgressMonitor {
   56.58 +    static final ProgressMonitor DEV_NULL_PROGRESS_MONITOR = new DevNullProgressMonitor();
   56.59 +
   56.60 +    void onDownload(ProgressHandle progressHandle);
   56.61 +
   56.62 +    void onValidate(ProgressHandle progressHandle);
   56.63 +
   56.64 +    void onInstall(ProgressHandle progressHandle);
   56.65 +
   56.66 +    void onEnable(ProgressHandle progressHandle);
   56.67 +
   56.68 +    static final class DevNullProgressMonitor implements ProgressMonitor {
   56.69 +        public void onDownload(ProgressHandle progressHandle) {
   56.70 +        }
   56.71 +
   56.72 +        public void onValidate(ProgressHandle progressHandle) {
   56.73 +        }
   56.74 +
   56.75 +        public void onInstall(ProgressHandle progressHandle) {
   56.76 +        }
   56.77 +
   56.78 +        public void onEnable(ProgressHandle progressHandle) {
   56.79 +        }
   56.80 +    }
   56.81 +}
    57.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    57.2 +++ b/core.browser.xulrunner/src/org/netbeans/core/browser/xulrunner/mozillaBrowser.xml	Thu Nov 22 15:44:15 2012 +0100
    57.3 @@ -0,0 +1,9 @@
    57.4 +<?xml version="1.0"?>
    57.5 +<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "http://www.netbeans.org/dtds/sessionsettings-1_0.dtd">
    57.6 +<settings version="1.0">
    57.7 +    <module name="org.netbeans.core.browser.xulrunner/1"/>
    57.8 +    <instanceof class="java.lang.Object"/>
    57.9 +    <instanceof class="org.openide.awt.HtmlBrowser$Factory"/>
   57.10 +    <instanceof class="java.io.Serializable"/>
   57.11 +    <instance class="org.netbeans.core.browser.xulrunner.BrowserFactory"/>
   57.12 +</settings>
    58.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    58.2 +++ b/webpreview/build.xml	Thu Nov 22 15:44:15 2012 +0100
    58.3 @@ -0,0 +1,5 @@
    58.4 +<?xml version="1.0" encoding="UTF-8"?>
    58.5 +<project basedir="." default="netbeans" name="webpreview">
    58.6 +    <description>Builds, tests, and runs the project org.netbeans.modules.webpreview</description>
    58.7 +    <import file="../nbbuild/templates/projectized.xml"/>
    58.8 +</project>
    59.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    59.2 +++ b/webpreview/manifest.mf	Thu Nov 22 15:44:15 2012 +0100
    59.3 @@ -0,0 +1,7 @@
    59.4 +Manifest-Version: 1.0
    59.5 +OpenIDE-Module: org.netbeans.modules.webpreview/1
    59.6 +OpenIDE-Module-Implementation-Version: 1
    59.7 +OpenIDE-Module-Install: org/netbeans/modules/webpreview/Installer.class
    59.8 +OpenIDE-Module-Layer: org/netbeans/modules/webpreview/resources/layer.xml
    59.9 +OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/webpreview/resources/Bundle.properties
   59.10 +
    60.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    60.2 +++ b/webpreview/nbproject/project.properties	Thu Nov 22 15:44:15 2012 +0100
    60.3 @@ -0,0 +1,3 @@
    60.4 +javac.source=1.6
    60.5 +javac.compilerargs=-Xlint -Xlint:-serial
    60.6 +spec.version.base=1.2.1
    61.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    61.2 +++ b/webpreview/nbproject/project.xml	Thu Nov 22 15:44:15 2012 +0100
    61.3 @@ -0,0 +1,99 @@
    61.4 +<?xml version="1.0" encoding="UTF-8"?>
    61.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
    61.6 +    <type>org.netbeans.modules.apisupport.project</type>
    61.7 +    <configuration>
    61.8 +        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
    61.9 +            <code-name-base>org.netbeans.modules.webpreview</code-name-base>
   61.10 +            <module-dependencies>
   61.11 +                <dependency>
   61.12 +                    <code-name-base>org.netbeans.core.browser</code-name-base>
   61.13 +                    <build-prerequisite/>
   61.14 +                    <compile-dependency/>
   61.15 +                    <run-dependency>
   61.16 +                        <release-version>1</release-version>
   61.17 +                        <specification-version>1.0</specification-version>
   61.18 +                    </run-dependency>
   61.19 +                </dependency>
   61.20 +                <dependency>
   61.21 +                    <code-name-base>org.netbeans.modules.editor</code-name-base>
   61.22 +                    <build-prerequisite/>
   61.23 +                    <compile-dependency/>
   61.24 +                    <run-dependency>
   61.25 +                        <release-version>3</release-version>
   61.26 +                        <specification-version>1.53</specification-version>
   61.27 +                    </run-dependency>
   61.28 +                </dependency>
   61.29 +                <dependency>
   61.30 +                    <code-name-base>org.netbeans.modules.editor.lib2</code-name-base>
   61.31 +                    <build-prerequisite/>
   61.32 +                    <compile-dependency/>
   61.33 +                    <run-dependency>
   61.34 +                        <release-version>1</release-version>
   61.35 +                        <specification-version>1.13</specification-version>
   61.36 +                    </run-dependency>
   61.37 +                </dependency>
   61.38 +                <dependency>
   61.39 +                    <code-name-base>org.netbeans.modules.editor.mimelookup</code-name-base>
   61.40 +                    <build-prerequisite/>
   61.41 +                    <compile-dependency/>
   61.42 +                    <run-dependency>
   61.43 +                        <release-version>1</release-version>
   61.44 +                        <specification-version>1.12</specification-version>
   61.45 +                    </run-dependency>
   61.46 +                </dependency>
   61.47 +                <dependency>
   61.48 +                    <code-name-base>org.netbeans.modules.settings</code-name-base>
   61.49 +                    <build-prerequisite/>
   61.50 +                    <compile-dependency/>
   61.51 +                    <run-dependency>
   61.52 +                        <release-version>1</release-version>
   61.53 +                        <specification-version>1.20</specification-version>
   61.54 +                    </run-dependency>
   61.55 +                </dependency>
   61.56 +                <dependency>
   61.57 +                    <code-name-base>org.openide.filesystems</code-name-base>
   61.58 +                    <build-prerequisite/>
   61.59 +                    <compile-dependency/>
   61.60 +                    <run-dependency>
   61.61 +                        <specification-version>7.23</specification-version>
   61.62 +                    </run-dependency>
   61.63 +                </dependency>
   61.64 +                <dependency>
   61.65 +                    <code-name-base>org.openide.modules</code-name-base>
   61.66 +                    <build-prerequisite/>
   61.67 +                    <compile-dependency/>
   61.68 +                    <run-dependency>
   61.69 +                        <specification-version>7.11</specification-version>
   61.70 +                    </run-dependency>
   61.71 +                </dependency>
   61.72 +                <dependency>
   61.73 +                    <code-name-base>org.openide.util</code-name-base>
   61.74 +                    <build-prerequisite/>
   61.75 +                    <compile-dependency/>
   61.76 +                    <run-dependency>
   61.77 +                        <specification-version>8.0</specification-version>
   61.78 +                    </run-dependency>
   61.79 +                </dependency>
   61.80 +                <dependency>
   61.81 +                    <code-name-base>org.openide.util.lookup</code-name-base>
   61.82 +                    <build-prerequisite/>
   61.83 +                    <compile-dependency/>
   61.84 +                    <run-dependency>
   61.85 +                        <specification-version>8.0</specification-version>
   61.86 +                    </run-dependency>
   61.87 +                </dependency>
   61.88 +                <dependency>
   61.89 +                    <code-name-base>org.openide.windows</code-name-base>
   61.90 +                    <build-prerequisite/>
   61.91 +                    <compile-dependency/>
   61.92 +                    <run-dependency>
   61.93 +                        <specification-version>6.28</specification-version>
   61.94 +                    </run-dependency>
   61.95 +                </dependency>
   61.96 +            </module-dependencies>
   61.97 +            <public-packages>
   61.98 +                <package>org.netbeans.modules.webpreview.api</package>
   61.99 +            </public-packages>
  61.100 +        </data>
  61.101 +    </configuration>
  61.102 +</project>
    62.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    62.2 +++ b/webpreview/src/org/netbeans/modules/webpreview/Accessor.java	Thu Nov 22 15:44:15 2012 +0100
    62.3 @@ -0,0 +1,80 @@
    62.4 +/*
    62.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    62.6 + *
    62.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    62.8 + *
    62.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   62.10 + * Other names may be trademarks of their respective owners.
   62.11 + *
   62.12 + * The contents of this file are subject to the terms of either the GNU
   62.13 + * General Public License Version 2 only ("GPL") or the Common
   62.14 + * Development and Distribution License("CDDL") (collectively, the
   62.15 + * "License"). You may not use this file except in compliance with the
   62.16 + * License. You can obtain a copy of the License at
   62.17 + * http://www.netbeans.org/cddl-gplv2.html
   62.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   62.19 + * specific language governing permissions and limitations under the
   62.20 + * License.  When distributing the software, include this License Header
   62.21 + * Notice in each file and include the License file at
   62.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   62.23 + * particular file as subject to the "Classpath" exception as provided
   62.24 + * by Oracle in the GPL Version 2 section of the License file that
   62.25 + * accompanied this code. If applicable, add the following below the
   62.26 + * License Header, with the fields enclosed by brackets [] replaced by
   62.27 + * your own identifying information:
   62.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   62.29 + *
   62.30 + * If you wish your version of this file to be governed by only the CDDL
   62.31 + * or only the GPL Version 2, indicate your decision by adding
   62.32 + * "[Contributor] elects to include this software in this distribution
   62.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   62.34 + * single choice of license, a recipient has the option to distribute
   62.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   62.36 + * to extend the choice of license to its licensees as provided above.
   62.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   62.38 + * Version 2 license, then the option applies only if the new code is
   62.39 + * made subject to such option by the copyright holder.
   62.40 + *
   62.41 + * Contributor(s):
   62.42 + *
   62.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   62.44 + */
   62.45 +
   62.46 +package org.netbeans.modules.webpreview;
   62.47 +
   62.48 +import org.netbeans.modules.webpreview.api.WebPreviewable;
   62.49 +
   62.50 +
   62.51 +/**
   62.52 + *
   62.53 + * @author Milan Kubec
   62.54 + */
   62.55 +public abstract class Accessor {
   62.56 +
   62.57 +    private static volatile Accessor DEFAULT;
   62.58 +
   62.59 +    public Accessor() { }
   62.60 +
   62.61 +    public static void setDefault(Accessor accessor) {
   62.62 +        if (DEFAULT != null) {
   62.63 +            throw new IllegalStateException();
   62.64 +        }
   62.65 +        DEFAULT = accessor;
   62.66 +    }
   62.67 +
   62.68 +    public static Accessor getDefault() {
   62.69 +        Accessor a = DEFAULT;
   62.70 +        if (a != null) {
   62.71 +            return a;
   62.72 +        }
   62.73 +        try {
   62.74 +            Class.forName(WebPreviewable.class.getName());
   62.75 +        } catch (Exception e) {
   62.76 +            e.printStackTrace();
   62.77 +        }
   62.78 +        return DEFAULT;
   62.79 +    }
   62.80 +
   62.81 +    protected abstract WebPreviewable.Impl getImpl(WebPreviewable webPreview);
   62.82 +
   62.83 +}
    63.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    63.2 +++ b/webpreview/src/org/netbeans/modules/webpreview/Bundle.properties	Thu Nov 22 15:44:15 2012 +0100
    63.3 @@ -0,0 +1,4 @@
    63.4 +CTL_SomeAction=Some Action
    63.5 +CTL_WebPreviewAction=WebPreview
    63.6 +CTL_WebPreviewTopComponent=Browser Preview
    63.7 +HINT_WebPreviewTopComponent=This is a Browser Preview window
    64.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    64.2 +++ b/webpreview/src/org/netbeans/modules/webpreview/HTMLPreviewAction.java	Thu Nov 22 15:44:15 2012 +0100
    64.3 @@ -0,0 +1,103 @@
    64.4 +/*
    64.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    64.6 + *
    64.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    64.8 + *
    64.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   64.10 + * Other names may be trademarks of their respective owners.
   64.11 + *
   64.12 + * The contents of this file are subject to the terms of either the GNU
   64.13 + * General Public License Version 2 only ("GPL") or the Common
   64.14 + * Development and Distribution License("CDDL") (collectively, the
   64.15 + * "License"). You may not use this file except in compliance with the
   64.16 + * License. You can obtain a copy of the License at
   64.17 + * http://www.netbeans.org/cddl-gplv2.html
   64.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   64.19 + * specific language governing permissions and limitations under the
   64.20 + * License.  When distributing the software, include this License Header
   64.21 + * Notice in each file and include the License file at
   64.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   64.23 + * particular file as subject to the "Classpath" exception as provided
   64.24 + * by Oracle in the GPL Version 2 section of the License file that
   64.25 + * accompanied this code. If applicable, add the following below the
   64.26 + * License Header, with the fields enclosed by brackets [] replaced by
   64.27 + * your own identifying information:
   64.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   64.29 + *
   64.30 + * If you wish your version of this file to be governed by only the CDDL
   64.31 + * or only the GPL Version 2, indicate your decision by adding
   64.32 + * "[Contributor] elects to include this software in this distribution
   64.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   64.34 + * single choice of license, a recipient has the option to distribute
   64.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   64.36 + * to extend the choice of license to its licensees as provided above.
   64.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   64.38 + * Version 2 license, then the option applies only if the new code is
   64.39 + * made subject to such option by the copyright holder.
   64.40 + *
   64.41 + * Contributor(s):
   64.42 + *
   64.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   64.44 + */
   64.45 +package org.netbeans.modules.webpreview;
   64.46 +
   64.47 +import java.awt.Component;
   64.48 +import java.awt.EventQueue;
   64.49 +import java.awt.event.ActionEvent;
   64.50 +
   64.51 +import java.beans.PropertyChangeEvent;
   64.52 +import java.beans.PropertyChangeListener;
   64.53 +import javax.swing.AbstractAction;
   64.54 +import javax.swing.JToggleButton;
   64.55 +
   64.56 +import org.netbeans.api.editor.mimelookup.MimeLookup;
   64.57 +import org.netbeans.core.browser.api.EmbeddedBrowserFactory;
   64.58 +import org.netbeans.modules.webpreview.HTMLWebPreviewable.HTMLWebPreviewableImpl;
   64.59 +import org.netbeans.modules.webpreview.api.WebPreviewable;
   64.60 +
   64.61 +import org.openide.util.Lookup;
   64.62 +import org.openide.util.actions.Presenter;
   64.63 +
   64.64 +public final class HTMLPreviewAction extends AbstractAction implements Presenter.Toolbar {
   64.65 +
   64.66 +    private static final String mimeType = "text/html"; // NOI18N
   64.67 +
   64.68 +    public HTMLPreviewAction() {
   64.69 +        putValue(NAME, "Preview");
   64.70 +        putValue(SHORT_DESCRIPTION, "HTML Preview");
   64.71 +    }
   64.72 +
   64.73 +    public void actionPerformed(ActionEvent e) {
   64.74 +        Lookup mimeLookup = MimeLookup.getLookup(mimeType);
   64.75 +        WebPreviewable previewable = mimeLookup.lookup(WebPreviewable.class);
   64.76 +        if (previewable != null) {
   64.77 +            WebPreviewable.Impl previewImpl = Accessor.getDefault().getImpl(previewable);
   64.78 +            if (previewImpl instanceof HTMLWebPreviewableImpl) {
   64.79 +                ((HTMLWebPreviewableImpl) previewImpl).setPreviewEnabled(((JToggleButton) e.getSource()).isSelected());
   64.80 +            }
   64.81 +        }
   64.82 +    }
   64.83 +
   64.84 +    @Override
   64.85 +    public boolean isEnabled() {
   64.86 +        return true;
   64.87 +    }
   64.88 +
   64.89 +    public Component getToolbarPresenter() {
   64.90 +        final JToggleButton presenter = new JToggleButton(this);
   64.91 +        presenter.setEnabled(EmbeddedBrowserFactory.getDefault().isEnabled());
   64.92 +        EmbeddedBrowserFactory.getDefault().addPropertyChangeListener(new PropertyChangeListener() {
   64.93 +            public void propertyChange(PropertyChangeEvent evt) {
   64.94 +                presenter.setEnabled(EmbeddedBrowserFactory.getDefault().isEnabled());
   64.95 +                EventQueue.invokeLater(new Runnable() {
   64.96 +                    public void run() {
   64.97 +                        WebPreviewTopComponent.findInstance().maybeInitWebBrowser();
   64.98 +                    }
   64.99 +                });
  64.100 +            }
  64.101 +        });
  64.102 +        presenter.setSelected(false);
  64.103 +        return presenter;
  64.104 +    }
  64.105 +
  64.106 +}
    65.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    65.2 +++ b/webpreview/src/org/netbeans/modules/webpreview/HTMLWebPreviewable.java	Thu Nov 22 15:44:15 2012 +0100
    65.3 @@ -0,0 +1,182 @@
    65.4 +/*
    65.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    65.6 + *
    65.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    65.8 + *
    65.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   65.10 + * Other names may be trademarks of their respective owners.
   65.11 + *
   65.12 + * The contents of this file are subject to the terms of either the GNU
   65.13 + * General Public License Version 2 only ("GPL") or the Common
   65.14 + * Development and Distribution License("CDDL") (collectively, the
   65.15 + * "License"). You may not use this file except in compliance with the
   65.16 + * License. You can obtain a copy of the License at
   65.17 + * http://www.netbeans.org/cddl-gplv2.html
   65.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   65.19 + * specific language governing permissions and limitations under the
   65.20 + * License.  When distributing the software, include this License Header
   65.21 + * Notice in each file and include the License file at
   65.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   65.23 + * particular file as subject to the "Classpath" exception as provided
   65.24 + * by Oracle in the GPL Version 2 section of the License file that
   65.25 + * accompanied this code. If applicable, add the following below the
   65.26 + * License Header, with the fields enclosed by brackets [] replaced by
   65.27 + * your own identifying information:
   65.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   65.29 + *
   65.30 + * If you wish your version of this file to be governed by only the CDDL
   65.31 + * or only the GPL Version 2, indicate your decision by adding
   65.32 + * "[Contributor] elects to include this software in this distribution
   65.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   65.34 + * single choice of license, a recipient has the option to distribute
   65.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   65.36 + * to extend the choice of license to its licensees as provided above.
   65.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   65.38 + * Version 2 license, then the option applies only if the new code is
   65.39 + * made subject to such option by the copyright holder.
   65.40 + *
   65.41 + * Contributor(s):
   65.42 + *
   65.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   65.44 + */
   65.45 +package org.netbeans.modules.webpreview;
   65.46 +
   65.47 +import java.beans.PropertyChangeListener;
   65.48 +import java.beans.PropertyChangeSupport;
   65.49 +import java.util.Map;
   65.50 +import java.util.WeakHashMap;
   65.51 +import javax.swing.text.Document;
   65.52 +import javax.swing.text.JTextComponent;
   65.53 +import org.netbeans.api.editor.EditorRegistry;
   65.54 +import org.netbeans.core.browser.api.WebBrowser;
   65.55 +import org.netbeans.modules.editor.NbEditorUtilities;
   65.56 +import org.netbeans.modules.webpreview.api.WebPreviewable;
   65.57 +import org.openide.filesystems.FileAttributeEvent;
   65.58 +import org.openide.filesystems.FileChangeListener;
   65.59 +import org.openide.filesystems.FileEvent;
   65.60 +import org.openide.filesystems.FileObject;
   65.61 +import org.openide.filesystems.FileRenameEvent;
   65.62 +import org.openide.filesystems.FileStateInvalidException;
   65.63 +import org.openide.util.Exceptions;
   65.64 +
   65.65 +/**
   65.66 + *
   65.67 + * @author Milan Kubec
   65.68 + */
   65.69 +public class HTMLWebPreviewable {
   65.70 +
   65.71 +    private static WebPreviewable instance = WebPreviewable.create(new HTMLWebPreviewableImpl());
   65.72 +
   65.73 +    private HTMLWebPreviewable() { }
   65.74 +
   65.75 +    public static WebPreviewable instanceCreate() {
   65.76 +        return instance;
   65.77 +    }
   65.78 +
   65.79 +    public static class HTMLWebPreviewableImpl implements WebPreviewable.Impl {
   65.80 +
   65.81 +        private Map<FileObject,Boolean> enabledComponents = new WeakHashMap<FileObject,Boolean>();
   65.82 +
   65.83 +        private PropertyChangeSupport pcs;
   65.84 +
   65.85 +        private WebBrowser attachedBrowser;
   65.86 +
   65.87 +        public HTMLWebPreviewableImpl() {
   65.88 +            pcs = new PropertyChangeSupport(this);
   65.89 +        }
   65.90 +
   65.91 +        public void setUserPreviewFile(String url) {
   65.92 +            // XXX
   65.93 +        }
   65.94 +        
   65.95 +        public void setPreviewEnabled(boolean b) {
   65.96 +            FileObject docFO = getFocusedFile();
   65.97 +            if (docFO != null) {
   65.98 +                enabledComponents.put(docFO, b);
   65.99 +            }
  65.100 +            pcs.firePropertyChange(WebPreviewable.PROP_PREVIEW_ENABLED, null, null);
  65.101 +        }
  65.102 +
  65.103 +        public boolean isPreviewEnabled() {
  65.104 +            boolean toReturn = false;
  65.105 +            if (enabledComponents.isEmpty()) {
  65.106 +                return false;
  65.107 +            } else {
  65.108 +                FileObject docFO = getFocusedFile();
  65.109 +                if (docFO != null) {
  65.110 +                    Boolean bool = enabledComponents.get(docFO);
  65.111 +                    toReturn = bool == null ? false : bool;
  65.112 +                }
  65.113 +            }
  65.114 +            return toReturn;
  65.115 +        }
  65.116 +
  65.117 +        public void onAttach(final WebBrowser browser) {
  65.118 +            attachedBrowser = browser;
  65.119 +            FileObject docFO = getFocusedFile();
  65.120 +            if (docFO != null && browser != null) {
  65.121 +                docFO.removeFileChangeListener(fileChangeListener);
  65.122 +                docFO.addFileChangeListener(fileChangeListener);
  65.123 +                String file2Open = null;
  65.124 +                try {
  65.125 +                    file2Open = docFO.getURL().toExternalForm();
  65.126 +                } catch (FileStateInvalidException ex) {
  65.127 +                    Exceptions.printStackTrace(ex);
  65.128 +                }
  65.129 +                if (file2Open != null) {
  65.130 +                    browser.setURL(file2Open);
  65.131 +                }
  65.132 +            }
  65.133 +        }
  65.134 +
  65.135 +        // listening on file save
  65.136 +        private FileChangeListener fileChangeListener = new FileChangeListener() {
  65.137 +            public void fileFolderCreated(FileEvent fe) {
  65.138 +            }
  65.139 +            public void fileDataCreated(FileEvent fe) {
  65.140 +            }
  65.141 +            public void fileChanged(FileEvent fe) {
  65.142 +                WebBrowser browser = getAttachedBrowser();
  65.143 +                if (browser != null) {
  65.144 +                    browser.reloadDocument();
  65.145 +                }
  65.146 +            }
  65.147 +            public void fileDeleted(FileEvent fe) {
  65.148 +            }
  65.149 +            public void fileRenamed(FileRenameEvent fe) {
  65.150 +            }
  65.151 +            public void fileAttributeChanged(FileAttributeEvent fe) {
  65.152 +            }
  65.153 +        };
  65.154 +
  65.155 +        private WebBrowser getAttachedBrowser() {
  65.156 +            return attachedBrowser;
  65.157 +        }
  65.158 +
  65.159 +        private FileObject getFocusedFile() {
  65.160 +            FileObject docFO = null;
  65.161 +            JTextComponent comp = EditorRegistry.lastFocusedComponent();
  65.162 +            if (comp != null) {
  65.163 +                Document doc = comp.getDocument();
  65.164 +                docFO = NbEditorUtilities.getFileObject(doc);
  65.165 +            }
  65.166 +            return docFO;
  65.167 +        }
  65.168 +
  65.169 +        public void onDettach(WebBrowser browser) {
  65.170 +        }
  65.171 +
  65.172 +        public void onClose(WebBrowser browser) {
  65.173 +        }
  65.174 +
  65.175 +        public void addPropertyChangeListener(PropertyChangeListener l) {
  65.176 +            pcs.addPropertyChangeListener(l);
  65.177 +        }
  65.178 +
  65.179 +        public void removePropertyChangeListener(PropertyChangeListener l) {
  65.180 +            pcs.removePropertyChangeListener(l);
  65.181 +        }
  65.182 +
  65.183 +    }
  65.184 +
  65.185 +}
    66.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    66.2 +++ b/webpreview/src/org/netbeans/modules/webpreview/Installer.java	Thu Nov 22 15:44:15 2012 +0100
    66.3 @@ -0,0 +1,64 @@
    66.4 +/*
    66.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    66.6 + *
    66.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    66.8 + *
    66.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   66.10 + * Other names may be trademarks of their respective owners.
   66.11 + *
   66.12 + * The contents of this file are subject to the terms of either the GNU
   66.13 + * General Public License Version 2 only ("GPL") or the Common
   66.14 + * Development and Distribution License("CDDL") (collectively, the
   66.15 + * "License"). You may not use this file except in compliance with the
   66.16 + * License. You can obtain a copy of the License at
   66.17 + * http://www.netbeans.org/cddl-gplv2.html
   66.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   66.19 + * specific language governing permissions and limitations under the
   66.20 + * License.  When distributing the software, include this License Header
   66.21 + * Notice in each file and include the License file at
   66.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   66.23 + * particular file as subject to the "Classpath" exception as provided
   66.24 + * by Oracle in the GPL Version 2 section of the License file that
   66.25 + * accompanied this code. If applicable, add the following below the
   66.26 + * License Header, with the fields enclosed by brackets [] replaced by
   66.27 + * your own identifying information:
   66.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   66.29 + *
   66.30 + * If you wish your version of this file to be governed by only the CDDL
   66.31 + * or only the GPL Version 2, indicate your decision by adding
   66.32 + * "[Contributor] elects to include this software in this distribution
   66.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   66.34 + * single choice of license, a recipient has the option to distribute
   66.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   66.36 + * to extend the choice of license to its licensees as provided above.
   66.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   66.38 + * Version 2 license, then the option applies only if the new code is
   66.39 + * made subject to such option by the copyright holder.
   66.40 + *
   66.41 + * Contributor(s):
   66.42 + *
   66.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   66.44 + */
   66.45 +package org.netbeans.modules.webpreview;
   66.46 +
   66.47 +import org.netbeans.api.editor.EditorRegistry;
   66.48 +import org.openide.modules.ModuleInstall;
   66.49 +
   66.50 +/**
   66.51 + * Web Preview module install
   66.52 + */
   66.53 +public class Installer extends ModuleInstall {
   66.54 +
   66.55 +    @Override
   66.56 +    public void restored() {
   66.57 +        EditorRegistry.addPropertyChangeListener(new WebPreviewControler());
   66.58 +    }
   66.59 +
   66.60 +    @Override
   66.61 +    public boolean closing() {
   66.62 +        // we don't want the browser to open on IDE startup
   66.63 +        WebPreviewTopComponent.findInstance().close();
   66.64 +        return super.closing();
   66.65 +    }
   66.66 +    
   66.67 +}
    67.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    67.2 +++ b/webpreview/src/org/netbeans/modules/webpreview/WebPreviewControler.java	Thu Nov 22 15:44:15 2012 +0100
    67.3 @@ -0,0 +1,118 @@
    67.4 +/*
    67.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    67.6 + *
    67.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    67.8 + *
    67.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   67.10 + * Other names may be trademarks of their respective owners.
   67.11 + *
   67.12 + * The contents of this file are subject to the terms of either the GNU
   67.13 + * General Public License Version 2 only ("GPL") or the Common
   67.14 + * Development and Distribution License("CDDL") (collectively, the
   67.15 + * "License"). You may not use this file except in compliance with the
   67.16 + * License. You can obtain a copy of the License at
   67.17 + * http://www.netbeans.org/cddl-gplv2.html
   67.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   67.19 + * specific language governing permissions and limitations under the
   67.20 + * License.  When distributing the software, include this License Header
   67.21 + * Notice in each file and include the License file at
   67.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   67.23 + * particular file as subject to the "Classpath" exception as provided
   67.24 + * by Oracle in the GPL Version 2 section of the License file that
   67.25 + * accompanied this code. If applicable, add the following below the
   67.26 + * License Header, with the fields enclosed by brackets [] replaced by
   67.27 + * your own identifying information:
   67.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   67.29 + *
   67.30 + * If you wish your version of this file to be governed by only the CDDL
   67.31 + * or only the GPL Version 2, indicate your decision by adding
   67.32 + * "[Contributor] elects to include this software in this distribution
   67.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   67.34 + * single choice of license, a recipient has the option to distribute
   67.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   67.36 + * to extend the choice of license to its licensees as provided above.
   67.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   67.38 + * Version 2 license, then the option applies only if the new code is
   67.39 + * made subject to such option by the copyright holder.
   67.40 + *
   67.41 + * Contributor(s):
   67.42 + *
   67.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   67.44 + */
   67.45 +
   67.46 +package org.netbeans.modules.webpreview;
   67.47 +
   67.48 +import java.beans.PropertyChangeEvent;
   67.49 +import java.beans.PropertyChangeListener;
   67.50 +import java.util.logging.Logger;
   67.51 +import javax.swing.text.Document;
   67.52 +
   67.53 +import org.netbeans.api.editor.EditorRegistry;
   67.54 +import org.netbeans.api.editor.mimelookup.MimeLookup;
   67.55 +import org.netbeans.core.browser.api.WebBrowser;
   67.56 +import org.netbeans.modules.webpreview.api.WebPreviewable;
   67.57 +
   67.58 +import org.openide.util.Lookup;
   67.59 +
   67.60 +/**
   67.61 + *
   67.62 + * @author Milan Kubec
   67.63 + */
   67.64 +public class WebPreviewControler implements PropertyChangeListener {
   67.65 +
   67.66 +    public static Logger LOGGER = Logger.getLogger("WebPreview");
   67.67 +
   67.68 +    private WebPreviewable preview;
   67.69 +
   67.70 +    // User changed selected component in editor
   67.71 +    public void propertyChange(PropertyChangeEvent evt) {
   67.72 +        if (EditorRegistry.FOCUS_GAINED_PROPERTY.equals(evt.getPropertyName())) {
   67.73 +            Document doc = EditorRegistry.focusedComponent().getDocument();
   67.74 +            String mimeType = (String) doc.getProperty("mimeType"); // NOI18N
   67.75 +            if (mimeType != null) {
   67.76 +                LOGGER.fine("Activated editor component with MIME type: " + mimeType);
   67.77 +                Lookup mimeLookup = MimeLookup.getLookup(mimeType);
   67.78 +                WebPreviewable previewable = mimeLookup.lookup(WebPreviewable.class);
   67.79 +                if (previewable != null) {
   67.80 +                    preview = previewable;
   67.81 +                    LOGGER.fine("Component contains WebPreviewable in MIME Lookup: " + previewable);
   67.82 +                    WebBrowser browser = WebPreviewTopComponent.findInstance().getWebBrowser();
   67.83 +                    final WebPreviewable.Impl previewImpl = Accessor.getDefault().getImpl(previewable);
   67.84 +                    previewImpl.removePropertyChangeListener(previewEnabledListener);
   67.85 +                    previewImpl.addPropertyChangeListener(previewEnabledListener);
   67.86 +                    if (previewImpl.isPreviewEnabled()) {
   67.87 +                        previewImpl.onAttach(browser);
   67.88 +                        WebPreviewTopComponent.findInstance().open();
   67.89 +                        WebPreviewTopComponent.findInstance().requestVisible();
   67.90 +                    } else { // preview is disabled
   67.91 +                        previewImpl.onDettach(browser);
   67.92 +                        WebPreviewTopComponent.findInstance().close();
   67.93 +                    }
   67.94 +                } else { // no previewable in MimeLookup => closing the preview TC
   67.95 +                    if (WebPreviewTopComponent.findInstance().isOpened()) {
   67.96 +                        // XXX tady by melo byt onDettach pro vsechny previewables
   67.97 +                        WebPreviewTopComponent.findInstance().close();
   67.98 +                    }
   67.99 +                }
  67.100 +            }
  67.101 +        }
  67.102 +    }
  67.103 +
  67.104 +    // User enabled/disabled web preview for given document in editor tab
  67.105 +    private PropertyChangeListener previewEnabledListener = new PropertyChangeListener() {
  67.106 +        public void propertyChange(PropertyChangeEvent evt) {
  67.107 +            if (WebPreviewable.PROP_PREVIEW_ENABLED.equals(evt.getPropertyName())) {
  67.108 +                WebPreviewable.Impl previewImpl = Accessor.getDefault().getImpl(preview);
  67.109 +                if (previewImpl.isPreviewEnabled()) {
  67.110 +                    previewImpl.onAttach(WebPreviewTopComponent.findInstance().getWebBrowser());
  67.111 +                    WebPreviewTopComponent.findInstance().open();
  67.112 +                    WebPreviewTopComponent.findInstance().requestVisible();
  67.113 +                } else {
  67.114 +                    previewImpl.onDettach(WebPreviewTopComponent.findInstance().getWebBrowser());
  67.115 +                    WebPreviewTopComponent.findInstance().close();
  67.116 +                }
  67.117 +            }
  67.118 +        }
  67.119 +    };
  67.120 +
  67.121 +}
    68.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    68.2 +++ b/webpreview/src/org/netbeans/modules/webpreview/WebPreviewTopComponent.form	Thu Nov 22 15:44:15 2012 +0100
    68.3 @@ -0,0 +1,18 @@
    68.4 +<?xml version="1.1" encoding="UTF-8" ?>
    68.5 +
    68.6 +<Form version="1.4" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
    68.7 +  <AuxValues>
    68.8 +    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
    68.9 +    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
   68.10 +    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
   68.11 +    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
   68.12 +    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
   68.13 +    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
   68.14 +    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
   68.15 +    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
   68.16 +    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
   68.17 +    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
   68.18 +  </AuxValues>
   68.19 +
   68.20 +  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
   68.21 +</Form>
    69.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    69.2 +++ b/webpreview/src/org/netbeans/modules/webpreview/WebPreviewTopComponent.java	Thu Nov 22 15:44:15 2012 +0100
    69.3 @@ -0,0 +1,180 @@
    69.4 +/*
    69.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    69.6 + *
    69.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    69.8 + *
    69.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   69.10 + * Other names may be trademarks of their respective owners.
   69.11 + *
   69.12 + * The contents of this file are subject to the terms of either the GNU
   69.13 + * General Public License Version 2 only ("GPL") or the Common
   69.14 + * Development and Distribution License("CDDL") (collectively, the
   69.15 + * "License"). You may not use this file except in compliance with the
   69.16 + * License. You can obtain a copy of the License at
   69.17 + * http://www.netbeans.org/cddl-gplv2.html
   69.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   69.19 + * specific language governing permissions and limitations under the
   69.20 + * License.  When distributing the software, include this License Header
   69.21 + * Notice in each file and include the License file at
   69.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   69.23 + * particular file as subject to the "Classpath" exception as provided
   69.24 + * by Oracle in the GPL Version 2 section of the License file that
   69.25 + * accompanied this code. If applicable, add the following below the
   69.26 + * License Header, with the fields enclosed by brackets [] replaced by
   69.27 + * your own identifying information:
   69.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   69.29 + *
   69.30 + * If you wish your version of this file to be governed by only the CDDL
   69.31 + * or only the GPL Version 2, indicate your decision by adding
   69.32 + * "[Contributor] elects to include this software in this distribution
   69.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   69.34 + * single choice of license, a recipient has the option to distribute
   69.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   69.36 + * to extend the choice of license to its licensees as provided above.
   69.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   69.38 + * Version 2 license, then the option applies only if the new code is
   69.39 + * made subject to such option by the copyright holder.
   69.40 + *
   69.41 + * Contributor(s):
   69.42 + *
   69.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   69.44 + */
   69.45 +
   69.46 +package org.netbeans.modules.webpreview;
   69.47 +
   69.48 +import java.awt.BorderLayout;
   69.49 +import java.util.logging.Logger;
   69.50 +import org.openide.util.NbBundle;
   69.51 +import org.openide.windows.TopComponent;
   69.52 +import org.openide.windows.WindowManager;
   69.53 +//import org.openide.util.ImageUtilities;
   69.54 +import org.netbeans.api.settings.ConvertAsProperties;
   69.55 +import org.netbeans.core.browser.api.EmbeddedBrowserFactory;
   69.56 +import org.netbeans.core.browser.api.WebBrowser;
   69.57 +
   69.58 +/**
   69.59 + * Top component which displays something.
   69.60 + */
   69.61 +@ConvertAsProperties(
   69.62 +    dtd="-//org.netbeans.modules.webpreview//WebPreview//EN",
   69.63 +    autostore=false
   69.64 +)
   69.65 +public final class WebPreviewTopComponent extends TopComponent {
   69.66 +
   69.67 +    public static Logger LOGGER = Logger.getLogger("WebPreview");
   69.68 +
   69.69 +    private WebBrowser webBrowser;
   69.70 +
   69.71 +    private static WebPreviewTopComponent instance;
   69.72 +    
   69.73 +    /** path to the icon used by the component and its open action */
   69.74 +//    static final String ICON_PATH = "SET/PATH/TO/ICON/HERE";
   69.75 +
   69.76 +    private static final String PREFERRED_ID = "WebPreviewTopComponent";
   69.77 +
   69.78 +    public WebPreviewTopComponent() {
   69.79 +        initComponents();
   69.80 +        setName(NbBundle.getMessage(WebPreviewTopComponent.class, "CTL_WebPreviewTopComponent"));
   69.81 +        setToolTipText(NbBundle.getMessage(WebPreviewTopComponent.class, "HINT_WebPreviewTopComponent"));
   69.82 +//        setIcon(ImageUtilities.loadImage(ICON_PATH, true));
   69.83 +        if (EmbeddedBrowserFactory.getDefault().isEnabled()) {
   69.84 +            webBrowser = EmbeddedBrowserFactory.getDefault().createEmbeddedBrowser();
   69.85 +        }
   69.86 +    }
   69.87 +
   69.88 +    public void maybeInitWebBrowser() {
   69.89 +        if (webBrowser == null && EmbeddedBrowserFactory.getDefault().isEnabled()) {
   69.90 +            webBrowser = EmbeddedBrowserFactory.getDefault().createEmbeddedBrowser();
   69.91 +        }
   69.92 +    }
   69.93 +
   69.94 +    public WebBrowser getWebBrowser() {
   69.95 +        return webBrowser;
   69.96 +    }
   69.97 +
   69.98 +    /** This method is called from within the constructor to
   69.99 +     * initialize the form.
  69.100 +     * WARNING: Do NOT modify this code. The content of this method is
  69.101 +     * always regenerated by the Form Editor.
  69.102 +     */
  69.103 +    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  69.104 +    private void initComponents() {
  69.105 +
  69.106 +        setLayout(new java.awt.BorderLayout());
  69.107 +    }// </editor-fold>//GEN-END:initComponents
  69.108 +
  69.109 +    // Variables declaration - do not modify//GEN-BEGIN:variables
  69.110 +    // End of variables declaration//GEN-END:variables
  69.111 +    /**
  69.112 +     * Gets default instance. Do not use directly: reserved for *.settings files only,
  69.113 +     * i.e. deserialization routines; otherwise you could get a non-deserialized instance.
  69.114 +     * To obtain the singleton instance, use {@link #findInstance}.
  69.115 +     */
  69.116 +    public static synchronized WebPreviewTopComponent getDefault() {
  69.117 +        if (instance == null) {
  69.118 +            instance = new WebPreviewTopComponent();
  69.119 +        }
  69.120 +        return instance;
  69.121 +    }
  69.122 +
  69.123 +    /**
  69.124 +     * Obtain the WebPreviewTopComponent instance. Never call {@link #getDefault} directly!
  69.125 +     */
  69.126 +    public static synchronized WebPreviewTopComponent findInstance() {
  69.127 +        TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID);
  69.128 +        if (win == null) {
  69.129 +            LOGGER.warning("Cannot find " + PREFERRED_ID + " component. It will not be located properly in the window system.");
  69.130 +            return getDefault();
  69.131 +        }
  69.132 +        if (win instanceof WebPreviewTopComponent) {
  69.133 +            return (WebPreviewTopComponent) win;
  69.134 +        }
  69.135 +        LOGGER.warning("There seem to be multiple components with the '" + PREFERRED_ID +
  69.136 +                "' ID. That is a potential source of errors and unexpected behavior.");
  69.137 +        return getDefault();
  69.138 +    }
  69.139 +
  69.140 +    @Override
  69.141 +    public int getPersistenceType() {
  69.142 +        return TopComponent.PERSISTENCE_ALWAYS;
  69.143 +    }
  69.144 +
  69.145 +    @Override
  69.146 +    public void componentOpened() {
  69.147 +        if (webBrowser != null) {
  69.148 +            add(webBrowser.getComponent(), BorderLayout.CENTER);
  69.149 +        }
  69.150 +    }
  69.151 +
  69.152 +    @Override
  69.153 +    public void componentClosed() {
  69.154 +        if (webBrowser != null) {
  69.155 +            removeAll();
  69.156 +            webBrowser.dispose();
  69.157 +        }
  69.158 +    }
  69.159 +
  69.160 +    void writeProperties(java.util.Properties p) {
  69.161 +        // better to version settings since initial version as advocated at
  69.162 +        // http://wiki.apidesign.org/wiki/PropertyFiles
  69.163 +        p.setProperty("version", "1.0");
  69.164 +        // TODO store your settings
  69.165 +    }
  69.166 +
  69.167 +    Object readProperties(java.util.Properties p) {
  69.168 +        WebPreviewTopComponent singleton = WebPreviewTopComponent.getDefault();
  69.169 +        singleton.readPropertiesImpl(p);
  69.170 +        return singleton;
  69.171 +    }
  69.172 +
  69.173 +    private void readPropertiesImpl(java.util.Properties p) {
  69.174 +        String version = p.getProperty("version");
  69.175 +        // TODO read your settings according to their version
  69.176 +    }
  69.177 +
  69.178 +    @Override
  69.179 +    protected String preferredID() {
  69.180 +        return PREFERRED_ID;
  69.181 +    }
  69.182 +
  69.183 +}
    70.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    70.2 +++ b/webpreview/src/org/netbeans/modules/webpreview/api/AccessorImpl.java	Thu Nov 22 15:44:15 2012 +0100
    70.3 @@ -0,0 +1,62 @@
    70.4 +/*
    70.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    70.6 + *
    70.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    70.8 + *
    70.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   70.10 + * Other names may be trademarks of their respective owners.
   70.11 + *
   70.12 + * The contents of this file are subject to the terms of either the GNU
   70.13 + * General Public License Version 2 only ("GPL") or the Common
   70.14 + * Development and Distribution License("CDDL") (collectively, the
   70.15 + * "License"). You may not use this file except in compliance with the
   70.16 + * License. You can obtain a copy of the License at
   70.17 + * http://www.netbeans.org/cddl-gplv2.html
   70.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   70.19 + * specific language governing permissions and limitations under the
   70.20 + * License.  When distributing the software, include this License Header
   70.21 + * Notice in each file and include the License file at
   70.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   70.23 + * particular file as subject to the "Classpath" exception as provided
   70.24 + * by Oracle in the GPL Version 2 section of the License file that
   70.25 + * accompanied this code. If applicable, add the following below the
   70.26 + * License Header, with the fields enclosed by brackets [] replaced by
   70.27 + * your own identifying information:
   70.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   70.29 + *
   70.30 + * If you wish your version of this file to be governed by only the CDDL
   70.31 + * or only the GPL Version 2, indicate your decision by adding
   70.32 + * "[Contributor] elects to include this software in this distribution
   70.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   70.34 + * single choice of license, a recipient has the option to distribute
   70.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   70.36 + * to extend the choice of license to its licensees as provided above.
   70.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   70.38 + * Version 2 license, then the option applies only if the new code is
   70.39 + * made subject to such option by the copyright holder.
   70.40 + *
   70.41 + * Contributor(s):
   70.42 + *
   70.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   70.44 + */
   70.45 +
   70.46 +package org.netbeans.modules.webpreview.api;
   70.47 +
   70.48 +import org.netbeans.modules.webpreview.Accessor;
   70.49 +import org.netbeans.modules.webpreview.api.WebPreviewable.Impl;
   70.50 +
   70.51 +/**
   70.52 + *
   70.53 + * @author Milan Kubec
   70.54 + */
   70.55 +class AccessorImpl extends Accessor {
   70.56 +
   70.57 +    public AccessorImpl() {
   70.58 +    }
   70.59 +
   70.60 +    @Override
   70.61 +    protected Impl getImpl(WebPreviewable webPreview) {
   70.62 +        return webPreview.impl;
   70.63 +    }
   70.64 +
   70.65 +}
    71.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    71.2 +++ b/webpreview/src/org/netbeans/modules/webpreview/api/WebPreviewable.java	Thu Nov 22 15:44:15 2012 +0100
    71.3 @@ -0,0 +1,128 @@
    71.4 +/*
    71.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    71.6 + *
    71.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
    71.8 + *
    71.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   71.10 + * Other names may be trademarks of their respective owners.
   71.11 + *
   71.12 + * The contents of this file are subject to the terms of either the GNU
   71.13 + * General Public License Version 2 only ("GPL") or the Common
   71.14 + * Development and Distribution License("CDDL") (collectively, the
   71.15 + * "License"). You may not use this file except in compliance with the
   71.16 + * License. You can obtain a copy of the License at
   71.17 + * http://www.netbeans.org/cddl-gplv2.html
   71.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   71.19 + * specific language governing permissions and limitations under the
   71.20 + * License.  When distributing the software, include this License Header
   71.21 + * Notice in each file and include the License file at
   71.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   71.23 + * particular file as subject to the "Classpath" exception as provided
   71.24 + * by Oracle in the GPL Version 2 section of the License file that
   71.25 + * accompanied this code. If applicable, add the following below the
   71.26 + * License Header, with the fields enclosed by brackets [] replaced by
   71.27 + * your own identifying information:
   71.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   71.29 + *
   71.30 + * If you wish your version of this file to be governed by only the CDDL
   71.31 + * or only the GPL Version 2, indicate your decision by adding
   71.32 + * "[Contributor] elects to include this software in this distribution
   71.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   71.34 + * single choice of license, a recipient has the option to distribute
   71.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   71.36 + * to extend the choice of license to its licensees as provided above.
   71.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   71.38 + * Version 2 license, then the option applies only if the new code is
   71.39 + * made subject to such option by the copyright holder.
   71.40 + *
   71.41 + * Contributor(s):
   71.42 + *
   71.43 + * Portions Copyrighted 2009 Sun Microsystems, Inc.
   71.44 + */
   71.45 +
   71.46 +package org.netbeans.modules.webpreview.api;
   71.47 +
   71.48 +import java.beans.PropertyChangeListener;
   71.49 +import org.netbeans.core.browser.api.WebBrowser;
   71.50 +import org.netbeans.modules.webpreview.Accessor;
   71.51 +
   71.52 +/**
   71.53 + * Editor windows must have an instance of this class in their Lookup to indicate
   71.54 + * that they support web preview.
   71.55 + * When such an editor is activated then the framework will open web preview window
   71.56 + * and attach its embedded browser. It's up to the editor to interact with the browser
   71.57 + * (set content, reload on save etc).
   71.58 + * When a different window/editor is activated the embedded browser is detached.
   71.59 + *
   71.60 + * @author S. Aubrecht
   71.61 + */
   71.62 +public final class WebPreviewable {
   71.63 +
   71.64 +    final Impl impl;
   71.65 +
   71.66 +    static {
   71.67 +        Accessor.setDefault(new AccessorImpl());
   71.68 +    }
   71.69 +
   71.70 +    /**
   71.71 +     * Name of boolean property which is fired when web preview for associated
   71.72 +     * editor window is enabled/disabled (user toggles appropriate 'Preview' button
   71.73 +     * in editor toolbar).
   71.74 +     */
   71.75 +    public static final String PROP_PREVIEW_ENABLED = "previewEnabled"; //NOI18N
   71.76 +
   71.77 +    private WebPreviewable( Impl impl ) {
   71.78 +        this.impl = impl;
   71.79 +    }
   71.80 +
   71.81 +    public static WebPreviewable create( Impl previewableImpl ) {
   71.82 +        return new WebPreviewable(previewableImpl);
   71.83 +    }
   71.84 +
   71.85 +    public static interface Impl {
   71.86 +
   71.87 +        /**
   71.88 +         * Return true if web preview is enabled, otherwise false
   71.89 +         * @return True if web preview is enabled.
   71.90 +         */
   71.91 +        boolean isPreviewEnabled();
   71.92 +
   71.93 +        /**
   71.94 +         * Invoked by the framework when the associated editor window is activated
   71.95 +         * or when user clicks the Preview button. Implementing classes should keep
   71.96 +         * reference to this browser and show appropriate content in it.
   71.97 +         * @param browser Embedded browser component.
   71.98 +         */
   71.99 +        void onAttach( WebBrowser browser );
  71.100 +
  71.101 +        /**
  71.102 +         * Invoked by the framework the associated editor window is no longer showing
  71.103 +         * or when another previewable editor has been activated. Implementing class
  71.104 +         * should detach any listeners from the browser.
  71.105 +         * @param browser Embedded browser component.
  71.106 +         */
  71.107 +        void onDettach( WebBrowser browser );
  71.108 +
  71.109 +        /**
  71.110 +         * Invoked by the framework when user closes the Preview window. The associated
  71.111 +         * editor should deselect the Preview button in its toolbar and detach any
  71.112 +         * listeners from the browser.
  71.113 +         * @param browser Embedded browser component.
  71.114 +         */
  71.115 +        void onClose( WebBrowser browser );
  71.116 +
  71.117 +        /**
  71.118 +         * Add a listener to watch for changes in PROP_PREVIEW_ENABLED
  71.119 +         * @param l
  71.120 +         */
  71.121 +        void addPropertyChangeListener( PropertyChangeListener l );
  71.122 +
  71.123 +        /**
  71.124 +         * Remove listener for watching changes in PROP_PREVIEW_ENABLED
  71.125 +         * @param l
  71.126 +         */
  71.127 +        void removePropertyChangeListener( PropertyChangeListener l );
  71.128 +
  71.129 +    }
  71.130 +    
  71.131 +}
    72.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    72.2 +++ b/webpreview/src/org/netbeans/modules/webpreview/resources/Bundle.properties	Thu Nov 22 15:44:15 2012 +0100
    72.3 @@ -0,0 +1,12 @@
    72.4 +Actions/Tools/org-netbeans-modules-webpreview-HTMLPreviewAction.instance=Preview
    72.5 +Actions/Tools/org-netbeans-modules-webpreview-SomeAction.instance=Some Action
    72.6 +Actions/Window/org-netbeans-modules-webpreview-WebPreviewAction.instance=WebPreview
    72.7 +OpenIDE-Module-Display-Category=Web
    72.8 +OpenIDE-Module-Long-Description=\
    72.9 +    Web Preview module allows to directly preview HTML pages inside IDE using Embedded Mozilla browser. \
   72.10 +    Also when editing CSS files user can preview any selected HTML page that includes the CSS file. \
   72.11 +    Web Preview is <b>avaiable only for Windows</b> platform and will be available only when Embedded Browser UI - XUL Runner module is installed in IDE.
   72.12 +OpenIDE-Module-Name=Web Preview
   72.13 +OpenIDE-Module-Short-Description=Preview of files in Embedded Web browser
   72.14 +
   72.15 +CTL_HTMLPreviewAction=Preview
    73.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    73.2 +++ b/webpreview/src/org/netbeans/modules/webpreview/resources/WebPreviewTopComponentSettings.xml	Thu Nov 22 15:44:15 2012 +0100
    73.3 @@ -0,0 +1,12 @@
    73.4 +<?xml version="1.0" encoding="UTF-8"?>
    73.5 +<!--
    73.6 +To change this template, choose Tools | Templates
    73.7 +and open the template in the editor.
    73.8 +-->
    73.9 +<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "http://www.netbeans.org/dtds/sessionsettings-1_0.dtd">
   73.10 +<settings version="1.0">
   73.11 +    <module name="org.netbeans.modules.webpreview" spec="1.0"/>
   73.12 +    <instanceof class="org.openide.windows.TopComponent"/>
   73.13 +    <instanceof class="org.netbeans.modules.webpreview.WebPreviewTopComponent"/>
   73.14 +    <instance class="org.netbeans.modules.webpreview.WebPreviewTopComponent" method="getDefault"/>
   73.15 +</settings>
    74.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    74.2 +++ b/webpreview/src/org/netbeans/modules/webpreview/resources/WebPreviewTopComponentWstcref.xml	Thu Nov 22 15:44:15 2012 +0100
    74.3 @@ -0,0 +1,11 @@
    74.4 +<?xml version="1.0" encoding="UTF-8"?>
    74.5 +<!--
    74.6 +To change this template, choose Tools | Templates
    74.7 +and open the template in the editor.
    74.8 +-->
    74.9 +<!DOCTYPE tc-ref PUBLIC "-//NetBeans//DTD Top Component in Mode Properties 2.0//EN" "http://www.netbeans.org/dtds/tc-ref2_0.dtd">
   74.10 +<tc-ref version="2.0" >
   74.11 +    <module name="org.netbeans.modules.webpreview" spec="1.0"/>
   74.12 +    <tc-id id="WebPreviewTopComponent"/>
   74.13 +    <state opened="false"/>
   74.14 +</tc-ref>
    75.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    75.2 +++ b/webpreview/src/org/netbeans/modules/webpreview/resources/layer.xml	Thu Nov 22 15:44:15 2012 +0100
    75.3 @@ -0,0 +1,112 @@
    75.4 +<?xml version="1.0" encoding="UTF-8"?>
    75.5 +<!--
    75.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    75.7 +
    75.8 +Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    75.9 +
   75.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   75.11 +Other names may be trademarks of their respective owners.
   75.12 +
   75.13 +The contents of this file are subject to the terms of either the GNU
   75.14 +General Public License Version 2 only ("GPL") or the Common
   75.15 +Development and Distribution License("CDDL") (collectively, the
   75.16 +"License"). You may not use this file except in compliance with the
   75.17 +License. You can obtain a copy of the License at
   75.18 +http://www.netbeans.org/cddl-gplv2.html
   75.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   75.20 +specific language governing permissions and limitations under the
   75.21 +License.  When distributing the software, include this License Header
   75.22 +Notice in each file and include the License file at
   75.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   75.24 +particular file as subject to the "Classpath" exception as provided
   75.25 +by Oracle in the GPL Version 2 section of the License file that
   75.26 +accompanied this code. If applicable, add the following below the
   75.27 +License Header, with the fields enclosed by brackets [] replaced by
   75.28 +your own identifying information:
   75.29 +"Portions Copyrighted [year] [name of copyright owner]"
   75.30 +
   75.31 +Contributor(s):
   75.32 +
   75.33 +The Original Software is NetBeans. The Initial Developer of the Original
   75.34 +Software is Sun Microsystems, Inc. Portions Copyright 1997-2009 Sun
   75.35 +Microsystems, Inc. All Rights Reserved.
   75.36 +
   75.37 +If you wish your version of this file to be governed by only the CDDL
   75.38 +or only the GPL Version 2, indicate your decision by adding
   75.39 +"[Contributor] elects to include this software in this distribution
   75.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   75.41 +single choice of license, a recipient has the option to distribute
   75.42 +your version of this file under either the CDDL, the GPL Version 2 or
   75.43 +to extend the choice of license to its licensees as provided above.
   75.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   75.45 +Version 2 license, then the option applies only if the new code is
   75.46 +made subject to such option by the copyright holder.
   75.47 +-->
   75.48 +<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
   75.49 +<filesystem>
   75.50 +
   75.51 +    <folder name="Actions">
   75.52 +
   75.53 +        <folder name="Tools">
   75.54 +            <file name="org-netbeans-modules-webpreview-HTMLPreviewAction.instance">
   75.55 +                <attr name="instanceClass" stringvalue="org.netbeans.modules.webpreview.HTMLPreviewAction"/>
   75.56 +            </file>
   75.57 +        </folder>
   75.58 +
   75.59 +    </folder>
   75.60 +
   75.61 +    <folder name="Editors">
   75.62 +
   75.63 +        <folder name="text">
   75.64 +            <folder name="html">
   75.65 +                <file name="org.netbeans.core.browser.api.WebPreviewable.instance">
   75.66 +                    <attr name="instanceCreate" methodvalue="org.netbeans.modules.webpreview.HTMLWebPreviewable.instanceCreate"/>
   75.67 +                </file>
   75.68 +                <folder name="Toolbars">
   75.69 +                    <folder name="Default">
   75.70 +                        <file name="SeparatorBefore.instance">
   75.71 +                            <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
   75.72 +                            <attr name="position" intvalue="890"/>
   75.73 +                        </file>
   75.74 +                        <file name="org-netbeans-modules-webpreview-HTMLPreviewAction.shadow">
   75.75 +                            <attr name="originalFile" stringvalue="Actions/Tools/org-netbeans-modules-webpreview-HTMLPreviewAction.instance"/>
   75.76 +                            <attr name="position" intvalue="900"/>
   75.77 +                        </file>
   75.78 +                    </folder>
   75.79 +                </folder>
   75.80 +            </folder>
   75.81 +            <folder name="xhtml">
   75.82 +                <file name="org.netbeans.core.browser.api.WebPreviewable.instance">
   75.83 +                    <attr name="instanceCreate" methodvalue="org.netbeans.modules.webpreview.HTMLWebPreviewable.instanceCreate"/>
   75.84 +                </file>
   75.85 +                <folder name="Toolbars">
   75.86 +                    <folder name="Default">
   75.87 +                        <file name="SeparatorBefore.instance">
   75.88 +                            <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
   75.89 +                            <attr name="position" intvalue="890"/>
   75.90 +                        </file>
   75.91 +                        <file name="org-netbeans-modules-webpreview-HTMLPreviewAction.shadow">
   75.92 +                            <attr name="originalFile" stringvalue="Actions/Tools/org-netbeans-modules-webpreview-HTMLPreviewAction.instance"/>
   75.93 +                            <attr name="position" intvalue="900"/>
   75.94 +                        </file>
   75.95 +                    </folder>
   75.96 +                </folder>
   75.97 +            </folder>
   75.98 +        </folder>
   75.99 +
  75.100 +    </folder>
  75.101 +
  75.102 +    <folder name="Windows2">
  75.103 +        <folder name="Components">
  75.104 +            <file name="WebPreviewTopComponent.settings" url="WebPreviewTopComponentSettings.xml"/>
  75.105 +        </folder>
  75.106 +        <folder name="Modes">
  75.107 +            <folder name="output">
  75.108 +                <file name="WebPreviewTopComponent.wstcref" url="WebPreviewTopComponentWstcref.xml">
  75.109 +                    <attr name="position" intvalue="10000"/>
  75.110 +                </file>
  75.111 +            </folder>
  75.112 +        </folder>
  75.113 +    </folder>
  75.114 +
  75.115 +</filesystem>