1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

Ran cleanup wizard to get rid of 70 warnings.

This commit is contained in:
Markus Schorn 2006-07-03 13:41:02 +00:00
parent 60a6df99a1
commit 99de459e00
39 changed files with 77 additions and 72 deletions

View file

@ -269,9 +269,9 @@ public class BuildConsolePage extends Page
ConsoleMessages.getString("BuildConsolePage.Select_All")); //$NON-NLS-1$
setGlobalAction(actionBars, ActionFactory.SELECT_ALL.getId(), action);
//XXX Still using "old" resource access
ResourceBundle bundle = ResourceBundle.getBundle(ConsoleMessages.BUNDLE_NAME); //$NON-NLS-1$
ResourceBundle bundle = ResourceBundle.getBundle(ConsoleMessages.BUNDLE_NAME);
setGlobalAction(actionBars, ActionFactory.FIND.getId(), new FindReplaceAction(bundle, "find_replace_action.", //$NON-NLS-1$
getConsoleView())); //$NON-NLS-1$
getConsoleView()));
action = new TextViewerGotoLineAction(getViewer());
setGlobalAction(actionBars, ITextEditorActionConstants.GOTO_LINE, action);
actionBars.updateActionBars();

View file

@ -80,7 +80,7 @@ public class CStructureCreator implements IStructureCreator {
//are bugs while parsing C files, we might want to create a separate Structure
//compare for c files, but we'll never be completely right about .h files
IScanner scanner =
ParserFactory.createScanner(new CodeReader(s.toCharArray()), new ScannerInfo(), ParserMode.QUICK_PARSE, ParserLanguage.CPP, builder, new NullLogService(), null); //$NON-NLS-1$
ParserFactory.createScanner(new CodeReader(s.toCharArray()), new ScannerInfo(), ParserMode.QUICK_PARSE, ParserLanguage.CPP, builder, new NullLogService(), null);
IParser parser = ParserFactory.createParser(scanner, builder, ParserMode.QUICK_PARSE, ParserLanguage.CPP, ParserUtil.getParserLogService() );
parser.parse();
} catch (Exception e) {

View file

@ -153,7 +153,7 @@ public class MainActionGroup extends CViewActionGroup {
collapseAllAction = new CollapseAllAction(getCView());
toggleLinkingAction = new ToggleLinkingAction(getCView()); //$NON-NLS-1$
toggleLinkingAction = new ToggleLinkingAction(getCView());
toggleLinkingAction.setToolTipText(CViewMessages.getString("ToggleLinkingAction.toolTip")); //$NON-NLS-1$
toggleLinkingAction.setImageDescriptor(getImageDescriptor("elcl16/synced.gif"));//$NON-NLS-1$
// toggleLinkingAction.setHoverImageDescriptor(getImageDescriptor("clcl16/synced.gif"));//$NON-NLS-1$

View file

@ -137,7 +137,7 @@ public abstract class StatusDialog extends Dialog {
fStatusLine= new MessageLine(composite);
fStatusLine.setAlignment(SWT.LEFT);
fStatusLine.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
fStatusLine.setErrorMessage(null); //$NON-NLS-1$
fStatusLine.setErrorMessage(null);
super.createButtonBar(composite);
return composite;

View file

@ -840,7 +840,7 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage
initialValue.append('=');
initialValue.append((String)existing.getAttribute(CPElement.MACRO_VALUE));
dialog = new InputDialog(getShell(), CPathEntryMessages.getString("IncludeSymbolEntryPage.editSymbol.title"), //$NON-NLS-1$
CPathEntryMessages.getString("IncludeSymbolEntryPage.editSymbol.message"), initialValue.toString(), //$NON-NLS-1$ //$NON-NLS-2$
CPathEntryMessages.getString("IncludeSymbolEntryPage.editSymbol.message"), initialValue.toString(), //$NON-NLS-1$
null);
}

View file

@ -895,7 +895,7 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB
initialValue.append('=');
initialValue.append((String)existing.getAttribute(CPElement.MACRO_VALUE));
dialog = new InputDialog(getShell(), CPathEntryMessages.getString("IncludeSymbolEntryPage.editSymbol.title"), //$NON-NLS-1$
CPathEntryMessages.getString("IncludeSymbolEntryPage.editSymbol.message"), initialValue.toString(), //$NON-NLS-1$ //$NON-NLS-2$
CPathEntryMessages.getString("IncludeSymbolEntryPage.editSymbol.message"), initialValue.toString(), //$NON-NLS-1$
null);
}

View file

@ -17,7 +17,7 @@ import org.eclipse.jface.action.IMenuManager;
public class ExternalSearchEditor extends CEditor {
public static final String EDITOR_ID = "org.eclipse.cdt.ui.editor.ExternalSearchEditor";
public static final String EDITOR_ID = "org.eclipse.cdt.ui.editor.ExternalSearchEditor"; //$NON-NLS-1$
public ExternalSearchEditor(){
super();

View file

@ -13,6 +13,8 @@ package org.eclipse.cdt.internal.ui.indexview;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
import org.eclipse.cdt.internal.ui.search.PDOMSearchBindingQuery;
import org.eclipse.cdt.internal.ui.search.PDOMSearchQuery;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
@ -26,7 +28,7 @@ import org.eclipse.search.ui.NewSearchUI;
public class FindDeclarationsAction extends IndexAction {
public FindDeclarationsAction(TreeViewer viewer) {
super(viewer, CUIPlugin.getResourceString("IndexView.findDeclarations.name"));
super(viewer, CUIPlugin.getResourceString("IndexView.findDeclarations.name")); //$NON-NLS-1$
}
private PDOMBinding getBinding() {
@ -43,7 +45,7 @@ public class FindDeclarationsAction extends IndexAction {
PDOMSearchBindingQuery query = new PDOMSearchBindingQuery(
null,
binding,
PDOMSearchBindingQuery.FIND_DECLARATIONS | PDOMSearchBindingQuery.FIND_DEFINITIONS);
PDOMSearchQuery.FIND_DECLARATIONS | PDOMSearchQuery.FIND_DEFINITIONS);
NewSearchUI.activateSearchResultView();

View file

@ -13,6 +13,8 @@ package org.eclipse.cdt.internal.ui.indexview;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
import org.eclipse.cdt.internal.ui.search.PDOMSearchBindingQuery;
import org.eclipse.cdt.internal.ui.search.PDOMSearchQuery;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
@ -26,7 +28,7 @@ import org.eclipse.search.ui.NewSearchUI;
public class FindReferencesAction extends IndexAction {
public FindReferencesAction(TreeViewer viewer) {
super(viewer, CUIPlugin.getResourceString("IndexView.findReferences.name"));
super(viewer, CUIPlugin.getResourceString("IndexView.findReferences.name")); //$NON-NLS-1$
}
private PDOMBinding getBinding() {
@ -42,7 +44,7 @@ public class FindReferencesAction extends IndexAction {
PDOMSearchBindingQuery query = new PDOMSearchBindingQuery(
null,
getBinding(),
PDOMSearchBindingQuery.FIND_REFERENCES);
PDOMSearchQuery.FIND_REFERENCES);
NewSearchUI.activateSearchResultView();

View file

@ -343,7 +343,7 @@ public class IndexView extends ViewPart implements PDOM.IListener, IElementChang
}
private void hookContextMenu() {
MenuManager menuMgr = new MenuManager("#PopupMenu");
MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {

View file

@ -30,7 +30,7 @@ import org.eclipse.jface.viewers.TreeViewer;
public class SetFastIndexerAction extends IndexAction {
public SetFastIndexerAction(TreeViewer viewer) {
super(viewer, CUIPlugin.getResourceString("IndexView.setFastIndexer.name"));
super(viewer, CUIPlugin.getResourceString("IndexView.setFastIndexer.name")); //$NON-NLS-1$
}
public void run() {

View file

@ -46,7 +46,7 @@ public class CNavigatorDragAdapterAssistant extends CommonDragAdapterAssistant {
public boolean setDragData(DragSourceEvent event,
IStructuredSelection selection) {
if (selection instanceof IStructuredSelection) {
for (Iterator iter= ((IStructuredSelection)selection).iterator(); iter.hasNext();) {
for (Iterator iter= (selection).iterator(); iter.hasNext();) {
Object element= iter.next();
if (element instanceof ICElement) {
if (!(element instanceof ISourceReference)) {

View file

@ -45,7 +45,7 @@ public class OpenCElementAction extends OpenFileAction {
try {
part= EditorUtility.openInEditor(fOpenElement);
if (fOpenElement instanceof ISourceReference) {
EditorUtility.revealInEditor(part, (ICElement)fOpenElement);
EditorUtility.revealInEditor(part, fOpenElement);
}
} catch (CoreException exc) {
CUIPlugin.getDefault().log(exc.getStatus());

View file

@ -78,7 +78,7 @@ public class CParserPreferencePage extends PreferencePage implements
bufferGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
bufferGroup.setText(PreferencesMessages.getString("CBufferPreferences.CodeReaderBuffer.CodeReaderBufferGroup")); //$NON-NLS-1$
bufferTextControl = (Text) addTextField( bufferGroup, PreferencesMessages.getString("CBufferPreferences.CodeReaderBuffer.Size"),6,0); //$NON-NLS-1$ //$NON-NLS-2$
bufferTextControl = (Text) addTextField( bufferGroup, PreferencesMessages.getString("CBufferPreferences.CodeReaderBuffer.Size"),6,0); //$NON-NLS-1$
initialize();

View file

@ -287,7 +287,7 @@ public abstract class OptionsConfigurationBlock {
protected String[] getTokens(String text, String separator) {
StringTokenizer tok= new StringTokenizer(text, separator); //$NON-NLS-1$
StringTokenizer tok= new StringTokenizer(text, separator);
int nTokens= tok.countTokens();
String[] res= new String[nTokens];
for (int i= 0; i < res.length; i++) {

View file

@ -53,7 +53,7 @@ public class ProposalFilterPreferencesUtil {
for (int j = 0; j < elements.length; ++j) {
IConfigurationElement element = elements[j];
if ("ProposalFilter".equals(element.getName())) { //$NON-NLS-1$
String filterName = element.getAttribute("name");
String filterName = element.getAttribute("name"); //$NON-NLS-1$
if (null != filterName) {
names.add(filterName);
}
@ -79,12 +79,12 @@ public class ProposalFilterPreferencesUtil {
* @return The list of filter names
*/
public static String getProposalFilternamesAsString() {
StringBuffer filterNames = new StringBuffer("0;");
filterNames.append("<Default Filter>"); // TODO: NP externalize this!
StringBuffer filterNames = new StringBuffer("0;"); //$NON-NLS-1$
filterNames.append("<Default Filter>"); // TODO: NP externalize this! //$NON-NLS-1$
String[] names = getProposalFilterNames();
for (int i = 0; i < names.length; i++) {
String name = names[i];
filterNames.append(";");
filterNames.append(";"); //$NON-NLS-1$
filterNames.append(name);
}
return filterNames.toString();
@ -114,7 +114,7 @@ public class ProposalFilterPreferencesUtil {
IConfigurationElement testElement = elements[j];
if ("ProposalFilter".equals(testElement.getName())) { //$NON-NLS-1$
String testName = testElement
.getAttribute("name");
.getAttribute("name"); //$NON-NLS-1$
if ((null != testName)
&& (filterName.equals(testName))) {
element = testElement;
@ -154,8 +154,8 @@ public class ProposalFilterPreferencesUtil {
text.append(selectionIndex);
String[] entries = combo.getItems();
for (int i = 0; i < entries.length; i++) {
text.append(";");
String entry = entries[i].replaceAll(";", ",");
text.append(";"); //$NON-NLS-1$
String entry = entries[i].replaceAll(";", ","); //$NON-NLS-1$ //$NON-NLS-2$
text.append(entry);
}
return text.toString();
@ -172,12 +172,12 @@ public class ProposalFilterPreferencesUtil {
*/
public static void restoreComboFromString(Combo combo, String text) {
try {
int endFirstEntry = text.indexOf(";");
int endFirstEntry = text.indexOf(";"); //$NON-NLS-1$
if (endFirstEntry > 0) { // First entry must contain at least one character
String selectedString = text.substring(0, endFirstEntry);
int selectedIndex = Integer.parseInt(selectedString);
String[] entryList = text.substring(endFirstEntry + 1,
text.length()).split(";");
text.length()).split(";"); //$NON-NLS-1$
combo.setItems(entryList);
combo.select(selectedIndex);
}
@ -204,13 +204,13 @@ public class ProposalFilterPreferencesUtil {
public static ComboState getComboState(String comboPreference) {
ComboState state = new ComboState();
try {
int endFirstEntry = comboPreference.indexOf(";");
int endFirstEntry = comboPreference.indexOf(";"); //$NON-NLS-1$
if (endFirstEntry > 0) { // First entry must contain at least one character
String selectedString = comboPreference.substring(0,
endFirstEntry);
state.selectedIndex = Integer.parseInt(selectedString);
state.items = comboPreference.substring(endFirstEntry + 1,
comboPreference.length()).split(";");
comboPreference.length()).split(";"); //$NON-NLS-1$
}
} catch (NumberFormatException e) {
// If this fails we return an empty ComboState

View file

@ -44,7 +44,7 @@ public class PDOMSearchBindingQuery extends PDOMSearchQuery {
}
public String getLabel() {
return super.getLabel() + " " + binding.getName();
return super.getLabel() + " " + binding.getName(); //$NON-NLS-1$
}
}

View file

@ -58,7 +58,7 @@ public class PDOMSearchElementQuery extends PDOMSearchQuery {
public String getLabel() {
if (element instanceof ICElement)
return super.getLabel() + " " + ((ICElement)element).getElementName();
return super.getLabel() + " " + ((ICElement)element).getElementName(); //$NON-NLS-1$
else
return super.getLabel() + " something.";
}

View file

@ -491,7 +491,7 @@ public class PDOMSearchPage extends DialogPage implements ISearchPage {
IDialogSettings settings = getDialogSettings();
int searchFlags = PDOMSearchPatternQuery.FIND_ALL_TYPES | PDOMSearchPatternQuery.FIND_ALL_OCCURANCES;
int searchFlags = PDOMSearchPatternQuery.FIND_ALL_TYPES | PDOMSearchQuery.FIND_ALL_OCCURANCES;
try {
searchFlags = settings.getInt(STORE_SEARCH_FLAGS);
} catch (NumberFormatException e) {
@ -580,7 +580,7 @@ public class PDOMSearchPage extends DialogPage implements ISearchPage {
}
}
if ((searchFlags & PDOMSearchPatternQuery.FIND_ALL_OCCURANCES) == PDOMSearchPatternQuery.FIND_ALL_OCCURANCES) {
if ((searchFlags & PDOMSearchQuery.FIND_ALL_OCCURANCES) == PDOMSearchQuery.FIND_ALL_OCCURANCES) {
limitToButtons[limitToAllButtonIndex].setSelection(true);
} else {
limitToButtons[limitToAllButtonIndex].setSelection(false);

View file

@ -119,7 +119,7 @@ public abstract class PDOMSearchQuery implements ISearchQuery {
IPDOMManager manager = CCorePlugin.getPDOMManager();
for (int i = 0; i < projects.length; ++i) {
PDOM pdom = (PDOM)manager.getPDOM(projects[i]);
PDOMBinding pdomBinding = (PDOMBinding)pdom.getLinkage(language).adaptBinding(binding);
PDOMBinding pdomBinding = pdom.getLinkage(language).adaptBinding(binding);
if (pdomBinding != null) {
if ((flags & FIND_DECLARATIONS) != 0) {
collectNames(pdomBinding.getFirstDeclaration());

View file

@ -57,7 +57,7 @@ public class PDOMSearchTextSelectionQuery extends PDOMSearchQuery {
}
public String getLabel() {
return super.getLabel() + " " + selection.getText();
return super.getLabel() + " " + selection.getText(); //$NON-NLS-1$
}
}

View file

@ -22,8 +22,8 @@ public class FindDeclarationsAction extends FindAction {
public FindDeclarationsAction(CEditor editor, String label, String tooltip){
super(editor);
setText(label); //$NON-NLS-1$
setToolTipText(tooltip); //$NON-NLS-1$
setText(label);
setToolTipText(tooltip);
}
public FindDeclarationsAction(CEditor editor){

View file

@ -47,14 +47,14 @@ public class FindDeclarationsInWorkingSetAction extends FindAction {
public FindDeclarationsInWorkingSetAction(CEditor editor, String label, String tooltip){
super(editor);
setText(label); //$NON-NLS-1$
setToolTipText(tooltip); //$NON-NLS-1$
setText(label);
setToolTipText(tooltip);
}
public FindDeclarationsInWorkingSetAction(IWorkbenchSite site,String label, String tooltip){
super(site);
setText(label); //$NON-NLS-1$
setToolTipText(tooltip); //$NON-NLS-1$
setText(label);
setToolTipText(tooltip);
}
protected String getScopeDescription() {

View file

@ -25,8 +25,8 @@ public class FindDeclarationsProjectAction extends FindAction {
public FindDeclarationsProjectAction(CEditor editor, String label, String tooltip){
super(editor);
setText(label); //$NON-NLS-1$
setToolTipText(tooltip); //$NON-NLS-1$
setText(label);
setToolTipText(tooltip);
}
public FindDeclarationsProjectAction(CEditor editor){

View file

@ -32,8 +32,8 @@ public class FindRefsAction extends FindAction {
public FindRefsAction(CEditor editor, String label, String tooltip) {
super(editor);
setText(label); //$NON-NLS-1$
setToolTipText(tooltip); //$NON-NLS-1$
setText(label);
setToolTipText(tooltip);
}
public FindRefsAction(IWorkbenchSite site, String label, String tooltip) {

View file

@ -48,13 +48,13 @@ public class FindRefsInWorkingSetAction extends FindAction {
public FindRefsInWorkingSetAction(CEditor editor, String label, String tooltip) {
super(editor);
setText(label); //$NON-NLS-1$
setToolTipText(tooltip); //$NON-NLS-1$
setText(label);
setToolTipText(tooltip);
}
public FindRefsInWorkingSetAction(IWorkbenchSite site, String label, String tooltip) {
super(site);
setText(label); //$NON-NLS-1$
setText(label);
setToolTipText(tooltip); //$NON-NLS-1
}

View file

@ -25,8 +25,8 @@ public class FindRefsProjectAction extends FindAction {
public FindRefsProjectAction(CEditor editor, String label, String tooltip){
super(editor);
setText(label); //$NON-NLS-1$
setToolTipText(tooltip); //$NON-NLS-1$
setText(label);
setToolTipText(tooltip);
}
public FindRefsProjectAction(CEditor editor){

View file

@ -160,7 +160,7 @@ public class SelectionParseAction extends Action {
statusManager = ((IEditorSite) fSite).getActionBars().getStatusLineManager();
}
if( statusManager != null )
statusManager.setErrorMessage(CSearchMessages.getString(message));//$NON-NLS-1$
statusManager.setErrorMessage(CSearchMessages.getString(message));
}
});
}

View file

@ -27,13 +27,13 @@ public class WorkingSetFindAction extends FindAction {
public WorkingSetFindAction(CEditor editor, FindAction action, String string) {
super ( editor );
this.findAction = action;
setText(string); //$NON-NLS-1$
setText(string);
}
public WorkingSetFindAction(IWorkbenchSite site,FindAction action, String string) {
super(site);
this.findAction = action;
setText(string); //$NON-NLS-1$
setText(string);
}
protected String getScopeDescription() {

View file

@ -81,7 +81,7 @@ public class CReconcilingStrategy implements IReconcilingStrategy {
IDocument doc = fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput());
if ((doc != null) && (!CWordFinder.isGlobal(doc, dOff))) {
String s = "";
String s = ""; //$NON-NLS-1$
if (dirtyRegion.getType().charAt(2) == 'i') { // insert operation
s = dirtyRegion.getText();
if (!CWordFinder.hasCBraces(s)) {

View file

@ -280,7 +280,7 @@ public class CSourceViewerConfiguration extends TextSourceViewerConfiguration {
// prefix[0] is either '\t' or ' ' x tabWidth, depending on useSpaces
int tabWidth= getTabWidth(sourceViewer);
boolean useSpaces= getPreferenceStore().getBoolean(CEditor.SPACES_FOR_TABS); //$NON-NLS-1$
boolean useSpaces= getPreferenceStore().getBoolean(CEditor.SPACES_FOR_TABS);
for (int i= 0; i <= tabWidth; i++) {
StringBuffer prefix= new StringBuffer();

View file

@ -64,7 +64,7 @@ public class ContentAssistPreference {
/** Preference key for completion search scope */
public final static String PROJECT_SEARCH_SCOPE= "content_assist_project_search_scope"; //$NON-NLS-1$
/** Preference key for completion filtering */
public final static String PROPOSALS_FILTER= "content_assist_proposal_filter"; //$NON_NLS 1$
public final static String PROPOSALS_FILTER= "content_assist_proposal_filter"; //$NON-NLS-1$
private static Color getColor(IPreferenceStore store, String key, IColorManager manager) {
RGB rgb= PreferenceConverter.getColor(store, key);

View file

@ -35,6 +35,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPDelegate;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionTemplate;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPUsingDeclaration;
import org.eclipse.cdt.core.model.IWorkingCopy;
@ -290,10 +291,10 @@ public class DOMCompletionContributor implements ICompletionContributor {
imageDescriptor = CElementImageProvider.getFunctionImageDescriptor();
} else if (binding instanceof ICPPField) {
switch (((ICPPField)binding).getVisibility()) {
case ICPPField.v_private:
case ICPPMember.v_private:
imageDescriptor = CElementImageProvider.getFieldImageDescriptor(ASTAccessVisibility.PRIVATE);
break;
case ICPPField.v_protected:
case ICPPMember.v_protected:
imageDescriptor = CElementImageProvider.getFieldImageDescriptor(ASTAccessVisibility.PROTECTED);
break;
default:

View file

@ -188,7 +188,7 @@ public class EditorUtility {
MessageBox errorMsg = new MessageBox(CUIPlugin.getActiveWorkbenchShell(), SWT.ICON_ERROR | SWT.OK);
errorMsg.setText(CUIPlugin.getResourceString("EditorUtility.closedproject")); //$NON-NLS-1$
String desc= CUIPlugin.getResourceString("Editorutility.closedproject.description"); //$NON-NLS-1$
errorMsg.setMessage (MessageFormat.format(desc, new Object[]{project.getName()})); //$NON-NLS-1$
errorMsg.setMessage (MessageFormat.format(desc, new Object[]{project.getName()}));
errorMsg.open();
}

View file

@ -65,11 +65,11 @@ public class NewClassCodeGenerator {
private static final long serialVersionUID = 1L;
public CodeGeneratorException(String message) {
super(new Status(Status.ERROR, CUIPlugin.getPluginId(), IStatus.OK, message, null));
super(new Status(IStatus.ERROR, CUIPlugin.getPluginId(), IStatus.OK, message, null));
}
public CodeGeneratorException(Throwable e) {
super(new Status(Status.ERROR, CUIPlugin.getPluginId(), IStatus.OK, e.getMessage(), e));
super(new Status(IStatus.ERROR, CUIPlugin.getPluginId(), IStatus.OK, e.getMessage(), e));
}
}
@ -832,14 +832,14 @@ public class NewClassCodeGenerator {
StringBuffer buf = new StringBuffer();
buf.append("#include "); //$NON-NLS-1$
if (isSystemInclude)
buf.append('<'); //$NON-NLS-1$
buf.append('<');
else
buf.append('\"'); //$NON-NLS-1$
buf.append('\"');
buf.append(fileName);
if (isSystemInclude)
buf.append('>'); //$NON-NLS-1$
buf.append('>');
else
buf.append('\"'); //$NON-NLS-1$
buf.append('\"');
return buf.toString();
}

View file

@ -318,7 +318,7 @@ public class SourceFileSelectionDialog extends SelectionStatusDialog {
}
ICElement e = CoreModel.getDefault().create(res.getFullPath());
if (e instanceof ITranslationUnit) {
existingFile = (ITranslationUnit) e;
existingFile = e;
}
if (existingFile == null) {
status.setError(NewClassWizardMessages.getFormattedString("SourceFileSelectionDialog.error.NotASourceFile", str)); //$NON-NLS-1$

View file

@ -106,7 +106,7 @@ public class MemberFilterActionGroup extends ActionGroup {
MemberFilterAction hideFields= new MemberFilterAction(this, title, FILTER_FIELDS, helpContext, doHideFields);
hideFields.setDescription(ActionMessages.getString("MemberFilterActionGroup.hide_fields.description")); //$NON-NLS-1$
hideFields.setToolTipText(ActionMessages.getString("MemberFilterActionGroup.hide_fields.tooltip")); //$NON-NLS-1$
CPluginImages.setImageDescriptors(hideFields, CPluginImages.T_LCL, CPluginImages.IMG_ACTION_SHOW_FIELDS); //$NON-NLS-1$
CPluginImages.setImageDescriptors(hideFields, CPluginImages.T_LCL, CPluginImages.IMG_ACTION_SHOW_FIELDS);
// static
title= ActionMessages.getString("MemberFilterActionGroup.hide_static.label"); //$NON-NLS-1$
@ -114,7 +114,7 @@ public class MemberFilterActionGroup extends ActionGroup {
MemberFilterAction hideStatic= new MemberFilterAction(this, title, FILTER_STATIC, helpContext, doHideStatic);
hideStatic.setDescription(ActionMessages.getString("MemberFilterActionGroup.hide_static.description")); //$NON-NLS-1$
hideStatic.setToolTipText(ActionMessages.getString("MemberFilterActionGroup.hide_static.tooltip")); //$NON-NLS-1$
CPluginImages.setImageDescriptors(hideStatic, CPluginImages.T_LCL, CPluginImages.IMG_ACTION_SHOW_STATIC); //$NON-NLS-1$
CPluginImages.setImageDescriptors(hideStatic, CPluginImages.T_LCL, CPluginImages.IMG_ACTION_SHOW_STATIC);
// non-public
title= ActionMessages.getString("MemberFilterActionGroup.hide_nonpublic.label"); //$NON-NLS-1$
@ -122,7 +122,7 @@ public class MemberFilterActionGroup extends ActionGroup {
MemberFilterAction hideNonPublic= new MemberFilterAction(this, title, FILTER_NONPUBLIC, helpContext, doHidePublic);
hideNonPublic.setDescription(ActionMessages.getString("MemberFilterActionGroup.hide_nonpublic.description")); //$NON-NLS-1$
hideNonPublic.setToolTipText(ActionMessages.getString("MemberFilterActionGroup.hide_nonpublic.tooltip")); //$NON-NLS-1$
CPluginImages.setImageDescriptors(hideNonPublic, CPluginImages.T_LCL, CPluginImages.IMG_ACTION_SHOW_PUBLIC); //$NON-NLS-1$
CPluginImages.setImageDescriptors(hideNonPublic, CPluginImages.T_LCL, CPluginImages.IMG_ACTION_SHOW_PUBLIC);
// order corresponds to order in toolbar
fFilterActions= new MemberFilterAction[] { hideFields, hideStatic, hideNonPublic };

View file

@ -111,7 +111,7 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage {
*/
public String getText(Object element) {
String name = (String)mapParsers.get(element.toString());
return name != null ? name : element.toString(); //$NON-NLS-1$
return name != null ? name : element.toString();
}
};
}

View file

@ -1310,7 +1310,7 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
}
}
++count;
currName = className + separator + count; //$NON-NLS-1$
currName = className + separator + count;
}
}
@ -1564,7 +1564,7 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
}
IQualifiedTypeName typeName = new QualifiedTypeName(className);
if (typeName.isQualified()) { //$NON-NLS-1$
if (typeName.isQualified()) {
status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.QualifiedClassName")); //$NON-NLS-1$
return status;
}