use of com.intellij.openapi.util.Disposer.newDisposable in project intellij-community by JetBrains.
the class DisposerTest method testMustNotRegisterWithAlreadyDisposed.
public void testMustNotRegisterWithAlreadyDisposed() {
Disposable disposable = Disposer.newDisposable();
Disposer.register(myRoot, disposable);
Disposer.dispose(disposable);
try {
Disposer.register(disposable, Disposer.newDisposable());
fail("Must not be able to register with already disposed parent");
} catch (IncorrectOperationException ignored) {
}
}
use of com.intellij.openapi.util.Disposer.newDisposable in project intellij-community by JetBrains.
the class DisposerTest method testRegisterThenDisposeThenRegisterAgain.
public void testRegisterThenDisposeThenRegisterAgain() {
Disposable disposable = Disposer.newDisposable();
Disposer.register(myRoot, disposable);
Disposer.dispose(disposable);
Disposer.register(myRoot, disposable);
Disposer.register(disposable, Disposer.newDisposable());
}
Aggregations