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

extern'd strings

This commit is contained in:
David Inglis 2004-03-02 21:37:42 +00:00
parent d09d576efd
commit 948797c20e
17 changed files with 260 additions and 171 deletions

View file

@ -31,9 +31,6 @@ ViewMake.name=Make Targets
ActionSetMake.label=Make Actions
ActionSetUpdateMake.label=Update Make Projects
# Scope and Key Commands
scope.makefileEditor.name=Makefile Editor
makefileEditor.description=Editor for Makefile Files
category.source.name=Makefile Source
category.source.description= Makefile Source Actions

View file

@ -224,12 +224,6 @@
description="%category.source.description"
id="org.eclipse.cdt.make.ui.category.source">
</category>
<scope
name="%scope.makefileEditor.name"
parent="org.eclipse.ui.textEditorScope"
description="%makefileEditor.description"
id="org.eclipse.cdt.make.ui.makefileEditorScope">
</scope>
<command
name="%ActionDefinition.comment.name"
description="%ActionDefinition.comment.description"

View file

@ -15,10 +15,15 @@ MakeCCWizardSettings.description=Define the project and 'make' builder settings
WizardMakeProjectConversion.title=Convert to C/C++ Make project
WizardMakeProjectConversion.description=Convert a prject to a C/C++ project which uses 'make' to build it.
WizardMakeProjectConversion.monitor.convertingToMakeProject=Converting to Make Project...
MakeWizardUpdate.window_title=Make Project Migration
MakeWizardUpdatePage.title=Make Project Migration
MakeWizardUpdatePage.description=Migrate older make projects to new make builder.
MakeWizardUpdatePage.projectList=Project list
MakeWizardUpdatePage.status.noProjectsToUpdate=No projects to update
MakeWizardUpdatePage.status.noProjectsSelected=No projects selected
WizardCheckboxTablePart.WizardCheckboxTablePart.selectAll=Select All
WizardCheckboxTablePart.WizardCheckboxTablePart.deselectAll=Deselect All
@ -78,6 +83,75 @@ AddBuildTargetAction.description=Add To Build Target
AddBuildTargetAction.tooltip= Add To Build Target
AddBuildTargetAction.exception.internal=Internal Error
TargetBuild.execption.message=Target Build Error
TargetBuild.monitor.beginTask=Building Targets...
TargetListViewer.button.add=Add...
TargetListViewer.button.remove=Remove
TargetListViewer.button.edit=Edit...
TargetListViewer.lable.target=Target
TargetListViewer.lable.location=Location
TargetListViewer.exception.error=Error
TargetListViewer.exception.message=An error occurred performing the selected action
UpdateMakeProjectAction.exception.error=Error
UpdateMakeProjectAction.eception.message=Error updating Make Projects
UpdateMakeProjectAction.monitor.convert=Converting Make Targets...
UpdateMakeProjectAction.monitor.update=Updating make Projects...
BuildPathInfoBlock.button.browse=Browse...
BuildPathInfoBlock.description=Set the include paths and preprocessor symbols for this project
BuildPathInfoBlock.monitor.settingScannerInfo=Setting Scanner Info
BuildTargetDialog.title.buildTarget=Build Targets
BuildTargetDialog.button.build=Build
BuildTargetDialog.title.makeTargetsFor=Make Targets for:
MakeTargetDialog.exception.noTargetBuilderOnProject=Not target builders on the project
MakeTargetDialog.title.createMakeTarget=Create a new Make target.
MakeTargetDialog.title.modifyMakeTarget=Modify a Make target,
MakeTargetDialog.message.mustSpecifyName=Must specify a target name.
MakeTargetDialog.message.targetWithNameExists=Target with that name already exits
MakeTargetDialog.message.mustSpecifyBuildCommand=Must specify a build command
MakeTargetDialog.button.update=Update
MakeTargetDialog.button.create=Create
MakeTargetDialog.exception.makeTargetError=Make Target Error
MakeTargetDialog.exception.errorAddingTarget=Error adding target
SettingsBlock.title.selectLocationToBuildFrom=Selection Location to build from.
SettingsBlock.label.missingBuilderInformation=Missing builder information on project.
SettingsBlock.monitor.applyingSettings=Applying Settings...
SettingsBlock.message.mustEnterBuildCommand=Must enter a build command
DeleteTargetAction.label=Delete Build Target
DeleteTargetAction.tooltip=Delete Build Target
DeleteTargetAction.title.confirmDeletion=Confirm Target Deletion
DeleteTargetAction.message.confirmDeleteion=Are you sure you want to delete ''{0}''?
DeleteTargetAction.title.confirmMultipleDeletion=Confirm Multiple Target Deletion
DeleteTargetAction.message.confirmMultipleDeletion=Are you sure you want to delete these {0} targets?
DeleteTargetAction.exception.removeError=Target Remove Error
DeleteTargetAction.exception.errorDeletingBuildTarget=Error deleting build target
BuildTargetAction.label=Build Target
BuildTargetAction.tooltip=Build Target
EditTargetAction.label=Edit Build Target
EditTargetAction.tooltip=Edit Build Target
EditTargetAction.exception.internalError=Internal Error
EditTargetAction.exception.errorEditingTarget=Error editing target.
AddTargetAction.label=Add Build Target
AddTargetAction.tooltip=Add Build Target
AddTargetAction.exception.internalError=Internal Error
AddTargetAction.=Internal Error
# Startup messages
MakeUIPlugin.update_project=Update make projects
MakeUIPlugin.update_project_message=Older \'make\' projects have been detected in your workspace. \n These projects are no longer supported, would you like to convert these now?
# Prefernece Page
MakePreferencePage.description=Make Project Preferences
# Makefile Editor messages
ContentAssistProposal.label=Content Assist@Ctrl+SPACE
ContentAssistProposal.tooltip=Content Assist
@ -109,6 +183,3 @@ LexicalSortingAction.tooltip=Sort
LexicalSortingAction.tooltip.on=Do Not Sort
LexicalSortingAction.tooltip.off=Sort
MakeUIPlugin.update_project=Update make projects
MakeUIPlugin.update_project_message=Older \'make\' projects have been detected in your workspace. \n These projects are no longer supported, would you like to convert these now?
MakePreferencePage.description=Make Project Preferences

