use of jetbrains.communicator.idea.codePointer.IncomingCodePointerMessage in project intellij-plugins by JetBrains.
the class OutgoingCodePointerLocalMessage method createConsoleMessage.
public ConsoleMessage createConsoleMessage(User user) {
return new OwnConsoleMessage(user, StringUtil.getMsg("code.pointer"), getWhen()) {
public void printMessage(Project project, ConsoleView console) {
final IDEAFacade ideFacade = (IDEAFacade) Pico.getInstance().getComponentInstanceOfType(IDEFacade.class);
IncomingCodePointerMessage printer = new IncomingCodePointerMessage(myEvent, ideFacade);
printer.outputMessage(console);
}
};
}
use of jetbrains.communicator.idea.codePointer.IncomingCodePointerMessage in project intellij-plugins by JetBrains.
the class IDEAFacadeTest method testCreateLocalMessage_CodeInterval.
public void testCreateLocalMessage_CodeInterval() throws Exception {
TransportEvent event = EventFactory.createCodePointerEvent(myTransport, "user22", VFile.create("a path"), 0, 0, 1, 2, "some comment1");
LocalMessage localMessage = myFacade.createLocalMessageForIncomingEvent(event);
assertTrue("instance of IncomingCodePointerMessage expected:" + localMessage, localMessage instanceof IncomingCodePointerMessage);
assertEquals("some comment1", ((BaseLocalMessage) localMessage).getComment());
}
use of jetbrains.communicator.idea.codePointer.IncomingCodePointerMessage 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];
}
Aggregations