[STF] extended chat API

Added new methods that support writing to and reading from
multiple chatrooms.

Change-Id: I35d86147e9dbd23c444d89fd311d97e22d09dc4f
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/429
Tested-by: Jenkins CI
Reviewed-by: Sebastian Starroske <sebastian.starroske@googlemail.com>
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[STF] do not use reflection to get the Saros context

The STF controller used reflection to get the actual
Saros context. This may lead to failures if someone changes
the variable names.

As there already exists an interface for the context and
the context injects itself use this context.

Change-Id: I72bcfcb8231ad16527490c20271d9d690a71b840
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/419
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[INTERNAL] Address FindBugs warning, provide correct argument type

A Map<JID, V> variable was accessed via get(String)

Commit 79368e368c5d6577e48023ae85c4ea36d9e82f98 reverted the fix
that was made in commit 0d304d100ea4b3eec404d84db3d5cc4a9c277e4.

Change-Id: I6c13cb5d59d6b3a004d7eaf87aa7f16ae9726324
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/433
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
Tested-by: Jenkins CI
[STF] added test case for a use case

Added a test that is testing a scenario in which
a session participant works alone on a shared file.

Change-Id: I9cb4f6a2184625e155b82c2f788a2efc0682492a
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/426
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[STF] fixed default teardown mechanic

The widgets(...) methods of the SWTBot class does not document
that it will throw a WidgetNotFound exception if 
the matcher does not match anything. Added a hasOpenChatrooms
method to check the condition first. The teardown mechanic will
now also continue if there are erros when closing the chat tabs.

Change-Id: I512400684fdf36693f5e3fc746532673597d8562
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/432
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[FIX] do not allow a resource qualified JID to be added as a roster
entry

It is currently possible to add a resource qualified JID as contact
to the roster. Saros is currently unable to delete such entries
afterwards. This is caused by the SelectionRetriever which tries
to adapt a RosterEntryElement to a RosterEntry. The adapter
will return null, as the Smack JavaDoc for roster.getEntry is
ambiguous and not very well documented. The method may not return
what you would expect when reading its documentation.


Change-Id: Iaf34b2d151e1ccf664c65723ee987d2d223bdb03
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/414
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[INTERNAL] replaced hard coded string

Change-Id: I4d209e25f206e12c44c654c274342fe011183c75
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/415
Tested-by: Jenkins CI
Reviewed-by: Sebastian Starroske <sebastian.starroske@googlemail.com>
Reviewed-by: Marcus Janz <janz.marcus@googlemail.com>
[FIX] #3500362 No feedback if sync has finished

A bubble notification is now displayed if the
synchronization process finishes successfully.

Change-Id: I2c1f9a3907f1ac0458a8afa88d8fe5c3a0ff40a9
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/392
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[NOP] removed unused NLS messages

Change-Id: I512722ab3531be20033f3891954d57f2d57dc70b
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/435
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[STF] refactored package layout for test cases

Simplified package layout for test cases.
Updated all test suites.
Removed out of date test cases.
Re-enabled test cases.
Moved test cases to the correct packages.

Change-Id: I6106a29cfd38633677e721e637c470fd73f379b6
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/436
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[STF] refactored package layout

Remove all test cases / packages that should had been removed with 
commit ded25ab37197e916457f0db85c48173d1c36f677 but currently were not.

Change-Id: I441734921936def8f50415ef14fdc5d717d09a09
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/438
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[JUNIT] removed all test cases that depend on hardware

The test cases needs a full working XMPP server.
The server might not be always up.

Furthermore if two or more developers are running the
tests at the same time it is likely that failures will
occur (CI is also affected).

Regression time went down from 1 minute to approx. 6 seconds.

Change-Id: I51a38853924e2f9f707b85f2b39b12e0d7b70b1d
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/439
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[STF] addressed FindBugs warning IL_INFINITE_RECURSIVE_LOOP

IL: There is an apparent infinite recursive loop in
de.fu_berlin.inf.dpp.stf.server.rmi.superbot.component.view.saros.impl.SarosView.closeChatroom(String)

This method unconditionally invokes itself. This would seem to indicate
an infinite recursive loop that will result in a stack overflow.

Change-Id: I2d4d02d56d3a87fa5d37b2ae6ff5def002777f19
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/443
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[STF] STF test for editing during an invitation process

Added a stress test where Bob edits multiple files while Alice invites
Carl.

Added a test where Alice (Host) inserts text while Bob invites Carl.

Change-Id: I0ab854804e3facf61c1ab3fa9ecdb18328af89b0
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/378
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[INTERNAL] FileZipper is not dependent on a monitor anymore

The methods zipFiles(..) and createProjectZipArchive(..) of the util
class FileZipper were using monitors which were passed as arguments.
Now those methods expect a ZipListener instead of a monitor. This
ZipListener is notified when a new zip entry is created and after a
chunk of data has been deflated.

This helps separating the zipping (which is the main intention of those
functions) from the updating / handling of the monitors. Besides it
allows other implementations of the ZipListener.

Change-Id: I80ca86c1bf467961e8f343183e83e8b60069151b
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/277
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[FIX] #3572488 Fix annoying chat replay 

The widgets of the ChatDisplay class are now updated
instead of being disposed and reinserted again.

Change-Id: I4a3defaf5a166782b7e1f2a0d404a7345aa2280a
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/424
Tested-by: Jenkins CI
Reviewed-by: Sebastian Starroske <sebastian.starroske@googlemail.com>
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[INTERNAL] ZipListenerAdapter provides a way to combine multiple
ZipListeners
		
The ZipListenerAdapter combines multiples ZipListeners and
passes the calls of the update() methods to its listeners.

Change-Id: I0a86a7bcf4ce251397537b42cccc6112212b9895
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/278
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[FIX] The block() and unblock() methods in the
EditorManager.stopManagerListener did not prevent the sending of
TextEditActivities

The method textAboutToBeChanged() in the EditorManager class gets called
right before TextEdits happen. This methods toggles the creation of
TextEditActivities. It won't send any TextEditActivities if the
hasWriteAccess property is set to false.

The only way this attribute is changed during a running session is by a
call of permissionChanged(), but it should also be changed when the user
is blocked by the StopManager.

This patch prevents the sending of TextEditActivites while the session
is stopped via the StopManager.

Change-Id: I2cd3515d5dada11a506fd660cbd371acd639eeba
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/441
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[INTERNAL] Watchdog must not send activities if the session is locked

A locked / blocked session should not generate more activities than
needed. This patch will lock the watchdog if the session is locked
via the stop manager.

Change-Id: I5912cddfd5dfc800f66539792adc982b864fe636
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/446
Tested-by: Jenkins CI
Reviewed-by: Sebastian Starroske <sebastian.starroske@googlemail.com>
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
[UI] do not show the resource part of the JID in the chat

Currently the resource part of the JID is shown for contacts
that have no nickname assigned.

Either show the resource part always or not at all. This
patch removes the resource part from the chat view lines.

Before: xxx@yyy.zzz/abcd joined ...
After: xxx@yyy.zzz joined ...

Change-Id: Ie4902472dee30772fe3299e80d42121be67a9106
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/421
Tested-by: Jenkins CI
Reviewed-by: Sebastian Starroske <sebastian.starroske@googlemail.com>