View file

@ -74,7 +74,7 @@ public class TargetBuild {
try {
TargetBuild.run(true, pd, targets);
} catch (InvocationTargetException e) {
MakeUIPlugin.errorDialog(shell, "Target Build Error", "Error Building Target", e);
MakeUIPlugin.errorDialog(shell, MakeUIPlugin.getResourceString("TargetBuild.execption.message"), e.getTargetException().toString(), e.getTargetException()); //$NON-NLS-1$
}
}
@ -87,7 +87,7 @@ public class TargetBuild {
try {
IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
monitor.beginTask("Building Targets...", targets.length);
monitor.beginTask(MakeUIPlugin.getResourceString("TargetBuild.monitor.beginTask"), targets.length); //$NON-NLS-1$
for( int i = 0; i < targets.length; i++) {
targets[i].build(new SubProgressMonitor(monitor, 1));
}

View file

@ -26,115 +26,143 @@ import org.eclipse.swt.widgets.TableColumn;
public class TargetListViewerPart extends StructuredViewerPart {
private TableViewer tableViewer;
private IMakeTarget fSelectedTarget;
private final int ADD_TARGET = 0;
private final int REMOVE_TARGET = 1;
private final int EDIT_TARGET = 2;
private IContainer fContainer;
private TableViewer tableViewer;
private IMakeTarget fSelectedTarget;
private final int ADD_TARGET = 0;
private final int REMOVE_TARGET = 1;
private final int EDIT_TARGET = 2;
private IContainer fContainer;
public TargetListViewerPart(IContainer container) {
super(new String[] { "Add Target...", "Remove Target", "Edit Target..." });
fContainer = container;
}
public TargetListViewerPart(IContainer container) {
super(new String[] {
MakeUIPlugin.getResourceString("TargetListViewer.button.add"), //$NON-NLS-1$
MakeUIPlugin
.getResourceString("TargetListViewer.button.remove"), //$NON-NLS-1$
MakeUIPlugin.getResourceString("TargetListViewer.button.edit")}); //$NON-NLS-1$
fContainer = container;
}
protected StructuredViewer createStructuredViewer(Composite parent, int style) {
tableViewer = new TableViewer(parent, SWT.SINGLE | SWT.BORDER);
Table table = (Table) tableViewer.getControl();
TableLayout layout = new TableLayout();
protected StructuredViewer createStructuredViewer(Composite parent,
int style) {
tableViewer = new TableViewer(parent, SWT.SINGLE | SWT.BORDER);
Table table = (Table) tableViewer.getControl();
TableLayout layout = new TableLayout();
layout.addColumnData(new ColumnWeightData(50));
TableColumn tc = new TableColumn(table, SWT.NONE, 0);
tc.setText("Targets");
layout.addColumnData(new ColumnWeightData(50));
TableColumn tc = new TableColumn(table, SWT.NONE, 0);
tc.setText(MakeUIPlugin.getResourceString("TargetListViewer.lable.target")); //$NON-NLS-1$
layout.addColumnData(new ColumnWeightData(50));
tc = new TableColumn(table, SWT.NONE, 1);
tc.setText("Location");
layout.addColumnData(new ColumnWeightData(50));
tc = new TableColumn(table, SWT.NONE, 1);
tc.setText(MakeUIPlugin.getResourceString("TargetListViewer.lable.location")); //$NON-NLS-1$
table.setLayout(layout);
table.setHeaderVisible(true);
table.setLayout(layout);
table.setHeaderVisible(true);
tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent e) {
TargetListViewerPart.this.selectionChanged((IStructuredSelection) e.getSelection());
}
});
tableViewer.setContentProvider(new MakeContentProvider(true));
tableViewer.addFilter(new ViewerFilter() {
public boolean select(Viewer viewer, Object parentElement, Object element) {
return (element instanceof IMakeTarget);
}
});
tableViewer.setLabelProvider(new MakeLabelProvider(fContainer.getProjectRelativePath()));
tableViewer.setInput(fContainer);
tableViewer
.addSelectionChangedListener(new ISelectionChangedListener() {
return tableViewer;
}
public void selectionChanged(SelectionChangedEvent e) {
TargetListViewerPart.this
.selectionChanged((IStructuredSelection) e
.getSelection());
}
});
tableViewer.setContentProvider(new MakeContentProvider(true));
tableViewer.addFilter(new ViewerFilter() {
protected void buttonSelected(Button button, int index) {
try {
switch (index) {
case ADD_TARGET :
{
MakeTargetDialog dialog = new MakeTargetDialog(getControl().getShell(), fContainer);
dialog.open();
}
break;
case REMOVE_TARGET :
IMakeTargetManager manager = MakeCorePlugin.getDefault().getTargetManager();
manager.removeTarget((IMakeTarget) ((IStructuredSelection) getViewer().getSelection()).getFirstElement());
break;
case EDIT_TARGET :
{
MakeTargetDialog dialog =
new MakeTargetDialog(
getControl().getShell(),
(IMakeTarget) ((IStructuredSelection) getViewer().getSelection()).getFirstElement());
dialog.open();
}
public boolean select(Viewer viewer, Object parentElement,
Object element) {
return (element instanceof IMakeTarget);
}
});
tableViewer.setLabelProvider(new MakeLabelProvider(fContainer
.getProjectRelativePath()));
tableViewer.setInput(fContainer);
break;
}
} catch (CoreException e) {
MakeUIPlugin.errorDialog(getControl().getShell(), "Error", "An error occurred performing the selected action", e);
}
}
return tableViewer;
}
protected void selectionChanged(IStructuredSelection selection) {
fSelectedTarget = (IMakeTarget) selection.getFirstElement();
if (getViewer() != null) {
updateEnabledState();
}
}
protected void buttonSelected(Button button, int index) {
try {
switch (index) {
case ADD_TARGET:
{
MakeTargetDialog dialog = new MakeTargetDialog(getControl()
.getShell(), fContainer);
dialog.open();
}
break;
case REMOVE_TARGET:
IMakeTargetManager manager = MakeCorePlugin.getDefault()
.getTargetManager();
manager
.removeTarget((IMakeTarget) ((IStructuredSelection) getViewer()
.getSelection()).getFirstElement());
break;
case EDIT_TARGET:
{
MakeTargetDialog dialog = new MakeTargetDialog(getControl()
.getShell(),
(IMakeTarget) ((IStructuredSelection) getViewer()
.getSelection()).getFirstElement());
dialog.open();
}
public void setSelectedTarget(IMakeTarget target) {
fSelectedTarget = target;
if (tableViewer != null) {
tableViewer.setSelection(new StructuredSelection(fSelectedTarget), false);
}
}
break;
}
} catch (CoreException e) {
MakeUIPlugin
.errorDialog(
getControl().getShell(),
MakeUIPlugin.getResourceString("TargetListViewer.exception.error"), //$NON-NLS-1$
MakeUIPlugin.getResourceString("TargetListViewer.exception.message"), //$NON-NLS-1$
e);
}
}
public IMakeTarget getSelectedTarget() {
return fSelectedTarget;
}
protected void selectionChanged(IStructuredSelection selection) {
fSelectedTarget = (IMakeTarget) selection.getFirstElement();
if (getViewer() != null) {
updateEnabledState();
}
}
/* (non-Javadoc)
* @see org.eclipse.cdt.make.internal.ui.part.SharedPart#updateEnabledState()
*/
protected void updateEnabledState() {
super.updateEnabledState();
setButtonEnabled(REMOVE_TARGET, fSelectedTarget != null && isEnabled());
setButtonEnabled(EDIT_TARGET, fSelectedTarget != null && isEnabled());
}
/* (non-Javadoc)
* @see org.eclipse.cdt.make.internal.ui.part.SharedPart#createControl(org.eclipse.swt.widgets.Composite, int, int)
*/
public void createControl(Composite parent, int style, int span) {
super.createControl(parent, style, span);
updateEnabledState();
if (getViewer() != null && fSelectedTarget != null) {
getViewer().setSelection(new StructuredSelection(fSelectedTarget));
}
}
public void setSelectedTarget(IMakeTarget target) {
fSelectedTarget = target;
if (tableViewer != null) {
tableViewer.setSelection(new StructuredSelection(fSelectedTarget),
false);
}
}
public IMakeTarget getSelectedTarget() {
return fSelectedTarget;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.cdt.make.internal.ui.part.SharedPart#updateEnabledState()
*/
protected void updateEnabledState() {
super.updateEnabledState();
setButtonEnabled(REMOVE_TARGET, fSelectedTarget != null && isEnabled());
setButtonEnabled(EDIT_TARGET, fSelectedTarget != null && isEnabled());
}
/*
* (non-Javadoc)
*
* @see org.eclipse.cdt.make.internal.ui.part.SharedPart#createControl(org.eclipse.swt.widgets.Composite,
* int, int)
*/
public void createControl(Composite parent, int style, int span) {
super.createControl(parent, style, span);
updateEnabledState();
if (getViewer() != null && fSelectedTarget != null) {
getViewer().setSelection(new StructuredSelection(fSelectedTarget));
}
}
}

