Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 153815 Details for
Bug 295003
[UI] Design and implement a EPartService API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
EPartServiceTest test additions v1
bug295003-test-additions-v1.txt (text/plain), 2.71 KB, created by
Remy Suen
on 2009-12-04 08:27:49 EST
(
hide
)
Description:
EPartServiceTest test additions v1
Filename:
MIME Type:
Creator:
Remy Suen
Created:
2009-12-04 08:27:49 EST
Size:
2.71 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.e4.ui.tests >Index: src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java,v >retrieving revision 1.4 >diff -u -r1.4 EPartServiceTest.java >--- src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java 1 Dec 2009 19:36:46 -0000 1.4 >+++ src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java 4 Dec 2009 13:31:07 -0000 >@@ -633,6 +633,59 @@ > assertEquals(partBackB, partServiceB.getActivePart()); > } > >+ public void testSwitchWindows() { >+ // create an application with two windows >+ MApplication application = MApplicationFactory.eINSTANCE >+ .createApplication(); >+ MWindow window1 = MApplicationFactory.eINSTANCE.createWindow(); >+ MWindow window2 = MApplicationFactory.eINSTANCE.createWindow(); >+ application.getChildren().add(window1); >+ application.getChildren().add(window2); >+ >+ // place a part in the first window >+ MPart part = MApplicationFactory.eINSTANCE.createPart(); >+ window1.getChildren().add(part); >+ >+ // setup the context >+ applicationContext.set(MApplication.class.getName(), application); >+ application.setContext(applicationContext); >+ >+ // render the windows >+ engine.createGui(window1); >+ engine.createGui(window2); >+ >+ EPartService windowService1 = (EPartService) window1.getContext().get( >+ EPartService.class.getName()); >+ EPartService windowService2 = (EPartService) window2.getContext().get( >+ EPartService.class.getName()); >+ >+ assertNotNull(windowService1); >+ assertNotNull(windowService2); >+ >+ assertNull("There should be nothing active in the first window", >+ windowService1.getActivePart()); >+ assertNull("There should be nothing active in the second window", >+ windowService2.getActivePart()); >+ >+ // activate the part >+ windowService1.activate(part); >+ >+ assertEquals("The part should have been activated", part, >+ windowService1.getActivePart()); >+ assertNull("The second window has no parts, this should be null", >+ windowService2.getActivePart()); >+ >+ // now move the part over from the first window to the second window >+ window2.getChildren().add(part); >+ // activate the part >+ windowService2.activate(part); >+ >+ assertNull("No parts in this window, this should be null", >+ windowService1.getActivePart()); >+ assertEquals("We activated it just now, this should be active", part, >+ windowService2.getActivePart()); >+ } >+ > private MApplication createApplication(String partId) { > return createApplication(new String[] { partId }); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 295003
:
153159
|
153273
| 153815 |
155410
|
155599
|
155880
|
156933
|
157181
|
157513
|
157542