1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Fix help context issues related to bugs 317992 and 310375

This commit is contained in:
Anton Leherbauer 2010-11-22 10:26:26 +00:00
parent ef6bc84321
commit 98a4695397
10 changed files with 89 additions and 40 deletions

View file

@ -12,6 +12,7 @@
package org.eclipse.cdt.make.internal.ui.preferences;
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
import org.eclipse.cdt.make.ui.IMakeHelpContextIds;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
@ -19,6 +20,7 @@ import org.eclipse.jface.preference.RadioGroupFieldEditor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.PlatformUI;
public class MakePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
@ -37,6 +39,12 @@ public class MakePreferencePage extends FieldEditorPreferencePage implements IWo
setPreferenceStore(MakeUIPlugin.getDefault().getPreferenceStore());
}
@Override
public void createControl(Composite parent) {
super.createControl(parent);
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IMakeHelpContextIds.MAKE_TARGETS_PREFERENCE_PAGE);
}
/**
* @see FieldEditorPreferencePage#createControl(Composite)
*/

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2002, 2009 QNX Software Systems and others.
* Copyright (c) 2002, 2010 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
@ -13,6 +13,7 @@
package org.eclipse.cdt.make.internal.ui.preferences;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.make.ui.IMakeHelpContextIds;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
@ -21,6 +22,7 @@ import org.eclipse.jface.preference.RadioGroupFieldEditor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.preferences.ScopedPreferenceStore;
/**
@ -39,6 +41,12 @@ public class MakefileSettingsPreferencePage extends FieldEditorPreferencePage im
setPreferenceStore(store);
}
@Override
public void createControl(Composite parent) {
super.createControl(parent);
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IMakeHelpContextIds.MAKE_SETTINGS_PREFERENCE_PAGE);
}
/**
* @see FieldEditorPreferencePage#createControl(Composite)
*/

View file

