Lines 1-3
Link Here
|
|
|
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2005 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
6 |
* http://www.eclipse.org/legal/epl-v10.html |
7 |
* |
8 |
* Contributors: |
9 |
* IBM Corporation - initial API and implementation |
10 |
*******************************************************************************/ |
1 |
package org.eclipse.ui.tests.multieditor; |
11 |
package org.eclipse.ui.tests.multieditor; |
2 |
|
12 |
|
3 |
import java.io.IOException; |
13 |
import java.io.IOException; |
Lines 74-92
Link Here
|
74 |
private static String[] gEditorOpenTrace = { "setInitializationData", |
84 |
private static String[] gEditorOpenTrace = { "setInitializationData", |
75 |
"init", "createPartControl", "createInnerPartControl", |
85 |
"init", "createPartControl", "createInnerPartControl", |
76 |
"createInnerPartControl", "setFocus", "updateGradient", |
86 |
"createInnerPartControl", "setFocus", "updateGradient", |
77 |
"updateGradient", "updateGradient", }; |
87 |
"updateGradient", }; |
78 |
|
88 |
|
79 |
private static String[] gEditorFocusTrace = { "setInitializationData", |
89 |
private static String[] gEditorFocusTrace = { "setInitializationData", |
80 |
"init", "createPartControl", "createInnerPartControl", |
90 |
"init", "createPartControl", "createInnerPartControl", |
81 |
"createInnerPartControl", "setFocus", "updateGradient", |
91 |
"createInnerPartControl", "setFocus", "updateGradient", |
82 |
"updateGradient", "updateGradient", "setFocus", "updateGradient", |
92 |
"updateGradient", "updateGradient", |
83 |
"updateGradient", "updateGradient", }; |
93 |
"updateGradient", }; |
84 |
|
94 |
|
85 |
private static String[] gEditorCloseTrace = { "setInitializationData", |
95 |
private static String[] gEditorCloseTrace = { "setInitializationData", |
86 |
"init", "createPartControl", "createInnerPartControl", |
96 |
"init", "createPartControl", "createInnerPartControl", |
87 |
"createInnerPartControl", "setFocus", "updateGradient", |
97 |
"createInnerPartControl", "setFocus", "updateGradient", |
88 |
"updateGradient", "updateGradient", "setFocus", "updateGradient", |
98 |
"updateGradient", "updateGradient", |
89 |
"updateGradient", "updateGradient", "widgetsDisposed", "dispose" }; |
99 |
"updateGradient", "widgetsDisposed", "dispose" }; |
90 |
|
100 |
|
91 |
public static TestSuite suite() { |
101 |
public static TestSuite suite() { |
92 |
return new TestSuite(MultiEditorTest.class); |
102 |
return new TestSuite(MultiEditorTest.class); |
Lines 159-164
Link Here
|
159 |
// listHistory(((TiledEditor) multiEditor).callHistory); |
169 |
// listHistory(((TiledEditor) multiEditor).callHistory); |
160 |
|
170 |
|
161 |
// check the public API called for opening the TiledEditor |
171 |
// check the public API called for opening the TiledEditor |
|
|
172 |
// ((TiledEditor) multiEditor).callHistory.printToConsole(); |
162 |
assertTrue("The editor open trace was incorrect", |
173 |
assertTrue("The editor open trace was incorrect", |
163 |
((TiledEditor) multiEditor).callHistory |
174 |
((TiledEditor) multiEditor).callHistory |
164 |
.verifyOrder(gEditorOpenTrace)); |
175 |
.verifyOrder(gEditorOpenTrace)); |
Lines 170-175
Link Here
|
170 |
|
181 |
|
171 |
chewUpEvents(); |
182 |
chewUpEvents(); |
172 |
|
183 |
|
|
|
184 |
// ((TiledEditor) multiEditor).callHistory.printToConsole(); |
173 |
assertTrue("Editor setFocus trace was incorrect", |
185 |
assertTrue("Editor setFocus trace was incorrect", |
174 |
((TiledEditor) multiEditor).callHistory |
186 |
((TiledEditor) multiEditor).callHistory |
175 |
.verifyOrder(gEditorFocusTrace)); |
187 |
.verifyOrder(gEditorFocusTrace)); |
Lines 178-183
Link Here
|
178 |
|
190 |
|
179 |
chewUpEvents(); |
191 |
chewUpEvents(); |
180 |
|
192 |
|
|
|
193 |
// ((TiledEditor) multiEditor).callHistory.printToConsole(); |
181 |
assertTrue("Editor close trace was incorrect", |
194 |
assertTrue("Editor close trace was incorrect", |
182 |
((TiledEditor) multiEditor).callHistory |
195 |
((TiledEditor) multiEditor).callHistory |
183 |
.verifyOrder(gEditorCloseTrace)); |
196 |
.verifyOrder(gEditorCloseTrace)); |
Lines 305-310
Link Here
|
305 |
* @return the IContributionItem for the test editor cool bar. |
318 |
* @return the IContributionItem for the test editor cool bar. |
306 |
*/ |
319 |
*/ |
307 |
private IContributionItem findMyCoolBar(WorkbenchPage page) { |
320 |
private IContributionItem findMyCoolBar(WorkbenchPage page) { |
|
|
321 |
//listItems(page); |
308 |
IContributionItem contribution = ((IActionBars2) page.getActionBars()) |
322 |
IContributionItem contribution = ((IActionBars2) page.getActionBars()) |
309 |
.getCoolBarManager().find(TESTEDITOR_COOLBAR); |
323 |
.getCoolBarManager().find(TESTEDITOR_COOLBAR); |
310 |
// assertNotNull(contribution); |
324 |
// assertNotNull(contribution); |