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

(-)BaseConfigurationBlock.java (+21 lines)
Lines 12-17 Link Here
12
package org.eclipse.jdt.apt.ui.internal.preferences;
12
package org.eclipse.jdt.apt.ui.internal.preferences;
13
13
14
import org.eclipse.core.resources.IProject;
14
import org.eclipse.core.resources.IProject;
15
import org.eclipse.core.resources.ProjectScope;
15
import org.eclipse.core.runtime.preferences.DefaultScope;
16
import org.eclipse.core.runtime.preferences.DefaultScope;
16
import org.eclipse.core.runtime.preferences.IScopeContext;
17
import org.eclipse.core.runtime.preferences.IScopeContext;
17
import org.eclipse.core.runtime.preferences.InstanceScope;
18
import org.eclipse.core.runtime.preferences.InstanceScope;
Lines 96-99 Link Here
96
	 * @param changedKey Key that changed, or null, if all changed.
97
	 * @param changedKey Key that changed, or null, if all changed.
97
	 */	
98
	 */	
98
	protected abstract void validateSettings(Key changedKey, String oldValue, String newValue);
99
	protected abstract void validateSettings(Key changedKey, String oldValue, String newValue);
100
101
	/**
102
	 * TODO: this method is a workaround for Bugzilla 111144 and 106111.  When
103
	 * 111144 is fixed, remove this method and call hasProjectSpecificOptions() 
104
	 * instead.  The difference is that this one does not cause project prefs nodes
105
	 * to be cached in the WorkingCopyManager.
106
	 * @return true if the project has project-specific options.
107
	 */
108
	public boolean hasProjectSpecificOptionsNoCache(IProject project) {
109
		if (project != null) {
110
			IScopeContext projectContext= new ProjectScope(project);
111
			Key[] allKeys= fAllKeys;
112
			for (int i= 0; i < allKeys.length; i++) {
113
				if (allKeys[i].getStoredValue(projectContext, null) != null) {
114
					return true;
115
				}
116
			}
117
		}
118
		return false;
119
	}
99
}
120
}
(-)BasePreferencePage.java (-1 / +3 lines)
Lines 51-57 Link Here
51
	}
51
	}
52
	
52
	
53
	protected boolean hasProjectSpecificOptions(IProject project) {
53
	protected boolean hasProjectSpecificOptions(IProject project) {
54
		return getConfigurationBlock().hasProjectSpecificOptions(project);
54
		// Workaround for bug 106111 / 111144:
55
		// See BaseConfigurationBlock.hasProjectSpecificOptionsNoCache() for details.
56
		return getConfigurationBlock().hasProjectSpecificOptionsNoCache(project);
55
	}
57
	}
56
	
58
	
57
	/*
59
	/*

Return to bug 106111