Source Code Cross Referenced for UmletPlugin.java in  » UML » umlet » com » umlet » plugin » 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 » UML » umlet » com.umlet.plugin 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // The UMLet source code is distributed under the terms of the GPL; see license.txt
002:        package com.umlet.plugin;
003:
004:        import org.osgi.framework.BundleContext;
005:        import org.eclipse.ui.plugin.*;
006:        import org.eclipse.core.resources.*;
007:
008:        import java.io.IOException;
009:        import java.net.URL;
010:        import java.util.*;
011:        import org.eclipse.core.runtime.Platform;
012:        import org.eclipse.core.runtime.Path;
013:
014:        /**
015:         * The main plugin class to be used in the desktop.
016:         */
017:        public class UmletPlugin extends AbstractUIPlugin {
018:            //The shared instance.
019:            private static UmletPlugin plugin;
020:            //Resource bundle.
021:            private ResourceBundle resourceBundle;
022:
023:            /**
024:             * The constructor.
025:             * [UB]: Changed to default constructor
026:             *       for eclipse-3.0 compatibility
027:             */
028:            public UmletPlugin() {
029:                super ();
030:                plugin = this ;
031:                try {
032:                    resourceBundle = ResourceBundle
033:                            .getBundle("com.umlet.plugin.UmletPluginResources");
034:                } catch (MissingResourceException x) {
035:                    resourceBundle = null;
036:                }
037:            }
038:
039:            /**
040:             * This method is called upon plug-in activation
041:             * [UB]: added this standard method
042:             */
043:            public void start(BundleContext context) throws Exception {
044:                super .start(context);
045:            }
046:
047:            /**
048:             * This method is called when the plug-in is stopped
049:             * [UB]: added this standard method
050:             */
051:            public void stop(BundleContext context) throws Exception {
052:                super .stop(context);
053:            }
054:
055:            /**
056:             * Returns the shared instance.
057:             */
058:            public static UmletPlugin getDefault() {
059:                return plugin;
060:            }
061:
062:            /**
063:             * Returns the workspace instance.
064:             */
065:            public static IWorkspace getWorkspace() {
066:                return ResourcesPlugin.getWorkspace();
067:            }
068:
069:            /**
070:             * Returns the string from the plugin's resource bundle,
071:             * or 'key' if not found.
072:             */
073:            public static String getResourceString(String key) {
074:                ResourceBundle bundle = UmletPlugin.getDefault()
075:                        .getResourceBundle();
076:                try {
077:                    return bundle.getString(key);
078:                } catch (MissingResourceException e) {
079:                    return key;
080:                }
081:            }
082:
083:            /**
084:             * Returns the plugin's resource bundle,
085:             */
086:            public ResourceBundle getResourceBundle() {
087:                return resourceBundle;
088:            }
089:
090:            public static String getHomePath() {
091:                String thePath = null;
092:                try { //LME: load palette from plugin's homedirectory
093:                    //System.out.println("loading palette from url...");
094:                    URL homeURL = Platform.find(UmletPlugin.getDefault()
095:                            .getBundle(), new Path("/"));
096:
097:                    //LME: truncate the URL string to an absolute directory path
098:                    thePath = Platform.asLocalURL(homeURL).toString()
099:                            .substring(new String("file:/").length());
100:                    if (System.getProperty("file.separator").equals("/")) //[UB]: if UNIX
101:                        thePath = "/" + thePath;
102:                } catch (IOException ioe) {
103:                    System.err.println("Umlet->init():" + ioe);
104:                }
105:                return thePath;
106:            }
107:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.