use of jetbrains.communicator.core.transport.MessageEvent in project intellij-plugins by JetBrains.
the class IDEAFacade method createLocalMessageForIncomingEvent.
@Override
public LocalMessage createLocalMessageForIncomingEvent(TransportEvent event) {
final LocalMessage[] result = new LocalMessage[1];
event.accept(new EventVisitor() {
@SuppressWarnings({ "RefusedBequest" })
@Override
public void visitStacktraceEvent(StacktraceEvent event) {
result[0] = new IncomingStacktraceMessage(event);
}
@SuppressWarnings({ "RefusedBequest" })
@Override
public void visitCodePointerEvent(CodePointerEvent event) {
result[0] = new IncomingCodePointerMessage(event, IDEAFacade.this);
}
@SuppressWarnings({ "RefusedBequest" })
@Override
public void visitMessageEvent(MessageEvent event) {
result[0] = new IncomingLocalMessage(event);
}
});
return result[0];
}
use of jetbrains.communicator.core.transport.MessageEvent in project intellij-plugins by JetBrains.
the class EventsProcessorTest method testIncomingMessage_No_Tab_WithExpand.
public void testIncomingMessage_No_Tab_WithExpand() throws Exception {
MessageEvent event = EventFactory.createMessageEvent(new MockTransport(), "bob", "text");
myMock.expects(once()).method("expandToolWindow");
myMock.expects(once()).method("newMessageAvailable").with(eq(myUserModel.createUser("bob", MockTransport.NAME)), eq(event));
myMock.expects(once()).method("getWindow").will(returnValue(null));
getBroadcaster().fireEvent(event);
}
Aggregations