mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixed outer scope rule bug
This commit is contained in:
parent
115f78f7aa
commit
090af63d32
1 changed files with 8 additions and 5 deletions
|
@ -52,6 +52,7 @@ import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.ListenerList;
|
import org.eclipse.core.runtime.ListenerList;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.core.runtime.jobs.ILock;
|
import org.eclipse.core.runtime.jobs.ILock;
|
||||||
|
import org.eclipse.core.runtime.jobs.ISchedulingRule;
|
||||||
import org.eclipse.core.runtime.jobs.Job;
|
import org.eclipse.core.runtime.jobs.Job;
|
||||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||||
|
@ -841,13 +842,15 @@ public class LanguageSettingsProvidersSerializer {
|
||||||
public static void loadLanguageSettings(ICProjectDescription prjDescription) {
|
public static void loadLanguageSettings(ICProjectDescription prjDescription) {
|
||||||
IProject project = prjDescription.getProject();
|
IProject project = prjDescription.getProject();
|
||||||
IFile storeInPrjArea = project.getFile(SETTINGS_FOLDER_NAME + STORAGE_PROJECT_LANGUAGE_SETTINGS);
|
IFile storeInPrjArea = project.getFile(SETTINGS_FOLDER_NAME + STORAGE_PROJECT_LANGUAGE_SETTINGS);
|
||||||
// AG: FIXME investigate this one
|
|
||||||
// Causes java.lang.IllegalArgumentException: Attempted to beginRule: P/cdt312, does not match outer scope rule: org.eclipse.cdt.internal.ui.text.c.hover.CSourceHover$SingletonRule@6f34fb
|
|
||||||
try {
|
try {
|
||||||
|
Job currentJob = Job.getJobManager().currentJob();
|
||||||
|
ISchedulingRule currentRule = (currentJob != null) ? currentJob.getRule() : null;
|
||||||
|
if (currentRule == null || currentRule.contains(storeInPrjArea)) {
|
||||||
storeInPrjArea.refreshLocal(IResource.DEPTH_ZERO, null);
|
storeInPrjArea.refreshLocal(IResource.DEPTH_ZERO, null);
|
||||||
} catch (CoreException e) {
|
}
|
||||||
|
} catch (Throwable e) {
|
||||||
// ignore failure
|
// ignore failure
|
||||||
CCorePlugin.log(e);
|
CCorePlugin.log("Internal Error trying to call IResourse.refreshLocal()", e); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
if (storeInPrjArea.exists()) {
|
if (storeInPrjArea.exists()) {
|
||||||
Document doc = null;
|
Document doc = null;
|
||||||
|
|
Loading…
Add table
Reference in a new issue