Skip to content

Commit bc7f97c

Browse files
committed
Fixed class def not found
1 parent 7f62369 commit bc7f97c

24 files changed

+51
-21
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ android {
1111
minSdkVersion rootProject.ext.minSdkVersion
1212
targetSdkVersion rootProject.ext.targetSdkVersion
1313
multiDexEnabled true
14-
versionCode 42
15-
versionName "1.4.2"
14+
versionCode 43
15+
versionName "1.4.3"
1616
vectorDrawables.useSupportLibrary = true
1717
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1818
}

app/release/output.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":42,"versionName":"1.4.2","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
1+
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":43,"versionName":"1.4.3","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

app/src/main/ic_launcher-web.png

20 KB
Loading

app/src/main/java/com/duy/ide/javaide/editor/autocomplete/parser/CompiledClassLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private ArrayList<Class> getAllClassesFromDex(boolean android, String path) {
9393
} catch (ClassNotFoundException e1) {
9494
}
9595
}
96-
} catch (IOException e) {
96+
} catch (Exception e) {
9797
e.printStackTrace();
9898
}
9999
return classes;

app/src/main/java/com/duy/ide/javaide/editor/autocomplete/parser/JavaClassManager.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -91,23 +91,23 @@ public ArrayList<IClass> getAllClasses() {
9191

9292
public void loadFromProject(JavaProject project) {
9393
long time = System.currentTimeMillis();
94+
try {
9495

95-
CompiledClassLoader classLoader = new CompiledClassLoader(mBootClasspath, mTempDir);
96-
ArrayList<Class> classes = classLoader.getCompiledClassesFromProject(project);
97-
for (Class clazz : classes) {
98-
getClassWrapper(clazz);
99-
}
96+
CompiledClassLoader classLoader = new CompiledClassLoader(mBootClasspath, mTempDir);
97+
ArrayList<Class> classes = classLoader.getCompiledClassesFromProject(project);
98+
for (Class clazz : classes) {
99+
getClassWrapper(clazz);
100+
}
100101

101-
JavaParser parser = new JavaParser();
102-
ArrayList<File> javaSrcDirs = project.getJavaSrcDirs();
103-
for (File javaSrcDir : javaSrcDirs) {
104-
Collection<File> javaFiles = FileUtils.listFiles(
105-
javaSrcDir,
106-
new String[]{"java"},
107-
true);
108-
for (File javaFile : javaFiles) {
109-
if (DLog.DEBUG) DLog.d(TAG, "loadFromProject: parsing class " + javaFile);
110-
try {
102+
JavaParser parser = new JavaParser();
103+
ArrayList<File> javaSrcDirs = project.getJavaSrcDirs();
104+
for (File javaSrcDir : javaSrcDirs) {
105+
Collection<File> javaFiles = FileUtils.listFiles(
106+
javaSrcDir,
107+
new String[]{"java"},
108+
true);
109+
for (File javaFile : javaFiles) {
110+
if (DLog.DEBUG) DLog.d(TAG, "loadFromProject: parsing class " + javaFile);
111111
FileInputStream input = new FileInputStream(javaFile);
112112
String content = IOUtils.toString(input, "UTF-8");
113113
input.close();
@@ -116,10 +116,10 @@ public void loadFromProject(JavaProject project) {
116116
for (IClass aClass : parseClasses) {
117117
update(aClass);
118118
}
119-
} catch (Exception e) {
120-
e.printStackTrace();
121119
}
122120
}
121+
} catch (Throwable e) {
122+
e.printStackTrace();
123123
}
124124

125125
System.out.println("Loaded classes " + (System.currentTimeMillis() - time));
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
-532 Bytes
Loading
Loading
Loading
-216 Bytes
Loading
Loading
Loading
-587 Bytes
Loading
Loading
Loading
-1.17 KB
Loading
Loading
Loading
-1.72 KB
Loading
Loading
Loading
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?><!--
2+
~ Copyright (C) 2018 Tran Le Duy
3+
~
4+
~ This program is free software: you can redistribute it and/or modify
5+
~ it under the terms of the GNU General Public License as published by
6+
~ the Free Software Foundation, either version 3 of the License, or
7+
~ (at your option) any later version.
8+
~
9+
~ This program is distributed in the hope that it will be useful,
10+
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
~ GNU General Public License for more details.
13+
~
14+
~ You should have received a copy of the GNU General Public License
15+
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
16+
-->
17+
18+
<resources>
19+
<color name="ic_launcher_background">#20242A</color>
20+
</resources>
-526 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)