Source Code Cross Referenced for PluginRegistry.java in  » IDE-Eclipse » Eclipse-plug-in-development » org » eclipse » pde » core » 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 » IDE Eclipse » Eclipse plug in development » org.eclipse.pde.core.plugin 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*******************************************************************************
002:         * Copyright (c) 2007 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.pde.core.plugin;
011:
012:        import org.eclipse.core.resources.IProject;
013:        import org.eclipse.osgi.service.resolver.BundleDescription;
014:        import org.eclipse.pde.internal.core.PDECore;
015:
016:        /**
017:         * The central access point for models representing plug-ins found in the workspace
018:         * and in the targret platform.
019:         * <p>
020:         * This class provides static methods only; it is not intended to be
021:         * instantiated or subclassed by clients.
022:         * </p>
023:         * 
024:         * @since 3.3
025:         */
026:        public class PluginRegistry {
027:
028:            /**
029:             * Returns a model entry containing all workspace and target plug-ins by the given ID
030:             * 
031:             * @param id the plug-in ID
032:             * 
033:             * @return a model entry containing all workspace and target plug-ins by the given ID
034:             */
035:            public static ModelEntry findEntry(String id) {
036:                return PDECore.getDefault().getModelManager().findEntry(id);
037:            }
038:
039:            /**
040:             * Returns the plug-in model for the best match plug-in with the given ID.
041:             * A null value is returned if no such bundle is found in the workspace or target platform.
042:             * <p>
043:             * A workspace plug-in is always preferably returned over a target plug-in.
044:             * A plug-in that is checked/enabled on the Target Platform preference page is always
045:             * preferably returned over a target plug-in that is unchecked/disabled.
046:             * </p>
047:             * <p>
048:             * In the case of a tie among workspace plug-ins or among target plug-ins,
049:             * the plug-in with the highest version is returned.
050:             * </p>
051:             * <p>
052:             * In the case of a tie among more than one suitable plug-in that have the same version, 
053:             * one of those plug-ins is randomly returned.
054:             * </p>
055:             * 
056:             * @param id the plug-in ID
057:             * @return the plug-in model for the best match plug-in with the given ID
058:             */
059:            public static IPluginModelBase findModel(String id) {
060:                return PDECore.getDefault().getModelManager().findModel(id);
061:            }
062:
063:            /**
064:             * Returns the plug-in model corresponding to the given project, or <code>null</code>
065:             * if the project does not represent a plug-in project or if it contains a manifest file
066:             * that is malformed or missing vital information.
067:             * 
068:             * @param project the project
069:             * @return a plug-in model corresponding to the project or <code>null</code> if the project
070:             * 			is not a plug-in project
071:             */
072:            public static IPluginModelBase findModel(IProject project) {
073:                return PDECore.getDefault().getModelManager()
074:                        .findModel(project);
075:            }
076:
077:            /**
078:             * Returns a plug-in model associated with the given bundle description
079:             * 
080:             * @param desc the bundle description
081:             * 
082:             * @return a plug-in model associated with the given bundle description or <code>null</code>
083:             * 			if none exists
084:             */
085:            public static IPluginModelBase findModel(BundleDescription desc) {
086:                return PDECore.getDefault().getModelManager().findModel(desc);
087:            }
088:
089:            /**
090:             * Returns all plug-ins and fragments in the workspace as well as all plug-ins and fragments that are
091:             * checked on the Target Platform preference page.
092:             * <p>
093:             * If a workspace plug-in/fragment has the same ID as a target plug-in/fragment, the target counterpart
094:             * is skipped and not included.
095:             * </p>
096:             * <p>
097:             * Equivalent to <code>getActiveModels(true)</code>
098:             * </p>
099:             * 
100:             * @return   all plug-ins and fragments in the workspace as well as all plug-ins and fragments that are
101:             * 			checked on the Target Platform preference page.
102:             */
103:            public static IPluginModelBase[] getActiveModels() {
104:                return getActiveModels(true);
105:            }
106:
107:            /**
108:             * Returns all plug-ins and (possibly) fragments in the workspace as well as all plug-ins and (possibly)
109:             *  fragments that are checked on the Target Platform preference page.
110:             * <p>
111:             * If a workspace plug-in/fragment has the same ID as a target plug-in, the target counterpart
112:             * is skipped and not included.
113:             * </p>
114:             * <p>
115:             * The returned result includes fragments only if <code>includeFragments</code>
116:             * is set to true
117:             * </p>
118:             * @param includeFragments  a boolean indicating if fragments are desired in the returned
119:             *							result
120:             * @return all plug-ins and (possibly) fragments in the workspace as well as all plug-ins and 
121:             * (possibly) fragments that are checked on the Target Platform preference page.
122:             */
123:            public static IPluginModelBase[] getActiveModels(
124:                    boolean includeFragments) {
125:                return PDECore.getDefault().getModelManager().getActiveModels(
126:                        includeFragments);
127:            }
128:
129:            /**
130:             * Returns all plug-ins and fragments in the workspace as well as all target plug-ins and fragments, regardless 
131:             * whether or not they are checked or not on the Target Platform preference page.
132:             * <p>
133:             * If a workspace plug-in/fragment has the same ID as a target plug-in, the target counterpart
134:             * is skipped and not included.
135:             * </p>
136:             * <p>
137:             * Equivalent to <code>getAllModels(true)</code>
138:             * </p>
139:             * 
140:             * @return   all plug-ins and fragments in the workspace as well as all target plug-ins and fragments, regardless 
141:             * whether or not they are checked on the Target Platform preference page.
142:             */
143:            public static IPluginModelBase[] getAllModels() {
144:                return getAllModels(true);
145:            }
146:
147:            /**
148:             * Returns all plug-ins and (possibly) fragments in the workspace as well as all plug-ins 
149:             * and (possibly) fragments, regardless whether or not they are
150:             * checked on the Target Platform preference page.
151:             * <p>
152:             * If a workspace plug-in/fragment has the same ID as a target plug-in/fragment, the target counterpart
153:             * is skipped and not included.
154:             * </p>
155:             * <p>
156:             * The returned result includes fragments only if <code>includeFragments</code>
157:             * is set to true
158:             * </p>
159:             * @param includeFragments  a boolean indicating if fragments are desired in the returned
160:             *							result
161:             * @return ll plug-ins and (possibly) fragments in the workspace as well as all plug-ins 
162:             * and (possibly) fragments, regardless whether or not they are
163:             * checked on the Target Platform preference page.
164:             */
165:            public static IPluginModelBase[] getAllModels(
166:                    boolean includeFragments) {
167:                return PDECore.getDefault().getModelManager().getAllModels(
168:                        includeFragments);
169:            }
170:
171:            /**
172:             * Returns all plug-in models in the workspace
173:             * 
174:             * @return all plug-in models in the workspace
175:             */
176:            public static IPluginModelBase[] getWorkspaceModels() {
177:                return PDECore.getDefault().getModelManager()
178:                        .getWorkspaceModels();
179:            }
180:
181:            /**
182:             * Return the model manager that keeps track of plug-ins in the target platform
183:             * 
184:             * @return  the model manager that keeps track of plug-ins in the target platform
185:             */
186:            public static IPluginModelBase[] getExternalModels() {
187:                return PDECore.getDefault().getModelManager()
188:                        .getExternalModels();
189:            }
190:
191:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.