Package jetbrains.communicator.core.users

Examples of jetbrains.communicator.core.users.User


  public void testSendXmlMessage_WithResponse() throws Throwable {
    TestUtil.testSendXmlMessage_Functional(this, mySelf, true);
  }

  public void testGetUserStatus() throws Exception {
    User someone = createAnotherOnlineUser();

    myUserModel.addUser(mySelf);
    myUserModel.addUser(someone);
    mySelf.setCanAccessMyFiles(true, myUserModel);
    someone.setCanAccessMyFiles(true, myUserModel);

    ProjectsData projectsData = someone.getProjectsData(myIdeFacade);
    assertSame("No self status yet", ProjectsData.NULL, projectsData);

    myIdeFacade.setReturnedProjects(new String[]{"project1"});

    assert mySelf.isOnline();
View Full Code Here


      Pico.setUnitTest(true);
    }
  }

  private void expectSetOneOnlineUser() throws UnknownHostException {
    User p2PUser = UserImpl.create("nick", P2PTransport.CODE);

    List<String> projects = new ArrayList<String>();
    projects.add("project1");

    OnlineUserInfo onlineUserInfo = new OnlineUserInfo(InetAddress.getByName("localhost"), PORT, projects, new UserPresence(PresenceMode.AWAY));
View Full Code Here

    Thread.sleep(10);
    assertFalse("Search should be finished", myUserMonitorThread.isFinding());
  }

  private void expectSetOneOnlineUser() throws UnknownHostException {
    User p2PUser = UserImpl.create("nick", P2PTransport.CODE);

    List<String> projects = new ArrayList<String>();
    projects.add("project1");

    OnlineUserInfo onlineUserInfo = new OnlineUserInfo(InetAddress.getByName("localhost"), PORT, projects, new UserPresence(PresenceMode.AWAY));
View Full Code Here

  }

  @Override
  protected User createAnotherOnlineUser() throws UnknownHostException {
    mySelf = createSelf();
    User user = myTransport.createUser("kir123@localhost", new OnlineUserInfo(InetAddress.getLocalHost(), myTransport.getPort()));
    myTransport.setOnlineUsers(Arrays.asList(mySelf, user));
    return user;
  }
View Full Code Here

    userListComponent.setUI(new MultipleSelectionListUI());
    userListComponent.setListData(users.toArray());
    userListComponent.setCellRenderer(new DefaultListCellRenderer(){
      @Override
      public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        User user = (User) value;
        Component rendererComponent = super.getListCellRendererComponent(list, user.getDisplayName(), index, isSelected, cellHasFocus);
        if (rendererComponent instanceof JLabel) {
          JLabel jLabel = (JLabel) rendererComponent;
          jLabel.setIcon(user.getIcon());
        }
        return rendererComponent;
      }
    });
  }
View Full Code Here

    super.update(e);

    Project project = getProject(e);
    MutablePicoContainer container = getContainer(project);
    SearchHistoryCommand command = getCommand(e);
    User selectedUser;
    if (container != null && project != null && command != null) {

      boolean focused = false;
      if (IDEtalkMessagesWindowImpl.PLACE_TOOLBAR.equals(e.getPlace())) {
        IDEtalkMessagesWindow messagesWindow = project.getComponent(IDEtalkMessagesWindow.class);
View Full Code Here

  }

  @Override
  public void deliverMessage(ConsoleMessage consoleMessage) {

    final User user = consoleMessage.getUser();

    MessagesTab messagesTab = createAndSetSelectedTab(user, false);
    messagesTab.outputMessage(consoleMessage);

    if (isFrameActive()) {
View Full Code Here

  }

  public static Object convertValueIfUserNode(Object value, UserActionWithValue convertor) {
    Object userObject = getUserObject(value);
    if (userObject instanceof User) {
      User user = (User) userObject;
//noinspection AssignmentToMethodParameter
      value = convertor.execute(user);
    }
    return value;
  }
View Full Code Here

  @Override
  public void setDisplayName(final String name, UserModel userModel) {
    if (com.intellij.openapi.util.text.StringUtil.isEmptyOrSpaces(name)) return;

    if (userModel != null) {
      User inModel = userModel.findUser(getName(), getTransportCode());
      if (inModel != null) {
        ((BaseUserImpl) inModel).setDisplayNameWithEvent(name, userModel.getBroadcaster());
      }
    }
    myDisplayName = name;
View Full Code Here

  @Override
  public void setGroup(final String group, UserModel userModel) {
    final String fixedGroup = StringUtil.fixGroup(group);

    if (userModel != null) {
      User inModel = userModel.findUser(getName(), getTransportCode());
      if (inModel != null) {
        ((BaseUserImpl) inModel).setGroupWithEvent(fixedGroup, userModel.getBroadcaster());
      }
    }
    myGroup = fixedGroup;
View Full Code Here

TOP

Related Classes of jetbrains.communicator.core.users.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.