From f3e460c93eb59f4965e3c5285000168181b9129d Mon Sep 17 00:00:00 2001 From: Akash Yadav Date: Fri, 21 Jun 2024 08:10:49 +0530 Subject: [PATCH] fix: compilation errors due to incomplete changes in previous commits --- .../itsaky/androidide/app/IDEApplication.kt | 10 ++++++---- .../androidide/projects/IProjectManager.kt | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/core/app/src/main/java/com/itsaky/androidide/app/IDEApplication.kt b/core/app/src/main/java/com/itsaky/androidide/app/IDEApplication.kt index 1039b9701..57f32048e 100755 --- a/core/app/src/main/java/com/itsaky/androidide/app/IDEApplication.kt +++ b/core/app/src/main/java/com/itsaky/androidide/app/IDEApplication.kt @@ -42,7 +42,6 @@ import com.itsaky.androidide.events.AppEventsIndex import com.itsaky.androidide.events.EditorEventsIndex import com.itsaky.androidide.events.LspApiEventsIndex import com.itsaky.androidide.events.LspJavaEventsIndex -import com.itsaky.androidide.events.ProjectsApiEventsIndex import com.itsaky.androidide.preferences.internal.DevOpsPreferences import com.itsaky.androidide.preferences.internal.GeneralPreferences import com.itsaky.androidide.preferences.internal.StatPreferences @@ -102,9 +101,12 @@ class IDEApplication : TermuxApplication() { } } - EventBus.builder().addIndex(AppEventsIndex()).addIndex(EditorEventsIndex()) - .addIndex(ProjectsApiEventsIndex()).addIndex(LspApiEventsIndex()) - .addIndex(LspJavaEventsIndex()).installDefaultEventBus(true) + EventBus.builder() + .addIndex(AppEventsIndex()) + .addIndex(EditorEventsIndex()) + .addIndex(LspApiEventsIndex()) + .addIndex(LspJavaEventsIndex()) + .installDefaultEventBus(true) EventBus.getDefault().register(this) diff --git a/core/projects/src/main/java/com/itsaky/androidide/projects/IProjectManager.kt b/core/projects/src/main/java/com/itsaky/androidide/projects/IProjectManager.kt index 2a10ffb8f..98f8aaf4d 100644 --- a/core/projects/src/main/java/com/itsaky/androidide/projects/IProjectManager.kt +++ b/core/projects/src/main/java/com/itsaky/androidide/projects/IProjectManager.kt @@ -168,6 +168,25 @@ interface IProjectManager { */ fun isAndroidResource(file: File): Boolean + /** + * Notify the project manager that the given file was created. + * @param file The file that was created. + */ + fun notifyFileCreated(file: File) + + /** + * Notify the project manager that the given file was deleted. + * @param file The file that was deleted. + */ + fun notifyFileDeleted(file: File) + + /** + * Notify the project manager that the file was renamed or moved. + * @param from The file that was renamed or moved. + * @param to The file after renaming/move. + */ + fun notifyFileRenamed(from: File, to: File) + /** * Destroy the project manager. */