Search in sources :

Example 1 with SettingsChanged

use of jetbrains.communicator.core.users.SettingsChanged in project intellij-plugins by JetBrains.

the class UsersTreeModel_OnlyOfflineShownTest method testHideOfflineUsers.

public void testHideOfflineUsers() throws Exception {
    myTree.expandRow(2);
    myTree.expandRow(1);
    assertEquals("1 group with non-online user + 1 user online + root", 2 + 1, myTree.getRowCount());
    OptionFlag.OPTION_HIDE_OFFLINE_USERS.change(false);
    getBroadcaster().fireEvent(new SettingsChanged());
    myTree.expandRow(3);
    myTree.expandRow(2);
    myTree.expandRow(1);
    assertEquals(7 + 1, myTree.getRowCount());
}
Also used : SettingsChanged(jetbrains.communicator.core.users.SettingsChanged)

Example 2 with SettingsChanged

use of jetbrains.communicator.core.users.SettingsChanged in project intellij-plugins by JetBrains.

the class MessagesTab method setupIDEtalkListener.

private void setupIDEtalkListener() {
    myListener = new IDEtalkAdapter() {

        @Override
        public void afterChange(IDEtalkEvent event) {
            event.accept(new EventVisitor() {

                @Override
                public void visitSettingsChanged(SettingsChanged settingsChanged) {
                    updateKeyBindings();
                }
            });
        }
    };
    myLocalMessageDispatcher.getBroadcaster().addListener(myListener);
}
Also used : SettingsChanged(jetbrains.communicator.core.users.SettingsChanged) EventVisitor(jetbrains.communicator.core.EventVisitor) IDEtalkEvent(jetbrains.communicator.core.IDEtalkEvent) IDEtalkAdapter(jetbrains.communicator.core.IDEtalkAdapter)

Example 3 with SettingsChanged

use of jetbrains.communicator.core.users.SettingsChanged in project intellij-plugins by JetBrains.

the class IDEtalkConfiguration method apply.

public void apply() throws ConfigurationException {
    for (Pair<JCheckBox, OptionFlag> option : myFlags) {
        option.getSecond().change(option.getFirst().isSelected());
    }
    update(myTimeoutAway, IDEtalkOptions.TIMEOUT_AWAY_MIN);
    update(myTimeoutXA, IDEtalkOptions.TIMEOUT_XA_MIN);
    Pico.getEventBroadcaster().fireEvent(new SettingsChanged());
}
Also used : SettingsChanged(jetbrains.communicator.core.users.SettingsChanged) OptionFlag(jetbrains.communicator.OptionFlag)

Example 4 with SettingsChanged

use of jetbrains.communicator.core.users.SettingsChanged in project intellij-plugins by JetBrains.

the class OptionHideOfflineUsers method setSelected.

public void setSelected(AnActionEvent e, boolean state) {
    super.setSelected(e, state);
    Pico.getEventBroadcaster().fireEvent(new SettingsChanged());
}
Also used : SettingsChanged(jetbrains.communicator.core.users.SettingsChanged)

Example 5 with SettingsChanged

use of jetbrains.communicator.core.users.SettingsChanged in project intellij-plugins by JetBrains.

the class UsersTreeModel_OnlyOfflineShownTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myUserModel = TestFactory.createUserListWithUsers(this);
    myTree = new Tree();
    myIDEFacade = new MockIDEFacade(getClass());
    myLocalMessageDispatcher = new LocalMessageDispatcherImpl(getBroadcaster(), myIDEFacade, myUserModel);
    disposeOnTearDown(myLocalMessageDispatcher);
    myUsersTreeModel = new UsersTreeModel(myTree, myUserModel, myLocalMessageDispatcher);
    disposeOnTearDown(myUsersTreeModel);
    myTree.setModel(myUsersTreeModel);
    OptionFlag.OPTION_HIDE_OFFLINE_USERS.change(true);
    getBroadcaster().fireEvent(new SettingsChanged());
}
Also used : SettingsChanged(jetbrains.communicator.core.users.SettingsChanged) MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) Tree(com.intellij.ui.treeStructure.Tree) LocalMessageDispatcherImpl(jetbrains.communicator.core.impl.dispatcher.LocalMessageDispatcherImpl)

Aggregations

SettingsChanged (jetbrains.communicator.core.users.SettingsChanged)5 Tree (com.intellij.ui.treeStructure.Tree)1 OptionFlag (jetbrains.communicator.OptionFlag)1 EventVisitor (jetbrains.communicator.core.EventVisitor)1 IDEtalkAdapter (jetbrains.communicator.core.IDEtalkAdapter)1 IDEtalkEvent (jetbrains.communicator.core.IDEtalkEvent)1 LocalMessageDispatcherImpl (jetbrains.communicator.core.impl.dispatcher.LocalMessageDispatcherImpl)1 MockIDEFacade (jetbrains.communicator.mock.MockIDEFacade)1