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 118645 Details for
Bug 256404
Wrong handle identifier for external library folder
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix and regression test
256404.txt (text/plain), 3.31 KB, created by
Jerome Lanneluc
on 2008-11-25 05:17:43 EST
(
hide
)
Description:
Proposed fix and regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2008-11-25 05:17:43 EST
Size:
3.31 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/PackageFragmentRoot.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragmentRoot.java,v >retrieving revision 1.133 >diff -u -r1.133 PackageFragmentRoot.java >--- model/org/eclipse/jdt/internal/core/PackageFragmentRoot.java 27 Jun 2008 16:03:50 -0000 1.133 >+++ model/org/eclipse/jdt/internal/core/PackageFragmentRoot.java 25 Nov 2008 10:16:38 -0000 >@@ -454,7 +454,7 @@ > */ > protected void getHandleMemento(StringBuffer buff) { > IPath path; >- IResource underlyingResource = resource(); >+ IResource underlyingResource = getResource(); > if (underlyingResource != null) { > // internal jar or regular root > if (resource().getProject().equals(getJavaProject().getProject())) { >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/MementoTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/MementoTests.java,v >retrieving revision 1.26 >diff -u -r1.26 MementoTests.java >--- src/org/eclipse/jdt/core/tests/model/MementoTests.java 21 Aug 2008 10:15:28 -0000 1.26 >+++ src/org/eclipse/jdt/core/tests/model/MementoTests.java 25 Nov 2008 10:16:39 -0000 >@@ -13,8 +13,8 @@ > import java.io.File; > > import org.eclipse.core.resources.*; >-import org.eclipse.core.resources.IFolder; > import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.Path; > import org.eclipse.jdt.core.*; > import org.eclipse.jdt.core.tests.util.Util; > import org.eclipse.jdt.internal.core.JavaElement; >@@ -65,7 +65,9 @@ > restored); > } > protected String getEscapedExternalJCLPath() { >- String path = getExternalJCLPath().toString(); >+ return getEscapedPath(getExternalJCLPath().toString()); >+} >+protected String getEscapedPath(String path) { > StringBuffer buffer = new StringBuffer(); > for (int i = 0; i < path.length(); i++) { > char character = path.charAt(i); >@@ -77,6 +79,12 @@ > public void setUpSuite() throws Exception { > super.setUpSuite(); > >+ Util.createClassFolder(new String[] { >+ "X.java", >+ "public class X {}" >+ }, >+ getExternalResourcePath("myLib"), >+ "1.4"); > this.createJavaProject( > "P", > new String[] {"src"}, >@@ -86,11 +94,13 @@ > "/P/lib/myLib.jar", > "/OtherProj/lib", > "/OtherProj/lib/myLib.jar", >+ getExternalResourcePath("myLib") > }, > "bin"); > } > public void tearDownSuite() throws Exception { > this.deleteProject("P"); >+ deleteExternalResource("myLib"); > super.tearDownSuite(); > } > /* >@@ -338,6 +348,15 @@ > "=P/" + device + "\\/lib.jar<p(X.class", > classFile); > } >+/* >+ * Ensures that a class file in an external library folder can be persisted and restored using its memento. >+ */ >+public void testExternalLibraryFolderClassFileMemento() throws JavaModelException { >+ IClassFile classFile = getClassFile("P", getExternalResourcePath("myLib"), "", "X.class"); >+ assertMemento( >+ "=P/" + getEscapedPath(new Path(getExternalResourcePath("myLib")).toString()) + "<(X.class", >+ classFile); >+} > /** > * Tests that an import declaration can be persisted and restored using its memento. > */
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 256404
: 118645