mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
bug 378978: [sd90] Reduce scope of scheduling rule by creating
language.settings.xml in advance
This commit is contained in:
parent
758ce684d3
commit
e9d7946b5a
1 changed files with 14 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.language.settings.providers;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.net.URI;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
@ -916,7 +917,19 @@ public class LanguageSettingsProvidersSerializer {
|
|||
}
|
||||
}
|
||||
if (folder.isAccessible()) {
|
||||
rule = folder;
|
||||
// Create dummy file to reduce scheduling to the file itself
|
||||
if (!fileStorePrj.exists()) {
|
||||
try {
|
||||
fileStorePrj.create(new ByteArrayInputStream("<project/>".getBytes()), true, null); //$NON-NLS-1$
|
||||
} catch (CoreException e) {
|
||||
CCorePlugin.log(e);
|
||||
}
|
||||
}
|
||||
if (fileStorePrj.exists()) {
|
||||
rule = fileStorePrj;
|
||||
} else {
|
||||
rule = folder;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (rule == null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue