Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2011 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2013 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 28-33
Link Here
|
28 |
private IPath fSystemLibrarySource; |
28 |
private IPath fSystemLibrarySource; |
29 |
private IPath fPackageRootPath; |
29 |
private IPath fPackageRootPath; |
30 |
private URL fJavadocLocation; |
30 |
private URL fJavadocLocation; |
|
|
31 |
private URL fIndexLocation; |
31 |
|
32 |
|
32 |
/** |
33 |
/** |
33 |
* Creates a new library location. |
34 |
* Creates a new library location. |
Lines 64-78
Link Here
|
64 |
* @since 3.1 |
65 |
* @since 3.1 |
65 |
*/ |
66 |
*/ |
66 |
public LibraryLocation(IPath libraryPath, IPath sourcePath, IPath packageRoot, URL javadocLocation) { |
67 |
public LibraryLocation(IPath libraryPath, IPath sourcePath, IPath packageRoot, URL javadocLocation) { |
67 |
if (libraryPath == null) |
68 |
this(libraryPath, sourcePath, packageRoot, javadocLocation, null); |
68 |
throw new IllegalArgumentException(LaunchingMessages.libraryLocation_assert_libraryNotNull); |
69 |
} |
69 |
|
70 |
|
|
|
71 |
/** |
72 |
* Creates a new library location. |
73 |
* |
74 |
* @param libraryPath The location of the JAR containing java.lang.Object |
75 |
* Must not be <code>null</code>. |
76 |
* @param sourcePath The location of the zip file containing the sources for <code>library</code> |
77 |
* Must not be <code>null</code> (Use Path.EMPTY instead) |
78 |
* @param packageRoot The path inside the <code>source</code> zip file where packages names |
79 |
* begin. If the source for java.lang.Object source is found at |
80 |
* "src/java/lang/Object.java" in the zip file, the |
81 |
* packageRoot should be "src" |
82 |
* Must not be <code>null</code>. (Use Path.EMPTY or IPath.ROOT) |
83 |
* @param javadocLocation The location of the javadoc for <code>library</code> |
84 |
* @param indexLocation The location of the index for <code>library</code> |
85 |
* @throws IllegalArgumentException If the library path is <code>null</code>. |
86 |
* @since 3.7 |
87 |
*/ |
88 |
public LibraryLocation(IPath libraryPath, IPath sourcePath, IPath packageRoot, URL javadocLocation, URL indexLocation) { |
89 |
if (libraryPath == null) { |
90 |
throw new IllegalArgumentException(LaunchingMessages.libraryLocation_assert_libraryNotNull); |
91 |
} |
70 |
fSystemLibrary= libraryPath; |
92 |
fSystemLibrary= libraryPath; |
71 |
fSystemLibrarySource= sourcePath; |
93 |
fSystemLibrarySource= sourcePath; |
72 |
fPackageRootPath= packageRoot; |
94 |
fPackageRootPath= packageRoot; |
73 |
fJavadocLocation= javadocLocation; |
95 |
fJavadocLocation= javadocLocation; |
74 |
} |
96 |
fIndexLocation = indexLocation; |
75 |
|
97 |
} |
|
|
98 |
|
76 |
/** |
99 |
/** |
77 |
* Returns the JRE library jar location. |
100 |
* Returns the JRE library jar location. |
78 |
* |
101 |
* |
Lines 103-114
Link Here
|
103 |
/** |
126 |
/** |
104 |
* Returns the Javadoc location associated with this Library location. |
127 |
* Returns the Javadoc location associated with this Library location. |
105 |
* |
128 |
* |
106 |
* @return a url pointing to the Javadoc location associated with |
129 |
* @return a {@link URL} pointing to the Javadoc location associated with |
107 |
* this Library location, or <code>null</code> if none |
130 |
* this Library location, or <code>null</code> if none |
108 |
* @since 3.1 |
131 |
* @since 3.1 |
109 |
*/ |
132 |
*/ |
110 |
public URL getJavadocLocation() { |
133 |
public URL getJavadocLocation() { |
111 |
return fJavadocLocation; |
134 |
return fJavadocLocation; |
|
|
135 |
} |
136 |
|
137 |
/** |
138 |
* Returns the index location associated with this library location. |
139 |
* |
140 |
* @return a {@link URL} pointing to the index location associated with |
141 |
* this Library location, or <code>null</code> if none |
142 |
* @since 3.7 |
143 |
*/ |
144 |
public URL getIndexLocation() { |
145 |
return fIndexLocation; |
112 |
} |
146 |
} |
113 |
|
147 |
|
114 |
/* (non-Javadoc) |
148 |
/* (non-Javadoc) |
Lines 171-174
Link Here
|
171 |
fSystemLibrarySource = source; |
205 |
fSystemLibrarySource = source; |
172 |
} |
206 |
} |
173 |
|
207 |
|
174 |
} |
208 |
/** |
|
|
209 |
* Sets the index location to the given {@link URL}. |
210 |
* |
211 |
* @param indexLoc |
212 |
* @since 3.7 |
213 |
*/ |
214 |
public void setIndexLocation(URL indexLoc) { |
215 |
fIndexLocation = indexLoc; |
216 |
} |
217 |
} |