summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2009-06-09 10:36:03 +0000
committerMiroslav Šulc <fordfrog@gentoo.org>2009-06-09 10:36:03 +0000
commit2db5baadb6e5d03c9cc416e7dc1cb3745c3731ad (patch)
treed10631ab9de9c95ef25a93a1e774f32c61a17da6 /dev-util/netbeans/files
parentslotmove of net-p2p/ktorrent-3.2.2 from 3 to 4 (diff)
downloadgentoo-2-2db5baadb6e5d03c9cc416e7dc1cb3745c3731ad.tar.gz
gentoo-2-2db5baadb6e5d03c9cc416e7dc1cb3745c3731ad.tar.bz2
gentoo-2-2db5baadb6e5d03c9cc416e7dc1cb3745c3731ad.zip
netbeans-6.7_rc2_p1: added patch that fixes problem with plugins activation/deactivation
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/netbeans/files')
-rw-r--r--dev-util/netbeans/files/6.7/autoupdate.ui.fix.patch112
1 files changed, 112 insertions, 0 deletions
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 {