Bug 88284 [build path] Changes applied even when I press Cancel
Build: I-20050315 1. I opened the Java build path properties page of my org.eclipse.pde.core project 2. switched to the Libraries tab. 3. Added an external library and a workspace library just to see what the icons look like. 4. Press Cancel on the dialog. The changes took effect on my .classpath file and a compilation of the project was triggered.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/BuildPathsPropertyPage.java
if (adaptable != null) {
			IJavaElement elem= (IJavaElement) adaptable.getAdapter(IJavaElement.class);
			if (elem instanceof IJavaProject) {
				return ((IJavaProject) elem).getProject();
			}
		}
		return null;
	}
	
	private boolean isJavaProject(IProject proj) {
		try {
			return proj.hasNature(JavaCore.NATURE_ID);
		} catch (CoreException e) {
			JavaPlugin.log(e);
		}
		return false;
	}
	
	/*
	 * @see IPreferencePage#performOk
	 */
	public boolean performOk() {
		if (fBuildPathsBlock != null) {
			getSettings().put(INDEX, fBuildPathsBlock.getPageIndex());
			IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
				public void run(IProgressMonitor monitor)	throws CoreException, OperationCanceledException {
					fBuildPathsBlock.configureJavaProject(monitor);
				}
			};
			WorkbenchRunnableAdapter op= new WorkbenchRunnableAdapter(runnable);