Source Code Cross Referenced for OpenWorkbenchIntervalMonitor.java in  » IDE-Eclipse » ui » org » eclipse » ui » tests » rcp » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » ui » org.eclipse.ui.tests.rcp.util 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*******************************************************************************
002:         * Copyright (c) 2004, 2005 IBM Corporation and others.
003:         * All rights reserved. This program and the accompanying materials
004:         * are made available under the terms of the Eclipse Public License v1.0
005:         * which accompanies this distribution, and is available at
006:         * http://www.eclipse.org/legal/epl-v10.html
007:         *
008:         * Contributors:
009:         *     IBM Corporation - initial API and implementation
010:         *******************************************************************************/package org.eclipse.ui.tests.rcp.util;
011:
012:        import org.eclipse.ui.IWorkbenchWindow;
013:        import org.eclipse.ui.application.IActionBarConfigurer;
014:        import org.eclipse.ui.application.IWorkbenchConfigurer;
015:        import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
016:
017:        /**
018:         * This implementation of the workbench advisor tracks performance for the intervals between
019:         * lifecycle events.
020:         * 
021:         * @since 3.1
022:         */
023:        public class OpenWorkbenchIntervalMonitor extends
024:                RCPTestWorkbenchAdvisor {
025:
026:            public static final String[] intervalNames = new String[] { "open", //$NON-NLS-1$
027:                    "close" //$NON-NLS-1$
028:            };
029:
030:            public static final int openInterval = 0;
031:            public static final int closeInterval = 1;
032:
033:            public static final int firstInterval = openInterval;
034:            public static final int finalInterval = closeInterval;
035:
036:            //    public static final String[] intervalNames = new String[] {
037:            //            "to initialize", //$NON-NLS-1$
038:            //            "initialize to preStartup", //$NON-NLS-1$
039:            //            "preStartup to preWindowOpen", //$NON-NLS-1$
040:            //            "preWindowOpen to fillActionBars", //$NON-NLS-1$
041:            //            "fillActionBars to postWindowOpen", //$NON-NLS-1$
042:            //            "postWindowOpen to postStartup", //$NON-NLS-1$
043:            //            "preShutdown to postShutdown", //$NON-NLS-1$
044:            //            "postShutdown to complete" //$NON-NLS-1$
045:            //    };
046:            //
047:            //    public static final int initializeInterval = 0;
048:            //    public static final int preStartupInterval = 1;
049:            //    public static final int preWindowOpenInterval = 2;
050:            //    public static final int fillActionBarsInterval = 3;
051:            //    public static final int postWindowOpenInterval = 4;
052:            //    public static final int postStartupInterval = 5;
053:            //    public static final int shutdownInterval = 6;
054:            //    public static final int workbenchDestroyedInterval = 7;
055:            //
056:            //    public static final int firstInterval = initializeInterval;
057:            //    public static final int finalInterval = workbenchDestroyedInterval;
058:
059:            private IPerformanceMeterArray meters;
060:
061:            public OpenWorkbenchIntervalMonitor(IPerformanceMeterArray meters) {
062:                super (2);
063:                this .meters = meters;
064:            }
065:
066:            public void initialize(IWorkbenchConfigurer configurer) {
067:                //        meters.stop(initializeInterval);
068:                //        meters.start(preStartupInterval);
069:                super .initialize(configurer);
070:            }
071:
072:            public void preStartup() {
073:                //        meters.stop(preStartupInterval);
074:                //        meters.start(preWindowOpenInterval);
075:                super .preStartup();
076:            }
077:
078:            public void preWindowOpen(IWorkbenchWindowConfigurer configurer) {
079:                //        meters.stop(preWindowOpenInterval);
080:                //        meters.start(fillActionBarsInterval);
081:                super .preWindowOpen(configurer);
082:            }
083:
084:            public void fillActionBars(IWorkbenchWindow window,
085:                    IActionBarConfigurer configurer, int flags) {
086:                //        meters.stop(fillActionBarsInterval);
087:                //        meters.start(postWindowOpenInterval);
088:                super .fillActionBars(window, configurer, flags);
089:
090:            }
091:
092:            public void postWindowOpen(IWorkbenchWindowConfigurer configurer) {
093:                //        meters.stop(postWindowOpenInterval);
094:                //        meters.start(postStartupInterval);
095:                super .postWindowOpen(configurer);
096:            }
097:
098:            public void postStartup() {
099:                //        meters.stop(postStartupInterval);
100:                meters.stop(openInterval);
101:
102:                // no reason to track performace between when startup completes and shutdown starts
103:                // since that is just testing overhead
104:
105:                super .postStartup();
106:            }
107:
108:            public boolean preShutdown() {
109:                //        meters.start(shutdownInterval);
110:                meters.start(closeInterval);
111:                return super .preShutdown();
112:            }
113:
114:            public void postShutdown() {
115:                //        meters.stop(shutdownInterval);
116:                //        meters.start(workbenchDestroyedInterval);
117:                super.postShutdown();
118:            }
119:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.