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 461549
Collapse All | Expand All

(-)a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/P2TargetUtils.java (+8 lines)
Lines 218-223 Link Here
218
		}
218
		}
219
	}
219
	}
220
220
221
	@SuppressWarnings("restriction")
222
	public static void forceCheckTarget(final ITargetDefinition target) {
223
		final P2TargetUtils result = getSynchronizer(target);
224
		if (result != null && result.fProfile != null && result.fProfile instanceof Profile) {
225
			((Profile) result.fProfile).setProperty(PROP_SEQUENCE_NUMBER, "-1"); //$NON-NLS-1$
226
		}
227
	}
228
221
	/**
229
	/**
222
	 * Performs garbage collection based on remaining profiles. Should be called to avoid
230
	 * Performs garbage collection based on remaining profiles. Should be called to avoid
223
	 * having PDE's bundle pool area grow unbounded.
231
	 * having PDE's bundle pool area grow unbounded.
(-)a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationsGroup.java (-4 / +2 lines)
Lines 557-570 Link Here
557
557
558
		//delete profile
558
		//delete profile
559
		try {
559
		try {
560
			// TODO might want to merge forceCheckTarget into delete Profile?
561
			P2TargetUtils.forceCheckTarget(fTarget);
560
			P2TargetUtils.deleteProfile(fTarget.getHandle());
562
			P2TargetUtils.deleteProfile(fTarget.getHandle());
561
		} catch (CoreException e) {
563
		} catch (CoreException e) {
562
			PDEPlugin.log(e);
564
			PDEPlugin.log(e);
563
		}
565
		}
564
565
		// increase sequence number
566
		if (fTarget instanceof TargetDefinition)
567
			((TargetDefinition) fTarget).incrementSequenceNumber();
568
566
569
		Job job = new UIJob("Reloading...") { //$NON-NLS-1$
567
		Job job = new UIJob("Reloading...") { //$NON-NLS-1$
570
			@Override
568
			@Override

Return to bug 461549