Search in sources :

Example 11 with ProjectsData

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);
}
Also used : ProjectsData(jetbrains.communicator.core.vfs.ProjectsData)

Example 12 with ProjectsData

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);
}
Also used : ProjectsData(jetbrains.communicator.core.vfs.ProjectsData)

Example 13 with ProjectsData

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();
}
Also used : ProjectsData(jetbrains.communicator.core.vfs.ProjectsData)

Example 14 with 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);
    }
}
Also used : User(jetbrains.communicator.core.users.User) ProjectsData(jetbrains.communicator.core.vfs.ProjectsData)

Example 15 with 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());
}
Also used : ProjectsData(jetbrains.communicator.core.vfs.ProjectsData) IDEFacade(jetbrains.communicator.ide.IDEFacade) MockUser(jetbrains.communicator.mock.MockUser)

Aggregations

ProjectsData (jetbrains.communicator.core.vfs.ProjectsData)17 IDEFacade (jetbrains.communicator.ide.IDEFacade)3 MockUser (jetbrains.communicator.mock.MockUser)3 User (jetbrains.communicator.core.users.User)2 Semaphore (java.util.concurrent.Semaphore)1 GetProjectsDataXmlMessage (jetbrains.communicator.core.transport.GetProjectsDataXmlMessage)1 CanceledException (jetbrains.communicator.ide.CanceledException)1 Element (org.jdom.Element)1