@@ -174,14 +174,14 @@ public void draw(Composite composite) {
174
174
composite .setLayout (theGridLayout );
175
175
176
176
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 ) {
180
180
Activator .log (new Status (IStatus .ERROR , Activator .getId (),
181
181
"ArduinoHelpers.getBoardsFiles() returns null.\n This should not happen.\n It looks like the download of the boards failed." )); //$NON-NLS-1$
182
182
}
183
183
184
- switch (mAllBoardsFileNames .length ) {
184
+ switch (this . mAllBoardsFileNames .length ) {
185
185
case 0 :
186
186
Activator .log (new Status (IStatus .ERROR , Activator .getId (), Messages .error_no_platform_files_found , null ));
187
187
break ;
@@ -199,7 +199,7 @@ public void draw(Composite composite) {
199
199
theGriddata .horizontalSpan = (this .ncol - 1 );
200
200
this .mControlBoardsTxtFile .setLayoutData (theGriddata );
201
201
this .mControlBoardsTxtFile .setEnabled (false );
202
- this .mControlBoardsTxtFile .setItems (tidyUpLength (mAllBoardsFileNames ));
202
+ this .mControlBoardsTxtFile .setItems (tidyUpLength (this . mAllBoardsFileNames ));
203
203
204
204
createLine (composite , this .ncol );
205
205
// -------
@@ -265,17 +265,17 @@ public void draw(Composite composite) {
265
265
Dialog .applyDialogFont (composite );
266
266
}
267
267
268
- private String [] tidyUpLength (String [] pLongNames ) {
268
+ private static String [] tidyUpLength (String [] pLongNames ) {
269
269
ArrayList <String > shortNames = new ArrayList <>();
270
- for (String longName : pLongNames ) {
270
+ for (String longName : pLongNames ) {
271
271
String [] pathParts = longName .split (File .separator );
272
- if (pathParts .length > 10 ) {
272
+ if (pathParts .length > 10 ) {
273
273
StringJoiner sj = new StringJoiner (File .separator );
274
274
sj .add (pathParts [0 ]);
275
275
sj .add (pathParts [1 ]);
276
276
sj .add (pathParts [2 ]);
277
277
sj .add (pathParts [3 ]);
278
- sj .add ("..." );
278
+ sj .add ("..." ); //$NON-NLS-1$
279
279
sj .add (pathParts [pathParts .length - 5 ]);
280
280
sj .add (pathParts [pathParts .length - 4 ]);
281
281
sj .add (pathParts [pathParts .length - 3 ]);
@@ -452,7 +452,7 @@ protected File getSelectedBoardsFile() {
452
452
}
453
453
int index = this .mControlBoardsTxtFile .getSelectionIndex ();
454
454
return new File (this .mAllBoardsFileNames [index ]);
455
- // return new File(this.mControlBoardsTxtFile.getText().trim());
455
+ // return new File(this.mControlBoardsTxtFile.getText().trim());
456
456
}
457
457
458
458
private String getUpLoadPort () {
0 commit comments