idea-plugin / arrow.meta.ide.dsl.application / ApplicationSyntax

ApplicationSyntax

interface ApplicationSyntax

Properties

availableServices accumulates all available services for loaded Pluginsopen val ApplicationSyntax.availableServices: List<ServiceDescriptor>

Functions

addAppLifecycleListener open fun IdeMetaPlugin.addAppLifecycleListener(listener: AppLifecycleListener): ExtensionPhase
registers an AppLifecycleListener.open fun IdeMetaPlugin.addAppLifecycleListener(appClosing: () -> Unit = Noop.effect0, projectOpenFailed: () -> Unit = Noop.effect0, appFrameCreated: (cliArgs: MutableList<String>) -> Unit = Noop.effect1, welcomeScreenDisplayed: () -> Unit = Noop.effect0, projectFrameClosed: () -> Unit = Noop.effect0, appStarting: (cliProject: Project?) -> Unit = Noop.effect1, appWillBeClosed: (restarted: Boolean) -> Unit = Noop.effect1): ExtensionPhase
addBackgroundPostStartupActivity registers an StartupActivity.Background, which is isomorphic to StartupActivity only with a 5 second delay executing StartupActivity.runActivity. See https://github.com/JetBrains/intellij-community/blob/master/platform/service-container/overview.md#startup-activityopen fun IdeMetaPlugin.addBackgroundPostStartupActivity(activity: Background): ExtensionPhase
addPostStartupActivity open fun IdeMetaPlugin.addPostStartupActivity(activity: StartupActivity): ExtensionPhase
addPreloadingActivity open fun IdeMetaPlugin.addPreloadingActivity(activity: PreloadingActivity): ExtensionPhase
registers an activity, which is executed eagerly in the background on startup.open fun IdeMetaPlugin.addPreloadingActivity(preload: (ProgressIndicator) -> Unit): ExtensionPhase
addProjectLifecycle open fun IdeMetaPlugin.addProjectLifecycle(initialize: ProjectLifecycle.(Project) -> Unit = Noop.effect2, afterProjectClosed: ProjectLifecycle.(Project) -> Unit = Noop.effect2, dispose: ProjectLifecycle.() -> Unit = Noop.effect1, beforeProjectLoaded: ProjectLifecycle.(Project) -> Unit = Noop.effect2, postStartupActivitiesPassed: ProjectLifecycle.(Project) -> Unit = Noop.effect2): ExtensionPhase
addService registers an service and the instance based on its kind. The IntelliJ Platform ensures that only one instance of instance is loaded, when kind is ServiceKind.Application, even though the service can be retrieved multiple times with ServiceManager.getService or com.intellij.openapi.project.Project.getService. It is impeccable that there is only one instance implementation for a given service to fulfill coherence in the ide. Services have several use-cases like org.jetbrains.kotlin.caches.resolve.KotlinCacheService being a project-level service - here kind = ServiceKind.Project, TODO or TODO. Services can be utilised from every in the ide.open fun <A : Any> IdeMetaPlugin.addService(service: Class<A>, kind: ServiceKind, instance: A): ExtensionPhase
appLifecycleListener open fun ApplicationSyntax.appLifecycleListener(appClosing: () -> Unit = Noop.effect0, projectOpenFailed: () -> Unit = Noop.effect0, appFrameCreated: (cliArgs: MutableList<String>) -> Unit = Noop.effect1, welcomeScreenDisplayed: () -> Unit = Noop.effect0, projectFrameClosed: () -> Unit = Noop.effect0, appStarting: (cliProject: Project?) -> Unit = Noop.effect1, appWillBeClosed: (restarted: Boolean) -> Unit = Noop.effect1): AppLifecycleListener
overrideService overrides a Service interface from with to, when override == true. from and to need to have a type relationship, either through subtyping or other means like type-proofs. The application will raise an error at runtime if the latter is not valid or when override == false and there is already a service instance associated with from.open fun IdeMetaPlugin.overrideService(from: Class<*>, to: Class<*>, override: Boolean = true): ExtensionPhase
preloadingActivity open fun ApplicationSyntax.preloadingActivity(preload: (ProgressIndicator) -> Unit): PreloadingActivity
projectLifecycleListener Order: beforeProjectLoaded then initialize then postStartupActivitiesPassed then afterProjectClosedopen fun ApplicationSyntax.projectLifecycleListener(initialize: ProjectLifecycle.(Project) -> Unit = Noop.effect2, afterProjectClosed: ProjectLifecycle.(Project) -> Unit = Noop.effect2, dispose: ProjectLifecycle.() -> Unit = Noop.effect1, beforeProjectLoaded: ProjectLifecycle.(Project) -> Unit = Noop.effect2, postStartupActivitiesPassed: ProjectLifecycle.(Project) -> Unit = Noop.effect2): ProjectLifecycle
registerMetaPlugin convenience extension to register the CliPlugins from an IdeMetaPlugin Pluginopen fun IdeMetaPlugin.registerMetaPlugin(conf: CompilerConfiguration = CompilerConfiguration(), dispose: ProjectLifecycle.() -> Unit = Noop.effect1): ExtensionPhase
replaceService replaces a service with instance. The following plugin needs a different instance than what 3rd party plugins provide - from our example in addService.open fun <A : Any> IdeMetaPlugin.replaceService(service: Class<A>, instance: A): ExtensionPhase
stopServicePreloading open fun IdeMetaPlugin.stopServicePreloading(): ExtensionPhase

Inheritors

IdeSyntax interface IdeSyntax : IconProviderSyntax, SyntaxHighlighterSyntax, InspectionSyntax, AnActionSyntax, ColorSettingsSyntax, HintingSyntax, LanguageSyntax, LineMarkerSyntax, LiveTemplateSyntax, NavigationSyntax, SearchSyntax, StructureViewSyntax, UsageSyntax, ExtensionProviderSyntax, DocumentationSyntax, KotlinExtensionSyntax, DialogSyntax, PopupSyntax, NotificationSyntax, ToolWindowSyntax, GotoRelatedSyntax, AnnotatorSyntax, ParserSyntax, ApplicationSyntax

Do you like Arrow?

Arrow Org
<