|
Lines 11-16
Link Here
|
| 11 |
|
11 |
|
| 12 |
package org.eclipse.equinox.internal.provisional.p2.ui.actions; |
12 |
package org.eclipse.equinox.internal.provisional.p2.ui.actions; |
| 13 |
|
13 |
|
|
|
14 |
import java.util.ArrayList; |
| 14 |
import org.eclipse.core.runtime.IProgressMonitor; |
15 |
import org.eclipse.core.runtime.IProgressMonitor; |
| 15 |
import org.eclipse.core.runtime.MultiStatus; |
16 |
import org.eclipse.core.runtime.MultiStatus; |
| 16 |
import org.eclipse.equinox.internal.p2.ui.PlanStatusHelper; |
17 |
import org.eclipse.equinox.internal.p2.ui.PlanStatusHelper; |
|
Lines 99-105
Link Here
|
| 99 |
* @see org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction#isEnabledFor(java.lang.Object[]) |
100 |
* @see org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction#isEnabledFor(java.lang.Object[]) |
| 100 |
*/ |
101 |
*/ |
| 101 |
protected boolean isEnabledFor(Object[] selectionArray) { |
102 |
protected boolean isEnabledFor(Object[] selectionArray) { |
| 102 |
return selectionArray.length > 0; |
103 |
if (selectionArray.length == 0) |
|
|
104 |
return false; |
| 105 |
// We allow non-IU's to be selected at this point, but there |
| 106 |
// must be at least one installable unit selected that is |
| 107 |
// not a category. |
| 108 |
ArrayList iuList = new ArrayList(); |
| 109 |
for (int i = 0; i < selectionArray.length; i++) { |
| 110 |
IInstallableUnit iu = getIU(selectionArray[i]); |
| 111 |
if (iu != null && !ProvisioningUtil.isCategory(iu)) |
| 112 |
iuList.add(iu); |
| 113 |
} |
| 114 |
return iuList.size() > 0; |
| 103 |
} |
115 |
} |
| 104 |
|
116 |
|
| 105 |
protected String getTaskName() { |
117 |
protected String getTaskName() { |