1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 16:56:04 +02:00

Bug #187112 : "Command line pattern" changes not shown in UI

This commit is contained in:
Oleg Krasilnikov 2007-05-16 12:51:47 +00:00
parent 9c26fd0055
commit 0f535611ee
4 changed files with 13 additions and 20 deletions

View file

@ -150,29 +150,20 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
gd.minimumWidth = Dialog.convertWidthInCharsToPixels(fm, 20);
addField(allOptionFieldEditor);
// Create the Advanced Settings group
createAdvancedSettingsGroup(fm);
}
/* (non-Javadoc)
* Creates the group that contains the build artifact name controls.
*/
private void createAdvancedSettingsGroup(FontMetrics fm) {
addField( createLabelEditor( getFieldEditorParent(), WHITESPACE ) );
addField( createLabelEditor( getFieldEditorParent(), UIMessages.getString(ADVANCED_GROUP) ) );
// Add a string editor to edit the tool command line pattern
Composite parent = getFieldEditorParent();
commandLinePatternField = new StringFieldEditor(ToolSettingsPrefStore.COMMAND_LINE_PATTERN_ID,
parent = getFieldEditorParent();
commandLinePatternField = new StringFieldEditor(fTool.getId() + ToolSettingsPrefStore.COMMAND_LINE_SUFFIX,
UIMessages.getString(COMMAND_LINE_PATTERN),
parent);
GridData gd = ((GridData)commandLinePatternField.getTextControl(parent).getLayoutData());
gd = ((GridData)commandLinePatternField.getTextControl(parent).getLayoutData());
gd.grabExcessHorizontalSpace = true;
gd.widthHint = Dialog.convertWidthInCharsToPixels(fm,30);
gd.minimumWidth = Dialog.convertWidthInCharsToPixels(fm, 20);
addField(commandLinePatternField);
}
}
protected FieldEditor createLabelEditor( Composite parent, String title ) {
return new LabelFieldEditor( parent, title );

View file

@ -41,7 +41,7 @@ public class ToolSettingsPrefStore implements IPreferenceStore {
static ToolSettingsPrefStore store = null;
public final static String ALL_OPTIONS_ID = EMPTY_STRING;
public final static String COMMAND_LINE_PATTERN_ID = Messages.getString("ToolSettingsPrefStore.0"); //$NON-NLS-1$
public final static String COMMAND_LINE_SUFFIX = "org.eclipse.commandLinePatternId"; //$NON-NLS-1$
private IResourceInfo rcInfo = null;
private IOptionCategory optCategory;
private ToolListElement selectedElement;
@ -88,7 +88,7 @@ public class ToolSettingsPrefStore implements IPreferenceStore {
if(optCategory instanceof Tool){
if(optCategory.getId().equals(name))
return true;
else if(COMMAND_LINE_PATTERN_ID.equals(name))
else if((optCategory.getId() + COMMAND_LINE_SUFFIX).equals(name))
return true;
else if(ALL_OPTIONS_ID.equals(name))
return true;
@ -143,7 +143,7 @@ public class ToolSettingsPrefStore implements IPreferenceStore {
if(optCategory instanceof Tool){
if(optCategory.getId().equals(name))
return ((Tool)optCategory).getToolCommand();
else if(COMMAND_LINE_PATTERN_ID.equals(name))
else if((optCategory.getId() + COMMAND_LINE_SUFFIX).equals(name))
return ((Tool)optCategory).getCommandLinePattern();
else if(ALL_OPTIONS_ID.equals(name)){
try {
@ -243,7 +243,7 @@ public class ToolSettingsPrefStore implements IPreferenceStore {
if(optCategory instanceof Tool){
if(optCategory.getId().equals(name))
((Tool)optCategory).setToolCommand(value);
else if (COMMAND_LINE_PATTERN_ID.equals(name))
else if ((optCategory.getId() + COMMAND_LINE_SUFFIX).equals(name))
((Tool)optCategory).setCommandLinePattern(value);
} else
setOptionValue(name,value);

View file

@ -46,7 +46,6 @@ ToolSelectionDialog.8=Tool does not support managed build \!
ToolSelectionDialog.9=Props not defined \!
ToolSelectionDialog.10=Props not supported \!
ToolSelectionDialog.11=Req. props not supported \!
ToolSettingsPrefStore.0=org.eclipse.commandLinePatternId
ToolChainEditTab.0=Display compatible toolchains only
ToolChainEditTab.1=Current toolchain
ToolChainEditTab.2=Current builder

View file

@ -378,9 +378,12 @@ implements
cfgChanged(multiCfgs[0]);
return;
} else {
ICConfigurationDescription newConfig = cfgDescs[selectionIndex];
String id1 = getResDesc() == null ? null : getResDesc().getId();
cfgIndex = selectionIndex;
cfgChanged(newConfig);
ICConfigurationDescription newConfig = cfgDescs[selectionIndex];
String id2 = newConfig.getId();
if (id2 != null && !id2.equals(id1))
cfgChanged(newConfig);
}
}