Skip to content

Commit 79ae921

Browse files
author
jantje
committed
Fixed some warnings
1 parent 5229c0f commit 79ae921

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

io.sloeber.ui/src/io/sloeber/ui/project/properties/BoardSelectionPage.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,14 @@ public void draw(Composite composite) {
174174
composite.setLayout(theGridLayout);
175175

176176
GridData theGriddata;
177-
mAllBoardsFileNames = BoardsManager.getAllBoardsFiles();
178-
this.mNumBoardsFiles = mAllBoardsFileNames.length;
179-
if (mAllBoardsFileNames.length == 0) {
177+
this.mAllBoardsFileNames = BoardsManager.getAllBoardsFiles();
178+
this.mNumBoardsFiles = this.mAllBoardsFileNames.length;
179+
if (this.mAllBoardsFileNames.length == 0) {
180180
Activator.log(new Status(IStatus.ERROR, Activator.getId(),
181181
"ArduinoHelpers.getBoardsFiles() returns null.\nThis should not happen.\nIt looks like the download of the boards failed.")); //$NON-NLS-1$
182182
}
183183

184-
switch (mAllBoardsFileNames.length) {
184+
switch (this.mAllBoardsFileNames.length) {
185185
case 0:
186186
Activator.log(new Status(IStatus.ERROR, Activator.getId(), Messages.error_no_platform_files_found, null));
187187
break;
@@ -199,7 +199,7 @@ public void draw(Composite composite) {
199199
theGriddata.horizontalSpan = (this.ncol - 1);
200200
this.mControlBoardsTxtFile.setLayoutData(theGriddata);
201201
this.mControlBoardsTxtFile.setEnabled(false);
202-
this.mControlBoardsTxtFile.setItems(tidyUpLength(mAllBoardsFileNames));
202+
this.mControlBoardsTxtFile.setItems(tidyUpLength(this.mAllBoardsFileNames));
203203

204204
createLine(composite, this.ncol);
205205
// -------
@@ -265,17 +265,17 @@ public void draw(Composite composite) {
265265
Dialog.applyDialogFont(composite);
266266
}
267267

268-
private String[] tidyUpLength(String[] pLongNames) {
268+
private static String[] tidyUpLength(String[] pLongNames) {
269269
ArrayList<String> shortNames = new ArrayList<>();
270-
for(String longName : pLongNames) {
270+
for (String longName : pLongNames) {
271271
String[] pathParts = longName.split(File.separator);
272-
if(pathParts.length > 10) {
272+
if (pathParts.length > 10) {
273273
StringJoiner sj = new StringJoiner(File.separator);
274274
sj.add(pathParts[0]);
275275
sj.add(pathParts[1]);
276276
sj.add(pathParts[2]);
277277
sj.add(pathParts[3]);
278-
sj.add("...");
278+
sj.add("..."); //$NON-NLS-1$
279279
sj.add(pathParts[pathParts.length - 5]);
280280
sj.add(pathParts[pathParts.length - 4]);
281281
sj.add(pathParts[pathParts.length - 3]);
@@ -452,7 +452,7 @@ protected File getSelectedBoardsFile() {
452452
}
453453
int index = this.mControlBoardsTxtFile.getSelectionIndex();
454454
return new File(this.mAllBoardsFileNames[index]);
455-
// return new File(this.mControlBoardsTxtFile.getText().trim());
455+
// return new File(this.mControlBoardsTxtFile.getText().trim());
456456
}
457457

458458
private String getUpLoadPort() {

0 commit comments

Comments
 (0)