The project layer manages workspaces, Gradle projects, and module structures.
interface IProjectManager { val projectDir: File val projectSyncIssues: ProjectSyncIssues? fun openProject(directory: File) suspend fun setupProject(project: IProject) fun getWorkspace(): IWorkspace? fun notifyFileCreated(file: File) fun notifyFileDeleted(file: File) fun notifyFileRenamed(from: File, to: File)}interface IWorkspace { fun getProjectDir(): File fun getRootProject(): GradleProject fun getSubProjects(): List<GradleProject> fun findProject(path: String): GradleProject? fun androidProjects(): Sequence<AndroidModule> fun findModuleForFile(file: Path): ModuleProject?}
The LSP layer enables language-specific features through standardized protocols.
interface ILanguageServer { val serverId: String? val client: ILanguageClient? fun shutdown() fun connectClient(client: ILanguageClient?) fun applySettings(settings: IServerSettings?) fun setupWorkspace(workspace: IWorkspace) // Language features fun complete(params: CompletionParams?): CompletionResult suspend fun findReferences(params: ReferenceParams): ReferenceResult suspend fun findDefinition(params: DefinitionParams): DefinitionResult suspend fun signatureHelp(params: SignatureHelpParams): SignatureHelp suspend fun analyze(file: Path): DiagnosticResult fun formatCode(params: FormatCodeParams?): CodeFormatResult}
The tooling layer wraps Gradle’s Tooling API for build operations.
interface IToolingApiServer { fun metadata(): CompletableFuture<ToolingServerMetadata> fun initialize(params: InitializeProjectParams): CompletableFuture<InitializeResult> fun isServerInitialized(): CompletableFuture<Boolean> fun getRootProject(): CompletableFuture<IProject> fun executeTasks(message: TaskExecutionMessage): CompletableFuture<TaskExecutionResult> fun cancelCurrentBuild(): CompletableFuture<BuildCancellationRequestResult> fun shutdown(): CompletableFuture<Void>}interface IProject : IProjectQueries { fun getProjects(): CompletableFuture<List<BasicProjectMetadata>> fun getProjectSyncIssues(): CompletableFuture<DefaultProjectSyncIssues>}
The template system provides project and file generation capabilities.
interface ITemplateProvider { fun getTemplates(): List<Template<*>> fun getTemplate(templateId: String): Template<*>? fun reload() fun release()}interface RecipeExecutor { fun projectData(): ProjectTemplateData? fun copy(source: File, dest: File) fun save(source: String, dest: File) fun openAsset(path: String): InputStream fun copyAsset(path: String, dest: File) fun copyAssetsRecursively(path: String, destDir: File)}
The action system enables extensible UI actions throughout the IDE.
abstract class ActionsRegistry { abstract fun registerAction(action: ActionItem): Boolean abstract fun unregisterAction(action: ActionItem): Boolean abstract fun findAction(location: ActionItem.Location, id: String): ActionItem? abstract fun fillMenu(params: FillMenuParams) abstract fun getActions(location: ActionItem.Location): Map<String, ActionItem>}interface ActionItem { val id: String var label: String var visible: Boolean var enabled: Boolean var icon: Drawable? fun prepare(data: ActionData) suspend fun execAction(data: ActionData): Any fun postExec(data: ActionData, result: Any)}