Skip to content

Commit 3eb063d

Browse files
subyssurendran666SougandhS
authored andcommitted
Resolved the NLS.bind() issues
Resolved the NLS.bind() issues due to the osgi Ref: eclipse-platform/eclipse.platform#1854
1 parent 093195d commit 3eb063d

File tree

88 files changed

+222
-219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+222
-219
lines changed

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/JavaUISourceLocator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ private Object findSourceElement(IStackFrame stackFrame) {
202202
// prompt
203203
TwoPaneElementSelector dialog = new TwoPaneElementSelector(JDIDebugUIPlugin.getActiveWorkbenchShell(), new SourceElementLabelProvider(),new SourceElementQualifierProvider());
204204
dialog.setTitle(DebugUIMessages.JavaUISourceLocator_Select_Source_1);
205-
dialog.setMessage(NLS.bind(DebugUIMessages.JavaUISourceLocator__Select_the_source_that_corresponds_to__0__2, new String[]{type.getName()}));
205+
dialog.setMessage(NLS.bind(DebugUIMessages.JavaUISourceLocator__Select_the_source_that_corresponds_to__0__2, type.getName()));
206206
dialog.setElements(sourceElements);
207207
dialog.setMultipleSelection(false);
208208
dialog.setUpperListLabel(DebugUIMessages.JavaUISourceLocator__Matching_files__3);
@@ -250,7 +250,7 @@ private void showDebugSourcePage(final IJavaStackFrame frame) {
250250
@Override
251251
public void run() {
252252
try {
253-
String message = NLS.bind(LauncherMessages.JavaUISourceLocator_selectprojects_message, new String[] {frame.getDeclaringTypeName()});
253+
String message = NLS.bind(LauncherMessages.JavaUISourceLocator_selectprojects_message, frame.getDeclaringTypeName());
254254

255255
ILaunchConfiguration configuration =
256256
frame.getLaunch().getLaunchConfiguration();

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/AbstractVMInstallPage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ protected void nameChanged(String newName, boolean init) {
157157
} else {
158158
IStatus s = ResourcesPlugin.getWorkspace().validateName(newName, IResource.FILE);
159159
if (!s.isOK()) {
160-
fNameStatus = new Status(IStatus.ERROR, JDIDebugUIPlugin.getUniqueIdentifier(), NLS.bind(JREMessages.AddVMDialog_JRE_name_must_be_a_valid_file_name___0__1, new String[]{s.getMessage()}));
160+
fNameStatus = new Status(IStatus.ERROR, JDIDebugUIPlugin.getUniqueIdentifier(), NLS.bind(JREMessages.AddVMDialog_JRE_name_must_be_a_valid_file_name___0__1, s.getMessage()));
161161
}
162162
}
163163
}

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaClasspathTab.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -494,15 +494,15 @@ public boolean isValid(ILaunchConfiguration launchConfig) {
494494
if (status.isOK()) {
495495
IProject project= ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
496496
if (!project.exists()) {
497-
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_20, new String[] {projectName}));
497+
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_20, projectName));
498498
return false;
499499
}
500500
if (!project.isOpen()) {
501-
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_21, new String[] {projectName}));
501+
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_21, projectName));
502502
return false;
503503
}
504504
} else {
505-
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_19, new String[]{status.getMessage()}));
505+
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_19, status.getMessage()));
506506
return false;
507507
}
508508
}
@@ -513,14 +513,14 @@ public boolean isValid(ILaunchConfiguration launchConfig) {
513513
type = entries[i].getType();
514514
if (type == IRuntimeClasspathEntry.ARCHIVE) {
515515
if(!entries[i].getPath().isAbsolute()) {
516-
setErrorMessage(NLS.bind(LauncherMessages.JavaClasspathTab_Invalid_runtime_classpath_1, new String[]{entries[i].getPath().toString()}));
516+
setErrorMessage(NLS.bind(LauncherMessages.JavaClasspathTab_Invalid_runtime_classpath_1, entries[i].getPath().toString()));
517517
return false;
518518
}
519519
}
520520
if(type == IRuntimeClasspathEntry.PROJECT) {
521521
IResource res = entries[i].getResource();
522522
if(res != null && !res.isAccessible()) {
523-
setErrorMessage(NLS.bind(LauncherMessages.JavaClasspathTab_1, new String[]{res.getName()}));
523+
setErrorMessage(NLS.bind(LauncherMessages.JavaClasspathTab_1, res.getName()));
524524
return false;
525525
}
526526
}

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaDependenciesTab.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -533,15 +533,15 @@ public boolean isValid(ILaunchConfiguration launchConfig) {
533533
if (status.isOK()) {
534534
IProject project= ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
535535
if (!project.exists()) {
536-
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_20, new String[] {projectName}));
536+
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_20, projectName));
537537
return false;
538538
}
539539
if (!project.isOpen()) {
540-
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_21, new String[] {projectName}));
540+
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_21, projectName));
541541
return false;
542542
}
543543
} else {
544-
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_19, new String[]{status.getMessage()}));
544+
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_19, status.getMessage()));
545545
return false;
546546
}
547547
}
@@ -552,14 +552,14 @@ public boolean isValid(ILaunchConfiguration launchConfig) {
552552
type = entries[i].getType();
553553
if (type == IRuntimeClasspathEntry.ARCHIVE) {
554554
if(!entries[i].getPath().isAbsolute()) {
555-
setErrorMessage(NLS.bind(LauncherMessages.JavaClasspathTab_Invalid_runtime_classpath_1, new String[]{entries[i].getPath().toString()}));
555+
setErrorMessage(NLS.bind(LauncherMessages.JavaClasspathTab_Invalid_runtime_classpath_1, entries[i].getPath().toString()));
556556
return false;
557557
}
558558
}
559559
if(type == IRuntimeClasspathEntry.PROJECT) {
560560
IResource res = entries[i].getResource();
561561
if(res != null && !res.isAccessible()) {
562-
setErrorMessage(NLS.bind(LauncherMessages.JavaClasspathTab_1, new String[]{res.getName()}));
562+
setErrorMessage(NLS.bind(LauncherMessages.JavaClasspathTab_1, res.getName()));
563563
return false;
564564
}
565565
}

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaJRETab.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ public String getDescription() {
574574
if (vm != null) {
575575
name = vm.getName();
576576
}
577-
return NLS.bind(LauncherMessages.JavaJRETab_8, new String[]{name});
577+
return NLS.bind(LauncherMessages.JavaJRETab_8, name);
578578
}
579579
try {
580580
String eeName = null;
@@ -599,11 +599,11 @@ public String getDescription() {
599599
name = vm.getName();
600600
}
601601
if (eeName != null) {
602-
return NLS.bind(LauncherMessages.JavaJRETab_5, new String[]{eeName, name});
602+
return NLS.bind(LauncherMessages.JavaJRETab_5, eeName, name);
603603
}
604604
} catch (CoreException e) {
605605
}
606-
return NLS.bind(LauncherMessages.JavaJRETab_9, new String[]{name});
606+
return NLS.bind(LauncherMessages.JavaJRETab_9, name);
607607
}
608608
};
609609
}

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaMainTab.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,16 +199,16 @@ public boolean isValid(ILaunchConfiguration config) {
199199
if (status.isOK()) {
200200
IProject project= ResourcesPlugin.getWorkspace().getRoot().getProject(name);
201201
if (!project.exists()) {
202-
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_20, new String[] {name}));
202+
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_20, name));
203203
return false;
204204
}
205205
if (!project.isOpen()) {
206-
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_21, new String[] {name}));
206+
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_21, name));
207207
return false;
208208
}
209209
}
210210
else {
211-
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_19, new String[]{status.getMessage()}));
211+
setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_19, status.getMessage()));
212212
return false;
213213
}
214214
} else {

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/ClassPrepareBreakpointTypeChange.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public ClassPrepareBreakpointTypeChange(IJavaClassPrepareBreakpoint breakpoint,
4646
@Override
4747
public String getName() {
4848
return NLS.bind(RefactoringMessages.ClassPrepareBreakpointTypeChange_0,
49-
new String[] {getBreakpointLabel(getOriginalBreakpoint()), fDestType.getElementName()});
49+
getBreakpointLabel(getOriginalBreakpoint()), fDestType.getElementName());
5050
}
5151

5252
/* (non-Javadoc)

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/DeleteBreakpointChange.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public DeleteBreakpointChange(IJavaBreakpoint breakpoint) throws CoreException {
4040
@Override
4141
public String getName() {
4242
return NLS.bind(RefactoringMessages.DeleteBreakpointChange_0,
43-
new String[] {getBreakpointLabel(getOriginalBreakpoint())});
43+
getBreakpointLabel(getOriginalBreakpoint()));
4444
}
4545

4646
/* (non-Javadoc)

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/ExceptionBreakpointTypeChange.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public ExceptionBreakpointTypeChange(IJavaExceptionBreakpoint breakpoint, IType
4444
@Override
4545
public String getName() {
4646
return NLS.bind(RefactoringMessages.ExceptionBreakpointTypeChange_0,
47-
new String[] {getBreakpointLabel(getOriginalBreakpoint()), fDestType.getElementName()});
47+
getBreakpointLabel(getOriginalBreakpoint()), fDestType.getElementName());
4848
}
4949

5050
/* (non-Javadoc)

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/LaunchConfigurationProjectMainTypeChange.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ public Object getModifiedElement() {
8383
@Override
8484
public String getName() {
8585
if (fNewLaunchConfigurationName != null) {
86-
return NLS.bind(RefactoringMessages.LaunchConfigurationProjectMainTypeChange_0, new String[] {fLaunchConfiguration.getName(), fNewLaunchConfigurationName});
86+
return NLS.bind(RefactoringMessages.LaunchConfigurationProjectMainTypeChange_0, fLaunchConfiguration.getName(), fNewLaunchConfigurationName);
8787
}
8888
if (fNewProjectName == null) {
89-
return NLS.bind(RefactoringMessages.LaunchConfigurationProjectMainTypeChange_1, new String[] {fLaunchConfiguration.getName()});
89+
return NLS.bind(RefactoringMessages.LaunchConfigurationProjectMainTypeChange_1, fLaunchConfiguration.getName());
9090
}
9191
if (fNewMainTypeName == null) {
92-
return NLS.bind(RefactoringMessages.LaunchConfigurationProjectMainTypeChange_2, new String[] {fLaunchConfiguration.getName()});
92+
return NLS.bind(RefactoringMessages.LaunchConfigurationProjectMainTypeChange_2, fLaunchConfiguration.getName());
9393
}
94-
return NLS.bind(RefactoringMessages.LaunchConfigurationProjectMainTypeChange_3, new String[] {fLaunchConfiguration.getName()});
94+
return NLS.bind(RefactoringMessages.LaunchConfigurationProjectMainTypeChange_3, fLaunchConfiguration.getName());
9595
}
9696

9797
/* (non-Javadoc)
@@ -113,17 +113,17 @@ public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException, Oper
113113
if (fOldProjectName.equals(projectName)) {
114114
return new RefactoringStatus();
115115
}
116-
return RefactoringStatus.createWarningStatus(NLS.bind(RefactoringMessages.LaunchConfigurationProjectMainTypeChange_4, new String[] {fLaunchConfiguration.getName(), fOldProjectName}));
116+
return RefactoringStatus.createWarningStatus(NLS.bind(RefactoringMessages.LaunchConfigurationProjectMainTypeChange_4, fLaunchConfiguration.getName(), fOldProjectName));
117117
}
118-
return RefactoringStatus.createWarningStatus(NLS.bind(RefactoringMessages.LaunchConfigurationProjectMainTypeChange_5, new String[] {fLaunchConfiguration.getName(), fOldMainTypeName}));
118+
return RefactoringStatus.createWarningStatus(NLS.bind(RefactoringMessages.LaunchConfigurationProjectMainTypeChange_5, fLaunchConfiguration.getName(), fOldMainTypeName));
119119
}
120120
//need to catch the case for remote java LC's, they have no maintype
121121
if (fOldProjectName.equals(projectName)) {
122122
return new RefactoringStatus();
123123
}
124-
return RefactoringStatus.createWarningStatus(NLS.bind(RefactoringMessages.LaunchConfigurationProjectMainTypeChange_4, new String[] {fLaunchConfiguration.getName(), fOldProjectName}));
124+
return RefactoringStatus.createWarningStatus(NLS.bind(RefactoringMessages.LaunchConfigurationProjectMainTypeChange_4, fLaunchConfiguration.getName(), fOldProjectName));
125125
}
126-
return RefactoringStatus.createFatalErrorStatus(NLS.bind(RefactoringMessages.LaunchConfigurationProjectMainTypeChange_6, new String[] {fLaunchConfiguration.getName()}));
126+
return RefactoringStatus.createFatalErrorStatus(NLS.bind(RefactoringMessages.LaunchConfigurationProjectMainTypeChange_6, fLaunchConfiguration.getName()));
127127
}
128128

129129
/* (non-Javadoc)

0 commit comments

Comments
 (0)