Search in sources :

Example 1 with IncomingCodePointerMessage

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);
        }
    };
}
Also used : Project(com.intellij.openapi.project.Project) IncomingCodePointerMessage(jetbrains.communicator.idea.codePointer.IncomingCodePointerMessage) ConsoleView(com.intellij.execution.ui.ConsoleView) OwnConsoleMessage(jetbrains.communicator.idea.messagesWindow.OwnConsoleMessage) IDEFacade(jetbrains.communicator.ide.IDEFacade)

Example 2 with IncomingCodePointerMessage

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());
}
Also used : TransportEvent(jetbrains.communicator.core.transport.TransportEvent) IncomingLocalMessage(jetbrains.communicator.idea.sendMessage.IncomingLocalMessage) LocalMessage(jetbrains.communicator.core.dispatcher.LocalMessage) IncomingCodePointerMessage(jetbrains.communicator.idea.codePointer.IncomingCodePointerMessage)

Example 3 with IncomingCodePointerMessage

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];
}
Also used : LocalMessage(jetbrains.communicator.core.dispatcher.LocalMessage) IncomingLocalMessage(jetbrains.communicator.idea.sendMessage.IncomingLocalMessage) IncomingCodePointerMessage(jetbrains.communicator.idea.codePointer.IncomingCodePointerMessage) EventVisitor(jetbrains.communicator.core.EventVisitor) MessageEvent(jetbrains.communicator.core.transport.MessageEvent) StacktraceEvent(jetbrains.communicator.core.transport.StacktraceEvent) CodePointerEvent(jetbrains.communicator.core.transport.CodePointerEvent) IncomingLocalMessage(jetbrains.communicator.idea.sendMessage.IncomingLocalMessage) IncomingStacktraceMessage(jetbrains.communicator.idea.sendMessage.IncomingStacktraceMessage)

Aggregations

IncomingCodePointerMessage (jetbrains.communicator.idea.codePointer.IncomingCodePointerMessage)3 LocalMessage (jetbrains.communicator.core.dispatcher.LocalMessage)2 IncomingLocalMessage (jetbrains.communicator.idea.sendMessage.IncomingLocalMessage)2 ConsoleView (com.intellij.execution.ui.ConsoleView)1 Project (com.intellij.openapi.project.Project)1 EventVisitor (jetbrains.communicator.core.EventVisitor)1 CodePointerEvent (jetbrains.communicator.core.transport.CodePointerEvent)1 MessageEvent (jetbrains.communicator.core.transport.MessageEvent)1 StacktraceEvent (jetbrains.communicator.core.transport.StacktraceEvent)1 TransportEvent (jetbrains.communicator.core.transport.TransportEvent)1 IDEFacade (jetbrains.communicator.ide.IDEFacade)1 OwnConsoleMessage (jetbrains.communicator.idea.messagesWindow.OwnConsoleMessage)1 IncomingStacktraceMessage (jetbrains.communicator.idea.sendMessage.IncomingStacktraceMessage)1