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 87052 Details for
Bug 210746
Class folder in build path does not refresh properly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix and regression test
210746.txt (text/plain), 3.70 KB, created by
Jerome Lanneluc
on 2008-01-16 10:27:15 EST
(
hide
)
Description:
Proposed fix and regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2008-01-16 10:27:15 EST
Size:
3.70 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/DeltaProcessor.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessor.java,v >retrieving revision 1.301.2.1 >diff -u -r1.301.2.1 DeltaProcessor.java >--- model/org/eclipse/jdt/internal/core/DeltaProcessor.java 26 Oct 2007 08:54:45 -0000 1.301.2.1 >+++ model/org/eclipse/jdt/internal/core/DeltaProcessor.java 16 Jan 2008 14:44:05 -0000 >@@ -2133,6 +2133,7 @@ > Iterator iterator = rootList.iterator(); > while (iterator.hasNext()) { > childRootInfo = (RootInfo) iterator.next(); >+ this.currentElement = null; // ensure that 2 roots refering to the same resource don't share the current element (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=210746 ) > this.traverseDelta(child, IJavaElement.PACKAGE_FRAGMENT_ROOT, childRootInfo, null); // binary output of childRootInfo.project cannot be this root > } > } >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java,v >retrieving revision 1.117 >diff -u -r1.117 ReconcilerTests.java >--- src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java 27 Mar 2007 14:28:56 -0000 1.117 >+++ src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java 16 Jan 2008 14:44:09 -0000 >@@ -18,6 +18,7 @@ > > import org.eclipse.core.resources.IResource; > import org.eclipse.core.resources.IWorkspaceRunnable; >+import org.eclipse.core.resources.IncrementalProjectBuilder; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.ILogListener; > import org.eclipse.core.runtime.IProgressMonitor; >@@ -815,6 +816,60 @@ > ); > } > /* >+ * Ensures that changing a binary folder used as class folder in 2 projects doesn't cause the old binary to be seen >+ * (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=210746 ) >+ */ >+public void testChangeClassFolder() throws CoreException { >+ try { >+ createJavaProject("P1", new String[] {"src"}, new String[] {"JCL_LIB"}, "bin"); >+ createFolder("/P1/src/p"); >+ createFile( >+ "/P1/src/p/X.java", >+ "package p;\n" + >+ "public class X {\n" + >+ "}" >+ ); >+ getProject("P1").build(IncrementalProjectBuilder.FULL_BUILD, null); >+ createJavaProject("P2", new String[0], new String[] {"/P1/bin"}, "bin"); >+ createJavaProject("P3", new String[] {"src"}, new String[] {"JCL_LIB", "/P1/bin"}, "bin"); >+ setUpWorkingCopy( >+ "/P3/src/q/Y.java", >+ "package q;\n" + >+ "import p.X;\n" + >+ "public class Y {\n" + >+ " void foo(X x) {\n" + >+ " }\n"+ >+ "}" >+ ); >+ editFile( >+ "/P1/src/p/X.java", >+ "package p;\n" + >+ "public class X {\n" + >+ " public void bar() {\n" + >+ " }\n" + >+ "}" >+ ); >+ getProject("P1").build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null); >+ setWorkingCopyContents( >+ "package q;\n" + >+ "import p.X;\n" + >+ "public class Y {\n" + >+ " void foo(X x) {\n" + >+ " x.bar();\n" + >+ " }\n"+ >+ "}" >+ ); >+ this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null); >+ assertProblems( >+ "Unexpected problems", >+ "----------\n" + >+ "----------\n" >+ ); >+ } finally { >+ deleteProjects(new String[] {"P1", "P2", "P3"}); >+ } >+} >+/* > * Ensures that changing and external jar and refreshing takes the change into account > * (regression test for bug 134110 [regression] Does not pick-up interface changes from classes in the build path) > */
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 210746
:
83620
|
83961
|
85468
|
85555
| 87052