From 011f7791ec58a9961d0e06fd01c0739f3c92897e Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Fri, 24 Apr 2009 08:19:29 +0000 Subject: [PATCH] Fix warnings. --- .../src/org/eclipse/cdt/core/CommandLauncher.java | 11 +++-------- core/org.eclipse.cdt.ui/plugin.xml | 11 ++++------- .../ui/preferences/SmartTypingConfigurationBlock.java | 9 ++++----- .../ui/preferences/formatter/ModifyDialogTabPage.java | 4 ++-- .../ui/search/actions/FindInWorkingSetAction.java | 4 ++-- .../ui/text/contentassist/ContentAssistProcessor.java | 6 +++--- .../refactoring/actions/CRefactoringActionGroup.java | 2 +- 7 files changed, 19 insertions(+), 28 deletions(-) diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CommandLauncher.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CommandLauncher.java index 9e4e344fbfd..c71b1c46caf 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CommandLauncher.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CommandLauncher.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. + * Copyright (c) 2005, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -112,14 +112,9 @@ public class CommandLauncher implements ICommandLauncher { /** * @deprecated - * @param commandPath - * @param args - * @param env - * @param changeToDirectory - * @return - * @throws CoreException * @since 5.1 */ + @Deprecated public Process execute(IPath commandPath, String[] args, String[] env, IPath changeToDirectory) throws CoreException { try { // add platform specific arguments (shell invocation) @@ -141,7 +136,7 @@ public class CommandLauncher implements ICommandLauncher { /** * @since 5.1 - * @see org.eclipse.cdt.core.ICommandLauncher#execute(org.eclipse.core.runtime.IPath, java.lang.String[], java.lang.String[], org.eclipse.core.runtime.IPath) + * @see org.eclipse.cdt.core.ICommandLauncher#execute(IPath, String[], String[], IPath, IProgressMonitor) */ public Process execute(IPath commandPath, String[] args, String[] env, IPath changeToDirectory, IProgressMonitor monitor) throws CoreException { try { diff --git a/core/org.eclipse.cdt.ui/plugin.xml b/core/org.eclipse.cdt.ui/plugin.xml index 26d04529dc9..f74147cdc55 100644 --- a/core/org.eclipse.cdt.ui/plugin.xml +++ b/core/org.eclipse.cdt.ui/plugin.xml @@ -3134,17 +3134,14 @@ + name="%workingSetConfigsPage"> - - + + + - diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/SmartTypingConfigurationBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/SmartTypingConfigurationBlock.java index 3ed72b94815..1d78f93ca67 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/SmartTypingConfigurationBlock.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/SmartTypingConfigurationBlock.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2008 IBM Corporation and others. + * Copyright (c) 2000, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,12 +10,11 @@ * Sergey Prigogin, Google * Anton Leherbauer (Wind River Systems) *******************************************************************************/ - package org.eclipse.cdt.internal.ui.preferences; +import org.eclipse.core.runtime.Assert; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.core.runtime.Assert; import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.swt.SWT; @@ -194,9 +193,9 @@ class SmartTypingConfigurationBlock extends AbstractConfigurationBlock { String text; String indentMode= CUIPlugin.getDefault().getCombinedPreferenceStore().getString(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR); if (CCorePlugin.TAB.equals(indentMode)) - text= Messages.format(PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_tab_text, new String[] {Integer.toString(getTabDisplaySize())}); + text= Messages.format(PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_tab_text, Integer.toString(getTabDisplaySize())); else - text= Messages.format(PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_others_text, new String[] {Integer.toString(getTabDisplaySize()), Integer.toString(getIndentSize()), getIndentMode()}); + text= Messages.format(PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_others_text, Integer.toString(getTabDisplaySize()), Integer.toString(getIndentSize()), getIndentMode()); final Link link= new Link(composite, SWT.NONE); link.setText(text); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/ModifyDialogTabPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/ModifyDialogTabPage.java index 8758970c8ce..7937b812bb4 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/ModifyDialogTabPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/ModifyDialogTabPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2008 IBM Corporation and others. + * Copyright (c) 2000, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -368,7 +368,7 @@ public abstract class ModifyDialogTabPage implements IModifyDialogTabPage { } private IStatus createErrorStatus() { - return new Status(IStatus.ERROR, CUIPlugin.getPluginId(), 0, Messages.format(FormatterMessages.ModifyDialogTabPage_NumberPreference_error_invalid_value, new String [] {Integer.toString(fMinValue), Integer.toString(fMaxValue)}), null); + return new Status(IStatus.ERROR, CUIPlugin.getPluginId(), 0, Messages.format(FormatterMessages.ModifyDialogTabPage_NumberPreference_error_invalid_value, Integer.toString(fMinValue), Integer.toString(fMaxValue)), null); } protected void focusGained() { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindInWorkingSetAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindInWorkingSetAction.java index 1d06071e86b..b5d8c712016 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindInWorkingSetAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindInWorkingSetAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others. + * Copyright (c) 2007, 2009 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -54,7 +54,7 @@ public abstract class FindInWorkingSetAction extends FindAction { fWorkingSets= askForWorkingSets(); } if (fWorkingSets != null) { - scopeDescription = Messages.format(CSearchMessages.WorkingSetScope, new String[] {CSearchUtil.toString(fWorkingSets)}); + scopeDescription = Messages.format(CSearchMessages.WorkingSetScope, CSearchUtil.toString(fWorkingSets)); super.run(); } fWorkingSets= initial; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistProcessor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistProcessor.java index 1f497309c34..adaa3a61a8e 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistProcessor.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistProcessor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -559,11 +559,11 @@ public class ContentAssistProcessor implements IContentAssistProcessor { } private String createEmptyMessage() { - return Messages.format(ContentAssistMessages.ContentAssistProcessor_empty_message, new String[]{getCategoryLabel(fRepetition)}); + return Messages.format(ContentAssistMessages.ContentAssistProcessor_empty_message, getCategoryLabel(fRepetition)); } private String createIterationMessage() { - return Messages.format(ContentAssistMessages.ContentAssistProcessor_toggle_affordance_update_message, new String[]{ getCategoryLabel(fRepetition), fIterationGesture, getCategoryLabel(fRepetition + 1) }); + return Messages.format(ContentAssistMessages.ContentAssistProcessor_toggle_affordance_update_message, getCategoryLabel(fRepetition), fIterationGesture, getCategoryLabel(fRepetition + 1)); } private String getCategoryLabel(int repetition) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/refactoring/actions/CRefactoringActionGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/refactoring/actions/CRefactoringActionGroup.java index 72e83861e7d..10d29b6a2f3 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/refactoring/actions/CRefactoringActionGroup.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/refactoring/actions/CRefactoringActionGroup.java @@ -238,7 +238,7 @@ public class CRefactoringActionGroup extends ActionGroup implements ISelectionCh refactorSubmenu.add(new Separator(GROUP_REORG2)); refactorSubmenu.add(new Separator(GROUP_TYPE)); refactorSubmenu.add(new Separator(GROUP_TYPE2)); - refactorSubmenu.add(new Separator(GROUP_CODING2));; + refactorSubmenu.add(new Separator(GROUP_CODING2)); refactorSubmenu.add(new Separator(GROUP_TYPE3)); menu.appendToGroup(fGroupName, refactorSubmenu);