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


001:        /*******************************************************************************
002:         * Copyright (c) 2000, 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.internal.core.plugin;
011:
012:        import java.io.PrintWriter;
013:
014:        import org.eclipse.core.runtime.CoreException;
015:        import org.eclipse.core.runtime.IExtensionPoint;
016:        import org.eclipse.pde.core.plugin.IFragment;
017:        import org.eclipse.pde.core.plugin.IPluginBase;
018:        import org.eclipse.pde.core.plugin.IPluginExtensionPoint;
019:        import org.eclipse.pde.core.plugin.IPluginModelBase;
020:
021:        public class PluginExtensionPoint extends IdentifiablePluginObject
022:                implements  IPluginExtensionPoint {
023:
024:            private static final long serialVersionUID = 1L;
025:
026:            private IExtensionPoint fPoint = null;
027:
028:            protected String fSchema;
029:
030:            public PluginExtensionPoint() {
031:            }
032:
033:            public PluginExtensionPoint(IExtensionPoint point) {
034:                fPoint = point;
035:            }
036:
037:            public boolean isValid() {
038:                return getId() != null && getName() != null;
039:            }
040:
041:            public String getFullId() {
042:                if (fPoint != null)
043:                    return fPoint.getUniqueIdentifier();
044:                String pointId = getId();
045:                IPluginModelBase modelBase = getPluginModel();
046:                IPluginBase pluginBase = modelBase.getPluginBase();
047:                if ("3.2".equals(pluginBase.getSchemaVersion())) { //$NON-NLS-1$
048:                    if (pointId.indexOf('.') > 0)
049:                        return pointId;
050:                }
051:
052:                if (pluginBase instanceof  IFragment)
053:                    return ((IFragment) pluginBase).getPluginId() + '.'
054:                            + pointId;
055:                return pluginBase.getId() + '.' + pointId;
056:            }
057:
058:            public String getSchema() {
059:                if (fSchema == null && fPoint != null)
060:                    fSchema = fPoint.getSchemaReference();
061:                return fSchema;
062:            }
063:
064:            public boolean equals(Object obj) {
065:                if (obj == this )
066:                    return true;
067:                if (obj instanceof  IPluginExtensionPoint) {
068:                    IPluginExtensionPoint target = (IPluginExtensionPoint) obj;
069:                    // Objects from the same model must be
070:                    // binary equal
071:                    if (target.getModel().equals(getModel()))
072:                        return false;
073:                    if (stringEqualWithNull(target.getId(), getId())
074:                            && stringEqualWithNull(target.getName(), getName())
075:                            && stringEqualWithNull(target.getSchema(),
076:                                    getSchema()))
077:                        return true;
078:                }
079:                return false;
080:            }
081:
082:            public void setSchema(String newSchema) throws CoreException {
083:                ensureModelEditable();
084:                String oldValue = fSchema;
085:                fSchema = newSchema;
086:                firePropertyChanged(P_SCHEMA, oldValue, fSchema);
087:            }
088:
089:            public void restoreProperty(String name, Object oldValue,
090:                    Object newValue) throws CoreException {
091:                if (name.equals(P_SCHEMA)) {
092:                    setSchema(newValue != null ? newValue.toString() : null);
093:                    return;
094:                }
095:                super .restoreProperty(name, oldValue, newValue);
096:            }
097:
098:            public void write(String indent, PrintWriter writer) {
099:                writer.print(indent);
100:                writer.print("<extension-point"); //$NON-NLS-1$
101:                if (getId() != null)
102:                    writer.print(" id=\"" + getWritableString(getId()) + "\""); //$NON-NLS-1$ //$NON-NLS-2$
103:                if (getName() != null)
104:                    writer
105:                            .print(" name=\"" + getWritableString(getName()) + "\""); //$NON-NLS-1$ //$NON-NLS-2$
106:                if (getSchema() != null)
107:                    writer.print(" schema=\"" + getSchema() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
108:                writer.println("/>"); //$NON-NLS-1$
109:            }
110:
111:            public String getName() {
112:                if (fName == null)
113:                    fName = fPoint.getLabel();
114:                return fName;
115:            }
116:
117:            public String getId() {
118:                if (fID == null) {
119:                    fID = fPoint.getUniqueIdentifier();
120:                    if (fID != null) {
121:                        String pluginId = getPluginBase().getId();
122:                        if (fID.startsWith(pluginId)) {
123:                            String sub = fID.substring(pluginId.length());
124:                            if (sub.lastIndexOf('.') == 0)
125:                                fID = sub.substring(1);
126:                        }
127:                    }
128:                }
129:                return fID;
130:            }
131:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.