Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 461083 | Differences between
and this patch

Collapse All | Expand All

(-)a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationsGroup.java (-4 / +4 lines)
Lines 324-330 Link Here
324
			Object currentSelection = iterator.next();
324
			Object currentSelection = iterator.next();
325
			if (currentSelection instanceof ITargetLocation) {
325
			if (currentSelection instanceof ITargetLocation) {
326
				ITargetLocation location = (ITargetLocation) currentSelection;
326
				ITargetLocation location = (ITargetLocation) currentSelection;
327
				ITargetLocationEditor editor = (ITargetLocationEditor) Platform.getAdapterManager().getAdapter(location, ITargetLocationEditor.class);
327
				ITargetLocationEditor editor = Platform.getAdapterManager().getAdapter(location, ITargetLocationEditor.class);
328
				if (editor != null) {
328
				if (editor != null) {
329
					if (editor.canEdit(fTarget, location)) {
329
					if (editor.canEdit(fTarget, location)) {
330
						IWizard editWizard = editor.getEditWizard(fTarget, location);
330
						IWizard editWizard = editor.getEditWizard(fTarget, location);
Lines 510-516 Link Here
510
				canRemove = true;
510
				canRemove = true;
511
				if (!canEdit) {
511
				if (!canEdit) {
512
					ITargetLocation location = (ITargetLocation) currentSelection;
512
					ITargetLocation location = (ITargetLocation) currentSelection;
513
					ITargetLocationEditor editor = (ITargetLocationEditor) Platform.getAdapterManager().getAdapter(location, ITargetLocationEditor.class);
513
					ITargetLocationEditor editor = Platform.getAdapterManager().getAdapter(location, ITargetLocationEditor.class);
514
					if (editor != null) {
514
					if (editor != null) {
515
						canEdit = editor.canEdit(fTarget, location);
515
						canEdit = editor.canEdit(fTarget, location);
516
					}
516
					}
Lines 521-527 Link Here
521
				}
521
				}
522
				if (!canUpdate) {
522
				if (!canUpdate) {
523
					ITargetLocation location = (ITargetLocation) currentSelection;
523
					ITargetLocation location = (ITargetLocation) currentSelection;
524
					ITargetLocationUpdater updater = (ITargetLocationUpdater) Platform.getAdapterManager().getAdapter(location, ITargetLocationUpdater.class);
524
					ITargetLocationUpdater updater = Platform.getAdapterManager().getAdapter(location, ITargetLocationUpdater.class);
525
					if (updater != null) {
525
					if (updater != null) {
526
						canUpdate = updater.canUpdate(fTarget, location);
526
						canUpdate = updater.canUpdate(fTarget, location);
527
					}
527
					}
Lines 539-545 Link Here
539
539
540
		}
540
		}
541
		fRemoveButton.setEnabled(canRemove);
541
		fRemoveButton.setEnabled(canRemove);
542
		fEditButton.setEnabled(canEdit);
542
		fEditButton.setEnabled(canEdit && fTarget.isResolved());
543
		fUpdateButton.setEnabled(canUpdate);
543
		fUpdateButton.setEnabled(canUpdate);
544
544
545
		// TODO Some code to find the parent location of items in the tree
545
		// TODO Some code to find the parent location of items in the tree

Return to bug 461083