diff options
-rw-r--r-- | dev-util/netbeans/ChangeLog | 11 | ||||
-rw-r--r-- | dev-util/netbeans/files/6.7/autoupdate.ui.fix.patch | 112 | ||||
-rw-r--r-- | dev-util/netbeans/netbeans-6.7_rc2_p1.ebuild (renamed from dev-util/netbeans/netbeans-6.7_rc2.ebuild) | 5 |
3 files changed, 125 insertions, 3 deletions
diff --git a/dev-util/netbeans/ChangeLog b/dev-util/netbeans/ChangeLog index 5efeef9edb5f..9b35c60e40cf 100644 --- a/dev-util/netbeans/ChangeLog +++ b/dev-util/netbeans/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for dev-util/netbeans # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/netbeans/ChangeLog,v 1.119 2009/06/05 21:08:55 fordfrog Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/netbeans/ChangeLog,v 1.120 2009/06/09 10:36:03 fordfrog Exp $ + +*netbeans-6.7_rc2_p1 (09 Jun 2009) + + 09 Jun 2009; Miroslav Šulc <fordfrog@gentoo.org> + +files/6.7/autoupdate.ui.fix.patch, -netbeans-6.7_rc2.ebuild, + +netbeans-6.7_rc2_p1.ebuild: + Added patch that fixes problems with activate/deactivate buttons being + disabled in plugins manager, more info at + http://www.netbeans.org/issues/show_bug.cgi?id=165841 *netbeans-6.7_rc2 (05 Jun 2009) diff --git a/dev-util/netbeans/files/6.7/autoupdate.ui.fix.patch b/dev-util/netbeans/files/6.7/autoupdate.ui.fix.patch new file mode 100644 index 000000000000..ac610be1f34c --- /dev/null +++ b/dev-util/netbeans/files/6.7/autoupdate.ui.fix.patch @@ -0,0 +1,112 @@ +diff -r 5fb0d903fe36 autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/Unit.java +--- a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/Unit.java Mon Jun 08 19:00:44 2009 +0200 ++++ b/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/Unit.java Tue Jun 09 10:43:27 2009 +0200 +@@ -262,7 +262,7 @@ + + private UpdateElement installEl = null; + private UpdateElement backupEl = null; +- private boolean isUninstallAllowed ; ++ private Boolean alternateMarked; + + public static boolean isOperationAllowed (UpdateUnit uUnit, UpdateElement element, OperationContainer<OperationSupport> container) { + return container.canBeAdded (uUnit, element); +@@ -285,11 +285,23 @@ + } else { + container = Containers.forUninstall (); + } +- this.isUninstallAllowed = isOperationAllowed (this.updateUnit, installEl, container); ++ if (isOperationAllowed (this.updateUnit, installEl, container)) { ++ alternateMarked = null; ++ } else { ++ alternateMarked = false; ++ } + initState(); ++ } ++ ++ public boolean isUninstallAllowed() { ++ return alternateMarked == null; + } + + public boolean isMarked () { ++ if (alternateMarked != null) { ++ return alternateMarked; ++ } ++ + OperationContainer container = null; + if (UpdateManager.TYPE.CUSTOM_HANDLED_COMPONENT == updateUnit.getType ()) { + container = Containers.forCustomUninstall (); +@@ -301,16 +313,20 @@ + + public void setMarked (boolean marked) { + assert marked != isMarked (); +- OperationContainer container = null; +- if (UpdateManager.TYPE.CUSTOM_HANDLED_COMPONENT == updateUnit.getType ()) { +- container = Containers.forCustomUninstall (); ++ if (isUninstallAllowed()) { ++ OperationContainer container = null; ++ if (UpdateManager.TYPE.CUSTOM_HANDLED_COMPONENT == updateUnit.getType ()) { ++ container = Containers.forCustomUninstall (); ++ } else { ++ container = Containers.forUninstall (); ++ } ++ if (marked) { ++ container.add (updateUnit, installEl); ++ } else { ++ container.remove (installEl); ++ } + } else { +- container = Containers.forUninstall (); +- } +- if (marked) { +- container.add (updateUnit, installEl); +- } else { +- container.remove (installEl); ++ alternateMarked = marked; + } + } + +@@ -340,15 +356,6 @@ + return new SpecificationVersion (unit1.getInstalledVersion ()).compareTo (new SpecificationVersion (unit2.getInstalledVersion ())); + } + return Unit.compareDisplayVersions (u1, u2); +- } +- +- @Override +- public boolean canBeMarked () { +- if (super.canBeMarked ()) { +- return isUninstallAllowed ; +- } else { +- return false; +- } + } + + public String getInstalledVersion () { +diff -r 5fb0d903fe36 autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/UnitTab.java +--- a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/UnitTab.java Mon Jun 08 19:00:44 2009 +0200 ++++ b/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/UnitTab.java Tue Jun 09 10:43:27 2009 +0200 +@@ -1178,6 +1178,25 @@ + focusTable (); + } + } ++ ++ @Override ++ public void tableDataChanged (Collection<Unit> units) { ++ if (units.size() == 0) { ++ setEnabled(false); ++ return; ++ } ++ for (Unit u : units) { ++ if (u instanceof Unit.Installed) { ++ Unit.Installed inst = (Unit.Installed)u; ++ if (!inst.isUninstallAllowed()) { ++ setEnabled(false); ++ return; ++ } ++ } ++ } ++ setEnabled (true); ++ } ++ + } + + private class UpdateAction extends TabAction { diff --git a/dev-util/netbeans/netbeans-6.7_rc2.ebuild b/dev-util/netbeans/netbeans-6.7_rc2_p1.ebuild index 6f26690b571b..68f5eeb9ce4f 100644 --- a/dev-util/netbeans/netbeans-6.7_rc2.ebuild +++ b/dev-util/netbeans/netbeans-6.7_rc2_p1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/netbeans/netbeans-6.7_rc2.ebuild,v 1.1 2009/06/05 21:08:55 fordfrog Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/netbeans/netbeans-6.7_rc2_p1.ebuild,v 1.1 2009/06/09 10:36:03 fordfrog Exp $ EAPI="2" WANT_SPLIT_ANT="true" @@ -450,7 +450,8 @@ pkg_setup() { src_prepare () { # We need to disable downloading of jars epatch "${FILESDIR}"/${SLOT}/nbbuild_build.xml.patch \ - "${FILESDIR}"/${SLOT}/nbbuild_templates_projectized.xml.patch + "${FILESDIR}"/${SLOT}/nbbuild_templates_projectized.xml.patch \ + "${FILESDIR}"/${SLOT}/autoupdate.ui.fix.patch # Clean up nbbuild einfo "Removing prebuilt *.class files from nbbuild" |