1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

Add editor features to New & Noteworthy, Code Style preferences

This commit is contained in:
Anton Leherbauer 2007-06-21 13:25:02 +00:00
parent bc30ad342a
commit 39ef61836d
23 changed files with 160 additions and 69 deletions

View file

@ -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$;

View file

@ -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;
}

View file

@ -53,16 +53,53 @@ tr {vertical-align: top;}
<div style="font-size: 20px; font-weight: bold;">Editor</div></td>
</tr>
<tr>
<tr>
<tr>
<td>
<p align="right"><b>Code Folding</b></p> </td>
<td><p>Now you can collapse and expand blocks of comments and code in C and C++ files. </p>
<p><img src="../images/nn_codeFolding1.gif"> </p>
The same code folded up:
<p><img src="../images/nn_codeFolding2.gif"> </p>
<p>Code Folding Options: </p>
<p><img src="../images/nn_codeFoldingPrefs.gif"> </td>
<p align="right"><b>Semantic Highlighting</b></p>
</td>
<td>
<p>Identifiers in the source code can now be colored according to their role, e.g. typedefs, functions, variables, fields, etc.</p>
<p><img src="../images/nn_codeColoring.png"> </p>
</td>
</tr>
<td>
<p align="right"><b>Inactive Code Highlighting</b></p>
</td>
<td>
<p>Code being excluded by conditional compilation is marked with grey background.</p>
<p><img src="../images/nn_inactiveCode.png"> </p>
</td>
</tr>
<td>
<p align="right"><b>Code Folding Improvements</b></p> </td>
<td><p>Now you can collapse and expand blocks of comments and preprocessor branches in C and C++ files in addition to functions, structures, etc. </p>
<p><img src="../images/nn_codeFolding.png"> </p>
</tr>
<tr>
<td>
<p align="right"><b>Code Formatter</b></p>
</td>
<td>
<p>A configurable code formatter with 4 predefined styles has been added:</p>
<p><img src="../images/nn_codeFormatterPrefs.png"> </p>
</td>
</tr>
<tr>
<td>
<p align="right"><b>Smart Typing</b></p>
</td>
<td>
<p>Typing assistance has been greatly improved. Options include automatic closing of brackets, smart paste and more:</p>
<p><img src="../images/nn_smartTypingPrefs.png"> </p>
</td>
</tr>
<!-- ******************** Views ********************** -->
<tr>

View file

@ -106,42 +106,42 @@
<context id ="code_temp">
<description>Click below to see help.</description>
<topic href="reference/cdt_u_code_temp.htm"
label="Code Templates"/>
label="C/C++ Editor Templates Preferences"/>
</context>
<context id ="codeformatter_preference_page_context">
<description>Click below to see help.</description>
<topic href="reference/cdt_u_c_code_style_pref.htm"
label="C/C++ Code Style Preferences"/>
</context>
<context id ="c_editor_gen">
<description>Click below to see help.</description>
<topic href="reference/cdt_u_c_editor_gen.htm"
label="Editor General Preferences"/>
label="C/C++ Editor Preferences"/>
</context>
<context id ="c_editor_color">
<description>Click below to see help.</description>
<topic href="reference/cdt_u_c_editor_color.htm"
label="Editor Colors Preferences"/>
label="C/C++ Editor Syntax Coloring Preferences"/>
</context>
<context id ="c_editor_con_assist">
<description>Click below to see help.</description>
<topic href="reference/cdt_u_c_editor_con_assist.htm"
label="Editor Content Assist Preferences"/>
label="C/C++ Editor Content Assist Preferences"/>
</context>
<context id ="c_editor_hov">
<description>Click below to see help.</description>
<topic href="reference/cdt_u_c_editor_hov.htm"
label="Editor Hovers Preferences"/>
label="C/C++ Editor Hovers Preferences"/>
</context>
<context id ="c_editor_typing">
<description>Click below to see help.</description>
<topic href="reference/cdt_u_c_pref.htm"
label="C/C++ Preferences"/>
<topic href="reference/cdt_u_c_editor_typing.htm"
label="C/C++ Editor Typing Preferences"/>
</context>
<context id ="c_editor_folding">
<description>Click below to see help.</description>
<topic href="reference/cdt_u_c_pref.htm"
label="C/C++ Preferences"/>
</context>
<context id ="c_editor_navigation">
<description>Click below to see help.</description>
<topic href="reference/cdt_u_c_editor_navigation.htm"
label="Editor Navigation Preferences"/>
<topic href="reference/cdt_u_c_editor_folding.htm"
label="C/C++ Editor Folding Preferences"/>
</context>
<context id ="c_file_types">
<description>Click below to see help.</description>