@ -39,5 +39,13 @@ public interface IMakeHelpContextIds {
public static final String MAKE_PREF_BINARY_PARSER = PREFIX + "newproj_parser_binary"; //$NON-NLS-1$
public static final String MAKE_EDITOR_PREFERENCE_PAGE = PREFIX + "make_editor_pref"; //$NON-NLS-1$
/**
* @since 7.1
*/
public static final String MAKE_TARGETS_PREFERENCE_PAGE = PREFIX + "make_targets_pref"; //$NON-NLS-1$
/**
* @since 7.1
*/
public static final String MAKE_SETTINGS_PREFERENCE_PAGE = PREFIX + "make_settings_pref"; //$NON-NLS-1$
}

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006, 2009 IBM Corporation and others.
* Copyright (c) 2006, 2010 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
@ -41,13 +41,11 @@ public interface ICHelpContextIds {
public static final String FILTER_STATIC_ACTION= PREFIX + "filter_static_action"; //$NON-NLS-1$
public static final String FILTER_LOCALTYPES_ACTION= PREFIX + "filter_localtypes_action"; //$NON-NLS-1$
public static final String NEXT_CHANGE_ACTION= PREFIX + "next_change_action"; //$NON-NLS-1$
public static final String PREVIOUS_CHANGE_ACTION=PREFIX + "previous_change_action"; //$NON-NLS-1$
public static final String NEXT_PROBLEM_ACTION= PREFIX + "next_problem_action"; //$NON-NLS-1$
public static final String PREVIOUS_PROBLEM_ACTION= PREFIX + "previous_problem_action"; //$NON-NLS-1$
public static final String GOTO_NEXT_ERROR_ACTION= PREFIX + "goto_next_error_action"; //$NON-NLS-1$
public static final String GOTO_PREVIOUS_ERROR_ACTION= PREFIX + "goto_previous_error_action"; //$NON-NLS-1$
public static final String TOGGLE_MARK_OCCURRENCES_ACTION= PREFIX + "toggle_mark_occurrences_action_context"; //$NON-NLS-1$
public static final String FORMAT_ALL= PREFIX + "format_all_action"; //$NON-NLS-1$
public static final String GOTO_MATCHING_BRACKET_ACTION= PREFIX + "goto_matching_bracket_action"; //$NON-NLS-1$
// Preference/property pages
public static final String C_PREF_PAGE = PREFIX + "c_pref"; //$NON-NLS-1$
@ -64,7 +62,9 @@ public interface ICHelpContextIds {
public static final String LAUNCH_PROPERTY_PAGE = PREFIX + "new_launch_property_page_context"; //$NON-NLS-1$
public static final String PROJECT_PROPERTY_PAGE = PREFIX + "new_project_property_page_context"; //$NON-NLS-1$
public static final String CODEFORMATTER_PREFERENCE_PAGE = PREFIX + "codeformatter_preference_page_context"; //$NON-NLS-1$
public static final String GOTO_MATCHING_BRACKET_ACTION= PREFIX + "goto_matching_bracket_action"; //$NON-NLS-1$Object[] FORMAT_ALL= null;
public static final String INDEXER_PREFERENCE_PAGE = PREFIX + "indexer_preference_page"; //$NON-NLS-1$
public static final String LANGUAGE_MAPPING_PREFERENCE_PAGE = PREFIX + "language_mapping_preference_page"; //$NON-NLS-1$
public static final String BUILD_CONSOLE_PREFERENCE_PAGE = PREFIX + "build_console_preference_page"; //$NON-NLS-1$
public static final String PROJ_CONF_BLOCK = PREFIX + "new_proj_conf_block_context"; //$NON-NLS-1$
@ -119,10 +119,6 @@ public interface ICHelpContextIds {
public static final String RENAME_FIELD_WIZARD_PAGE= PREFIX + "rename_field_wizard_page_context"; //$NON-NLS-1$
public static final String RENAME_RESOURCE_WIZARD_PAGE= PREFIX + "rename_resource_wizard_page_context"; //$NON-NLS-1$
public static final String EDIT_WORKING_SET_ACTION= PREFIX + "edit_working_set_action"; //$NON-NLS-1$
public static final String CLEAR_WORKING_SET_ACTION= PREFIX + "clear_working_set_action"; //$NON-NLS-1$
public static final String SELECT_WORKING_SET_ACTION= PREFIX + "select_working_set_action"; //$NON-NLS-1$
// Dialogs
public static final String EDIT_TEMPLATE_DIALOG = PREFIX + "edit_template_dialog_context"; //$NON-NLS-1$
public static final String OPEN_ELEMENT_DIALOG = PREFIX + "open_element_dialog_context"; //$NON-NLS-1$

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 IBM Corporation and others.
* Copyright (c) 2007, 2010 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
@ -23,6 +23,7 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.PlatformUI;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.CCorePreferenceConstants;
@ -33,6 +34,7 @@ import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.internal.core.language.LanguageMappingStore;
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
import org.eclipse.cdt.internal.ui.preferences.PreferencesMessages;
import org.eclipse.cdt.internal.ui.util.Messages;
@ -45,6 +47,12 @@ public class WorkspaceLanguageMappingPreferencePage extends PreferencePage imple
fMappingWidget = new WorkspaceLanguageMappingWidget();
}
@Override
public void createControl(Composite parent) {
super.createControl(parent);
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), ICHelpContextIds.LANGUAGE_MAPPING_PREFERENCE_PAGE);
}
@Override
protected Control createContents(Composite parent) {
try {

View file

@ -12,6 +12,9 @@
package org.eclipse.cdt.internal.ui.preferences;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.ColorFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
@ -25,6 +28,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.PlatformUI;
public class BuildConsolePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
@ -51,6 +55,12 @@ public class BuildConsolePreferencePage extends FieldEditorPreferencePage implem
setPreferenceStore(CUIPlugin.getDefault().getPreferenceStore());
}
@Override
public void createControl(Composite parent) {
super.createControl(parent);
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), ICHelpContextIds.BUILD_CONSOLE_PREFERENCE_PAGE);
}
@Override
protected void createFieldEditors() {
Composite parent = getFieldEditorParent();

View file

@ -31,6 +31,8 @@ import org.eclipse.cdt.ui.dialogs.CacheSizeBlock;
import org.eclipse.cdt.ui.dialogs.ICOptionContainer;
import org.eclipse.cdt.ui.dialogs.IndexerBlock;
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
public class IndexerPreferencePage extends PreferencePage implements
IWorkbenchPreferencePage, ICOptionContainer {
// bug 217860, allow to hide build configuration
@ -47,6 +49,12 @@ public class IndexerPreferencePage extends PreferencePage implements
fCacheBlock= new CacheSizeBlock(this);
}
@Override
public void createControl(Composite parent) {
super.createControl(parent);
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), ICHelpContextIds.INDEXER_PREFERENCE_PAGE);
}
@Override
protected Control createContents(Composite parent) {
GridLayout gl;

View file

@ -5,7 +5,6 @@
<!--
PLUGINS LINKED TO THESE HELP CONTEXT IDs
plugin="org.eclipse.cdt.ui"
plugin="org.eclipse.ui"
-->
<context id ="projects_view">
@ -370,6 +369,10 @@
<context id="toggle_mark_occurrences_action_context">
<description>Allows you to switch mark occurrences on and off.</description>
</context>
<context id="format_all_action">
<description>This command formats selected C/C++ source files.</description>
</context>
<context id="appearance_preference_page_context">
<description>Customize the appearance of C/C++ elements in viewers.</description>
<topic label="Appearance Preferences" href="reference/cdt_u_appearance_pref.htm"/>
@ -546,17 +549,21 @@
<description>The Project Explorer displays project information.</description>
<topic href="reference/cdt_u_project_explorer_view.htm" label="Project Explorer view"/>
</context>
<!-- this contributes to platform's outline view context, see bug 317992
<context id="content_outline_context" title="Outline">
<topic href="reference/cdt_u_outline_view.htm" label="Outline view"/>
</context>
-->
<!-- USING ECLIPSE HELP CONTEXT IDs -->
<context id="preference_dialog_context" title="Outline">
<topic href="reference/cdt_u_console_pref.htm" label="C/C++ Console preferences"/>
<context id="indexer_preference_page" title="Indexer">
<description>Configure the C/C++ Indexer.</description>
<topic href="reference/cdt_u_indexer_preference.html" label="C/C++ Indexer preferences"/>
<topic href="reference/cdt_u_language_mapping_pref.htm" label="C/C++ Language Mapping preferences"/>
<topic href="reference/cdt_u_make_pref.htm" label="C/C++ Make Targets preferences"/>
<topic href="reference/cdt_u_make_settings_pref.htm" label="C/C++ Make Settings preferences"/>
</context>
<context id="language_mapping_preference_page" title="Language Mappings">
<description>Customize the use of C/C++ language associations for the workspace.</description>
<topic href="reference/cdt_u_language_mapping_pref.htm" label="C/C++ Language Mapping preferences"/>
</context>
<context id="build_console_preference_page" title="Build Console">
<description>Customize the appearance of messages that appear in the Build Console.</description>
<topic href="reference/cdt_u_console_pref.htm" label="C/C++ Console preferences"/>
</context>
</contexts>

View file

@ -103,5 +103,20 @@
<topic href="reference/cdt_u_newproj_parser_binary.htm"
label="Binary Parser"/>
</context>
<context id ="make_editor_pref">
<description>Click below to see help.</description>
<topic href="reference/cdt_u_makefile_settings_pref.htm"
label="Makefile Editor preferences"/>
</context>
<context id ="make_targets_pref">
<description>Click below to see help.</description>
<topic href="reference/cdt_u_make_pref.htm"
label="Make Targets preferences"/>
</context>
<context id ="make_settings_pref">
<description>Click below to see help.</description>
<topic href="reference/cdt_u_make_settings_pref.htm"
label="Make Settings preferences"/>
</context>
</contexts>

View file

@ -43,13 +43,6 @@
file="contexts_CDT.xml"
plugin="org.eclipse.cdt.ui">
</contexts>
<contexts
file="contexts_CDT.xml"
plugin="org.eclipse.ui">
</contexts>
</extension>
<extension
point="org.eclipse.help.contexts">
<contexts
file="contexts_CDT_DEBUGGER.xml"
plugin="org.eclipse.cdt.debug.ui">
@ -62,30 +55,18 @@
file="contexts_CDT_DEBUGGER.xml"
plugin="org.eclipse.ui.console">
</contexts>
</extension>
<extension
point="org.eclipse.help.contexts">
<contexts
file="contexts_CDT_DEBUGGER_MI.xml"
plugin="org.eclipse.cdt.debug.mi.ui">
</contexts>
</extension>
<extension
point="org.eclipse.help.contexts">
<contexts
file="contexts_CDT_make.xml"
plugin="org.eclipse.cdt.make.ui">
</contexts>
</extension>
<extension
point="org.eclipse.help.contexts">
<contexts
file="contexts_CDT_LAUNCH.xml"
plugin="org.eclipse.cdt.launch">
</contexts>
</extension>
<extension
point="org.eclipse.help.contexts">
<contexts
file="contexts_CDT_DEBUGGER_DSFGDB.xml"
plugin="org.eclipse.cdt.dsf.gdb.ui">