File tree Expand file tree Collapse file tree 3 files changed +24
-12
lines changed
Expand file tree Collapse file tree 3 files changed +24
-12
lines changed Original file line number Diff line number Diff line change @@ -288,14 +288,20 @@ private static String generateClasspathExistedClasses (
288288 String path = javaProject .getOutputLocation ().toString ();
289289 int idx = path .indexOf ('/' , 2 );
290290 String relativePath = null ;
291+ File srcFolder = null ;
291292 if (idx != -1 ) {
292- relativePath = path .substring (idx + 1 );
293+ relativePath = path .substring (idx + 1 );
294+ srcFolder = new File (workingDir , relativePath );
295+ } else {
296+ relativePath = "" ;
297+ srcFolder = workingDir ;
293298 }
294299
295300 buf .append ('[' );
296301 try {
297- buf .append (new File ( workingDir , relativePath ) .getCanonicalPath ());
302+ buf .append (srcFolder .getCanonicalPath ());
298303 } catch (IOException e ) {
304+ // should never run into these lines!
299305 e .printStackTrace ();
300306 buf .append (relativePath );
301307 }
@@ -394,9 +400,9 @@ private static String generateClasspathExistedClasses (
394400 int idx2 = clazzName .lastIndexOf ("." );
395401 if (idx2 != -1 ) {
396402 clazzName = clazzName .substring (0 , idx2 );
403+ set .add (clazzName );
404+ existedPackages = true ;
397405 }
398- set .add (clazzName );
399- existedPackages = true ;
400406 }
401407 }
402408 if (existedPackages ) {
Original file line number Diff line number Diff line change @@ -289,14 +289,20 @@ private static String generateClasspathExistedClasses (
289289 String path = javaProject .getOutputLocation ().toString ();
290290 int idx = path .indexOf ('/' , 2 );
291291 String relativePath = null ;
292+ File srcFolder = null ;
292293 if (idx != -1 ) {
293- relativePath = path .substring (idx + 1 );
294+ relativePath = path .substring (idx + 1 );
295+ srcFolder = new File (workingDir , relativePath );
296+ } else {
297+ relativePath = "" ;
298+ srcFolder = workingDir ;
294299 }
295300
296301 buf .append ('[' );
297302 try {
298- buf .append (new File ( workingDir , relativePath ) .getCanonicalPath ());
303+ buf .append (srcFolder .getCanonicalPath ());
299304 } catch (IOException e ) {
305+ // should never run into these lines!
300306 e .printStackTrace ();
301307 buf .append (relativePath );
302308 }
@@ -395,9 +401,9 @@ private static String generateClasspathExistedClasses (
395401 int idx2 = clazzName .lastIndexOf ("." );
396402 if (idx2 != -1 ) {
397403 clazzName = clazzName .substring (0 , idx2 );
404+ set .add (clazzName );
405+ existedPackages = true ;
398406 }
399- set .add (clazzName );
400- existedPackages = true ;
401407 }
402408 }
403409 if (existedPackages ) {
Original file line number Diff line number Diff line change @@ -422,9 +422,9 @@ protected void updateButtonGroup() {
422422 return ;
423423 }
424424 if (isSelectionInOneCategory ()) {
425- if (!isAbandonsSelected ()) {
425+ // if (!isAbandonsSelected()) {
426426 buttonRemove .setEnabled (true );
427- }
427+ // }
428428 if (!isLastElementSelected ()) {
429429 buttonDown .setEnabled (true );
430430 }
@@ -443,9 +443,9 @@ protected void updateButtonGroup() {
443443 }
444444 }
445445 } else if (!isSelectionContainsCategory () && getSelection ().length > 0 ) {
446- if (!isAbandonsSelected ()) {
446+ // if (!isAbandonsSelected()) {
447447 buttonRemove .setEnabled (true );
448- }
448+ // }
449449 }
450450 if (getSelection ().length == 1 ) {
451451 if (isResourceCategorySelected ()) {
You can’t perform that action at this time.
0 commit comments