diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties
index 45ccc47f9c2..090238686c0 100644
--- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties
@@ -100,7 +100,7 @@ ToolName.compiler.solaris.cpp = Solaris C++ Compiler
# Generic Category Names
OptionCategory.Symbols = Symbols
OptionCategory.Preproc = Preprocessor
-OptionCategory.Dirs = Directories
+OptionCategory.Dirs = Includes
OptionCategory.General = General
OptionCategory.Optimize=Optimization
OptionCategory.Debug=Debugging
@@ -117,6 +117,7 @@ Option.Posix.DefSym=Defined symbols (-D)
Option.Posix.UndefSym=Undefined symbols (-U)
Option.Posix.InclPaths=Include paths (-I)
+Option.Posix.InclFiles=Include files (-include)
Option.Posix.OptLevel=Optimization Level
Option.Posix.Optimize.None=None (-O0)
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
index 8d43a117b99..93a06519967 100644
--- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
@@ -1011,6 +1011,14 @@
valueType="includePath"
browseType="directory">
+
+
+
+ * This tab is hidden by default and can be shown under:
+ * Window > Preferences > C/C++ > Property Page Settings > Show "Include Files" Tab
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ * @since 5.2
+ */
+public class IncludeFileTab extends AbstractLangsListTab {
+
+ @Override
+ public void additionalTableSet() {
+ columnToFit = new TableColumn(table, SWT.NONE);
+ columnToFit.setText(UIMessages.getString("IncludeFileTab.0")); //$NON-NLS-1$
+ columnToFit.setToolTipText(UIMessages.getString("IncludeFileTab.0")); //$NON-NLS-1$
+ showBIButton.setSelection(true);
+ table.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = UIMessages.getString("IncludeFileTab.0"); //$NON-NLS-1$
+ }
+ });
+ }
+
+ @Override
+ public ICLanguageSettingEntry doAdd() {
+ IncludeDialog dlg = new IncludeDialog(usercomp.getShell(), IncludeDialog.NEW_FILE, UIMessages
+ .getString("IncludeFileTab.1"), //$NON-NLS-1$
+ EMPTY_STR, getResDesc().getConfiguration(), 0);
+ if (dlg.open() && dlg.text1.trim().length() > 0) {
+ toAllCfgs = dlg.check1;
+ toAllLang = dlg.check3;
+ int flags = 0;
+ if (dlg.check2) { // isWsp
+ flags = ICSettingEntry.VALUE_WORKSPACE_PATH;
+ }
+ return new CIncludeFileEntry(dlg.text1, flags);
+ }
+ return null;
+ }
+
+ @Override
+ public ICLanguageSettingEntry doEdit(ICLanguageSettingEntry ent) {
+ IncludeDialog dlg = new IncludeDialog(usercomp.getShell(), IncludeDialog.OLD_FILE,
+ UIMessages.getString("IncludeFileTab.2"), //$NON-NLS-1$
+ ent.getValue(), getResDesc().getConfiguration(),
+ (ent.getFlags() & ICSettingEntry.VALUE_WORKSPACE_PATH));
+ if (dlg.open()) {
+ int flags = 0;
+ if (dlg.check2)
+ flags = ICSettingEntry.VALUE_WORKSPACE_PATH;
+ return new CIncludeFileEntry(dlg.text1, flags);
+ }
+ return null;
+ }
+
+ @Override
+ public int getKind() {
+ return ICSettingEntry.INCLUDE_FILE;
+ }
+
+ @Override
+ public boolean canBeVisible() {
+ if (!CDTPrefUtil.getBool(CDTPrefUtil.KEY_SHOW_INC_FILES))
+ return false;
+ return super.canBeVisible();
+ }
+
+ @Override
+ public void createControls(final Composite parent) {
+ super.createControls(parent);
+ ImportExportWizardButtons.addWizardLaunchButtons(usercomp, page.getElement());
+ }
+}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PluginResources.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PluginResources.properties
index ad06c18a150..5e87a5d318c 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PluginResources.properties
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PluginResources.properties
@@ -296,6 +296,7 @@ PropertyPageDefsTab.6=Show disc. page names if they are unique. Else names + pro
PropertyPageDefsTab.7=Show disc. page names if they are unique. Else show profile IDs.
PropertyPageDefsTab.8=Always show names + profile IDs
PropertyPageDefsTab.9=Always show profile IDs only
+PropertyPageDefsTab.showIncludeFileTab=Display "Include Files" tab
ProjectConvert.convertersList=Converters List
ScannerConfigOptionsDialog.title=Discovery Options
@@ -409,6 +410,9 @@ EnvironmentTab.9=Undefine
IncludeTab.0=Include directories
IncludeTab.1=Add directory path
IncludeTab.2=Change directory path
+IncludeFileTab.0=Include files
+IncludeFileTab.1=Add include file
+IncludeFileTab.2=Change include file
IncludeDialog.0=Directory:
IncludeDialog.1=File:
IncludeDialog.2=Add to all configurations