@@ -1210,7 +1210,7 @@ public String getPDESourceCodeLine(int javaLineNumber) {
12101210 int res [] = errorCheckerService
12111211 .calculateTabIndexAndLineNumber (javaLineNumber );
12121212 if (res != null ) {
1213- return errorCheckerService .getPDECodeAtLine (res [0 ], res [1 ]);
1213+ return errorCheckerService .getPdeCodeAtLine (res [0 ], res [1 ]);
12141214 }
12151215 return null ;
12161216 }
@@ -1657,7 +1657,7 @@ public ASTNodeWrapper getASTNodeAt(int lineNumber, String name, int offset,
16571657
16581658 // Obtain correspondin java code at that line, match offsets
16591659 if (lineNode != null ) {
1660- String pdeCodeLine = errorCheckerService .getPDECodeAtLine (editor
1660+ String pdeCodeLine = errorCheckerService .getPdeCodeAtLine (editor
16611661 .getSketch ().getCurrentCodeIndex (), lineNumber );
16621662 String javaCodeLine = getJavaSourceCodeLine (pdeLineNumber );
16631663
@@ -3301,15 +3301,13 @@ public String[] getSuggestImports(final String className){
33013301 }
33023302
33033303 log ("Looking for class " + className );
3304- RegExpResourceFilter regf = new RegExpResourceFilter (
3305- Pattern .compile (".*" ),
3306- Pattern
3307- .compile (className
3308- + ".class" ,
3309- Pattern .CASE_INSENSITIVE ));
3310- String [] resources = classPath
3311- .findResources ("" , regf );
3312- ArrayList <String > candidates = new ArrayList <String >();
3304+ RegExpResourceFilter regf =
3305+ new RegExpResourceFilter (Pattern .compile (".*" ),
3306+ Pattern .compile (className + ".class" ,
3307+ Pattern .CASE_INSENSITIVE ));
3308+ // TODO once saw NPE here...possible for classPath to be null? [fry 150808]
3309+ String [] resources = classPath .findResources ("" , regf );
3310+ List <String > candidates = new ArrayList <String >();
33133311 for (String res : resources ) {
33143312 candidates .add (res );
33153313 }
0 commit comments