|
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 |
} |