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 112433 Details for
Bug 243692
[buildpath] Cannot set Attached Source from Class File Editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix and regression test
243692.txt (text/plain), 2.87 KB, created by
Jerome Lanneluc
on 2008-09-12 11:29:25 EDT
(
hide
)
Description:
Proposed fix and regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2008-09-12 11:29:25 EDT
Size:
2.87 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/ClasspathTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java,v >retrieving revision 1.185 >diff -u -r1.185 ClasspathTests.java >--- src/org/eclipse/jdt/core/tests/model/ClasspathTests.java 8 Sep 2008 13:22:43 -0000 1.185 >+++ src/org/eclipse/jdt/core/tests/model/ClasspathTests.java 12 Sep 2008 15:27:05 -0000 >@@ -58,6 +58,7 @@ > import org.eclipse.jdt.internal.core.ClasspathEntry; > import org.eclipse.jdt.internal.core.JavaModelManager; > import org.eclipse.jdt.internal.core.JavaProject; >+import org.eclipse.team.core.RepositoryProvider; > > public class ClasspathTests extends ModifyingResourceTests { > >@@ -3094,6 +3095,29 @@ > this.deleteProject("P"); > } > } >+/* >+ * Ensures that one can set a raw classpath if a pessimistic repository provider is used >+ * (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=243692 ) >+ */ >+public void testPessimisticProvider() throws CoreException { >+ try { >+ IJavaProject javaProject = createJavaProject("P", new String[] {"src"}, "bin"); >+ IProject project = javaProject.getProject(); >+ try { >+ RepositoryProvider.map(project, TestPessimisticProvider.NATURE_ID); >+ IClasspathEntry[] rawClasspath = new IClasspathEntry[] {JavaCore.newSourceEntry(new Path("/P/src2"))}; >+ setClasspath(javaProject, rawClasspath); >+ assertClasspathEquals( >+ javaProject.getRawClasspath(), >+ "/P/src2[CPE_SOURCE][K_SOURCE][isExported:false]" >+ ); >+ } finally { >+ RepositoryProvider.unmap(project); >+ } >+ } finally { >+ deleteProject("P"); >+ } >+} > /** > * Ensure that reading an empty custom output from the .classpath returns a non-null output location. > * (regression test for 28531 Classpath Entry: Output folder can not be set to project) >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/JavaModelManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java,v >retrieving revision 1.410 >diff -u -r1.410 JavaModelManager.java >--- model/org/eclipse/jdt/internal/core/JavaModelManager.java 8 Sep 2008 14:33:20 -0000 1.410 >+++ model/org/eclipse/jdt/internal/core/JavaModelManager.java 12 Sep 2008 15:27:07 -0000 >@@ -1240,7 +1240,7 @@ > } > } > }, >- this.project, // use project scheduling rule as this is needed to create the .classpath file if it doesn't exist yet >+ workspace.getRuleFactory().modifyRule(this.project), // use project modification rule as this is needed to create the .classpath file if it doesn't exist yet > IWorkspace.AVOID_UPDATE, > null); > } catch (JavaModelException e) {
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 243692
:
112106
| 112433