View file

@ -2,7 +2,7 @@
<?NLS TYPE="org.eclipse.help.contexts"?>
<!--
******************************************************************
** (C) COPYRIGHT International Business Machines Corp. 2001,2003
** (C) COPYRIGHT International Business Machines Corp. 2001,2007
** All Rights Reserved * Licensed Materials - Property of IBM
******************************************************************
-->
@ -12,7 +12,7 @@
<!ENTITY registersViewPrefs "Registers view preferences">
<!ENTITY memoryView "Memory view">
<!ENTITY memoryViewPrefs "Memory view preferences">
<!ENTITY ModulesView "Modules view">
<!ENTITY modulesView "Modules view">
<!ENTITY sharedLibsViewPrefs "Shared Libraries view preferences">
<!ENTITY signalsView "Signals view">
<!ENTITY debugPrefs "Debug preferences">

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View file

@ -14,7 +14,7 @@
<p>This section describes how to set preferences for the C/C++ editor.</p>
<img src="../images/trans.gif" border="0" width="25" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_editor_gen.htm">Editor preferences</a><br>
<img src="../images/trans.gif" border="0" width="25" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_editor_gen.htm">General preferences</a><br>
<img src="../images/trans.gif" border="0" width="25" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_editor_con_assist.htm">Content Assist preferences</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<img src="../images/trans.gif" border="0" width="25" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_editor_con_assist_adv.htm">Advanced preferences</a><br>
<img src="../images/trans.gif" border="0" width="25" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_editor_folding.htm">Folding preferences</a><br>
@ -23,7 +23,7 @@
<img src="../images/trans.gif" border="0" width="25" height="1" alt=""><a style="text-decoration:none" href="cdt_u_code_temp.htm">Templates preferences</a><br>
<img src="../images/trans.gif" border="0" width="25" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_editor_typing.htm">Typing preferences</a>
<p><img src="../images/ng00_04a.gif" ALT="IBM Copyright Statement" ></p>
<p><img src="../images/ng00_07.gif" ALT="IBM Copyright Statement" ></p>
</body>

View file

