Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/org.eclipse.ui.tests.performance/META-INF/MANIFEST.MF3
-rw-r--r--tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/EditorWidgetFactory.java10
-rw-r--r--tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/PresentationWidgetFactory.java11
-rw-r--r--tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/ViewWidgetFactory.java10
-rw-r--r--tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationPerformanceTestSuite.java69
-rw-r--r--tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationTestbed.java5
6 files changed, 51 insertions, 57 deletions
diff --git a/tests/org.eclipse.ui.tests.performance/META-INF/MANIFEST.MF b/tests/org.eclipse.ui.tests.performance/META-INF/MANIFEST.MF
index 601f73a2a67..21a4fffca6b 100644
--- a/tests/org.eclipse.ui.tests.performance/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.ui.tests.performance/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: Performance Plug-in
Bundle-ClassPath: uiperformance.jar
Bundle-SymbolicName: org.eclipse.ui.tests.performance;singleton:=true
-Bundle-Version: 1.1.200.qualifier
+Bundle-Version: 1.1.300.qualifier
Bundle-Activator: org.eclipse.ui.tests.performance.UIPerformancePlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
@@ -17,6 +17,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.jface.text,
org.eclipse.ui.editors,
org.eclipse.ui.workbench.texteditor,
+ org.eclipse.e4.ui.model.workbench,
org.eclipse.ui.views
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/EditorWidgetFactory.java b/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/EditorWidgetFactory.java
index 16def5535ce..20a37c3442e 100644
--- a/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/EditorWidgetFactory.java
+++ b/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/EditorWidgetFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
@@ -25,7 +26,6 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.WorkbenchException;
import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.internal.EditorSite;
-import org.eclipse.ui.internal.PartPane;
import org.eclipse.ui.tests.harness.util.EmptyPerspective;
import org.eclipse.ui.tests.harness.util.UITestCase;
import org.eclipse.ui.tests.performance.UIPerformanceTestSetup;
@@ -52,10 +52,8 @@ public class EditorWidgetFactory extends TestWidgetFactory {
public static Composite getControl(IEditorPart part) {
EditorSite site = (EditorSite)part.getSite();
-
- PartPane pane = site.getPane();
-
- return (Composite)pane.getControl();
+ MPart modelPart = site.getModel();
+ return (Composite) modelPart.getWidget();
}
/* (non-Javadoc)
diff --git a/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/PresentationWidgetFactory.java b/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/PresentationWidgetFactory.java
index fe77728e248..a1c9d508758 100644
--- a/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/PresentationWidgetFactory.java
+++ b/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/PresentationWidgetFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -18,7 +18,6 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.WorkbenchException;
-import org.eclipse.ui.internal.presentations.PresentationFactoryUtil;
import org.eclipse.ui.presentations.AbstractPresentationFactory;
import org.eclipse.ui.tests.performance.UIPerformancePlugin;
import org.eclipse.ui.tests.performance.presentations.PresentationTestbed;
@@ -79,10 +78,10 @@ public class PresentationWidgetFactory extends TestWidgetFactory {
String typeDesc = "unknown";
switch(type) {
- case PresentationFactoryUtil.ROLE_EDITOR: typeDesc = "editor"; break;
- case PresentationFactoryUtil.ROLE_STANDALONE: typeDesc = "standalone with title"; break;
- case PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE: typeDesc = "standalone without title"; break;
- case PresentationFactoryUtil.ROLE_VIEW: typeDesc = "view"; break;
+// case PresentationFactoryUtil.ROLE_EDITOR: typeDesc = "editor"; break;
+// case PresentationFactoryUtil.ROLE_STANDALONE: typeDesc = "standalone with title"; break;
+// case PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE: typeDesc = "standalone without title"; break;
+// case PresentationFactoryUtil.ROLE_VIEW: typeDesc = "view"; break;
}
return "Presentation " + factory.getId() + " " + typeDesc;
diff --git a/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/ViewWidgetFactory.java b/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/ViewWidgetFactory.java
index 5d7784cdce7..7c6a5d6d6cc 100644
--- a/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/ViewWidgetFactory.java
+++ b/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/layout/ViewWidgetFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.ui.tests.performance.layout;
import junit.framework.Assert;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
@@ -21,7 +22,6 @@ import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.WorkbenchException;
-import org.eclipse.ui.internal.PartPane;
import org.eclipse.ui.internal.ViewSite;
import org.eclipse.ui.tests.harness.util.EmptyPerspective;
import org.eclipse.ui.tests.harness.util.UITestCase;
@@ -50,10 +50,8 @@ public class ViewWidgetFactory extends TestWidgetFactory {
public static Composite getControl(IViewPart part) {
ViewSite site = (ViewSite)part.getSite();
-
- PartPane pane = site.getPane();
-
- return (Composite)pane.getControl();
+ MPart modelPart = site.getModel();
+ return (Composite) modelPart.getWidget();
}
/* (non-Javadoc)
diff --git a/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationPerformanceTestSuite.java b/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationPerformanceTestSuite.java
index 6bf28c8b5e2..9030e2073ed 100644
--- a/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationPerformanceTestSuite.java
+++ b/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationPerformanceTestSuite.java
@@ -21,11 +21,8 @@ import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.Platform;
import org.eclipse.ui.internal.WorkbenchPlugin;
-import org.eclipse.ui.internal.presentations.PresentationFactoryUtil;
import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
import org.eclipse.ui.presentations.AbstractPresentationFactory;
-import org.eclipse.ui.tests.performance.layout.PresentationWidgetFactory;
-import org.eclipse.ui.tests.performance.layout.ResizeTest;
/**
* @since 3.1
@@ -53,43 +50,45 @@ public class PresentationPerformanceTestSuite extends TestSuite {
}
}
+ // TBD Does it make sense to keep those in 4.x? They should be replaced
+ // by CSS styling performance tests in SWT
private void addTests(String presentationId) {
AbstractPresentationFactory factory = WorkbenchPlugin.getDefault().getPresentationFactory(presentationId);
boolean r21Presentation = "org.eclipse.ui.internal.r21presentationFactory".equals(presentationId);
- addTest(new PresentationInactivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 5));
- addTest(new PresentationInactivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_VIEW, 5));
-
- addTest(new PresentationActivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 5, false));
- addTest(new PresentationActivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_VIEW, 5, false));
- addTest(new PresentationActivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_STANDALONE, 1, false));
- if(r21Presentation)
- addTest(new PresentationActivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE, 1, false));
-
- addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 100, "large folder creation"));
- addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_VIEW, 100, "large folder creation"));
-
- addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 5));
- addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_VIEW, 5));
- addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_STANDALONE, 1));
- if (r21Presentation)
- addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE, 1));
-
- addTest(new PresentationSelectTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 100));
- addTest(new PresentationSelectTest(factory, PresentationFactoryUtil.ROLE_VIEW, 100));
-
- addTest(new PresentationActivateTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 5));
- addTest(new PresentationActivateTest(factory, PresentationFactoryUtil.ROLE_VIEW, 5));
- addTest(new PresentationActivateTest(factory, PresentationFactoryUtil.ROLE_STANDALONE, 1));
- if(r21Presentation)
- addTest(new PresentationActivateTest(factory, PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE, 1));
-
- addTest(new ResizeTest(new PresentationWidgetFactory(factory, PresentationFactoryUtil.ROLE_EDITOR, 5)));
- addTest(new ResizeTest(new PresentationWidgetFactory(factory, PresentationFactoryUtil.ROLE_VIEW, 5)));
- addTest(new ResizeTest(new PresentationWidgetFactory(factory, PresentationFactoryUtil.ROLE_STANDALONE, 1)));
- if (r21Presentation)
- addTest(new ResizeTest(new PresentationWidgetFactory(factory, PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE, 1)));
+// addTest(new PresentationInactivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 5));
+// addTest(new PresentationInactivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_VIEW, 5));
+//
+// addTest(new PresentationActivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 5, false));
+// addTest(new PresentationActivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_VIEW, 5, false));
+// addTest(new PresentationActivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_STANDALONE, 1, false));
+// if(r21Presentation)
+// addTest(new PresentationActivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE, 1, false));
+//
+// addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 100, "large folder creation"));
+// addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_VIEW, 100, "large folder creation"));
+//
+// addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 5));
+// addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_VIEW, 5));
+// addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_STANDALONE, 1));
+// if (r21Presentation)
+// addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE, 1));
+//
+// addTest(new PresentationSelectTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 100));
+// addTest(new PresentationSelectTest(factory, PresentationFactoryUtil.ROLE_VIEW, 100));
+//
+// addTest(new PresentationActivateTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 5));
+// addTest(new PresentationActivateTest(factory, PresentationFactoryUtil.ROLE_VIEW, 5));
+// addTest(new PresentationActivateTest(factory, PresentationFactoryUtil.ROLE_STANDALONE, 1));
+// if(r21Presentation)
+// addTest(new PresentationActivateTest(factory, PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE, 1));
+//
+// addTest(new ResizeTest(new PresentationWidgetFactory(factory, PresentationFactoryUtil.ROLE_EDITOR, 5)));
+// addTest(new ResizeTest(new PresentationWidgetFactory(factory, PresentationFactoryUtil.ROLE_VIEW, 5)));
+// addTest(new ResizeTest(new PresentationWidgetFactory(factory, PresentationFactoryUtil.ROLE_STANDALONE, 1)));
+// if (r21Presentation)
+// addTest(new ResizeTest(new PresentationWidgetFactory(factory, PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE, 1)));
}
diff --git a/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationTestbed.java b/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationTestbed.java
index 4724bf02209..0621c342593 100644
--- a/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationTestbed.java
+++ b/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationTestbed.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -27,7 +27,6 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Layout;
import org.eclipse.ui.ISizeProvider;
import org.eclipse.ui.internal.DefaultStackPresentationSite;
-import org.eclipse.ui.internal.presentations.PresentationFactoryUtil;
import org.eclipse.ui.presentations.AbstractPresentationFactory;
import org.eclipse.ui.presentations.IPresentablePart;
import org.eclipse.ui.presentations.IStackPresentationSite;
@@ -64,7 +63,7 @@ public class PresentationTestbed {
};
public PresentationTestbed(Composite parentComposite, AbstractPresentationFactory factory, int type) {
- presentation = PresentationFactoryUtil.createPresentation(factory, type, parentComposite, site, null, null);
+// presentation = PresentationFactoryUtil.createPresentation(factory, type, parentComposite, site, null, null);
site.setPresentation(presentation);
control = new Composite(parentComposite, SWT.NONE);
control.addControlListener(new ControlListener() {

Back to the top