TreeUiTests fixed

This commit is contained in:
Kirill Kalishev
2011-09-13 08:49:25 +04:00
parent 873c6a176a
commit 60aafa307f
2 changed files with 8 additions and 4 deletions
@@ -210,24 +210,24 @@ public class MockApplication extends MockComponentManager implements Application
@NotNull
@Override
public ModalityState getCurrentModalityState() {
throw new UnsupportedOperationException();
return getNoneModalityState();
}
@Override
public ModalityState getAnyModalityState() {
throw new UnsupportedOperationException();
return getNoneModalityState();
}
@NotNull
@Override
public ModalityState getModalityStateForComponent(@NotNull Component c) {
throw new UnsupportedOperationException();
return getNoneModalityState();
}
@NotNull
@Override
public ModalityState getDefaultModalityState() {
throw new UnsupportedOperationException();
return getNoneModalityState();
}
@Override
@@ -1330,6 +1330,10 @@ public class AbstractTreeUi {
}
}
if (!canInitiateNewActivity()) {
throw new ProcessCanceledException();
}
final Object element = getElementFor(node);
addNodeAction(element, new NodeAction() {
public void onReady(final DefaultMutableTreeNode node) {