diff --git a/stf.test/test/saros/stf/test/consistency/EditDuringInvitationStressTest.java b/stf.test/test/saros/stf/test/consistency/EditDuringInvitationStressTest.java index 67fb65901c..63926a3f03 100644 --- a/stf.test/test/saros/stf/test/consistency/EditDuringInvitationStressTest.java +++ b/stf.test/test/saros/stf/test/consistency/EditDuringInvitationStressTest.java @@ -15,7 +15,7 @@ import saros.stf.client.tester.SarosTester; import saros.stf.client.util.EclipseTestThread; import saros.stf.client.util.Util; -import saros.stf.shared.Constants.TypeOfCreateProject; +import saros.stf.shared.Constants.SessionInvitationModality; import saros.stf.test.stf.Constants; public class EditDuringInvitationStressTest extends StfTestCase { @@ -39,7 +39,8 @@ public void testEditMultipleClassesDuringInvitation() throws Exception { .newC() .javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, CLASS_NAMES); - Util.buildSessionSequentially(Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB); + Util.setUpSessionWithJavaProject( + Constants.PROJECT1, SessionInvitationModality.SEQUENTIALLY, ALICE, BOB); BOB.superBot() .views() @@ -50,6 +51,8 @@ public void testEditMultipleClassesDuringInvitation() throws Exception { ALICE.superBot().views().sarosView().selectContact(CARL.getJID()).addToSarosSession(); + CARL.superBot().internal().createJavaProject(Constants.PROJECT1); + CARL.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT); bobIsWriting = @@ -75,7 +78,7 @@ private char generateCharacter() { bobIsWriting.start(); - CARL.superBot().confirmShellAddProjectWithNewProject(Constants.PROJECT1); + CARL.superBot().confirmShellAddProjectUsingExistProject(Constants.PROJECT1); bobIsWriting.join(); bobIsWriting.verify(); diff --git a/stf.test/test/saros/stf/test/consistency/EditDuringInvitationTest.java b/stf.test/test/saros/stf/test/consistency/EditDuringInvitationTest.java index 57891a5a9e..51d74de5f8 100644 --- a/stf.test/test/saros/stf/test/consistency/EditDuringInvitationTest.java +++ b/stf.test/test/saros/stf/test/consistency/EditDuringInvitationTest.java @@ -43,6 +43,8 @@ public void testEditDuringInvitation() throws Exception { .selectClass(Constants.PROJECT1, Constants.PKG1, Constants.CLS1) .open(); + CARL.superBot().internal().createJavaProject(Constants.PROJECT1); + CARL.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT); EclipseTestThread bobIsWriting = @@ -58,7 +60,7 @@ public void run() throws Exception { bobIsWriting.start(); - CARL.superBot().confirmShellAddProjectWithNewProject(Constants.PROJECT1); + CARL.superBot().confirmShellAddProjectUsingExistProject(Constants.PROJECT1); bobIsWriting.join(); bobIsWriting.verify(); diff --git a/stf.test/test/saros/stf/test/consistency/EditDuringNonHostInvitationTest.java b/stf.test/test/saros/stf/test/consistency/EditDuringNonHostInvitationTest.java index 9ea2b94b1d..1cfe56a74f 100644 --- a/stf.test/test/saros/stf/test/consistency/EditDuringNonHostInvitationTest.java +++ b/stf.test/test/saros/stf/test/consistency/EditDuringNonHostInvitationTest.java @@ -46,6 +46,8 @@ public void testEditDuringInvitationNonHostInvites() throws Exception { .selectClass(Constants.PROJECT1, Constants.PKG1, Constants.CLS1) .open(); + CARL.superBot().internal().createJavaProject(Constants.PROJECT1); + CARL.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT); aliceIsWriting = @@ -61,7 +63,7 @@ public void run() throws Exception { aliceIsWriting.start(); - CARL.superBot().confirmShellAddProjectWithNewProject(Constants.PROJECT1); + CARL.superBot().confirmShellAddProjectUsingExistProject(Constants.PROJECT1); aliceIsWriting.join(); aliceIsWriting.verify(); diff --git a/stf.test/test/saros/stf/test/consistency/ModifyDocumentBeforeProjectNegotiationTest.java b/stf.test/test/saros/stf/test/consistency/ModifyDocumentBeforeProjectNegotiationTest.java index 52d40a57bb..8f3d5fc75e 100644 --- a/stf.test/test/saros/stf/test/consistency/ModifyDocumentBeforeProjectNegotiationTest.java +++ b/stf.test/test/saros/stf/test/consistency/ModifyDocumentBeforeProjectNegotiationTest.java @@ -5,7 +5,7 @@ import static saros.stf.client.tester.SarosTester.BOB; import static saros.stf.client.tester.SarosTester.CARL; import static saros.stf.shared.Constants.ACCEPT; -import static saros.stf.shared.Constants.SHELL_ADD_PROJECTS; +import static saros.stf.shared.Constants.SHELL_ADD_RESOURCES; import static saros.stf.shared.Constants.SHELL_SESSION_INVITATION; import org.junit.BeforeClass; @@ -36,7 +36,7 @@ public void testModifyDocumentBeforeProjectNegotiation() throws Exception { CARL.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT); - CARL.remoteBot().waitLongUntilShellIsOpen(SHELL_ADD_PROJECTS); + CARL.remoteBot().waitLongUntilShellIsOpen(SHELL_ADD_RESOURCES); // this test will fail if a jupiter proxy is added when bob is typing // text now @@ -50,7 +50,9 @@ public void testModifyDocumentBeforeProjectNegotiation() throws Exception { BOB.controlBot().getNetworkManipulator().synchronizeOnActivityQueue(ALICE.getJID(), 10000); - CARL.superBot().confirmShellAddProjectWithNewProject(Constants.PROJECT1); + CARL.superBot().internal().createJavaProject(Constants.PROJECT1); + + CARL.superBot().confirmShellAddProjectUsingExistProject(Constants.PROJECT1); CARL.superBot() .views() diff --git a/stf.test/test/saros/stf/test/editing/EditDifferentFilesTest.java b/stf.test/test/saros/stf/test/editing/EditDifferentFilesTest.java index 0e8decb22b..d8e6ddd221 100644 --- a/stf.test/test/saros/stf/test/editing/EditDifferentFilesTest.java +++ b/stf.test/test/saros/stf/test/editing/EditDifferentFilesTest.java @@ -9,7 +9,7 @@ import saros.stf.client.StfTestCase; import saros.stf.client.util.EclipseTestThread; import saros.stf.client.util.Util; -import saros.stf.shared.Constants.TypeOfCreateProject; +import saros.stf.shared.Constants.SessionInvitationModality; public class EditDifferentFilesTest extends StfTestCase { @@ -33,7 +33,7 @@ public void testEditingOnDifferentFiles() throws Exception { .newC() .javaProjectWithClasses("foo", "bar", "HelloWorld"); - Util.buildSessionSequentially("foo", TypeOfCreateProject.NEW_PROJECT, ALICE, BOB); + Util.setUpSessionWithJavaProject("foo", SessionInvitationModality.SEQUENTIALLY, ALICE, BOB); BOB.superBot() .views() diff --git a/stf.test/test/saros/stf/test/editing/Editing3ProjectsTest.java b/stf.test/test/saros/stf/test/editing/Editing3ProjectsTest.java index 7c628e8a27..609db2149b 100644 --- a/stf.test/test/saros/stf/test/editing/Editing3ProjectsTest.java +++ b/stf.test/test/saros/stf/test/editing/Editing3ProjectsTest.java @@ -9,7 +9,7 @@ import saros.stf.annotation.TestLink; import saros.stf.client.StfTestCase; import saros.stf.client.util.Util; -import saros.stf.shared.Constants.TypeOfCreateProject; +import saros.stf.shared.Constants.SessionInvitationModality; @TestLink(id = "Saros-108_add_3_new_projects_to_a_existing_session") public class Editing3ProjectsTest extends StfTestCase { @@ -30,15 +30,15 @@ public void testEditing3Projects() throws Exception { ALICE.superBot().internal().createFile("foo1", "src/bar/HelloBob.java", "HelloBob"); ALICE.superBot().internal().createFile("foo2", "src/bar/HelloCarl.java", "HelloCarl"); - Util.buildSessionSequentially("foo", TypeOfCreateProject.NEW_PROJECT, ALICE, BOB); + Util.setUpSessionWithJavaProject("foo", SessionInvitationModality.SEQUENTIALLY, ALICE, BOB); BOB.superBot().views().packageExplorerView().waitUntilResourceIsShared("foo"); - Util.addProjectToSessionSequentially("foo1", TypeOfCreateProject.NEW_PROJECT, ALICE, BOB); + Util.addJavaProjectToSessionSequentially("foo1", ALICE, BOB); BOB.superBot().views().packageExplorerView().waitUntilResourceIsShared("foo1"); - Util.addProjectToSessionSequentially("foo2", TypeOfCreateProject.NEW_PROJECT, ALICE, BOB); + Util.addJavaProjectToSessionSequentially("foo2", ALICE, BOB); BOB.superBot().views().packageExplorerView().waitUntilResourceIsShared("foo2"); diff --git a/stf.test/test/saros/stf/test/followmode/RefactorInFollowModeTest.java b/stf.test/test/saros/stf/test/followmode/RefactorInFollowModeTest.java index d04aed13b1..5fa1c9754a 100644 --- a/stf.test/test/saros/stf/test/followmode/RefactorInFollowModeTest.java +++ b/stf.test/test/saros/stf/test/followmode/RefactorInFollowModeTest.java @@ -10,7 +10,7 @@ import saros.stf.annotation.TestLink; import saros.stf.client.StfTestCase; import saros.stf.client.util.Util; -import saros.stf.shared.Constants.TypeOfCreateProject; +import saros.stf.shared.Constants.SessionInvitationModality; @TestLink(id = "Saros-40_followmode_and_refactoring") public class RefactorInFollowModeTest extends StfTestCase { @@ -45,7 +45,7 @@ public void testRefactorInFollowMode() throws Exception { ALICE.remoteBot().editor("HelloWorld.java").closeWithSave(); - Util.buildSessionSequentially("foo", TypeOfCreateProject.NEW_PROJECT, ALICE, BOB); + Util.setUpSessionWithJavaProject("foo", SessionInvitationModality.SEQUENTIALLY, ALICE, BOB); BOB.superBot() .views() diff --git a/stf.test/test/saros/stf/test/invitation/AwarenessInformationVisibleAfterInvitationTest.java b/stf.test/test/saros/stf/test/invitation/AwarenessInformationVisibleAfterInvitationTest.java index b7c2da4528..c3c6095297 100644 --- a/stf.test/test/saros/stf/test/invitation/AwarenessInformationVisibleAfterInvitationTest.java +++ b/stf.test/test/saros/stf/test/invitation/AwarenessInformationVisibleAfterInvitationTest.java @@ -14,7 +14,7 @@ import org.junit.Test; import saros.stf.client.StfTestCase; import saros.stf.client.util.Util; -import saros.stf.shared.Constants.TypeOfCreateProject; +import saros.stf.shared.Constants.SessionInvitationModality; import saros.stf.test.stf.Constants; public class AwarenessInformationVisibleAfterInvitationTest extends StfTestCase { @@ -57,7 +57,8 @@ public void awarenessInformationVisibleNewSessionTest() throws Exception { .packageExplorerView() .selectFile(Constants.PROJECT1, Constants.FILE1) .open(); - Util.buildSessionConcurrently(Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB); + Util.setUpSessionWithJavaProject( + Constants.PROJECT1, SessionInvitationModality.CONCURRENTLY, ALICE, BOB); BOB.superBot() .views() .packageExplorerView() @@ -113,7 +114,8 @@ public void awarenessInformationVisableAddToSessionTest() throws Exception { .packageExplorerView() .selectFile(Constants.PROJECT1, Constants.FILE1) .open(); - Util.buildSessionConcurrently(Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB); + Util.setUpSessionWithJavaProject( + Constants.PROJECT1, SessionInvitationModality.CONCURRENTLY, ALICE, BOB); BOB.superBot() .views() .packageExplorerView() @@ -127,9 +129,11 @@ public void awarenessInformationVisableAddToSessionTest() throws Exception { ALICE.superBot().views().sarosView().selectContact(CARL.getJID()).addToSarosSession(); + CARL.superBot().internal().createJavaProject(Constants.PROJECT1); + CARL.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT); - CARL.superBot().confirmShellAddProjectWithNewProject(Constants.PROJECT1); + CARL.superBot().confirmShellAddProjectUsingExistProject(Constants.PROJECT1); CARL.superBot() .views() diff --git a/stf.test/test/saros/stf/test/invitation/NonHostInvitesContactTest.java b/stf.test/test/saros/stf/test/invitation/NonHostInvitesContactTest.java index a26b82cd19..7e4db09ff6 100644 --- a/stf.test/test/saros/stf/test/invitation/NonHostInvitesContactTest.java +++ b/stf.test/test/saros/stf/test/invitation/NonHostInvitesContactTest.java @@ -16,7 +16,7 @@ import saros.session.User.Permission; import saros.stf.client.StfTestCase; import saros.stf.client.util.Util; -import saros.stf.shared.Constants.TypeOfCreateProject; +import saros.stf.shared.Constants.SessionInvitationModality; import saros.stf.test.stf.Constants; public class NonHostInvitesContactTest extends StfTestCase { @@ -69,7 +69,8 @@ public void AliceInvitesBobAndBobInvitesCarlTest() throws Exception { .newC() .javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, Constants.CLS1); - Util.buildSessionSequentially(Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB); + Util.setUpSessionWithJavaProject( + Constants.PROJECT1, SessionInvitationModality.SEQUENTIALLY, ALICE, BOB); assertTrue(BOB.superBot().views().sarosView().isInSession()); assertTrue(ALICE.superBot().views().sarosView().isInSession()); @@ -81,9 +82,11 @@ public void AliceInvitesBobAndBobInvitesCarlTest() throws Exception { BOB.superBot().views().sarosView().selectContact(CARL.getJID()).addToSarosSession(); + CARL.superBot().internal().createJavaProject(Constants.PROJECT1); + CARL.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT); - CARL.superBot().confirmShellAddProjectWithNewProject(Constants.PROJECT1); + CARL.superBot().confirmShellAddProjectUsingExistProject(Constants.PROJECT1); CARL.superBot() .views() @@ -104,7 +107,8 @@ public void CarlTypesAndEverybodyGetsCarlsTextTest() throws Exception { .newC() .javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, Constants.CLS1); - Util.buildSessionSequentially(Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB); + Util.setUpSessionWithJavaProject( + Constants.PROJECT1, SessionInvitationModality.SEQUENTIALLY, ALICE, BOB); assertTrue(BOB.superBot().views().sarosView().isInSession()); assertTrue(ALICE.superBot().views().sarosView().isInSession()); @@ -116,9 +120,11 @@ public void CarlTypesAndEverybodyGetsCarlsTextTest() throws Exception { BOB.superBot().views().sarosView().selectContact(CARL.getJID()).addToSarosSession(); + CARL.superBot().internal().createJavaProject(Constants.PROJECT1); + CARL.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT); - CARL.superBot().confirmShellAddProjectWithNewProject(Constants.PROJECT1); + CARL.superBot().confirmShellAddProjectUsingExistProject(Constants.PROJECT1); CARL.superBot() .views() @@ -175,7 +181,8 @@ public void NonHostBobInvitesCarlAndLeavesTest() throws Exception { .newC() .javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, Constants.CLS1); - Util.buildSessionSequentially(Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB); + Util.setUpSessionWithJavaProject( + Constants.PROJECT1, SessionInvitationModality.SEQUENTIALLY, ALICE, BOB); assertTrue(BOB.superBot().views().sarosView().isInSession()); assertTrue(ALICE.superBot().views().sarosView().isInSession()); @@ -187,9 +194,11 @@ public void NonHostBobInvitesCarlAndLeavesTest() throws Exception { BOB.superBot().views().sarosView().selectContact(CARL.getJID()).addToSarosSession(); + CARL.superBot().internal().createJavaProject(Constants.PROJECT1); + CARL.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT); - CARL.superBot().confirmShellAddProjectWithNewProject(Constants.PROJECT1); + CARL.superBot().confirmShellAddProjectUsingExistProject(Constants.PROJECT1); CARL.superBot() .views() diff --git a/stf.test/test/saros/stf/test/invitation/ParallelInvitationWithTerminationByHostTest.java b/stf.test/test/saros/stf/test/invitation/ParallelInvitationWithTerminationByHostTest.java index 25d5580a2a..8bf3b10d26 100644 --- a/stf.test/test/saros/stf/test/invitation/ParallelInvitationWithTerminationByHostTest.java +++ b/stf.test/test/saros/stf/test/invitation/ParallelInvitationWithTerminationByHostTest.java @@ -5,7 +5,7 @@ import static saros.stf.client.tester.SarosTester.CARL; import static saros.stf.client.tester.SarosTester.DAVE; import static saros.stf.shared.Constants.ACCEPT; -import static saros.stf.shared.Constants.SHELL_ADD_PROJECTS; +import static saros.stf.shared.Constants.SHELL_ADD_RESOURCES; import static saros.stf.shared.Constants.SHELL_INVITATION_CANCELED; import static saros.stf.shared.Constants.SHELL_SESSION_INVITATION; @@ -106,9 +106,9 @@ public void parallelInvitationWithTerminationByHost() DAVE.remoteBot().shell(SHELL_SESSION_INVITATION).activate(); DAVE.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT); - CARL.remoteBot().waitLongUntilShellIsOpen(SHELL_ADD_PROJECTS); + CARL.remoteBot().waitLongUntilShellIsOpen(SHELL_ADD_RESOURCES); - DAVE.remoteBot().waitLongUntilShellIsOpen(SHELL_ADD_PROJECTS); + DAVE.remoteBot().waitLongUntilShellIsOpen(SHELL_ADD_RESOURCES); // stop the session diff --git a/stf.test/test/saros/stf/test/invitation/Share2UsersSequentiallyTest.java b/stf.test/test/saros/stf/test/invitation/Share2UsersSequentiallyTest.java index 1eba75e9e5..5b6ca74347 100644 --- a/stf.test/test/saros/stf/test/invitation/Share2UsersSequentiallyTest.java +++ b/stf.test/test/saros/stf/test/invitation/Share2UsersSequentiallyTest.java @@ -10,7 +10,7 @@ import saros.session.User.Permission; import saros.stf.client.StfTestCase; import saros.stf.client.util.Util; -import saros.stf.shared.Constants.TypeOfCreateProject; +import saros.stf.shared.Constants.SessionInvitationModality; import saros.stf.test.stf.Constants; public class Share2UsersSequentiallyTest extends StfTestCase { @@ -45,7 +45,8 @@ public void testAliceShareProjectWithBobSequentially() throws Exception { .newC() .javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, Constants.CLS1); - Util.buildSessionSequentially(Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB); + Util.setUpSessionWithJavaProject( + Constants.PROJECT1, SessionInvitationModality.SEQUENTIALLY, ALICE, BOB); assertTrue(BOB.superBot().views().sarosView().isInSession()); assertTrue(ALICE.superBot().views().sarosView().isInSession()); diff --git a/stf.test/test/saros/stf/test/invitation/Share3UsersConcurrentlyTest.java b/stf.test/test/saros/stf/test/invitation/Share3UsersConcurrentlyTest.java index 3c51e1ce5c..ab1837bfbc 100644 --- a/stf.test/test/saros/stf/test/invitation/Share3UsersConcurrentlyTest.java +++ b/stf.test/test/saros/stf/test/invitation/Share3UsersConcurrentlyTest.java @@ -11,7 +11,7 @@ import saros.session.User.Permission; import saros.stf.client.StfTestCase; import saros.stf.client.util.Util; -import saros.stf.shared.Constants.TypeOfCreateProject; +import saros.stf.shared.Constants.SessionInvitationModality; import saros.stf.test.stf.Constants; public class Share3UsersConcurrentlyTest extends StfTestCase { @@ -57,8 +57,8 @@ public void testShareProjectConcurrently() throws Exception, InterruptedExceptio .tree() .newC() .javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, Constants.CLS1); - Util.buildSessionConcurrently( - Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB, CARL); + Util.setUpSessionWithJavaProject( + Constants.PROJECT1, SessionInvitationModality.CONCURRENTLY, ALICE, BOB, CARL); BOB.superBot() .views() diff --git a/stf.test/test/saros/stf/test/invitation/Share3UsersLeavingSessionTest.java b/stf.test/test/saros/stf/test/invitation/Share3UsersLeavingSessionTest.java index 3f18e5357d..0cb5ffece4 100644 --- a/stf.test/test/saros/stf/test/invitation/Share3UsersLeavingSessionTest.java +++ b/stf.test/test/saros/stf/test/invitation/Share3UsersLeavingSessionTest.java @@ -14,7 +14,7 @@ import org.junit.Test; import saros.stf.client.StfTestCase; import saros.stf.client.util.Util; -import saros.stf.shared.Constants.TypeOfCreateProject; +import saros.stf.shared.Constants.SessionInvitationModality; import saros.stf.test.stf.Constants; public class Share3UsersLeavingSessionTest extends StfTestCase { @@ -54,7 +54,8 @@ public void testShare3UsersLeavingSession() throws Exception { .newC() .javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, Constants.CLS1); - Util.buildSessionSequentially(Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB); + Util.setUpSessionWithJavaProject( + Constants.PROJECT1, SessionInvitationModality.SEQUENTIALLY, ALICE, BOB); assertTrue(BOB.superBot().views().sarosView().isInSession()); assertTrue(ALICE.superBot().views().sarosView().isInSession()); diff --git a/stf.test/test/saros/stf/test/invitation/Share3UsersSequentiallyTest.java b/stf.test/test/saros/stf/test/invitation/Share3UsersSequentiallyTest.java index 851d027e0a..ae4b6cb9e5 100644 --- a/stf.test/test/saros/stf/test/invitation/Share3UsersSequentiallyTest.java +++ b/stf.test/test/saros/stf/test/invitation/Share3UsersSequentiallyTest.java @@ -11,7 +11,7 @@ import saros.session.User.Permission; import saros.stf.client.StfTestCase; import saros.stf.client.util.Util; -import saros.stf.shared.Constants.TypeOfCreateProject; +import saros.stf.shared.Constants.SessionInvitationModality; import saros.stf.test.stf.Constants; public class Share3UsersSequentiallyTest extends StfTestCase { @@ -57,8 +57,8 @@ public void testShareProject3UsersSequentially() throws Exception, InterruptedEx .newC() .javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, Constants.CLS1); - Util.buildSessionSequentially( - Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, CARL, BOB); + Util.setUpSessionWithJavaProject( + Constants.PROJECT1, SessionInvitationModality.SEQUENTIALLY, ALICE, CARL, BOB); BOB.superBot() .views() diff --git a/stf.test/test/saros/stf/test/invitation/ShareProjectWizardUITest.java b/stf.test/test/saros/stf/test/invitation/ShareProjectWizardUITest.java index fba0bde6f2..6ddce26364 100644 --- a/stf.test/test/saros/stf/test/invitation/ShareProjectWizardUITest.java +++ b/stf.test/test/saros/stf/test/invitation/ShareProjectWizardUITest.java @@ -5,7 +5,7 @@ import static saros.stf.shared.Constants.MENU_SAROS; import static saros.stf.shared.Constants.ResourceSelectionComposite_delete_dialog_title; import static saros.stf.shared.Constants.ResourceSelectionComposite_overwrite_dialog_title; -import static saros.stf.shared.Constants.SHARE_PROJECTS; +import static saros.stf.shared.Constants.SHARE_RESOURCES; import static saros.stf.shared.Constants.SHELL_SHARE_PROJECT; import static saros.stf.shared.Constants.YES; @@ -105,7 +105,7 @@ protected IRemoteBotTreeItem getClass(String name) throws RemoteException { @Test public void testShareProjectsUndoRedo() throws Exception { ALICE.remoteBot().activateWorkbench(); - ALICE.remoteBot().menu(MENU_SAROS).menu(SHARE_PROJECTS).click(); + ALICE.remoteBot().menu(MENU_SAROS).menu(SHARE_RESOURCES).click(); ALICE.remoteBot().shell(SHELL_SHARE_PROJECT).activate(); assertNoneChecked(); @@ -131,7 +131,7 @@ public void testShareProjectsUndoRedo() throws Exception { @Test public void testShareProjectsRestoreSelection() throws Exception { ALICE.remoteBot().activateWorkbench(); - ALICE.remoteBot().menu(MENU_SAROS).menu(SHARE_PROJECTS).click(); + ALICE.remoteBot().menu(MENU_SAROS).menu(SHARE_RESOURCES).click(); ALICE.remoteBot().shell(SHELL_SHARE_PROJECT).activate(); // unselect all.. diff --git a/stf.test/test/saros/stf/test/session/ShareMultipleProjectsTest.java b/stf.test/test/saros/stf/test/session/ShareMultipleProjectsTest.java index 1bfbe05a67..508fbdf104 100644 --- a/stf.test/test/saros/stf/test/session/ShareMultipleProjectsTest.java +++ b/stf.test/test/saros/stf/test/session/ShareMultipleProjectsTest.java @@ -4,7 +4,7 @@ import static saros.stf.client.tester.SarosTester.ALICE; import static saros.stf.client.tester.SarosTester.BOB; import static saros.stf.client.tester.SarosTester.CARL; -import static saros.stf.shared.Constants.ADD_PROJECTS; +import static saros.stf.shared.Constants.ADD_RESOURCES; import static saros.stf.shared.Constants.CANCEL; import static saros.stf.shared.Constants.MENU_SAROS; import static saros.stf.shared.Constants.SHELL_ADD_PROJECTS_TO_SESSION; @@ -17,7 +17,7 @@ import saros.stf.client.StfTestCase; import saros.stf.client.util.Util; import saros.stf.server.rmi.remotebot.widget.IRemoteBotShell; -import saros.stf.shared.Constants.TypeOfCreateProject; +import saros.stf.shared.Constants.SessionInvitationModality; public class ShareMultipleProjectsTest extends StfTestCase { @@ -63,19 +63,20 @@ public void afterEveryTest() throws Exception { @Test public void testShareMultipleWithBobAndCarlSequencetially() throws Exception { - Util.buildSessionConcurrently("foo", TypeOfCreateProject.NEW_PROJECT, ALICE, BOB, CARL); + Util.setUpSessionWithJavaProject( + "foo", SessionInvitationModality.CONCURRENTLY, ALICE, BOB, CARL); BOB.superBot().views().packageExplorerView().waitUntilClassExists("foo", "bar", "HelloAlice"); CARL.superBot().views().packageExplorerView().waitUntilClassExists("foo", "bar", "HelloAlice"); - Util.addProjectToSessionSequentially("foo1", TypeOfCreateProject.NEW_PROJECT, ALICE, BOB, CARL); + Util.addJavaProjectToSessionSequentially("foo1", ALICE, BOB, CARL); BOB.superBot().views().packageExplorerView().waitUntilClassExists("foo1", "bar", "HelloBob"); CARL.superBot().views().packageExplorerView().waitUntilClassExists("foo1", "bar", "HelloBob"); - Util.addProjectToSessionSequentially("foo2", TypeOfCreateProject.NEW_PROJECT, ALICE, BOB, CARL); + Util.addJavaProjectToSessionSequentially("foo2", ALICE, BOB, CARL); BOB.superBot().views().packageExplorerView().waitUntilClassExists("foo2", "bar", "HelloCarl"); @@ -85,10 +86,11 @@ public void testShareMultipleWithBobAndCarlSequencetially() throws Exception { @Test public void testShareSameProjectTwice() throws Exception { - Util.buildSessionConcurrently("foo", TypeOfCreateProject.NEW_PROJECT, ALICE, BOB, CARL); + Util.setUpSessionWithJavaProject( + "foo", SessionInvitationModality.CONCURRENTLY, ALICE, BOB, CARL); ALICE.remoteBot().activateWorkbench(); - ALICE.remoteBot().menu(MENU_SAROS).menu(ADD_PROJECTS).click(); + ALICE.remoteBot().menu(MENU_SAROS).menu(ADD_RESOURCES).click(); IRemoteBotShell shell = ALICE.remoteBot().shell(SHELL_ADD_PROJECTS_TO_SESSION); shell.activate(); diff --git a/stf/src/saros/stf/client/util/Util.java b/stf/src/saros/stf/client/util/Util.java index 58deabba60..251b614d4b 100644 --- a/stf/src/saros/stf/client/util/Util.java +++ b/stf/src/saros/stf/client/util/Util.java @@ -8,7 +8,6 @@ import java.rmi.RemoteException; import java.util.ArrayList; import java.util.List; -import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; @@ -17,6 +16,7 @@ import org.eclipse.swtbot.swt.finder.widgets.TimeoutException; import saros.net.xmpp.JID; import saros.stf.client.tester.AbstractTester; +import saros.stf.shared.Constants.SessionInvitationModality; import saros.stf.shared.Constants.TypeOfCreateProject; public class Util { @@ -59,17 +59,24 @@ public static void openSarosView(AbstractTester tester) throws RemoteException { /** * A convenient function to quickly build a session with a project and a file. The project is - * created by this method so it must not exist before. The invitiees are invited + * created by this method so it must not exist before. The invitees are invited * concurrently. * - *

Note: there is no guarantee that the project and its files are already shared after - * this method returns + *

Note: This method does not enforce that the project nature on the inviter's side is + * correctly applied on the invitee's side. As a result, it is only supported for cases where the + * project nature is not of interest. In cases where the same project nature is required on all + * sides (e.g. if Java language support is needed), please use {@link + * #setUpSessionWithJavaProjectAndClass(String, String, String, AbstractTester, + * AbstractTester...)} instead. + * + *

Note: There is no guarantee that the project and its files are already shared after + * this method returns. * * @param projectName the name of the project - * @param path the path of the file e.g. foo/bar/readme.txt + * @param path the path of the file, e.g. foo/bar/readme.txt * @param content the content of the file - * @param inviter e.g. ALICE - * @param invitees e.g. BOB, CARL + * @param inviter the inviting test user, e.g. ALICE + * @param invitees the invited test user(s), e.g. BOB, CARL * @throws IllegalStateException if the inviter or one of the invitee is not connected or is * already in a session * @throws Exception for any other (internal) failure @@ -89,19 +96,63 @@ public static void setUpSessionWithProjectAndFile( buildSessionConcurrently(projectName, TypeOfCreateProject.NEW_PROJECT, inviter, invitees); } + /** + * A convenient function to quickly build a session with a java project. The project is created by + * this method so it must not exist before. The invitees are invited using the given + * modality. + * + *

Note: There is no guarantee that the project and its files are already shared after + * this method returns. + * + * @param projectName the name of the project + * @param sessionInvitationModality the session invitation modality to use + * @param inviter the inviting test user, e.g. ALICE + * @param invitees the invited test user(s), e.g. BOB, CARL + * @throws IllegalStateException if the inviter or one of the invitees is not connected or is + * already in a session + * @throws Exception for any other (internal) failure + */ + public static void setUpSessionWithJavaProject( + String projectName, + SessionInvitationModality sessionInvitationModality, + AbstractTester inviter, + AbstractTester... invitees) + throws Exception { + + assertStates(true, false, inviter, invitees); + + for (AbstractTester invitee : invitees) { + invitee.superBot().internal().createJavaProject(projectName); + } + + switch (sessionInvitationModality) { + case CONCURRENTLY: + buildSessionConcurrently(projectName, TypeOfCreateProject.EXIST_PROJECT, inviter, invitees); + break; + + case SEQUENTIALLY: + buildSessionSequentially(projectName, TypeOfCreateProject.EXIST_PROJECT, inviter, invitees); + break; + + default: + throw new IllegalArgumentException( + "Encountered unhandled session invitation modality " + sessionInvitationModality); + } + } + /** * A convenient function to quickly build a session with a java project and a class. The project - * is created by this method so it must not exist before. The invitiees are invited + * is created by this method so it must not exist before. The invitees are invited * concurrently. * - *

Note: there is no guarantee that the project and its files are already shared after - * this method returns + *

Note: There is no guarantee that the project and its files are already shared after + * this method returns. * * @param projectName the name of the project * @param packageName the name of the package * @param className the name of the class without .java or .class suffix - * @param inviter e.g. ALICE - * @param invitees e.g. BOB, CARL + * @param inviter the inviting test user, e.g. ALICE + * @param invitees the invited test user(s), e.g. BOB, CARL * @throws IllegalStateException if the inviter or one of the invitee is not connected or is * already in a session * @throws Exception for any other (internal) failure @@ -119,34 +170,11 @@ public static void setUpSessionWithJavaProjectAndClass( inviter.superBot().internal().createJavaProject(projectName); inviter.superBot().internal().createJavaClass(projectName, packageName, className); - buildSessionConcurrently(projectName, TypeOfCreateProject.NEW_PROJECT, inviter, invitees); - } + for (AbstractTester invitee : invitees) { + invitee.superBot().internal().createJavaProject(projectName); + } - public static void setUpSessionWithJavaProjects( - Map> projectsPkgsClasses, - AbstractTester inviter, - AbstractTester... invitees) { - - throw new UnsupportedOperationException("not yet implemented"); - // List createdProjects = new ArrayList(); - // - // for (Iterator i = projectsPkgsClasses.keySet().iterator(); i - // .hasNext();) { - // String key = i.next(); - // if (!createdProjects.contains(key)) { - // createdProjects.add(key); - // inviter.superBot().views().packageExplorerView().tree().newC() - // .javaProject(key); - // List pkgAndclass = projectsPkgsClasses.get(key); - // inviter.superBot().views().packageExplorerView() - // .selectPkg(key, pkgAndclass.get(0)).newC() - // .cls(key, pkgAndclass.get(0), pkgAndclass.get(1)); - // } - // } - - // buildSessionConcurrently(projectName, - // TypeOfCreateProject.NEW_PROJECT, - // inviter, invitees); + buildSessionConcurrently(projectName, TypeOfCreateProject.EXIST_PROJECT, inviter, invitees); } /** @@ -171,17 +199,25 @@ public static void createProjectWithEmptyFile( * Adds a project to the current session. This is done sequentially, so the project is send to the * invitees one after another. * + *

Note: The creation type {@link TypeOfCreateProject#NEW_PROJECT} does not enforce that + * the project nature on the inviter's side is correctly applied on the invitee's side. As a + * result, it is only supported for cases where the project nature is not of interest. In cases + * where the same project nature is necessary on all sides (e.g. if Java language support is + * needed), please use {@link TypeOfCreateProject#EXIST_PROJECT}. For Java projects, the utility + * method {@link #addJavaProjectToSessionSequentially(String, AbstractTester, AbstractTester...)} + * can be used for this purpose. + * *

Note: Adding a project that is already shared or does not exist results in unexpected * behavior. * - *

Note: there is no guarantee that the project and its files are already shared after - * this method returns + *

Note: There is no guarantee that the project and its files are already shared after + * this method returns. * * @param projectName the name of the project * @param projectType the type of project that should be used on the invitee side e.g new, use * existing ... - * @param inviter e.g. ALICE - * @param invitees e.g. BOB, CARL + * @param inviter the inviting test user, e.g. ALICE + * @param invitees the invited test user(s), e.g. BOB, CARL * @throws IllegalStateException if the inviter or one of the invitee is not connected or is not * in a session * @throws Exception for any other (internal) failure @@ -203,111 +239,114 @@ public static void addProjectToSessionSequentially( } /** - * Establish a Saros session with the given invitees. Every invitee is invited one bye one. + * Adds a project to the current session. This is done sequentially, so the project is send to the + * invitees one after another. * - *

Note: Establishing session with a project that is already shared or does not exist - * results in unexpected behavior. + *

The projects to add is created on the invitee's side as part of this process. It must + * not already exist on the invitee's side. Adding a project that already exists on the + * invitee's side or is already shared results in unexpected behavior. * - *

Note: there is no guarantee that the project and its files are already shared after - * this method returns + *

Note: There is no guarantee that the project and its files are already shared after + * this method returns. * - * @param projectName the name of the project to share - * @param projectType the type of project that should be used on the invitee side e.g new, use - * existing ... - * @param inviter e.g. ALICE - * @param invitees e.g. BOB, CARL - * @throws IllegalStateException if the inviter or one of the invitee is not connected or is - * already in a session + * @param projectName the name of the project + * @param inviter the inviting test user, e.g. ALICE + * @param invitees the invited test user(s), e.g. BOB, CARL + * @throws IllegalStateException if the inviter or one of the invitee is not connected or is not + * in a session * @throws Exception for any other (internal) failure */ - public static void buildSessionSequentially( - String projectName, - TypeOfCreateProject projectType, - AbstractTester inviter, - AbstractTester... invitees) - throws Exception { + public static void addJavaProjectToSessionSequentially( + String projectName, AbstractTester inviter, AbstractTester... invitees) throws Exception { - assertStates(true, false, inviter, invitees); + assertStates(true, true, inviter, invitees); - JID[] inviteesJID = getJID(invitees); + for (AbstractTester invitee : invitees) { + invitee.superBot().internal().createJavaProject(projectName); + } - inviter.superBot().menuBar().saros().shareProjects(projectName, inviteesJID); + inviter.superBot().menuBar().saros().addProjects(projectName); for (AbstractTester invitee : invitees) { - invitee.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT); - invitee.superBot().confirmShellAddProjectUsingWhichProject(projectName, projectType); + invitee + .superBot() + .confirmShellAddProjectUsingWhichProject(projectName, TypeOfCreateProject.EXIST_PROJECT); } } /** - * Establish a Saros session with the given invitees. All invitees are invited simultaneously. + * Establish a Saros session with the given invitees. Every invitee is invited one bye one. + * + *

Note: The creation type {@link TypeOfCreateProject#NEW_PROJECT} does not enforce that + * the project nature on the inviter's side is correctly applied on the invitee's side. As a + * result, it is only supported for cases where the project nature is not of interest. In cases + * where the same project nature is necessary on all sides (e.g. if Java language support is + * needed), please use {@link TypeOfCreateProject#EXIST_PROJECT}. For Java projects, the utility + * method {@link #setUpSessionWithJavaProject(String, SessionInvitationModality, AbstractTester, + * AbstractTester...)} can be used for this purpose. * *

Note: Establishing session with a project that is already shared or does not exist * results in unexpected behavior. * - *

Note: there is no guarantee that the project and its files are already shared after - * this method returns + *

Note: There is no guarantee that the project and its files are already shared after + * this method returns. * * @param projectName the name of the project to share * @param projectType the type of project that should be used on the invitee side e.g new, use * existing ... - * @param inviter e.g. ALICE - * @param invitees e.g. BOB, CARL + * @param inviter the inviting test user, e.g. ALICE + * @param invitees the invited test user(s), e.g. BOB, CARL * @throws IllegalStateException if the inviter or one of the invitee is not connected or is * already in a session * @throws Exception for any other (internal) failure */ - public static void buildSessionConcurrently( - final String projectName, - final TypeOfCreateProject projectType, + public static void buildSessionSequentially( + String projectName, + TypeOfCreateProject projectType, AbstractTester inviter, AbstractTester... invitees) throws Exception { assertStates(true, false, inviter, invitees); - inviter.superBot().menuBar().saros().shareProjects(projectName, Util.getJID(invitees)); + JID[] inviteesJID = getJID(invitees); - List> joinSessionTasks = new ArrayList>(); - for (final AbstractTester invitee : invitees) { - joinSessionTasks.add( - new Callable() { - @Override - public Void call() throws Exception { - invitee - .superBot() - .confirmShellSessionInvitationAndShellAddProject(projectName, projectType); - return null; - } - }); - } + inviter.superBot().menuBar().saros().shareProjects(projectName, inviteesJID); - workAll(joinSessionTasks); + for (AbstractTester invitee : invitees) { + invitee.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT); + invitee.superBot().confirmShellAddProjectUsingWhichProject(projectName, projectType); + } } /** - * Establish a Saros session with specific files of a project. All invitees are invited - * simultaneously. + * Establish a Saros session with the given invitees. All invitees are invited simultaneously. + * + *

Note: The creation type {@link TypeOfCreateProject#NEW_PROJECT} does not enforce that + * the project nature on the inviter's side is correctly applied on the invitee's side. As a + * result, it is only supported for cases where the project nature is not of interest. In cases + * where the same project nature is necessary on all sides (e.g. if Java language support is + * needed), please use {@link TypeOfCreateProject#EXIST_PROJECT}. For Java projects, the utility + * method {@link #setUpSessionWithJavaProject(String, SessionInvitationModality, AbstractTester, + * AbstractTester...)} can be used for this purpose. * *

Note: Establishing session with a project that is already shared or does not exist * results in unexpected behavior. * - *

Note: there is no guarantee that the project and its files are already shared after - * this method returns + *

Note: There is no guarantee that the project and its files are already shared after + * this method returns. * * @param projectName the name of the project to share - * @param files the files of the project to share * @param projectType the type of project that should be used on the invitee side e.g new, use * existing ... - * @param inviter e.g. ALICE - * @param invitees e.g. BOB, CARL + * @param inviter the inviting test user, e.g. ALICE + * @param invitees the invited test user(s), e.g. BOB, CARL * @throws IllegalStateException if the inviter or one of the invitee is not connected or is * already in a session * @throws Exception for any other (internal) failure */ - public static void buildFileSessionConcurrently( + public static void buildSessionConcurrently( final String projectName, - String[] files, final TypeOfCreateProject projectType, AbstractTester inviter, AbstractTester... invitees) @@ -315,11 +354,7 @@ public static void buildFileSessionConcurrently( assertStates(true, false, inviter, invitees); - inviter - .superBot() - .menuBar() - .saros() - .shareProjectFiles(projectName, files, Util.getJID(invitees)); + inviter.superBot().menuBar().saros().shareProjects(projectName, Util.getJID(invitees)); List> joinSessionTasks = new ArrayList>(); for (final AbstractTester invitee : invitees) { @@ -438,8 +473,14 @@ public static void removeTestersFromContactList(AbstractTester tester, AbstractT /** * Adds testers to the current session. * - *

Note: there is no guarantee that the project and its files are already shared after - * this method returns + *

Note: The creation type {@link TypeOfCreateProject#NEW_PROJECT} does not enforce that + * the project nature on the inviter's side is correctly applied on the invitee's side. As a + * result, it is only supported for cases where the project nature is not of interest. In cases + * where the same project nature is necessary on all sides (e.g. if Java language support is + * needed), please use {@link TypeOfCreateProject#EXIST_PROJECT}. + * + *

Note: There is no guarantee that the project and its files are already shared after + * this method returns. * * @param projectName the name of the project which must be shared in the current session * @param projectType the type of project that should be used on the invitee side e.g new, use diff --git a/stf/src/saros/stf/server/rmi/superbot/ISuperBot.java b/stf/src/saros/stf/server/rmi/superbot/ISuperBot.java index eedc77e8f1..6b9c6e6196 100644 --- a/stf/src/saros/stf/server/rmi/superbot/ISuperBot.java +++ b/stf/src/saros/stf/server/rmi/superbot/ISuperBot.java @@ -36,15 +36,21 @@ public interface ISuperBot extends Remote { */ /** - * The shell with the title {@link StfRemoteObject#SHELL_ADD_PROJECTS} should be appeared by the + * The shell with the title {@link StfRemoteObject#SHELL_ADD_RESOURCES} should be appeared by the * invitees' side during sharing session. This method confirm the shell using a new project. * + *

Note: This method does not enforce that the project nature on the inviter's side is + * correctly applied on the invitee's side. As a result, it is only supported for cases where the + * project nature is not of interest. In cases where the same project nature is required on all + * sides (e.g. if Java language support is needed), please use {@link + * #confirmShellAddProjectUsingExistProject(String)} instead. + * * @throws RemoteException */ - public void confirmShellAddProjectWithNewProject(String projectname) throws RemoteException; + public void confirmShellAddProjectWithNewProject(String projectName) throws RemoteException; /** - * The shell with the title {@link StfRemoteObject#SHELL_ADD_PROJECTS} should be appeared by the + * The shell with the title {@link StfRemoteObject#SHELL_ADD_RESOURCES} should be appeared by the * invitees' side during sharing session. This method confirm the shell using an existed project. * * @throws RemoteException @@ -52,7 +58,7 @@ public interface ISuperBot extends Remote { public void confirmShellAddProjectUsingExistProject(String projectName) throws RemoteException; /** - * The shell with the title {@link StfRemoteObject#SHELL_ADD_PROJECTS} should be appeared by the + * The shell with the title {@link StfRemoteObject#SHELL_ADD_RESOURCES} should be appeared by the * invitees' side during sharing session. This method confirm the shell using an existed project * with copy. * @@ -62,10 +68,16 @@ public void confirmShellAddProjectUsingExistProjectWithCopy(String projectName) throws RemoteException; /** - * The shell with the title {@link StfRemoteObject#SHELL_ADD_PROJECTS} should be appeared by the + * The shell with the title {@link StfRemoteObject#SHELL_ADD_RESOURCES} should be appeared by the * invitees' side during sharing session. This method confirm the shell. with the passed parameter * "usingWhichProject" to decide using which project. * + *

Note: The type {@link TypeOfCreateProject#NEW_PROJECT} does not enforce that the + * project nature on the inviter's side is correctly applied on the invitee's side. As a result, + * it is only supported for cases where the project nature is not of interest. In cases where the + * same project nature is necessary on all sides (e.g. if Java language support is needed), please + * use {@link TypeOfCreateProject#EXIST_PROJECT}. + * * @throws RemoteException */ public void confirmShellAddProjectUsingWhichProject( @@ -155,7 +167,13 @@ public void confirmShellAddProjectToSession(String project, String[] files) /** * confirm the shell with title {@link StfRemoteObject#SHELL_SESSION_INVITATION} and also the - * following shell with title {@link StfRemoteObject#SHELL_ADD_PROJECTS} + * following shell with title {@link StfRemoteObject#SHELL_ADD_RESOURCES} + * + *

Note: The type {@link TypeOfCreateProject#NEW_PROJECT} does not enforce that the + * project nature on the inviter's side is correctly applied on the invitee's side. As a result, + * it is only supported for cases where the project nature is not of interest. In cases where the + * same project nature is necessary on all sides (e.g. if Java language support is needed), please + * use {@link TypeOfCreateProject#EXIST_PROJECT}. * * @param projectName the name of shared project * @param usingWhichProject if invitee has same project locally, he can decide use new or existed diff --git a/stf/src/saros/stf/server/rmi/superbot/component/contextmenu/sarosview/impl/ContextMenusInSessionArea.java b/stf/src/saros/stf/server/rmi/superbot/component/contextmenu/sarosview/impl/ContextMenusInSessionArea.java index f4899ddbac..ed6ca191d8 100644 --- a/stf/src/saros/stf/server/rmi/superbot/component/contextmenu/sarosview/impl/ContextMenusInSessionArea.java +++ b/stf/src/saros/stf/server/rmi/superbot/component/contextmenu/sarosview/impl/ContextMenusInSessionArea.java @@ -150,11 +150,11 @@ public void addProjects(String... projectNames) throws RemoteException { SWTBotTreeItem treeItem = getTreeItem(); - log.trace("clicking on context menu item: " + ADD_PROJECTS); + log.trace("clicking on context menu item: " + ADD_RESOURCES); try { treeItem.select(); - ContextMenuHelper.clickContextMenu(tree, ADD_PROJECTS); + ContextMenuHelper.clickContextMenu(tree, ADD_RESOURCES); } catch (RuntimeException e) { logError(log, e, tree, treeItem); throw e; @@ -185,11 +185,11 @@ public void shareProjects(String projectName, JID... jids) throws RemoteExceptio SWTBotTreeItem treeItem = getTreeItem(); - log.trace("clicking on context menu item: " + SHARE_PROJECTS); + log.trace("clicking on context menu item: " + SHARE_RESOURCES); try { treeItem.select(); - ContextMenuHelper.clickContextMenu(tree, SHARE_PROJECTS); + ContextMenuHelper.clickContextMenu(tree, SHARE_RESOURCES); } catch (RuntimeException e) { logError(log, e, tree, treeItem); throw e; diff --git a/stf/src/saros/stf/server/rmi/superbot/component/contextmenu/sarosview/submenu/impl/WorkTogetherOnContextMenu.java b/stf/src/saros/stf/server/rmi/superbot/component/contextmenu/sarosview/submenu/impl/WorkTogetherOnContextMenu.java index 4f1798c535..e43f23fa07 100644 --- a/stf/src/saros/stf/server/rmi/superbot/component/contextmenu/sarosview/submenu/impl/WorkTogetherOnContextMenu.java +++ b/stf/src/saros/stf/server/rmi/superbot/component/contextmenu/sarosview/submenu/impl/WorkTogetherOnContextMenu.java @@ -33,7 +33,7 @@ public void setTreeItem(SWTBotTreeItem treeItem) { public void multipleProjects(String projectName, JID... baseJIDOfInvitees) throws RemoteException { treeItem.select(); - ContextMenuHelper.clickContextMenu(tree, CM_WORK_TOGETHER_ON, CM_MULTIPLE_PROJECTS); + ContextMenuHelper.clickContextMenu(tree, CM_WORK_TOGETHER_ON, CM_MULTIPLE_RESOURCE_ROOTS); SuperBot.getInstance().confirmShellShareProjects(projectName, baseJIDOfInvitees); } diff --git a/stf/src/saros/stf/server/rmi/superbot/component/menubar/menu/impl/SarosMenu.java b/stf/src/saros/stf/server/rmi/superbot/component/menubar/menu/impl/SarosMenu.java index 36d32febae..ebde88ffc3 100644 --- a/stf/src/saros/stf/server/rmi/superbot/component/menubar/menu/impl/SarosMenu.java +++ b/stf/src/saros/stf/server/rmi/superbot/component/menubar/menu/impl/SarosMenu.java @@ -49,7 +49,7 @@ public void addContactsToSession(String... jidOfInvitees) throws RemoteException @Override public void shareProjects(String projectName, JID... jids) throws RemoteException { RemoteWorkbenchBot.getInstance().activateWorkbench(); - menu.menu(SHARE_PROJECTS).click(); + menu.menu(SHARE_RESOURCES).click(); SuperBot.getInstance().confirmShellShareProjects(projectName, jids); } @@ -57,28 +57,28 @@ public void shareProjects(String projectName, JID... jids) throws RemoteExceptio public void shareProjectFiles(String project, String[] files, JID... jids) throws RemoteException { RemoteWorkbenchBot.getInstance().activateWorkbench(); - menu.menu(SHARE_PROJECTS).click(); + menu.menu(SHARE_RESOURCES).click(); SuperBot.getInstance().confirmShellShareProjectFiles(project, files, jids); } @Override public void shareProjects(String[] projectNames, JID... jids) throws RemoteException { RemoteWorkbenchBot.getInstance().activateWorkbench(); - menu.menu(SHARE_PROJECTS).click(); + menu.menu(SHARE_RESOURCES).click(); SuperBot.getInstance().confirmShellShareProjects(projectNames, jids); } @Override public void addProject(String project, String[] files) throws RemoteException { RemoteWorkbenchBot.getInstance().activateWorkbench(); - menu.menu(ADD_PROJECTS).click(); + menu.menu(ADD_RESOURCES).click(); SuperBot.getInstance().confirmShellAddProjectToSession(project, files); } @Override public void addProjects(String... projectNames) throws RemoteException { RemoteWorkbenchBot.getInstance().activateWorkbench(); - menu.menu(ADD_PROJECTS).click(); + menu.menu(ADD_RESOURCES).click(); SuperBot.getInstance().confirmShellAddProjectsToSession(projectNames); } diff --git a/stf/src/saros/stf/server/rmi/superbot/impl/SuperBot.java b/stf/src/saros/stf/server/rmi/superbot/impl/SuperBot.java index dd291a6c4e..f86e8a0aef 100644 --- a/stf/src/saros/stf/server/rmi/superbot/impl/SuperBot.java +++ b/stf/src/saros/stf/server/rmi/superbot/impl/SuperBot.java @@ -6,10 +6,7 @@ import java.util.List; import java.util.regex.Pattern; import org.eclipse.jface.wizard.WizardDialog; -import org.eclipse.swt.widgets.Button; import org.eclipse.swtbot.swt.finder.SWTBot; -import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable; -import org.eclipse.swtbot.swt.finder.results.VoidResult; import org.eclipse.swtbot.swt.finder.waits.Conditions; import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree; @@ -63,13 +60,13 @@ public void confirmShellAddProjectWithNewProject(String projectName) throws Remo SWTBot bot = new SWTBot(); bot.waitUntil( - Conditions.shellIsActive(SHELL_ADD_PROJECTS), SarosSWTBotPreferences.SAROS_LONG_TIMEOUT); + Conditions.shellIsActive(SHELL_ADD_RESOURCES), SarosSWTBotPreferences.SAROS_LONG_TIMEOUT); - SWTBotShell shell = bot.shell(SHELL_ADD_PROJECTS); + SWTBotShell shell = bot.shell(SHELL_ADD_RESOURCES); shell.activate(); shell.bot().radio(RADIO_CREATE_NEW_PROJECT).click(); - shell.bot().textWithLabel("Project name", 0).setText(projectName); + shell.bot().textWithLabel(LABEL_NEW_PROJECT_NAME, 0).setText(projectName); shell.bot().button(FINISH).click(); shell.bot().waitUntil(Conditions.shellCloses(shell)); } @@ -78,26 +75,13 @@ public void confirmShellAddProjectWithNewProject(String projectName) throws Remo public void confirmShellAddProjectUsingExistProject(String projectName) throws RemoteException { SWTBot bot = new SWTBot(); bot.waitUntil( - Conditions.shellIsActive(SHELL_ADD_PROJECTS), SarosSWTBotPreferences.SAROS_LONG_TIMEOUT); + Conditions.shellIsActive(SHELL_ADD_RESOURCES), SarosSWTBotPreferences.SAROS_LONG_TIMEOUT); - SWTBotShell shell = bot.shell(SHELL_ADD_PROJECTS); + SWTBotShell shell = bot.shell(SHELL_ADD_RESOURCES); shell.activate(); - // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=344484 - // FIXME fix the bug in the SWTBot Framework, do not use a workaround - final Button radioButton = shell.bot().radio(RADIO_CREATE_NEW_PROJECT).widget; - - UIThreadRunnable.syncExec( - new VoidResult() { - - @Override - public void run() { - radioButton.setSelection(false); - } - }); - - shell.bot().radio(RADIO_USING_EXISTING_PROJECT).click(); - shell.bot().textWithLabel("Project name", 1).setText(projectName); + shell.bot().radio(RADIO_USING_EXISTING_DIRECTORY).click(); + shell.bot().textWithLabel(LABEL_EXISTING_DIRECTORY_PATH, 0).setText(projectName); shell.bot().button(FINISH).click(); // prevent STF from entering an endless loop @@ -136,9 +120,9 @@ public void confirmShellAddProjectUsingExistProjectWithCopy(String projectName) SWTBot bot = new SWTBot(); bot.waitUntil( - Conditions.shellIsActive(SHELL_ADD_PROJECTS), SarosSWTBotPreferences.SAROS_LONG_TIMEOUT); + Conditions.shellIsActive(SHELL_ADD_RESOURCES), SarosSWTBotPreferences.SAROS_LONG_TIMEOUT); - SWTBotShell shell = bot.shell(SHELL_ADD_PROJECTS); + SWTBotShell shell = bot.shell(SHELL_ADD_RESOURCES); shell.activate(); shell.bot().radio("Use existing project").click(); @@ -152,9 +136,9 @@ public void confirmShellAddProjectUsingWhichProject( String projectName, TypeOfCreateProject usingWhichProject) throws RemoteException { SWTBot bot = new SWTBot(); bot.waitUntil( - Conditions.shellIsActive(SHELL_ADD_PROJECTS), SarosSWTBotPreferences.SAROS_LONG_TIMEOUT); + Conditions.shellIsActive(SHELL_ADD_RESOURCES), SarosSWTBotPreferences.SAROS_LONG_TIMEOUT); - SWTBotShell shell = bot.shell(SHELL_ADD_PROJECTS); + SWTBotShell shell = bot.shell(SHELL_ADD_RESOURCES); shell.activate(); switch (usingWhichProject) { diff --git a/stf/src/saros/stf/shared/Constants.java b/stf/src/saros/stf/shared/Constants.java index 2a8e7c6c12..d607dd2270 100644 --- a/stf/src/saros/stf/shared/Constants.java +++ b/stf/src/saros/stf/shared/Constants.java @@ -3,19 +3,35 @@ import static saros.stf.shared.Configuration.get; public interface Constants { - public enum TypeOfCreateProject { + + /** Defines how invitees are added to the session. */ + enum SessionInvitationModality { + SEQUENTIALLY, + CONCURRENTLY + } + + /** + * Defines how the shared project is represented on the invitee's side. + * + *

Note: Using creation type {@link TypeOfCreateProject#NEW_PROJECT} does not enforce + * that the project nature on the inviter's side is correctly applied on the invitee's side. As a + * result, it is only supported for cases where the project nature is not of interest. In cases + * where the same project nature is necessary on all sides (e.g. if Java language support is + * needed), please use {@link TypeOfCreateProject#EXIST_PROJECT} instead. + */ + enum TypeOfCreateProject { NEW_PROJECT, EXIST_PROJECT, EXIST_PROJECT_WITH_COPY } - public enum TypeOfShareProject { + enum TypeOfShareProject { SHARE_PROJECT, SHARE_PROJECT_PARTICALLY, ADD_SESSION } - public enum TreeItemType { + enum TreeItemType { JAVA_PROJECT, PROJECT, FILE, @@ -25,16 +41,16 @@ public enum TreeItemType { NULL } - public static final String CONFIRM_DELETE = "Confirm Delete"; - public static final String DELETE = "Delete"; - public static final String SHELL_COPY_PROJECT = "Copy Project"; - public static final String SHELL_DELETING_ACTIVE_ACCOUNT = "Deleting active account"; + String CONFIRM_DELETE = "Confirm Delete"; + String DELETE = "Delete"; + String SHELL_COPY_PROJECT = "Copy Project"; + String SHELL_DELETING_ACTIVE_ACCOUNT = "Deleting active account"; /* * DECORATORS */ - public static final String PROJECT_SHARED_DECORATOR = get("SharedProjectDecorator_shared"); + String PROJECT_SHARED_DECORATOR = get("SharedProjectDecorator_shared"); /* ********************************************* * @@ -43,24 +59,24 @@ public enum TreeItemType { * ******************************************** */ // Title of Buttons - public static final String YES = "Yes"; - public static final String OK = "OK"; - public static final String APPLY_AND_CLOSE = "Apply and Close"; - public static final String NO = "No"; - public static final String CANCEL = "Cancel"; - public static final String FINISH = "Finish"; - public static final String ACCEPT = "Accept"; - public static final String APPLY = "Apply"; - public static final String NEXT = "Next >"; - public static final String BACK = "< Back"; - public static final String BROWSE = "Browse"; - public static final String OVERWRITE = "Overwrite"; - public static final String BACKUP = "Create Backup"; - public static final String RUN_IN_BACKGROUND = "Run in Background"; - public static final String RESTORE_DEFAULTS = "Restore Defaults"; - - public static final String SRC = "src"; - public static final String SUFFIX_JAVA = ".java"; + String YES = "Yes"; + String OK = "OK"; + String APPLY_AND_CLOSE = "Apply and Close"; + String NO = "No"; + String CANCEL = "Cancel"; + String FINISH = "Finish"; + String ACCEPT = "Accept"; + String APPLY = "Apply"; + String NEXT = "Next >"; + String BACK = "< Back"; + String BROWSE = "Browse"; + String OVERWRITE = "Overwrite"; + String BACKUP = "Create Backup"; + String RUN_IN_BACKGROUND = "Run in Background"; + String RESTORE_DEFAULTS = "Restore Defaults"; + + String SRC = "src"; + String SUFFIX_JAVA = ".java"; /* ********************************************* * @@ -68,7 +84,7 @@ public enum TreeItemType { * * ******************************************** */ - public static final String SHELL_PROGRESS_INFORMATION = "Progress Information"; + String SHELL_PROGRESS_INFORMATION = "Progress Information"; /* ********************************************* * @@ -76,10 +92,10 @@ public enum TreeItemType { * * ******************************************** */ - public static final String NODE_CONSOLE = "Console"; - public static final String NODE_EDITORS = "Editors"; - public static final String NODE_TEXT_EDITORS = "Text Editors"; - public static final String NODE_ANNOTATIONS = "Annotations"; + String NODE_CONSOLE = "Console"; + String NODE_EDITORS = "Editors"; + String NODE_TEXT_EDITORS = "Text Editors"; + String NODE_ANNOTATIONS = "Annotations"; /* ********************************************* * * Main Menu File @@ -87,40 +103,39 @@ public enum TreeItemType { * ******************************************** */ - public static final String MENU_NEW = "New"; - public static final String MENU_PROJECT = "Project..."; - public static final String MENU_FOLDER = "Folder"; - public static final String MENU_FILE = "File"; - public static final String MENU_CLASS = "Class"; - public static final String MENU_PACKAGE = "Package"; - public static final String MENU_JAVA_PROJECT = "Java Project"; - public static final String MENU_CLOSE = "Close"; - public static final String MENU_CLOSE_ALL = "Close All"; - public static final String MENU_REFRESH = "Refresh"; - public static final String MENU_SAVE = "Save"; - public static final String MENU_SAVE_AS = "Save As..."; - public static final String MENU_SAVE_All = "Save All"; - - public static final String SHELL_NEW_FOLDER = "New Folder"; - public static final String SHELL_NEW_FILE = "New File"; - public static final String SHELL_NEW_JAVA_PACKAGE = "New Java Package"; - public static final String SHELL_NEW_JAVA_CLASS = "New Java Class"; - public static final String SHELL_NEW_PROJECT = "New Project"; - public static final String SHELL_NEW_JAVA_PROJECT = "New Java Project"; + String MENU_NEW = "New"; + String MENU_PROJECT = "Project..."; + String MENU_FOLDER = "Folder"; + String MENU_FILE = "File"; + String MENU_CLASS = "Class"; + String MENU_PACKAGE = "Package"; + String MENU_JAVA_PROJECT = "Java Project"; + String MENU_CLOSE = "Close"; + String MENU_CLOSE_ALL = "Close All"; + String MENU_REFRESH = "Refresh"; + String MENU_SAVE = "Save"; + String MENU_SAVE_AS = "Save As..."; + String MENU_SAVE_All = "Save All"; + + String SHELL_NEW_FOLDER = "New Folder"; + String SHELL_NEW_FILE = "New File"; + String SHELL_NEW_JAVA_PACKAGE = "New Java Package"; + String SHELL_NEW_JAVA_CLASS = "New Java Class"; + String SHELL_NEW_PROJECT = "New Project"; + String SHELL_NEW_JAVA_PROJECT = "New Java Project"; /* categories and nodes of the shell "New Project" */ - public static final String NODE_GENERAL = "General"; - public static final String NODE_PROJECT = "Project"; + String NODE_GENERAL = "General"; + String NODE_PROJECT = "Project"; /* Eclipse Project Wizard */ - public static final String LABEL_PROJECT_NAME = "Project name:"; - public static final String LABEL_FILE_NAME = "File name:"; - public static final String LABEL_FOLDER_NAME = "Folder name:"; - public static final String LABEL_ENTER_OR_SELECT_THE_PARENT_FOLDER = - "Enter or select the parent folder:"; - public static final String LABEL_SOURCE_FOLDER = "Source folder:"; - public static final String LABEL_PACKAGE = "Package:"; - public static final String LABEL_NAME = "Name:"; + String LABEL_PROJECT_NAME = "Project name:"; + String LABEL_FILE_NAME = "File name:"; + String LABEL_FOLDER_NAME = "Folder name:"; + String LABEL_ENTER_OR_SELECT_THE_PARENT_FOLDER = "Enter or select the parent folder:"; + String LABEL_SOURCE_FOLDER = "Source folder:"; + String LABEL_PACKAGE = "Package:"; + String LABEL_NAME = "Name:"; /* ********************************************* * @@ -128,13 +143,13 @@ public enum TreeItemType { * * ******************************************** */ - public static final String SHELL_DELETE_RESOURCE = "Delete Resources"; + String SHELL_DELETE_RESOURCE = "Delete Resources"; /* menu names */ - public static final String MENU_DELETE = "Delete"; - public static final String MENU_EDIT = "Edit"; - public static final String MENU_COPY = "Copy"; - public static final String MENU_PASTE = "Paste"; + String MENU_DELETE = "Delete"; + String MENU_EDIT = "Edit"; + String MENU_COPY = "Copy"; + String MENU_PASTE = "Paste"; /* ********************************************* * @@ -143,17 +158,17 @@ public enum TreeItemType { * ******************************************** */ /* shell titles */ - public static final String SHELL_MOVE = "Move"; - public static final String SHELL_RENAME_PACKAGE = "Rename Package"; - public static final String SHELL_RENAME_JAVA_PROJECT = "Rename Java Project"; - public static final String SHELL_RENAME_RESOURCE = "Rename Resource"; - public static final String SHELL_RENAME_COMPIIATION_UNIT = "Rename Compilation Unit"; - public static final String LABEL_NEW_NAME = "New name:"; + String SHELL_MOVE = "Move"; + String SHELL_RENAME_PACKAGE = "Rename Package"; + String SHELL_RENAME_JAVA_PROJECT = "Rename Java Project"; + String SHELL_RENAME_RESOURCE = "Rename Resource"; + String SHELL_RENAME_COMPIIATION_UNIT = "Rename Compilation Unit"; + String LABEL_NEW_NAME = "New name:"; /* menu names */ - public static final String MENU_REFACTOR = "Refactor"; - public static final String MENU_RENAME = "Rename..."; - public static final String MENU_MOVE = "Move..."; + String MENU_REFACTOR = "Refactor"; + String MENU_RENAME = "Rename..."; + String MENU_MOVE = "Move..."; /* ********************************************* * @@ -162,23 +177,23 @@ public enum TreeItemType { * ******************************************** */ - public static final String TREE_ITEM_GENERAL_IN_PRFERENCES = "General"; - public static final String TREE_ITEM_WORKSPACE_IN_PREFERENCES = "Workspace"; - public static final String TREE_ITEM_GENERAL_IN_SHELL_SHOW_VIEW = "General"; - public static final String TREE_ITEM_PROBLEM_IN_SHELL_SHOW_VIEW = "Problems"; - public static final String TREE_ITEM_PROJECT_EXPLORER_IN_SHELL_SHOW_VIEW = "Project Explorer"; + String TREE_ITEM_GENERAL_IN_PRFERENCES = "General"; + String TREE_ITEM_WORKSPACE_IN_PREFERENCES = "Workspace"; + String TREE_ITEM_GENERAL_IN_SHELL_SHOW_VIEW = "General"; + String TREE_ITEM_PROBLEM_IN_SHELL_SHOW_VIEW = "Problems"; + String TREE_ITEM_PROJECT_EXPLORER_IN_SHELL_SHOW_VIEW = "Project Explorer"; /* name of all the main menus */ - public static final String MENU_WINDOW = "Window"; - public static final String MENU_OTHER = "Other..."; - public static final String MENU_SHOW_VIEW = "Show View"; + String MENU_WINDOW = "Window"; + String MENU_OTHER = "Other..."; + String MENU_SHOW_VIEW = "Show View"; - public static final String SHELL_SHOW_VIEW = "Show View"; + String SHELL_SHOW_VIEW = "Show View"; /* IDs of all the perspectives */ - public static final String ID_JAVA_PERSPECTIVE = "org.eclipse.jdt.ui.JavaPerspective"; - public static final String ID_DEBUG_PERSPECTIVE = "org.eclipse.debug.ui.DebugPerspective"; - public static final String ID_RESOURCE_PERSPECTIVE = "eclipse.ui.resourcePerspective"; + String ID_JAVA_PERSPECTIVE = "org.eclipse.jdt.ui.JavaPerspective"; + String ID_DEBUG_PERSPECTIVE = "org.eclipse.debug.ui.DebugPerspective"; + String ID_RESOURCE_PERSPECTIVE = "eclipse.ui.resourcePerspective"; /* ********************************************* * @@ -187,7 +202,7 @@ public enum TreeItemType { * ******************************************** */ - public static final String ADD_PROJECTS = get("add_projects"); + String ADD_RESOURCES = get("add_resources"); /* ********************************************* * @@ -197,13 +212,13 @@ public enum TreeItemType { */ // the labels are defined in the plugin.xml so we use our own property file - public static final String MENU_SAROS = get("menu_saros"); - public static final String MENU_CREATE_ACCOUNT = get("menu_create_account"); - public static final String MENU_ADD_CONTACT = get("menu_add_contact"); - public static final String MENU_ADD_CONTACTS_TO_SESSION = get("menu_add_contacts_to_session"); - public static final String SHARE_PROJECTS = get("share_projects"); - public static final String MENU_PREFERENCES = get("menu_preferences"); - public static final String MENU_STOP_SESSION = get("menu_stop_session"); + String MENU_SAROS = get("menu_saros"); + String MENU_CREATE_ACCOUNT = get("menu_create_account"); + String MENU_ADD_CONTACT = get("menu_add_contact"); + String MENU_ADD_CONTACTS_TO_SESSION = get("menu_add_contacts_to_session"); + String SHARE_RESOURCES = get("share_resources"); + String MENU_PREFERENCES = get("menu_preferences"); + String MENU_STOP_SESSION = get("menu_stop_session"); /* ********************************************* * @@ -211,81 +226,72 @@ public enum TreeItemType { * * ********************************************* */ - public static final String SHELL_SAROS_CONFIGURATION = get("shell_saros_configuration"); + String SHELL_SAROS_CONFIGURATION = get("shell_saros_configuration"); - public static final String SHELL_PREFERNCES = get("shell_preferences"); + String SHELL_PREFERNCES = get("shell_preferences"); - public static final String SHELL_CREATE_XMPP_JABBER_ACCOUNT = - get("shell_create_xmpp_jabber_account"); - public static final String SHELL_ADD_XMPP_JABBER_ACCOUNT = get("shell_add_xmpp_jabber_account"); - public static final String SHELL_EDIT_XMPP_JABBER_ACCOUNT = get("shell_edit_xmpp_jabber_account"); + String SHELL_CREATE_XMPP_JABBER_ACCOUNT = get("shell_create_xmpp_jabber_account"); + String SHELL_ADD_XMPP_JABBER_ACCOUNT = get("shell_add_xmpp_jabber_account"); + String SHELL_EDIT_XMPP_JABBER_ACCOUNT = get("shell_edit_xmpp_jabber_account"); - public static final String CHATROOM_TAB_LABEL = get("ChatRoomsComposite_roundtable"); + String CHATROOM_TAB_LABEL = get("ChatRoomsComposite_roundtable"); - public static final String LABEL_XMPP_JABBER_ID = get("jid_shortform"); - public static final String LABEL_XMPP_JABBER_SERVER = get("text_label_xmpp_jabber_server"); - public static final String LABEL_USER_NAME = get("text_label_user_name"); - public static final String LABEL_PASSWORD = get("text_label_password"); - public static final String LABEL_REPEAT_PASSWORD = get("text_label_repeat_password"); + String LABEL_XMPP_JABBER_ID = get("jid_shortform"); + String LABEL_XMPP_JABBER_SERVER = get("text_label_xmpp_jabber_server"); + String LABEL_USER_NAME = get("text_label_user_name"); + String LABEL_PASSWORD = get("text_label_password"); + String LABEL_REPEAT_PASSWORD = get("text_label_repeat_password"); - public static final String ResourceSelectionComposite_delete_dialog_title = + String ResourceSelectionComposite_delete_dialog_title = get("ResourceSelectionComposite_delete_dialog_title"); - public static final String ResourceSelectionComposite_overwrite_dialog_title = + String ResourceSelectionComposite_overwrite_dialog_title = get("ResourceSelectionComposite_overwrite_dialog_title"); - public static final String ERROR_MESSAGE_PASSWORDS_NOT_MATCH = + String ERROR_MESSAGE_PASSWORDS_NOT_MATCH = get("CreateXMPPAccountWizardPage_error_password_no_match"); - public static final String ERROR_MESSAGE_COULD_NOT_CONNECT = - get("error_message_could_not_connect"); - public static final String ERROR_MESSAGE_NOT_CONNECTED_TO_SERVER = - get("error_message_not_connected_to_server"); - public static final String ERROR_MESSAGE_ACCOUNT_ALREADY_EXISTS = - get("account_exists_errorMessage"); - public static final String ERROR_MESSAGE_TOO_FAST_REGISTER_ACCOUNTS = - get("error_message_too_fast_register_accounts"); - public static final String GROUP_EXISTING_ACCOUNT = get("group_existing_account"); - public static final String GROUP_TITLE_XMPP_JABBER_ACCOUNTS = + String ERROR_MESSAGE_COULD_NOT_CONNECT = get("error_message_could_not_connect"); + String ERROR_MESSAGE_NOT_CONNECTED_TO_SERVER = get("error_message_not_connected_to_server"); + String ERROR_MESSAGE_ACCOUNT_ALREADY_EXISTS = get("account_exists_errorMessage"); + String ERROR_MESSAGE_TOO_FAST_REGISTER_ACCOUNTS = get("error_message_too_fast_register_accounts"); + String GROUP_EXISTING_ACCOUNT = get("group_existing_account"); + String GROUP_TITLE_XMPP_JABBER_ACCOUNTS = get("group_title_xmpp_jabber_accounts_in_shell-saros-preferences"); - public static final String LABEL_ACTIVE_ACCOUNT_PREFIX = get("GeneralPreferencePage_active"); - public static final String BUTTON_ACTIVATE_ACCOUNT = - get("button_text_activate_account_in_shell-saros-preferences"); - public static final String BUTTON_EDIT_ACCOUNT = get("button_edit_account"); - public static final String BUTTON_ADD_ACCOUNT = - get("button_text_add_account_in_shell-saros-preferences"); - public static final String BUTTON_REMOVE_ACCOUNT = get("GeneralPreferencePage_REMOVE_BTN_TEXT"); - public static final String CHECKBOX_AUTO_CONNECT_ON_STARTUP = + String LABEL_ACTIVE_ACCOUNT_PREFIX = get("GeneralPreferencePage_active"); + String BUTTON_ACTIVATE_ACCOUNT = get("button_text_activate_account_in_shell-saros-preferences"); + String BUTTON_EDIT_ACCOUNT = get("button_edit_account"); + String BUTTON_ADD_ACCOUNT = get("button_text_add_account_in_shell-saros-preferences"); + String BUTTON_REMOVE_ACCOUNT = get("GeneralPreferencePage_REMOVE_BTN_TEXT"); + String CHECKBOX_AUTO_CONNECT_ON_STARTUP = get("checkbox_label_auto_connect_on_startup_in_shell-saros-preferences"); - public static final String CHECKBOX_DISABLE_VERSION_CONTROL = + String CHECKBOX_DISABLE_VERSION_CONTROL = get("checkbox_label_disable_version_control_support_in_shell-saros-preferences"); - public static final String CHECKBOX_ENABLE_CONCURRENT_UNDO = + String CHECKBOX_ENABLE_CONCURRENT_UNDO = get("checkbox_label_enable_concurrent_undo_shell-saros-preferences"); - public static final String CHECKBOX_START_FOLLOW_MODE = + String CHECKBOX_START_FOLLOW_MODE = get("checkbox_label_start_in_follow_mode_in_shell-saros-preferences"); - public static final String REMOVE_ACCOUNT_DIALOG_TITLE = - get("GeneralPreferencePage_REMOVE_ACCOUNT_DIALOG_TITLE"); - public static final String ACTIVATE_ACCOUNT_DIALOG_TITLE = - get("GeneralPreferencePage_ACTIVATE_ACCOUNT_DIALOG_TITLE"); + String REMOVE_ACCOUNT_DIALOG_TITLE = get("GeneralPreferencePage_REMOVE_ACCOUNT_DIALOG_TITLE"); + String ACTIVATE_ACCOUNT_DIALOG_TITLE = get("GeneralPreferencePage_ACTIVATE_ACCOUNT_DIALOG_TITLE"); - public static final String NODE_SAROS = get("node_saros"); + String NODE_SAROS = get("node_saros"); - public static final String NODE_SAROS_FEEDBACK = get("node_Saros_feedback"); + String NODE_SAROS_FEEDBACK = get("node_Saros_feedback"); - public static final String NODE_SAROS_ADVANCED = get("node_Saros_Advanced"); - public static final String PREF_NODE_SAROS_ADVANCED_INSTANT_SESSION_START_PREFERRED = + String NODE_SAROS_ADVANCED = get("node_Saros_Advanced"); + String PREF_NODE_SAROS_ADVANCED_INSTANT_SESSION_START_PREFERRED = get("AdvancedPreferencePage_instant_session_start_preferred"); - public static final String NODE_SAROS_COMMUNICATION = get("node_Saros_Communication"); + String NODE_SAROS_COMMUNICATION = get("node_Saros_Communication"); - public static final String NODE_SAROS_NETWORK = get("node_saros_network"); - public static final String PREF_NODE_SAROS_NETWORK_TRANSPORT_MODE_GROUP = + String NODE_SAROS_NETWORK = get("node_saros_network"); + String PREF_NODE_SAROS_NETWORK_TRANSPORT_MODE_GROUP = get("NetworkPreferencePage_connection_established"); - public static final String PREF_NODE_SAROS_NETWORK_TRANSPORT_MODE_SOCKS5_MEDIATED_CHECKBOX = + String PREF_NODE_SAROS_NETWORK_TRANSPORT_MODE_SOCKS5_MEDIATED_CHECKBOX = get("NetworkPreferencePage_buttonOnlyAllowMediatedSocks5_text"); - public static final String PREF_NODE_SAROS_NETWORK_TRANSPORT_MODE_IBB_CHECKBOX = + String PREF_NODE_SAROS_NETWORK_TRANSPORT_MODE_IBB_CHECKBOX = get("NetworkPreferencePage_button_establish_connection"); - public static final String PREF_NODE_SAROS_NETWORK_ADVANCED_GROUP_FILE_TRANSFER = + String PREF_NODE_SAROS_NETWORK_ADVANCED_GROUP_FILE_TRANSFER = get("saros_advanced_group_file_transfer"); - public static final String PREF_NODE_SAROS_NETWORK_ADVANCED_GROUP_FILE_TRANSFER_FORCE_IBB = + String PREF_NODE_SAROS_NETWORK_ADVANCED_GROUP_FILE_TRANSFER_FORCE_IBB = get("saros_advanced_group_file_transfer_force_ibb"); /* ********************************************* @@ -298,15 +304,14 @@ public enum TreeItemType { /* * View infos */ - public static final String VIEW_SAROS = get("view_saros"); - public static final String VIEW_SAROS_ID = get("view_saros_id"); - public static final String SHELL_REQUEST_OF_SUBSCRIPTION_RECEIVED = + String VIEW_SAROS = get("view_saros"); + String VIEW_SAROS_ID = get("view_saros_id"); + String SHELL_REQUEST_OF_SUBSCRIPTION_RECEIVED = get("SubscriptionManager_incoming_subscription_request_title"); - public static final String SHELL_SERVER_NOT_FOUND = get("shell_server_not_found"); - public static final String SHELL_SET_NEW_NICKNAME = - get("RenameContactAction_new_nickname_dialog_title"); - public static final String SHELL_CONFIRM_CLOSING_SESSION = get("shell_confirm_closing_session"); - public static final String SHELL_ADD_CONTACT_WIZARD = get("AddContactWizard_title"); + String SHELL_SERVER_NOT_FOUND = get("shell_server_not_found"); + String SHELL_SET_NEW_NICKNAME = get("RenameContactAction_new_nickname_dialog_title"); + String SHELL_CONFIRM_CLOSING_SESSION = get("shell_confirm_closing_session"); + String SHELL_ADD_CONTACT_WIZARD = get("AddContactWizard_title"); /* ************************************************************* * Saros View Context Menus @@ -314,70 +319,63 @@ public enum TreeItemType { */ /* **************************** session ************************* */ - public static final String CM_ADD_CONTACTS_TO_SESSION = get("cm_add_contacts_to_session"); - public static final String CM_GRANT_WRITE_ACCESS = get("cm_grant_write_access"); - public static final String CM_RESTRICT_TO_READ_ONLY_ACCESS = - get("cm_restrict_to_read_only_access"); - public static final String CM_FOLLOW_PARTICIPANT = get("cm_follow_participant"); - public static final String CM_STOP_FOLLOWING = get("cm_stop_following"); - public static final String CM_JUMP_TO_POSITION_OF_PARTICIPANT = - get("cm_jump_to_position_of_participant"); - public static final String CM_CHANGE_COLOR = get("cm_change_color"); - public static final String CM_STOP_SAROS_SESSION = get("cm_stop_saros_session"); + String CM_ADD_CONTACTS_TO_SESSION = get("cm_add_contacts_to_session"); + String CM_GRANT_WRITE_ACCESS = get("cm_grant_write_access"); + String CM_RESTRICT_TO_READ_ONLY_ACCESS = get("cm_restrict_to_read_only_access"); + String CM_FOLLOW_PARTICIPANT = get("cm_follow_participant"); + String CM_STOP_FOLLOWING = get("cm_stop_following"); + String CM_JUMP_TO_POSITION_OF_PARTICIPANT = get("cm_jump_to_position_of_participant"); + String CM_CHANGE_COLOR = get("cm_change_color"); + String CM_STOP_SAROS_SESSION = get("cm_stop_saros_session"); /* ************************** contact list ********************** */ - public static final String CM_ADD_CONTACT = get("cm_add_contact"); - public static final String CM_DELETE = get("cm_delete"); - public static final String CM_RENAME = get("cm_rename"); - public static final String CM_OPEN_CHAT = get("OpenChatAction_MenuItem"); - public static final String CM_ADD_TO_SAROS_SESSION = get("cm_add_to_saros_session"); + String CM_ADD_CONTACT = get("cm_add_contact"); + String CM_DELETE = get("cm_delete"); + String CM_RENAME = get("cm_rename"); + String CM_OPEN_CHAT = get("OpenChatAction_MenuItem"); + String CM_ADD_TO_SAROS_SESSION = get("cm_add_to_saros_session"); /* ***************** package explorer view ********************* */ - public static final String CM_SHARE_WITH = get("cm_share_with"); - public static final String CM_WORK_TOGETHER_ON = get("cm_work_together_on"); - public static final String CM_MULTIPLE_CONTACTS = get("cm_multiple_contacts"); - public static final String CM_MULTIPLE_PROJECTS = get("cm_multiple_projects"); + String CM_SHARE_WITH = get("cm_share_with"); + String CM_WORK_TOGETHER_ON = get("cm_work_together_on"); + String CM_MULTIPLE_CONTACTS = get("cm_multiple_contacts"); + String CM_MULTIPLE_RESOURCE_ROOTS = get("cm_multiple_resource_roots"); /* *************************************************************** */ - public static final String SHELL_ADD_CONTACT_TO_SESSION = get("SessionAddContactsWizard_title"); - public static final String SHELL_ERROR_IN_SAROS_PLUGIN = get("shell_error_in_saros_plugin"); - public static final String SHELL_CLOSING_THE_SESSION = get("close_the_session"); - public static final String SHELL_CONFIRM_LEAVING_SESSION = get("confirm_leaving_session"); - public static final String SHELL_CONFIRM_DECLINE_INVITATION = - get("shell_confirm_decline_invitation"); - public static final String SHELL_CONFIRM_CONSISTENCY_RECOVERY = - get("ConsistencyAction_confirm_dialog_title"); + String SHELL_ADD_CONTACT_TO_SESSION = get("SessionAddContactsWizard_title"); + String SHELL_ERROR_IN_SAROS_PLUGIN = get("shell_error_in_saros_plugin"); + String SHELL_CLOSING_THE_SESSION = get("close_the_session"); + String SHELL_CONFIRM_LEAVING_SESSION = get("confirm_leaving_session"); + String SHELL_CONFIRM_DECLINE_INVITATION = get("shell_confirm_decline_invitation"); + String SHELL_CONFIRM_CONSISTENCY_RECOVERY = get("ConsistencyAction_confirm_dialog_title"); /* ************************************************************* * Saros View Toolbar Buttons * ************************************************************* */ - public static final String TB_DISCONNECT = get("tb_disconnect"); - public static final String TB_ADD_NEW_CONTACT = get("NewContactAction_tooltip"); - public static final String TB_CONNECT = get("tb_connect"); - public static final String TB_SEND_A_FILE_TO_SELECTED_CONTACT = - get("tb_send_a_file_to_selected_contact"); - public static final String TB_NO_INCONSISTENCIES = get("tb_no_inconsistencies"); - public static final String TB_INCONSISTENCY_DETECTED = get("tb_inconsistency_detected_in"); - public static final String TB_RESTRICT_INVITEES_TO_READ_ONLY_ACCESS = - get("tb_restrict_invitees_to_read_only_access"); - public static final String TB_ENABLE_DISABLE_FOLLOW_MODE = get("tb_enable_disable_follow_mode"); - public static final String TB_LEAVE_SESSION = get("LeaveSessionAction_leave_session_tooltip"); - public static final String TB_STOP_SESSION = get("LeaveSessionAction_stop_session_tooltip"); - public static final String NODE_CONTACTS = get("RosterHeaderElement_contacts"); - public static final String NODE_SESSION = get("SessionHeaderElement_session"); - public static final String NODE_NO_SESSION_RUNNING = - get("SessionHeaderElement_no_session_running"); - public static final String HOST_INDICATION = get("UserElement_host"); - public static final String GROUP_TITLE_CREATE_NEW_XMPP_JABBER_ACCOUNT = + String TB_DISCONNECT = get("tb_disconnect"); + String TB_ADD_NEW_CONTACT = get("NewContactAction_tooltip"); + String TB_CONNECT = get("tb_connect"); + String TB_SEND_A_FILE_TO_SELECTED_CONTACT = get("tb_send_a_file_to_selected_contact"); + String TB_NO_INCONSISTENCIES = get("tb_no_inconsistencies"); + String TB_INCONSISTENCY_DETECTED = get("tb_inconsistency_detected_in"); + String TB_RESTRICT_INVITEES_TO_READ_ONLY_ACCESS = get("tb_restrict_invitees_to_read_only_access"); + String TB_ENABLE_DISABLE_FOLLOW_MODE = get("tb_enable_disable_follow_mode"); + String TB_LEAVE_SESSION = get("LeaveSessionAction_leave_session_tooltip"); + String TB_STOP_SESSION = get("LeaveSessionAction_stop_session_tooltip"); + String NODE_CONTACTS = get("RosterHeaderElement_contacts"); + String NODE_SESSION = get("SessionHeaderElement_session"); + String NODE_NO_SESSION_RUNNING = get("SessionHeaderElement_no_session_running"); + String HOST_INDICATION = get("UserElement_host"); + String GROUP_TITLE_CREATE_NEW_XMPP_JABBER_ACCOUNT = get("group_title_create_new_xmpp_jabber_account"); // Permission: Write Access - public static final String READ_ONLY_ACCESS = get("read_only_access"); - public static final String FOLLOW_MODE_ENABLED = get("follow_mode_enabled"); - public static final String FOLLOW_MODE_PAUSED = get("follow_mode_paused"); + String READ_ONLY_ACCESS = get("read_only_access"); + String FOLLOW_MODE_ENABLED = get("follow_mode_enabled"); + String FOLLOW_MODE_PAUSED = get("follow_mode_paused"); /* ********************************************* * @@ -386,35 +384,36 @@ public enum TreeItemType { * ******************************************** */ - public static final int CREATE_NEW_PROJECT = 1; - public static final int USE_EXISTING_PROJECT = 2; - public static final int USE_EXISTING_PROJECT_WITH_CANCEL_LOCAL_CHANGE = 3; - public static final int USE_EXISTING_PROJECT_WITH_COPY = 4; + int CREATE_NEW_PROJECT = 1; + int USE_EXISTING_PROJECT = 2; + int USE_EXISTING_PROJECT_WITH_CANCEL_LOCAL_CHANGE = 3; + int USE_EXISTING_PROJECT_WITH_COPY = 4; /* * title of shells which are pop up by performing the actions on the package * explorer view. */ - public static final String SHELL_INVITATION_CANCELED = get("shell_invitation_canceled"); - public static final String SHELL_SESSION_INVITATION = get("shell_session_invitation"); - public static final String SHELL_ADD_PROJECTS = get("shell_add_projects"); - public static final String SHELL_ADD_PROJECTS_TO_SESSION = get("shell_add_projects_to_session"); - public static final String SHELL_PROBLEM_OCCURRED = get("shell_problem_occurred"); - public static final String SHELL_WARNING_LOCAL_CHANGES_DELETED = - get("shell_warning_local_changes_deleted"); - public static final String SHELL_FOLDER_SELECTION = get("shell_folder_selection"); - public static final String SHELL_SAVE_ALL_FILES_NOW = get("shell_save_all_files_now"); - public static final String SHELL_NEW_FILE_SHARED = get("shell_new_file_shared"); - public static final String SHELL_NEED_BASED_SYNC = get("shell_need_based_sync"); - - public static final String SHELL_CONFIRM_SAVE_UNCHANGED_CHANGES = + String SHELL_INVITATION_CANCELED = get("shell_invitation_canceled"); + String SHELL_SESSION_INVITATION = get("shell_session_invitation"); + String SHELL_ADD_RESOURCES = get("shell_add_resources"); + String SHELL_ADD_PROJECTS_TO_SESSION = get("shell_add_projects_to_session"); + String SHELL_PROBLEM_OCCURRED = get("shell_problem_occurred"); + String SHELL_WARNING_LOCAL_CHANGES_DELETED = get("shell_warning_local_changes_deleted"); + String SHELL_FOLDER_SELECTION = get("shell_folder_selection"); + String SHELL_SAVE_ALL_FILES_NOW = get("shell_save_all_files_now"); + String SHELL_NEW_FILE_SHARED = get("shell_new_file_shared"); + String SHELL_NEED_BASED_SYNC = get("shell_need_based_sync"); + + String SHELL_CONFIRM_SAVE_UNCHANGED_CHANGES = get("AddReferencePointsToSessionWizard_unsaved_changes_dialog_title"); /* * second page of the wizard "Session invitation" */ - public static final String RADIO_USING_EXISTING_PROJECT = get("radio_use_existing_project"); - public static final String RADIO_CREATE_NEW_PROJECT = get("radio_create_new_project"); + String RADIO_USING_EXISTING_DIRECTORY = get("radio_use_existing_directory"); + String RADIO_CREATE_NEW_PROJECT = get("radio_create_new_project"); + String LABEL_NEW_PROJECT_NAME = get("label_new_project_name"); + String LABEL_EXISTING_DIRECTORY_PATH = get("label_existing_directory_path"); /* ********************************************* * @@ -423,11 +422,11 @@ public enum TreeItemType { * ******************************************** */ /* Context menu of a selected file on the package explorer view */ - public static final String CM_OPEN = "Open"; - public static final String CM_OPEN_WITH = "Open With"; - public static final String CM_OTHER = "Other..."; - public static final String CM_OPEN_WITH_TEXT_EDITOR = "Text Editor"; - public static final String CM_OPEN_WITH_SYSTEM_EDITOR = "System Editor"; + String CM_OPEN = "Open"; + String CM_OPEN_WITH = "Open With"; + String CM_OTHER = "Other..."; + String CM_OPEN_WITH_TEXT_EDITOR = "Text Editor"; + String CM_OPEN_WITH_SYSTEM_EDITOR = "System Editor"; /* ********************************************* * @@ -436,11 +435,11 @@ public enum TreeItemType { * ******************************************** */ - public static final String ID_JAVA_EDITOR = "org.eclipse.jdt.ui.CompilationUnitEditor"; - public static final String ID_TEXT_EDITOR = "org.eclipse.ui.texteditor"; + String ID_JAVA_EDITOR = "org.eclipse.jdt.ui.CompilationUnitEditor"; + String ID_TEXT_EDITOR = "org.eclipse.ui.texteditor"; /* Title of shells */ - public static String SHELL_SAVE_RESOURCE = "Save Resource"; + String SHELL_SAVE_RESOURCE = "Save Resource"; /* ********************************************* * @@ -449,12 +448,12 @@ public enum TreeItemType { * ******************************************** */ - public static final String VIEW_PACKAGE_EXPLORER = "Package Explorer"; - public static final String VIEW_PACKAGE_EXPLORER_ID = "org.eclipse.jdt.ui.PackageExplorer"; + String VIEW_PACKAGE_EXPLORER = "Package Explorer"; + String VIEW_PACKAGE_EXPLORER_ID = "org.eclipse.jdt.ui.PackageExplorer"; - public static final String SHELL_EDITOR_SELECTION = "Editor Selection"; + String SHELL_EDITOR_SELECTION = "Editor Selection"; - public static final String TB_COLLAPSE_ALL = "Collapse All.*"; + String TB_COLLAPSE_ALL = "Collapse All.*"; /* ********************************************* * @@ -463,10 +462,10 @@ public enum TreeItemType { * ******************************************** */ /* Context menu of a selected item on the package explorer view */ - public static final String CM_RUN_AS = "Run As"; - public static final String CM_ON_SERVER = "Run on server"; - public static final String CM_JAVA_APPLET = "Java Applet"; - public static final String CM_JAVA_APPLICATION = "Java Application"; + String CM_RUN_AS = "Run As"; + String CM_ON_SERVER = "Run on server"; + String CM_JAVA_APPLET = "Java Applet"; + String CM_JAVA_APPLICATION = "Java Application"; /* ********************************************* * @@ -474,10 +473,10 @@ public enum TreeItemType { * * ******************************************** */ - public static final String VIEW_PROGRESS = "Progress"; - public static final String VIEW_PROGRESS_ID = "org.eclipse.ui.views.ProgressView"; + String VIEW_PROGRESS = "Progress"; + String VIEW_PROGRESS_ID = "org.eclipse.ui.views.ProgressView"; - public static final String TB_REMOVE_ALL_FINISHED_OPERATIONS = "Remove All Finished Operations"; + String TB_REMOVE_ALL_FINISHED_OPERATIONS = "Remove All Finished Operations"; /* ********************************************* * @@ -485,8 +484,8 @@ public enum TreeItemType { * * ******************************************** */ - public static final String VIEW_CONSOLE = "Console"; - public static final String VIEW_CONSOLE_ID = "org.eclipse.ui.console.ConsoleView"; + String VIEW_CONSOLE = "Console"; + String VIEW_CONSOLE_ID = "org.eclipse.ui.console.ConsoleView"; /* ********************************************* * @@ -494,21 +493,20 @@ public enum TreeItemType { * * ******************************************** */ - public static final String SHELL_SHARE_PROJECT = "Share Project"; + String SHELL_SHARE_PROJECT = "Share Project"; /* * Invit. / Synch. Monitor Names */ - public static final String SHELL_MONITOR_PROJECT_SYNCHRONIZATION = - get("shell_monitor_project_synchronization"); + String SHELL_MONITOR_PROJECT_SYNCHRONIZATION = get("shell_monitor_project_synchronization"); /* ********************************************* * * Others * * ******************************************** */ - public static final String STRING_REGEX_WITH_LINE_BREAK = ".*\n*.*"; - public static final String PKG_REGEX = "[\\w*\\.]*\\w*"; - public static final String PROJECT_REGEX = "\\w*"; + String STRING_REGEX_WITH_LINE_BREAK = ".*\n*.*"; + String PKG_REGEX = "[\\w*\\.]*\\w*"; + String PROJECT_REGEX = "\\w*"; } diff --git a/stf/src/saros/stf/shared/configuration.properties b/stf/src/saros/stf/shared/configuration.properties index 3553e89b09..664fa86bb9 100644 --- a/stf/src/saros/stf/shared/configuration.properties +++ b/stf/src/saros/stf/shared/configuration.properties @@ -42,7 +42,7 @@ cm_change_color = Change Color cm_stop_saros_session = Stop Saros Session... menu_stop_session = Stop Session... -add_projects = Add Projects... +add_resources = Add Resource(s)... shell_server_not_found = Server Not Found shell_saros_configuration = Saros Configuration @@ -66,7 +66,7 @@ menu_saros = Saros menu_create_account = Create Account... menu_add_contact = Add Contact... menu_add_contacts_to_session = Add Contacts... -share_projects = Share Project(s)... +share_resources = Share Resource(s)... menu_preferences = Preferences... shell_preferences = Preferences @@ -111,7 +111,7 @@ saros_advanced_group_file_transfer = Connection establishment saros_advanced_group_file_transfer_force_ibb = Only establish connections over IBB [only very small bandwidth is guaranteed] shell_invitation_canceled = Invitation Canceled shell_session_invitation= Session Invitation -shell_add_projects = Add Projects +shell_add_resources = Add Resource Roots shell_add_projects_to_session = Add Project(s) to Session shell_problem_occurred = Problem Occurred shell_warning_local_changes_deleted= Warning: Local changes will be deleted @@ -128,7 +128,7 @@ shell_need_based_sync = Need based file synchronization cm_share_with = Share With cm_work_together_on = Work Together on... -cm_multiple_projects = Multiple Projects... +cm_multiple_resource_roots = Specific resource tree(s)... cm_add_contact = Add Contact... cm_add_contacts_to_session = Add Contacts... cm_delete = Delete @@ -136,8 +136,10 @@ cm_rename = Rename... cm_add_to_saros_session = Add to Saros Session cm_multiple_contacts = Multiple Contacts... -radio_use_existing_project = Use existing project +radio_use_existing_directory = Use existing directory radio_create_new_project = Create new project +label_new_project_name = Project name +label_existing_directory_path = Directory path ######################################################## # diff --git a/stf/test/saros/stf/test/stf/menubar/MenuSarosByAliceBobTest.java b/stf/test/saros/stf/test/stf/menubar/MenuSarosByAliceBobTest.java index 37b174702d..9edfa0bc8c 100644 --- a/stf/test/saros/stf/test/stf/menubar/MenuSarosByAliceBobTest.java +++ b/stf/test/saros/stf/test/stf/menubar/MenuSarosByAliceBobTest.java @@ -7,7 +7,7 @@ import static saros.stf.shared.Constants.MENU_ADD_CONTACT; import static saros.stf.shared.Constants.MENU_SAROS; import static saros.stf.shared.Constants.NEXT; -import static saros.stf.shared.Constants.SHARE_PROJECTS; +import static saros.stf.shared.Constants.SHARE_RESOURCES; import static saros.stf.shared.Constants.SHELL_SESSION_INVITATION; import static saros.stf.shared.Constants.SHELL_SHARE_PROJECT; @@ -61,7 +61,7 @@ public void testShareProjectsWithRemoteBot() throws Exception { .javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, Constants.CLS1); ALICE.remoteBot().activateWorkbench(); - ALICE.remoteBot().menu(MENU_SAROS).menu(SHARE_PROJECTS).click(); + ALICE.remoteBot().menu(MENU_SAROS).menu(SHARE_RESOURCES).click(); IRemoteBotShell shell = ALICE.remoteBot().shell(SHELL_SHARE_PROJECT); shell.activate(); diff --git a/stf/test/saros/stf/test/stf/view/explorer/PackageExplorerViewDecoratorTest.java b/stf/test/saros/stf/test/stf/view/explorer/PackageExplorerViewDecoratorTest.java index a91825d8f9..4ed06437ec 100644 --- a/stf/test/saros/stf/test/stf/view/explorer/PackageExplorerViewDecoratorTest.java +++ b/stf/test/saros/stf/test/stf/view/explorer/PackageExplorerViewDecoratorTest.java @@ -10,7 +10,6 @@ import org.junit.Test; import saros.stf.client.StfTestCase; import saros.stf.client.util.Util; -import saros.stf.shared.Constants.TypeOfCreateProject; public class PackageExplorerViewDecoratorTest extends StfTestCase { @@ -111,7 +110,7 @@ public void testPackageExplorerViewMethodsWithFullSharedProject() throws Excepti ALICE.superBot().internal().createJavaProject(JAVA_PROJECT); ALICE.superBot().internal().createJavaClass(JAVA_PROJECT, JAVA_PACKAGE, JAVA_CLASS); - Util.addProjectToSessionSequentially(JAVA_PROJECT, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB); + Util.addJavaProjectToSessionSequentially(JAVA_PROJECT, ALICE, BOB); BOB.superBot().views().packageExplorerView().waitUntilResourceIsShared(JAVA_PROJECT); diff --git a/stf/test/saros/stf/test/stf/view/sarosview/content/ContactsByAliceBobTest.java b/stf/test/saros/stf/test/stf/view/sarosview/content/ContactsByAliceBobTest.java index 8afe67e828..4dbb625435 100644 --- a/stf/test/saros/stf/test/stf/view/sarosview/content/ContactsByAliceBobTest.java +++ b/stf/test/saros/stf/test/stf/view/sarosview/content/ContactsByAliceBobTest.java @@ -130,9 +130,12 @@ public void workTogetherOnProject() throws RemoteException { .selectContact(BOB.getJID()) .workTogetherOn() .project(Constants.PROJECT1); + + BOB.superBot().views().packageExplorerView().tree().newC().javaProject(Constants.PROJECT1); + BOB.superBot() .confirmShellSessionInvitationAndShellAddProject( - Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT); + Constants.PROJECT1, TypeOfCreateProject.EXIST_PROJECT); BOB.superBot() .views()