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 c06f6b3ac73..91b8cc601d6 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 @@ -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$; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/NewSourceFileCreationWizardPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/NewSourceFileCreationWizardPage.java index adaf9d83993..acad524dc4b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/NewSourceFileCreationWizardPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/NewSourceFileCreationWizardPage.java @@ -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 diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/conversion/ConvertProjectWizardPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/conversion/ConvertProjectWizardPage.java index b907927fcc9..ff8b9ab3d71 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/conversion/ConvertProjectWizardPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/conversion/ConvertProjectWizardPage.java @@ -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); } /** diff --git a/doc/org.eclipse.cdt.doc.user/contexts_CDT.xml b/doc/org.eclipse.cdt.doc.user/contexts_CDT.xml index 3a0864e8145..e8f9cc1317f 100644 --- a/doc/org.eclipse.cdt.doc.user/contexts_CDT.xml +++ b/doc/org.eclipse.cdt.doc.user/contexts_CDT.xml @@ -519,4 +519,11 @@ This view displays include file relationships. + + This wizard converts a project to a C/C++ project. + + + + + diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_creating_cpp_file.html b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_creating_cpp_file.html new file mode 100644 index 00000000000..bb11d85c41b --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_creating_cpp_file.html @@ -0,0 +1,66 @@ + + + + + + Creating your C++ file + + + +

Creating your C++ file

+ +

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 + Creating a remote project.

+ +

Files are edited in the Remote C/C++ Editor located to the right of + the Project Explorer view. The left margin of the Remote C/C++ Editor, called the marker + bar, displays icons for items such as bookmarks, breakpoints, and compiler errors and warnings.

+ +

For more information about:

+ + +

To create a C++ file:

+
    +
  1. In the Project Explorer view, right-click a project, and + select New > File > Other.
    + New > File > Other in Projects View
  2. +
  3. Select Source file under C++.
    + New Source file in New Wizard Dialog
  4. +
  5. In the Source File box, type a name followed by the + appropriate extension. Select a template.
  6. +
  7. Click Finish.
    + New Source File Wizard
  8. +

    The file will open in the Remote C/C++ editor.

    +
  9. Enter your code in the editor view.
    + Editor view with a sample code
  10. +
  11. Type CTRL+S to save the file.
  12. +
+ +

Your new .cpp file is displayed in the Project Explorer view. Before you + can build your newly created project, you must create a makefile. + See Creating your makefile.

+ +
+ + Related tasks +
+ Creating a C/C++ file +
+ + Related reference +
+ Remote C/C++ Editor +
+
+ + + diff --git a/doc/org.eclipse.cdt.doc.user/images/create_c_file_01.png b/doc/org.eclipse.cdt.doc.user/images/create_c_file_01.png new file mode 100644 index 00000000000..35f7b0b352d Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/create_c_file_01.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/create_c_file_02.png b/doc/org.eclipse.cdt.doc.user/images/create_c_file_02.png new file mode 100644 index 00000000000..cee805a459b Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/create_c_file_02.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/create_c_file_03.png b/doc/org.eclipse.cdt.doc.user/images/create_c_file_03.png new file mode 100644 index 00000000000..421b6d7c913 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/create_c_file_03.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/create_c_file_04.png b/doc/org.eclipse.cdt.doc.user/images/create_c_file_04.png new file mode 100644 index 00000000000..24379cb6063 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/create_c_file_04.png differ