Source Code Cross Referenced for IntroPlugin.java in  » IDE-Eclipse » ui » org » eclipse » ui » internal » intro » impl » 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.internal.intro.impl 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*******************************************************************************
002:         * Copyright (c) 2004, 2006 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.internal.intro.impl;
011:
012:        import org.eclipse.core.runtime.Platform;
013:        import org.eclipse.jface.resource.ImageRegistry;
014:        import org.eclipse.ui.PlatformUI;
015:        import org.eclipse.ui.internal.intro.impl.model.IntroModelRoot;
016:        import org.eclipse.ui.internal.intro.impl.model.loader.ExtensionPointManager;
017:        import org.eclipse.ui.internal.intro.impl.presentations.IntroLaunchBar;
018:        import org.eclipse.ui.internal.intro.impl.util.Log;
019:        import org.eclipse.ui.intro.IIntroPart;
020:        import org.eclipse.ui.plugin.AbstractUIPlugin;
021:        import org.osgi.framework.BundleContext;
022:
023:        /**
024:         * Intro main plugin.
025:         */
026:        public class IntroPlugin extends AbstractUIPlugin {
027:            public static final String PLUGIN_ID = "org.eclipse.ui.intro"; //$NON-NLS-1$
028:
029:            // The static shared instance.
030:            private static IntroPlugin inst;
031:
032:            // We must keep track of the launch bar so that we can
033:            // close it if intro is opened from the menu.
034:            private IntroLaunchBar launchBar;
035:
036:            // used for performance logging. Time when the constructor of
037:            // CustomizableIntroPart is called.
038:            private long uiCreationStartTime;
039:
040:            // image registry that can be disposed while the
041:            // plug-in is still active. This is important for
042:            // switching themes after the plug-in has been loaded.
043:            private ImageRegistry volatileImageRegistry;
044:
045:            // debug options
046:            public static boolean DEBUG = false;
047:            public static boolean DEBUG_NO_BROWSER = false;
048:
049:            /**
050:             * The constructor.
051:             */
052:            public IntroPlugin() {
053:                super ();
054:            }
055:
056:            /**
057:             * Returns the shared plugin instance.
058:             */
059:            public static IntroPlugin getDefault() {
060:                return inst;
061:            }
062:
063:            public ImageRegistry getVolatileImageRegistry() {
064:                if (volatileImageRegistry == null) {
065:                    volatileImageRegistry = createImageRegistry();
066:                    initializeImageRegistry(volatileImageRegistry);
067:                }
068:                return volatileImageRegistry;
069:            }
070:
071:            public void resetVolatileImageRegistry() {
072:                if (volatileImageRegistry != null) {
073:                    volatileImageRegistry.dispose();
074:                    volatileImageRegistry = null;
075:                }
076:            }
077:
078:            public void closeLaunchBar() {
079:                if (launchBar != null) {
080:                    launchBar.close();
081:                    launchBar = null;
082:                }
083:            }
084:
085:            public void setLaunchBar(IntroLaunchBar launchBar) {
086:                this .launchBar = launchBar;
087:            }
088:
089:            /**
090:             * @return Returns the extensionPointManager.
091:             */
092:            public ExtensionPointManager getExtensionPointManager() {
093:                return ExtensionPointManager.getInst();
094:            }
095:
096:            /**
097:             * Returns the model root. Will always guarantee that model is loaded.
098:             * 
099:             * @return Returns the introModelRoot.
100:             */
101:            public IntroModelRoot getIntroModelRoot() {
102:                return getExtensionPointManager().getCurrentModel();
103:            }
104:
105:            /**
106:             * Returns the Intro Part.
107:             */
108:            public static IIntroPart getIntro() {
109:                IIntroPart introPart = PlatformUI.getWorkbench()
110:                        .getIntroManager().getIntro();
111:                return introPart;
112:            }
113:
114:            /**
115:             * Returns the Intro Part after forcing an open on it.
116:             */
117:            public static IIntroPart showIntro(boolean standby) {
118:                IIntroPart introPart = PlatformUI.getWorkbench()
119:                        .getIntroManager().showIntro(
120:                                PlatformUI.getWorkbench()
121:                                        .getActiveWorkbenchWindow(), standby);
122:                return introPart;
123:            }
124:
125:            /**
126:             * Returns the standby state of the Intro Part. If the intro is closed,
127:             * retruns false.
128:             */
129:            public static boolean isIntroStandby() {
130:                return PlatformUI.getWorkbench().getIntroManager()
131:                        .isIntroStandby(getIntro());
132:            }
133:
134:            /**
135:             * Sets the standby state of the Intro Part. If the intro is closed, retruns
136:             * false.
137:             */
138:            public static void setIntroStandby(boolean standby) {
139:                PlatformUI.getWorkbench().getIntroManager().setIntroStandby(
140:                        getIntro(), standby);
141:            }
142:
143:            /**
144:             * Returns the standby state of the Intro Part. If the intro is closed,
145:             * retruns false.
146:             */
147:            public static boolean closeIntro() {
148:                // Relies on Workbench.
149:                return PlatformUI.getWorkbench().getIntroManager().closeIntro(
150:                        getIntro());
151:            }
152:
153:            /*
154:             * (non-Javadoc)
155:             * 
156:             * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
157:             */
158:            public void start(BundleContext context) throws Exception {
159:                super .start(context);
160:                inst = this ;
161:                if (Log.logInfo)
162:                    Log.info("IntroPlugin - calling start on Intro bundle"); //$NON-NLS-1$
163:                // Setup debugging options
164:                DEBUG = isDebugging();
165:                if (DEBUG) {
166:                    DEBUG_NO_BROWSER = "true".equalsIgnoreCase(Platform.getDebugOption(PLUGIN_ID + "/flags/noBrowser")); //$NON-NLS-1$ //$NON-NLS-2$
167:                }
168:
169:            }
170:
171:            /*
172:             * (non-Javadoc)
173:             * 
174:             * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
175:             */
176:            public void stop(BundleContext context) throws Exception {
177:                resetVolatileImageRegistry();
178:                super .stop(context);
179:            }
180:
181:            public long gettUICreationStartTime() {
182:                return uiCreationStartTime;
183:            }
184:
185:            public void setUICreationStartTime(long uiCreationStartTime) {
186:                this.uiCreationStartTime = uiCreationStartTime;
187:            }
188:
189:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.