@ -45,16 +45,19 @@
<img src="../images/trans.gif" border="0" width="50" height="1" alt=""><a style="text-decoration:none" href="cdt_u_find_replace.htm">Find/Replace</a><br>
<img src="../images/trans.gif" border="0" width="50" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_pref.htm">C/C++ Preferences</a><br>
<img src="../images/trans.gif" border="0" width="100" height="1" alt=""><a style="text-decoration:none" href="cdt_u_build_pref.htm">Build Console preferences</a><br>
<img src="../images/trans.gif" border="0" width="100" height="1" alt=""><a style="text-decoration:none" href="cdt_u_code_temp.htm">Code Templates preferences</a><br>
<img src="../images/trans.gif" border="0" width="100" height="1" alt=""><a style="text-decoration:none" href="cdt_u_debug.htm">Debug preferences</a><br>
<img src="../images/trans.gif" border="0" width="150" height="1" alt=""><a style="text-decoration:none" href="cdt_u_gdb_mi.htm">GDB MI preferences</a><br>
<img src="../images/trans.gif" border="0" width="150" height="1" alt=""><a style="text-decoration:none" href="cdt_u_dbg_src.htm">Source Code Locations preferences</a><br>
<img src="../images/trans.gif" border="0" width="100" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_code_style_pref.htm">Code Style preferences</a><br>
<img src="../images/trans.gif" border="0" width="100" height="1" alt=""><a style="text-decoration:none" href="cdt_o_ceditor_pref.htm">C/C++ Editor preferences</a><br>
<img src="../images/trans.gif" border="0" width="150" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_editor_gen.htm">General preferences</a><br>
<img src="../images/trans.gif" border="0" width="150" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_editor_color.htm">Color preferences</a><br>
<img src="../images/trans.gif" border="0" width="150" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_editor_con_assist.htm">Content Assist preferences</a><br>
<img src="../images/trans.gif" border="0" width="150" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_editor_hov.htm">Hover preferences</a><br>
<img src="../images/trans.gif" border="0" width="150" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_editor_navigation.htm">Navigation preferences</a><br>
<img src="../images/trans.gif" border="0" width="200" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_editor_con_assist_adv.htm">Advanced preferences</a><br>
<img src="../images/trans.gif" border="0" width="150" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_editor_folding.htm">Folding preferences</a><br>
<img src="../images/trans.gif" border="0" width="150" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_editor_hov.htm">Hovers preferences</a><br>
<img src="../images/trans.gif" border="0" width="150" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_editor_color.htm">Syntax Coloring preferences</a><br>
<img src="../images/trans.gif" border="0" width="150" height="1" alt=""><a style="text-decoration:none" href="cdt_u_code_temp.htm">Templates preferences</a><br>
<img src="../images/trans.gif" border="0" width="150" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_editor_typing.htm">Typing preferences</a><br>
<img src="../images/trans.gif" border="0" width="100" height="1" alt=""><a style="text-decoration:none" href="cdt_u_c_file_types.htm">File Types preferences</a><br>
<img src="../images/trans.gif" border="0" width="100" height="1" alt=""><a style="text-decoration:none" href="cdt_u_make_targets_pref.htm">Make Targets preferences</a><br>
<img src="../images/trans.gif" border="0" width="100" height="1" alt=""><a style="text-decoration:none" href="cdt_o_proj_prop_pages.htm">New Make Projects properties preferences</a><br>

View file

@ -0,0 +1,75 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Code Style preferences</title>
<link rel="stylesheet" type="text/css" href="../help.css">
</head>
<body>
<h1>Code Style preferences</h1>
<p>Use the <b>Code Style</b> preference panel to configure you code style profiles for smart typing features, like auto-indentation and formatting. Click <b>Window &gt; Preferences &gt; C/C++ &gt; Code Style</b> to make changes.</p>
<p><img src="../images/code_style_preferences.png" alt="Code Style Preferences"></p>
<table border="1" cellspacing="0" cellpadding="5" width="600" summary="All options">
<thead>
<tr>
<th>
<p>Action</p>
</th>
<th>
<p>Description</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" width="25%">
<p>New...</p>
</td>
<td valign="top">
<p>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.</p>
</td>
</tr>
<tr>
<td valign="top" width="25%">
<p>Edit...</p>
</td>
<td valign="top">
<p>Shows a dialog which displays the settings stored in the active profile. Only user-defined profiles can be modified.</p>
</td>
</tr>
<tr>
<td valign="top" width="25%">
<p>Remove</p>
</td>
<td valign="top">
<p>Removes the selected profile. This action is only available on user-defined profiles.</p>
</td>
</tr>
<tr>
<td valign="top" width="25%">
<p>Import...</p>
</td>
<td valign="top">
<p>Imports profiles from the file system.</p>
</td>
</tr>
</tbody>
</table>
<p><img border="0" src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21"> <br>
<a href="../concepts/cdt_o_code_entry.htm">Coding aids</a></p>
<p><img border="0" src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21">
<br>
<a href="../tasks/cdt_t_cust_cpp_editor.htm">Customizing the C/C++ editor</a><br>
<p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21">
<br>
<a href="cdt_o_ceditor_pref.htm">C/C++ editor preferences</a></p>
<img src="../images/ng00_07.gif" ALT="IBM Copyright Statement" >
</body>
</html>

