mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-08 16:55:38 +02:00
bug 379165: [sd90] Keep using MBS provider even for unmanaged project
This commit is contained in:
parent
07cac1aa54
commit
de0deb5122
6 changed files with 24 additions and 5 deletions
|
@ -308,13 +308,13 @@
|
||||||
</managedBuildRevision>
|
</managedBuildRevision>
|
||||||
<configuration
|
<configuration
|
||||||
id="org.eclipse.cdt.build.core.emptycfg"
|
id="org.eclipse.cdt.build.core.emptycfg"
|
||||||
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;${Toolchain}"
|
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;${Toolchain};org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider"
|
||||||
name="%cfg1_empty">
|
name="%cfg1_empty">
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
||||||
<configuration
|
<configuration
|
||||||
id="org.eclipse.cdt.build.core.prefbase.cfg"
|
id="org.eclipse.cdt.build.core.prefbase.cfg"
|
||||||
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;${Toolchain}"
|
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;${Toolchain};org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider"
|
||||||
name="%cfg1_base">
|
name="%cfg1_base">
|
||||||
<toolChain
|
<toolChain
|
||||||
id="org.eclipse.cdt.build.core.prefbase.toolchain"
|
id="org.eclipse.cdt.build.core.prefbase.toolchain"
|
||||||
|
|
|
@ -374,7 +374,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
||||||
status = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, "This discovery method is deprecated, use 'Preprocessor Include Paths' instead.");
|
status = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, "This discovery method is deprecated, use 'Preprocessor Include Paths' instead.");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
status = new Status(IStatus.INFO, CUIPlugin.PLUGIN_ID, "Managed Build language settings provider is not enabled (see 'Preprocessor Include Paths' page).");
|
status = new Status(IStatus.INFO, CUIPlugin.PLUGIN_ID, org.eclipse.cdt.internal.ui.newui.Messages.AbstractLangsListTab_MbsProviderNotEnabled);
|
||||||
}
|
}
|
||||||
fStatusLine.setErrorStatus(status);
|
fStatusLine.setErrorStatus(status);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ public class Messages extends NLS {
|
||||||
public static String AbstractLangsListTab_Unexport;
|
public static String AbstractLangsListTab_Unexport;
|
||||||
public static String AbstractLangsListTab_Conjunction;
|
public static String AbstractLangsListTab_Conjunction;
|
||||||
public static String AbstractLangsListTab_Disjunction;
|
public static String AbstractLangsListTab_Disjunction;
|
||||||
|
public static String AbstractLangsListTab_MbsProviderNotEnabled;
|
||||||
public static String AbstractLangsListTab_Modify;
|
public static String AbstractLangsListTab_Modify;
|
||||||
public static String AbstractLangsListTab_MultiConfigStringListModeLinkHint;
|
public static String AbstractLangsListTab_MultiConfigStringListModeLinkHint;
|
||||||
public static String AbstractLangsListTab_Replace;
|
public static String AbstractLangsListTab_Replace;
|
||||||
|
|
|
@ -107,6 +107,7 @@ AbstractLangsListTab_ExportIndicator=\ [exp]
|
||||||
AbstractLangsListTab_Unexport=Unexport
|
AbstractLangsListTab_Unexport=Unexport
|
||||||
AbstractLangsListTab_Conjunction=Conjunction
|
AbstractLangsListTab_Conjunction=Conjunction
|
||||||
AbstractLangsListTab_Disjunction=Disjunction
|
AbstractLangsListTab_Disjunction=Disjunction
|
||||||
|
AbstractLangsListTab_MbsProviderNotEnabled=The settings are not used by indexer (MBS provider is disabled on 'Preprocessor Include Paths' page).
|
||||||
AbstractLangsListTab_Modify=Modify
|
AbstractLangsListTab_Modify=Modify
|
||||||
AbstractLangsListTab_MultiConfigStringListModeLinkHint=Multiple configurations string list mode. Click on link to change or for more info.
|
AbstractLangsListTab_MultiConfigStringListModeLinkHint=Multiple configurations string list mode. Click on link to change or for more info.
|
||||||
AbstractLangsListTab_Replace=Replace
|
AbstractLangsListTab_Replace=Replace
|
||||||
|
|
|
@ -19,6 +19,9 @@ import java.util.Comparator;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.eclipse.core.resources.IProject;
|
||||||
|
import org.eclipse.core.runtime.IStatus;
|
||||||
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.jface.resource.JFaceResources;
|
import org.eclipse.jface.resource.JFaceResources;
|
||||||
import org.eclipse.jface.viewers.IFontProvider;
|
import org.eclipse.jface.viewers.IFontProvider;
|
||||||
import org.eclipse.jface.viewers.IStructuredContentProvider;
|
import org.eclipse.jface.viewers.IStructuredContentProvider;
|
||||||
|
@ -49,6 +52,7 @@ import org.eclipse.swt.widgets.Tree;
|
||||||
import org.eclipse.swt.widgets.TreeColumn;
|
import org.eclipse.swt.widgets.TreeColumn;
|
||||||
import org.eclipse.swt.widgets.TreeItem;
|
import org.eclipse.swt.widgets.TreeItem;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||||
import org.eclipse.cdt.core.model.ILanguageDescriptor;
|
import org.eclipse.cdt.core.model.ILanguageDescriptor;
|
||||||
import org.eclipse.cdt.core.model.LanguageManager;
|
import org.eclipse.cdt.core.model.LanguageManager;
|
||||||
import org.eclipse.cdt.core.model.util.CDTListComparator;
|
import org.eclipse.cdt.core.model.util.CDTListComparator;
|
||||||
|
@ -66,7 +70,9 @@ import org.eclipse.cdt.core.settings.model.ICSettingBase;
|
||||||
import org.eclipse.cdt.core.settings.model.ICSettingEntry;
|
import org.eclipse.cdt.core.settings.model.ICSettingEntry;
|
||||||
import org.eclipse.cdt.core.settings.model.MultiLanguageSetting;
|
import org.eclipse.cdt.core.settings.model.MultiLanguageSetting;
|
||||||
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.internal.ui.language.settings.providers.LanguageSettingsProvidersPage;
|
||||||
import org.eclipse.cdt.internal.ui.newui.LanguageSettingsImages;
|
import org.eclipse.cdt.internal.ui.newui.LanguageSettingsImages;
|
||||||
import org.eclipse.cdt.internal.ui.newui.Messages;
|
import org.eclipse.cdt.internal.ui.newui.Messages;
|
||||||
import org.eclipse.cdt.internal.ui.newui.StatusMessageLine;
|
import org.eclipse.cdt.internal.ui.newui.StatusMessageLine;
|
||||||
|
@ -259,8 +265,18 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
|
||||||
* Displays warning message - if any - for selected language settings entry.
|
* Displays warning message - if any - for selected language settings entry.
|
||||||
* Multiline selection is not supported.
|
* Multiline selection is not supported.
|
||||||
*/
|
*/
|
||||||
private void updateStatusLine() {
|
protected void updateStatusLine() {
|
||||||
fStatusLine.setErrorStatus(LanguageSettingsImages.getStatus(getSelectedEntry(), getResDesc().getConfiguration()));
|
ICConfigurationDescription cfgDescription = page.getResDesc().getConfiguration();
|
||||||
|
IStatus status = LanguageSettingsImages.getStatus(getSelectedEntry(), cfgDescription);
|
||||||
|
if (cfgDescription != null && (status == null || status.isOK())) {
|
||||||
|
IProject project = cfgDescription.getProjectDescription().getProject();
|
||||||
|
boolean isEnabled = !LanguageSettingsProvidersPage.isLanguageSettingsProvidersEnabled(project) || ScannerDiscoveryLegacySupport.isMbsLanguageSettingsProviderOn(cfgDescription);
|
||||||
|
if (!isEnabled) {
|
||||||
|
status = new Status(IStatus.INFO, CUIPlugin.PLUGIN_ID, Messages.AbstractLangsListTab_MbsProviderNotEnabled);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fStatusLine.setErrorStatus(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -95,6 +95,7 @@ public class SymbolTab extends AbstractLangsListTab {
|
||||||
table.setSelection(0);
|
table.setSelection(0);
|
||||||
}
|
}
|
||||||
updateStringListModeControl();
|
updateStringListModeControl();
|
||||||
|
updateStatusLine();
|
||||||
updateButtons();
|
updateButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue