Java Code Examples for com.intellij.openapi.util.Disposer#dispose()
The following examples show how to use
com.intellij.openapi.util.Disposer#dispose() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FlutterWidgetPerf.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 6 votes |
@Override public void dispose() { if (isDisposed) { return; } this.isDisposed = true; if (uiAnimationTimer.isRunning()) { uiAnimationTimer.stop(); } Disposer.dispose(perfProvider); AsyncUtils.invokeLater(() -> { clearModels(); for (EditorPerfModel decorations : editorDecorations.values()) { Disposer.dispose(decorations); } editorDecorations.clear(); perfListeners.clear(); }); }
Example 2
Source File: BlazeCommandRunConfigurationSettingsEditorTest.java From intellij with Apache License 2.0 | 6 votes |
@Test public void testEditorApplyToAndResetFromMatches() throws ConfigurationException { BlazeCommandRunConfigurationSettingsEditor editor = new BlazeCommandRunConfigurationSettingsEditor(configuration); Label label = Label.create("//package:rule"); configuration.setTarget(label); editor.resetFrom(configuration); BlazeCommandRunConfiguration readConfiguration = type.getFactory().createTemplateConfiguration(getProject()); editor.applyEditorTo(readConfiguration); assertThat(readConfiguration.getTargets()).containsExactly(label); Disposer.dispose(editor); }
Example 3
Source File: WeaveEditor.java From mule-intellij-plugins with Apache License 2.0 | 5 votes |
@Override public void dispose() { for (Editor editor : editors.values()) { EditorFactory.getInstance().releaseEditor(editor); } Disposer.dispose(textEditor); Disposer.dispose(this); }
Example 4
Source File: InvalidPasswordMonitorComponent.java From p4ic4idea with Apache License 2.0 | 5 votes |
@Override public void dispose() { if (!disposed) { disposed = true; Disposer.dispose(this); } }
Example 5
Source File: P4Vcs.java From p4ic4idea with Apache License 2.0 | 5 votes |
@Override public void deactivate() { myConfigurable.disposeUIResources(); tempFileWatchDog.stop(); tempFileWatchDog.cleanUpTempDir(); if (myVFSListener != null) { Disposer.dispose(myVFSListener); myVFSListener = null; } if (projectMessageBusConnection != null) { projectMessageBusConnection.disconnect(); projectMessageBusConnection = null; } if (appMessageBusConnection != null) { appMessageBusConnection.disconnect(); appMessageBusConnection = null; } // This can cause an error if the project isn't setup. So put it at the end. if (!myProject.isDisposed()) { ChangeListManager.getInstance(myProject).removeChangeListListener(changelistListener); } super.deactivate(); }
Example 6
Source File: FlutterWidgetPerf.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 5 votes |
private void harvestInvalidEditors(Set<TextEditor> newEditors) { final Iterator<TextEditor> editors = editorDecorations.keySet().iterator(); while (editors.hasNext()) { final TextEditor editor = editors.next(); if (!editor.isValid() || (newEditors != null && !newEditors.contains(editor))) { final EditorPerfModel editorPerfDecorations = editorDecorations.get(editor); editors.remove(); Disposer.dispose(editorPerfDecorations); } } }
Example 7
Source File: Refreshable.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * Asynchronously shuts down the Refreshable. * * <p>Sets the published value to null and cancels any background tasks. * * <p>Also sets the state to CLOSED and notifies subscribers. Removes subscribers after delivering the last event. */ public void close() { if (!publisher.close()) { return; // already closed. } // Cancel any running create task. schedule.reschedule(null); // Remove from dispose tree. Calls close() again, harmlessly. Disposer.dispose(disposeNode); }
Example 8
Source File: FlutterWidgetPerf.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 5 votes |
private void harvestInvalidEditors(Set<TextEditor> newEditors) { final Iterator<TextEditor> editors = editorDecorations.keySet().iterator(); while (editors.hasNext()) { final TextEditor editor = editors.next(); if (!editor.isValid() || (newEditors != null && !newEditors.contains(editor))) { final EditorPerfModel editorPerfDecorations = editorDecorations.get(editor); editors.remove(); Disposer.dispose(editorPerfDecorations); } } }
Example 9
Source File: ProjectConfigRegistry.java From p4ic4idea with Apache License 2.0 | 5 votes |
@Override public void dispose() { if (!disposed) { disposed = true; Disposer.dispose(this); } }
Example 10
Source File: DartVmServiceDebugProcess.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Override public void stop() { myVmConnected = false; mapper.shutdown(); if (myVmServiceWrapper != null) { Disposer.dispose(myVmServiceWrapper); } }
Example 11
Source File: BlazeSyncIntegrationTestCase.java From intellij with Apache License 2.0 | 4 votes |
@After public void doTearDown() { Disposer.dispose(thisClassDisposable); }
Example 12
Source File: InspectorService.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void dispose() { Disposer.dispose(inspectorLibrary); Disposer.dispose(setPubRootDirectoriesSubscription); }
Example 13
Source File: DisposableTest.java From azure-devops-intellij with MIT License | 4 votes |
@After public void tearDown() { Disposer.dispose(testDisposable); }
Example 14
Source File: BlazeTestCase.java From intellij with Apache License 2.0 | 4 votes |
@After public final void tearDown() { Disposer.dispose(testDisposable); }
Example 15
Source File: FlutterPerformanceView.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void dispose() { Disposer.dispose(this); }
Example 16
Source File: FlutterView.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void dispose() { Disposer.dispose(this); }
Example 17
Source File: VcsDockedComponent.java From p4ic4idea with Apache License 2.0 | 4 votes |
@Override public void disposeComponent() { Disposer.dispose(this); }
Example 18
Source File: JavaSourceFolderProviderTest.java From intellij with Apache License 2.0 | 4 votes |
@After public void doTearDown() { Disposer.dispose(thisClassDisposable); }
Example 19
Source File: CmtFileEditor.java From reasonml-idea-plugin with MIT License | 4 votes |
@Override public void dispose() { Disposer.dispose(this); }
Example 20
Source File: IntellijLanguageClient.java From lsp4intellij with Apache License 2.0 | 4 votes |
@Override public void dispose() { Disposer.dispose(this); }