View file

@ -1,33 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Navigation preferences</title>
<link rel="stylesheet" type="text/css" href="../help.css">
</head>
<body>
<h1>Navigation preferences</h1>
<p>Enable the editor hyperlink navigation and then you can use <b>Ctrl+click</b> to jump to the declaration of an item on the C/C++ editor</p>
<p><img src="../images/editor_navigation_preferences.png" alt="Editor Navigation Preferences Dialog Box"></p>
<dl>
<dt>Enable Hyperlink Navigation</dt>
<dd>Select this checkbox to support hyperlink style navigation for Open Declaration.</dd>
</dl>
<p><img border="0" src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21"> <br>
<a href="../concepts/cdt_o_code_entry.htm">Coding aids</a></p>
<p><img border="0" src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21">
<br>
<a href="../tasks/cdt_t_cust_cpp_editor.htm">Customizing the C/C++ editor</a></p>
<p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21">
<br>
<a href="cdt_o_ceditor_pref.htm">C/C++ editor preferences</a></p>
<img src="../images/ng00_04a.gif" ALT="IBM Copyright Statement" >
</body>
</html>

View file

@ -11,7 +11,7 @@
<h1>Typing preferences</h1>
<p>Use the <b>Typing</b> preference panel to assist in formatting input as you type. Click <b>Window &gt; Preferences &gt; C/C++ &gt; Typing</b> to make changes.</p>
<p>Use the <b>Typing</b> preference panel to assist in formatting input as you type. Click <b>Window &gt; Preferences &gt; C/C++ &gt; Editor &gt; Typing</b> to make changes.</p>
<img src="../images/editor_typing_preferences.png" alt="Typing Preferences">
<table width="600px" cellpadding="5" cellspacing="0" border="1" >
<caption><b>Typing Preference Options</b></caption>
@ -64,7 +64,8 @@
<p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21">
<br>
<a href="cdt_o_ceditor_pref.htm">C/C++ editor preferences</a></p>
<img src="../images/ng00_04a.gif" ALT="IBM Copyright Statement" >
<a href="cdt_u_c_code_style_pref.htm">Code Style preferences</a></p>
<img src="../images/ng00_07.gif" ALT="IBM Copyright Statement" >
</body>

View file

@ -37,7 +37,7 @@
<dd>Preferences for customize the appearance of the Build Console view.</dd>
<dt>CDT build variables</dt>
<dd>Displays a list of build variables (ex-build macros) available in CDT.</dd>
<dt>Code style</dt>
<dt>Code Style</dt>
<dd>Defines default code style. You can select one of existing profiles or set your own style.</dd>
<dt>Debug</dt>
<dd>Preferences for customizing the C/C++ debugger.</dd>

View file

@ -58,8 +58,11 @@
<topic label="Source Code Locations preferences" href="reference/cdt_u_dbg_src.htm"/>
</topic>
<topic label="Code Style preferences" href="reference/cdt_u_c_code_style_pref.htm">
</topic>
<topic label="C/C++ Editor preferences" href="reference/cdt_o_ceditor_pref.htm">
<topic label="Editor preferences" href="reference/cdt_u_c_editor_gen.htm"/>
<topic label="General preferences" href="reference/cdt_u_c_editor_gen.htm"/>
<topic label="Content Assist preferences" href="reference/cdt_u_c_editor_con_assist.htm" >
<topic label="Advanced preferences" href="reference/cdt_u_c_editor_con_assist_adv.htm"/>
</topic>