Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2007-05-17 22:28:38 +0000
committerChris Goldthorpe2007-05-17 22:28:38 +0000
commitce434d75340ae86bb96e19cb223334f62620878d (patch)
tree0ac892fe9204368f9e97da1c831182470e4b9228
parent21ca9df8f56e25fa18012645680e0071934e731b (diff)
downloadeclipse.platform.ua-perf_32x.tar.gz
eclipse.platform.ua-perf_32x.tar.xz
eclipse.platform.ua-perf_32x.zip
-rw-r--r--org.eclipse.ua.tests/forms/org/eclipse/ua/tests/forms/performance/FormsPerformanceTest.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/org.eclipse.ua.tests/forms/org/eclipse/ua/tests/forms/performance/FormsPerformanceTest.java b/org.eclipse.ua.tests/forms/org/eclipse/ua/tests/forms/performance/FormsPerformanceTest.java
index d66a98091..052d4e31b 100644
--- a/org.eclipse.ua.tests/forms/org/eclipse/ua/tests/forms/performance/FormsPerformanceTest.java
+++ b/org.eclipse.ua.tests/forms/org/eclipse/ua/tests/forms/performance/FormsPerformanceTest.java
@@ -48,6 +48,9 @@ public class FormsPerformanceTest extends PerformanceTestCase {
// Warm up.
Display display = PlatformUI.getWorkbench().getDisplay();
+
+ FormToolkit toolkit;
+ toolkit = new FormToolkit(display);
for(int samples = 0; samples < 2; samples++) {
Shell shell = new Shell(display);
shell.setSize(400, 300);
@@ -57,7 +60,7 @@ public class FormsPerformanceTest extends PerformanceTestCase {
for (int i = 0; i < 5; i++) {
Composite c = new Composite(shell, SWT.H_SCROLL + SWT.V_SCROLL);
c.setLayout(new FillLayout());
- createPartControl(c);
+ createPartControl(c, toolkit);
shell.layout(true);
while(display.readAndDispatch()){/*empty*/}
c.dispose();
@@ -75,7 +78,7 @@ public class FormsPerformanceTest extends PerformanceTestCase {
for (int i = 0; i < 3; i++) {
Composite c = new Composite(shell, SWT.H_SCROLL + SWT.V_SCROLL);
c.setLayout(new FillLayout());
- createPartControl(c);
+ createPartControl(c, toolkit);
shell.layout(true);
while(display.readAndDispatch()){/*empty*/}
c.dispose();
@@ -84,16 +87,15 @@ public class FormsPerformanceTest extends PerformanceTestCase {
shell.dispose();
while(display.readAndDispatch()){/*empty*/}
}
+ toolkit.dispose();
commitMeasurements();
assertPerformance();
}
- public void createPartControl(Composite parent) {
+ public void createPartControl(Composite parent, FormToolkit toolkit) {
//Label l = new Label(parent, SWT.NULL);
//l.setText ("a label");
- FormToolkit toolkit;
ScrolledForm form;
- toolkit = new FormToolkit(parent.getDisplay());
form = toolkit.createScrolledForm(parent);
form.setText("Hello, Eclipse Forms");
TableWrapLayout layout = new TableWrapLayout();

Back to the top