--- libnb-platform-java-6.5.orig/debian/control +++ libnb-platform-java-6.5/debian/control @@ -0,0 +1,39 @@ +Source: libnb-platform-java +Section: devel +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Yulia Novozhilova +Build-Depends: cdbs, debhelper (>= 6), ant, ant-optional, default-jdk, javahelp2 +Build-Depends-Indep: libswing-layout-java, libjna-java (>=3.0.2), mingw32, junit4 +Standards-Version: 3.8.0 +Homepage: http://www.netbeans.org + +Package: libnb-platform9-java +Architecture: all +Section: libs +Depends: default-jre | java2-runtime, javahelp2, + libswing-layout-java, libjna-java(>=3.0.2), junit4 +Suggests: libnb-platform9-java-doc +Description: NetBeans Platform for building rich desktop applications in Java + NetBeans Platform is the framework for building rich desktop applications + in Java. It is the core of the NetBeans IDE. + +Package: libnb-platform-devel-java +Architecture: all +Section: libs +Depends: default-jre | java2-runtime, javahelp2, libnb-platform9-java +Replaces: libnb-platform8-devel-java, libnb-platform7-devel-java +Conflicts: libnb-platform8-devel-java, libnb-platform7-devel-java +Description: Build harness for NetBeans Platform + Harness with build scripts and ant tasks for everyone who builds + an application on top of NetBeans Platform. + +Package: libnb-platform9-java-doc +Architecture: all +Section: doc +Suggests: libnb-platform9-java +Enhances: libnb-platform9-java +Description: NetBeans Platform javadoc + NetBeans Platform is a set of modules, each providing their own APIs + and working together or in a standalone mode. This package provides + one master javadoc to all of them. --- libnb-platform-java-6.5.orig/debian/libnb-platform9-java-doc.doc-base +++ libnb-platform-java-6.5/debian/libnb-platform9-java-doc.doc-base @@ -0,0 +1,11 @@ +Document: netbeans-platform9-api +Title: NetBeans Platform API Javadoc +Author: NetBeans +Abstract: This document contains NetBeans Platform API Javadoc. +Section: Programming + +Format: HTML +Index: /usr/share/doc/libnb-platform9-java-doc/api/index.html +Files: /usr/share/doc/libnb-platform9-java-doc/api/*.html + + --- libnb-platform-java-6.5.orig/debian/rules +++ libnb-platform-java-6.5/debian/rules @@ -0,0 +1,154 @@ +#!/usr/bin/make -f + +#export DH_VERBOSE=1 + +export JAVA_HOME=/usr/lib/jvm/default-java + +include /usr/share/cdbs/1/rules/simple-patchsys.mk +include /usr/share/cdbs/1/rules/debhelper.mk + +#package names +pkg-base := platform9 +pkg-lib-base := libnb-$(pkg-base) +libnb-platform-java := $(pkg-lib-base)-java +libnb-platform-java-doc := $(pkg-lib-base)-java-doc +libnb-platform-devel-java := libnb-platform-devel-java + +JAVADIR := /usr/share/java + +JHALL_JAR := jhall.jar +JH_JAR := jh.jar +JNA_JAR := jna.jar +SWINGL_JAR := swing-layout.jar +JUNIT_JAR := junit4.jar + +NB_SWINGL_JAR := swing-layout-1.0.3.jar +NB_JSEARCH_JAR := jsearch-2.0_05.jar +NB_JH_JAR := jh-2.0_05.jar +NB_JNA_JAR := jna-3.0.2.jar +NB_JSR223_JAR := jsr223-api.jar +NB_JUNIT_JAR := junit-4.5.jar + +JAVADOC_INSTALL_DIR := usr/share/doc/$(libnb-platform-java-doc)/api +NB_INSTALL_DIR := usr/share/netbeans + +JAVADOC_WEBSITE := http://bits.netbeans.org/6.5/javadoc + +INSTALL := dh_install -p +LINK := dh_link -p + +build/$(libnb-platform-java):: stamp-build-$(libnb-platform-java) +# This target is here to avoid multiple invocation of build target. +# build/$(libnb-platform-java) is invoked 2 times when building binary packages. +stamp-build-$(libnb-platform-java): + # generate empty javax.script file, so there is something in jsr223 API module + mkdir -p $(DEB_SRCDIR)/libs.jsr223/src/javax/script + echo "package javax.script; class empty { }" > $(DEB_SRCDIR)/libs.jsr223/src/javax/script/empty.java + mkdir -p $(DEB_SRCDIR)/libs.jsr223/external + jar cf $(DEB_SRCDIR)/libs.jsr223/external/$(NB_JSR223_JAR) $(DEB_SRCDIR)/libs.jsr223/src/javax/script/empty.java + ln -sf $(JAVADIR)/$(SWINGL_JAR) $(DEB_SRCDIR)/o.jdesktop.layout/external/$(NB_SWINGL_JAR) + ln -sf $(JAVADIR)/$(JHALL_JAR) $(DEB_SRCDIR)/apisupport.harness/external/$(NB_JSEARCH_JAR) + ln -sf $(JAVADIR)/$(JHALL_JAR) $(DEB_SRCDIR)/javahelp/external/$(NB_JH_JAR) + ln -sf $(JAVADIR)/$(JNA_JAR) $(DEB_SRCDIR)/libs.jna/external/$(NB_JNA_JAR) + ln -sf $(JAVADIR)/$(JUNIT_JAR) $(DEB_SRCDIR)/libs.junit4/external/$(NB_JUNIT_JAR) + + ant \ + -Dpermit.jdk6.builds=true \ + -Dbuild.compiler.deprecation=false \ + -Dbuild.compiler.debug=false \ + -Dverify.checkout=false \ + -f $(DEB_SRCDIR)/nbbuild/build.xml build-platform + touch $@ + +install/$(libnb-platform-java):: + rm -f $(DEB_SRCDIR)/nbbuild/netbeans/$(pkg-base)/modules/ext/$(NB_SWINGL_JAR) + rm -f $(DEB_SRCDIR)/nbbuild/netbeans/$(pkg-base)/modules/ext/$(NB_JSEARCH_JAR) + rm -f $(DEB_SRCDIR)/nbbuild/netbeans/$(pkg-base)/modules/ext/$(NB_JH_JAR) + rm -f $(DEB_SRCDIR)/nbbuild/netbeans/$(pkg-base)/modules/ext/$(NB_JNA_JAR) + rm -f $(DEB_SRCDIR)/nbbuild/netbeans/$(pkg-base)/modules/ext/$(NB_JUNIT_JAR) + + echo > $(DEB_SRCDIR)/nbbuild/netbeans/$(pkg-base)/.noautoupdate + mkdir -p $(NB_INSTALL_DIR)/$(pkg-base) + $(INSTALL)$(libnb-platform-java) $(DEB_SRCDIR)/nbbuild/netbeans/$(pkg-base)/* $(NB_INSTALL_DIR)/$(pkg-base) + $(INSTALL)$(libnb-platform-java) $(DEB_SRCDIR)/nbbuild/netbeans/$(pkg-base)/.noautoupdate $(NB_INSTALL_DIR)/$(pkg-base) + $(LINK)$(libnb-platform-java) $(JAVADIR)/$(SWINGL_JAR) $(NB_INSTALL_DIR)/$(pkg-base)/modules/ext/$(NB_SWINGL_JAR) + $(LINK)$(libnb-platform-java) $(JAVADIR)/$(JH_JAR) $(NB_INSTALL_DIR)/$(pkg-base)/modules/ext/$(NB_JH_JAR) + $(LINK)$(libnb-platform-java) $(JAVADIR)/$(JNA_JAR) $(NB_INSTALL_DIR)/$(pkg-base)/modules/ext/$(NB_JNA_JAR) + $(LINK)$(libnb-platform-java) $(JAVADIR)/$(JUNIT_JAR) $(NB_INSTALL_DIR)/$(pkg-base)/modules/ext/$(NB_JUNIT_JAR) + +build/$(libnb-platform-devel-java):: stamp-build-$(libnb-platform-devel-java) +# This target is here to avoid multiple invocation of build target. +# build/$(libnb-platform-devel-java) is invoked 2 times when building binary packages. +stamp-build-$(libnb-platform-devel-java): + ant \ + -Dpermit.jdk6.builds=true \ + -Dbuild.compiler.deprecation=false \ + -Dbuild.compiler.debug=false \ + -Dverify.checkout=false \ + -f $(DEB_SRCDIR)/apisupport.harness/build.xml + touch $@ + +install/$(libnb-platform-devel-java):: + rm -f $(DEB_SRCDIR)/nbbuild/netbeans/harness/$(NB_JSEARCH_JAR) + echo > $(DEB_SRCDIR)/nbbuild/netbeans/harness/.noautoupdate + mkdir -p $(NB_INSTALL_DIR)/harness + $(INSTALL)$(libnb-platform-devel-java) $(DEB_SRCDIR)/nbbuild/netbeans/harness/* $(NB_INSTALL_DIR)/harness + $(INSTALL)$(libnb-platform-devel-java) $(DEB_SRCDIR)/nbbuild/netbeans/harness/.noautoupdate $(NB_INSTALL_DIR)/harness + $(LINK)$(libnb-platform-devel-java) $(JAVADIR)/$(JH_JAR) $(NB_INSTALL_DIR)/harness/$(NB_JSEARCH_JAR) + #Fixing permissions + chmod 0755 debian/$(libnb-platform-devel-java)/$(NB_INSTALL_DIR)/harness/launchers/app.sh + +build/$(libnb-platform-java-doc):: stamp-build-$(libnb-platform-java-doc) +# This target is here to avoid multiple invocation of build target. +# build/$(libnb-platform-java-doc) is invoked 2 times when building binary packages. +stamp-build-$(libnb-platform-java-doc): +# This target is here to avoid multiple invocation of build target. +# build/$(libnb-platform-java-doc) is invoked 2 times when building binary packages. + ant \ + -Dpermit.jdk6.builds=true \ + -Dbuild.compiler.deprecation=false \ + -Dbuild.compiler.debug=false \ + -Dverify.checkout=false \ + -Dallmodules= \ + -Dcluster.config=platform \ + -Dconfig.javadoc.cluster=$(pkg-base) \ + -Dconfig.javadoc.netbeans=\ +openide.util,openide.actions,openide.options,openide.awt,\ +openide.dialogs,openide.nodes,openide.explorer,openide.filesystems,openide.modules,\ +openide.text,openide.windows,openide.loaders,openide.io,queries,\ +o.n.api.progress,settings,javahelp,openide.execution,\ +sendopts,options.api,editor.mimelookup \ + -Djavadoc.docs.org-netbeans-api-java=$(JAVADOC_WEBSITE)/org-netbeans-api-java/ \ + -Djavadoc.docs.org-netbeans-modules-project-ant=$(JAVADOC_WEBSITE)/org-netbeans-modules-project-ant/ \ + -Djavadoc.docs.org-netbeans-modules-projectapi=$(JAVADOC_WEBSITE)/org-netbeans-modules-projectapi/ \ + -f $(DEB_SRCDIR)/nbbuild/build.xml build-javadoc + touch $@ + +install/$(libnb-platform-java-doc):: + # copy core platform files + rm -f $(DEB_SRCDIR)/nbbuild/build/javadoc/*.zip + mkdir -p $(JAVADOC_INSTALL_DIR) + $(INSTALL)$(libnb-platform-java-doc) $(DEB_SRCDIR)/nbbuild/build/javadoc/* $(JAVADOC_INSTALL_DIR) + +clean:: + # these files are left by cdbs (a bug?) + -rm -f $(DEB_SRCDIR)/*.cdbs-config_list + -rm -f $(DEB_SRCDIR)/stamp-build-$(libnb-platform-java) + -rm -f $(DEB_SRCDIR)/stamp-build-$(libnb-platform-devel-java) + -rm -f $(DEB_SRCDIR)/stamp-build-$(libnb-platform-java-doc) + ln -sf $(JAVADIR)/$(JH_JAR) $(DEB_SRCDIR)/javahelp/external/$(NB_JH_JAR) + ant -Dpermit.jdk6.builds=true -f $(DEB_SRCDIR)/nbbuild/build.xml clean + -rm -f $(DEB_SRCDIR)/apisupport.harness/external/$(NB_JSEARCH_JAR) + -rm -f $(DEB_SRCDIR)/javahelp/external/$(NB_JH_JAR) + -rm -f $(DEB_SRCDIR)/o.jdesktop.layout/external/$(NB_SWINGL_JAR) + -rm -f $(DEB_SRCDIR)/libs.jna/external/$(NB_JNA_JAR) + -rm -f $(DEB_SRCDIR)/libs.junit4/external/$(NB_JUNIT_JAR) + -rm -f $(DEB_SRCDIR)/libs.jsr223/external/$(NB_JSR223_JAR) + -rm -f $(DEB_SRCDIR)/libs.jsr223/src/javax/script/empty.java + +get-orig-source: + uscan --verbose --rename --force-download + + + + --- libnb-platform-java-6.5.orig/debian/changelog +++ libnb-platform-java-6.5/debian/changelog @@ -0,0 +1,23 @@ +libnb-platform-java (6.5-0ubuntu2) jaunty; urgency=low + + * Added patch 6.5.1-patches.patch + (contains bug fixes from NetBeans 6.5.1) + + -- Yulia Novozhilova Tue, 31 Mar 2009 18:48:21 +0400 + +libnb-platform-java (6.5-0ubuntu1) jaunty; urgency=low + + * New upstream version (LP: #316793) + * added dependency of libnb-platform-devel-java + on libnb-platform9-java (LP: #276731) + * removed version number from binary package: + libnb-platform8-devel-java -> libnb-platform-devel-java + * watch file and get-orig-source target are added + + -- Yulia Novozhilova Thu, 25 Sep 2008 22:27:16 +0400 + +libnb-platform-java (6.1-0ubuntu1) intrepid; urgency=low + + * Initial release (LP: #252658) + + -- Yulia Novozhilova Wed, 21 May 2008 15:52:03 +0400 --- libnb-platform-java-6.5.orig/debian/libnb-platform9-java-doc.dirs +++ libnb-platform-java-6.5/debian/libnb-platform9-java-doc.dirs @@ -0,0 +1,2 @@ +usr/share/doc/libnb-platform9-java-doc/api + --- libnb-platform-java-6.5.orig/debian/libnb-platform9-java.dirs +++ libnb-platform-java-6.5/debian/libnb-platform9-java.dirs @@ -0,0 +1,3 @@ +usr/share/netbeans/platform9 + + --- libnb-platform-java-6.5.orig/debian/libnb-platform-devel-java.dirs +++ libnb-platform-java-6.5/debian/libnb-platform-devel-java.dirs @@ -0,0 +1,2 @@ +usr/share/netbeans/harness + --- libnb-platform-java-6.5.orig/debian/compat +++ libnb-platform-java-6.5/debian/compat @@ -0,0 +1 @@ +6 --- libnb-platform-java-6.5.orig/debian/watch +++ libnb-platform-java-6.5/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://nbi.netbeans.org/servlets/ProjectDocumentList?folderID=325 .*platform-([\d\.]*)-\d*-src-linux.tar.gz debian uupdate --- libnb-platform-java-6.5.orig/debian/copyright +++ libnb-platform-java-6.5/debian/copyright @@ -0,0 +1,435 @@ +This package was debianized by Yulia Novozhilova on +Wed, 28 May 2008 21:19:35 +0400. + +Upstream downloaded from: + http://nbi.netbeans.org/servlets/ProjectDocumentList?folderID=325 + + +Upstream home page: + http://www.netbeans.org/ + +Copyright: + + - - - - - copyright notice and license for Debian packaging - - - - - + +Copyright 2008-2009 Sun Microsystems, Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + - - - - - copyright notice and license for upstream - - - - - + +Copyright 1997-2008 Sun Microsystems, Inc. + +LICENSE #1: The Common Development and Distribution License +(CDDL), Version 1.0 governs your use of: +NetBeans Platform software. + +LICENSE #2: The GNU General Public License (GPL), Version 2 +with the Classpath exception governs your use of: +NetBeans Platform software + +------------------------------------------------------------ + +LICENSE #1: + +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + +1. Definitions. + +1.1. Contributor means each individual or entity that creates or +contributes to the creation of Modifications. + +1.2. Contributor Version means the combination of the Original +Software, prior Modifications used by a Contributor (if any), +and the Modifications made by that particular Contributor. + +1.3. Covered Software means (a) the Original Software, or (b) +Modifications, or (c) the combination of files containing +Original Software with files containing Modifications, in each +case including portions thereof. + +1.4. Executable means the Covered Software in any form other +than Source Code. + +1.5. Initial Developer means the individual or entity that first +makes Original Software available under this License. + +1.6. Larger Workmeans a work which combines Covered Software or +portions thereof with code not governed by the terms of this +License. + +1.7. License means this document. + +1.8. Licensable means having the right to grant, to the maximum +extent possible, whether at the time of the initial grant or +subsequently acquired, any and all of the rights conveyed herein. + +1.9. Modifications means the Source Code and Executable form of +any of the following: A. Any file that results from an addition +to, deletion from or modification of the contents of a file +containing Original Software or previous Modifications; B. Any +new file that contains any part of the Original Software or +previous Modification; or C. Any new file that is contributed or +otherwise made available under the terms of this License. + +1.10. Original Software means the Source Code and Executable +form of computer software code that is originally released under +this License. + +1.11. Patent Claims means any patent claim(s), now owned or +hereafter acquired, including without limitation, method, +process, and apparatus claims, in any patent Licensable by +grantor. + +1.12. Source Code means (a) the common form of computer software +code in which modifications are made and (b) associated +documentation included in or with such code. + +1.13. You (or Your) means an individual or a legal entity +exercising rights under, and complying with all of the terms of, +this License. For legal entities, You includes any entity which +controls, is controlled by, or is under common control with You. +For purposes of this definition, control means (a) the power, +direct or indirect, to cause the direction or management of such +entity, whether by contract or otherwise, or (b) ownership of +more than fifty percent (50%) of the outstanding shares or +beneficial ownership of such entity. + +2. License Grants. + +2.1. The Initial Developer Grant. Conditioned upon Your +compliance with Section 3.1 below and subject to third party +intellectual property claims, the Initial Developer hereby +grants You a world-wide, royalty-free, non-exclusive license: + +(a) under intellectual property rights (other than patent or +trademark) Licensable by Initial Developer, to use, reproduce, +modify, display, perform, sublicense and distribute the Original +Software (or portions thereof), with or without Modifications, +and/or as part of a Larger Work; and + +(b) under Patent Claims infringed by the making, using or +selling of Original Software, to make, have made, use, practice, +sell, and offer for sale, and/or otherwise dispose of the +Original Software (or portions thereof); + +(c) The licenses granted in Sections 2.1(a) and (b) are +effective on the date Initial Developer first distributes or +otherwise makes the Original Software available to a third party +under the terms of this License; + +(d) Notwithstanding Section 2.1(b) above, no patent license is +granted: (1) for code that You delete from the Original +Software, or (2) for infringements caused by: (i) the +modification of the Original Software, or (ii) the combination +of the Original Software with other software or devices. + +2.2. Contributor Grant. Conditioned upon Your compliance with +Section 3.1 below and subject to third party intellectual +property claims, each Contributor hereby grants You a +world-wide, royalty-free, non-exclusive license: + +(a) under intellectual property rights (other than patent or +trademark) Licensable by Contributor to use, reproduce, modify, +display, perform, sublicense and distribute the Modifications +created by such Contributor (or portions thereof), either on an +unmodified basis, with other Modifications, as Covered Software +and/or as part of a Larger Work; and + +(b) under Patent Claims infringed by the making, using, or +selling of Modifications made by that Contributor either alone +and/or in combination with its Contributor Version (or portions +of such combination), to make, use, sell, offer for sale, have +made, and/or otherwise dispose of: (1) Modifications made by +that Contributor (or portions thereof); and (2) the combination +of Modifications made by that Contributor with its Contributor +Version (or portions of such combination). + +(c) The licenses granted in Sections 2.2(a) and 2.2(b) +areeffective on the date Contributor first distributes or +otherwise makes the Modifications available to a third party. + +(d) Notwithstanding Section 2.2(b) above, no patent license is +granted: (1) for any code that Contributor has deleted from the +Contributor Version; (2) for infringements caused by: (i) third +party modifications of Contributor Version, or (ii) the +combination of Modifications made by that Contributor with other +software (except as part of the Contributor Version) or other +devices; or (3) under Patent Claims infringed by Covered +Software in the absence of Modifications made by that +Contributor. + +3. Distribution Obligations. + +3.1. Availability of Source Code. Any Covered Software that You +distribute or otherwise make available in Executable form must +also be made available in Source Code form and that Source Code +form must be distributed only under the terms of this License. +You must include a copy of this License with every copy of the +Source Code form of the Covered Software You distribute or +otherwise make available. You must inform recipients of any such +Covered Software in Executable form as to how they can obtain +such Covered Software in Source Code form in a reasonable manner +on or through a medium customarily used for software exchange. + +3.2. Modifications. The Modifications that You create or to +which You contribute are governed by the terms of this License. +You represent that You believe Your Modifications are Your +original creation(s) and/or You have sufficient rights to grant +the rights conveyed by this License. + +3.3. Required Notices. You must include a notice in each of Your +Modifications that identifies You as the Contributor of the +Modification. You may not remove or alter any copyright, patent +or trademark notices contained within the Covered Software, or +any notices of licensing or any descriptive text giving +attribution to any Contributor or the Initial Developer. + +3.4. Application of Additional Terms. You may not offer or +impose any terms on any Covered Software in Source Code form +that alters or restricts the applicable version of this License +or the recipients rights hereunder. You may choose to offer, and +to charge a fee for, warranty, support, indemnity or liability +obligations to one or more recipients of Covered +Software. However, you may do so only on Your own behalf, and +not on behalf of the Initial Developer or any Contributor. You +must make it absolutely clear that any such warranty, support, +indemnity or liability obligation is offered by You alone, and +You hereby agree to indemnify the Initial Developer and every +Contributor for any liability incurred by the Initial Developer +or such Contributor as a result of warranty, support, indemnity +or liability terms You offer. + +3.5. Distribution of Executable Versions. You may distribute the +Executable form of the Covered Software under the terms of this +License or under the terms of a license of Your choice, which +may contain terms different from this License, provided that You +are in compliance with the terms of this License and that the +license for the Executable form does not attempt to limit or +alter the recipients rights in the Source Code form from the +rights set forth in this License. If You distribute the Covered +Software in Executable form under a different license, You must +make it absolutely clear that any terms which differ from this +License are offered by You alone, not by the Initial Developer +or Contributor. You hereby agree to indemnify the Initial +Developer and every Contributor for any liability incurred by +the Initial Developer or such Contributor as a result of any +such terms You offer. + +3.6. Larger Works. You may create a Larger Work by combining +Covered Software with other code not governed by the terms of +this License and distribute the Larger Work as a single product. +In such a case, You must make sure the requirements of this +License are fulfilled for the Covered Software. + +4. Versions of the License. + +4.1. New Versions. Sun Microsystems, Inc. is the initial license +steward and may publish revised and/or new versions of this +License from time to time. Each version will be given a +distinguishing version number. Except as provided in Section +4.3, no one other than the license steward has the right to +modify this License. + +4.2. Effect of New Versions. You may always continue to use, +distribute or otherwise make the Covered Software available +under the terms of the version of the License under which You +originally received the Covered Software. If the Initial +Developer includes a notice in the Original Software prohibiting +it from being distributed or otherwise made available under any +subsequent version of the License, You must distribute and make +the Covered Software available under the terms of the version of +the License under which You originally received the Covered +Software. Otherwise, You may also choose to use, distribute or +otherwise make the Covered Software available under the terms of +any subsequent version of the License published by the license +steward. + +4.3. Modified Versions. When You are an Initial Developer and +You want to create a new license for Your Original Software, You +may create and use a modified version of this License if You: +(a) rename the license and remove any references to the name of +the license steward (except to note that the license differs +from this License); and (b) otherwise make it clear that the +license contains terms which differ from this License. + +5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER +THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, +WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, +MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. +THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED +SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE +DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY +OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, +REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN +ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE +IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + +6.1. This License and the rights granted hereunder will +terminate automatically if You fail to comply with terms herein +and fail to cure such breach within 30 days of becoming aware of +the breach. Provisions which, by their nature, must remain in +effect beyond the termination of this License shall survive. + +6.2. If You assert a patent infringement claim (excluding +declaratory judgment actions) against Initial Developer or a +Contributor (the Initial Developer or Contributor against whom +You assert such claim is referred to as Participant) alleging +that the Participant Software (meaning the Contributor Version +where the Participant is a Contributor or the Original Software +where the Participant is the Initial Developer) directly or +indirectly infringes any patent, then any and all rights granted +directly or indirectly to You by such Participant, the Initial +Developer (if the Initial Developer is not the Participant) and +all Contributors under Sections 2.1 and/or 2.2 of this License +shall, upon 60 days notice from Participant terminate +prospectively and automatically at the expiration of such 60 day +notice period, unless if within such 60 day period You withdraw +Your claim with respect to the Participant Software against such +Participant either unilaterally or pursuant to a written +agreement with Participant. + +6.3. In the event of termination under Sections 6.1 or 6.2 +above, all end user licenses that have been validly granted by +You or any distributor hereunder prior to termination (excluding +licenses granted to You by any distributor) shall survive +termination. + +7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO +LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR +OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER +CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY +SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY +INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY +CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST +PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR +MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, +EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY +OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO +LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH +PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH +LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR +LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS +EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. The Covered Software is a +commercial item, as that term is defined in 48 C.F.R. 2.101 +(Oct. 1995), consisting of commercial computer software (as that +term is defined at 48 C.F.R. 252.227-7014(a)(1)) and commercial +computer software documentation as such terms are used in 48 +C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and +48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all +U.S. Government End Users acquire Covered Software with only +those rights set forth herein. This U.S. Government Rights +clause is in lieu of, and supersedes, any other FAR, DFAR, or +other clause or provision that addresses Government rights in +computer software under this License. + +9. MISCELLANEOUS. This License represents the complete agreement +concerning subject matter hereof. If any provision of this +License is held to be unenforceable, such provision shall be +reformed only to the extent necessary to make it enforceable. +This License shall be governed by the law of the jurisdiction +specified in a notice contained within the Original Software +(except to the extent applicable law, if any, provides +otherwise), excluding such jurisdictions conflict-of-law +provisions. Any litigation relating to this License shall be +subject to the jurisdiction of the courts located in the +jurisdiction and venue specified in a notice contained within +the Original Software, with the losing party responsible for +costs, including, without limitation, court costs and reasonable +attorneys fees and expenses. The application of the United +Nations Convention on Contracts for the International Sale of +Goods is expressly excluded. Any law or regulation which +provides that the language of a contract shall be construed +against the drafter shall not apply to this License. You agree +that You alone are responsible for compliance with the United +States export administration regulations (and the export control +laws and regulation of any other countries) when You use, +distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and +the Contributors, each party is responsible for claims and +damages arising, directly or indirectly, out of its utilization +of rights under this License and You agree to work with Initial +Developer and Contributors to distribute such responsibility on +an equitable basis. Nothing herein is intended or shall be +deemed to constitute any admission of liability. + +---------------------------------------------------------------- + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND +DISTRIBUTION LICENSE (CDDL): This code is released under the +CDDL and shall be governed by the laws of the State of +California (excluding conflict-of-law provisions). Any +litigation relating to this License shall be subject to the +jurisdiction of the Federal Courts of the Northern District of +California and the state courts of the State of California, with +venue lying in Santa Clara County, California. + +------------------------------------------------------------ + +LICENSE #2: + +Use of this software is governed by the terms of the license below: + +The GNU General Public License (GPL), Version 2 with the Classpath exception + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301, USA + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL-2'. + +"CLASSPATH" EXCEPTION TO THE GPL VERSION 2 +Certain source files distributed by Sun Microsystems, Inc. are subject +to the following clarification and special exception to the GPL, but +only where Sun has expressly included in the particular source file's +header the words "Sun designates this particular file as subject to +the "Classpath" exception as provided by Sun in the LICENSE file that +accompanied this code." +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole combination. +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent modules, +and to copy and distribute the resulting executable under terms of your +choice, provided that you also meet, for each linked independent module, +the terms and conditions of the license of that module. An independent +module is a module which is not derived from or based on this library. +If you modify this library, you may extend this exception to your version +of the library, but you are not obligated to do so. If you do not wish +to do so, delete this exception statement from your version. --- libnb-platform-java-6.5.orig/debian/patches/50-startup-jdk.patch +++ libnb-platform-java-6.5/debian/patches/50-startup-jdk.patch @@ -0,0 +1,18 @@ +diff -Nur -x '*.orig' -x '*~' libnb-platform-java-6.1/core.startup/src/org/netbeans/core/startup/Main.java libnb-platform-java-6.1.new/core.startup/src/org/netbeans/core/startup/Main.java +--- libnb-platform-java-6.1/core.startup/src/org/netbeans/core/startup/Main.java 2008-05-30 03:09:24.000000000 +0400 ++++ libnb-platform-java-6.1.new/core.startup/src/org/netbeans/core/startup/Main.java 2008-08-04 18:51:59.000000000 +0400 +@@ -203,9 +203,11 @@ + System.setProperty ("org.openide.version", "deprecated"); // NOI18N + System.setProperty ("org.openide.major.version", "IDE/1"); // NOI18N + +- // Enforce JDK 1.5+ since we would not work without it. +- if (Dependency.JAVA_SPEC.compareTo(new SpecificationVersion("1.5")) < 0) { // NOI18N +- System.err.println("The IDE requires JDK 5 or higher to run."); // XXX I18N? ++ // Enforce JDK version+ since we would not work without it. ++ String MIN_JAVA_SPEC = "1.6"; ++ String MIN_JAVA_SPEC_OUT = "6"; ++ if (Dependency.JAVA_SPEC.compareTo(new SpecificationVersion(MIN_JAVA_SPEC)) < 0) { // NOI18N ++ System.err.println("The IDE requires JDK " + MIN_JAVA_SPEC_OUT + " or higher to run."); // XXX I18N? + TopLogging.exit(1); + } + --- libnb-platform-java-6.5.orig/debian/patches/01-build-bootstrap.patch +++ libnb-platform-java-6.5/debian/patches/01-build-bootstrap.patch @@ -0,0 +1,11 @@ +diff -Nur -x '*.orig' -x '*~' libnb-platform8-java-6.1/o.n.bootstrap/build.xml libnb-platform8-java-6.1.new/o.n.bootstrap/build.xml +--- libnb-platform8-java-6.1/o.n.bootstrap/build.xml 2008-05-28 16:48:49.000000000 +0400 ++++ libnb-platform8-java-6.1.new/o.n.bootstrap/build.xml 2008-05-28 16:51:27.000000000 +0400 +@@ -65,7 +65,6 @@ + + + +- + + + --- libnb-platform-java-6.5.orig/debian/patches/30-mingw-make.patch +++ libnb-platform-java-6.5/debian/patches/30-mingw-make.patch @@ -0,0 +1,22 @@ +diff -Nur -x '*.orig' -x '*~' libnb-platform8-java-6.1/apisupport.harness/windows-launcher-src/Makefile libnb-platform8-java-6.1.new/apisupport.harness/windows-launcher-src/Makefile +--- libnb-platform8-java-6.1/apisupport.harness/windows-launcher-src/Makefile 2008-05-30 03:09:00.000000000 +0400 ++++ libnb-platform8-java-6.1.new/apisupport.harness/windows-launcher-src/Makefile 2008-07-21 17:53:36.000000000 +0400 +@@ -51,15 +51,15 @@ + all : app.exe app_w.exe + + app.exe : app.cpp app.res +- gcc $(CFLAGS) $(LIBS) -mwindows -DWINMAIN app.cpp -o app.exe app.res ++ i586-mingw32msvc-gcc $(CFLAGS) $(LIBS) -mwindows -DWINMAIN app.cpp -o app.exe app.res + mv app.exe ../release/launchers/ + + app_w.exe : app.cpp +- gcc $(CFLAGS) $(LIBS) app.cpp -o app_w.exe ++ i586-mingw32msvc-gcc $(CFLAGS) $(LIBS) app.cpp -o app_w.exe + mv app_w.exe ../release/launchers/ + + app.res : app.rc +- windres -o$@ -Ocoff app.rc ++ i586-mingw32msvc-windres -o$@ -Ocoff app.rc + + clean : + -rm *.res *.obj *.pdb *.ilk *~ 2>NUL --- libnb-platform-java-6.5.orig/debian/patches/60-6.5.1-patches.patch +++ libnb-platform-java-6.5/debian/patches/60-6.5.1-patches.patch @@ -0,0 +1,1714 @@ +diff -r 76d51071af8a -r af9499d919b8 autoupdate.services/manifest.mf +--- a/autoupdate.services/manifest.mf Fri Nov 07 11:48:18 2008 +0100 ++++ b/autoupdate.services/manifest.mf Tue Mar 10 13:53:55 2009 +0300 +@@ -1,6 +1,6 @@ + Manifest-Version: 1.0 + OpenIDE-Module: org.netbeans.modules.autoupdate.services + OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/autoupdate/services/resources/Bundle.properties +-OpenIDE-Module-Specification-Version: 1.5.1 ++OpenIDE-Module-Specification-Version: 1.5.2 + AutoUpdate-Show-In-Client: false + AutoUpdate-Essential-Module: true +diff -r 76d51071af8a -r af9499d919b8 autoupdate.services/src/org/netbeans/modules/autoupdate/services/InstallSupportImpl.java +--- a/autoupdate.services/src/org/netbeans/modules/autoupdate/services/InstallSupportImpl.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/autoupdate.services/src/org/netbeans/modules/autoupdate/services/InstallSupportImpl.java Tue Mar 10 13:53:55 2009 +0300 +@@ -312,6 +312,7 @@ + boolean needsRestart = false; + JarEntry updaterJarEntry = null; + JarFile updaterJarFile = null; ++ File updaterTargetCluster = null; + File targetCluster = null; + for (ModuleUpdateElementImpl moduleImpl : affectedModuleImpls) { + synchronized(this) { +@@ -348,6 +349,7 @@ + err.log (Level.FINE, ModuleUpdater.AUTOUPDATE_UPDATER_JAR_PATH + " is being installed from " + moduleImpl.getCodeName ()); + updaterJarEntry = entry; + updaterJarFile = jf; ++ updaterTargetCluster = targetCluster; + needsRestart = true; + break; + } +@@ -366,7 +368,7 @@ + // store source of installed files + Utilities.writeAdditionalInformation (getElement2Clusters ()); + if (updaterJarFile != null) { +- Utilities.writeUpdateOfUpdaterJar (updaterJarEntry, updaterJarFile, targetCluster); ++ Utilities.writeUpdateOfUpdaterJar (updaterJarEntry, updaterJarFile, updaterTargetCluster); + } + + if (! needsRestart) { +diff -r 76d51071af8a -r af9499d919b8 autoupdate.services/src/org/netbeans/modules/autoupdate/services/Utilities.java +--- a/autoupdate.services/src/org/netbeans/modules/autoupdate/services/Utilities.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/autoupdate.services/src/org/netbeans/modules/autoupdate/services/Utilities.java Tue Mar 10 13:53:55 2009 +0300 +@@ -83,6 +83,7 @@ + import org.netbeans.api.autoupdate.UpdateUnit; + import org.netbeans.core.startup.Main; + import org.netbeans.core.startup.TopLogging; ++import org.netbeans.modules.autoupdate.updateprovider.DummyModuleInfo; + import org.netbeans.spi.autoupdate.KeyStoreProvider; + import org.netbeans.spi.autoupdate.UpdateItem; + import org.netbeans.updater.ModuleDeactivator; +@@ -657,27 +658,36 @@ + matched = DependencyChecker.checkDependencyModule (dep, ((ModuleUpdateElementImpl) reqElImpl).getModuleInfo ()); + } + if (! matched) { +- UpdateElement reqEl = u.getAvailableUpdates ().isEmpty () ? null : u.getAvailableUpdates ().get (0); +- if (reqEl == null) { +- for (ModuleInfo m : availableInfos) { +- if (DependencyChecker.checkDependencyModule (dep, m)) { +- matched = true; +- break; ++ // first chance ++ for (ModuleInfo m : availableInfos) { ++ if (DependencyChecker.checkDependencyModule (dep, m)) { ++ matched = true; ++ break; ++ } ++ } ++ if (! matched) { ++ UpdateElement reqEl = u.getAvailableUpdates ().isEmpty () ? null : u.getAvailableUpdates ().get (0); ++ if (reqEl == null) { ++ for (ModuleInfo m : availableInfos) { ++ if (DependencyChecker.checkDependencyModule (dep, m)) { ++ matched = true; ++ break; ++ } + } +- } +- if (! matched) { +- brokenDependencies.add (dep); +- } +- } else { +- UpdateElementImpl reqElImpl = Trampoline.API.impl (reqEl); +- ModuleUpdateElementImpl reqModuleImpl = (ModuleUpdateElementImpl) reqElImpl; +- ModuleInfo info = reqModuleImpl.getModuleInfo (); +- if (DependencyChecker.checkDependencyModule (dep, info)) { +- if (! availableInfos.contains (info)) { +- requested = reqEl; ++ if (! matched) { ++ brokenDependencies.add (dep); + } + } else { +- brokenDependencies.add (dep); ++ UpdateElementImpl reqElImpl = Trampoline.API.impl (reqEl); ++ ModuleUpdateElementImpl reqModuleImpl = (ModuleUpdateElementImpl) reqElImpl; ++ ModuleInfo info = reqModuleImpl.getModuleInfo (); ++ if (DependencyChecker.checkDependencyModule (dep, info)) { ++ if (! availableInfos.contains (info)) { ++ requested = reqEl; ++ } ++ } else { ++ brokenDependencies.add (dep); ++ } + } + } + } +@@ -686,6 +696,11 @@ + case Dependency.TYPE_REQUIRES : + case Dependency.TYPE_NEEDS : + case Dependency.TYPE_RECOMMENDS : ++ if (DummyModuleInfo.TOKEN_MODULE_FORMAT1.equals (dep.getName ()) || ++ DummyModuleInfo.TOKEN_MODULE_FORMAT2.equals (dep.getName ())) { ++ // these tokens you can ignore here ++ break; ++ } + UpdateUnit p = DependencyAggregator.getRequested (dep); + boolean passed = false; + if (p == null) { +diff -r 76d51071af8a -r af9499d919b8 autoupdate.services/src/org/netbeans/modules/autoupdate/services/resources/Bundle.properties +--- a/autoupdate.services/src/org/netbeans/modules/autoupdate/services/resources/Bundle.properties Fri Nov 07 11:48:18 2008 +0100 ++++ b/autoupdate.services/src/org/netbeans/modules/autoupdate/services/resources/Bundle.properties Tue Mar 10 13:53:55 2009 +0300 +@@ -1,5 +1,8 @@ + OpenIDE-Module-Display-Category=Infrastructure + OpenIDE-Module-Long-Description=\ ++For the list of included fixed bugs please check http://wiki.netbeans.org/NetBeans6.5PatchesInfo. \ ++
\ ++
\ + The AutoUpdate feature provides several services: download and install available updates of installed modules, search and install new modules from subscribed Update Centers, view and manage the modules. + OpenIDE-Module-Name=Auto Update Services + OpenIDE-Module-Short-Description=Support for searching for module updates on Update Center and for downloading and installing modules +diff -r 76d51071af8a -r af9499d919b8 autoupdate.services/src/org/netbeans/modules/autoupdate/updateprovider/AutoupdateCatalogCache.java +--- a/autoupdate.services/src/org/netbeans/modules/autoupdate/updateprovider/AutoupdateCatalogCache.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/autoupdate.services/src/org/netbeans/modules/autoupdate/updateprovider/AutoupdateCatalogCache.java Tue Mar 10 13:53:55 2009 +0300 +@@ -1,7 +1,7 @@ + /* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * +- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. ++ * Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common +@@ -24,7 +24,7 @@ + * Contributor(s): + * + * The Original Software is NetBeans. The Initial Developer of the Original +- * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun ++ * Software is Sun Microsystems, Inc. Portions Copyright 1997-2008 Sun + * Microsystems, Inc. All Rights Reserved. + * + * If you wish your version of this file to be governed by only the CDDL +@@ -151,8 +151,12 @@ + NetworkAccess.NetworkListener nwl = new NetworkAccess.NetworkListener () { + + public void streamOpened (InputStream stream) { +- err.log (Level.FINE, "Successfully read URI " + sourceUrl); +- doCopy (sourceUrl, stream, cache, temp); ++ err.log (Level.FINE, "Successfully started reading URI " + sourceUrl); ++ try { ++ doCopy (sourceUrl, stream, cache, temp); ++ } catch (IOException ex) { ++ storeException (ex); ++ } + } + + public void accessCanceled () { +@@ -197,7 +201,7 @@ + return storedException; + } + +- private void doCopy (URL sourceUrl, InputStream is, File cache, File temp) { ++ private void doCopy (URL sourceUrl, InputStream is, File cache, File temp) throws IOException { + + OutputStream os = null; + int read = 0; +@@ -206,28 +210,32 @@ + os = new BufferedOutputStream(new FileOutputStream (temp)); + while ((read = is.read ()) != -1) { + os.write (read); +- } ++ } ++ is.close (); ++ os.flush (); ++ os.close (); ++ synchronized (this) { ++ if (cache.exists () && ! cache.delete ()) { ++ err.log (Level.INFO, "Cannot delete cache " + cache); ++ try { ++ Thread.sleep(200); ++ } catch (InterruptedException ie) { ++ assert false : ie; ++ } ++ cache.delete(); ++ } ++ } ++ if (! temp.renameTo (cache)) { ++ err.log (Level.INFO, "Cannot rename temp " + temp + " to cache " + cache); ++ } + } catch (IOException ioe) { + err.log (Level.INFO, "Writing content of URL " + sourceUrl + " failed.", ioe); ++ throw ioe; + } finally { + try { + if (is != null) is.close (); + if (os != null) os.flush (); + if (os != null) os.close (); +- synchronized (this) { +- if (cache.exists () && ! cache.delete ()) { +- err.log (Level.INFO, "Cannot delete cache " + cache); +- try { +- Thread.sleep(200); +- } catch (InterruptedException ie) { +- assert false : ie; +- } +- cache.delete(); +- } +- if (! temp.renameTo (cache)) { +- err.log (Level.INFO, "Cannot rename temp " + temp + " to cache " + cache); +- } +- } + } catch (IOException ioe) { + err.log (Level.INFO, "Closing streams failed.", ioe); + } +diff -r 76d51071af8a -r af9499d919b8 core.kit/manifest.mf +--- a/core.kit/manifest.mf Fri Nov 07 11:48:18 2008 +0100 ++++ b/core.kit/manifest.mf Tue Mar 10 13:53:55 2009 +0300 +@@ -1,5 +1,5 @@ + Manifest-Version: 1.0 + OpenIDE-Module: org.netbeans.modules.core.kit + OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/core/kit/Bundle.properties +-OpenIDE-Module-Specification-Version: 1.2.1 ++OpenIDE-Module-Specification-Version: 1.2.4 + AutoUpdate-Essential-Module: true +diff -r 76d51071af8a -r af9499d919b8 core.kit/nbproject/project.xml +--- a/core.kit/nbproject/project.xml Fri Nov 07 11:48:18 2008 +0100 ++++ b/core.kit/nbproject/project.xml Tue Mar 10 13:53:55 2009 +0300 +@@ -9,7 +9,7 @@ + org.netbeans.core + + 2 +- 3.6 ++ 3.10.4 + + + +@@ -23,7 +23,7 @@ + org.netbeans.core.windows + + 2 +- 2.10 ++ 2.12.3 + + + +@@ -42,21 +42,21 @@ + org.netbeans.modules.favorites + + 1 +- 1.12 ++ 1.14.3 + + + + org.netbeans.modules.masterfs + + 2 +- 1.11 ++ 2.15.2 + + + + org.netbeans.modules.options.api + + 1 +- 1.5 ++ 1.10.2 + + + +@@ -77,6 +77,36 @@ + 1.6 + + ++ ++ org.openide.explorer ++ ++ ++ ++ 6.16.3 ++ ++ ++ ++ org.openide.loaders ++ ++ ++ ++ 7.2.3 ++ ++ ++ ++ org.openide.nodes ++ ++ ++ ++ 7.7.3 ++ ++ ++ ++ org.openide.text ++ ++ 6.21.2 ++ ++ + + + +diff -r 76d51071af8a -r af9499d919b8 core.kit/src/org/netbeans/modules/core/kit/Bundle.properties +--- a/core.kit/src/org/netbeans/modules/core/kit/Bundle.properties Fri Nov 07 11:48:18 2008 +0100 ++++ b/core.kit/src/org/netbeans/modules/core/kit/Bundle.properties Tue Mar 10 13:53:55 2009 +0300 +@@ -2,5 +2,8 @@ + OpenIDE-Module-Name=Platform + OpenIDE-Module-Short-Description=NetBeans Platform + OpenIDE-Module-Long-Description=\ ++For the list of included fixed bugs please check http://wiki.netbeans.org/NetBeans6.5PatchesInfo. \ ++
\ ++
\ + The NetBeans Platform is a generic framework for Swing applications. It provides the services common to almost all large desktop applications: window management, menus, settings and storage, update management, file access, etc.

\ + See more information at platform.netbeans.org. +diff -r 76d51071af8a -r af9499d919b8 core.nativeaccess/manifest.mf +--- a/core.nativeaccess/manifest.mf Fri Nov 07 11:48:18 2008 +0100 ++++ b/core.nativeaccess/manifest.mf Tue Mar 10 13:53:55 2009 +0300 +@@ -1,7 +1,7 @@ + Manifest-Version: 1.0 + AutoUpdate-Show-In-Client: false + OpenIDE-Module: org.netbeans.core.nativeaccess/1 +-OpenIDE-Module-Specification-Version: 1.1.1 ++OpenIDE-Module-Specification-Version: 1.1.2 + OpenIDE-Module-Localizing-Bundle: org/netbeans/core/nativeaccess/Bundle.properties + OpenIDE-Module-Provides: org.netbeans.core.windows.nativeaccess.NativeWindowSystem + +diff -r 76d51071af8a -r af9499d919b8 core.nativeaccess/nbproject/project.xml +--- a/core.nativeaccess/nbproject/project.xml Fri Nov 07 11:48:18 2008 +0100 ++++ b/core.nativeaccess/nbproject/project.xml Tue Mar 10 13:53:55 2009 +0300 +@@ -20,7 +20,7 @@ + + + 1 +- 1.0 ++ 1.1.2 + + + +diff -r 76d51071af8a -r af9499d919b8 core.nativeaccess/src/org/netbeans/core/nativeaccess/NativeWindowSystemImpl.java +--- a/core.nativeaccess/src/org/netbeans/core/nativeaccess/NativeWindowSystemImpl.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/core.nativeaccess/src/org/netbeans/core/nativeaccess/NativeWindowSystemImpl.java Tue Mar 10 13:53:55 2009 +0300 +@@ -46,7 +46,6 @@ + import javax.swing.Icon; + import org.netbeans.core.windows.nativeaccess.NativeWindowSystem; + import org.netbeans.core.nativeaccess.transparency.WindowUtils; +-import org.openide.util.Utilities; + + + /** +@@ -61,11 +60,7 @@ + public boolean isWindowAlphaSupported() { + boolean res = false; + try { +- String osArch = System.getProperty("os.arch"); +- // jna currently doesn't work on 64 bit java on Win, this check should +- // be deleted when https://jna.dev.java.net/issues/show_bug.cgi?id=59 is implemented +- boolean isWin64 = Utilities.isWindows() && osArch != null && osArch.indexOf("amd64") != -1; +- res = WindowUtils.isWindowAlphaSupported() && !isWin64; ++ res = WindowUtils.isWindowAlphaSupported(); + } catch( ThreadDeath td ) { + throw td; + } catch (UnsatisfiedLinkError e) { +diff -r 76d51071af8a -r af9499d919b8 core.windows/nbproject/project.properties +--- a/core.windows/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100 ++++ b/core.windows/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300 +@@ -39,7 +39,7 @@ + + javac.compilerargs=-Xlint:unchecked + javac.source=1.5 +-spec.version.base=2.12.1 ++spec.version.base=2.12.3 + + + test.config.commit.includes=**/Validate*Test.class +diff -r 76d51071af8a -r af9499d919b8 core.windows/src/org/netbeans/core/windows/Central.java +--- a/core.windows/src/org/netbeans/core/windows/Central.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/core.windows/src/org/netbeans/core/windows/Central.java Tue Mar 10 13:53:55 2009 +0300 +@@ -1998,7 +1998,8 @@ + for( ModeImpl m : getModes() ) { + if( m.getKind() == Constants.MODE_KIND_EDITOR + && !"editor".equals(m.getName()) //NOI18N +- && !m.getOpenedTopComponentsIDs().isEmpty() ) ++ && !m.getOpenedTopComponentsIDs().isEmpty() ++ && !m.isPermanent() ) + return m; + } + return null; +diff -r 76d51071af8a -r af9499d919b8 core.windows/src/org/netbeans/core/windows/view/ui/Bundle.properties +--- a/core.windows/src/org/netbeans/core/windows/view/ui/Bundle.properties Fri Nov 07 11:48:18 2008 +0100 ++++ b/core.windows/src/org/netbeans/core/windows/view/ui/Bundle.properties Tue Mar 10 13:53:55 2009 +0300 +@@ -46,8 +46,8 @@ + # {0} build number + # {1} project name + # {2} name of main project +-CTL_MainWindow_Title=NetBeans Platform 6.5 +-CTL_MainWindow_Title_No_Project=NetBeans Platform 6.5 ++CTL_MainWindow_Title=NetBeans Platform 6.5.1 ++CTL_MainWindow_Title_No_Project=NetBeans Platform 6.5.1 + + # DocumentsDlg + LBL_Documents=&Documents: +diff -r 76d51071af8a -r af9499d919b8 core.windows/src/org/netbeans/core/windows/view/ui/KeyboardPopupSwitcher.java +--- a/core.windows/src/org/netbeans/core/windows/view/ui/KeyboardPopupSwitcher.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/core.windows/src/org/netbeans/core/windows/view/ui/KeyboardPopupSwitcher.java Tue Mar 10 13:53:55 2009 +0300 +@@ -60,6 +60,7 @@ + import org.netbeans.swing.popupswitcher.SwitcherTableItem; + import org.openide.awt.StatusDisplayer; + import org.openide.util.Utilities; ++import org.openide.windows.Mode; + import org.openide.windows.WindowManager; + + /** +@@ -137,6 +138,13 @@ + return false; + } + ++ if( Boolean.getBoolean("netbeans.winsys.ctrltab.editoronly") ) { //NOI18N ++ Mode activeMode = wmi.getActiveMode(); ++ if( !wmi.isEditorMode(activeMode) ) ++ return false; ++ } ++ ++ + boolean isCtrlTab = kev.getKeyCode() == KeyEvent.VK_TAB && + kev.getModifiers() == InputEvent.CTRL_MASK; + boolean isCtrlShiftTab = kev.getKeyCode() == KeyEvent.VK_TAB && +diff -r 76d51071af8a -r af9499d919b8 core.windows/src/org/netbeans/core/windows/view/ui/MainWindow.java +--- a/core.windows/src/org/netbeans/core/windows/view/ui/MainWindow.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/core.windows/src/org/netbeans/core/windows/view/ui/MainWindow.java Tue Mar 10 13:53:55 2009 +0300 +@@ -459,20 +459,6 @@ + } + } + +- /** +- * don't allow smaller bounds than the one constructed from preffered sizes, making sure everything is visible when +- * in SDI. #40063 +- */ +- public void setBounds(Rectangle rect) { +- Rectangle bounds = rect; +- if (bounds != null) { +- if (bounds.height < getPreferredSize().height) { +- bounds = new Rectangle(bounds.x, bounds.y, bounds.width, getPreferredSize().height); +- } +- } +- super.setBounds(bounds); +- } +- + /** Prepares main window, has to be called after {@link initializeComponents()}. */ + public void prepareWindow() { + initializeBounds(); +diff -r 76d51071af8a -r af9499d919b8 favorites/manifest.mf +--- a/favorites/manifest.mf Fri Nov 07 11:48:18 2008 +0100 ++++ b/favorites/manifest.mf Tue Mar 10 13:53:55 2009 +0300 +@@ -1,7 +1,7 @@ + Manifest-Version: 1.0 + OpenIDE-Module: org.netbeans.modules.favorites/1 + OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/favorites/Bundle.properties +-OpenIDE-Module-Specification-Version: 1.14.1 ++OpenIDE-Module-Specification-Version: 1.14.3 + OpenIDE-Module-Layer: org/netbeans/modules/favorites/resources/layer.xml + AutoUpdate-Show-In-Client: false + AutoUpdate-Essential-Module: true +diff -r 76d51071af8a -r af9499d919b8 favorites/nbproject/project.xml +--- a/favorites/nbproject/project.xml Fri Nov 07 11:48:18 2008 +0100 ++++ b/favorites/nbproject/project.xml Tue Mar 10 13:53:55 2009 +0300 +@@ -100,7 +100,7 @@ + + + +- 4.12 ++ 7.2.2 + + + +diff -r 76d51071af8a -r af9499d919b8 favorites/src/org/netbeans/modules/favorites/Favorites.java +--- a/favorites/src/org/netbeans/modules/favorites/Favorites.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/favorites/src/org/netbeans/modules/favorites/Favorites.java Tue Mar 10 13:53:55 2009 +0300 +@@ -61,16 +61,18 @@ + import org.openide.filesystems.FileStateInvalidException; + import org.openide.filesystems.FileUtil; + import org.openide.filesystems.Repository; ++import org.openide.loaders.ChangeableDataFilter; ++import org.openide.loaders.DataFilter; + import org.openide.loaders.DataFolder; + import org.openide.loaders.DataObject; + import org.openide.loaders.DataShadow; + import org.openide.nodes.FilterNode; + import org.openide.nodes.Index; + import org.openide.nodes.Node; ++import org.openide.util.ChangeSupport; + import org.openide.util.Exceptions; + import org.openide.util.ImageUtilities; + import org.openide.util.NbBundle; +-import org.openide.util.Utilities; + import org.openide.util.datatransfer.PasteType; + + /** +@@ -287,43 +289,71 @@ + } + } + +- private static class Chldrn extends FilterNode.Children +- implements ChangeListener, Runnable { ++ ++ ++ static class VisQ ++ implements DataFilter.FileBased, ChangeableDataFilter, ChangeListener { ++ public static final VisQ DEFAULT = new VisQ(); ++ + private ChangeListener weak; +- private boolean hideHidden; +- /** Creates new Chldrn. */ +- public Chldrn (Node node, boolean hideHidden) { +- super (node); +- this.hideHidden = hideHidden; +- ++ private ChangeSupport support = new ChangeSupport(this); ++ ++ VisQ() { + weak = org.openide.util.WeakListeners.change(this, VisibilityQuery.getDefault()); + VisibilityQuery.getDefault().addChangeListener(weak); + } + ++ public boolean acceptFileObject(FileObject fo) { ++ return VisibilityQuery.getDefault().isVisible(fo); ++ } ++ ++ public boolean acceptDataObject(DataObject obj) { ++ return acceptFileObject(obj.getPrimaryFile()); ++ } ++ ++ public void addChangeListener(ChangeListener listener) { ++ support.addChangeListener(listener); ++ } ++ ++ public void removeChangeListener(ChangeListener listener) { ++ support.removeChangeListener(listener); ++ } ++ ++ public void stateChanged(ChangeEvent e) { ++ support.fireChange(); ++ } ++ } // end of VisQ ++ ++ private static class Chldrn extends FilterNode.Children { ++ private boolean hideHidden; ++ /** Creates new Chldrn. */ ++ public Chldrn(Node node, boolean hideHidden) { ++ super (node); ++ this.hideHidden = hideHidden; ++ } ++ + @Override + protected Node[] createNodes(Node node) { ++ org.openide.nodes.Children ch = Children.LEAF; ++ DataObject obj = node.getLookup().lookup(DataObject.class); + if (hideHidden) { +- DataObject obj = node.getCookie(DataObject.class); + if (obj != null && !VisibilityQuery.getDefault().isVisible(obj.getPrimaryFile())) { + return null; + } + } ++ ++ DataFolder folder = node.getLookup().lookup(DataFolder.class); ++ if (folder != null) { ++ ch = new Chldrn(new FilterNode(node, folder.createNodeChildren(new VisQ())), true); ++ } else { ++ if (node.isLeaf()) { ++ ch = org.openide.nodes.Children.LEAF; ++ } else { ++ ch = new Chldrn(node, true); ++ } ++ } + +- return new Node[] { new ProjectFilterNode ( +- node, +- (node.isLeaf ()) ? org.openide.nodes.Children.LEAF : new Chldrn (node, true) +- )}; +- } +- +- public void stateChanged(ChangeEvent e) { +- MUTEX.postWriteRequest(this); +- } +- +- public void run() { +- Node[] arr = original.getChildren().getNodes(); +- for (int i = 0; i < arr.length; i++) { +- refreshKey(arr[i]); +- } ++ return new Node[] { new ProjectFilterNode (node, ch) }; + } + } // end of Chldrn + +diff -r 76d51071af8a -r af9499d919b8 favorites/src/org/netbeans/modules/favorites/templates/TemplatesPanel.java +--- a/favorites/src/org/netbeans/modules/favorites/templates/TemplatesPanel.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/favorites/src/org/netbeans/modules/favorites/templates/TemplatesPanel.java Tue Mar 10 13:53:55 2009 +0300 +@@ -91,11 +91,14 @@ + * @author Jiri Rechtacek + */ + public class TemplatesPanel extends TopComponent implements ExplorerManager.Provider { +- private ExplorerManager manager; +- private TemplateTreeView view; ++ private static ExplorerManager manager; ++ private static TemplateTreeView view; + + static private FileObject templatesRoot; + ++ private static final String TEMPLATE_DISPLAY_NAME_ATTRIBUTE = "displayName"; ++ private static final String TEMPLATE_LOCALIZING_BUNDLE_ATTRIBUTE = "SystemFileSystem.localizingBundle"; ++ + /** Creates new form TemplatesPanel */ + public TemplatesPanel () { + +@@ -470,7 +473,7 @@ + SystemAction.get (DeleteAction.class), + SystemAction.get (RenameAction.class), + }; +- ++ + public TemplateNode (Node n) { + this (n, new DataFolderFilterChildren (n), new InstanceContent ()); + } +@@ -515,17 +518,22 @@ + } + + @Override ++ public String getName () { ++ return super.getDisplayName (); ++ } ++ ++ @Override + public void setName(String name) { +- // #140308 - get attributtes before rename and set them for renamed FileObject + FileObject fo = this.getLookup().lookup(FileObject.class); +- final HashMap attributes = getAttributes(fo); +- super.setName(name); + try { +- setAttributes (fo, attributes); ++ fo.setAttribute (TEMPLATE_DISPLAY_NAME_ATTRIBUTE, name); ++ fo.setAttribute (TEMPLATE_LOCALIZING_BUNDLE_ATTRIBUTE, null); + } catch (IOException ex) { + Logger.getLogger(TemplatesPanel.class.getName()).log(Level.WARNING, null, ex); + } ++ setDisplayName (name); + } ++ + } + + private static class DataFolderFilterChildren extends FilterNode.Children { +@@ -634,10 +642,33 @@ + static DataObject createDuplicateFromNode (Node n) { + DataObject source = getDOFromNode (n); + try { ++ Node parent = n.getParentNode (); + DataObject target = source.copy(source.getFolder()); + FileObject srcFo = source.getPrimaryFile(); + FileObject targetFo = target.getPrimaryFile(); +- setAttributes(targetFo, getAttributes(srcFo)); ++ setTemplateAttributes(targetFo, getAttributes(srcFo)); ++ if (parent != null) { ++ Node duplicateNode = null; ++ for (Node k : parent.getChildren ().getNodes (true)) { ++ if (k.getName ().startsWith (targetFo.getName ())) { ++ duplicateNode = k; ++ break; ++ } ++ } ++ if (duplicateNode != null) { ++ final Node finalNode = duplicateNode; ++ SwingUtilities.invokeLater (new Runnable () { ++ public void run () { ++ try { ++ manager.setSelectedNodes (new Node [] { finalNode }); ++ view.invokeInplaceEditing (); ++ } catch (PropertyVetoException ex) { ++ Logger.getLogger (TemplatesPanel.class.getName ()).log (Level.INFO, ex.getLocalizedMessage (), ex); ++ } ++ } ++ }); ++ } ++ } + return target; + } catch (IOException ioe) { + Logger.getLogger(TemplatesPanel.class.getName()).log(Level.WARNING, null, ioe); +@@ -663,8 +694,12 @@ + } + + /** Sets attributes for given FileObject. */ +- private static void setAttributes(FileObject fo, HashMap attributes) throws IOException { ++ private static void setTemplateAttributes(FileObject fo, HashMap attributes) throws IOException { + for (Entry entry : attributes.entrySet()) { ++ // skip localizing bundle for custom templates ++ if (TEMPLATE_LOCALIZING_BUNDLE_ATTRIBUTE.equals (entry.getKey ())) { ++ continue; ++ } + fo.setAttribute(entry.getKey(), entry.getValue()); + } + } +diff -r 76d51071af8a -r af9499d919b8 favorites/test/unit/src/org/netbeans/modules/favorites/VisibilityQueryWorksTest.java +--- a/favorites/test/unit/src/org/netbeans/modules/favorites/VisibilityQueryWorksTest.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/favorites/test/unit/src/org/netbeans/modules/favorites/VisibilityQueryWorksTest.java Tue Mar 10 13:53:55 2009 +0300 +@@ -85,6 +85,7 @@ + /** If execution fails we wrap the exception with + * new log message. + */ ++ @Override + protected void runTest () throws Throwable { + try { + super.runTest (); +@@ -96,6 +97,7 @@ + } + + ++ @Override + protected void setUp () throws Exception { + clearWorkDir(); + +@@ -193,7 +195,10 @@ + VQI vqi = (VQI) Lookup.getDefault().lookup(VQI.class); + vqi.showAll = true; + vqi.fire(); +- ++ ++ // initialize the children ++ Node some = f.getChildren().findChild(null); ++ assertNotNull("Some node needs to be found", some); + arr = f.getChildren().getNodes(true); + assertNodeForDataObject("hidden object is now there", hiddenDO, true, arr); + assertEquals("One child at all", 1, arr.length); + +diff -r 76d51071af8a -r af9499d919b8 libs.jna/manifest.mf +--- a/libs.jna/manifest.mf Fri Nov 07 11:48:18 2008 +0100 ++++ b/libs.jna/manifest.mf Tue Mar 10 13:53:55 2009 +0300 +@@ -3,4 +3,4 @@ + OpenIDE-Module: org.netbeans.libs.jna/1 + OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/jna/Bundle.properties + AutoUpdate-Essential-Module: true +-OpenIDE-Module-Specification-Version: 1.1.1 ++OpenIDE-Module-Specification-Version: 1.1.2 +diff -r 76d51071af8a -r af9499d919b8 masterfs/manifest.mf +--- a/masterfs/manifest.mf Fri Nov 07 11:48:18 2008 +0100 ++++ b/masterfs/manifest.mf Tue Mar 10 13:53:55 2009 +0300 +@@ -1,7 +1,7 @@ + Manifest-Version: 1.0 + OpenIDE-Module: org.netbeans.modules.masterfs/2 + OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/masterfs/resources/Bundle.properties +-OpenIDE-Module-Specification-Version: 2.15.1 ++OpenIDE-Module-Specification-Version: 2.15.2 + AutoUpdate-Show-In-Client: false + AutoUpdate-Essential-Module: true + +diff -r 76d51071af8a -r af9499d919b8 masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/LockForFile.java +--- a/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/LockForFile.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/LockForFile.java Tue Mar 10 13:53:55 2009 +0300 +@@ -105,7 +105,11 @@ + } + if (namesakes.putInstance(file, result) == null) { + FileAlreadyLockedException alreadyLockedException = new FileAlreadyLockedException(file.getAbsolutePath()); +- alreadyLockedException.initCause(namesakes.getInstance(file).lockedBy); ++ LockForFile previousLock = namesakes.getInstance(file); ++ // #151576 - check for null although it should not happen ++ if (previousLock != null) { ++ alreadyLockedException.initCause(previousLock.lockedBy); ++ } + throw alreadyLockedException; + } + result.valid = true; +diff -r 76d51071af8a -r af9499d919b8 o.n.core/nbproject/project.properties +--- a/o.n.core/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100 ++++ b/o.n.core/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300 +@@ -39,7 +39,7 @@ + + javac.compilerargs=-Xlint:unchecked + javac.source=1.5 +-spec.version.base=3.10.1 ++spec.version.base=3.10.4 + + javadoc.arch=${basedir}/arch.xml + +diff -r 76d51071af8a -r af9499d919b8 o.n.core/src/org/netbeans/beaninfo/editors/DataFolderPanel.form +--- a/o.n.core/src/org/netbeans/beaninfo/editors/DataFolderPanel.form Fri Nov 07 11:48:18 2008 +0100 ++++ b/o.n.core/src/org/netbeans/beaninfo/editors/DataFolderPanel.form Tue Mar 10 13:53:55 2009 +0300 +@@ -1,7 +1,9 @@ + + +-
++ + ++ ++ + + + +diff -r 76d51071af8a -r af9499d919b8 o.n.core/src/org/netbeans/beaninfo/editors/DataFolderPanel.java +--- a/o.n.core/src/org/netbeans/beaninfo/editors/DataFolderPanel.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/o.n.core/src/org/netbeans/beaninfo/editors/DataFolderPanel.java Tue Mar 10 13:53:55 2009 +0300 +@@ -42,13 +42,16 @@ + package org.netbeans.beaninfo.editors; + + import java.awt.event.KeyEvent; ++import java.beans.PropertyChangeEvent; ++import java.beans.PropertyChangeListener; ++import java.beans.PropertyVetoException; ++import java.beans.VetoableChangeListener; + import java.io.IOException; +-import java.lang.ref.*; ++import java.io.File; ++import java.lang.ref.Reference; ++import java.lang.ref.WeakReference; + import java.util.Arrays; + import java.util.StringTokenizer; +-import java.beans.*; +-import java.io.File; +- + import javax.swing.event.DocumentListener; + import javax.swing.event.ChangeListener; + import javax.swing.event.ChangeEvent; +@@ -315,7 +318,7 @@ + return; + } + if (arr.length == 1) { +- if (!isValid ()) { ++ if (!isValidState()) { + setTargetFolder (null); + implSetDataFolder (null); + return ; +@@ -357,7 +360,7 @@ + public void run () { + String text = packageName.getText (); + if (text != null) { +- if (isValid()) { ++ if (isValidState()) { + setTargetFolder (text, false); + updatePropertyEditor(); + } +@@ -386,7 +389,7 @@ + } + String text = packageName.getText (); + if (text != null) { +- if (isValid()) { ++ if (isValidState()) { + setTargetFolder (text, true); + updatePropertyEditor(); + } +@@ -414,7 +417,7 @@ + * If the panel is valid, the "Next" (or "Finish") button will be enabled. + * @return true if the user has entered satisfactory information + */ +- public boolean isValid () { ++ private boolean isValidState () { + String text = packageName.getText (); + if (text.length () == 0) { + Node[] arr = packagesPanel.getExplorerManager ().getSelectedNodes (); +@@ -579,7 +582,7 @@ + * @exception IOException if the possible creation of the folder fails + */ + private DataFolder getTargetFolder(boolean create) throws IOException { +- if (create && isValid()) { ++ if (create && isValidState()) { + FileSystem fs = system.get (); + if (fs != null) { + DataFolder folder = DataFolder.findFolder (fs.getRoot ()); +@@ -767,7 +770,7 @@ + // bugfix #29401, correct notify all changes in data folders + private void implSetDataFolder (DataFolder df) { + if (editor != null) { +- if (!isValid ()) { ++ if (!isValidState()) { + editor.setDataFolder (null); + } else { + FileSystem fs = null; +@@ -819,7 +822,7 @@ + // nothing to create + createButton.setEnabled(false); + } else { +- createButton.setEnabled(isValid()); ++ createButton.setEnabled(isValidState()); + } + } + +@@ -830,7 +833,7 @@ + * (and thus it should not be set) + */ + private Object getPropertyValue() throws IllegalStateException { +- if (isValid()) { ++ if (isValidState()) { + try { + df = getTargetFolder(true); + return df; +diff -r 76d51071af8a -r af9499d919b8 o.n.core/src/org/netbeans/core/NotifyExcPanel.java +--- a/o.n.core/src/org/netbeans/core/NotifyExcPanel.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/o.n.core/src/org/netbeans/core/NotifyExcPanel.java Tue Mar 10 13:53:55 2009 +0300 +@@ -268,10 +268,21 @@ + } + + // #50018 Don't try to show any notify dialog when reporting headless exception +- if ("java.awt.HeadlessException".equals(t.getClassName()) && GraphicsEnvironment.isHeadless()) { ++ if ("java.awt.HeadlessException".equals(t.getClassName()) && GraphicsEnvironment.isHeadless()) { // NOI18N + t.printStackTrace(System.err); + return; + } ++ //#133092: Error in JDK 5 during printing #6704417. ++ if ("java.lang.NullPointerException".equals(t.getClassName())) { // NOI18N ++ StringWriter sw = new StringWriter(); ++ PrintWriter pw = new PrintWriter(sw); ++ t.printStackTrace(pw); ++ if (sw.toString().contains("sun.awt.windows.WComponentPeer.nativeHandleEvent") && // NOI18N ++ System.getProperty("java.version").startsWith("1.5")) { // NOI18N ++ t.printStackTrace(System.err); ++ return; ++ } ++ } + + SwingUtilities.invokeLater (new Runnable () { + public void run() { +diff -r 76d51071af8a -r af9499d919b8 openide.explorer/manifest.mf +--- a/openide.explorer/manifest.mf Fri Nov 07 11:48:18 2008 +0100 ++++ b/openide.explorer/manifest.mf Tue Mar 10 13:53:55 2009 +0300 +@@ -1,6 +1,6 @@ + Manifest-Version: 1.0 + OpenIDE-Module: org.openide.explorer +-OpenIDE-Module-Specification-Version: 6.16.1 ++OpenIDE-Module-Specification-Version: 6.16.3 + OpenIDE-Module-Implementation-Version: 1 + OpenIDE-Module-Localizing-Bundle: org/openide/explorer/Bundle.properties + AutoUpdate-Essential-Module: true +diff -r 76d51071af8a -r af9499d919b8 openide.explorer/src/org/openide/explorer/view/SheetCell.java +--- a/openide.explorer/src/org/openide/explorer/view/SheetCell.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/openide.explorer/src/org/openide/explorer/view/SheetCell.java Tue Mar 10 13:53:55 2009 +0300 +@@ -537,10 +537,6 @@ + } + } + +- public boolean isValid() { +- return true; +- } +- + public boolean isShowing() { + return true; + } +diff -r 76d51071af8a -r af9499d919b8 openide.explorer/src/org/openide/explorer/view/TableSheetCell.java +--- a/openide.explorer/src/org/openide/explorer/view/TableSheetCell.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/openide.explorer/src/org/openide/explorer/view/TableSheetCell.java Tue Mar 10 13:53:55 2009 +0300 +@@ -722,10 +722,6 @@ + } + } + +- public boolean isValid() { +- return true; +- } +- + public boolean isShowing() { + return true; + } +diff -r 76d51071af8a -r af9499d919b8 openide.explorer/src/org/openide/explorer/view/TreeView.java +--- a/openide.explorer/src/org/openide/explorer/view/TreeView.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/openide.explorer/src/org/openide/explorer/view/TreeView.java Tue Mar 10 13:53:55 2009 +0300 +@@ -2148,7 +2148,8 @@ + } + + public void focusGained(FocusEvent e) { +- // Do nothing ++ // make sure nothing is selected ++ searchTextField.select(1, 1); + } + + public void focusLost(FocusEvent e) { +diff -r 76d51071af8a -r af9499d919b8 openide.loaders/apichanges.xml +--- a/openide.loaders/apichanges.xml Fri Nov 07 11:48:18 2008 +0100 ++++ b/openide.loaders/apichanges.xml Tue Mar 10 13:53:55 2009 +0300 +@@ -106,6 +106,32 @@ + + + ++ ++ ++ Faster Filtering based on FileObjects ++ ++ ++ ++ ++ ++

++ DataFilter ++ interface used to support filtering based on ++ DataObjects. ++ With the introduction of more ++ effective nodes, ++ this is slowing down the visualization of folders significantly. ++ That is why we introduce new ++ pre-filter ++ which can operate ++ on FileObjects, ++ whithout the need to instantiate ++ DataObjects. ++

++
++ ++ ++
+ + + Changes in FolderLookup are delivered in dedicated thread +diff -r 76d51071af8a -r af9499d919b8 openide.loaders/manifest.mf +--- a/openide.loaders/manifest.mf Fri Nov 07 11:48:18 2008 +0100 ++++ b/openide.loaders/manifest.mf Tue Mar 10 13:53:55 2009 +0300 +@@ -1,6 +1,6 @@ + Manifest-Version: 1.0 + OpenIDE-Module: org.openide.loaders +-OpenIDE-Module-Specification-Version: 7.2.1 ++OpenIDE-Module-Specification-Version: 7.2.3 + OpenIDE-Module-Localizing-Bundle: org/openide/loaders/Bundle.properties + OpenIDE-Module-Recommends: org.netbeans.modules.templates.v1_0 + AutoUpdate-Essential-Module: true +diff -r 76d51071af8a -r af9499d919b8 openide.loaders/src/org/openide/loaders/DataFilter.java +--- a/openide.loaders/src/org/openide/loaders/DataFilter.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/openide.loaders/src/org/openide/loaders/DataFilter.java Tue Mar 10 13:53:55 2009 +0300 +@@ -41,6 +41,8 @@ + + package org.openide.loaders; + ++import org.openide.filesystems.FileObject; ++ + + /** Allows certain data objects to be excluded from being displayed. + * @see RepositoryNodeFactory +@@ -61,4 +63,18 @@ + /** @deprecated Only public by accident. */ + @Deprecated + /* public static final */ long serialVersionUID = 0L; ++ ++ /** Additional interface that can be implemented by the {@link DataFilter} ++ * implementors to do low level filtering based on the file objects. ++ * @since 7.4 ++ */ ++ public interface FileBased extends DataFilter { ++ /** Should this fileobject be considered for displaying? ++ * ++ * @param fo the file object ++ * @return true if the object should be displayed, ++ * false otherwise ++ */ ++ public boolean acceptFileObject(FileObject fo); ++ } + } +diff -r 76d51071af8a -r af9499d919b8 openide.loaders/src/org/openide/loaders/FolderChildren.java +--- a/openide.loaders/src/org/openide/loaders/FolderChildren.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/openide.loaders/src/org/openide/loaders/FolderChildren.java Tue Mar 10 13:53:55 2009 +0300 +@@ -152,6 +152,12 @@ + Arrays.sort(arr, order); + List positioned = new ArrayList(arr.length); + for (FileObject fo : FileUtil.getOrder(Arrays.asList(arr), false)) { ++ if (filter instanceof DataFilter.FileBased) { ++ DataFilter.FileBased f =(DataFilter.FileBased)filter; ++ if (!f.acceptFileObject(fo)) { ++ continue; ++ } ++ } + positioned.add(new FolderChildrenPair(fo)); + } + +diff -r 76d51071af8a -r af9499d919b8 openide.loaders/src/org/openide/text/DataEditorSupport.java +--- a/openide.loaders/src/org/openide/text/DataEditorSupport.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/openide.loaders/src/org/openide/text/DataEditorSupport.java Tue Mar 10 13:53:55 2009 +0300 +@@ -61,10 +61,10 @@ + import java.util.Date; + import java.util.HashMap; + import java.util.Map; +-import java.util.concurrent.atomic.AtomicReference; + import java.util.logging.Level; + import java.util.logging.Logger; + import javax.swing.text.BadLocationException; ++import javax.swing.text.Document; + import javax.swing.text.EditorKit; + import javax.swing.text.StyledDocument; + import org.netbeans.api.queries.FileEncodingQuery; +@@ -79,6 +79,7 @@ + import org.openide.filesystems.FileSystem.AtomicAction; + import org.openide.filesystems.FileUtil; + import org.openide.filesystems.FileLock; ++import org.openide.filesystems.FileRenameEvent; + import org.openide.filesystems.FileSystem; + import org.openide.loaders.DataFolder; + import org.openide.loaders.DataObject; +@@ -804,6 +805,13 @@ + firePropertyChange(Env.PROP_VALID, Boolean.TRUE, Boolean.FALSE); + */ + } ++ ++ /** Called from the EnvListener. ++ */ ++ final void fileRenamed () { ++ //#151787: Sync timestamp when svn client changes timestamp externally during rename. ++ firePropertyChange("expectedTime", null, getTime()); // NOI18N ++ } + + @Override + public CloneableOpenSupport findCloneableOpenSupport() { +@@ -921,6 +929,14 @@ + myEnv.fileChanged (fe.isExpected (), fe.getTime ()); + } + } ++ ++ @Override ++ public void fileRenamed(FileRenameEvent fe) { ++ Env myEnv = this.env.get(); ++ if (myEnv != null) { ++ myEnv.fileRenamed(); ++ } ++ } + + } + +diff -r 76d51071af8a -r af9499d919b8 openide.loaders/test/unit/src/org/openide/loaders/FolderChildrenTest.java +--- a/openide.loaders/test/unit/src/org/openide/loaders/FolderChildrenTest.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/openide.loaders/test/unit/src/org/openide/loaders/FolderChildrenTest.java Tue Mar 10 13:53:55 2009 +0300 +@@ -47,6 +47,7 @@ + import java.io.IOException; + import java.util.*; + import java.lang.ref.WeakReference; ++import java.util.ArrayList; + import java.util.logging.Level; + import java.util.logging.Logger; + import javax.swing.event.ChangeEvent; +@@ -58,12 +59,15 @@ + import org.netbeans.junit.NbTestCase; + import org.netbeans.junit.NbTestSuite; + import org.netbeans.junit.RandomlyFails; ++import org.netbeans.spi.queries.VisibilityQueryImplementation; + import org.openide.filesystems.*; + + import org.openide.loaders.DefaultDataObjectTest.JspLoader; + import org.openide.loaders.MultiDataObject.Entry; ++import org.openide.nodes.AbstractNode; + import org.openide.nodes.Node; + import org.openide.nodes.Children; ++import org.openide.nodes.FilterNode; + import org.openide.nodes.NodeEvent; + import org.openide.nodes.NodeListener; + import org.openide.nodes.NodeMemberEvent; +@@ -95,7 +99,7 @@ + + public static Test suite() { + Test t = null; +-// t = new FolderChildrenTest("testDeadlockWithChildrenMutex"); ++// t = new FolderChildrenTest("testALotOfHiddenEntries"); + if (t == null) { + t = new NbTestSuite(FolderChildrenTest.class); + } +@@ -732,6 +736,84 @@ + assertNodes( arr, new String[] { "A" } ); + } + ++ public void testALotOfHiddenEntries() throws Exception { ++ FileSystem fs = Repository.getDefault ().getDefaultFileSystem(); ++ FileObject folder = FileUtil.createFolder(fs.getRoot(), "aLotOf"); ++ List arr = new ArrayList(); ++ final int FILES = 1000; ++ for (int i = 0; i < FILES; i++) { ++ arr.add(FileUtil.createData(folder, "" + i + ".dat")); ++ } ++ ++ DataFolder df = DataFolder.findFolder(folder); ++ ++ VisQ visq = new VisQ(); ++ ++ FilterNode fn = new FilterNode(new FilterNode(new AbstractNode(df.createNodeChildren(visq)))); ++ class L implements NodeListener { ++ int cnt; ++ ++ public void childrenAdded(NodeMemberEvent ev) { ++ cnt++; ++ } ++ ++ public void childrenRemoved(NodeMemberEvent ev) { ++ cnt++; ++ } ++ ++ public void childrenReordered(NodeReorderEvent ev) { ++ cnt++; ++ } ++ ++ public void nodeDestroyed(NodeEvent ev) { ++ cnt++; ++ } ++ ++ public void propertyChange(PropertyChangeEvent evt) { ++ cnt++; ++ } ++ } ++ L listener = new L(); ++ fn.addNodeListener(listener); ++ ++ List nodes = new ArrayList(); ++ int cnt = fn.getChildren().getNodesCount(true); ++ List snapshot = fn.getChildren().snapshot(); ++ assertEquals("Count as expected", cnt, snapshot.size()); ++ for (int i = 0; i < cnt; i++) { ++ nodes.add(snapshot.get(i)); ++ } ++ assertEquals("No events delivered", 0, listener.cnt); ++ assertEquals("Size is half cut", FILES / 2, fn.getChildren().getNodesCount(true)); ++ } ++ ++ public static final class VisQ implements VisibilityQueryImplementation, DataFilter.FileBased { ++ public boolean isVisible(FileObject file) { ++ try { ++ int number = Integer.parseInt(file.getName()); ++ return number % 2 == 0; ++ } catch (NumberFormatException numberFormatException) { ++ return true; ++ } ++ } ++ ++ public void addChangeListener(ChangeListener l) { ++ } ++ ++ public void removeChangeListener(ChangeListener l) { ++ } ++ ++ public boolean acceptDataObject(DataObject obj) { ++ return isVisible(obj.getPrimaryFile()); ++ } ++ ++ public boolean acceptFileObject(FileObject obj) { ++ return isVisible(obj); ++ } ++ ++ } ++ ++ + public static final class Pool extends DataLoaderPool { + private static Class loader; + +diff -r 76d51071af8a -r af9499d919b8 openide.nodes/nbproject/project.properties +--- a/openide.nodes/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100 ++++ b/openide.nodes/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300 +@@ -44,4 +44,4 @@ + javadoc.arch=${basedir}/arch.xml + javadoc.apichanges=${basedir}/apichanges.xml + +-spec.version.base=7.7.1 ++spec.version.base=7.7.3 +diff -r 76d51071af8a -r af9499d919b8 openide.nodes/src/org/openide/nodes/FilterNode.java +--- a/openide.nodes/src/org/openide/nodes/FilterNode.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/openide.nodes/src/org/openide/nodes/FilterNode.java Tue Mar 10 13:53:55 2009 +0300 +@@ -1641,7 +1641,7 @@ + } + + public Node[] callGetNodes(boolean optimalResult) { +- Node[] hold; ++ Node[] hold = null; + if (optimalResult) { + hold = original.getChildren().getNodes(true); + } +@@ -1650,7 +1650,7 @@ + } + + public int callGetNodesCount(boolean optimalResult) { +- Node[] hold; ++ Node[] hold = null; + if (optimalResult) { + hold = original.getChildren().getNodes(optimalResult); + } +@@ -1753,7 +1753,12 @@ + } + + public Node[] callGetNodes(boolean optimalResult) { +- return Children.this.getNodes(); ++ Node[] hold = null; ++ if (optimalResult) { ++ hold = original.getChildren().getNodes(true); ++ } ++ hold = Children.this.getNodes(); ++ return hold; + } + + public int callGetNodesCount(boolean optimalResult) { +diff -r 76d51071af8a -r af9499d919b8 openide.nodes/src/org/openide/nodes/Node.java +--- a/openide.nodes/src/org/openide/nodes/Node.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/openide.nodes/src/org/openide/nodes/Node.java Tue Mar 10 13:53:55 2009 +0300 +@@ -1045,31 +1045,37 @@ + * Can be null if one should find indices from current set of nodes + */ + final void fireSubNodesChange(boolean addAction, Node[] delta, Node[] from) { +- if (err.isLoggable(Level.FINER)) { +- err.finer("fireSubNodesChange() " + this); // NOI18N +- err.finer(" added: " + addAction); // NOI18N +- err.finer(" delta: " + Arrays.toString(delta)); // NOI18N +- err.finer(" from: " + Arrays.toString(from)); // NOI18N +- } ++ try { ++ // enter to readAccess to prevent firing another event before all listeners receive current event ++ Children.PR.enterReadAccess(); ++ if (err.isLoggable(Level.FINER)) { ++ err.finer("fireSubNodesChange() " + this); // NOI18N ++ err.finer(" added: " + addAction); // NOI18N ++ err.finer(" delta: " + Arrays.toString(delta)); // NOI18N ++ err.finer(" from: " + Arrays.toString(from)); // NOI18N ++ } + +- NodeMemberEvent ev = null; +- Object[] listeners = this.listeners.getListenerList(); ++ NodeMemberEvent ev = null; ++ Object[] listeners = this.listeners.getListenerList(); + +- // Process the listeners last to first, notifying +- // those that are interested in this event +- for (int i = listeners.length - 2; i >= 0; i -= 2) { +- if (listeners[i] == NodeListener.class) { +- // Lazily create the event: +- if (ev == null) { +- ev = new NodeMemberEvent(this, addAction, delta, from); +- } ++ // Process the listeners last to first, notifying ++ // those that are interested in this event ++ for (int i = listeners.length - 2; i >= 0; i -= 2) { ++ if (listeners[i] == NodeListener.class) { ++ // Lazily create the event: ++ if (ev == null) { ++ ev = new NodeMemberEvent(this, addAction, delta, from); ++ } + +- if (addAction) { +- ((NodeListener) listeners[i + 1]).childrenAdded(ev); +- } else { +- ((NodeListener) listeners[i + 1]).childrenRemoved(ev); ++ if (addAction) { ++ ((NodeListener) listeners[i + 1]).childrenAdded(ev); ++ } else { ++ ((NodeListener) listeners[i + 1]).childrenRemoved(ev); ++ } + } + } ++ } finally { ++ Children.PR.exitReadAccess(); + } + } + +diff -r 76d51071af8a -r af9499d919b8 openide.nodes/test/unit/src/org/openide/nodes/ChildrenKeysTest.java +--- a/openide.nodes/test/unit/src/org/openide/nodes/ChildrenKeysTest.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/openide.nodes/test/unit/src/org/openide/nodes/ChildrenKeysTest.java Tue Mar 10 13:53:55 2009 +0300 +@@ -256,6 +256,32 @@ + assertSame("Last node the same", now[2].getName(), after[1].getName()); + } + ++ public void testGetNodesOptimal() throws Exception { ++ class KOpt extends Keys { ++ ++ KOpt() { ++ super(lazy()); ++ } ++ int cnt; ++ ++ @Override ++ public Node[] getNodes(boolean optimal) { ++ assertTrue("Only calling with true", optimal); ++ cnt++; ++ return super.getNodes(optimal); ++ } ++ } ++ ++ KOpt k = new KOpt(); ++ k.keys("1", "2", "3"); ++ Node n = createNode(k); ++ ++ Node[] arr = n.getChildren().getNodes(true); ++ assertEquals("3 nodes", 3, arr.length); ++ assertEquals("Calling cnt once", 1, k.cnt); ++ ++ } ++ + public void testRefreshOnFavoritesAdding() throws Exception { + Keys k = new Keys(lazy()); + k.keys("1", "2", "3"); +diff -r 76d51071af8a -r af9499d919b8 openide.text/manifest.mf +--- a/openide.text/manifest.mf Fri Nov 07 11:48:18 2008 +0100 ++++ b/openide.text/manifest.mf Tue Mar 10 13:53:55 2009 +0300 +@@ -1,6 +1,6 @@ + Manifest-Version: 1.0 + OpenIDE-Module: org.openide.text +-OpenIDE-Module-Specification-Version: 6.21.1 ++OpenIDE-Module-Specification-Version: 6.21.2 + OpenIDE-Module-Localizing-Bundle: org/openide/text/Bundle.properties + AutoUpdate-Essential-Module: true + +diff -r 76d51071af8a -r af9499d919b8 openide.text/src/org/openide/text/CloneableEditorSupport.java +--- a/openide.text/src/org/openide/text/CloneableEditorSupport.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/openide.text/src/org/openide/text/CloneableEditorSupport.java Tue Mar 10 13:53:55 2009 +0300 +@@ -226,7 +226,7 @@ + */ + private boolean revertingUndoOrReloading; + private boolean justRevertedToNotModified; +- private int documentStatus = DOCUMENT_NO; ++ private volatile int documentStatus = DOCUMENT_NO; + private Throwable prepareDocumentRuntimeException; + + /** Reference to WeakHashMap that is used by all Line.Sets created +@@ -831,6 +831,10 @@ + if (redirect != null) { + return redirect.getDocument(); + } ++ //#149717 Do not block when document is loading ++ if (documentStatus != DOCUMENT_READY) { ++ return null; ++ } + synchronized (getLock()) { + while (true) { + switch (documentStatus) { +diff -r 76d51071af8a -r af9499d919b8 openide.text/test/unit/src/org/openide/text/CloneableEditorNeverendingLoadingTest.java +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/openide.text/test/unit/src/org/openide/text/CloneableEditorNeverendingLoadingTest.java Tue Mar 10 13:53:55 2009 +0300 +@@ -0,0 +1,258 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common ++ * Development and Distribution License("CDDL") (collectively, the ++ * "License"). You may not use this file except in compliance with the ++ * License. You can obtain a copy of the License at ++ * http://www.netbeans.org/cddl-gplv2.html ++ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the ++ * specific language governing permissions and limitations under the ++ * License. When distributing the software, include this License Header ++ * Notice in each file and include the License file at ++ * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this ++ * particular file as subject to the "Classpath" exception as provided ++ * by Sun in the GPL Version 2 section of the License file that ++ * accompanied this code. If applicable, add the following below the ++ * License Header, with the fields enclosed by brackets [] replaced by ++ * your own identifying information: ++ * "Portions Copyrighted [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * ++ * The Original Software is NetBeans. The Initial Developer of the Original ++ * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun ++ * Microsystems, Inc. All Rights Reserved. ++ * ++ * If you wish your version of this file to be governed by only the CDDL ++ * or only the GPL Version 2, indicate your decision by adding ++ * "[Contributor] elects to include this software in this distribution ++ * under the [CDDL or GPL Version 2] license." If you do not indicate a ++ * single choice of license, a recipient has the option to distribute ++ * your version of this file under either the CDDL, the GPL Version 2 or ++ * to extend the choice of license to its licensees as provided above. ++ * However, if you add GPL Version 2 code and therefore, elected the GPL ++ * Version 2 license, then the option applies only if the new code is ++ * made subject to such option by the copyright holder. ++ */ ++ ++package org.openide.text; ++ ++import java.beans.PropertyChangeListener; ++import java.beans.VetoableChangeListener; ++import java.io.ByteArrayInputStream; ++import java.io.ByteArrayOutputStream; ++import java.io.IOException; ++import java.io.InputStream; ++import java.io.OutputStream; ++import java.io.Serializable; ++import java.util.ArrayList; ++import java.util.Date; ++import java.util.List; ++import org.netbeans.junit.NbTestCase; ++import org.openide.util.Exceptions; ++import org.openide.util.Lookup; ++import org.openide.util.RequestProcessor; ++import org.openide.util.RequestProcessor.Task; ++import org.openide.windows.CloneableOpenSupport; ++import org.openide.windows.CloneableTopComponent; ++ ++/** ++ * Test that CES.getDocument() is not blocked when document is being loaded. ++ * ++ * @author Marek Slama ++ */ ++public class CloneableEditorNeverendingLoadingTest extends NbTestCase ++implements CloneableEditorSupport.Env { ++ static { ++ System.setProperty("org.openide.windows.DummyWindowManager.VISIBLE", "false"); ++ } ++ /** the support to work with */ ++ private transient CES support; ++ ++ // Env variables ++ private transient String content = ""; ++ private transient boolean valid = true; ++ private transient boolean modified = false; ++ /** if not null contains message why this document cannot be modified */ ++ private transient String cannotBeModified; ++ private transient Date date = new Date (); ++ private transient List propL = new ArrayList(); ++ private transient VetoableChangeListener vetoL; ++ ++ private static CloneableEditorNeverendingLoadingTest RUNNING; ++ ++ private boolean blocked; ++ ++ public CloneableEditorNeverendingLoadingTest(String s) { ++ super(s); ++ } ++ ++ @Override ++ protected void setUp () { ++ support = new CES (this, Lookup.EMPTY); ++ RUNNING = this; ++ } ++ ++ @Override ++ protected boolean runInEQ() { ++ return true; ++ } ++ ++ private Object writeReplace () { ++ return new Replace (); ++ } ++ ++ public void testGetDocumentReturnsImmediatelly() throws Exception { ++ class R implements Runnable { ++ boolean running; ++ ++ public void run() { ++ running = true; ++ support.open(); ++ running = false; ++ } ++ } ++ ++ R running = new R(); ++ Task task = RequestProcessor.getDefault().post(running); ++ ++ assertFalse("Does not finish the opening as it is blocked", task.waitFinished(1000)); ++ synchronized (this) { ++ while (!blocked) { ++ wait(); ++ } ++ } ++ assertNull("No document is opened", support.getDocument()); ++ assertTrue("Open is still running", running.running); ++ synchronized (this) { ++ notifyAll(); ++ } ++ task.waitFinished(); ++ ++ assertNotNull("Document open finished", support.getDocument()); ++ } ++ ++ // ++ // Implementation of the CloneableEditorSupport.Env ++ // ++ ++ public synchronized void addPropertyChangeListener(PropertyChangeListener l) { ++ propL.add (l); ++ } ++ public synchronized void removePropertyChangeListener(PropertyChangeListener l) { ++ propL.remove (l); ++ } ++ ++ public synchronized void addVetoableChangeListener(VetoableChangeListener l) { ++ assertNull ("This is the first veto listener", vetoL); ++ vetoL = l; ++ } ++ public void removeVetoableChangeListener(VetoableChangeListener l) { ++ assertEquals ("Removing the right veto one", vetoL, l); ++ vetoL = null; ++ } ++ ++ public CloneableOpenSupport findCloneableOpenSupport() { ++ return RUNNING.support; ++ } ++ ++ public String getMimeType() { ++ return "text/plain"; ++ } ++ ++ public Date getTime() { ++ return date; ++ } ++ ++ public synchronized InputStream inputStream() throws IOException { ++ blocked = true; ++ notifyAll(); ++ try { ++ wait(); ++ } catch (InterruptedException ex) { ++ Exceptions.printStackTrace(ex); ++ } ++ blocked = false; ++ return new ByteArrayInputStream(new byte[0]); ++ } ++ public OutputStream outputStream() throws IOException { ++ class ContentStream extends ByteArrayOutputStream { ++ @Override ++ public void close () throws IOException { ++ super.close (); ++ content = new String (toByteArray ()); ++ } ++ } ++ ++ return new ContentStream (); ++ } ++ ++ public boolean isValid() { ++ return valid; ++ } ++ ++ public boolean isModified() { ++ return modified; ++ } ++ ++ public void markModified() throws IOException { ++ if (cannotBeModified != null) { ++ final String notify = cannotBeModified; ++ IOException e = new IOException () { ++ @Override ++ public String getLocalizedMessage () { ++ return notify; ++ } ++ }; ++ Exceptions.attachLocalizedMessage(e, cannotBeModified); ++ throw e; ++ } ++ ++ modified = true; ++ } ++ ++ public void unmarkModified() { ++ modified = false; ++ } ++ ++ /** Implementation of the CES */ ++ private final class CES extends CloneableEditorSupport { ++ public CES (Env env, Lookup l) { ++ super (env, l); ++ } ++ ++ public CloneableTopComponent.Ref getRef () { ++ return allEditors; ++ } ++ ++ protected String messageName() { ++ return "Name"; ++ } ++ ++ protected String messageOpened() { ++ return "Opened"; ++ } ++ ++ protected String messageOpening() { ++ return "Opening"; ++ } ++ ++ protected String messageSave() { ++ return "Save"; ++ } ++ ++ protected String messageToolTip() { ++ return "ToolTip"; ++ } ++ } ++ ++ private static final class Replace implements Serializable { ++ public Object readResolve () { ++ return RUNNING; ++ } ++ } ++} +diff -r 76d51071af8a -r af9499d919b8 options.api/manifest.mf +--- a/options.api/manifest.mf Fri Nov 07 11:48:18 2008 +0100 ++++ b/options.api/manifest.mf Tue Mar 10 13:53:55 2009 +0300 +@@ -2,6 +2,6 @@ + OpenIDE-Module: org.netbeans.modules.options.api/1 + OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/options/Bundle.properties + OpenIDE-Module-Layer: org/netbeans/modules/options/resources/mf-layer.xml +-OpenIDE-Module-Specification-Version: 1.10.1 ++OpenIDE-Module-Specification-Version: 1.10.2 + AutoUpdate-Show-In-Client: false + AutoUpdate-Essential-Module: true +diff -r 76d51071af8a -r af9499d919b8 options.api/src/org/netbeans/modules/options/advanced/Model.java +--- a/options.api/src/org/netbeans/modules/options/advanced/Model.java Fri Nov 07 11:48:18 2008 +0100 ++++ b/options.api/src/org/netbeans/modules/options/advanced/Model.java Tue Mar 10 13:53:55 2009 +0300 +@@ -183,10 +183,12 @@ + } + + boolean isValid () { +- Iterator it = categoryToController.values ().iterator (); +- while (it.hasNext ()) +- if (!((OptionsPanelController) it.next ()).isValid ()) ++ for (OptionsPanelController controller : categoryToController.values()) { ++ // if changed (#145569) and not valid ++ if (controller.isChanged() && !controller.isValid()) { + return false; ++ } ++ } + return true; + } + --- libnb-platform-java-6.5.orig/debian/patches/20-properties.patch +++ libnb-platform-java-6.5/debian/patches/20-properties.patch @@ -0,0 +1,12 @@ +diff -Nur -x '*.orig' -x '*~' libnb-platform8-java-6.1/o.jdesktop.layout/nbproject/project.properties libnb-platform8-java-6.1.new/o.jdesktop.layout/nbproject/project.properties +--- libnb-platform8-java-6.1/o.jdesktop.layout/nbproject/project.properties 2008-05-28 16:49:43.000000000 +0400 ++++ libnb-platform8-java-6.1.new/o.jdesktop.layout/nbproject/project.properties 2008-05-28 16:54:32.000000000 +0400 +@@ -39,6 +39,6 @@ + + is.autoload=true + release.external/swing-layout-1.0.3.jar=modules/ext/swing-layout-1.0.3.jar +-release.external/swing-layout-1.0.3-doc.zip=docs/swing-layout-1.0.3-doc.zip +-release.external/swing-layout-1.0.3-src.zip=docs/swing-layout-1.0.3-src.zip ++#release.external/swing-layout-1.0.3-doc.zip=docs/swing-layout-1.0.3-doc.zip ++#release.external/swing-layout-1.0.3-src.zip=docs/swing-layout-1.0.3-src.zip + jnlp.indirect.jars=docs/swing-layout-1.0.3-doc.zip, docs/swing-layout-1.0.3-src.zip --- libnb-platform-java-6.5.orig/debian/patches/40-java-library.patch +++ libnb-platform-java-6.5/debian/patches/40-java-library.patch @@ -0,0 +1,12 @@ +diff -Nur -x '*.orig' -x '*~' libnb-platform-java-6.1/o.n.bootstrap/launcher/unix/nbexec libnb-platform-java-6.1.new/o.n.bootstrap/launcher/unix/nbexec +--- libnb-platform-java-6.1/o.n.bootstrap/launcher/unix/nbexec 2008-05-30 03:10:46.000000000 +0400 ++++ libnb-platform-java-6.1.new/o.n.bootstrap/launcher/unix/nbexec 2008-08-04 18:47:02.000000000 +0400 +@@ -459,7 +459,7 @@ + # let's go + # + delete_new_clusters_file +- eval ${_NB_PROFILE_CMD} "\"${jdkhome}/bin/java\"" -Djdk.home="\"${jdkhome}\"" -classpath "\"$cp\"" \ ++ eval ${_NB_PROFILE_CMD} "\"${jdkhome}/bin/java\"" -Djdk.home="\"${jdkhome}\"" -Djava.library.path="/usr/lib/jni" -classpath "\"$cp\"" \ + $jargs org.netbeans.Main "$args" '&' + PID=$! + trap "kill $PID" EXIT