File tree Expand file tree Collapse file tree 3 files changed +17
-18
lines changed
java/src/processing/mode/java/pdex Expand file tree Collapse file tree 3 files changed +17
-18
lines changed Original file line number Diff line number Diff line change @@ -1297,24 +1297,15 @@ protected Class<?> findClassIfExists(String className){
12971297
12981298 for (ImportStatement impS : imports ) {
12991299 String temp = impS .getPackageName ();
1300-
1301- if (temp .endsWith ("*" )) {
1302- temp = temp .substring (0 , temp .length () - 1 ) + className ;
1303- } else {
1304- int x = temp .lastIndexOf ('.' );
1305- //log("fclife " + temp.substring(x + 1));
1306- if (!temp .substring (x + 1 ).equals (className )) {
1307- continue ;
1308- }
1300+ if (impS .isStarredImport () && className .indexOf ('.' ) == -1 ) {
1301+ temp = impS .getPackageName () + "." + className ;
13091302 }
13101303 tehClass = loadClass (temp );
13111304 if (tehClass != null ) {
13121305 log (tehClass .getName () + " located." );
13131306 return tehClass ;
13141307 }
1315-
1316- //log("Doesn't exist in package: " + impS.getImportName());
1317-
1308+ //log("Doesn't exist in imp package: " + impS.getImportName());
13181309 }
13191310
13201311 PdePreprocessor p = new PdePreprocessor (null );
Original file line number Diff line number Diff line change @@ -69,11 +69,18 @@ public String getPackageName(){
6969 return ret ;
7070}
7171
72- public int getTab () {
73- return tab ;
74- }
72+ public int getTab () {
73+ return tab ;
74+ }
7575
76- public int getLineNumber () {
77- return lineNumber ;
78- }
76+ public int getLineNumber () {
77+ return lineNumber ;
78+ }
79+
80+ public boolean isStarredImport () {
81+ String ret = new String (importName .trim ());
82+ if (ret .endsWith (";" ))
83+ ret = ret .substring (0 , ret .length () - 1 ).trim ();
84+ return ret .endsWith (".*" );
85+ }
7986}
Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ public void processKeyEvent(KeyEvent evt) {
181181 if (suggestion .isVisible ()) {
182182 prepareSuggestions (evt );
183183 }
184+ return ;
184185 }
185186 }
186187
You can’t perform that action at this time.
0 commit comments