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:
parent
f44a5cb403
commit
f0a098779f
11 changed files with 37 additions and 30 deletions
|
@ -71,6 +71,13 @@ BuildPropertyCommon.label.message=Value:
|
|||
BuildPropertyCommon.label.browse=Browse...
|
||||
BuildPropertyCommon.label.configs=Defined configurations:
|
||||
|
||||
MakeDocumentProvider.exception.createElementInfo=Error creating element.
|
||||
|
||||
AddBuildTargetAction.title=Add To Build Target
|
||||
AddBuildTargetAction.description=Add To Build Target
|
||||
AddBuildTargetAction.tooltip= Add To Build Target
|
||||
AddBuildTargetAction.exception.internal=Internal Error
|
||||
|
||||
# Makefile Editor messages
|
||||
ContentAssistProposal.label=Content Assist@Ctrl+SPACE
|
||||
ContentAssistProposal.tooltip=Content Assist
|
||||
|
|
|
@ -36,9 +36,9 @@ public class AddBuildTargetAction extends Action {
|
|||
};
|
||||
|
||||
public AddBuildTargetAction(MakefileContentOutlinePage outliner) {
|
||||
super("Add To Build Target");
|
||||
setDescription("Add To Build Target");
|
||||
setToolTipText("Add To Build Target");
|
||||
super(MakeUIPlugin.getResourceString("AddBuildTargetAction.title")); //$NON-NLS-1$
|
||||
setDescription(MakeUIPlugin.getResourceString("AddBuildTargetAction.description")); //$NON-NLS-1$
|
||||
setToolTipText(MakeUIPlugin.getResourceString("AddBuildTargetAction.tooltip")); //$NON-NLS-1$
|
||||
fOutliner = outliner;
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ public class AddBuildTargetAction extends Action {
|
|||
}
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
MakeUIPlugin.errorDialog(shell, "Internal Error", "", e);
|
||||
MakeUIPlugin.errorDialog(shell, MakeUIPlugin.getResourceString("AddBuildTargetAction.exception.internal"), e.toString(), e); //$NON-NLS-1$
|
||||
target = null;
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ public class AddBuildTargetAction extends Action {
|
|||
dialog = new MakeTargetDialog(shell, target);
|
||||
dialog.open();
|
||||
} catch (CoreException e) {
|
||||
MakeUIPlugin.errorDialog(shell, "Internal Error", "", e);
|
||||
MakeUIPlugin.errorDialog(shell, MakeUIPlugin.getResourceString("AddBuildTargetAction.exception.internal"), e.toString(), e); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@ import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
|
|||
*/
|
||||
public interface IMakefileEditorActionDefinitionIds extends ITextEditorActionDefinitionIds {
|
||||
|
||||
String UNCOMMENT = "org.eclipse.cdt.make.ui.edit.text.makefile.comment";
|
||||
String UNCOMMENT = "org.eclipse.cdt.make.ui.edit.text.makefile.comment"; //$NON-NLS-1$
|
||||
|
||||
String COMMENT = "org.eclipse.cdt.make.ui.edit.text.makefile.uncomment";
|
||||
String COMMENT = "org.eclipse.cdt.make.ui.edit.text.makefile.uncomment"; //$NON-NLS-1$
|
||||
|
||||
}
|
||||
|
|
|
@ -23,18 +23,18 @@ import org.eclipse.jface.viewers.ViewerSorter;
|
|||
|
||||
public class LexicalSortingAction extends Action {
|
||||
|
||||
private static final String ACTION_NAME = "LexicalSortingAction";
|
||||
private static final String DIALOG_STORE_KEY = ACTION_NAME + ".sort";
|
||||
private static final String ACTION_NAME = "LexicalSortingAction"; //$NON-NLS-1$
|
||||
private static final String DIALOG_STORE_KEY = ACTION_NAME + ".sort"; //$NON-NLS-1$
|
||||
|
||||
private LexicalMakefileSorter fSorter;
|
||||
private TreeViewer fTreeViewer;
|
||||
|
||||
public LexicalSortingAction(TreeViewer treeViewer) {
|
||||
super(MakeUIPlugin.getResourceString(ACTION_NAME + ".label"));
|
||||
super(MakeUIPlugin.getResourceString(ACTION_NAME + ".label")); //$NON-NLS-1$
|
||||
|
||||
setDescription(MakeUIPlugin.getResourceString(ACTION_NAME + ".description"));
|
||||
setToolTipText(MakeUIPlugin.getResourceString(ACTION_NAME + ".tooltip"));
|
||||
MakeUIImages.setImageDescriptors(this, "tool16", MakeUIImages.IMG_TOOLS_ALPHA_SORTING);
|
||||
setDescription(MakeUIPlugin.getResourceString(ACTION_NAME + ".description")); //$NON-NLS-1$
|
||||
setToolTipText(MakeUIPlugin.getResourceString(ACTION_NAME + ".tooltip")); //$NON-NLS-1$
|
||||
MakeUIImages.setImageDescriptors(this, "tool16", MakeUIImages.IMG_TOOLS_ALPHA_SORTING); //$NON-NLS-1$
|
||||
|
||||
fTreeViewer = treeViewer;
|
||||
fSorter = new LexicalMakefileSorter();
|
||||
|
@ -50,7 +50,7 @@ public class LexicalSortingAction extends Action {
|
|||
setChecked(on);
|
||||
fTreeViewer.setSorter(on ? fSorter : null);
|
||||
|
||||
String key = ACTION_NAME + ".tooltip" + (on ? ".on" : ".off");
|
||||
String key = ACTION_NAME + ".tooltip" + (on ? ".on" : ".off"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
setToolTipText(MakeUIPlugin.getResourceString(key));
|
||||
if (store) {
|
||||
MakeUIPlugin.getDefault().getDialogSettings().put(DIALOG_STORE_KEY, on);
|
||||
|
|
|
@ -238,7 +238,7 @@ public class MakefileContentOutlinePage extends ContentOutlinePage implements IC
|
|||
viewer.setInput(fInput);
|
||||
}
|
||||
|
||||
MenuManager manager= new MenuManager("#MakefileOutlinerContext");
|
||||
MenuManager manager= new MenuManager("#MakefileOutlinerContext"); //$NON-NLS-1$
|
||||
manager.setRemoveAllWhenShown(true);
|
||||
manager.addMenuListener(new IMenuListener() {
|
||||
public void menuAboutToShow(IMenuManager m) {
|
||||
|
|
|
@ -16,6 +16,7 @@ import java.util.Iterator;
|
|||
|
||||
import org.eclipse.cdt.make.core.MakeCorePlugin;
|
||||
import org.eclipse.cdt.make.core.makefile.IMakefile;
|
||||
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
|
||||
import org.eclipse.cdt.make.internal.ui.text.makefile.MakefilePartitionScanner;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
@ -95,7 +96,7 @@ public class MakefileDocumentProvider extends FileDocumentProvider implements IM
|
|||
try {
|
||||
refreshFile(input.getFile());
|
||||
} catch (CoreException x) {
|
||||
handleCoreException(x, "FileDocumentProvider.createElementInfo");
|
||||
handleCoreException(x, MakeUIPlugin.getResourceString("MakeDocumentProvider.exception.createElementInfo")); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
IDocument d = null;
|
||||
|
|
|
@ -163,7 +163,7 @@ public class MakefileSourceConfiguration extends SourceViewerConfiguration {
|
|||
* @see org.eclipse.jface.text.source.SourceViewerConfiguration#getDefaultPrefixes(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
|
||||
*/
|
||||
public String[] getDefaultPrefixes(ISourceViewer sourceViewer, String contentType) {
|
||||
return new String[]{"#"};
|
||||
return new String[]{"#"}; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -84,7 +84,7 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor {
|
|||
} else if (o1 instanceof IRule) {
|
||||
name1 = ((IRule)o1).getTarget().toString();
|
||||
} else {
|
||||
name1 ="";
|
||||
name1 =""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
if (o2 instanceof IMacroDefinition) {
|
||||
|
@ -92,7 +92,7 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor {
|
|||
} else if (o2 instanceof IRule) {
|
||||
name2 = ((IRule)o1).getTarget().toString();
|
||||
} else {
|
||||
name2 ="";
|
||||
name2 =""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
//return String.CASE_INSENSITIVE_ORDER.compare(name1, name2);
|
||||
|
@ -137,7 +137,7 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor {
|
|||
for (int i = 0; i < statements.length; i++) {
|
||||
String name = null;
|
||||
Image image = null;
|
||||
String infoString = "";//getContentInfoString(name);
|
||||
String infoString = "";//getContentInfoString(name); //$NON-NLS-1$
|
||||
if (statements[i] instanceof IMacroDefinition) {
|
||||
name = ((IMacroDefinition) statements[i]).getName();
|
||||
image = imageMacro;
|
||||
|
@ -149,7 +149,7 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor {
|
|||
}
|
||||
if (name != null && name.startsWith(wordPart.toString())) {
|
||||
IContextInformation info = new ContextInformation(name, infoString);
|
||||
String displayString = (name.equals(infoString) ? name : name + " - " + infoString);
|
||||
String displayString = (name.equals(infoString) ? name : name + " - " + infoString); //$NON-NLS-1$
|
||||
ICompletionProposal result =
|
||||
new CompletionProposal(
|
||||
name,
|
||||
|
|
|
@ -72,14 +72,14 @@ public class MakefilePartitionScanner extends RuleBasedPartitionScanner {
|
|||
rules.add(new EndOfLineRule("unexport", tDef)); //$NON-NLS-1$
|
||||
rules.add(new EndOfLineRule("vpath", tDef)); //$NON-NLS-1$
|
||||
rules.add(new EndOfLineRule("override", tDef)); //$NON-NLS-1$
|
||||
rules.add(new MultiLineRule("define", "endef", tDef)); //$NON-NLS-1$
|
||||
rules.add(new MultiLineRule("override define", "endef", tDef)); //$NON-NLS-1$
|
||||
rules.add(new MultiLineRule("define", "endef", tDef)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
rules.add(new MultiLineRule("override define", "endef", tDef)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
// Add rules for multi-line comments and javadoc.
|
||||
rules.add(new MultiLineRule("ifdef", "endif", tIf)); //$NON-NLS-1$
|
||||
rules.add(new MultiLineRule("ifndef", "endif", tIf)); //$NON-NLS-1$
|
||||
rules.add(new MultiLineRule("ifeq", "endif", tIf)); //$NON-NLS-1$
|
||||
rules.add(new MultiLineRule("ifnneq", "endif", tIf)); //$NON-NLS-1$
|
||||
rules.add(new MultiLineRule("ifdef", "endif", tIf)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
rules.add(new MultiLineRule("ifndef", "endif", tIf)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
rules.add(new MultiLineRule("ifeq", "endif", tIf)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
rules.add(new MultiLineRule("ifnneq", "endif", tIf)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
// Last rule must be supplied with default token!
|
||||
rules.add(new MacroRule(tMacro, tOther)); //$NON-NLS-1$
|
||||
|
|
|
@ -50,7 +50,7 @@ public class MakefileTextHover implements ITextHover {
|
|||
try {
|
||||
int len = hoverRegion.getLength();
|
||||
int offset = hoverRegion.getOffset();
|
||||
String word = textViewer.getDocument().get(offset, len);
|
||||
textViewer.getDocument().get(offset, len); // check off/len validity
|
||||
if (fEditor != null && len > -1) {
|
||||
IWorkingCopyManager fManager = MakeUIPlugin.getDefault().getWorkingCopyManager();
|
||||
IMakefile makefile = fManager.getWorkingCopy(fEditor.getEditorInput());
|
||||
|
|
|
@ -92,6 +92,7 @@ public class SettingsBlock extends AbstractCOptionPage {
|
|||
if (fBuildInfo.isStopOnError()) {
|
||||
stopOnErrorButton.setSelection(true);
|
||||
}
|
||||
stopOnErrorButton.setEnabled(fBuildInfo.isDefaultBuildCmd());
|
||||
}
|
||||
|
||||
protected void createBuildCmdControls(Composite parent) {
|
||||
|
@ -143,8 +144,6 @@ public class SettingsBlock extends AbstractCOptionPage {
|
|||
}
|
||||
if (fBuildInfo.isDefaultBuildCmd()) {
|
||||
buildCommand.setEnabled(false);
|
||||
} else {
|
||||
stopOnErrorButton.setEnabled(false);
|
||||
}
|
||||
defButton.setSelection(fBuildInfo.isDefaultBuildCmd());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue