use of jetbrains.communicator.core.vfs.ProjectsData in project intellij-plugins by JetBrains.
the class AbstractTransportTestCase method testGetUserStatus_Disabled.
public void testGetUserStatus_Disabled() throws Exception {
myUserModel.addUser(mySelf);
myIdeFacade.setReturnedProjects(new String[] { "project1" });
myOptions.setOption(OptionFlag.HIDE_ALL_KEY.toString(), true);
ProjectsData selfStatus = mySelf.getProjectsData(myIdeFacade);
assertEquals("No data expected - returning user data was disabled", 0, selfStatus.getProjects().length);
}
use of jetbrains.communicator.core.vfs.ProjectsData in project intellij-plugins by JetBrains.
the class AbstractTransportTestCase method testGetUserStatus_NotAllowedByUser.
public void testGetUserStatus_NotAllowedByUser() throws Exception {
myUserModel.addUser(mySelf);
myIdeFacade.setReturnedProjects(new String[] { "project1" });
myIdeFacade.setReturnedAnswer(false);
mySelf.setCanAccessMyFiles(false, myUserModel);
myOptions.setOption(OptionFlag.HIDE_ALL_KEY.toString(), true);
ProjectsData selfStatus = mySelf.getProjectsData(myIdeFacade);
assertEquals("No data expected - returning user data was not allowed by user", 0, selfStatus.getProjects().length);
}
use of jetbrains.communicator.core.vfs.ProjectsData in project intellij-plugins by JetBrains.
the class ProjectsDataTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
myProjectsData = new ProjectsData();
}
use of jetbrains.communicator.core.vfs.ProjectsData in project intellij-plugins by JetBrains.
the class ViewFilesCommand method execute.
public void execute() {
User user = myUserListComponent.getSelectedUser();
assert user != null;
ProjectsData projectsData = user.getProjectsData(myFacade);
if (projectsData.isEmpty()) {
myFacade.showMessage(StringUtil.getMsg("ViewFilesCommand.no.information"), StringUtil.getMsg("ViewFilesCommand.no.information.for.user", user.getDisplayName()));
} else {
myFacade.showUserFiles(user, projectsData);
}
}
use of jetbrains.communicator.core.vfs.ProjectsData 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