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


001:        /*******************************************************************************
002:         * Copyright (c) 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.navigator;
011:
012:        import org.eclipse.core.runtime.IStatus;
013:        import org.eclipse.core.runtime.Status;
014:        import org.eclipse.ui.plugin.AbstractUIPlugin;
015:
016:        /**
017:         * 
018:         * Not exposed as API.
019:         * @since 3.2
020:         *
021:         */
022:        public class NavigatorTestsPlugin extends AbstractUIPlugin {
023:
024:            //The shared instance.
025:            private static NavigatorTestsPlugin plugin;
026:            /**
027:             * The plugin id
028:             */
029:            public static String PLUGIN_ID = "org.eclipse.ui.tests.navigator"; //$NON-NLS-1$
030:
031:            /**
032:             * Creates a new instance of the receiver
033:             */
034:            public NavigatorTestsPlugin() {
035:                super ();
036:                plugin = this ;
037:            }
038:
039:            /**
040:             * Returns the shared instance.
041:             */
042:            public static NavigatorTestsPlugin getDefault() {
043:                return plugin;
044:            }
045:
046:            /**
047:             * Log the given status to the ISV log.
048:             * 
049:             * When to use this:
050:             * 
051:             * This should be used when a PluginException or a ExtensionException occur but for which an
052:             * error dialog cannot be safely shown.
053:             * 
054:             * If you can show an ErrorDialog then do so, and do not call this method.
055:             * 
056:             * If you have a plugin exception or core exception in hand call log(String, IStatus)
057:             * 
058:             * This convenience method is for internal use by the Workbench only and must not be called
059:             * outside the workbench.
060:             * 
061:             * This method is supported in the event the log allows plugin related information to be logged
062:             * (1FTTJKV). This would be done by this method.
063:             * 
064:             * This method is internal to the workbench and must not be called by any plugins, or examples.
065:             * 
066:             * @param message
067:             *            A high level UI message describing when the problem happened.
068:             *  
069:             */
070:
071:            public static void log(String message) {
072:                getDefault().getLog().log(
073:                        new Status(IStatus.ERROR, PLUGIN_ID, 0, message, null));
074:                System.err.println(message);
075:                //1FTTJKV: ITPCORE:ALL - log(status) does not allow plugin information to be recorded
076:            }
077:
078:            /**
079:             * Logs errors.
080:             */
081:            public static void log(String message, IStatus status) {
082:                if (message != null) {
083:                    getDefault().getLog().log(
084:                            new Status(IStatus.ERROR, PLUGIN_ID, 0, message,
085:                                    null));
086:                    System.err.println(message + "\nReason:"); //$NON-NLS-1$
087:                }
088:                getDefault().getLog().log(status);
089:                System.err.println(status.getMessage());
090:            }
091:
092:            public static void logError(int aCode, String aMessage,
093:                    Throwable anException) {
094:                getDefault().getLog().log(
095:                        createErrorStatus(aCode, aMessage, anException));
096:            }
097:
098:            public static void log(int severity, int aCode, String aMessage,
099:                    Throwable exception) {
100:                log(createStatus(severity, aCode, aMessage, exception));
101:            }
102:
103:            public static void log(IStatus aStatus) {
104:                getDefault().getLog().log(aStatus);
105:            }
106:
107:            public static IStatus createStatus(int severity, int aCode,
108:                    String aMessage, Throwable exception) {
109:                return new Status(severity, PLUGIN_ID, aCode, aMessage,
110:                        exception);
111:            }
112:
113:            public static IStatus createErrorStatus(int aCode, String aMessage,
114:                    Throwable exception) {
115:                return createStatus(IStatus.ERROR, aCode, aMessage, exception);
116:            }
117:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.