Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 20434 Details for
Bug 93061
User library should allow classpath variables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch to jdtcore to enable this functionality
variable-userlib-jdtcore.patch (text/plain), 4.28 KB, created by
Matthew Conway
on 2005-04-27 22:53:40 EDT
(
hide
)
Description:
patch to jdtcore to enable this functionality
Filename:
MIME Type:
Creator:
Matthew Conway
Created:
2005-04-27 22:53:40 EDT
Size:
4.28 KB
patch
obsolete
>Index: model/org/eclipse/jdt/internal/core/UserLibrary.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/UserLibrary.java,v >retrieving revision 1.4 >diff -u -r1.4 UserLibrary.java >--- model/org/eclipse/jdt/internal/core/UserLibrary.java 8 Apr 2005 20:30:28 -0000 1.4 >+++ model/org/eclipse/jdt/internal/core/UserLibrary.java 28 Apr 2005 02:36:06 -0000 >@@ -41,7 +41,9 @@ > private static final String TAG_USERLIBRARY= "userlibrary"; //$NON-NLS-1$ > private static final String TAG_SOURCEATTACHMENT= "sourceattachment"; //$NON-NLS-1$ > private static final String TAG_SOURCEATTACHMENTROOT= "sourceattachmentroot"; //$NON-NLS-1$ >- private static final String TAG_PATH= "path"; //$NON-NLS-1$ >+ private static final String TAG_PATH= "path"; //$NON-NLS-1$ >+ private static final String TAG_TYPE= "type"; //$NON-NLS-1$ >+ private static final String TAG_TYPE_VAR= "var"; //$NON-NLS-1$ > private static final String TAG_ARCHIVE= "archive"; //$NON-NLS-1$ > private static final String TAG_SYSTEMLIBRARY= "systemlibrary"; //$NON-NLS-1$ > >@@ -108,6 +110,8 @@ > IClasspathEntry curr= this.entries[i]; > > HashMap archive = new HashMap(); >+ if (curr.getEntryKind() == IClasspathEntry.CPE_VARIABLE) >+ archive.put(TAG_TYPE, TAG_TYPE_VAR); > archive.put(TAG_PATH, curr.getPath().toString()); > IPath sourceAttach= curr.getSourceAttachmentPath(); > if (sourceAttach != null) >@@ -154,10 +158,18 @@ > if (node.getNodeType() == Node.ELEMENT_NODE) { > Element element= (Element) node; > if (element.getNodeName().equals(TAG_ARCHIVE)) { >- String path = element.getAttribute(TAG_PATH); >+ String type = element.getAttribute(TAG_TYPE); >+ String path = element.getAttribute(TAG_PATH); > IPath sourceAttach= element.hasAttribute(TAG_SOURCEATTACHMENT) ? new Path(element.getAttribute(TAG_SOURCEATTACHMENT)) : null; > IPath sourceAttachRoot= element.hasAttribute(TAG_SOURCEATTACHMENTROOT) ? new Path(element.getAttribute(TAG_SOURCEATTACHMENTROOT)) : null; >- res.add(JavaCore.newLibraryEntry(new Path(path), sourceAttach, sourceAttachRoot)); >+ if (TAG_TYPE_VAR.equals(type)) >+ { >+ res.add(JavaCore.newVariableEntry(new Path(path), sourceAttach, sourceAttachRoot)); >+ } >+ else >+ { >+ res.add(JavaCore.newLibraryEntry(new Path(path), sourceAttach, sourceAttachRoot)); >+ } > } > } > } >Index: model/org/eclipse/jdt/internal/core/UserLibraryClasspathContainer.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/UserLibraryClasspathContainer.java,v >retrieving revision 1.3 >diff -u -r1.3 UserLibraryClasspathContainer.java >--- model/org/eclipse/jdt/internal/core/UserLibraryClasspathContainer.java 23 Feb 2005 02:47:29 -0000 1.3 >+++ model/org/eclipse/jdt/internal/core/UserLibraryClasspathContainer.java 28 Apr 2005 02:36:06 -0000 >@@ -15,6 +15,7 @@ > import org.eclipse.jdt.core.IClasspathContainer; > import org.eclipse.jdt.core.IClasspathEntry; > import org.eclipse.jdt.core.JavaCore; >+import org.eclipse.jdt.core.JavaModelException; > > /** > * >@@ -37,7 +38,22 @@ > public IClasspathEntry[] getClasspathEntries() { > UserLibrary library= getUserLibrary(); > if (library != null) { >- return library.getEntries(); >+ IClasspathEntry[] entries = library.getEntries(); >+ IClasspathEntry[] result = new IClasspathEntry[entries.length]; >+ for (int i = 0; i < entries.length; i++) >+ { >+ IClasspathEntry entry = entries[i]; >+ if (entry.getEntryKind() == IClasspathEntry.CPE_VARIABLE) >+ { >+ IClasspathEntry resolvedEntry = JavaCore.getResolvedClasspathEntry(entry); >+ if (resolvedEntry != null) >+ { >+ entry = resolvedEntry; >+ } >+ } >+ result[i] = entry; >+ } >+ return result; > } > return new IClasspathEntry[0]; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 93061
:
20434
|
20435
|
20529
|
20530