1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-03 22:35:43 +02:00

bug 189228 - fix by Michael Berger

This commit is contained in:
Vivian Kong 2009-05-21 13:56:38 +00:00
parent 1d1820c83b
commit eee2636999
9 changed files with 87 additions and 5 deletions

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006, 2008 IBM Corporation and others.
* Copyright (c) 2006, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -31,7 +31,8 @@ public interface ICHelpContextIds {
public static final String NEW_SRCFLDER_WIZARD_PAGE = PREFIX + "new_srcfldr_wizard_page_context"; //$NON-NLS-1$
public static final String OPEN_CLASS_WIZARD_ACTION = PREFIX + "open_class_wizard_action"; //$NON-NLS-1$
public static final String OPEN_PROJECT_WIZARD_ACTION = PREFIX + "open_project_wizard_action"; //$NON-NLS-1$
public static final String CONVERT_TO_CCPP_WIZARD_PAGE = PREFIX + "cdt_t_conv_proj_context"; //$NON-NLS-1$
public static final String NEW_C_FILE_WIZARD_PAGE = PREFIX + "cdt_creating_cpp_file_context"; //$NON-NLS-1$
// Actions
public static final String ADD_INCLUDE_ON_SELECTION_ACTION = PREFIX + "add_includes_on_selection_action_context"; //$NON-NLS-1$;

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2004, 2007 QNX Software Systems and others.
* Copyright (c) 2004, 2009 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -9,6 +9,7 @@
* QNX Software Systems - initial API and implementation
* Anton Leherbauer (Wind River Systems)
* Sergey Prigogin (Google)
* IBM Corporation
*******************************************************************************/
package org.eclipse.cdt.internal.ui.wizards.filewizard;
@ -25,6 +26,7 @@ import org.eclipse.jface.text.templates.Template;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;
import org.eclipse.cdt.core.CConventions;
import org.eclipse.cdt.core.CCorePlugin;
@ -35,6 +37,7 @@ import org.eclipse.cdt.ui.CodeGeneration;
import org.eclipse.cdt.internal.core.model.CProject;
import org.eclipse.cdt.internal.corext.codemanipulation.StubUtility;
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
@ -81,6 +84,7 @@ public class NewSourceFileCreationWizardPage extends AbstractFileCreationWizardP
Text textControl = fNewFileDialogField.getTextControl(null);
LayoutUtil.setWidthHint(textControl, getMaxFieldWidth());
textControl.addFocusListener(new StatusFocusListener(NEW_FILE_ID));
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent.getParent(), ICHelpContextIds.NEW_C_FILE_WIZARD_PAGE);
}
@Override

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2008 QNX Software Systems and others.
* Copyright (c) 2000, 2009 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -46,6 +46,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
@ -54,9 +55,11 @@ import org.eclipse.cdt.core.CCProjectNature;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.CProjectNature;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.newui.CDTHelpContextIds;
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
import org.eclipse.cdt.internal.ui.CUIMessages;
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
import org.eclipse.cdt.internal.ui.util.SWTUtil;
@ -89,7 +92,7 @@ public abstract class ConvertProjectWizardPage
protected Button cRadioButton;
protected Button ccRadioButton;
// The Main widget containing the table and its list of condidate open projects
// The Main widget containing the table and its list of candidate open projects
protected CheckboxTableViewer tableViewer;
protected Button selectAllButton;
@ -141,6 +144,7 @@ public abstract class ConvertProjectWizardPage
addToMainPage(container);
// will default to false until a selection is made
setPageComplete(validatePage());
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), ICHelpContextIds.CONVERT_TO_CCPP_WIZARD_PAGE);
}
/**

View file

@ -519,4 +519,11 @@
<description>This view displays include file relationships.</description>
<topic label="Include Browser view" href="reference/cdt_u_include_browser_view.htm"/>
</context>
<context id="cdt_t_conv_proj_context" title="Converting a C or C++ nature for a project">
<description>This wizard converts a project to a C/C++ project.</description>
<topic href="tasks/cdt_t_conv_proj.htm" label="Converting a C or C++ nature for a project"/>
</context>
<context id="cdt_creating_cpp_file_context" title="Creating your C++ file">
<topic href="getting_started/cdt_w_creating_cpp_file.html" label="Creating your C++ file"/>
</context>
</contexts>

View file

@ -0,0 +1,66 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="../../help.css">
<title>Creating your C++ file</title>
</head>
<body>
<h1>Creating your C++ file</h1>
<p>Once you have created a new remote C/C++ project, you can begin coding your program.
The .cpp file that you create will be saved in the project folder you just created in
<a href="creating_a_remote_project.html">Creating a remote project</a>.</p>
<p>Files are edited in the <b>Remote C/C++ Editor</b> located to the right of
the <b>Project Explorer</b> view. The left margin of the <b>Remote C/C++ Editor</b>, called the marker
bar, displays icons for items such as bookmarks, breakpoints, and compiler errors and warnings.</p>
<p>For more information about:</p>
<ul>
<li>The marker bar, see <b>Workbench User Guide &gt; Reference &gt; User interface
information &gt; Icons and buttons &gt; Editor area marker bar</b></li>
<li>The editor area, see <b>Workbench User Guide &gt; Reference &gt; User interface
information &gt; Views and editors &gt; Editor area</b></li>
</ul>
<p>To create a C++ file:</p>
<ol>
<li>In the <b>Project Explorer</b> view, right-click a project, and
select <b>New &gt; File &gt; Other</b>.<br>
<img src="../images/create_c_file_01.png"
alt="New &gt; File &gt; Other in Projects View"></li>
<li>Select <b>Source file</b> under <b>C++</b>.<br>
<img src="../images/create_c_file_02.png"
alt="New Source file in New Wizard Dialog"></li>
<li>In the <b>Source File</b> box, type a name followed by the
appropriate extension. Select a template.</li>
<li>Click <b>Finish</b>.<br>
<img src="../images/create_c_file_03.png" alt="New Source File Wizard"></li>
<p>The file will open in the Remote C/C++ editor.</p>
<li>Enter your code in the editor view.<br>
<img src="../images/create_c_file_04.png"
alt="Editor view with a sample code"></li>
<li>Type <b>CTRL+S</b> to save the file.</li>
</ol>
<p>Your new .cpp file is displayed in the <b>Project Explorer</b> view. Before you
can build your newly created project, you must create a makefile.
See <a href="creating_your_makefile.html">Creating your makefile</a>.</p>
<br>
<b>Related tasks</b>
<br>
<a href="../tasks/creating_c_file.html">Creating a C/C++ file</a>
<br>
<b>Related reference</b>
<br>
<a href="../reference/remote_c_editor.html">Remote C/C++ Editor</a>
<br>
<br>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB