mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-16 12:45:41 +02:00
Bug 295602 "Export Settings" tab restore defaults should add the default exported paths from the Configuration
This commit is contained in:
parent
ef68953626
commit
1a924925c5
2 changed files with 10 additions and 2 deletions
|
@ -2322,13 +2322,13 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSourceEntries(ICSourceEntry[] entries, boolean setRebuildState) {
|
public void setSourceEntries(ICSourceEntry[] entries, boolean setRebuildState) {
|
||||||
|
exportArtifactInfo();
|
||||||
if(Arrays.equals(getSourceEntries(), entries))
|
if(Arrays.equals(getSourceEntries(), entries))
|
||||||
return;
|
return;
|
||||||
sourceEntries = entries != null ? (ICSourceEntry[])entries.clone() : null;
|
sourceEntries = entries != null ? (ICSourceEntry[])entries.clone() : null;
|
||||||
// for(int i = 0; i < sourcePaths.length; i++){
|
// for(int i = 0; i < sourcePaths.length; i++){
|
||||||
// sourcePaths[i] = sourcePaths[i].makeRelative();
|
// sourcePaths[i] = sourcePaths[i].makeRelative();
|
||||||
// }
|
// }
|
||||||
exportArtifactInfo();
|
|
||||||
if(setRebuildState){
|
if(setRebuildState){
|
||||||
setDirty(true);
|
setDirty(true);
|
||||||
setRebuildState(true);
|
setRebuildState(true);
|
||||||
|
|
|
@ -18,6 +18,7 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.core.runtime.content.IContentType;
|
import org.eclipse.core.runtime.content.IContentType;
|
||||||
import org.eclipse.core.runtime.content.IContentTypeManager;
|
import org.eclipse.core.runtime.content.IContentTypeManager;
|
||||||
|
@ -48,6 +49,7 @@ import org.eclipse.cdt.core.settings.model.ICExternalSetting;
|
||||||
import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
|
import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
|
||||||
import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
||||||
import org.eclipse.cdt.core.settings.model.ICSettingEntry;
|
import org.eclipse.cdt.core.settings.model.ICSettingEntry;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
|
|
||||||
|
@ -353,9 +355,15 @@ outer:
|
||||||
@Override
|
@Override
|
||||||
protected void performDefaults() {
|
protected void performDefaults() {
|
||||||
cfg.removeExternalSettings();
|
cfg.removeExternalSettings();
|
||||||
|
// Bug 295602 Add any resources which are exported by 'default' in this configuration
|
||||||
|
// There's no hook on the Build system to do this, but
|
||||||
|
// setSourceEntries -> ... -> Configuration#setSourceEntries(...) -> Configuration#exportArtifactInfo()
|
||||||
|
try {
|
||||||
|
cfg.setSourceEntries(cfg.getSourceEntries());
|
||||||
|
} catch (CoreException e) {CUIPlugin.log(e);}
|
||||||
updateData(this.getResDesc());
|
updateData(this.getResDesc());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extended label provider
|
// Extended label provider
|
||||||
private class RichLabelProvider extends LabelProvider implements IFontProvider, ITableLabelProvider /*, IColorProvider*/{
|
private class RichLabelProvider extends LabelProvider implements IFontProvider, ITableLabelProvider /*, IColorProvider*/{
|
||||||
public RichLabelProvider(){}
|
public RichLabelProvider(){}
|
||||||
|
|
Loading…
Add table
Reference in a new issue