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);
}
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);
});
}
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());
}
Aggregations