Skip to content

Commit 2c82545

Browse files
Improve CMake Build Settings labels - fixes #1120 (#1163)
The "Build all target" label was renamed to "Build target" to better reflect what the control does. Also added tooltips to the tab's controls.
1 parent 9b6fded commit 2c82545

File tree

3 files changed

+28
-7
lines changed

3 files changed

+28
-7
lines changed

cmake/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/CMakeBuildTab.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ public void widgetSelected(SelectionEvent e) {
9090

9191
generatorLabel = new Label(cmakeGroup, SWT.NONE);
9292
generatorLabel.setText(Messages.CMakeBuildTab_Generator);
93-
93+
generatorLabel.setToolTipText(Messages.CMakeBuildTab_GeneratorTooltip);
9494
CMakeGenerator[] generators = CMakeGenerator.values();
9595
String[] generatorNames = Arrays.stream(generators).map(CMakeGenerator::getCMakeName).toArray(String[]::new);
9696
generatorCombo = new Combo(cmakeGroup, SWT.DROP_DOWN);
97+
generatorCombo.setToolTipText(Messages.CMakeBuildTab_GeneratorComboTooltip);
9798
generatorCombo.setItems(generatorNames);
9899
generatorCombo.select(0);
99100
generatorCombo.addModifyListener(e -> updateLaunchConfigurationDialog());
@@ -106,29 +107,37 @@ public void widgetSelected(SelectionEvent e) {
106107

107108
cmakeArgsLabel = new Label(cmakeGroup, SWT.NONE);
108109
cmakeArgsLabel.setText(Messages.CMakeBuildTab_CMakeArgs);
110+
cmakeArgsLabel.setToolTipText(Messages.CMakeBuildTab_cmakeArgsTooltip);
109111

110112
cmakeArgsText = new Text(cmakeGroup, SWT.BORDER);
113+
cmakeArgsText.setToolTipText(Messages.CMakeBuildTab_cmakeArgsTooltip);
111114
cmakeArgsText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
112115
cmakeArgsText.addModifyListener(e -> updateLaunchConfigurationDialog());
113116

114117
buildCommandLabel = new Label(cmakeGroup, SWT.NONE);
115118
buildCommandLabel.setText(Messages.CMakeBuildTab_BuildCommand);
119+
buildCommandLabel.setToolTipText(Messages.CMakeBuildTab_buildCommandTooltip);
116120

117121
buildCommandText = new Text(cmakeGroup, SWT.BORDER);
122+
buildCommandText.setToolTipText(Messages.CMakeBuildTab_buildCommandTooltip);
118123
buildCommandText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
119124
buildCommandText.addModifyListener(e -> updateLaunchConfigurationDialog());
120125

121126
allTargetLabel = new Label(cmakeGroup, SWT.NONE);
122127
allTargetLabel.setText(Messages.CMakeBuildTab_AllTarget);
128+
allTargetLabel.setToolTipText(Messages.CMakeBuildTab_allTargetTooltip);
123129

124130
allTargetText = new Text(cmakeGroup, SWT.BORDER);
131+
allTargetText.setToolTipText(Messages.CMakeBuildTab_allTargetTooltip);
125132
allTargetText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
126133
allTargetText.addModifyListener(e -> updateLaunchConfigurationDialog());
127134

128135
cleanTargetLabel = new Label(cmakeGroup, SWT.NONE);
129136
cleanTargetLabel.setText(Messages.CMakeBuildTab_CleanTarget);
137+
cleanTargetLabel.setToolTipText(Messages.CMakeBuildTab_cleanTargetTooltip);
130138

131139
cleanTargetText = new Text(cmakeGroup, SWT.BORDER);
140+
cleanTargetText.setToolTipText(Messages.CMakeBuildTab_cleanTargetTooltip);
132141
cleanTargetText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
133142
cleanTargetText.addModifyListener(e -> updateLaunchConfigurationDialog());
134143

cmake/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/Messages.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,16 @@ public class Messages extends NLS {
1919
public static String CMakeBuildTab_BuildType_Tooltip;
2020
public static String CMakeBuildTab_BuildTypeCombo_Tooltip;
2121
public static String CMakeBuildTab_AllTarget;
22+
public static String CMakeBuildTab_allTargetTooltip;
23+
public static String CMakeBuildTab_buildCommandTooltip;
2224
public static String CMakeBuildTab_CleanTarget;
2325
public static String CMakeBuildTab_Cmake;
2426
public static String CMakeBuildTab_CMakeArgs;
27+
public static String CMakeBuildTab_cleanTargetTooltip;
28+
public static String CMakeBuildTab_cmakeArgsTooltip;
2529
public static String CMakeBuildTab_Generator;
30+
public static String CMakeBuildTab_GeneratorComboTooltip;
31+
public static String CMakeBuildTab_GeneratorTooltip;
2632
public static String CMakeBuildTab_NoneAvailable;
2733
public static String CMakeBuildTab_Settings;
2834
public static String CMakeBuildTab_Toolchain;

cmake/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/messages.properties

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
CMakeBuildTab_BuildCommand=Build command
1+
CMakeBuildTab_BuildCommand=Build command:
22
CMakeBuildTab_BuildType=Build type:
3-
CMakeBuildTab_BuildType_Tooltip=The build type (CMAKE_BUILD_TYPE) used by the generator.
4-
CMakeBuildTab_BuildTypeCombo_Tooltip=Typical build types (CMAKE_BUILD_TYPE) are listed. A custom build type can be entered.
5-
CMakeBuildTab_AllTarget=Build all target
6-
CMakeBuildTab_CleanTarget=Clean target
3+
CMakeBuildTab_BuildType_Tooltip=The build type (CMAKE_BUILD_TYPE) used by the generator
4+
CMakeBuildTab_BuildTypeCombo_Tooltip=Typical build types (CMAKE_BUILD_TYPE) are listed. A custom build type can be entered
5+
CMakeBuildTab_AllTarget=Build target:
6+
CMakeBuildTab_allTargetTooltip=Target to pass to --target CMake command line option, when user performs a project build
7+
CMakeBuildTab_buildCommandTooltip=The CMake executable to use. Maybe an absolute path to use a specific version
8+
CMakeBuildTab_CleanTarget=Clean target:
9+
CMakeBuildTab_cleanTargetTooltip=Target to pass to --target CMake command line option, when user performs a project clean
10+
CMakeBuildTab_cmakeArgsTooltip=-D <var>=<value> defines the value of a cache variable. Space separate multiple values
711
CMakeBuildTab_Cmake=CMake
812
CMakeBuildTab_CMakeArgs=Additional CMake arguments:
9-
CMakeBuildTab_Generator=Generator
13+
CMakeBuildTab_Generator=Generator:
14+
CMakeBuildTab_GeneratorComboTooltip=The kind of buildsystem to generate (-G). A custom generator can be entered
15+
CMakeBuildTab_GeneratorTooltip=The kind of buildsystem to generate (-G)
1016
CMakeBuildTab_NoneAvailable=No Toolchains Available for this Target
1117
CMakeBuildTab_Settings=CMake Settings
1218
CMakeBuildTab_Toolchain=Toolchain

0 commit comments

Comments
 (0)