diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICHelpContextIds.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICHelpContextIds.java index dc41bc1b597..35d08dddad4 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICHelpContextIds.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICHelpContextIds.java @@ -51,7 +51,6 @@ public interface ICHelpContextIds { public static final String C_EDITOR_PREF_PAGE = PREFIX + "c_editor_gen"; //$NON-NLS-1$ public static final String C_EDITOR_COLORS_PREF_PAGE = PREFIX + "c_editor_color"; //$NON-NLS-1$ public static final String C_EDITOR_CONTENT_ASSIST_PREF_PAGE = PREFIX + "c_editor_con_assist"; //$NON-NLS-1$ - public static final String C_EDITOR_NAVIGATION_PAGE = PREFIX + "c_editor_navigation"; //$NON-NLS-1$ public static final String C_EDITOR_HOVERS_PAGE = PREFIX + "c_editor_hov"; //$NON-NLS-1$ public static final String C_EDITOR_TYPING_PAGE = PREFIX + "c_editor_typing"; //$NON-NLS-1$; public static final String C_EDITOR_FOLDING_PAGE = PREFIX + "c_editor_folding"; //$NON-NLS-1$; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistPreferencePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistPreferencePage.java index cf3fda0d728..9af008daf90 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistPreferencePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistPreferencePage.java @@ -63,6 +63,14 @@ public class CodeAssistPreferencePage extends AbstractPreferencePage { } + /* + * @see PreferencePage#createControl(Composite) + */ + public void createControl(Composite parent) { + super.createControl(parent); + PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), ICHelpContextIds.C_EDITOR_CONTENT_ASSIST_PREF_PAGE); + } + /* (non-Javadoc) * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite) */ @@ -132,8 +140,6 @@ public class CodeAssistPreferencePage extends AbstractPreferencePage { initializeFields(); - PlatformUI.getWorkbench().getHelpSystem().setHelp(contentAssistComposite, ICHelpContextIds.C_EDITOR_CONTENT_ASSIST_PREF_PAGE); - return contentAssistComposite; } diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew.htm index 3fe0a5da10e..f4959892d7f 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew.htm @@ -53,16 +53,53 @@ tr {vertical-align: top;}
Code Folding
Now you can collapse and expand blocks of comments and code in C and C++ files.
-
Code Folding Options:
-
Semantic Highlighting
+ +Identifiers in the source code can now be colored according to their role, e.g. typedefs, functions, variables, fields, etc.
+
Inactive Code Highlighting
+Code being excluded by conditional compilation is marked with grey background.
+
Code Folding Improvements
Now you can collapse and expand blocks of comments and preprocessor branches in C and C++ files in addition to functions, structures, etc.
+
Code Formatter
+A configurable code formatter with 4 predefined styles has been added:
+
Smart Typing
+Typing assistance has been greatly improved. Options include automatic closing of brackets, smart paste and more:
+
This section describes how to set preferences for the C/C++ editor.
-Use the Code Style preference panel to configure you code style profiles for smart typing features, like auto-indentation and formatting. Click Window > Preferences > C/C++ > Code Style to make changes.
+
+ Action + |
+
+ Description + |
+
---|---|
+ New... + |
+
+ Shows the dialog to create a new profile. The dialog requires you to enter a name for the new profile. Additionally, you may select a built-in or user-defined existing profile to base your new profile on. + |
+
+ Edit... + |
+
+ Shows a dialog which displays the settings stored in the active profile. Only user-defined profiles can be modified. + |
+
+ Remove + |
+
+ Removes the selected profile. This action is only available on user-defined profiles. + |
+
+ Import... + |
+
+ Imports profiles from the file system. + |
+
+
+Customizing the C/C++ editor
+
diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_ref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_ref.htm
index 48d58c878c2..b960c018010 100644
--- a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_ref.htm
+++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_ref.htm
@@ -45,16 +45,19 @@
Find/Replace
C/C++ Preferences
Build Console preferences
- Code Templates preferences
Debug preferences
GDB MI preferences
Source Code Locations preferences
+ Code Style preferences
C/C++ Editor preferences
General preferences
- Color preferences
Content Assist preferences
- Hover preferences
- Navigation preferences
+ Advanced preferences
+ Folding preferences
+ Hovers preferences
+ Syntax Coloring preferences
+ Templates preferences
+ Typing preferences
File Types preferences
Make Targets preferences
New Make Projects properties preferences
diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_code_style_pref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_code_style_pref.htm
new file mode 100644
index 00000000000..2ecb15b8240
--- /dev/null
+++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_code_style_pref.htm
@@ -0,0 +1,75 @@
+
+
+
+
+ + +
+ + +
+ +