Source Code Cross Referenced for ClasspathVariableSourceContainer.java in  » IDE-Eclipse » jdt » org » eclipse » jdt » launching » sourcelookup » containers » 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 » jdt » org.eclipse.jdt.launching.sourcelookup.containers 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        /*******************************************************************************
02:         * Copyright (c) 2000, 2005 IBM Corporation and others.
03:         * All rights reserved. This program and the accompanying materials
04:         * are made available under the terms of the Eclipse Public License v1.0
05:         * which accompanies this distribution, and is available at
06:         * http://www.eclipse.org/legal/epl-v10.html
07:         * 
08:         * Contributors:
09:         *     IBM Corporation - initial API and implementation
10:         *******************************************************************************/package org.eclipse.jdt.launching.sourcelookup.containers;
11:
12:        import org.eclipse.core.runtime.CoreException;
13:        import org.eclipse.core.runtime.IPath;
14:        import org.eclipse.debug.core.sourcelookup.ISourceContainer;
15:        import org.eclipse.debug.core.sourcelookup.ISourceContainerType;
16:        import org.eclipse.debug.core.sourcelookup.containers.CompositeSourceContainer;
17:        import org.eclipse.jdt.core.JavaCore;
18:        import org.eclipse.jdt.internal.launching.LaunchingPlugin;
19:        import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
20:        import org.eclipse.jdt.launching.JavaRuntime;
21:
22:        /**
23:         * A classpath variable source container contains a source container
24:         * that is the resolved value of the associated variable.
25:         * <p>
26:         * This class may be instantiated; this class is not intended to be
27:         * subclassed. 
28:         * </p>
29:         * @since 3.0
30:         */
31:        public class ClasspathVariableSourceContainer extends
32:                CompositeSourceContainer {
33:
34:            private IPath fVariable;
35:            /**
36:             * Unique identifier for Java project source container type
37:             * (value <code>org.eclipse.jdt.launching.sourceContainer.classpathVariable</code>).
38:             */
39:            public static final String TYPE_ID = LaunchingPlugin
40:                    .getUniqueIdentifier()
41:                    + ".sourceContainer.classpathVariable"; //$NON-NLS-1$
42:
43:            /**
44:             * Constructs a new source container on the given variable and suffix.
45:             * 
46:             * @param variablePath path representing a Java classpath variable.
47:             *  The first segment is the variable name, and the following segments
48:             *  (if any) are appended to the variable.
49:             */
50:            public ClasspathVariableSourceContainer(IPath variablePath) {
51:                fVariable = variablePath;
52:            }
53:
54:            /* (non-Javadoc)
55:             * @see org.eclipse.debug.internal.core.sourcelookup.containers.CompositeSourceContainer#createSourceContainers()
56:             */
57:            protected ISourceContainer[] createSourceContainers()
58:                    throws CoreException {
59:                IPath path = JavaCore
60:                        .getClasspathVariable(fVariable.segment(0));
61:                if (path == null) {
62:                    return new ISourceContainer[0];
63:                }
64:                if (fVariable.segmentCount() > 1) {
65:                    path = path.append(fVariable.removeFirstSegments(1));
66:                }
67:                IRuntimeClasspathEntry entry = JavaRuntime
68:                        .newArchiveRuntimeClasspathEntry(path);
69:                return JavaRuntime
70:                        .getSourceContainers(new IRuntimeClasspathEntry[] { entry });
71:            }
72:
73:            /* (non-Javadoc)
74:             * @see org.eclipse.debug.internal.core.sourcelookup.ISourceContainer#getName()
75:             */
76:            public String getName() {
77:                return fVariable.toOSString();
78:            }
79:
80:            /**
81:             * Returns the variable this container references as a path. The
82:             * first segment is the variable name, and the following segments
83:             * are appended to the variable's value.
84:             * 
85:             * @return path representing the variable and suffix
86:             */
87:            public IPath getPath() {
88:                return fVariable;
89:            }
90:
91:            /* (non-Javadoc)
92:             * @see org.eclipse.debug.internal.core.sourcelookup.ISourceContainer#getType()
93:             */
94:            public ISourceContainerType getType() {
95:                return getSourceContainerType(TYPE_ID);
96:            }
97:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.