View file

@ -138,7 +138,7 @@ public class UpdateMakeProjectAction implements IWorkbenchWindowActionDelegate {
} catch (InterruptedException e) {
return;
} catch (InvocationTargetException e) {
MakeUIPlugin.logException(e, "Error", "Error updating Make Projects");
MakeUIPlugin.logException(e, MakeUIPlugin.getResourceString("UpdateMakeProjectAction.exception.error"), MakeUIPlugin.getResourceString("UpdateMakeProjectAction.eception.message")); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@ -152,7 +152,7 @@ public class UpdateMakeProjectAction implements IWorkbenchWindowActionDelegate {
public TargetConvertVisitor(IProgressMonitor monitor) {
this.monitor = monitor;
monitor.beginTask("Converting Make Targets...", TOTAL_WORK);
monitor.beginTask(MakeUIPlugin.getResourceString("UpdateMakeProjectAction.monitor.convert"), TOTAL_WORK); //$NON-NLS-1$
}
public boolean visit(IResourceProxy proxy) throws CoreException {
@ -194,7 +194,7 @@ public class UpdateMakeProjectAction implements IWorkbenchWindowActionDelegate {
}
protected static void doProjectUpdate(IProgressMonitor monitor, IProject[] project) throws CoreException {
monitor.beginTask("Updating make Projects...", project.length * 4);
monitor.beginTask(MakeUIPlugin.getResourceString("UpdateMakeProjectAction.monitor.update"), project.length * 4); //$NON-NLS-1$
try {
for (int i = 0; i < project.length; i++) {
// remove old builder

View file

@ -94,7 +94,7 @@ public class BuildPathInfoBlock extends AbstractCOptionPage {
protected void createButtonsForButtonBar(Composite parent) {
super.createButtonsForButtonBar(parent);
Button browse = createButton(parent, 3, "Browse...", true);
Button browse = createButton(parent, 3, MakeUIPlugin.getResourceString("BuildPathInfoBlock.button.browse"), true); //$NON-NLS-1$
browse.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent ev) {
DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.OPEN);
@ -114,7 +114,7 @@ public class BuildPathInfoBlock extends AbstractCOptionPage {
public BuildPathInfoBlock() {
super(MakeUIPlugin.getResourceString(LABEL));
setDescription("Set the include paths and preprocessor symbols for this project");
setDescription(MakeUIPlugin.getResourceString("BuildPathInfoBlock.description")); //$NON-NLS-1$
}
private void createPathListButtons(Composite parent) {
@ -309,7 +309,7 @@ public class BuildPathInfoBlock extends AbstractCOptionPage {
}
if (getContainer().getProject() != null) {
// Store the paths and symbols
monitor.beginTask("Setting Scanner Info", 3);
monitor.beginTask(MakeUIPlugin.getResourceString("BuildPathInfoBlock.monitor.settingScannerInfo"), 3); //$NON-NLS-1$
MakeScannerInfo info = MakeScannerProvider.getDefault().getMakeScannerInfo(getContainer().getProject(), false);
info.setIncludePaths(getPathListContents());
monitor.worked(1);

View file

@ -1,6 +1,7 @@
package org.eclipse.cdt.make.ui.dialogs;
import org.eclipse.cdt.make.core.IMakeTarget;
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
import org.eclipse.cdt.make.ui.TargetBuild;
import org.eclipse.cdt.make.ui.TargetListViewerPart;
import org.eclipse.core.resources.IContainer;
@ -38,12 +39,12 @@ public class BuildTargetDialog extends Dialog {
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setText("Build Targets");
newShell.setText(MakeUIPlugin.getResourceString("BuildTargetDialog.title.buildTarget")); //$NON-NLS-1$
}
protected void createButtonsForButtonBar(Composite parent) {
// create Build and Cancel buttons by default
createButton(parent, IDialogConstants.OK_ID, "Build", true);
createButton(parent, IDialogConstants.OK_ID, MakeUIPlugin.getResourceString("BuildTargetDialog.button.build"), true); //$NON-NLS-1$
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
getButton(IDialogConstants.OK_ID).setEnabled(targetPart.getSelectedTarget() != null);
}
@ -55,7 +56,7 @@ public class BuildTargetDialog extends Dialog {
GridData gd = new GridData();
gd.horizontalSpan = 2;
title.setLayoutData(gd);
title.setText("Make Targets for: " + fContainer.getFullPath().toString().substring(1));
title.setText(MakeUIPlugin.getResourceString("BuildTargetDialog.title.makeTargetsFor") + fContainer.getFullPath().toString().substring(1)); //$NON-NLS-1$
targetPart.createControl(composite, SWT.NULL, 2);
gd = (GridData) targetPart.getControl().getLayoutData();

View file

@ -41,11 +41,11 @@ public class MakeTargetDialog extends Dialog {
protected MessageLine fStatusLine;
private static final String TARGET_PREFIX = "TargetBlock"; //$NON-NLS-1$
private static final String TARGET_NAME_LABEL = TARGET_PREFIX + ".target.label";
private static final String TARGET_NAME_LABEL = TARGET_PREFIX + ".target.label"; //$NON-NLS-1$
private static final String BUILD_ARGUMENT_PREFIX = "BuildTarget"; //$NON-NLS-1$
private static final String BUILD_ARGUMENT_GROUP = BUILD_ARGUMENT_PREFIX + ".target.group_label";
private static final String BUILD_ARGUMENT_LABEL = BUILD_ARGUMENT_PREFIX + ".target.label";
private static final String BUILD_ARGUMENT_GROUP = BUILD_ARGUMENT_PREFIX + ".target.group_label"; //$NON-NLS-1$
private static final String BUILD_ARGUMENT_LABEL = BUILD_ARGUMENT_PREFIX + ".target.label"; //$NON-NLS-1$
private static final String SETTING_PREFIX = "SettingsBlock"; //$NON-NLS-1$
@ -99,7 +99,7 @@ public class MakeTargetDialog extends Dialog {
String[] id = fTargetManager.getTargetBuilders(container.getProject());
if (id.length == 0) {
throw new CoreException(
new Status(IStatus.ERROR, MakeUIPlugin.getUniqueIdentifier(), -1, "Not target builders on the project", null));
new Status(IStatus.ERROR, MakeUIPlugin.getUniqueIdentifier(), -1, MakeUIPlugin.getResourceString("MakeTargetDialog.exception.noTargetBuilderOnProject"), null)); //$NON-NLS-1$
}
targetBuildID = id[0];
IMakeBuilderInfo buildInfo =
@ -112,16 +112,19 @@ public class MakeTargetDialog extends Dialog {
}
protected void configureShell(Shell newShell) {
String title;
if (fTarget == null) {
title = "Create Make target.";
} else {
title = "Modify Make target,";
}
newShell.setText(title);
newShell.setText(getTitle());
super.configureShell(newShell);
}
private String getTitle() {
String title;
if (fTarget == null) {
title = MakeUIPlugin.getResourceString("MakeTargetDialog.title.createMakeTarget"); //$NON-NLS-1$
} else {
title = MakeUIPlugin.getResourceString("MakeTargetDialog.title.modifyMakeTarget"); //$NON-NLS-1$
}
return title;
}
/*
* (non-Javadoc)
*
@ -131,19 +134,13 @@ public class MakeTargetDialog extends Dialog {
Composite composite = (Composite)super.createDialogArea(parent);
initializeDialogUnits(composite);
String title;
if (fTarget == null) {
title = "Create a new Make target.";
} else {
title = "Modify a Make target,";
}
fStatusLine = new MessageLine(composite);
fStatusLine.setAlignment(SWT.LEFT);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint = convertWidthInCharsToPixels(50);
fStatusLine.setLayoutData(gd);
fStatusLine.setMessage(title);
fStatusLine.setMessage(getTitle());
createNameControl(composite);
createTargetControl(composite);
@ -166,8 +163,8 @@ public class MakeTargetDialog extends Dialog {
targetNameText.addListener(SWT.Modify, new Listener() {
public void handleEvent(Event e) {
String newName = targetNameText.getText().trim();
if (newName.equals("")) {
fStatusLine.setErrorMessage("Must specify a target name.");
if (newName.equals("")) { //$NON-NLS-1$
fStatusLine.setErrorMessage(MakeUIPlugin.getResourceString("MakeTargetDialog.message.mustSpecifyName")); //$NON-NLS-1$
getButton(IDialogConstants.OK_ID).setEnabled(false);
} else
try {
@ -177,7 +174,7 @@ public class MakeTargetDialog extends Dialog {
fStatusLine.setErrorMessage(null);
getButton(IDialogConstants.OK_ID).setEnabled(true);
} else {
fStatusLine.setErrorMessage("Target with that name already exits");
fStatusLine.setErrorMessage(MakeUIPlugin.getResourceString("MakeTargetDialog.message.targetWithNameExists")); //$NON-NLS-1$
getButton(IDialogConstants.OK_ID).setEnabled(false);
}
} catch (CoreException ex) {
@ -233,8 +230,8 @@ public class MakeTargetDialog extends Dialog {
((GridData) (commandText.getLayoutData())).grabExcessHorizontalSpace = true;
commandText.addListener(SWT.Modify, new Listener() {
public void handleEvent(Event e) {
if (commandText.getText().equals("")) {
fStatusLine.setErrorMessage("Must specify a build command");
if (commandText.getText().equals("")) { //$NON-NLS-1$
fStatusLine.setErrorMessage(MakeUIPlugin.getResourceString("MakeTargetDialog.message.mustSpecifyBuildCommand")); //$NON-NLS-1$
}
}
});
@ -275,9 +272,9 @@ public class MakeTargetDialog extends Dialog {
protected void createButtonsForButtonBar(Composite parent) {
if (fTarget != null) {
createButton(parent, IDialogConstants.OK_ID, "Update", true);
createButton(parent, IDialogConstants.OK_ID, MakeUIPlugin.getResourceString("MakeTargetDialog.button.update"), true); //$NON-NLS-1$
} else {
createButton(parent, IDialogConstants.OK_ID, "Create", true);
createButton(parent, IDialogConstants.OK_ID, MakeUIPlugin.getResourceString("MakeTargetDialog.button.create"), true); //$NON-NLS-1$
}
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
//do this here because setting the text will set enablement on the ok button
@ -296,7 +293,7 @@ public class MakeTargetDialog extends Dialog {
try {
while (fTargetManager.findTarget(fContainer, newName) != null) {
i++;
newName = targetString + " (" + Integer.toString(i) + ")";
newName = targetString + " (" + Integer.toString(i) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
} catch (CoreException e) {
}
@ -362,7 +359,7 @@ public class MakeTargetDialog extends Dialog {
}
}
} catch (CoreException e) {
MakeUIPlugin.errorDialog(getShell(), "Make Target Error", "Error adding target", e);
MakeUIPlugin.errorDialog(getShell(), MakeUIPlugin.getResourceString("MakeTargetDialog.exception.makeTargetError"), MakeUIPlugin.getResourceString("MakeTargetDialog.exception.errorAddingTarget"), e); //$NON-NLS-1$ //$NON-NLS-2$
}
super.okPressed();
}

View file

@ -219,7 +219,7 @@ public class SettingsBlock extends AbstractCOptionPage {
getShell(),
getContainer().getProject(),
true,
"Selection Location to build from.");
MakeUIPlugin.getResourceString("SettingsBlock.title.selectLocationToBuildFrom")); //$NON-NLS-1$
if (dialog.open() == Window.OK) {
Object[] selection = dialog.getResult();
if (selection.length > 0) {
@ -239,7 +239,7 @@ public class SettingsBlock extends AbstractCOptionPage {
if (fBuildInfo == null) {
ControlFactory.createEmptySpace(composite);
ControlFactory.createLabel(composite, "Missing builder information on project.");
ControlFactory.createLabel(composite, MakeUIPlugin.getResourceString("SettingsBlock.label.missingBuilderInformation")); //$NON-NLS-1$
return;
}
@ -270,7 +270,7 @@ public class SettingsBlock extends AbstractCOptionPage {
// To avoid multi-build
IWorkspaceRunnable operation = new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
monitor.beginTask("Applying Settings...", 1);
monitor.beginTask(MakeUIPlugin.getResourceString("SettingsBlock.monitor.applyingSettings"), 1); //$NON-NLS-1$
IMakeBuilderInfo info;
if (getContainer().getProject() != null) {
info = MakeCorePlugin.createBuildInfo(getContainer().getProject(), fBuilderID);
@ -387,7 +387,7 @@ public class SettingsBlock extends AbstractCOptionPage {
if (!useDefaultBuildCmd()) {
String cmd = getBuildLine();
if (cmd == null || cmd.length() == 0) {
return "Must enter a build command";
return MakeUIPlugin.getResourceString("SettingsBlock.message.mustEnterBuildCommand"); //$NON-NLS-1$
}
}
return null;

View file

@ -23,10 +23,10 @@ public class AddTargetAction extends SelectionListenerAction {
IResource resource;
public AddTargetAction(Shell shell) {
super("Add Build Target");
super(MakeUIPlugin.getResourceString("AddTargetAction.label")); //$NON-NLS-1$
this.shell = shell;
setToolTipText("Add Build Target");
setToolTipText(MakeUIPlugin.getResourceString("AddTargetAction.tooltip")); //$NON-NLS-1$
MakeUIImages.setImageDescriptors(this, "tool16", MakeUIImages.IMG_TOOLS_MAKE_TARGET_ADD); //$NON-NLS-1$
}
@ -36,7 +36,7 @@ public class AddTargetAction extends SelectionListenerAction {
MakeTargetDialog dialog = new MakeTargetDialog(shell, (IContainer) getStructuredSelection().getFirstElement());
dialog.open();
} catch (CoreException e) {
MakeUIPlugin.errorDialog(shell, "Internal Error", "Internal Error", e);
MakeUIPlugin.errorDialog(shell, MakeUIPlugin.getResourceString("AddTargetAction.exception.internalError"), e.toString(), e); //$NON-NLS-1$
}
}

View file

@ -10,6 +10,7 @@ import java.util.List;
import org.eclipse.cdt.make.core.IMakeTarget;
import org.eclipse.cdt.make.internal.ui.MakeUIImages;
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
import org.eclipse.cdt.make.ui.TargetBuild;
import org.eclipse.core.resources.IResource;
import org.eclipse.jface.viewers.IStructuredSelection;
@ -22,10 +23,10 @@ public class BuildTargetAction extends SelectionListenerAction {
IResource resource;
public BuildTargetAction(Shell shell) {
super("Build Target");
super(MakeUIPlugin.getResourceString("BuildTargetAction.label")); //$NON-NLS-1$
this.shell = shell;
setToolTipText("Build Target");
setToolTipText(MakeUIPlugin.getResourceString("BuildTargetAction.tooltip")); //$NON-NLS-1$
MakeUIImages.setImageDescriptors(this, "tool16", MakeUIImages.IMG_TOOLS_MAKE_TARGET_BUILD); //$NON-NLS-1$
}

View file

@ -27,10 +27,10 @@ public class DeleteTargetAction extends SelectionListenerAction {
IResource resource;
public DeleteTargetAction(Shell shell) {
super("Delete Build Target");
super(MakeUIPlugin.getResourceString("DeleteTargetAction.label")); //$NON-NLS-1$
this.shell = shell;
setToolTipText("Delete Build Target");
setToolTipText(MakeUIPlugin.getResourceString("DeleteTargetAction.tooltip")); //$NON-NLS-1$
MakeUIImages.setImageDescriptors(this, "tool16", MakeUIImages.IMG_TOOLS_MAKE_TARGET_DELETE); //$NON-NLS-1$
}
@ -45,14 +45,14 @@ public class DeleteTargetAction extends SelectionListenerAction {
String title;
String msg;
if (targets.size() == 1) {
title = "Confirm Target Deletion";
title = MakeUIPlugin.getResourceString("DeleteTargetAction.title.confirmDeletion"); //$NON-NLS-1$
IMakeTarget target = (IMakeTarget) targets.get(0);
msg = MessageFormat.format("Are you sure you want to delete ''{0}''?", new Object[] { target.getName()});
msg = MessageFormat.format(MakeUIPlugin.getResourceString("DeleteTargetAction.message.confirmDeleteion"), new Object[] { target.getName()}); //$NON-NLS-1$
} else {
title = "Confirm Multiple Target Deletion";
title = MakeUIPlugin.getResourceString("DeleteTargetAction.title.confirmMultipleDeletion"); //$NON-NLS-1$
msg =
MessageFormat.format(
"Are you sure you want to delete these {0} targets?",
MakeUIPlugin.getResourceString("DeleteTargetAction.message.confirmMultipleDeletion"), //$NON-NLS-1$
new Object[] { new Integer(targets.size())});
}
return MessageDialog.openQuestion(shell, title, msg);
@ -69,7 +69,7 @@ public class DeleteTargetAction extends SelectionListenerAction {
manager.removeTarget((IMakeTarget) iter.next());
}
} catch (CoreException e) {
MakeUIPlugin.errorDialog(shell, "Target Remove Error", "Error deleting build target", e);
MakeUIPlugin.errorDialog(shell, MakeUIPlugin.getResourceString("DeleteTargetAction.exception.removeError"), MakeUIPlugin.getResourceString("DeleteTargetAction.exception.errorDeletingBuildTarget"), e); //$NON-NLS-1$ //$NON-NLS-2$
}
}

View file

@ -23,10 +23,10 @@ public class EditTargetAction extends SelectionListenerAction {
IResource resource;
public EditTargetAction(Shell shell) {
super("Edit Build Target");
super(MakeUIPlugin.getResourceString("EditTargetAction.label")); //$NON-NLS-1$
this.shell = shell;
setToolTipText("Edit Build Target");
setToolTipText(MakeUIPlugin.getResourceString("EditTargetAction.tooltip")); //$NON-NLS-1$
MakeUIImages.setImageDescriptors(this, "tool16", MakeUIImages.IMG_TOOLS_MAKE_TARGET_EDIT); //$NON-NLS-1$
}
@ -37,7 +37,7 @@ public class EditTargetAction extends SelectionListenerAction {
dialog = new MakeTargetDialog(shell, (IMakeTarget) getStructuredSelection().getFirstElement());
dialog.open();
} catch (CoreException e) {
MakeUIPlugin.errorDialog(shell, "Internal Error", "Error editing target.", e);
MakeUIPlugin.errorDialog(shell, MakeUIPlugin.getResourceString("EditTargetAction.exception.internalError"), MakeUIPlugin.getResourceString("EditTargetAction.exception.errorEditingTarget"), e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}

View file

@ -92,7 +92,7 @@ public class ConvertToMakeProjectWizard extends ConversionWizard {
}
protected void doRun(IProgressMonitor monitor) throws CoreException {
monitor.beginTask("Converting to Make Project...", 2);
monitor.beginTask(MakeUIPlugin.getResourceString("WizardMakeProjectConversion.monitor.convertingToMakeProject"), 2); //$NON-NLS-1$
try {
super.doRun(new SubProgressMonitor(monitor, 1));
} finally {

View file

@ -74,7 +74,7 @@ public class ConvertToMakeProjectWizardPage extends ConvertProjectWizardPage {
}
public void convertProject(IProject project, IProgressMonitor monitor, String projectID) throws CoreException {
monitor.beginTask("Converting Make project...", 3);
monitor.beginTask(MakeUIPlugin.getResourceString("WizardMakeProjectConversion.monitor.convertingToMakeProject"), 3); //$NON-NLS-1$
try {
super.convertProject(project, new SubProgressMonitor(monitor, 1), projectID);
MakeProjectNature.addNature(project, new SubProgressMonitor(monitor, 1));

View file

@ -65,7 +65,7 @@ public class UpdateMakeProjectWizardPage extends StatusWizardPage {
setTitle(MakeUIPlugin.getResourceString(MAKE_UPDATE_TITLE));
setDescription(MakeUIPlugin.getResourceString(MAKE_UPDATE_DESCRIPTION));
this.selected = selected;
tablePart = new TablePart("Project list");
tablePart = new TablePart(MakeUIPlugin.getResourceString("MakeWizardUpdatePage.projectList")); //$NON-NLS-1$
}
public void dispose() {
@ -111,10 +111,10 @@ public class UpdateMakeProjectWizardPage extends StatusWizardPage {
private IStatus validatePlugins() {
Object[] allModels = UpdateMakeProjectAction.getOldProjects();
if (allModels == null || allModels.length == 0) {
return createStatus(IStatus.ERROR, "No projects to update");
return createStatus(IStatus.ERROR, MakeUIPlugin.getResourceString("MakeWizardUpdatePage.status.noProjectsToUpdate")); //$NON-NLS-1$
}
if (tablePart.getSelectionCount() == 0) {
return createStatus(IStatus.ERROR, "No projects selected");
return createStatus(IStatus.ERROR, MakeUIPlugin.getResourceString("MakeWizardUpdatePage.status.noProjectsSelected")); //$NON-NLS-1$
}
return createStatus(IStatus.OK, ""); //$NON-NLS-1$
}