public class ApplicationImpl extends ComponentManagerImpl implements ApplicationEx
Disposable.Parent| Modifier and Type | Field and Description |
|---|---|
static boolean |
USE_SEPARATE_WRITE_THREAD
This boolean controls whether to use thread(s) other than EDT for acquiring IW lock (i.e.
|
ELEVATE, EXIT_CONFIRMED, FORCE_EXIT, LOCATOR_FILE_NAME, SAVE| Constructor and Description |
|---|
ApplicationImpl(boolean isInternal,
boolean isUnitTestMode,
boolean isHeadless,
boolean isCommandLine) |
| Modifier and Type | Method and Description |
|---|---|
AccessToken |
acquireReadActionLock() |
AccessToken |
acquireWriteActionLock(java.lang.Class<?> clazz) |
boolean |
acquireWriteIntentLockIfNeeded()
Private API to use in instrumented code.
|
java.lang.String |
activityNamePrefix() |
void |
addApplicationListener(ApplicationListener l) |
void |
addApplicationListener(ApplicationListener l,
Disposable parent)
Adds an
ApplicationListener. |
void |
assertIsDispatchThread()
Asserts whether the method is being called from the event dispatch thread.
|
void |
assertIsDispatchThread(javax.swing.JComponent component) |
void |
assertIsWriteThread()
Asserts whether the method is being called from under the Write Intent lock
|
void |
assertReadAccessAllowed()
Asserts whether the read access is allowed.
|
void |
assertTimeConsuming() |
void |
assertWriteAccessAllowed()
Asserts whether the write access is allowed.
|
void |
dispose()
Usually not invoked directly, see class javadoc.
|
void |
disposeContainer() |
void |
executeByImpatientReader(java.lang.Runnable runnable)
Executes a
runnable in an "impatient" mode. |
<T> java.util.concurrent.Future<T> |
executeOnPooledThread(java.util.concurrent.Callable<T> action)
Requests pooled thread to execute the action.
|
java.util.concurrent.Future<?> |
executeOnPooledThread(java.lang.Runnable action)
Requests pooled thread to execute the action.
|
void |
executeSuspendingWriteAction(Project project,
java.lang.String title,
java.lang.Runnable runnable)
If called inside a write action, executes the given code under a modal progress with write lock released (e.g.
|
void |
exit(boolean force,
boolean exitConfirmed,
boolean restart)
There are two ways we can get an exit notification.
|
void |
exit(int flags) |
ModalityState |
getAnyModalityState()
Please use
ModalityState.any() instead, and only if you absolutely must, after carefully reading its documentation. |
protected ContainerDescriptor |
getContainerDescriptor(IdeaPluginDescriptorImpl pluginDescriptor) |
ModalityState |
getCurrentModalityState()
Please use
ModalityState.current() instead. |
ModalityState |
getDefaultModalityState()
Please use
ModalityState.defaultModalityState() instead. |
long |
getIdleTime()
Returns the time in milliseconds during which IDE received no input events.
|
ModalityInvokator |
getInvokator() |
ModalityState |
getModalityStateForComponent(java.awt.Component c)
Please use
ModalityState.stateForComponent(Component) instead. |
ModalityState |
getNoneModalityState()
Please use
ModalityState.NON_MODAL instead. |
long |
getStartTime()
Returns the time of IDE start, in milliseconds since midnight, January 1, 1970 UTC.
|
boolean |
hasWriteAction(java.lang.Class<?> actionClass)
Returns
true if there is currently executing write action of the specified class. |
boolean |
holdsReadLock() |
void |
invokeAndWait(java.lang.Runnable runnable)
|
void |
invokeAndWait(java.lang.Runnable runnable,
ModalityState modalityState)
Causes
runnable.run() to be executed synchronously on the
AWT event dispatching thread under Write Intent lock, when the IDE is in the specified modality
state (or a state with less modal dialogs open). |
void |
invokeLater(java.lang.Runnable runnable)
Causes
runnable.run() to be executed asynchronously on the
AWT event dispatching thread under Write Intent lock, with ModalityState.defaultModalityState() modality state. |
void |
invokeLater(java.lang.Runnable runnable,
Condition<?> expired)
Causes
runnable.run() to be executed asynchronously on the
AWT event dispatching thread under Write Intent lock - unless the expiration condition is fulfilled. |
void |
invokeLater(java.lang.Runnable runnable,
ModalityState state)
Causes
runnable.run() to be executed asynchronously on the
AWT event dispatching thread under Write Intent lock, when IDE is in the specified modality
state (or a state with less modal dialogs open). |
void |
invokeLater(java.lang.Runnable runnable,
ModalityState state,
Condition<?> expired)
Causes
runnable.run() to be executed asynchronously on the
AWT event dispatching thread under Write Intent lock, when IDE is in the specified modality
state(or a state with less modal dialogs open) - unless the expiration condition is fulfilled. |
void |
invokeLaterOnWriteThread(java.lang.Runnable action)
Causes
runnable to be executed asynchronously under Write Intent lock on some thread,
with ModalityState.defaultModalityState() modality state. |
void |
invokeLaterOnWriteThread(java.lang.Runnable action,
ModalityState modal)
Causes
runnable to be executed asynchronously under Write Intent lock on some thread,
when IDE is in the specified modality state (or a state with less modal dialogs open). |
void |
invokeLaterOnWriteThread(java.lang.Runnable action,
ModalityState modal,
Condition<?> expired)
Causes
runnable to be executed asynchronously under Write Intent lock on some thread,
when IDE is in the specified modality state (or a state with less modal dialogs open)
- unless the expiration condition is fulfilled. |
boolean |
isActive()
Checks if the application is active.
|
boolean |
isCommandLine()
Checks if IDE is running as a command line applet or in unit test mode.
|
ThreeState |
isCurrentWriteOnEdt() |
boolean |
isDispatchThread()
Checks if the current thread is the Swing dispatch thread and has IW lock acquired.
|
boolean |
isEAP() |
boolean |
isHeadlessEnvironment()
Checks if IDE is running as a command line applet or in unit test mode.
|
boolean |
isInImpatientReader()
DO NOT USE
|
boolean |
isInternal()
Checks if IDE is running in Internal Mode to enable additional features for plugin development.
|
boolean |
isLightEditMode() |
boolean |
isReadAccessAllowed()
Checks if the read access is currently allowed.
|
boolean |
isRestartCapable()
Checks if IDE is capable of restarting itself on the current platform and with the current execution mode.
|
boolean |
isSaveAllowed() |
boolean |
isUnitTestMode()
Checks if IDE is currently running unit tests.
|
boolean |
isWriteAccessAllowed()
Checks if the write access is currently allowed.
|
boolean |
isWriteActionInProgress() |
boolean |
isWriteActionPending() |
boolean |
isWriteThread()
Checks if the current thread has IW lock acquired, which grants read access and the ability to run write actions.
|
void |
load(java.lang.String configPath)
Loads the application configuration from the specified path
|
void |
loadComponents(ProgressIndicator indicator) |
protected void |
logMessageBusDelivery(Topic<?> topic,
java.lang.String messageName,
java.lang.Object handler,
long duration) |
void |
releaseWriteIntentLockIfNeeded(boolean needed)
Private API to use in instrumented code.
|
void |
removeApplicationListener(ApplicationListener l) |
void |
restart(boolean exitConfirmed) |
void |
restart(boolean exitConfirmed,
boolean elevate)
Restarts the IDE with optional process elevation (on Windows).
|
void |
restart(int flags,
java.lang.String [] beforeRestart) |
void |
runIntendedWriteActionOnCurrentThread(java.lang.Runnable action)
Runs the specified action under Write Intent lock.
|
boolean |
runProcessWithProgressSynchronously(java.lang.Runnable process,
java.lang.String progressTitle,
boolean canBeCanceled,
Project project)
Runs modal process.
|
boolean |
runProcessWithProgressSynchronously(java.lang.Runnable process,
java.lang.String progressTitle,
boolean canBeCanceled,
Project project,
javax.swing.JComponent parentComponent)
Runs modal process.
|
boolean |
runProcessWithProgressSynchronously(java.lang.Runnable process,
java.lang.String progressTitle,
boolean canBeCanceled,
Project project,
javax.swing.JComponent parentComponent,
java.lang.String cancelText)
Runs modal process.
|
boolean |
runProcessWithProgressSynchronouslyInReadAction(Project project,
java.lang.String progressTitle,
boolean canBeCanceled,
java.lang.String cancelText,
javax.swing.JComponent parentComponent,
java.lang.Runnable process)
Executes
process in a separate thread in the application thread pool (see Application.executeOnPooledThread(Runnable)). |
<T> T |
runReadAction(Computable<T> computation)
Runs the specified computation in a read action.
|
void |
runReadAction(java.lang.Runnable action)
Runs the specified read action.
|
<T,E extends java.lang.Throwable> |
runReadAction(ThrowableComputable<T,E> computation)
Runs the specified computation in a read action.
|
<T,E extends java.lang.Throwable> |
runUnlockingIntendedWrite(ThrowableComputable<T,E> action)
Runs the specified action, releasing Write Intent lock if it is acquired at the moment of the call.
|
<T> T |
runWriteAction(Computable<T> computation)
Runs the specified computation in a write action.
|
void |
runWriteAction(java.lang.Runnable action)
Runs the specified write action.
|
<T,E extends java.lang.Throwable> |
runWriteAction(ThrowableComputable<T,E> computation)
Runs the specified computation in a write action.
|
boolean |
runWriteActionWithCancellableProgressInDispatchThread(java.lang.String title,
Project project,
javax.swing.JComponent parentComponent,
Consumer<? super ProgressIndicator> action) |
boolean |
runWriteActionWithNonCancellableProgressInDispatchThread(java.lang.String title,
Project project,
javax.swing.JComponent parentComponent,
Consumer<? super ProgressIndicator> action) |
void |
saveAll()
Saves all open documents and projects.
|
void |
saveSettings()
Saves application settings.
|
void |
setSaveAllowed(boolean value) |
java.lang.String |
toString() |
boolean |
tryRunReadAction(java.lang.Runnable action)
Tries to acquire the read lock and run the
action |
java.lang.String |
writeActionStatistics() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdoNotSave, exit, exit, load, restartisDisposeInProgresscreateError, createError, getComponent, getComponent, getComponent, getComponentInstancesOfType, getComponentInstancesOfType, getComponents, getDisposed, getExtensionArea, getExtensions, getMessageBus, getPicoContainer, getService, getService, getServiceIfCreated, hasComponent, instantiateClass, instantiateClassWithConstructorInjection, instantiateExtensionWithPicoContainerOnlyIfNeeded, isDisposed, isDisposedOrDisposeInProgress, logErrorgetUserData, putUserDatapublic static final boolean USE_SEPARATE_WRITE_THREAD
false, IW lock will be granted on EDT at all times, guaranteeing the same execution model as before
IW lock introduction.public ApplicationImpl(boolean isInternal,
boolean isUnitTestMode,
boolean isHeadless,
boolean isCommandLine)
public void executeByImpatientReader(java.lang.Runnable runnable)
throws ApplicationUtil.CannotRunReadActionException
runnable in an "impatient" mode.
In this mode any attempt to call runReadAction(Runnable)
would fail (i.e. throw ApplicationUtil.CannotRunReadActionException)
if there is a pending write action.executeByImpatientReader in interface ApplicationExApplicationUtil.CannotRunReadActionExceptionpublic boolean isInImpatientReader()
ApplicationExisInImpatientReader in interface ApplicationExpublic void disposeContainer()
public boolean holdsReadLock()
holdsReadLock in interface ApplicationExApplication.runReadAction(Runnable)public boolean isInternal()
ApplicationisInternal in interface Applicationpublic boolean isEAP()
isEAP in interface Applicationpublic boolean isUnitTestMode()
ApplicationinvokeLater in tests, you can call PlatformTestUtil.dispatchAllInvocationEventsInIdeEventQueue()NonBlockingReadActionImpl.waitForAsyncTaskCompletion()Future/Promise/etc callbacks and call PlatformTestUtil.waitFor*Messages.setTestDialog(...)UiInterceptorsisUnitTestMode in interface Applicationtrue if IDE is running unit tests, false otherwisepublic boolean isHeadlessEnvironment()
ApplicationisHeadlessEnvironment in interface Applicationtrue if IDE is running in UI-less mode, false otherwisepublic boolean isCommandLine()
ApplicationisCommandLine in interface Applicationtrue if IDE is running in command line mode, false otherwisepublic boolean isLightEditMode()
public java.util.concurrent.Future<?> executeOnPooledThread(java.lang.Runnable action)
ApplicationThis pool is an
executeOnPooledThread in interface Applicationaction - to be executedpublic <T> java.util.concurrent.Future<T> executeOnPooledThread(java.util.concurrent.Callable<T> action)
ApplicationThis pool is an
executeOnPooledThread in interface Applicationaction - to be executedpublic boolean isDispatchThread()
ApplicationisDispatchThread in interface Applicationtrue if the current thread is the Swing dispatch thread with IW lock, false otherwise.Application.isWriteThread()public boolean isWriteThread()
ApplicationisWriteThread in interface Applicationtrue if the current thread has IW lock acquired, false otherwise.public ModalityInvokator getInvokator()
getInvokator in interface Applicationpublic void invokeLater(java.lang.Runnable runnable)
Applicationrunnable.run() to be executed asynchronously on the
AWT event dispatching thread under Write Intent lock, with ModalityState.defaultModalityState() modality state.
This will happen after all pending AWT events have been processed.
Please use this method instead of SwingUtilities.invokeLater(Runnable) or UIUtil methods
for the reasons described in ModalityState documentation.
invokeLater in interface Applicationrunnable - the runnable to execute.public void invokeLater(java.lang.Runnable runnable,
Condition<?> expired)
Applicationrunnable.run() to be executed asynchronously on the
AWT event dispatching thread under Write Intent lock - unless the expiration condition is fulfilled.
This will happen after all pending AWT events have been processed and in ModalityState.defaultModalityState() modality state
(or a state with less modal dialogs open).
Please use this method instead of SwingUtilities.invokeLater(Runnable) or UIUtil methods
for the reasons described in ModalityState documentation.
invokeLater in interface Applicationrunnable - the runnable to execute.expired - condition to check before execution.public void invokeLater(java.lang.Runnable runnable,
ModalityState state)
Applicationrunnable.run() to be executed asynchronously on the
AWT event dispatching thread under Write Intent lock, when IDE is in the specified modality
state (or a state with less modal dialogs open).
Please use this method instead of SwingUtilities.invokeLater(Runnable) or UIUtil methods
for the reasons described in ModalityState documentation.
invokeLater in interface Applicationrunnable - the runnable to execute.state - the state in which the runnable will be executed.public void invokeLater(java.lang.Runnable runnable,
ModalityState state,
Condition<?> expired)
Applicationrunnable.run() to be executed asynchronously on the
AWT event dispatching thread under Write Intent lock, when IDE is in the specified modality
state(or a state with less modal dialogs open) - unless the expiration condition is fulfilled.
This will happen after all pending AWT events have been processed.
Please use this method instead of SwingUtilities.invokeLater(Runnable) or UIUtil methods
for the reasons described in ModalityState documentation.
invokeLater in interface Applicationrunnable - the runnable to execute.state - the state in which the runnable will be executed.expired - condition to check before execution.public final void load(java.lang.String configPath)
ApplicationExload in interface ApplicationExconfigPath - Path to /config folderpublic final void loadComponents(ProgressIndicator indicator)
public void dispose()
Disposabledispose in interface Disposablepublic java.lang.String writeActionStatistics()
public boolean runProcessWithProgressSynchronously(java.lang.Runnable process,
java.lang.String progressTitle,
boolean canBeCanceled,
Project project)
ApplicationExTaskrunProcessWithProgressSynchronously in interface ApplicationExpublic boolean runProcessWithProgressSynchronously(java.lang.Runnable process,
java.lang.String progressTitle,
boolean canBeCanceled,
Project project,
javax.swing.JComponent parentComponent)
ApplicationExTaskrunProcessWithProgressSynchronously in interface ApplicationExpublic boolean runProcessWithProgressSynchronously(java.lang.Runnable process,
java.lang.String progressTitle,
boolean canBeCanceled,
Project project,
javax.swing.JComponent parentComponent,
java.lang.String cancelText)
ApplicationExTaskrunProcessWithProgressSynchronously in interface ApplicationExpublic boolean runProcessWithProgressSynchronouslyInReadAction(Project project, java.lang.String progressTitle, boolean canBeCanceled, java.lang.String cancelText, javax.swing.JComponent parentComponent, java.lang.Runnable process)
ApplicationExprocess in a separate thread in the application thread pool (see Application.executeOnPooledThread(Runnable)).
The process is run inside read action (see Application.runReadAction(Runnable))
If run from EDT, it is guaranteed that no other read or write action is run before the process start running.
If the process is running for too long, a progress window shown with progressTitle and a button with cancelText.runProcessWithProgressSynchronouslyInReadAction in interface ApplicationExpublic void invokeAndWait(java.lang.Runnable runnable,
ModalityState modalityState)
ApplicationCauses runnable.run() to be executed synchronously on the
AWT event dispatching thread under Write Intent lock, when the IDE is in the specified modality
state (or a state with less modal dialogs open). This call blocks until all pending AWT events have been processed and (then)
runnable.run() returns.
If current thread is an event dispatch thread then runnable.run()
is executed immediately regardless of the modality state.
Please use this method instead of SwingUtilities.invokeAndWait(Runnable) or UIUtil methods
for the reasons described in ModalityState documentation.
invokeAndWait in interface Applicationrunnable - the runnable to execute.modalityState - the state in which the runnable will be executed.public void invokeAndWait(java.lang.Runnable runnable)
throws ProcessCanceledException
ApplicationApplication.invokeAndWait(Runnable, ModalityState), using ModalityState.defaultModalityState().invokeAndWait in interface ApplicationProcessCanceledExceptionpublic ModalityState getCurrentModalityState()
ApplicationModalityState.current() instead.getCurrentModalityState in interface Applicationpublic ModalityState getModalityStateForComponent(java.awt.Component c)
ApplicationModalityState.stateForComponent(Component) instead.getModalityStateForComponent in interface Applicationpublic ModalityState getAnyModalityState()
ApplicationModalityState.any() instead, and only if you absolutely must, after carefully reading its documentation.getAnyModalityState in interface Applicationpublic ModalityState getDefaultModalityState()
ApplicationModalityState.defaultModalityState() instead.getDefaultModalityState in interface Applicationpublic ModalityState getNoneModalityState()
ApplicationModalityState.NON_MODAL instead.getNoneModalityState in interface Applicationpublic long getStartTime()
ApplicationgetStartTime in interface Applicationpublic long getIdleTime()
ApplicationgetIdleTime in interface Applicationpublic final void restart(boolean exitConfirmed)
restart in interface ApplicationExexitConfirmed - if true, suppresses any shutdown confirmation. However, if there are any background processes or tasks running,
a corresponding confirmation will be shown with the possibility to cancel the operationpublic final void restart(boolean exitConfirmed,
boolean elevate)
ApplicationExrestart in interface ApplicationExexitConfirmed - if true, the IDE does not ask for exit confirmation.elevate - if true and the IDE is running on Windows, the IDE is restarted in elevated mode (with admin privileges)public final void exit(boolean force,
boolean exitConfirmed,
boolean restart)
exit in interface Applicationpublic void restart(int flags,
java.lang.String [] beforeRestart)
public final void exit(int flags)
exit in interface ApplicationExpublic ThreeState isCurrentWriteOnEdt()
public void invokeLaterOnWriteThread(java.lang.Runnable action,
ModalityState modal)
Applicationrunnable to be executed asynchronously under Write Intent lock on some thread,
when IDE is in the specified modality state (or a state with less modal dialogs open).invokeLaterOnWriteThread in interface Applicationaction - the runnable to execute.modal - the state in which action will be executedpublic void invokeLaterOnWriteThread(java.lang.Runnable action,
ModalityState modal,
Condition<?> expired)
Applicationrunnable to be executed asynchronously under Write Intent lock on some thread,
when IDE is in the specified modality state (or a state with less modal dialogs open)
- unless the expiration condition is fulfilled.invokeLaterOnWriteThread in interface Applicationaction - the runnable to execute.modal - the state in which action will be executedexpired - condition to check before execution.public void invokeLaterOnWriteThread(java.lang.Runnable action)
Applicationrunnable to be executed asynchronously under Write Intent lock on some thread,
with ModalityState.defaultModalityState() modality state.invokeLaterOnWriteThread in interface Applicationaction - the runnable to execute.public boolean acquireWriteIntentLockIfNeeded()
ApplicationAcquires IW lock if it's not acquired by the current thread.
acquireWriteIntentLockIfNeeded in interface Applicationtrue if IW lock was acquired, or false if it is held by the current thread already.public void releaseWriteIntentLockIfNeeded(boolean needed)
Application
Releases IW lock if the parameter is true.
releaseWriteIntentLockIfNeeded in interface Applicationneeded - whether IW lock should be released or notpublic void runIntendedWriteActionOnCurrentThread(java.lang.Runnable action)
Application
This method is used to implement higher-level API, please do not use it directly.
Use Application.invokeLaterOnWriteThread(java.lang.Runnable), WriteThread or AppUIExecutor.onWriteThread() to
run code under Write Intent lock asynchronously.
runIntendedWriteActionOnCurrentThread in interface Applicationaction - the action to runpublic <T,E extends java.lang.Throwable> T runUnlockingIntendedWrite(ThrowableComputable<T,E> action) throws E extends java.lang.Throwable
ApplicationThis method is used to implement higher-level API, please do not use it directly.
runUnlockingIntendedWrite in interface ApplicationE extends java.lang.Throwablepublic void runReadAction(java.lang.Runnable action)
Application
See also ReadAction.run(com.intellij.openapi.application.Result<T>) for a more lambda-friendly version.
runReadAction in interface Applicationaction - the action to run.public <T> T runReadAction(Computable<T> computation)
Application
See also ReadAction.compute(com.intellij.openapi.util.ThrowableComputable<T, E>) for a more lambda-friendly version.
runReadAction in interface Applicationcomputation - the computation to perform.public <T,E extends java.lang.Throwable> T runReadAction(ThrowableComputable<T,E> computation) throws E extends java.lang.Throwable
Application
See also ReadAction.compute(com.intellij.openapi.util.ThrowableComputable<T, E>) for a more lambda-friendly version.
runReadAction in interface Applicationcomputation - the computation to perform.E - re-frown from ThrowableComputableE extends java.lang.Throwablepublic boolean runWriteActionWithNonCancellableProgressInDispatchThread(java.lang.String title,
Project project,
javax.swing.JComponent parentComponent,
Consumer<? super ProgressIndicator> action)
runWriteActionWithNonCancellableProgressInDispatchThread in interface ApplicationExpublic boolean runWriteActionWithCancellableProgressInDispatchThread(java.lang.String title,
Project project,
javax.swing.JComponent parentComponent,
Consumer<? super ProgressIndicator> action)
runWriteActionWithCancellableProgressInDispatchThread in interface ApplicationExpublic void runWriteAction(java.lang.Runnable action)
Application
See also WriteAction.run(com.intellij.util.ThrowableRunnable<E>) for a more lambda-friendly version.
runWriteAction in interface Applicationaction - the action to runpublic <T> T runWriteAction(Computable<T> computation)
Application
See also WriteAction.compute(com.intellij.openapi.util.ThrowableComputable<T, E>) for a more lambda-friendly version.
runWriteAction in interface Applicationcomputation - the computation to runpublic <T,E extends java.lang.Throwable> T runWriteAction(ThrowableComputable<T,E> computation) throws E extends java.lang.Throwable
Application
See also WriteAction.compute(com.intellij.openapi.util.ThrowableComputable<T, E>) for a more lambda-friendly version.
runWriteAction in interface Applicationcomputation - the computation to runE - re-frown from ThrowableComputableE extends java.lang.Throwablepublic boolean hasWriteAction(java.lang.Class<?> actionClass)
Applicationtrue if there is currently executing write action of the specified class.hasWriteAction in interface ApplicationactionClass - the class of the write action to return.true if the action is running, or false if no action of the specified class is currently executing.public void assertReadAccessAllowed()
ApplicationassertReadAccessAllowed in interface Applicationpublic boolean isReadAccessAllowed()
ApplicationisReadAccessAllowed in interface Applicationtrue if the read access is currently allowed, false otherwise.Application.assertReadAccessAllowed(),
Application.runReadAction(Runnable)public void assertIsDispatchThread()
ApplicationassertIsDispatchThread in interface Applicationpublic void assertIsWriteThread()
ApplicationassertIsWriteThread in interface Applicationpublic void assertIsDispatchThread(javax.swing.JComponent component)
assertIsDispatchThread in interface ApplicationExpublic void assertTimeConsuming()
assertTimeConsuming in interface ApplicationExpublic boolean tryRunReadAction(java.lang.Runnable action)
ApplicationExactiontryRunReadAction in interface ApplicationExpublic boolean isActive()
ApplicationisActive in interface Applicationtrue if one of application windows is focused, false otherwisepublic AccessToken acquireReadActionLock()
acquireReadActionLock in interface Applicationpublic boolean isWriteActionPending()
isWriteActionPending in interface ApplicationExApplication.runWriteAction(Runnable)public AccessToken acquireWriteActionLock(java.lang.Class<?> clazz)
acquireWriteActionLock in interface Applicationpublic void assertWriteAccessAllowed()
ApplicationassertWriteAccessAllowed in interface Applicationpublic boolean isWriteAccessAllowed()
ApplicationisWriteAccessAllowed in interface Applicationtrue if the write access is currently allowed, false otherwise.Application.assertWriteAccessAllowed(),
Application.runWriteAction(Runnable)public boolean isWriteActionInProgress()
isWriteActionInProgress in interface ApplicationExApplication.runWriteAction(Runnable)public void executeSuspendingWriteAction(Project project, java.lang.String title, java.lang.Runnable runnable)
public void addApplicationListener(ApplicationListener l)
addApplicationListener in interface Applicationl - the listener to addpublic void addApplicationListener(ApplicationListener l, Disposable parent)
ApplicationApplicationListener.addApplicationListener in interface Applicationl - the listener to addparent - the parent disposable which dispose will trigger this listener removalpublic void removeApplicationListener(ApplicationListener l)
removeApplicationListener in interface Applicationl - the listener to removepublic void saveSettings()
ApplicationsaveSettings in interface Applicationpublic void saveAll()
ApplicationsaveAll in interface Applicationpublic void setSaveAllowed(boolean value)
setSaveAllowed in interface ApplicationExpublic boolean isSaveAllowed()
isSaveAllowed in interface ApplicationExpublic boolean isRestartCapable()
ApplicationisRestartCapable in interface Applicationtrue if IDE can restart itself, false otherwise.public java.lang.String toString()
public java.lang.String activityNamePrefix()
protected ContainerDescriptor getContainerDescriptor(IdeaPluginDescriptorImpl pluginDescriptor)
protected void logMessageBusDelivery(Topic<?> topic, java.lang.String messageName, java.lang.Object handler, long duration)