1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 08:55:25 +02:00

Bug #178565 - externalization and dialogs resizing.

This commit is contained in:
Oleg Krasilnikov 2007-03-21 16:29:49 +00:00
parent b0a57ff9ae
commit 908817c1a5
43 changed files with 279 additions and 283 deletions

View file

@ -12,7 +12,6 @@ package org.eclipse.cdt.make.ui.dialogs;
import java.io.File;
import org.eclipse.cdt.internal.ui.util.SWTUtil;
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2;
import org.eclipse.cdt.make.internal.core.scannerconfig.jobs.BuildOutputReaderJob;
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
@ -102,8 +101,7 @@ public class GCCPerFileSCDProfilePage extends AbstractDiscoveryPage {
// load button
bopLoadButton = ControlFactory.createPushButton(profileGroup,
MakeUIPlugin.getResourceString(BO_PROVIDER_LOAD_BUTTON));
((GridData) bopLoadButton.getLayoutData()).widthHint =
SWTUtil.getButtonWidthHint(bopLoadButton);
((GridData) bopLoadButton.getLayoutData()).minimumWidth = 120;
bopLoadButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
@ -127,8 +125,7 @@ public class GCCPerFileSCDProfilePage extends AbstractDiscoveryPage {
// browse button
Button browseButton = ControlFactory.createPushButton(profileGroup,
MakeUIPlugin.getResourceString(BO_PROVIDER_BROWSE_BUTTON));
((GridData) browseButton.getLayoutData()).widthHint =
SWTUtil.getButtonWidthHint(browseButton);
((GridData) browseButton.getLayoutData()).minimumWidth = 120;
browseButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
@ -137,7 +134,7 @@ public class GCCPerFileSCDProfilePage extends AbstractDiscoveryPage {
private void handleBOPBrowseButtonSelected() {
FileDialog dialog = new FileDialog(getShell(), SWT.NONE);
dialog.setText(MakeUIPlugin.getResourceString(BO_PROVIDER_OPEN_FILE_DIALOG)); //$NON-NLS-1$
dialog.setText(MakeUIPlugin.getResourceString(BO_PROVIDER_OPEN_FILE_DIALOG));
String fileName = getBopOpenFileText();
IPath filterPath;
if (fileName.length() == 0 && getContainer().getProject() != null) {

View file

@ -12,7 +12,6 @@ package org.eclipse.cdt.make.ui.dialogs;
import java.io.File;
import org.eclipse.cdt.internal.ui.util.SWTUtil;
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2;
import org.eclipse.cdt.make.internal.core.scannerconfig.jobs.BuildOutputReaderJob;
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
@ -114,8 +113,7 @@ public class GCCPerProjectSCDProfilePage extends AbstractDiscoveryPage {
// load button
bopLoadButton = ControlFactory.createPushButton(profileGroup,
MakeUIPlugin.getResourceString(BO_PROVIDER_LOAD_BUTTON));
((GridData) bopLoadButton.getLayoutData()).widthHint =
SWTUtil.getButtonWidthHint(bopLoadButton);
((GridData) bopLoadButton.getLayoutData()).minimumWidth = 120;
bopLoadButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
@ -139,8 +137,7 @@ public class GCCPerProjectSCDProfilePage extends AbstractDiscoveryPage {
// browse button
Button browseButton = ControlFactory.createPushButton(profileGroup,
MakeUIPlugin.getResourceString(BO_PROVIDER_BROWSE_BUTTON));
((GridData) browseButton.getLayoutData()).widthHint =
SWTUtil.getButtonWidthHint(browseButton);
((GridData) browseButton.getLayoutData()).minimumWidth = 120;
browseButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
@ -149,7 +146,7 @@ public class GCCPerProjectSCDProfilePage extends AbstractDiscoveryPage {
private void handleBOPBrowseButtonSelected() {
FileDialog dialog = new FileDialog(getShell(), SWT.NONE);
dialog.setText(MakeUIPlugin.getResourceString(BO_PROVIDER_OPEN_FILE_DIALOG)); //$NON-NLS-1$
dialog.setText(MakeUIPlugin.getResourceString(BO_PROVIDER_OPEN_FILE_DIALOG));
String fileName = getBopOpenFileText();
IPath filterPath;
if (fileName.length() == 0 && getContainer().getProject() != null) {
@ -204,8 +201,7 @@ public class GCCPerProjectSCDProfilePage extends AbstractDiscoveryPage {
// si browse button
Button siBrowseButton = ControlFactory.createPushButton(profileGroup,
MakeUIPlugin.getResourceString(SI_PROVIDER_BROWSE_BUTTON));
((GridData) siBrowseButton.getLayoutData()).widthHint =
SWTUtil.getButtonWidthHint(browseButton);
((GridData) siBrowseButton.getLayoutData()).minimumWidth = 120;
siBrowseButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
@ -214,7 +210,7 @@ public class GCCPerProjectSCDProfilePage extends AbstractDiscoveryPage {
private void handleSIPBrowseButtonSelected() {
FileDialog dialog = new FileDialog(getShell(), SWT.NONE);
dialog.setText(MakeUIPlugin.getResourceString(SI_PROVIDER_COMMAND_DIALOG)); //$NON-NLS-1$
dialog.setText(MakeUIPlugin.getResourceString(SI_PROVIDER_COMMAND_DIALOG));
String fileName = sipRunCommandText.getText().trim();
int lastSeparatorIndex = fileName.lastIndexOf(File.separator);
if (lastSeparatorIndex != -1) {

View file

@ -16,7 +16,7 @@ import org.eclipse.cdt.managedbuilder.core.IProjectType;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIPlugin;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.newui.NewUIMessages;
import org.eclipse.cdt.ui.newui.UIMessages;
import org.eclipse.core.resources.IProject;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
@ -78,22 +78,22 @@ public class ConvertTargetAction
handleConvertTargetAction();
} else {
MessageDialog.openError(shell,"No converter", //$NON-NLS-1$
NewUIMessages.getFormattedString("ProjectConvert.noConverterErrordialog.message", new String[] {getSelectedProject().getName()}) ); //$NON-NLS-1$
UIMessages.getFormattedString("ProjectConvert.noConverterErrordialog.message", new String[] {getSelectedProject().getName()}) ); //$NON-NLS-1$
}
}
private void handleConvertTargetAction() {
Shell shell = ManagedBuilderUIPlugin.getDefault().getShell();
String title = NewUIMessages.getFormattedString(PROJECT_CONVERTER_DIALOG, new String(getSelectedProject().getName()));
String title = UIMessages.getFormattedString(PROJECT_CONVERTER_DIALOG, new String(getSelectedProject().getName()));
ConvertTargetDialog dialog = new ConvertTargetDialog(shell, getSelectedProject(), title);
if ( dialog.open() == ConvertTargetDialog.OK ) {
if ( ConvertTargetDialog.isConversionSuccessful() == false) {
MessageDialog.openError(
shell,
NewUIMessages
.getResourceString("ProjectConvert.conversionErrordialog.title"), //$NON-NLS-1$
NewUIMessages
UIMessages
.getString("ProjectConvert.conversionErrordialog.title"), //$NON-NLS-1$
UIMessages
.getFormattedString(
"ProjectConvert.conversionErrordialog.message", new String[] { getSelectedProject().getName() })); //$NON-NLS-1$
}

View file

@ -18,7 +18,7 @@ import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
import org.eclipse.cdt.managedbuilder.core.IManagedProject;
import org.eclipse.cdt.managedbuilder.core.IProjectType;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.ui.newui.NewUIMessages;
import org.eclipse.cdt.ui.newui.UIMessages;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
@ -124,7 +124,7 @@ public class ConvertTargetDialog extends Dialog {
// Create the converters list group area
final Group convertersListGroup = new Group(comp, SWT.NONE);
convertersListGroup.setFont(parent.getFont());
convertersListGroup.setText(NewUIMessages.getResourceString(CONVERTERS_LIST));
convertersListGroup.setText(UIMessages.getString(CONVERTERS_LIST));
convertersListGroup.setLayout(new GridLayout(1, false));
convertersListGroup.setLayoutData(new GridData(GridData.FILL_BOTH));

View file

@ -23,7 +23,7 @@ import org.eclipse.cdt.managedbuilder.core.IResourceConfiguration;
import org.eclipse.cdt.managedbuilder.core.IResourceInfo;
import org.eclipse.cdt.managedbuilder.core.ITool;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.ui.newui.NewUIMessages;
import org.eclipse.cdt.ui.newui.UIMessages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@ -67,10 +67,10 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
private static final String RCBS_DISABLE = LABEL + ".applicability.rule.disable"; //$NON-NLS-1$
private static final String[] rcbsApplicabilityRules = {
new String(NewUIMessages.getResourceString(RCBS_OVERRIDE)),
new String(UIMessages.getString(RCBS_OVERRIDE)),
// new String(ManagedBuilderUIMessages.getResourceString(RCBS_BEFORE)),
// new String(ManagedBuilderUIMessages.getResourceString(RCBS_AFTER)),
new String(NewUIMessages.getResourceString(RCBS_DISABLE)),
new String(UIMessages.getString(RCBS_DISABLE)),
};
@ -124,7 +124,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
*/
private void createForFile() {
Group g1 = setupGroup (usercomp, Messages.getString("BuildStepsTab.4"), 1, GridData.FILL_HORIZONTAL); //$NON-NLS-1$
setupLabel(g1, NewUIMessages.getResourceString(RCBS_APPLICABILITY), 1, GridData.BEGINNING);
setupLabel(g1, UIMessages.getString(RCBS_APPLICABILITY), 1, GridData.BEGINNING);
combo = new Combo(g1, SWT.BORDER);
combo.setItems(rcbsApplicabilityRules);
@ -315,11 +315,11 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
private int sel2app(int index){
String sel = combo.getItem(index);
if(NewUIMessages.getResourceString(RCBS_OVERRIDE).equals(sel)){
if(UIMessages.getString(RCBS_OVERRIDE).equals(sel)){
return IResourceConfiguration.KIND_APPLY_RCBS_TOOL_AS_OVERRIDE;
} else if(NewUIMessages.getResourceString(RCBS_AFTER).equals(sel)){
} else if(UIMessages.getString(RCBS_AFTER).equals(sel)){
return IResourceConfiguration.KIND_APPLY_RCBS_TOOL_AFTER;
} else if(NewUIMessages.getResourceString(RCBS_BEFORE).equals(sel)){
} else if(UIMessages.getString(RCBS_BEFORE).equals(sel)){
return IResourceConfiguration.KIND_APPLY_RCBS_TOOL_BEFORE;
}
return IResourceConfiguration.KIND_DISABLE_RCBS_TOOL;
@ -330,14 +330,14 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
private int app2sel(int val){
switch(val){
case IResourceConfiguration.KIND_APPLY_RCBS_TOOL_AFTER:
return combo.indexOf(NewUIMessages.getResourceString(RCBS_AFTER));
return combo.indexOf(UIMessages.getString(RCBS_AFTER));
case IResourceConfiguration.KIND_APPLY_RCBS_TOOL_BEFORE:
return combo.indexOf(NewUIMessages.getResourceString(RCBS_BEFORE));
return combo.indexOf(UIMessages.getString(RCBS_BEFORE));
case IResourceConfiguration.KIND_DISABLE_RCBS_TOOL:
return combo.indexOf(NewUIMessages.getResourceString(RCBS_DISABLE));
return combo.indexOf(UIMessages.getString(RCBS_DISABLE));
case IResourceConfiguration.KIND_APPLY_RCBS_TOOL_AS_OVERRIDE:
default:
return combo.indexOf(NewUIMessages.getResourceString(RCBS_OVERRIDE));
return combo.indexOf(UIMessages.getString(RCBS_OVERRIDE));
}
}

View file

@ -24,7 +24,7 @@ import org.eclipse.cdt.managedbuilder.core.IResourceInfo;
import org.eclipse.cdt.managedbuilder.core.ITool;
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
import org.eclipse.cdt.ui.newui.MultiLineTextFieldEditor;
import org.eclipse.cdt.ui.newui.NewUIMessages;
import org.eclipse.cdt.ui.newui.UIMessages;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.preference.FieldEditor;
import org.eclipse.jface.preference.StringFieldEditor;
@ -74,7 +74,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
// Data members
// all build options field editor label
private static final String ALL_OPTIONS = NewUIMessages.getResourceString("BuildToolSettingsPage.alloptions"); //$NON-NLS-1$
private static final String ALL_OPTIONS = UIMessages.getString("BuildToolSettingsPage.alloptions"); //$NON-NLS-1$
// Field editor label for tool command
private static final String COMMAND = "BuildToolSettingsPage.tool.command"; //$NON-NLS-1$
// Advanced settings label
@ -133,7 +133,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
Composite parent = getFieldEditorParent();
FontMetrics fm = AbstractCPropertyTab.getFontMetrics(parent);
commandStringField = new StringFieldEditor(fTool.getId(),
NewUIMessages.getResourceString(COMMAND),
UIMessages.getString(COMMAND),
parent);
commandStringField.setEmptyStringAllowed(false);
GridData gd = ((GridData)commandStringField.getTextControl(parent).getLayoutData());
@ -159,12 +159,12 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
*/
private void createAdvancedSettingsGroup(FontMetrics fm) {
addField( createLabelEditor( getFieldEditorParent(), WHITESPACE ) );
addField( createLabelEditor( getFieldEditorParent(), NewUIMessages.getResourceString(ADVANCED_GROUP) ) );
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,
NewUIMessages.getResourceString(COMMAND_LINE_PATTERN),
UIMessages.getString(COMMAND_LINE_PATTERN),
parent);
GridData gd = ((GridData)commandLinePatternField.getTextControl(parent).getLayoutData());
gd.grabExcessHorizontalSpace = true;

View file

@ -30,7 +30,7 @@ import org.eclipse.cdt.internal.core.cdtvariables.StorableCdtVariables;
import org.eclipse.cdt.internal.core.cdtvariables.UserDefinedVariableSupplier;
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
import org.eclipse.cdt.ui.newui.CDTListComparator;
import org.eclipse.cdt.ui.newui.NewUIMessages;
import org.eclipse.cdt.ui.newui.UIMessages;
import org.eclipse.cdt.ui.newui.PrefPage_Abstract;
import org.eclipse.cdt.utils.cdtvariables.CdtVariableResolver;
import org.eclipse.cdt.utils.envvar.EnvVarOperationProcessor;
@ -135,9 +135,9 @@ public class CPropertyVarsTab extends AbstractCPropertyTab {
};
private static final String[] fTableColumnNames = new String[] {
NewUIMessages.getResourceString(HEADER_NAME),
NewUIMessages.getResourceString(HEADER_TYPE),
NewUIMessages.getResourceString(HEADER_VALUE),
UIMessages.getString(HEADER_NAME),
UIMessages.getString(HEADER_TYPE),
UIMessages.getString(HEADER_VALUE),
};
private static final ColumnLayoutData[] fTableColumnLayouts = {new ColumnPixelData(100), new ColumnPixelData(100), new ColumnPixelData(250)};
@ -163,21 +163,21 @@ public class CPropertyVarsTab extends AbstractCPropertyTab {
case 1:
switch(var.getValueType()){
case ICdtVariable.VALUE_PATH_FILE:
return NewUIMessages.getResourceString(TYPE_PATH_FILE);
return UIMessages.getString(TYPE_PATH_FILE);
case ICdtVariable.VALUE_PATH_FILE_LIST:
return NewUIMessages.getResourceString(TYPE_PATH_FILE_LIST);
return UIMessages.getString(TYPE_PATH_FILE_LIST);
case ICdtVariable.VALUE_PATH_DIR:
return NewUIMessages.getResourceString(TYPE_PATH_DIR);
return UIMessages.getString(TYPE_PATH_DIR);
case ICdtVariable.VALUE_PATH_DIR_LIST:
return NewUIMessages.getResourceString(TYPE_PATH_DIR_LIST);
return UIMessages.getString(TYPE_PATH_DIR_LIST);
case ICdtVariable.VALUE_PATH_ANY:
return NewUIMessages.getResourceString(TYPE_PATH_ANY);
return UIMessages.getString(TYPE_PATH_ANY);
case ICdtVariable.VALUE_PATH_ANY_LIST:
return NewUIMessages.getResourceString(TYPE_PATH_ANY_LIST);
return UIMessages.getString(TYPE_PATH_ANY_LIST);
case ICdtVariable.VALUE_TEXT:
return NewUIMessages.getResourceString(TYPE_TEXT);
return UIMessages.getString(TYPE_TEXT);
case ICdtVariable.VALUE_TEXT_LIST:
return NewUIMessages.getResourceString(TYPE_TEXT_LIST);
return UIMessages.getString(TYPE_TEXT_LIST);
default:
return "? " + var.getValueType(); //$NON-NLS-1$
}
@ -283,8 +283,8 @@ public class CPropertyVarsTab extends AbstractCPropertyTab {
ICdtVariable macros[] = getSelectedUserMacros();
if(macros != null && macros.length > 0){
if(MessageDialog.openQuestion(usercomp.getShell(),
NewUIMessages.getResourceString(DELETE_CONFIRM_TITLE),
NewUIMessages.getResourceString(DELETE_CONFIRM_MESSAGE))){
UIMessages.getString(DELETE_CONFIRM_TITLE),
UIMessages.getString(DELETE_CONFIRM_MESSAGE))){
for(int i = 0; i < macros.length; i++){
if (cfgd != null)
fUserSupplier.deleteMacro(macros[i].getName(), CONTEXT, cfgd);
@ -313,8 +313,8 @@ public class CPropertyVarsTab extends AbstractCPropertyTab {
*/
protected void performDefaults() {
if(MessageDialog.openQuestion(usercomp.getShell(),
NewUIMessages.getResourceString(DELETE_ALL_CONFIRM_TITLE),
NewUIMessages.getResourceString(DELETE_ALL_CONFIRM_MESSAGE))){
UIMessages.getString(DELETE_ALL_CONFIRM_TITLE),
UIMessages.getString(DELETE_ALL_CONFIRM_MESSAGE))){
if (cfgd != null)
fUserSupplier.deleteAll(CONTEXT, cfgd);
else if (vars != null)
@ -509,7 +509,7 @@ public class CPropertyVarsTab extends AbstractCPropertyTab {
private String getString(ICdtVariable v) {
if (isDynamic(v))
return NewUIMessages.getResourceString(VALUE_ECLIPSE_DYNAMIC);
return UIMessages.getString(VALUE_ECLIPSE_DYNAMIC);
String value = EMPTY_STR;
try {
if (CdtVariableResolver.isStringListVariable(v.getValueType()))

View file

@ -28,7 +28,7 @@ import org.eclipse.cdt.managedbuilder.core.IInputType;
import org.eclipse.cdt.managedbuilder.core.IResourceInfo;
import org.eclipse.cdt.managedbuilder.core.ITool;
import org.eclipse.cdt.ui.newui.CDTListComparator;
import org.eclipse.cdt.ui.newui.NewUIMessages;
import org.eclipse.cdt.ui.newui.UIMessages;
import org.eclipse.cdt.utils.ui.controls.TabFolderLayout;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
@ -144,9 +144,9 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
}
private void createScannerConfigControls(Composite parent) {
scGroup = setupGroup(parent, NewUIMessages.getResourceString(SC_GROUP_LABEL), 2, GridData.FILL_HORIZONTAL);
scGroup = setupGroup(parent, UIMessages.getString(SC_GROUP_LABEL), 2, GridData.FILL_HORIZONTAL);
scEnabledButton = setupCheck(scGroup, NewUIMessages.getResourceString(SC_ENABLED_BUTTON), 2, GridData.FILL_HORIZONTAL);
scEnabledButton = setupCheck(scGroup, UIMessages.getString(SC_ENABLED_BUTTON), 2, GridData.FILL_HORIZONTAL);
scEnabledButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
buildInfo.setAutoDiscoveryEnabled(scEnabledButton.getSelection());
@ -155,7 +155,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
handleDiscoveryProfileChanged();
}
});
scProblemReportingEnabledButton = setupCheck(scGroup, NewUIMessages.getResourceString(SC_PROBLEM_REPORTING_ENABLED_BUTTON), 2, GridData.FILL_HORIZONTAL);
scProblemReportingEnabledButton = setupCheck(scGroup, UIMessages.getString(SC_PROBLEM_REPORTING_ENABLED_BUTTON), 2, GridData.FILL_HORIZONTAL);
scProblemReportingEnabledButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
buildInfo.setProblemReportingEnabled(scProblemReportingEnabledButton.getSelection());
@ -163,7 +163,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
});
// Add profile combo box
setupLabel(scGroup,NewUIMessages.getResourceString(SC_SELECTED_PROFILE_COMBO), 1, GridData.BEGINNING);
setupLabel(scGroup,UIMessages.getString(SC_SELECTED_PROFILE_COMBO), 1, GridData.BEGINNING);
profileComboBox = new Combo(scGroup, SWT.DROP_DOWN | SWT.READ_ONLY);
profileComboBox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
profileComboBox.addSelectionListener(new SelectionAdapter() {

View file

@ -17,7 +17,7 @@ import java.util.Iterator;
import org.eclipse.cdt.managedbuilder.core.IOption;
import org.eclipse.cdt.ui.newui.CDTStatusInfo;
import org.eclipse.cdt.ui.newui.NewUIMessages;
import org.eclipse.cdt.ui.newui.UIMessages;
import org.eclipse.cdt.ui.newui.TypedCDTViewerFilter;
import org.eclipse.cdt.utils.cdtvariables.IVariableContextInfo;
import org.eclipse.core.resources.IContainer;
@ -267,27 +267,27 @@ public class FileListControl {
private static final String WORKSPACELOC_VAR = "workspace_loc"; //$NON-NLS-1$
/* Names, messages and titles */
private static final String WORKSPACEBUTTON_NAME = NewUIMessages.getResourceString("FileListControl.button.workspace"); //$NON-NLS-1$
private static final String FILESYSTEMBUTTON_NAME = NewUIMessages.getResourceString("FileListControl.button.fs"); //$NON-NLS-1$
private static final String WORKSPACEBUTTON_NAME = UIMessages.getString("FileListControl.button.workspace"); //$NON-NLS-1$
private static final String FILESYSTEMBUTTON_NAME = UIMessages.getString("FileListControl.button.fs"); //$NON-NLS-1$
private static final String ADD_STR = NewUIMessages.getResourceString("FileListControl.add"); //$NON-NLS-1$
private static final String DEL_STR = NewUIMessages.getResourceString("FileListControl.delete"); //$NON-NLS-1$
private static final String EDIT_STR = NewUIMessages.getResourceString("FileListControl.edit"); //$NON-NLS-1$
private static final String MOVEUP_STR = NewUIMessages.getResourceString("FileListControl.moveup"); //$NON-NLS-1$
private static final String MOVEDOWN_STR = NewUIMessages.getResourceString("FileListControl.movedown"); //$NON-NLS-1$
private static final String FILE_TITLE_ADD = NewUIMessages.getResourceString("BrowseEntryDialog.file.title.add"); //$NON-NLS-1$
private static final String DIR_TITLE_ADD = NewUIMessages.getResourceString("BrowseEntryDialog.dir.title.add"); //$NON-NLS-1$
private static final String FILE_TITLE_EDIT = NewUIMessages.getResourceString("BrowseEntryDialog.file.title.edit"); //$NON-NLS-1$
private static final String DIR_TITLE_EDIT = NewUIMessages.getResourceString("BrowseEntryDialog.dir.title.edit"); //$NON-NLS-1$
private static final String WORKSPACE_DIR_DIALOG_TITLE = NewUIMessages.getResourceString("BrowseEntryDialog.wsp.dir.dlg.title"); //$NON-NLS-1$
private static final String WORKSPACE_FILE_DIALOG_TITLE = NewUIMessages.getResourceString("BrowseEntryDialog.wsp.file.dlg.title"); //$NON-NLS-1$
private static final String WORKSPACE_DIR_DIALOG_MSG = NewUIMessages.getResourceString("BrowseEntryDialog.wsp.dir.dlg.msg"); //$NON-NLS-1$
private static final String WORKSPACE_FILE_DIALOG_MSG = NewUIMessages.getResourceString("BrowseEntryDialog.wsp.file.dlg.msg"); //$NON-NLS-1$
private static final String WORKSPACE_FILE_DIALOG_ERR = NewUIMessages.getResourceString("BrowseEntryDialog.wsp.file.dlg.err"); //$NON-NLS-1$
private static final String FILESYSTEM_DIR_DIALOG_MSG = NewUIMessages.getResourceString("BrowseEntryDialog.fs.dir.dlg.msg"); //$NON-NLS-1$
private static final String FILE_MSG = NewUIMessages.getResourceString("BrowseEntryDialog.message.file"); //$NON-NLS-1$
private static final String DIR_MSG = NewUIMessages.getResourceString("BrowseEntryDialog.message.directory"); //$NON-NLS-1$
private static final String TITLE = NewUIMessages.getResourceString("BuildPropertyCommon.label.title"); //$NON-NLS-1$
private static final String ADD_STR = UIMessages.getString("FileListControl.add"); //$NON-NLS-1$
private static final String DEL_STR = UIMessages.getString("FileListControl.delete"); //$NON-NLS-1$
private static final String EDIT_STR = UIMessages.getString("FileListControl.edit"); //$NON-NLS-1$
private static final String MOVEUP_STR = UIMessages.getString("FileListControl.moveup"); //$NON-NLS-1$
private static final String MOVEDOWN_STR = UIMessages.getString("FileListControl.movedown"); //$NON-NLS-1$
private static final String FILE_TITLE_ADD = UIMessages.getString("BrowseEntryDialog.file.title.add"); //$NON-NLS-1$
private static final String DIR_TITLE_ADD = UIMessages.getString("BrowseEntryDialog.dir.title.add"); //$NON-NLS-1$
private static final String FILE_TITLE_EDIT = UIMessages.getString("BrowseEntryDialog.file.title.edit"); //$NON-NLS-1$
private static final String DIR_TITLE_EDIT = UIMessages.getString("BrowseEntryDialog.dir.title.edit"); //$NON-NLS-1$
private static final String WORKSPACE_DIR_DIALOG_TITLE = UIMessages.getString("BrowseEntryDialog.wsp.dir.dlg.title"); //$NON-NLS-1$
private static final String WORKSPACE_FILE_DIALOG_TITLE = UIMessages.getString("BrowseEntryDialog.wsp.file.dlg.title"); //$NON-NLS-1$
private static final String WORKSPACE_DIR_DIALOG_MSG = UIMessages.getString("BrowseEntryDialog.wsp.dir.dlg.msg"); //$NON-NLS-1$
private static final String WORKSPACE_FILE_DIALOG_MSG = UIMessages.getString("BrowseEntryDialog.wsp.file.dlg.msg"); //$NON-NLS-1$
private static final String WORKSPACE_FILE_DIALOG_ERR = UIMessages.getString("BrowseEntryDialog.wsp.file.dlg.err"); //$NON-NLS-1$
private static final String FILESYSTEM_DIR_DIALOG_MSG = UIMessages.getString("BrowseEntryDialog.fs.dir.dlg.msg"); //$NON-NLS-1$
private static final String FILE_MSG = UIMessages.getString("BrowseEntryDialog.message.file"); //$NON-NLS-1$
private static final String DIR_MSG = UIMessages.getString("BrowseEntryDialog.message.directory"); //$NON-NLS-1$
private static final String TITLE = UIMessages.getString("BuildPropertyCommon.label.title"); //$NON-NLS-1$
//toolbar
private ToolBar toolBar;
@ -587,8 +587,8 @@ public class FileListControl {
private void removePressed() {
int index = list.getSelectionIndex();
if (browseType == IOption.BROWSE_DIR || browseType == IOption.BROWSE_FILE) {
String quest = NewUIMessages.getResourceString("FileListControl.deletedialog.message"); //$NON-NLS-1$
String title = NewUIMessages.getResourceString("FileListControl.deletedialog.title"); //$NON-NLS-1$
String quest = UIMessages.getString("FileListControl.deletedialog.message"); //$NON-NLS-1$
String title = UIMessages.getString("FileListControl.deletedialog.title"); //$NON-NLS-1$
boolean delDir = MessageDialog.openQuestion(list.getShell(), title,
quest);
if (delDir && index != -1){
@ -655,7 +655,7 @@ public class FileListControl {
message, selItem, null, browseType);
} else {
String title = NewUIMessages.getResourceString("FileListControl.editdialog.title"); //$NON-NLS-1$
String title = UIMessages.getString("FileListControl.editdialog.title"); //$NON-NLS-1$
dialog = new InputDialog(null, title, compTitle,
selItem, null);
}

View file

@ -17,7 +17,7 @@ import org.eclipse.cdt.managedbuilder.core.IConfiguration;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject;
import org.eclipse.cdt.ui.newui.NewUIMessages;
import org.eclipse.cdt.ui.newui.UIMessages;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
@ -206,7 +206,7 @@ public class NewBuildConfigurationDialog extends Dialog {
// Add a label and a text widget for Configuration's name
final Label nameLabel = new Label(group1, SWT.LEFT);
nameLabel.setFont(parent.getFont());
nameLabel.setText(NewUIMessages.getResourceString(NAME));
nameLabel.setText(UIMessages.getString(NAME));
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 1;
@ -230,7 +230,7 @@ public class NewBuildConfigurationDialog extends Dialog {
// Add a label and a text widget for Configuration's description
final Label descriptionLabel = new Label(group1, SWT.LEFT);
descriptionLabel.setFont(parent.getFont());
descriptionLabel.setText(NewUIMessages.getResourceString(DESCRIPTION));
descriptionLabel.setText(UIMessages.getString(DESCRIPTION));
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 1;
@ -250,7 +250,7 @@ public class NewBuildConfigurationDialog extends Dialog {
final Group group = new Group(composite, SWT.NONE);
group.setFont(composite.getFont());
group.setText(NewUIMessages.getResourceString(GROUP));
group.setText(UIMessages.getString(GROUP));
GridLayout layout = new GridLayout(3, false);
group.setLayout(layout);
gd = new GridData(GridData.FILL_HORIZONTAL);
@ -266,7 +266,7 @@ public class NewBuildConfigurationDialog extends Dialog {
// Add a radio button and combo box to copy from default config
btnCopy = new Button(group, SWT.RADIO);
btnCopy.setFont(group.getFont());
btnCopy.setText(NewUIMessages.getResourceString(COPY));
btnCopy.setText(UIMessages.getString(COPY));
setButtonLayoutData(btnCopy);
btnCopy.addSelectionListener(radioListener);
@ -288,7 +288,7 @@ public class NewBuildConfigurationDialog extends Dialog {
// Create a radio button and combo for clonable configs
btnClone = new Button(group, SWT.RADIO);
btnClone.setFont(group.getFont());
btnClone.setText(NewUIMessages.getResourceString(CLONE));
btnClone.setText(UIMessages.getString(CLONE));
setButtonLayoutData(btnClone);
btnClone.addSelectionListener(radioListener);
btnClone.setSelection(true);
@ -462,12 +462,12 @@ public class NewBuildConfigurationDialog extends Dialog {
s = ""; //$NON-NLS-1$
// Make sure the name is not a duplicate
} else if (isDuplicateName(currentName)) {
s = NewUIMessages.getFormattedString(DUPLICATE, currentName);
s = UIMessages.getFormattedString(DUPLICATE, currentName);
} else if (isSimilarName(currentName)) {
s = NewUIMessages.getFormattedString(CASE, currentName);
s = UIMessages.getFormattedString(CASE, currentName);
} else if (!validateName(currentName)) {
// TODO Create a decent I18N string to describe this problem
s = NewUIMessages.getFormattedString(INVALID, currentName);
s = UIMessages.getFormattedString(INVALID, currentName);
}
if (statusLabel == null) return;
Button b = getButton(IDialogConstants.OK_ID);

View file

@ -12,7 +12,7 @@ import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject;
import org.eclipse.cdt.ui.newui.INewCfgDialog;
import org.eclipse.cdt.ui.newui.NewUIMessages;
import org.eclipse.cdt.ui.newui.UIMessages;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
@ -133,7 +133,7 @@ public class NewCfgDialog implements INewCfgDialog {
// Add a label and a text widget for Configuration's name
final Label nameLabel = new Label(group1, SWT.LEFT);
nameLabel.setFont(parent.getFont());
nameLabel.setText(NewUIMessages.getResourceString(NAME));
nameLabel.setText(UIMessages.getString(NAME));
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 1;
@ -157,7 +157,7 @@ public class NewCfgDialog implements INewCfgDialog {
// Add a label and a text widget for Configuration's description
final Label descriptionLabel = new Label(group1, SWT.LEFT);
descriptionLabel.setFont(parent.getFont());
descriptionLabel.setText(NewUIMessages.getResourceString(DESCRIPTION));
descriptionLabel.setText(UIMessages.getString(DESCRIPTION));
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 1;
@ -175,7 +175,7 @@ public class NewCfgDialog implements INewCfgDialog {
final Group group = new Group(composite, SWT.NONE);
group.setFont(composite.getFont());
group.setText(NewUIMessages.getResourceString(GROUP));
group.setText(UIMessages.getString(GROUP));
GridLayout layout = new GridLayout(2, false);
group.setLayout(layout);
gd = new GridData(GridData.FILL_HORIZONTAL);
@ -260,12 +260,12 @@ public class NewCfgDialog implements INewCfgDialog {
s = ""; //$NON-NLS-1$
// Make sure the name is not a duplicate
} else if (isDuplicateName(currentName)) {
s = NewUIMessages.getFormattedString(DUPLICATE, currentName);
s = UIMessages.getFormattedString(DUPLICATE, currentName);
} else if (isSimilarName(currentName)) {
s = NewUIMessages.getFormattedString(CASE, currentName);
s = UIMessages.getFormattedString(CASE, currentName);
} else if (!validateName(currentName)) {
// TODO Create a decent I18N string to describe this problem
s = NewUIMessages.getFormattedString(INVALID, currentName);
s = UIMessages.getFormattedString(INVALID, currentName);
}
if (statusLabel == null) return;
Button b = getButton(IDialogConstants.OK_ID);

View file

@ -20,7 +20,7 @@ import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.managedbuilder.core.IOption;
import org.eclipse.cdt.managedbuilder.internal.macros.BuildMacro;
import org.eclipse.cdt.managedbuilder.macros.IBuildMacro;
import org.eclipse.cdt.ui.newui.NewUIMessages;
import org.eclipse.cdt.ui.newui.UIMessages;
import org.eclipse.cdt.utils.cdtvariables.CdtVariableResolver;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
@ -99,9 +99,9 @@ public class NewVarDialog extends Dialog {
super(parentShell);
cfgd = _cfgd;
if(editedMacro != null)
fTitle = NewUIMessages.getResourceString(TITLE_EDIT);
fTitle = UIMessages.getString(TITLE_EDIT);
else
fTitle = NewUIMessages.getResourceString(TITLE_NEW);
fTitle = UIMessages.getString(TITLE_NEW);
fEditedMacro = editedMacro;
}
@ -165,7 +165,7 @@ public class NewVarDialog extends Dialog {
Label typeLabel = new Label(comp, SWT.LEFT);
typeLabel.setFont(comp.getFont());
typeLabel.setText(NewUIMessages.getResourceString(TYPE));
typeLabel.setText(UIMessages.getString(TYPE));
gd = new GridData();
typeLabel.setLayoutData(gd);
@ -175,14 +175,14 @@ public class NewVarDialog extends Dialog {
// gd.widthHint = 100;
fTypeSelector.setLayoutData(gd);
fTypeSelector.setItems(new String[]{
NewUIMessages.getResourceString(TYPE_TEXT),
NewUIMessages.getResourceString(TYPE_TEXT_LIST),
NewUIMessages.getResourceString(TYPE_PATH_FILE),
NewUIMessages.getResourceString(TYPE_PATH_FILE_LIST),
NewUIMessages.getResourceString(TYPE_PATH_DIR),
NewUIMessages.getResourceString(TYPE_PATH_DIR_LIST),
NewUIMessages.getResourceString(TYPE_PATH_ANY),
NewUIMessages.getResourceString(TYPE_PATH_ANY_LIST)
UIMessages.getString(TYPE_TEXT),
UIMessages.getString(TYPE_TEXT_LIST),
UIMessages.getString(TYPE_PATH_FILE),
UIMessages.getString(TYPE_PATH_FILE_LIST),
UIMessages.getString(TYPE_PATH_DIR),
UIMessages.getString(TYPE_PATH_DIR_LIST),
UIMessages.getString(TYPE_PATH_ANY),
UIMessages.getString(TYPE_PATH_ANY_LIST)
});
setSelectedType(IBuildMacro.VALUE_TEXT);
@ -194,7 +194,7 @@ public class NewVarDialog extends Dialog {
fMacroValueLabel = new Label(comp, SWT.LEFT);
fMacroValueLabel.setFont(comp.getFont());
fMacroValueLabel.setText(NewUIMessages.getResourceString(VALUE));
fMacroValueLabel.setText(UIMessages.getString(VALUE));
gd = new GridData();
gd.horizontalSpan = 1;
fMacroValueLabel.setLayoutData(gd);
@ -213,7 +213,7 @@ public class NewVarDialog extends Dialog {
fBrowseButton = new Button(comp,SWT.PUSH);
fBrowseButton.setFont(comp.getFont());
fBrowseButton.setText(NewUIMessages.getResourceString(BROWSE));
fBrowseButton.setText(UIMessages.getString(BROWSE));
fBrowseButton.addSelectionListener(new SelectionAdapter(){
public void widgetSelected(SelectionEvent e){
handleBrowseButtonPressed();
@ -231,7 +231,7 @@ public class NewVarDialog extends Dialog {
fListEditorContainier.setLayoutData(gd);
fListEditorContainier.setLayout(new GridLayout());
fListEditor = new FileListControl(fListEditorContainier, NewUIMessages.getResourceString(LIST_TITLE), IOption.BROWSE_NONE);
fListEditor = new FileListControl(fListEditorContainier, UIMessages.getString(LIST_TITLE), IOption.BROWSE_NONE);
/* Enable workspace support for list editor */
fListEditor.setWorkspaceSupport(true);

View file

@ -15,7 +15,7 @@ import org.eclipse.cdt.core.settings.model.ICResourceDescription;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.ui.newui.AbstractPrefPage;
import org.eclipse.cdt.ui.newui.ICPropertyTab;
import org.eclipse.cdt.ui.newui.NewUIMessages;
import org.eclipse.cdt.ui.newui.UIMessages;
import org.eclipse.core.runtime.CoreException;
public class PrefPage_NewCDTProject extends AbstractPrefPage {
@ -40,7 +40,7 @@ public class PrefPage_NewCDTProject extends AbstractPrefPage {
}
protected String getHeader() {
return NewUIMessages.getResourceString("AbstractPrefPage.0") + //$NON-NLS-1$
NewUIMessages.getResourceString("AbstractPrefPage.1"); //$NON-NLS-1$
return UIMessages.getString("AbstractPrefPage.0") + //$NON-NLS-1$
UIMessages.getString("AbstractPrefPage.1"); //$NON-NLS-1$
}
}

View file

@ -14,7 +14,7 @@ import java.net.URL;
import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
import org.eclipse.cdt.managedbuilder.core.ITool;
import org.eclipse.cdt.ui.newui.NewUIMessages;
import org.eclipse.cdt.ui.newui.UIMessages;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.resource.ResourceManager;
@ -98,7 +98,7 @@ public class ToolListLabelProvider extends LabelProvider {
}
protected RuntimeException unknownElement(Object element) {
return new RuntimeException(NewUIMessages.getFormattedString(ERROR_UNKNOWN_ELEMENT, element.getClass().getName()));
return new RuntimeException(UIMessages.getFormattedString(ERROR_UNKNOWN_ELEMENT, element.getClass().getName()));
}
/**

View file

@ -23,7 +23,7 @@ import java.util.TreeMap;
import org.eclipse.cdt.managedbuilder.core.BuildException;
import org.eclipse.cdt.managedbuilder.core.IToolChain;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.ui.newui.NewUIMessages;
import org.eclipse.cdt.ui.newui.UIMessages;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
@ -167,9 +167,9 @@ public final class MBSCustomPageManager
{
// there are currently no other supported element types
// so throw an exception
throw new BuildException(NewUIMessages.getResourceString("MBSCustomPageManager.error0") //$NON-NLS-1$
throw new BuildException(UIMessages.getString("MBSCustomPageManager.error0") //$NON-NLS-1$
+ element.getName()
+ NewUIMessages.getResourceString("MBSCustomPageManager.error1") //$NON-NLS-1$
+ UIMessages.getString("MBSCustomPageManager.error1") //$NON-NLS-1$
+ EXTENSION_POINT_ID);
}
}
@ -244,9 +244,9 @@ public final class MBSCustomPageManager
// no other types supported... throw an exception
// there are currently no other supported element types
// so throw an exception
throw new BuildException(NewUIMessages.getResourceString("MBSCustomPageManager.error2") //$NON-NLS-1$
throw new BuildException(UIMessages.getString("MBSCustomPageManager.error2") //$NON-NLS-1$
+ element.getName()
+ NewUIMessages.getResourceString("MBSCustomPageManager.error3") //$NON-NLS-1$
+ UIMessages.getString("MBSCustomPageManager.error3") //$NON-NLS-1$
+ EXTENSION_POINT_ID);
}
}
@ -262,7 +262,7 @@ public final class MBSCustomPageManager
if (projectType != null)
currentPageData.addProjectType(projectType);
else
throw new BuildException(NewUIMessages.getResourceString("MBSCustomPageManager.error4")); //$NON-NLS-1$
throw new BuildException(UIMessages.getString("MBSCustomPageManager.error4")); //$NON-NLS-1$
}
private static void loadToolchain(IConfigurationElement element,
@ -286,7 +286,7 @@ public final class MBSCustomPageManager
currentPageData.addToolchain(toolchainID, versionsSupported);
}
else
throw new BuildException(NewUIMessages.getResourceString("MBSCustomPageManager.error5")); //$NON-NLS-1$
throw new BuildException(UIMessages.getString("MBSCustomPageManager.error5")); //$NON-NLS-1$
}
private static void loadNature(IConfigurationElement element,
@ -297,7 +297,7 @@ public final class MBSCustomPageManager
if (nature != null)
currentPageData.addNature(nature);
else
throw new BuildException(NewUIMessages.getResourceString("MBSCustomPageManager.error6")); //$NON-NLS-1$
throw new BuildException(UIMessages.getString("MBSCustomPageManager.error6")); //$NON-NLS-1$
}
/**

View file

@ -81,22 +81,22 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
// commonly used button names
public static final String EMPTY_STR = ""; //$NON-NLS-1$
public static final String ADD_STR = NewUIMessages.getResourceString("FileListControl.add"); //$NON-NLS-1$
public static final String DEL_STR = NewUIMessages.getResourceString("FileListControl.delete"); //$NON-NLS-1$
public static final String EDIT_STR = NewUIMessages.getResourceString("FileListControl.edit"); //$NON-NLS-1$
public static final String MOVEUP_STR = NewUIMessages.getResourceString("FileListControl.moveup"); //$NON-NLS-1$
public static final String MOVEDOWN_STR = NewUIMessages.getResourceString("FileListControl.movedown"); //$NON-NLS-1$
public static final String WORKSPACEBUTTON_NAME = NewUIMessages.getResourceString("FileListControl.button.workspace"); //$NON-NLS-1$
public static final String FILESYSTEMBUTTON_NAME = NewUIMessages.getResourceString("FileListControl.button.fs"); //$NON-NLS-1$
public static final String VARIABLESBUTTON_NAME = NewUIMessages.getResourceString("AbstractCPropertyTab.1"); //$NON-NLS-1$
public static final String FILESYSTEM_DIR_DIALOG_MSG = NewUIMessages.getResourceString("BrowseEntryDialog.fs.dir.dlg.msg"); //$NON-NLS-1$
public static final String ADD_STR = UIMessages.getString("FileListControl.add"); //$NON-NLS-1$
public static final String DEL_STR = UIMessages.getString("FileListControl.delete"); //$NON-NLS-1$
public static final String EDIT_STR = UIMessages.getString("FileListControl.edit"); //$NON-NLS-1$
public static final String MOVEUP_STR = UIMessages.getString("FileListControl.moveup"); //$NON-NLS-1$
public static final String MOVEDOWN_STR = UIMessages.getString("FileListControl.movedown"); //$NON-NLS-1$
public static final String WORKSPACEBUTTON_NAME = UIMessages.getString("FileListControl.button.workspace"); //$NON-NLS-1$
public static final String FILESYSTEMBUTTON_NAME = UIMessages.getString("FileListControl.button.fs"); //$NON-NLS-1$
public static final String VARIABLESBUTTON_NAME = UIMessages.getString("AbstractCPropertyTab.1"); //$NON-NLS-1$
public static final String FILESYSTEM_DIR_DIALOG_MSG = UIMessages.getString("BrowseEntryDialog.fs.dir.dlg.msg"); //$NON-NLS-1$
public static final String FILESYSTEM_FILE_DIALOG_TITLE = EMPTY_STR;
public static final String WORKSPACE_DIR_DIALOG_TITLE = NewUIMessages.getResourceString("BrowseEntryDialog.wsp.dir.dlg.title"); //$NON-NLS-1$
public static final String WORKSPACE_FILE_DIALOG_TITLE = NewUIMessages.getResourceString("BrowseEntryDialog.wsp.file.dlg.title"); //$NON-NLS-1$
public static final String WORKSPACE_DIR_DIALOG_MSG = NewUIMessages.getResourceString("BrowseEntryDialog.wsp.dir.dlg.msg"); //$NON-NLS-1$
public static final String WORKSPACE_FILE_DIALOG_MSG = NewUIMessages.getResourceString("BrowseEntryDialog.wsp.file.dlg.msg"); //$NON-NLS-1$
public static final String WORKSPACE_FILE_DIALOG_ERR = NewUIMessages.getResourceString("BrowseEntryDialog.wsp.file.dlg.err"); //$NON-NLS-1$
public static final String WORKSPACE_DIR_DIALOG_ERR = NewUIMessages.getResourceString("BrowseEntryDialog.wsp.dir.dlg.err"); //$NON-NLS-1$
public static final String WORKSPACE_DIR_DIALOG_TITLE = UIMessages.getString("BrowseEntryDialog.wsp.dir.dlg.title"); //$NON-NLS-1$
public static final String WORKSPACE_FILE_DIALOG_TITLE = UIMessages.getString("BrowseEntryDialog.wsp.file.dlg.title"); //$NON-NLS-1$
public static final String WORKSPACE_DIR_DIALOG_MSG = UIMessages.getString("BrowseEntryDialog.wsp.dir.dlg.msg"); //$NON-NLS-1$
public static final String WORKSPACE_FILE_DIALOG_MSG = UIMessages.getString("BrowseEntryDialog.wsp.file.dlg.msg"); //$NON-NLS-1$
public static final String WORKSPACE_FILE_DIALOG_ERR = UIMessages.getString("BrowseEntryDialog.wsp.file.dlg.err"); //$NON-NLS-1$
public static final String WORKSPACE_DIR_DIALOG_ERR = UIMessages.getString("BrowseEntryDialog.wsp.dir.dlg.err"); //$NON-NLS-1$
protected Composite usercomp; // space where user can create widgets
protected Composite buttoncomp; // space for buttons on the right
@ -371,7 +371,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
dialog.setInput(vm.getVariables(cfgd));
dialog.setHeightInChars(10);
dialog.setTitle(NewUIMessages.getResourceString("AbstractCPropertyTab.0")); //$NON-NLS-1$
dialog.setTitle(UIMessages.getString("AbstractCPropertyTab.0")); //$NON-NLS-1$
if (dialog.open() == Window.OK) {
Object[] selected = dialog.getResult();
if (selected.length > 0) {

View file

@ -121,16 +121,16 @@ public abstract class AbstractExportTab extends AbstractCPropertyTab {
});
TableColumn c = new TableColumn(table, SWT.NONE);
c.setWidth(hasValues() ? 100 : 200);
c.setText(NewUIMessages.getResourceString("EnvDialog.0")); //$NON-NLS-1$
c.setText(UIMessages.getString("EnvDialog.0")); //$NON-NLS-1$
c = new TableColumn(table, SWT.NONE);
c.setWidth(hasValues() ? 100 : 0);
c.setText(NewUIMessages.getResourceString("EnvDialog.1")); //$NON-NLS-1$
c.setText(UIMessages.getString("EnvDialog.1")); //$NON-NLS-1$
c = new TableColumn(table, SWT.NONE);
c.setWidth(100);
c.setText(NewUIMessages.getResourceString("LanguagesTab.1")); //$NON-NLS-1$
c.setText(UIMessages.getString("LanguagesTab.1")); //$NON-NLS-1$
c = new TableColumn(table, SWT.NONE);
c.setWidth(100);
c.setText(NewUIMessages.getResourceString("LanguagesTab.0")); //$NON-NLS-1$
c.setText(UIMessages.getString("LanguagesTab.0")); //$NON-NLS-1$
initButtons(new String[] {ADD_STR, EDIT_STR, DEL_STR});
updateData(getResDesc());

View file

@ -71,10 +71,10 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
protected SashForm sashForm;
protected final static String[] BUTTONS = {ADD_STR, EDIT_STR, DEL_STR,
NewUIMessages.getResourceString("AbstractLangsListTab.2"), //$NON-NLS-1$
UIMessages.getString("AbstractLangsListTab.2"), //$NON-NLS-1$
null, MOVEUP_STR, MOVEDOWN_STR };
protected final static String[] BUTTSYM = {ADD_STR, EDIT_STR, DEL_STR,
NewUIMessages.getResourceString("AbstractLangsListTab.2")}; //$NON-NLS-1$
UIMessages.getString("AbstractLangsListTab.2")}; //$NON-NLS-1$
private final static Image IMG_FS = CPluginImages.get(CPluginImages.IMG_FILESYSTEM);
private final static Image IMG_WS = CPluginImages.get(CPluginImages.IMG_WORKSPACE);
@ -148,7 +148,7 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
}
});
setupLabel(usercomp, EMPTY_STR, 1, 0);
showBIButton = setupCheck(usercomp, NewUIMessages.getResourceString("AbstractLangsListTab.0"), 1, GridData.FILL_HORIZONTAL); //$NON-NLS-1$
showBIButton = setupCheck(usercomp, UIMessages.getString("AbstractLangsListTab.0"), 1, GridData.FILL_HORIZONTAL); //$NON-NLS-1$
showBIButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
update();
@ -213,7 +213,7 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
}});
langCol = new TreeColumn(langTree, SWT.NONE);
langCol.setText(NewUIMessages.getResourceString("AbstractLangsListTab.1")); //$NON-NLS-1$
langCol.setText(UIMessages.getString("AbstractLangsListTab.1")); //$NON-NLS-1$
langCol.setResizable(false);
return langTree;
}
@ -441,7 +441,7 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
if (columnIndex == 0) {
String s = le.getName();
if (exported.contains(le))
s = s + NewUIMessages.getResourceString("AbstractLangsListTab.3"); //$NON-NLS-1$
s = s + UIMessages.getString("AbstractLangsListTab.3"); //$NON-NLS-1$
return s;
}
if (le.getKind() == ICSettingEntry.MACRO) {

View file

@ -201,11 +201,11 @@ implements
String s = null;
if (!checkElement()) {
s = NewUIMessages.getResourceString("AbstractPage.0"); //$NON-NLS-1$
s = UIMessages.getString("AbstractPage.0"); //$NON-NLS-1$
} else if (!isApplicable()) {
s = NewUIMessages.getResourceString("AbstractPage.1"); //$NON-NLS-1$
s = UIMessages.getString("AbstractPage.1"); //$NON-NLS-1$
} else if (!isCDTProject(getProject())) {
s = NewUIMessages.getResourceString("AbstractPage.2"); //$NON-NLS-1$
s = UIMessages.getString("AbstractPage.2"); //$NON-NLS-1$
}
if (s == null) {
@ -235,7 +235,7 @@ implements
GridLayout ff = new GridLayout(3, false);
configGroup.setLayout(ff);
Label configLabel = new Label(configGroup, SWT.NONE);
configLabel.setText(NewUIMessages.getResourceString("AbstractPage.6")); //$NON-NLS-1$
configLabel.setText(UIMessages.getString("AbstractPage.6")); //$NON-NLS-1$
configLabel.setLayoutData(new GridData(GridData.BEGINNING));
configSelector = new Combo(configGroup, SWT.READ_ONLY | SWT.DROP_DOWN);
@ -254,7 +254,7 @@ implements
if (CDTPrefUtil.getBool(CDTPrefUtil.KEY_MANAGE)) {
manageButton = new Button(configGroup, SWT.PUSH);
manageButton.setText(NewUIMessages.getResourceString("AbstractPage.12")); //$NON-NLS-1$
manageButton.setText(UIMessages.getString("AbstractPage.12")); //$NON-NLS-1$
gd = new GridData(GridData.END);
gd.widthHint = 150;
manageButton.setLayoutData(gd);
@ -274,7 +274,7 @@ implements
if (isForFolder() || isForFile()) {
excludeFromBuildCheck = new Button(configGroup, SWT.CHECK);
excludeFromBuildCheck.setText(NewUIMessages.getResourceString("AbstractPage.7")); //$NON-NLS-1$
excludeFromBuildCheck.setText(UIMessages.getString("AbstractPage.7")); //$NON-NLS-1$
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 3;
excludeFromBuildCheck.setLayoutData(gd);
@ -417,8 +417,8 @@ implements
} catch (InvocationTargetException e) {
Throwable e1 = e.getTargetException();
CUIPlugin.errorDialog(getShell(),
NewUIMessages.getResourceString("AbstractPage.8"), //$NON-NLS-1$
NewUIMessages.getResourceString("AbstractPage.9"), e1, true); //$NON-NLS-1$
UIMessages.getString("AbstractPage.8"), //$NON-NLS-1$
UIMessages.getString("AbstractPage.9"), e1, true); //$NON-NLS-1$
return false;
} catch (InterruptedException e) {}
return true;
@ -459,7 +459,7 @@ implements
try {
CoreModel.getDefault().setProjectDescription(getProject(), local_prjd);
} catch (CoreException e) {
System.out.println(NewUIMessages.getResourceString("AbstractPage.11") + e.getLocalizedMessage()); //$NON-NLS-1$
System.out.println(UIMessages.getString("AbstractPage.11") + e.getLocalizedMessage()); //$NON-NLS-1$
}
updateViews(internalElement);
}
@ -470,8 +470,8 @@ implements
} catch (InvocationTargetException e) {
Throwable e1 = e.getTargetException();
CUIPlugin.errorDialog(getShell(),
NewUIMessages.getResourceString("AbstractPage.8"), //$NON-NLS-1$
NewUIMessages.getResourceString("AbstractPage.9"), e1, true); //$NON-NLS-1$
UIMessages.getString("AbstractPage.8"), //$NON-NLS-1$
UIMessages.getString("AbstractPage.9"), e1, true); //$NON-NLS-1$
} catch (InterruptedException e) {}
}
@ -518,9 +518,9 @@ implements
// Handling of All/Multiple configurations can be disabled
if (ENABLE_MULTI_CFG) {
if (cfgDescs.length > 1) // "All cfgs" - shown if at least 2 cfgs available
configSelector.add(NewUIMessages.getResourceString("AbstractPage.4")); //$NON-NLS-1$
configSelector.add(UIMessages.getString("AbstractPage.4")); //$NON-NLS-1$
if (cfgDescs.length > 2)// "Multi cfgs" - shown if at least 3 cfgs available
configSelector.add(NewUIMessages.getResourceString("AbstractPage.5")); //$NON-NLS-1$
configSelector.add(UIMessages.getString("AbstractPage.5")); //$NON-NLS-1$
}
configSelector.select(cfgIndex);
handleConfigSelection();
@ -654,7 +654,7 @@ implements
else
out = cf.createFileDescription(p, out);
} catch (CoreException e) {
System.out.println(NewUIMessages.getResourceString("AbstractPage.10") + //$NON-NLS-1$
System.out.println(UIMessages.getString("AbstractPage.10") + //$NON-NLS-1$
p.toOSString() + "\n" + e.getLocalizedMessage()); //$NON-NLS-1$
}
}
@ -733,7 +733,7 @@ implements
if (elements[k].getName().equals(ELEMENT_NAME)) {
if (loadTab(elements[k], parent)) return;
} else {
System.out.println(NewUIMessages.getResourceString("AbstractPage.13") + elements[k].getName()); //$NON-NLS-1$
System.out.println(UIMessages.getString("AbstractPage.13") + elements[k].getName()); //$NON-NLS-1$
}
}
}
@ -756,7 +756,7 @@ implements
try {
page = (ICPropertyTab) element.createExecutableExtension(CLASS_NAME);
} catch (CoreException e) {
System.out.println(NewUIMessages.getResourceString("AbstractPage.14") + //$NON-NLS-1$
System.out.println(UIMessages.getString("AbstractPage.14") + //$NON-NLS-1$
e.getLocalizedMessage());
return false;
}
@ -884,7 +884,7 @@ implements
// override parent's method to use proper class
public IAdaptable getElement() {
if (internalElement == null && !checkElement())
throw (new NullPointerException(NewUIMessages.getResourceString("AbstractPage.15"))); //$NON-NLS-1$
throw (new NullPointerException(UIMessages.getString("AbstractPage.15"))); //$NON-NLS-1$
return internalElement;
}

View file

@ -110,7 +110,7 @@ public class BinaryParsTab extends AbstractCPropertyTab {
PlatformUI.getWorkbench().getHelpSystem().setHelp(usercomp, ICHelpContextIds.BINARY_PARSER_PAGE);
usercomp.setLayout(new GridLayout(2, false));
setupLabel(usercomp, NewUIMessages.getResourceString("BinaryParsTab.0"), 2, GridData.FILL_HORIZONTAL); //$NON-NLS-1$
setupLabel(usercomp, UIMessages.getString("BinaryParsTab.0"), 2, GridData.FILL_HORIZONTAL); //$NON-NLS-1$
table = new Table(usercomp, SWT.BORDER | SWT.CHECK | SWT.SINGLE);
table.setLayoutData(new GridData(GridData.FILL_BOTH));
table.addSelectionListener(new SelectionAdapter() {

View file

@ -25,7 +25,7 @@ public class CLocationOutputTab extends CLocationTab {
public void createControls(Composite parent) {
super.createControls(parent);
label.setText("Output folders folders on build path:"); //$NON-NLS-1$
label.setText(UIMessages.getString("CLocationOutputTab.0")); //$NON-NLS-1$
}
public ICExclusionPatternPathEntry[] getEntries(ICResourceDescription cfgd) {

View file

@ -25,7 +25,7 @@ public class CLocationSourceTab extends CLocationTab {
public void createControls(Composite parent) {
super.createControls(parent);
label.setText("Source folders on build path:"); //$NON-NLS-1$
label.setText(UIMessages.getString("CLocationSourceTab.0")); //$NON-NLS-1$
}
public ICExclusionPatternPathEntry newEntry(IPath p, IPath[] ex, boolean isWorkspacePath) {

View file

@ -78,10 +78,10 @@ public abstract class CLocationTab extends AbstractCPropertyTab {
public String toString() {
String[] s = getExts();
if (s.length == 0) return NewUIMessages.getResourceString("CLocationTab.0"); //$NON-NLS-1$
String x = NewUIMessages.getResourceString("CLocationTab.1"); //$NON-NLS-1$
for (int i=0; i< s.length; i++) x = x + s[i] + NewUIMessages.getResourceString("CLocationTab.2"); //$NON-NLS-1$
x = x.substring(0, x.length() - 2) + NewUIMessages.getResourceString("CLocationTab.3"); //$NON-NLS-1$
if (s.length == 0) return UIMessages.getString("CLocationTab.0"); //$NON-NLS-1$
String x = UIMessages.getString("CLocationTab.1"); //$NON-NLS-1$
for (int i=0; i< s.length; i++) x = x + s[i] + UIMessages.getString("CLocationTab.2"); //$NON-NLS-1$
x = x.substring(0, x.length() - 2) + UIMessages.getString("CLocationTab.3"); //$NON-NLS-1$
return x;
}
}
@ -115,7 +115,7 @@ public abstract class CLocationTab extends AbstractCPropertyTab {
updateButtons();
}});
initButtons(new String[] {NewUIMessages.getResourceString("CLocationTab.4"),NewUIMessages.getResourceString("CLocationTab.5"), NewUIMessages.getResourceString("CLocationTab.6"), NewUIMessages.getResourceString("CLocationTab.7")}, 150); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
initButtons(new String[] {UIMessages.getString("CLocationTab.4"),UIMessages.getString("CLocationTab.5"), UIMessages.getString("CLocationTab.6"), UIMessages.getString("CLocationTab.7")}, 150); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
tree.setContentProvider(new ITreeContentProvider() {
public Object[] getChildren(Object parentElement) {
if (parentElement instanceof _Entry)

View file

@ -53,7 +53,7 @@ public class ConfigMultiSelectionDialog extends Dialog {
protected void configureShell(Shell shell) {
super.configureShell(shell);
shell.setText(NewUIMessages.getResourceString("ConfigMultiSelectionDialog.0")); //$NON-NLS-1$
shell.setText(UIMessages.getString("ConfigMultiSelectionDialog.0")); //$NON-NLS-1$
}
/**
@ -83,14 +83,14 @@ public class ConfigMultiSelectionDialog extends Dialog {
message = new Label(composite, SWT.NONE);
message.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
message.setText(NewUIMessages.getResourceString("ConfigMultiSelectionDialog.1")); //$NON-NLS-1$
message.setText(UIMessages.getString("ConfigMultiSelectionDialog.1")); //$NON-NLS-1$
message.setForeground(composite.getDisplay().getSystemColor(SWT.COLOR_RED));
TableColumn col = new TableColumn(table, SWT.NONE);
col.setText(NewUIMessages.getResourceString("ManageConfigDialog.1")); //$NON-NLS-1$
col.setText(UIMessages.getString("ManageConfigDialog.1")); //$NON-NLS-1$
col.setWidth(100);
col = new TableColumn(table, SWT.NONE);
col.setText(NewUIMessages.getResourceString("ManageConfigDialog.2")); //$NON-NLS-1$
col.setText(UIMessages.getString("ManageConfigDialog.2")); //$NON-NLS-1$
col.setWidth(120);
tv = new CheckboxTableViewer(table);

View file

@ -66,7 +66,7 @@ public class EnvDialog extends Dialog {
GridData gd;
Label l1 = new Label(c, SWT.NONE);
l1.setText(NewUIMessages.getResourceString("EnvDialog.0")); //$NON-NLS-1$
l1.setText(UIMessages.getString("EnvDialog.0")); //$NON-NLS-1$
l1.setLayoutData(new GridData(GridData.BEGINNING));
text1 = new Text(c, SWT.SINGLE | SWT.BORDER);
@ -78,7 +78,7 @@ public class EnvDialog extends Dialog {
public void modifyText(ModifyEvent e) { setButtons(); }});
Label l2 = new Label(c, SWT.NONE);
l2.setText(NewUIMessages.getResourceString("EnvDialog.1")); //$NON-NLS-1$
l2.setText(UIMessages.getString("EnvDialog.1")); //$NON-NLS-1$
l2.setLayoutData(new GridData(GridData.BEGINNING));
text2 = new Text(c, SWT.SINGLE | SWT.BORDER);
@ -89,7 +89,7 @@ public class EnvDialog extends Dialog {
public void modifyText(ModifyEvent e) { setButtons(); }});
final Button b = new Button(c, SWT.PUSH);
b.setText(NewUIMessages.getResourceString("EnvDialog.2")); //$NON-NLS-1$
b.setText(UIMessages.getString("EnvDialog.2")); //$NON-NLS-1$
b.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
String x = AbstractCPropertyTab.getVariableDialog(b.getShell(), cfgd);
@ -103,7 +103,7 @@ public class EnvDialog extends Dialog {
b.setLayoutData(gd);
b_add2all = new Button(c, SWT.CHECK);
b_add2all.setText(NewUIMessages.getResourceString("EnvDialog.3")); //$NON-NLS-1$
b_add2all.setText(UIMessages.getString("EnvDialog.3")); //$NON-NLS-1$
gd = new GridData(GridData.FILL_HORIZONTAL);
if (cfgd == null)
b_add2all.setVisible(false);

View file

@ -101,7 +101,7 @@ public class EnvironmentTab extends AbstractCPropertyTab {
return td.var.getName();
case 1:
if(td.var.getOperation() == IEnvironmentVariable.ENVVAR_REMOVE)
return NewUIMessages.getResourceString(VALUE_UNDEF);
return UIMessages.getString(VALUE_UNDEF);
return td.var.getValue();
}
return EMPTY_STR;
@ -143,7 +143,7 @@ public class EnvironmentTab extends AbstractCPropertyTab {
super.createControls(parent);
usercomp.setLayout(new GridLayout(1, false));
Label l1 = new Label(usercomp, SWT.LEFT);
l1.setText(NewUIMessages.getResourceString("EnvironmentTab.0")); //$NON-NLS-1$
l1.setText(UIMessages.getString("EnvironmentTab.0")); //$NON-NLS-1$
l1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
table = new Table(usercomp, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.H_SCROLL | SWT.FULL_SELECTION);
table.setHeaderVisible(true);
@ -173,16 +173,16 @@ public class EnvironmentTab extends AbstractCPropertyTab {
tv.setLabelProvider(new EnvironmentLabelProvider(true));
// add headers
TableColumn tc = new TableColumn(table, SWT.LEFT);
tc.setText(NewUIMessages.getResourceString("EnvironmentTab.1")); //$NON-NLS-1$
tc.setText(UIMessages.getString("EnvironmentTab.1")); //$NON-NLS-1$
tc.setWidth(200);
tc = new TableColumn(table, SWT.LEFT);
tc.setText(NewUIMessages.getResourceString("EnvironmentTab.2")); //$NON-NLS-1$
tc.setText(UIMessages.getString("EnvironmentTab.2")); //$NON-NLS-1$
tc.setWidth(200);
table.setLayoutData(new GridData(GridData.FILL_BOTH));
b1 = new Button(usercomp, SWT.RADIO);
b1.setText(NewUIMessages.getResourceString("EnvironmentTab.3")); //$NON-NLS-1$
b1.setText(UIMessages.getString("EnvironmentTab.3")); //$NON-NLS-1$
b1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
b1.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@ -194,7 +194,7 @@ public class EnvironmentTab extends AbstractCPropertyTab {
}});
b2 = new Button(usercomp, SWT.RADIO);
b2.setText(NewUIMessages.getResourceString("EnvironmentTab.4")); //$NON-NLS-1$
b2.setText(UIMessages.getString("EnvironmentTab.4")); //$NON-NLS-1$
b2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
b2.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@ -205,7 +205,7 @@ public class EnvironmentTab extends AbstractCPropertyTab {
updateData();
}});
initButtons(new String[] {NewUIMessages.getResourceString("EnvironmentTab.5"),NewUIMessages.getResourceString("EnvironmentTab.6"),NewUIMessages.getResourceString("EnvironmentTab.7"),NewUIMessages.getResourceString("EnvironmentTab.8"),NewUIMessages.getResourceString("EnvironmentTab.9")}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
initButtons(new String[] {UIMessages.getString("EnvironmentTab.5"),UIMessages.getString("EnvironmentTab.6"),UIMessages.getString("EnvironmentTab.7"),UIMessages.getString("EnvironmentTab.8"),UIMessages.getString("EnvironmentTab.9")}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
public void buttonPressed(int i) {
@ -215,7 +215,7 @@ public class EnvironmentTab extends AbstractCPropertyTab {
int[] idx;
switch (i) {
case 0:
dlg = new EnvDialog(usercomp.getShell(), var, NewUIMessages.getResourceString("EnvironmentTab.10"), true, cfgd); //$NON-NLS-1$
dlg = new EnvDialog(usercomp.getShell(), var, UIMessages.getString("EnvironmentTab.10"), true, cfgd); //$NON-NLS-1$
if (dlg.open() == Window.OK) {
if (dlg.t1.trim().length() > 0) {
ICConfigurationDescription[] cfgs;
@ -243,7 +243,7 @@ public class EnvironmentTab extends AbstractCPropertyTab {
case 2: // edit
if (n == -1) return;
var = ((TabData)tv.getElementAt(n)).var;
dlg = new EnvDialog(usercomp.getShell(), var, NewUIMessages.getResourceString("EnvironmentTab.11"), false, cfgd); //$NON-NLS-1$
dlg = new EnvDialog(usercomp.getShell(), var, UIMessages.getString("EnvironmentTab.11"), false, cfgd); //$NON-NLS-1$
if (dlg.open() == Window.OK) {
if (cfgd != null)
ce.addVariable( dlg.t1.trim(), dlg.t2.trim(),
@ -347,12 +347,12 @@ public class EnvironmentTab extends AbstractCPropertyTab {
private class MyListSelectionDialog extends ListSelectionDialog {
public boolean toAll = false;
public MyListSelectionDialog(Shell parentShell, Object input, IStructuredContentProvider contentProvider) {
super(parentShell, input, contentProvider, new LabelProvider() {}, NewUIMessages.getResourceString("EnvironmentTab.12")); //$NON-NLS-1$
super(parentShell, input, contentProvider, new LabelProvider() {}, UIMessages.getString("EnvironmentTab.12")); //$NON-NLS-1$
}
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
Button b = new Button(composite, SWT.CHECK);
b.setText(NewUIMessages.getResourceString("EnvironmentTab.13")); //$NON-NLS-1$
b.setText(UIMessages.getString("EnvironmentTab.13")); //$NON-NLS-1$
b.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
if (cfgd == null)
b.setVisible(false);

View file

@ -65,8 +65,8 @@ public class ErrorParsTab extends AbstractCPropertyTab {
initButtons(new String[] {
MOVEUP_STR, MOVEDOWN_STR, null,
NewUIMessages.getResourceString("ErrorParsTab.0"), //$NON-NLS-1$
NewUIMessages.getResourceString("ErrorParsTab.1") //$NON-NLS-1$
UIMessages.getString("ErrorParsTab.0"), //$NON-NLS-1$
UIMessages.getString("ErrorParsTab.1") //$NON-NLS-1$
});
initMapParsers();
}

View file

@ -34,7 +34,7 @@ import org.eclipse.cdt.core.settings.model.ICSettingEntry;
public class ExpDialog extends AbstractPropertyDialog {
protected static final String TO_ALL = NewUIMessages.getResourceString("ExpDialog.5"); //$NON-NLS-1$
protected static final String TO_ALL = UIMessages.getString("ExpDialog.5"); //$NON-NLS-1$
public String[] sel_types = null;
public String[] sel_langs = null;
@ -89,7 +89,7 @@ public class ExpDialog extends AbstractPropertyDialog {
c.setLayout(new GridLayout(4, true));
Label l1 = new Label(c, SWT.NONE);
l1.setText(NewUIMessages.getResourceString("ExpDialog.6")); //$NON-NLS-1$
l1.setText(UIMessages.getString("ExpDialog.6")); //$NON-NLS-1$
l1.setLayoutData(new GridData(GridData.BEGINNING));
txt1 = new Text(c, SWT.SINGLE | SWT.BORDER);
@ -102,7 +102,7 @@ public class ExpDialog extends AbstractPropertyDialog {
}});
Label l2 = new Label(c, SWT.NONE);
l2.setText(NewUIMessages.getResourceString("ExpDialog.7")); //$NON-NLS-1$
l2.setText(UIMessages.getString("ExpDialog.7")); //$NON-NLS-1$
l2.setLayoutData(new GridData(GridData.BEGINNING));
txt2 = new Text(c, SWT.SINGLE | SWT.BORDER);
@ -127,7 +127,7 @@ public class ExpDialog extends AbstractPropertyDialog {
b_vars = setupButton(c, AbstractCPropertyTab.VARIABLESBUTTON_NAME);
c_all = new Button(c, SWT.CHECK);
c_all.setText(NewUIMessages.getResourceString("ExpDialog.0")); //$NON-NLS-1$
c_all.setText(UIMessages.getString("ExpDialog.0")); //$NON-NLS-1$
gd = new GridData(GridData.BEGINNING);
gd.horizontalSpan = 2;
c_all.setLayoutData(gd);
@ -137,7 +137,7 @@ public class ExpDialog extends AbstractPropertyDialog {
b_file = setupButton(c, AbstractCPropertyTab.FILESYSTEMBUTTON_NAME);
c_wsp = new Button(c, SWT.CHECK);
c_wsp.setText(NewUIMessages.getResourceString("ExpDialog.4")); //$NON-NLS-1$
c_wsp.setText(UIMessages.getString("ExpDialog.4")); //$NON-NLS-1$
gd = new GridData(GridData.BEGINNING);
gd.horizontalSpan = 3;
c_wsp.setLayoutData(gd);
@ -156,18 +156,18 @@ public class ExpDialog extends AbstractPropertyDialog {
}
Group dest = new Group(c, SWT.NONE);
dest.setText(NewUIMessages.getResourceString("ExpDialog.1")); //$NON-NLS-1$
dest.setText(UIMessages.getString("ExpDialog.1")); //$NON-NLS-1$
dest.setLayout(new GridLayout(2, true));
gd = new GridData(GridData.FILL_BOTH);
gd.horizontalSpan = 4;
dest.setLayoutData(gd);
Label l = new Label(dest, SWT.NONE);
l.setText(NewUIMessages.getResourceString("ExpDialog.2")); //$NON-NLS-1$
l.setText(UIMessages.getString("ExpDialog.2")); //$NON-NLS-1$
l.setLayoutData(new GridData(GridData.BEGINNING));
l = new Label(dest, SWT.NONE);
l.setText(NewUIMessages.getResourceString("ExpDialog.3")); //$NON-NLS-1$
l.setText(UIMessages.getString("ExpDialog.3")); //$NON-NLS-1$
l.setLayoutData(new GridData(GridData.BEGINNING));
c_langs = new Button(dest, SWT.CHECK);
@ -227,10 +227,10 @@ public class ExpDialog extends AbstractPropertyDialog {
name = txt2.getText().trim();
if (name.length() == 0) {
enabled = false;
message.setText(NewUIMessages.getResourceString("ExpDialog.8")); //$NON-NLS-1$
message.setText(UIMessages.getString("ExpDialog.8")); //$NON-NLS-1$
}
if (enabled && existing != null && existing.contains(name)) {
message.setText(NewUIMessages.getResourceString("ExpDialog.9")); //$NON-NLS-1$
message.setText(UIMessages.getString("ExpDialog.9")); //$NON-NLS-1$
enabled = false;
}
b_ok.setEnabled(enabled);

View file

@ -67,9 +67,9 @@ public class IncludeDialog extends AbstractPropertyDialog {
Label l1 = new Label(c, SWT.NONE);
if ((mode & DIR_MASK) == DIR_MASK)
l1.setText("Directory :"); //$NON-NLS-1$
l1.setText(UIMessages.getString("IncludeDialog.0")); //$NON-NLS-1$
else
l1.setText("File :"); //$NON-NLS-1$
l1.setText(UIMessages.getString("IncludeDialog.1")); //$NON-NLS-1$
gd = new GridData(GridData.BEGINNING);
gd.horizontalSpan = 5;
l1.setLayoutData(gd);
@ -85,7 +85,7 @@ public class IncludeDialog extends AbstractPropertyDialog {
setButtons();
}});
b_add2all = new Button(c, SWT.CHECK);
b_add2all.setText("Add to all configurations"); //$NON-NLS-1$
b_add2all.setText(UIMessages.getString("IncludeDialog.2")); //$NON-NLS-1$
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 4;
if ((mode & OLD_MASK) == OLD_MASK) {
@ -102,7 +102,7 @@ public class IncludeDialog extends AbstractPropertyDialog {
b_file = setupButton(c, AbstractCPropertyTab.FILESYSTEMBUTTON_NAME);
c_wsp = new Button(c, SWT.CHECK);
c_wsp.setText(NewUIMessages.getResourceString("ExpDialog.4")); //$NON-NLS-1$
c_wsp.setText(UIMessages.getString("ExpDialog.4")); //$NON-NLS-1$
gd = new GridData(GridData.BEGINNING);
gd.horizontalSpan = 5;
c_wsp.setLayoutData(gd);

View file

@ -22,14 +22,14 @@ public class IncludeTab extends AbstractLangsListTab {
public void additionalTableSet() {
TableColumn c = new TableColumn(table, SWT.NONE);
c.setWidth(210);
c.setText(NewUIMessages.getResourceString("IncludeTab.0")); //$NON-NLS-1$
c.setText(UIMessages.getString("IncludeTab.0")); //$NON-NLS-1$
showBIButton.setSelection(true);
}
public ICLanguageSettingEntry doAdd() {
IncludeDialog dlg = new IncludeDialog(
usercomp.getShell(), IncludeDialog.NEW_DIR,
NewUIMessages.getResourceString("IncludeTab.1"), //$NON-NLS-1$
UIMessages.getString("IncludeTab.1"), //$NON-NLS-1$
EMPTY_STR, getResDesc().getConfiguration(), 0);
if (dlg.open() && dlg.text1.trim().length() > 0 ) {
toAll = dlg.check1;
@ -45,7 +45,7 @@ public class IncludeTab extends AbstractLangsListTab {
public ICLanguageSettingEntry doEdit(ICLanguageSettingEntry ent) {
IncludeDialog dlg = new IncludeDialog(
usercomp.getShell(), IncludeDialog.OLD_DIR,
NewUIMessages.getResourceString("IncludeTab.2"), //$NON-NLS-1$
UIMessages.getString("IncludeTab.2"), //$NON-NLS-1$
ent.getValue(), getResDesc().getConfiguration(),
(ent.getFlags() & ICSettingEntry.VALUE_WORKSPACE_PATH));
if (dlg.open()) {

View file

@ -48,7 +48,7 @@ public class LanguagesTab extends AbstractCPropertyTab {
table = new Table(usercomp, SWT.V_SCROLL | SWT.H_SCROLL | SWT.FULL_SELECTION | SWT.BORDER);
table.setHeaderVisible(true);
table.setLinesVisible(true);
String[] headers = new String[] {NewUIMessages.getResourceString("LanguagesTab.0"), NewUIMessages.getResourceString("LanguagesTab.1"), }; //$NON-NLS-1$ //$NON-NLS-2$
String[] headers = new String[] {UIMessages.getString("LanguagesTab.0"), UIMessages.getString("LanguagesTab.1"), }; //$NON-NLS-1$ //$NON-NLS-2$
for (int i = 0; i < headers.length; i++) {
TableColumn tc = new TableColumn(table, SWT.LEFT);

View file

@ -28,7 +28,7 @@ public class LibraryPathTab extends AbstractLangsListTab implements IPathEntrySt
public void additionalTableSet() {
TableColumn c = new TableColumn(table, SWT.NONE);
c.setWidth(300);
c.setText(NewUIMessages.getResourceString("LibraryPathTab.0")); //$NON-NLS-1$
c.setText(UIMessages.getString("LibraryPathTab.0")); //$NON-NLS-1$
}
public void createControls(Composite parent) {
@ -45,7 +45,7 @@ public class LibraryPathTab extends AbstractLangsListTab implements IPathEntrySt
public ICLanguageSettingEntry doAdd() {
IncludeDialog dlg = new IncludeDialog(
usercomp.getShell(), IncludeDialog.NEW_DIR,
NewUIMessages.getResourceString("LibraryPathTab.1"), //$NON-NLS-1$
UIMessages.getString("LibraryPathTab.1"), //$NON-NLS-1$
EMPTY_STR, getResDesc().getConfiguration(), 0);
if (dlg.open() && dlg.text1.trim().length() > 0 ) {
int flags = 0;
@ -58,7 +58,7 @@ public class LibraryPathTab extends AbstractLangsListTab implements IPathEntrySt
public ICLanguageSettingEntry doEdit(ICLanguageSettingEntry ent) {
IncludeDialog dlg = new IncludeDialog(
usercomp.getShell(), IncludeDialog.OLD_DIR,
NewUIMessages.getResourceString("LibraryPathTab.2"), //$NON-NLS-1$
UIMessages.getString("LibraryPathTab.2"), //$NON-NLS-1$
ent.getValue(), getResDesc().getConfiguration(),
(ent.getFlags() & ICSettingEntry.VALUE_WORKSPACE_PATH));
if (dlg.open() && dlg.text1.trim().length() > 0 ) {

View file

@ -28,7 +28,7 @@ public class LibraryTab extends AbstractLangsListTab implements IPathEntryStoreL
public void additionalTableSet() {
TableColumn c = new TableColumn(table, SWT.NONE);
c.setWidth(300);
c.setText(NewUIMessages.getResourceString("LibraryTab.0")); //$NON-NLS-1$
c.setText(UIMessages.getString("LibraryTab.0")); //$NON-NLS-1$
}
public void createControls(Composite parent) {
@ -45,7 +45,7 @@ public class LibraryTab extends AbstractLangsListTab implements IPathEntryStoreL
public ICLanguageSettingEntry doAdd() {
IncludeDialog dlg = new IncludeDialog(
usercomp.getShell(), IncludeDialog.NEW_FILE,
NewUIMessages.getResourceString("LibraryTab.1"), //$NON-NLS-1$
UIMessages.getString("LibraryTab.1"), //$NON-NLS-1$
EMPTY_STR, getResDesc().getConfiguration(), 0);
if (dlg.open() && dlg.text1.trim().length() > 0 ) {
int flags = 0;
@ -58,7 +58,7 @@ public class LibraryTab extends AbstractLangsListTab implements IPathEntryStoreL
public ICLanguageSettingEntry doEdit(ICLanguageSettingEntry ent) {
IncludeDialog dlg = new IncludeDialog(
usercomp.getShell(), IncludeDialog.OLD_FILE,
NewUIMessages.getResourceString("LibraryTab.2"), //$NON-NLS-1$
UIMessages.getString("LibraryTab.2"), //$NON-NLS-1$
ent.getValue(), getResDesc().getConfiguration(),
(ent.getFlags() & ICSettingEntry.VALUE_WORKSPACE_PATH));
if (dlg.open() && dlg.text1.trim().length() > 0 ) {

View file

@ -39,7 +39,7 @@ import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.ui.CUIPlugin;
public class ManageConfigDialog extends Dialog {
public static final String MANAGE_TITLE = NewUIMessages.getResourceString("ManageConfigDialog.0"); //$NON-NLS-1$
public static final String MANAGE_TITLE = UIMessages.getString("ManageConfigDialog.0"); //$NON-NLS-1$
private static final String EXTENSION_POINT_ID = "org.eclipse.cdt.ui.newCfgDialog"; //$NON-NLS-1$
public static final String ELEMENT_NAME = "dialog"; //$NON-NLS-1$
public static final String CLASS_NAME = "class"; //$NON-NLS-1$
@ -116,17 +116,17 @@ public class ManageConfigDialog extends Dialog {
table.setLinesVisible(true);
TableColumn col = new TableColumn(table, SWT.NONE);
col.setText(NewUIMessages.getResourceString("ManageConfigDialog.1")); //$NON-NLS-1$
col.setText(UIMessages.getString("ManageConfigDialog.1")); //$NON-NLS-1$
col.setWidth(100);
col = new TableColumn(table, SWT.NONE);
col.setText(NewUIMessages.getResourceString("ManageConfigDialog.2")); //$NON-NLS-1$
col.setText(UIMessages.getString("ManageConfigDialog.2")); //$NON-NLS-1$
col.setWidth(120);
col = new TableColumn(table, SWT.NONE);
col.setText(NewUIMessages.getResourceString("ManageConfigDialog.3")); //$NON-NLS-1$
col.setText(UIMessages.getString("ManageConfigDialog.3")); //$NON-NLS-1$
col.setWidth(80);
actBtn = new Button(composite, SWT.PUSH);
actBtn.setText(NewUIMessages.getResourceString("ManageConfigDialog.4")); //$NON-NLS-1$
actBtn.setText(UIMessages.getString("ManageConfigDialog.4")); //$NON-NLS-1$
actBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
actBtn.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@ -139,7 +139,7 @@ public class ManageConfigDialog extends Dialog {
}} );
newBtn = new Button(composite, SWT.PUSH);
newBtn.setText(NewUIMessages.getResourceString(NEW));
newBtn.setText(UIMessages.getString(NEW));
newBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
newBtn.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@ -147,7 +147,7 @@ public class ManageConfigDialog extends Dialog {
}} );
delBtn = new Button(composite, SWT.PUSH);
delBtn.setText(NewUIMessages.getResourceString(REMOVE));
delBtn.setText(UIMessages.getString(REMOVE));
delBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
delBtn.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@ -155,7 +155,7 @@ public class ManageConfigDialog extends Dialog {
}} );
renBtn = new Button(composite, SWT.PUSH);
renBtn.setText(NewUIMessages.getResourceString(RENAME));
renBtn.setText(UIMessages.getString(RENAME));
renBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
renBtn.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@ -172,7 +172,7 @@ public class ManageConfigDialog extends Dialog {
INewCfgDialog dialog = handleSpecificMBS(mbs_id);
if (dialog == null) { // default (core) implementation.
dialog = new NewConfigurationDialog(getShell());
dialog.setTitle(NewUIMessages.getResourceString(NEW_CONF_DLG));
dialog.setTitle(UIMessages.getString(NEW_CONF_DLG));
}
dialog.setProject(des);
if (dialog.open() == OK) updateData();
@ -219,7 +219,7 @@ public class ManageConfigDialog extends Dialog {
ICConfigurationDescription cfgd = (ICConfigurationDescription) table.getItem(sel).getData();
RenameConfigurationDialog dialog = new RenameConfigurationDialog(
getShell(), cfgd, des.getConfigurations(),
NewUIMessages.getResourceString(RENAME_CONF_DLG));
UIMessages.getString(RENAME_CONF_DLG));
if (dialog.open() == OK) {
cfgd.setName(dialog.getNewName());
cfgd.setDescription(dialog.getNewDescription());
@ -240,8 +240,8 @@ public class ManageConfigDialog extends Dialog {
// Get the confirmation from user before deleting the configuration
Shell shell = CUIPlugin.getActiveWorkbenchShell();
boolean shouldDelete = MessageDialog.openQuestion(shell,
NewUIMessages.getResourceString("ManageConfig.deletedialog.title"), //$NON-NLS-1$
NewUIMessages.getFormattedString("ManageConfig.deletedialog.message", //$NON-NLS-1$
UIMessages.getString("ManageConfig.deletedialog.title"), //$NON-NLS-1$
UIMessages.getFormattedString("ManageConfig.deletedialog.message", //$NON-NLS-1$
names));
if (shouldDelete) {
boolean wasActive = false;
@ -279,7 +279,7 @@ public class ManageConfigDialog extends Dialog {
TableItem t = new TableItem(table, 0);
t.setText(0, cfgds[i].getName());
t.setText(1, cfgds[i].getDescription());
t.setText(2, cfgds[i].isActive() ? NewUIMessages.getResourceString("ManageConfigDialog.5") : ""); //$NON-NLS-1$ //$NON-NLS-2$
t.setText(2, cfgds[i].isActive() ? UIMessages.getString("ManageConfigDialog.5") : ""); //$NON-NLS-1$ //$NON-NLS-2$
t.setData(cfgds[i]);
}
if (table.getItemCount() > 0) table.select(0);

View file

@ -123,7 +123,7 @@ public class MultiLineTextFieldEditor extends FieldEditor {
init(name, labelText);
setValidateStrategy(strategy);
isValid = false;
errorMessage = NewUIMessages.getResourceString(ERROR_MESSAGE);
errorMessage = UIMessages.getString(ERROR_MESSAGE);
createControl(parent);
}

View file

@ -158,7 +158,7 @@ public class NewConfigurationDialog extends Dialog implements INewCfgDialog {
// Add a label and a text widget for Configuration's name
final Label nameLabel = new Label(group1, SWT.LEFT);
nameLabel.setFont(parent.getFont());
nameLabel.setText(NewUIMessages.getResourceString(NAME));
nameLabel.setText(UIMessages.getString(NAME));
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 1;
@ -182,7 +182,7 @@ public class NewConfigurationDialog extends Dialog implements INewCfgDialog {
// Add a label and a text widget for Configuration's description
final Label descriptionLabel = new Label(group1, SWT.LEFT);
descriptionLabel.setFont(parent.getFont());
descriptionLabel.setText(NewUIMessages.getResourceString(DESCRIPTION));
descriptionLabel.setText(UIMessages.getString(DESCRIPTION));
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 1;
@ -200,7 +200,7 @@ public class NewConfigurationDialog extends Dialog implements INewCfgDialog {
final Group group = new Group(composite, SWT.NONE);
group.setFont(composite.getFont());
group.setText(NewUIMessages.getResourceString(GROUP));
group.setText(UIMessages.getString(GROUP));
GridLayout layout = new GridLayout(1, false);
group.setLayout(layout);
gd = new GridData(GridData.FILL_HORIZONTAL);
@ -327,12 +327,12 @@ public class NewConfigurationDialog extends Dialog implements INewCfgDialog {
s = ""; //$NON-NLS-1$
// Make sure the name is not a duplicate
} else if (isDuplicateName(currentName)) {
s = NewUIMessages.getFormattedString(DUPLICATE, currentName);
s = UIMessages.getFormattedString(DUPLICATE, currentName);
} else if (isSimilarName(currentName)) {
s = NewUIMessages.getFormattedString(CASE, currentName);
s = UIMessages.getFormattedString(CASE, currentName);
} else if (!validateName(currentName)) {
// TODO Create a decent I18N string to describe this problem
s = NewUIMessages.getFormattedString(INVALID, currentName);
s = UIMessages.getFormattedString(INVALID, currentName);
}
if (statusLabel == null) return;
Button b = getButton(IDialogConstants.OK_ID);

View file

@ -406,6 +406,8 @@ CLocationTab.4=Add workspace folder
CLocationTab.5=Create / link folder
CLocationTab.6=Edit filter data
CLocationTab.7=Delete folder
CLocationSourceTab.0=Source folders on build path:
CLocationOutputTab.0=Output folders folders on build path:
EnvDialog.0=Name:
EnvDialog.1=Value:
EnvDialog.2=Variables
@ -427,6 +429,9 @@ EnvironmentTab.13=Add to all configurations
IncludeTab.0=Include paths
IncludeTab.1=Add directory path
IncludeTab.2=Change directory path
IncludeDialog.0=Directory :
IncludeDialog.1=File :
IncludeDialog.2=Add to all configurations
LanguagesTab.0=Content type
LanguagesTab.1=Language
LibraryPathTab.0=Library paths

View file

@ -37,7 +37,7 @@ public class RefsTab extends AbstractCPropertyTab {
public void createControls(Composite parent) {
super.createControls(parent);
initButtons(new String[] {NewUIMessages.getResourceString("RefsTab.0"), NewUIMessages.getResourceString("RefsTab.1"), NewUIMessages.getResourceString("RefsTab.2")}, 120); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
initButtons(new String[] {UIMessages.getString("RefsTab.0"), UIMessages.getString("RefsTab.1"), UIMessages.getString("RefsTab.2")}, 120); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
usercomp.setLayout(new GridLayout(1, false));
tree = new Tree(usercomp, SWT.SINGLE | SWT.CHECK | SWT.BORDER);

View file

@ -123,7 +123,7 @@ public class RenameConfigurationDialog extends Dialog {
// Add a label and a text widget for Configuration's name
final Label nameLabel = new Label(group1, SWT.LEFT);
nameLabel.setFont(parent.getFont());
nameLabel.setText(NewUIMessages.getResourceString(NAME));
nameLabel.setText(UIMessages.getString(NAME));
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 1;
@ -147,7 +147,7 @@ public class RenameConfigurationDialog extends Dialog {
// Add a label and a text widget for Configuration's description
final Label descriptionLabel = new Label(group1, SWT.LEFT);
descriptionLabel.setFont(parent.getFont());
descriptionLabel.setText(NewUIMessages.getResourceString(DESCRIPTION));
descriptionLabel.setText(UIMessages.getString(DESCRIPTION));
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 1;
@ -235,11 +235,11 @@ public class RenameConfigurationDialog extends Dialog {
s = ""; //$NON-NLS-1$
// Make sure the name is not a duplicate
} else if (isDuplicateName(currentName)) {
s = NewUIMessages.getFormattedString(DUPLICATE, currentName);
s = UIMessages.getFormattedString(DUPLICATE, currentName);
} else if (isSimilarName(currentName)) {
s = NewUIMessages.getFormattedString(CASE, currentName);
s = UIMessages.getFormattedString(CASE, currentName);
} else if (!validateName(currentName)) {
s = NewUIMessages.getFormattedString(INVALID, currentName);
s = UIMessages.getFormattedString(INVALID, currentName);
}
Button b = getButton(IDialogConstants.OK_ID);
if (s != null) {

View file

@ -90,7 +90,7 @@ public class StructureTreeTab extends AbstractCPropertyTab {
c.setLayoutData(new GridData(GridData.FILL_BOTH));
c.setLayout(new GridLayout(2, false));
Label l = new Label(c, 0);
l.setText(NewUIMessages.getResourceString("StructureTreeTab.0")); //$NON-NLS-1$
l.setText(UIMessages.getString("StructureTreeTab.0")); //$NON-NLS-1$
c.setLayoutData(new GridData(GridData.BEGINNING));
Spinner sp = new Spinner(c, SWT.BORDER);
sp.setMaximum(NESTING_MAX);
@ -130,7 +130,7 @@ public class StructureTreeTab extends AbstractCPropertyTab {
ti = ti.getParentItem();
if (ti == null) return true;
}
tiSaved.setText(2, NewUIMessages.getResourceString("StructureTreeTab.1")); //$NON-NLS-1$
tiSaved.setText(2, UIMessages.getString("StructureTreeTab.1")); //$NON-NLS-1$
tiSaved.setImage(IMG);
return false;
}
@ -148,7 +148,7 @@ public class StructureTreeTab extends AbstractCPropertyTab {
}
private TreeItem create(TreeItem ti0, String text, long val) {
TreeItem t = create(ti0, text, String.valueOf(val));
t.setText(2, NewUIMessages.getResourceString("StructureTreeTab.2")); //$NON-NLS-1$
t.setText(2, UIMessages.getString("StructureTreeTab.2")); //$NON-NLS-1$
return t;
}
@ -156,7 +156,7 @@ public class StructureTreeTab extends AbstractCPropertyTab {
TreeItem ti = ti0 == null ? new TreeItem(tree, 0) : new TreeItem(ti0, 0);
ti.setText(0, text == null ? NULL : text);
ti.setText(1, val == null ? NULL : val );
ti.setText(2, NewUIMessages.getResourceString("StructureTreeTab.3")); //$NON-NLS-1$
ti.setText(2, UIMessages.getString("StructureTreeTab.3")); //$NON-NLS-1$
return ti;
}
@ -165,15 +165,15 @@ public class StructureTreeTab extends AbstractCPropertyTab {
usercomp.setLayout(new GridLayout(5, false));
Label lb = new Label(usercomp, 0);
lb.setText(NewUIMessages.getResourceString("StructureTreeTab.4")); //$NON-NLS-1$
lb.setText(UIMessages.getString("StructureTreeTab.4")); //$NON-NLS-1$
lb.setLayoutData(new GridData(GridData.BEGINNING));
combo = new Combo(usercomp, SWT.BORDER);
combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
combo.add(NewUIMessages.getResourceString("ConfigDescriptionTab.0")); //$NON-NLS-1$
combo.add(NewUIMessages.getResourceString("ConfigDescriptionTab.1")); //$NON-NLS-1$
combo.add(UIMessages.getString("ConfigDescriptionTab.0")); //$NON-NLS-1$
combo.add(UIMessages.getString("ConfigDescriptionTab.1")); //$NON-NLS-1$
if (page.isForFolder() || page.isForFile()) {
combo.add(NewUIMessages.getResourceString("ConfigDescriptionTab.2")); //$NON-NLS-1$
combo.add(UIMessages.getString("ConfigDescriptionTab.2")); //$NON-NLS-1$
combo.select(2); // ResourceDescription
} else
combo.select(1); // ConfigurationDescription
@ -186,7 +186,7 @@ public class StructureTreeTab extends AbstractCPropertyTab {
GridData gd = new GridData(GridData.END);
gd.minimumWidth = BUTTON_WIDTH;
b1.setLayoutData(gd);
b1.setText(NewUIMessages.getResourceString("StructureTreeTab.5")); //$NON-NLS-1$
b1.setText(UIMessages.getString("StructureTreeTab.5")); //$NON-NLS-1$
b1.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
tree.setRedraw(false);
@ -198,7 +198,7 @@ public class StructureTreeTab extends AbstractCPropertyTab {
gd = new GridData(GridData.END);
gd.minimumWidth = BUTTON_WIDTH;
b2.setLayoutData(gd);
b2.setText(NewUIMessages.getResourceString("StructureTreeTab.6")); //$NON-NLS-1$
b2.setText(UIMessages.getString("StructureTreeTab.6")); //$NON-NLS-1$
b2.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
LevelDialog ld = new LevelDialog();
@ -213,7 +213,7 @@ public class StructureTreeTab extends AbstractCPropertyTab {
gd = new GridData(GridData.END);
gd.minimumWidth = BUTTON_WIDTH;
b3.setLayoutData(gd);
b3.setText(NewUIMessages.getResourceString("StructureTreeTab.7")); //$NON-NLS-1$
b3.setText(UIMessages.getString("StructureTreeTab.7")); //$NON-NLS-1$
b3.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
tree.setRedraw(false);
@ -227,13 +227,13 @@ public class StructureTreeTab extends AbstractCPropertyTab {
tree.setLayoutData(gd);
TreeColumn tc = new TreeColumn(tree, 0);
tc.setText(NewUIMessages.getResourceString("StructureTreeTab.8")); //$NON-NLS-1$
tc.setText(UIMessages.getString("StructureTreeTab.8")); //$NON-NLS-1$
tc.setWidth(300);
tc = new TreeColumn(tree, 0);
tc.setText(NewUIMessages.getResourceString("StructureTreeTab.9")); //$NON-NLS-1$
tc.setText(UIMessages.getString("StructureTreeTab.9")); //$NON-NLS-1$
tc.setWidth(100);
tc = new TreeColumn(tree, 0);
tc.setText(NewUIMessages.getResourceString("StructureTreeTab.10")); //$NON-NLS-1$
tc.setText(UIMessages.getString("StructureTreeTab.10")); //$NON-NLS-1$
tc.setWidth(200);
tree.setHeaderVisible(true);
@ -755,7 +755,7 @@ public class StructureTreeTab extends AbstractCPropertyTab {
try {
tree.removeAll();
TreeItem ti = new TreeItem(tree, 0);
ti.setText(0, NewUIMessages.getResourceString("StructureTreeTab.11")); //$NON-NLS-1$
ti.setText(0, UIMessages.getString("StructureTreeTab.11")); //$NON-NLS-1$
tree.update();
tree.setRedraw(false);
tree.removeAll();

View file

@ -16,7 +16,6 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
@ -55,12 +54,13 @@ public class SymbolDialog extends AbstractPropertyDialog {
GridData gd;
Label l1 = new Label(c, SWT.NONE);
l1.setText(NewUIMessages.getResourceString("SymbolDialog.0")); //$NON-NLS-1$
l1.setText(UIMessages.getString("SymbolDialog.0")); //$NON-NLS-1$
l1.setLayoutData(new GridData(GridData.BEGINNING));
txt1 = new Text(c, SWT.SINGLE | SWT.BORDER);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 3;
gd.widthHint = 300;
txt1.setLayoutData(gd);
txt1.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
@ -68,22 +68,23 @@ public class SymbolDialog extends AbstractPropertyDialog {
}});
Label l2 = new Label(c, SWT.NONE);
l2.setText(NewUIMessages.getResourceString("SymbolDialog.1")); //$NON-NLS-1$
l2.setText(UIMessages.getString("SymbolDialog.1")); //$NON-NLS-1$
l2.setLayoutData(new GridData(GridData.BEGINNING));
txt2 = new Text(c, SWT.SINGLE | SWT.BORDER);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
gd.widthHint = 200;
txt2.setLayoutData(gd);
txt2.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
setButtons();
}});
b_vars = setupButton(c, "Variables..."); //$NON-NLS-1$
b_vars = setupButton(c, AbstractCPropertyTab.VARIABLESBUTTON_NAME);
b_add2all = new Button(c, SWT.CHECK);
b_add2all.setText(NewUIMessages.getResourceString("SymbolDialog.2")); //$NON-NLS-1$
b_add2all.setText(UIMessages.getString("SymbolDialog.2")); //$NON-NLS-1$
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 4;
b_add2all.setLayoutData(gd);
@ -100,9 +101,6 @@ public class SymbolDialog extends AbstractPropertyDialog {
c.getShell().setDefaultButton(b_ok);
c.pack();
Rectangle r = shell.getBounds();
r.width = 400;
shell.setBounds(r);
// moved here to avoid accessing b_ok before it created.
txt1.setText(data1);

View file

@ -25,17 +25,17 @@ import org.eclipse.cdt.core.settings.model.ICSettingEntry;
public class SymbolTab extends AbstractLangsListTab {
public void additionalTableSet() {
TableColumn tc = new TableColumn(table, SWT.LEFT);
tc.setText(NewUIMessages.getResourceString("SymbolTab.0")); //$NON-NLS-1$
tc.setText(UIMessages.getString("SymbolTab.0")); //$NON-NLS-1$
tc.setWidth(80);
tc = new TableColumn(table, SWT.LEFT);
tc.setText(NewUIMessages.getResourceString("SymbolTab.1")); //$NON-NLS-1$
tc.setText(UIMessages.getString("SymbolTab.1")); //$NON-NLS-1$
tc.setWidth(130);
}
public ICLanguageSettingEntry doAdd() {
SymbolDialog dlg = new SymbolDialog(
usercomp.getShell(), true,
NewUIMessages.getResourceString("SymbolTab.2"), EMPTY_STR, EMPTY_STR, getResDesc()); //$NON-NLS-1$
UIMessages.getString("SymbolTab.2"), EMPTY_STR, EMPTY_STR, getResDesc()); //$NON-NLS-1$
if (dlg.open() && dlg.text1.trim().length() > 0 ) {
toAll = dlg.check1;
return new CMacroEntry(dlg.text1, dlg.text2, 0);
@ -46,7 +46,7 @@ public class SymbolTab extends AbstractLangsListTab {
public ICLanguageSettingEntry doEdit(ICLanguageSettingEntry ent) {
SymbolDialog dlg = new SymbolDialog(
usercomp.getShell(), false,
NewUIMessages.getResourceString("SymbolTab.3"), ent.getName(), //$NON-NLS-1$
UIMessages.getString("SymbolTab.3"), ent.getName(), //$NON-NLS-1$
ent.getValue(), getResDesc());
if (dlg.open())
return new CMacroEntry(dlg.text1, dlg.text2, 0);

View file

@ -17,7 +17,7 @@ import java.util.ResourceBundle;
/**
* @since 2.0
*/
public class NewUIMessages {
public class UIMessages {
// Bundle ID
private static final String BUNDLE_ID = "org.eclipse.cdt.ui.newui.PluginResources"; //$NON-NLS-1$
//Resource bundle.
@ -32,14 +32,14 @@ public class NewUIMessages {
}
public static String getFormattedString(String key, String arg) {
return MessageFormat.format(getResourceString(key), new String[] { arg });
return MessageFormat.format(getString(key), new String[] { arg });
}
public static String getFormattedString(String key, String[] args) {
return MessageFormat.format(getResourceString(key), args);
return MessageFormat.format(getString(key), args);
}
public static String getResourceString(String key) {
public static String getString(String key) {
try {
return resourceBundle.getString(key);
} catch (MissingResourceException e) {
@ -49,7 +49,7 @@ public class NewUIMessages {
}
}
private NewUIMessages() {
private UIMessages() {
// No constructor
}