Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2008-10-30 16:50:44 +0000
committerSusan Franklin2008-10-30 16:50:44 +0000
commit2f31c83fdf8f9e680019cbcbb303ccdcfca85abb (patch)
treefd1779e9a7f6005702ae09d761dda143be3e52a2 /bundles/org.eclipse.equinox.p2.ui.admin
parenta6dfcf2badcc0ef5b9a777bd2b4bf0092ee47792 (diff)
downloadrt.equinox.p2-2f31c83fdf8f9e680019cbcbb303ccdcfca85abb.tar.gz
rt.equinox.p2-2f31c83fdf8f9e680019cbcbb303ccdcfca85abb.tar.xz
rt.equinox.p2-2f31c83fdf8f9e680019cbcbb303ccdcfca85abb.zip
Bug 247524 - [ui] AddProfileOperation constructor doesn't use profile argument
Bug 247532 - [ui] AddProfileOperation undo is broken Bug 247540 - [ui] RemoveProfileOperation shouldn't be undoable
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.ui.admin')
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
index f22aa63ac..7c95e887b 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
@@ -20,9 +20,9 @@ import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
import org.eclipse.equinox.internal.provisional.p2.ui.*;
import org.eclipse.equinox.internal.provisional.p2.ui.actions.UninstallAction;
import org.eclipse.equinox.internal.provisional.p2.ui.actions.UpdateAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.InstalledIUElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.Profiles;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.*;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.*;
+import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
+import org.eclipse.equinox.internal.provisional.p2.ui.operations.RemoveProfilesOperation;
import org.eclipse.equinox.internal.provisional.p2.ui.policy.ProfileChooser;
import org.eclipse.equinox.internal.provisional.p2.ui.viewers.*;
import org.eclipse.jface.action.*;
@@ -56,15 +56,13 @@ public class ProfilesView extends ProvView {
}
public void run() {
- List list = getSelection().toList();
+ Object[] selections = getSelection().toArray();
List profilesOnly = new ArrayList();
- for (int i = 0; i < list.size(); i++) {
- IProfile profile = (IProfile) ProvUI.getAdapter(list.get(i), IProfile.class);
- if (profile != null) {
- profilesOnly.add(profile);
- }
+ for (int i = 0; i < selections.length; i++) {
+ if (selections[i] instanceof ProfileElement)
+ profilesOnly.add(((ProfileElement) selections[i]).getProfileId());
}
- ProfileOperation op = new RemoveProfilesOperation(ProvAdminUIMessages.Ops_RemoveProfileOperationLabel, (IProfile[]) profilesOnly.toArray(new IProfile[profilesOnly.size()]));
+ RemoveProfilesOperation op = new RemoveProfilesOperation(ProvAdminUIMessages.Ops_RemoveProfileOperationLabel, (String[]) profilesOnly.toArray(new String[profilesOnly.size()]));
ProvisioningOperationRunner.run(op, ProfilesView.this.getShell(), StatusManager.SHOW | StatusManager.LOG);
}
}

Back to the top