diff options
author | Stefan Xenos | 2016-03-22 17:33:14 +0000 |
---|---|---|
committer | Stefan Xenos | 2016-03-22 21:52:18 +0000 |
commit | bd0ead98b29653875145033cf77d61e14c636b02 (patch) | |
tree | c5bf10618a50078c31229d396f53185268ca1ecf /bundles/org.eclipse.compare | |
parent | b8821710ffb03f8e7573be209e1ab14e27ba04b4 (diff) | |
download | eclipse.platform.team-bd0ead98b29653875145033cf77d61e14c636b02.tar.gz eclipse.platform.team-bd0ead98b29653875145033cf77d61e14c636b02.tar.xz eclipse.platform.team-bd0ead98b29653875145033cf77d61e14c636b02.zip |
Bug 489805 - Move the team git repository to Java 1.8
Fixes compiler warnings.
This reverts commit b8821710ffb03f8e7573be209e1ab14e27ba04b4.
Change-Id: I64b54428dc8500ab05427d505bb801e46511916b
Signed-off-by: Stefan Xenos <sxenos@gmail.com>
Diffstat (limited to 'bundles/org.eclipse.compare')
19 files changed, 55 insertions, 60 deletions
diff --git a/bundles/org.eclipse.compare/.classpath b/bundles/org.eclipse.compare/.classpath index d6b5509a8..013075d7e 100644 --- a/bundles/org.eclipse.compare/.classpath +++ b/bundles/org.eclipse.compare/.classpath @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="src" path="compare/"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/> + <classpathentry kind="src" path="compare"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/bundles/org.eclipse.compare/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.compare/.settings/org.eclipse.jdt.core.prefs index ae8b25168..06f23f327 100644 --- a/bundles/org.eclipse.compare/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/org.eclipse.compare/.settings/org.eclipse.jdt.core.prefs @@ -7,21 +7,22 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch org.eclipse.jdt.core.circularClasspath=error
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -67,7 +68,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,NORMAL,NORMAL
org.eclipse.jdt.core.compiler.taskTags=TODO,XXX,FIXME
diff --git a/bundles/org.eclipse.compare/META-INF/MANIFEST.MF b/bundles/org.eclipse.compare/META-INF/MANIFEST.MF index 9f19c09eb..823e37d40 100644 --- a/bundles/org.eclipse.compare/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.compare/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.compare; singleton:=true -Bundle-Version: 3.5.700.qualifier +Bundle-Version: 3.6.0.qualifier Bundle-Activator: org.eclipse.compare.internal.CompareUIPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin @@ -27,4 +27,4 @@ Require-Bundle: org.eclipse.ui;bundle-version="[3.5.0,4.0.0)", Bundle-ActivationPolicy: lazy Import-Package: com.ibm.icu.util, com.ibm.icu.text -Bundle-RequiredExecutionEnvironment: J2SE-1.4 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java index 12590240c..ff983b0db 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java @@ -319,7 +319,7 @@ public abstract class CompareViewerSwitchingPane extends CompareViewerPane { if (fTitle != null) { if (fTitleArgument != null) { String format= CompareMessages.CompareViewerSwitchingPane_Titleformat; - String t= MessageFormat.format(format, new String[] { fTitle, fTitleArgument } ); + String t= MessageFormat.format(format, fTitle, fTitleArgument); setText(t); } else setText(fTitle); diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java index 95b4f30c9..a2f805d4c 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java @@ -630,7 +630,7 @@ public class EditionSelectionDialog extends ResizableDialog { private String formatString(String string, String variable) { // Only process the string if it contains a variable or an escaped quote (see bug 190023) if (hasVariable(string) || hasDoubleQuotes(string)) - return MessageFormat.format(string, new Object[] { variable }); + return MessageFormat.format(string, variable); return string; } @@ -833,7 +833,7 @@ public class EditionSelectionDialog extends ResizableDialog { if (fTitleArg == null) fTitleArg= fTargetPair.getItem().getName(); String titleFormat= Utilities.getString(fBundle, "treeTitleFormat"); //$NON-NLS-1$ - String title= MessageFormat.format(titleFormat, new String[] { fTitleArg }); + String title= MessageFormat.format(titleFormat, fTitleArg ); fEditionPane.setText(title); if (fTitleImage != null) fEditionPane.setImage(fTitleImage); @@ -1062,7 +1062,7 @@ public class EditionSelectionDialog extends ResizableDialog { formatKey= "dayFormat"; //$NON-NLS-1$ String pattern= Utilities.getString(fBundle, formatKey); if (pattern != null) - df= MessageFormat.format(pattern, new String[] { df }); + df= MessageFormat.format(pattern, df); lastDay.setText(df); lastDay.setData(date); } @@ -1072,7 +1072,7 @@ public class EditionSelectionDialog extends ResizableDialog { String s= getShortEditionLabel(edition, item, date); if (pair.fHasError) { String pattern= Utilities.getString(fBundle, "parseErrorFormat"); //$NON-NLS-1$ - s= MessageFormat.format(pattern, new String[] { s } ); + s= MessageFormat.format(pattern, s); } ti.setText(s); diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java index c10b0854e..dffed0627 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java @@ -2162,7 +2162,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable { IWorkbenchPart workbenchPart = getCompareConfiguration().getContainer().getWorkbenchPart(); if (workbenchPart != null) { - IContextService service = (IContextService)workbenchPart.getSite().getService(IContextService.class); + IContextService service = workbenchPart.getSite().getService(IContextService.class); if (service != null) { service.activateContext("org.eclipse.ui.textEditorScope"); //$NON-NLS-1$ } @@ -3649,22 +3649,18 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable { String format= CompareMessages.TextMergeViewer_diffDescription_diff_format; diffDescription= MessageFormat.format(format, - new String[] { - getDiffType(diff), // 0: diff type - getDiffNumber(diff), // 1: diff number - getDiffRange(fLeft, diff.getPosition(LEFT_CONTRIBUTOR)), // 2: left start line - getDiffRange(fRight, diff.getPosition(RIGHT_CONTRIBUTOR)) // 3: left end line - } + getDiffType(diff), // 0: diff type + getDiffNumber(diff), // 1: diff number + getDiffRange(fLeft, diff.getPosition(LEFT_CONTRIBUTOR)), // 2: left start line + getDiffRange(fRight, diff.getPosition(RIGHT_CONTRIBUTOR)) // 3: left end line ); } String format= CompareMessages.TextMergeViewer_statusLine_format; String s= MessageFormat.format(format, - new String[] { - getCursorPosition(fLeft), // 0: left column - getCursorPosition(fRight), // 1: right column - diffDescription // 2: diff description - } + getCursorPosition(fLeft), // 0: left column + getCursorPosition(fRight), // 1: right column + diffDescription // 2: diff description ); getCompareConfiguration().getContainer().setStatusMessage(s); @@ -3684,7 +3680,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable { break; } String format= CompareMessages.TextMergeViewer_diffType_format; - return MessageFormat.format(format, new String[] { s, diff.changeType() } ); + return MessageFormat.format(format, s, diff.changeType()); } private String getDiffNumber(Diff diff) { @@ -3711,9 +3707,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable { format= CompareMessages.TextMergeViewer_beforeLine_format; else format= CompareMessages.TextMergeViewer_range_format; - return MessageFormat.format(format, - new String[] { Integer.toString(startLine), - Integer.toString(endLine) } ); + return MessageFormat.format(format, Integer.toString(startLine), Integer.toString(endLine)); } /* @@ -3745,7 +3739,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable { String format= CompareMessages.TextMergeViewer_cursorPosition_format; return MessageFormat.format(format, - new String[] { Integer.toString(line + 1), Integer.toString(column + 1) } ); + Integer.toString(line + 1), Integer.toString(column + 1) ); } catch (BadLocationException x) { // silently ignored diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryDialog.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryDialog.java index 17e1501af..23231bb83 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryDialog.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryDialog.java @@ -152,7 +152,7 @@ public class AddFromHistoryDialog extends ResizableDialog { create(); // create widgets String format= Utilities.getString(fBundle, "memberPaneTitle"); //$NON-NLS-1$ - String title= MessageFormat.format(format, new Object[] { root.getName() }); + String title= MessageFormat.format(format, root.getName()); fMemberPane.setImage(CompareUI.getImage(root)); fMemberPane.setText(title); @@ -313,7 +313,7 @@ public class AddFromHistoryDialog extends ResizableDialog { fEditionPane.setImage(CompareUI.getImage(file)); String pattern= Utilities.getString(fBundle, "treeTitleFormat"); //$NON-NLS-1$ - String title= MessageFormat.format(pattern, new Object[] { file.getName() }); + String title= MessageFormat.format(pattern, file.getName()); fEditionPane.setText(title); if (fEditionTree != null) { @@ -362,7 +362,7 @@ public class AddFromHistoryDialog extends ResizableDialog { formatKey= "dayFormat"; //$NON-NLS-1$ String pattern= Utilities.getString(fBundle, formatKey); if (pattern != null) - df= MessageFormat.format(pattern, new String[] { df }); + df= MessageFormat.format(pattern, df); lastDay.setText(df); lastDay.setData(date); } @@ -421,7 +421,7 @@ public class AddFromHistoryDialog extends ResizableDialog { long modDate= input.getModificationDate(); String date= DateFormat.getDateTimeInstance().format(new Date(modDate)); - return MessageFormat.format(format, new Object[] { date }); + return MessageFormat.format(format, date); } /* (non-Javadoc) diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewer.java index d9bb9563d..57fe155d1 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewer.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewer.java @@ -92,7 +92,7 @@ public class BinaryCompareViewer extends AbstractViewer { int r= right.read(); if (l != r) { String format= Utilities.getString(fBundle, "diffMessageFormat"); //$NON-NLS-1$ - message= MessageFormat.format(format, new String[] { Integer.toString(pos) } ); + message= MessageFormat.format(format, Integer.toString(pos) ); break; } if (l == EOF) diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java index 2a18594ed..efbe3f056 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java @@ -319,7 +319,7 @@ public class CompareEditor extends EditorPart implements IReusableEditor, ISavea } private void registerSaveable() { - ISaveablesLifecycleListener lifecycleListener= (ISaveablesLifecycleListener) getSite().getService(ISaveablesLifecycleListener.class); + ISaveablesLifecycleListener lifecycleListener= getSite().getService(ISaveablesLifecycleListener.class); lifecycleListener.handleLifecycleEvent( new SaveablesLifecycleEvent(this, SaveablesLifecycleEvent.POST_OPEN, internalGetSaveables(true), false)); } @@ -332,7 +332,7 @@ public class CompareEditor extends EditorPart implements IReusableEditor, ISavea // Let the workbench know that the old input's saveables are no longer needed if (knownSaveables != null && !knownSaveables.isEmpty()) { - ISaveablesLifecycleListener lifecycleListener= (ISaveablesLifecycleListener) getSite().getService(ISaveablesLifecycleListener.class); + ISaveablesLifecycleListener lifecycleListener= getSite().getService(ISaveablesLifecycleListener.class); lifecycleListener.handleLifecycleEvent( new SaveablesLifecycleEvent(this, SaveablesLifecycleEvent.POST_CLOSE, (Saveable[]) knownSaveables.toArray(new Saveable[knownSaveables.size()]), false)); knownSaveables.clear(); @@ -412,7 +412,7 @@ public class CompareEditor extends EditorPart implements IReusableEditor, ISavea parent.setData(this); fPageBook = new PageBook(parent, SWT.NONE); createCompareControl(); - IContextService service = (IContextService)getSite().getService(IContextService.class); + IContextService service = getSite().getService(IContextService.class); if (service != null) { service.activateContext("org.eclipse.compare.compareEditorScope"); //$NON-NLS-1$ service.activateContext("org.eclipse.ui.textEditorScope"); //$NON-NLS-1$ @@ -741,7 +741,7 @@ public class CompareEditor extends EditorPart implements IReusableEditor, ISavea } public void handleLifecycleEvent(SaveablesLifecycleEvent event) { - ISaveablesLifecycleListener lifecycleListener= (ISaveablesLifecycleListener) getSite().getService(ISaveablesLifecycleListener.class); + ISaveablesLifecycleListener lifecycleListener= getSite().getService(ISaveablesLifecycleListener.class); if (event.getEventType() == SaveablesLifecycleEvent.POST_CLOSE) { // We may get a post close for a saveable that is not known to the workbench. // Only pass on the event for known saveables diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareHandlerService.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareHandlerService.java index 0037c2db5..a3b4d4fcc 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareHandlerService.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareHandlerService.java @@ -35,13 +35,13 @@ public class CompareHandlerService { public static CompareHandlerService createFor(ICompareContainer container, Shell shell) { IServiceLocator serviceLocator = container.getServiceLocator(); if (serviceLocator != null) { - IHandlerService service = (IHandlerService)serviceLocator.getService(IHandlerService.class); + IHandlerService service = serviceLocator.getService(IHandlerService.class); if (service != null) return new CompareHandlerService(container, null); } if (container.getWorkbenchPart() == null && shell != null) { // We're in a dialog so we can use an active shell expression - IHandlerService service = (IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class); + IHandlerService service = PlatformUI.getWorkbench().getService(IHandlerService.class); if (service != null) { Expression e = new ActiveShellExpression(shell); return new CompareHandlerService(container, e); @@ -83,13 +83,13 @@ public class CompareHandlerService { if (fHandlerService == null) { IServiceLocator serviceLocator = fContainer.getServiceLocator(); if (serviceLocator != null) { - IHandlerService service = (IHandlerService)serviceLocator.getService(IHandlerService.class); + IHandlerService service = serviceLocator.getService(IHandlerService.class); if (service != null) fHandlerService = service; } if (fHandlerService == null && fContainer.getWorkbenchPart() == null && fExpression != null) { // We're in a dialog so we can use an active shell expression - IHandlerService service = (IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class); + IHandlerService service = PlatformUI.getWorkbench().getService(IHandlerService.class); if (service != null) { fHandlerService = service; } diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareResourceFilter.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareResourceFilter.java index 0e7090296..eb5529f5e 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareResourceFilter.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareResourceFilter.java @@ -63,7 +63,7 @@ public class CompareResourceFilter { IStatus status= workspace.validateName(fileName, resourceType); if (status.matches(IStatus.ERROR)) { String format= Utilities.getString("ComparePreferencePage.filter.invalidsegment.error"); //$NON-NLS-1$ - return MessageFormat.format(format, new String[] { status.getMessage() } ); + return MessageFormat.format(format, status.getMessage()); } } return null; diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java index 59797adcf..7fe0365c6 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java @@ -839,7 +839,7 @@ public class MergeSourceViewer implements ISelectionChangedListener, } private void addSave(IMenuManager menu) { - ICommandService commandService = (ICommandService) fContainer.getWorkbenchPart().getSite().getService(ICommandService.class); + ICommandService commandService = fContainer.getWorkbenchPart().getSite().getService(ICommandService.class); final Command command= commandService.getCommand(IWorkbenchCommandConstants.FILE_SAVE); final IHandler handler = command.getHandler(); diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java index 4c01f8695..8c0807f2f 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java @@ -396,10 +396,10 @@ class ResourceCompareInput extends CompareEditorInput { if (fThreeWay) { String format= Utilities.getString("ResourceCompare.threeWay.title"); //$NON-NLS-1$ String ancestorLabel= fAncestorResource.getName(); - title= MessageFormat.format(format, new String[] {ancestorLabel, leftLabel, rightLabel}); + title= MessageFormat.format(format, ancestorLabel, leftLabel, rightLabel); } else { String format= Utilities.getString("ResourceCompare.twoWay.title"); //$NON-NLS-1$ - title= MessageFormat.format(format, new String[] {leftLabel, rightLabel}); + title= MessageFormat.format(format, leftLabel, rightLabel); } setTitle(title); @@ -426,10 +426,10 @@ class ResourceCompareInput extends CompareEditorInput { if (fThreeWay) { String format= Utilities.getString("ResourceCompare.threeWay.tooltip"); //$NON-NLS-1$ String ancestorLabel= fAncestorResource.getFullPath().makeRelative().toString(); - return MessageFormat.format(format, new String[] {ancestorLabel, leftLabel, rightLabel}); + return MessageFormat.format(format, ancestorLabel, leftLabel, rightLabel); } String format= Utilities.getString("ResourceCompare.twoWay.tooltip"); //$NON-NLS-1$ - return MessageFormat.format(format, new String[] {leftLabel, rightLabel}); + return MessageFormat.format(format, leftLabel, rightLabel); } // fall back return super.getToolTipText(); diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java index 6283b3190..5565336e5 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java @@ -374,7 +374,7 @@ public class Utilities { if (bundle != null) { try { - return MessageFormat.format(bundle.getString(key), new String[] { arg }); + return MessageFormat.format(bundle.getString(key), arg); } catch (MissingResourceException x) { CompareUIPlugin.log(x); } @@ -392,7 +392,7 @@ public class Utilities { public static String getFormattedString(String key, String arg) { try { - return MessageFormat.format(CompareUI.getResourceBundle().getString(key), new String[] { arg }); + return MessageFormat.format(CompareUI.getResourceBundle().getString(key), arg); } catch (MissingResourceException e) { return "!" + key + "!"; //$NON-NLS-2$ //$NON-NLS-1$ } @@ -400,7 +400,7 @@ public class Utilities { public static String getFormattedString(String key, String arg0, String arg1) { try { - return MessageFormat.format(CompareUI.getResourceBundle().getString(key), new String[] { arg0, arg1 }); + return MessageFormat.format(CompareUI.getResourceBundle().getString(key), arg0, arg1); } catch (MissingResourceException e) { return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ } @@ -845,7 +845,7 @@ public class Utilities { public static void schedule(Job job, IWorkbenchSite site) { if (site != null) { - IWorkbenchSiteProgressService siteProgress = (IWorkbenchSiteProgressService) site.getAdapter(IWorkbenchSiteProgressService.class); + IWorkbenchSiteProgressService siteProgress = site.getAdapter(IWorkbenchSiteProgressService.class); if (siteProgress != null) { siteProgress.schedule(job, 0, true /* use half-busy cursor */); return; diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java index a8bbeccff..73b8d60c6 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java @@ -240,7 +240,7 @@ public class InputPatchPage extends WizardPage { IFilePatch2[] diffs= patcher.getDiffs(); if (diffs == null || diffs.length == 0) { String format= PatchMessages.InputPatchPage_NoDiffsFound_format; - String message= MessageFormat.format(format, new String[] { fPatchSource }); + String message= MessageFormat.format(format, fPatchSource); MessageDialog.openInformation(null, PatchMessages.InputPatchPage_PatchErrorDialog_title, message); return false; } diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchTargetPage.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchTargetPage.java index a7a81da55..44688f292 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchTargetPage.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchTargetPage.java @@ -149,7 +149,7 @@ public class PatchTargetPage extends WizardPage { break; } String format = PatchMessages.InputPatchPage_SingleFileError_format; - String message = MessageFormat.format(format, new String[] {source}); + String message = MessageFormat.format(format, source); MessageDialog.openInformation(null, PatchMessages.InputPatchPage_PatchErrorDialog_title, message); return this; } diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java index 5c4891a86..b1775f0f1 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java @@ -216,7 +216,7 @@ public class DiffNode extends DiffContainer implements ICompareInput { } String fmt= Utilities.getString("DiffNode.nameFormat"); //$NON-NLS-1$ - return MessageFormat.format(fmt, new String[] { s1, s2 }); + return MessageFormat.format(fmt, s1, s2); } void swapSides(boolean swap) { diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/Differencer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/Differencer.java index 3339b3425..182790e3e 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/Differencer.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/Differencer.java @@ -551,7 +551,7 @@ public class Differencer { if (node instanceof ITypedElement) { String name= ((ITypedElement)node).getName(); String fmt= Utilities.getString("Differencer.progressFormat"); //$NON-NLS-1$ - String msg= MessageFormat.format(fmt, new String[] { name }); + String msg= MessageFormat.format(fmt, name ); progressMonitor.subTask(msg); //progressMonitor.worked(1); } diff --git a/bundles/org.eclipse.compare/pom.xml b/bundles/org.eclipse.compare/pom.xml index d00d23a56..069866faf 100644 --- a/bundles/org.eclipse.compare/pom.xml +++ b/bundles/org.eclipse.compare/pom.xml @@ -19,6 +19,6 @@ </parent> <groupId>org.eclipse.compare</groupId> <artifactId>org.eclipse.compare</artifactId> - <version>3.5.700-SNAPSHOT</version> + <version>3.6.0-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project> |