mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
bug fixes
This commit is contained in:
@@ -359,6 +359,8 @@ public class AndroidAutogenerator {
|
||||
final ModuleCompileScope moduleCompileScope = new ModuleCompileScope(module, false);
|
||||
final VirtualFile[] files = moduleCompileScope.getFiles(AndroidRenderscriptFileType.INSTANCE, true);
|
||||
|
||||
facet.clearAutogeneratedFiles(AndroidAutogeneratorMode.RENDERSCRIPT);
|
||||
|
||||
for (final VirtualFile file : files) {
|
||||
final RenderscriptAutogenerationItem item =
|
||||
ApplicationManager.getApplication().runReadAction(new Computable<RenderscriptAutogenerationItem>() {
|
||||
@@ -395,6 +397,10 @@ public class AndroidAutogenerator {
|
||||
}
|
||||
});
|
||||
|
||||
if (item == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
File tempOutDir = null;
|
||||
|
||||
try {
|
||||
@@ -404,13 +410,11 @@ public class AndroidAutogenerator {
|
||||
launchRenderscriptCompiler(module.getProject(), item.mySdkLocation, item.myTarget, file, tempOutDir.getPath(), item.myRawDirPath);
|
||||
|
||||
if (messages.get(CompilerMessageCategory.ERROR).size() == 0) {
|
||||
facet.clearAutogeneratedFiles(AndroidAutogeneratorMode.RENDERSCRIPT);
|
||||
|
||||
final List<File> newFiles = new ArrayList<File>();
|
||||
moveAllFiles(tempOutDir, new File(item.myGenDirPath), newFiles);
|
||||
|
||||
for (File newFile : newFiles) {
|
||||
final VirtualFile newVFile = LocalFileSystem.getInstance().findFileByIoFile(newFile);
|
||||
final VirtualFile newVFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(newFile);
|
||||
|
||||
if (newVFile != null) {
|
||||
facet.markFileAutogenerated(AndroidAutogeneratorMode.RENDERSCRIPT, newVFile);
|
||||
|
||||
@@ -143,7 +143,9 @@ public class AndroidFacet extends Facet<AndroidFacetConfiguration> {
|
||||
}
|
||||
}
|
||||
}
|
||||
alarm.addRequest(this, 2000);
|
||||
if (!alarm.isDisposed()) {
|
||||
alarm.addRequest(this, 2000);
|
||||
}
|
||||
}
|
||||
}, 2000);
|
||||
return alarm;
|
||||
|
||||
@@ -112,9 +112,6 @@ class AndroidResourceFilesListener extends VirtualFileAdapter {
|
||||
|
||||
private void fileChanged(@NotNull final VirtualFileEvent e) {
|
||||
VirtualFile file = e.getFile();
|
||||
if (!file.isValid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
VirtualFile parent = e.getParent();
|
||||
VirtualFile gp = parent != null ? parent.getParent() : null;
|
||||
|
||||
Reference in New Issue
Block a user