aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Besedin2011-09-02 11:02:45 (EDT)
committerOleg Besedin2011-09-02 11:02:45 (EDT)
commit4c13dcddf2f21bd192123da6bfd65e4e2c55ddb7 (patch)
treefef78543055ba61bad35d805f454c7a1e696d0f2
parentd2a6aedea222ef6458553447378b81ac570c13a9 (diff)
downloadeclipse.platform.ui-4c13dcddf2f21bd192123da6bfd65e4e2c55ddb7.zip
eclipse.platform.ui-4c13dcddf2f21bd192123da6bfd65e4e2c55ddb7.tar.gz
eclipse.platform.ui-4c13dcddf2f21bd192123da6bfd65e4e2c55ddb7.tar.bz2
Bug 356605 - Performance tests have compile errors in 4.x stream
-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 601f73a..21a4fff 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 16def55..20a37c3 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 fe77728..a1c9d50 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 5d7784c..7c6a5d6 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 6bf28c8..9030e20 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 4724bf0..0621c34 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() {