Search in sources :

Example 11 with IDEFacade

use of jetbrains.communicator.ide.IDEFacade in project intellij-plugins by JetBrains.

the class FileAccessProviderTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myUserModel = new UserModelImpl(getBroadcaster());
    myMock = new Mock(IDEFacade.class);
    disposeOnTearDown(myUserModel);
    myIdeFacade = (IDEFacade) myMock.proxy();
    myUser = myUserModel.createUser("User", MockTransport.NAME);
    myProvider = new MyProvider(myIdeFacade, myUserModel);
}
Also used : UserModelImpl(jetbrains.communicator.core.impl.users.UserModelImpl) Mock(org.jmock.Mock) IDEFacade(jetbrains.communicator.ide.IDEFacade)

Example 12 with IDEFacade

use of jetbrains.communicator.ide.IDEFacade in project intellij-plugins by JetBrains.

the class EventsProcessor method showPopupNotification.

private void showPopupNotification(final User from, TransportEvent event) {
    if (myMessageDispatcher.countPendingMessages() > 5)
        return;
    IDEFacade ideFacade = ((IDEFacade) Pico.getInstance().getComponentInstanceOfType(IDEFacade.class));
    final IdeaLocalMessage localMessage = (IdeaLocalMessage) ideFacade.createLocalMessageForIncomingEvent(event);
    if (localMessage == null)
        return;
    UIUtil.invokeLater(() -> {
        JComponent content = localMessage.getPopupComponent(from, myProject);
        Color backgroundColor = new Color(255, 255, 217);
        content.setOpaque(true);
        content.setBackground(backgroundColor);
        WindowManager.getInstance().getStatusBar(myProject).fireNotificationPopup(content, backgroundColor);
    });
}
Also used : IdeaLocalMessage(jetbrains.communicator.idea.IdeaLocalMessage) IDEFacade(jetbrains.communicator.ide.IDEFacade)

Example 13 with IDEFacade

use of jetbrains.communicator.ide.IDEFacade in project intellij-plugins by JetBrains.

the class OpenFileActionTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myIdeFacadeMock = mock(IDEFacade.class);
    Pico.getInstance().registerComponentInstance(IDEFacade.class, myIdeFacadeMock.proxy());
    myViewFilesPanel = new ViewFilesPanel(null, null, (IDEFacade) myIdeFacadeMock.proxy());
    myUser = new MockUser();
    ProjectsData projectsData = new ProjectsData();
    myVFile = VFile.create("build.xml");
    projectsData.setProjectFiles("ideTalk", new VFile[] { myVFile, VFile.create("log4j.xml") });
    projectsData.addNonProjectFile(VFile.create("non-projectFile"));
    myViewFilesPanel.refreshData(myUser, projectsData);
    myOpenFileAction = new OpenFileAction(myViewFilesPanel.getTree(), (IDEFacade) myIdeFacadeMock.proxy());
}
Also used : ProjectsData(jetbrains.communicator.core.vfs.ProjectsData) IDEFacade(jetbrains.communicator.ide.IDEFacade) MockUser(jetbrains.communicator.mock.MockUser)

Aggregations

IDEFacade (jetbrains.communicator.ide.IDEFacade)13 MockUser (jetbrains.communicator.mock.MockUser)5 UserModelImpl (jetbrains.communicator.core.impl.users.UserModelImpl)3 ProjectsData (jetbrains.communicator.core.vfs.ProjectsData)3 MockIDEFacade (jetbrains.communicator.mock.MockIDEFacade)3 Mock (org.jmock.Mock)3 VFile (jetbrains.communicator.core.vfs.VFile)2 MockUserListComponent (jetbrains.communicator.mock.MockUserListComponent)2 ConsoleView (com.intellij.execution.ui.ConsoleView)1 Project (com.intellij.openapi.project.Project)1 UserListComponent (jetbrains.communicator.ide.UserListComponent)1 IdeaLocalMessage (jetbrains.communicator.idea.IdeaLocalMessage)1 IncomingCodePointerMessage (jetbrains.communicator.idea.codePointer.IncomingCodePointerMessage)1 OwnConsoleMessage (jetbrains.communicator.idea.messagesWindow.OwnConsoleMessage)1