Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multi-user session support #1099

Merged
merged 4 commits into from
Nov 12, 2020
Merged

Conversation

tobous
Copy link
Member

@tobous tobous commented Nov 9, 2020

Adds multi-user session support for Saros/I by providing a corresponding context menu options. Adjusts the joining session task to run in a non-modal background task to avoid deadlocks.

Resolves parts of #1057.

Commits

[UI][I] Use non-modal background task for joining session job

Adds Wizard.runTaskAsync(...), running the given runnable in a
cancelable non-modal background task.

Uses the new method to run the task used to join a session. This was
necessary as joining the session requires running additional logic on
the SWT dispatcher thread when joining an already running multi-user
session. This is due to the UserInformationHandler needing to update the
user list as part of the session invitation, which requires running
logic on the SWT dispatcher thread. If the joining task is run modally,
this leads to a deadlock as the modal task blocks the SWT dispatcher
thread.

Moves the title of the joining session task to
IntellijMessages.properties.

Moves the logic to show the status of the joining task to a separate
method.

[UI][I] Add option to add user to existing session

Adds the option to add a user to an existing session. This enables
multi-user session support for Saros/I.

Resolves issues where the pop-up dialog to create a new session was
still displayed, even if the local user is already part of a session.
Ensures that the dialog is only displayed when there is a valid option
and that the correct option is displayed.

Copies the icon used for the option to add users to the session from
the Eclipse package.

Resolves part of #1057.

[UI][I] Add option to kick user from session

Adds the option for the host to kick users from the session.

Adds an icon to the pop-up follow mode option.

Moves the messages shown to the user in SessionPopMenu to
IntellijMessages.properties.

Copies the icon to kick a session participant from the Eclipse package.

Resolves part of #1057.

@tobous tobous added Aspect: GUI Issues specific to the Saros GUI Aspect: User Experience Issue that describes a problem with the usability/user experience of Saros Area: IntelliJ Issue affecting Saros for IntelliJ (Saros/I) labels Nov 9, 2020
@tobous tobous added this to the Saros/I Release NEXT milestone Nov 9, 2020
@tobous tobous self-assigned this Nov 9, 2020
@tobous tobous linked an issue Nov 9, 2020 that may be closed by this pull request
3 tasks
@tobous tobous force-pushed the pr/intellij/multi-user-session-support branch from f830ca1 to 594b13b Compare November 9, 2020 16:06
Adds Wizard.runTaskAsync(...), running the given runnable in a
cancelable non-modal background task.

Uses the new method to run the task used to join a session. This was
necessary as joining the session requires running additional logic on
the SWT dispatcher thread when joining an already running multi-user
session. This is due to the UserInformationHandler needing to update the
user list as part of the session invitation, which requires running
logic on the SWT dispatcher thread. If the joining task is run modally,
this leads to a deadlock as the modal task blocks the SWT dispatcher
thread.

Moves the title of the joining session task to
IntellijMessages.properties.

Moves the logic to show the status of the joining task to a separate
method.
@tobous tobous force-pushed the pr/intellij/multi-user-session-support branch from 594b13b to 0831023 Compare November 11, 2020 23:19
@tobous
Copy link
Member Author

tobous commented Nov 11, 2020

Rebased onto current base branch without any interaction.

Adds the option to add a user to an existing session. This enables
multi-user session support for Saros/I.

The logic is implemented in InviteToSessionMenu.

Cleans up the logic spawning contact menus.

Resolves issues where the pop-up dialog to create a new session was
still displayed, even if the local user is already part of a session.
Ensures that the dialog is only displayed when there is a valid option
and that the correct option is displayed.

Copies the icon used for the option to add users to the session from
the Eclipse package.

Resolves part of #1057.
@tobous tobous force-pushed the pr/intellij/multi-user-session-support branch from 0831023 to 05b8f21 Compare November 11, 2020 23:49
@tobous
Copy link
Member Author

tobous commented Nov 11, 2020

Moved session invitation popup to new class. This allowed me to clean up ContactPopMenu.

Also renamed ContactPopMenu to StartSessionContactPopMenu to reflect its purpose.

Adds the option for the host to kick users from the session.

Adds an icon to the pop-up follow mode option.

Moves the messages shown to the user in SessionPopMenu to
IntellijMessages.properties.

Copies the icon to kick a session participant from the Eclipse package.

Resolves part of #1057.
@tobous tobous force-pushed the pr/intellij/multi-user-session-support branch from 05b8f21 to e954d49 Compare November 11, 2020 23:59
@tobous tobous merged commit 3467ea2 into master Nov 12, 2020
@tobous tobous deleted the pr/intellij/multi-user-session-support branch November 12, 2020 00:07
@tobous tobous restored the pr/intellij/multi-user-session-support branch November 12, 2020 00:07
@tobous tobous deleted the pr/intellij/multi-user-session-support branch November 12, 2020 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: IntelliJ Issue affecting Saros for IntelliJ (Saros/I) Aspect: GUI Issues specific to the Saros GUI Aspect: User Experience Issue that describes a problem with the usability/user experience of Saros
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multi-user sessions in Saros/I
1 participant