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 59988 Details for
Bug 175849
Project is touched on restart
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix and regression test
175849.txt (text/plain), 3.47 KB, created by
Jerome Lanneluc
on 2007-02-28 10:58:13 EST
(
hide
)
Description:
Proposed fix and regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2007-02-28 10:58:13 EST
Size:
3.47 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#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.355 >diff -u -r1.355 JavaModelManager.java >--- model/org/eclipse/jdt/internal/core/JavaModelManager.java 27 Feb 2007 11:52:24 -0000 1.355 >+++ model/org/eclipse/jdt/internal/core/JavaModelManager.java 28 Feb 2007 15:51:50 -0000 >@@ -518,8 +518,6 @@ > if (container == null) > return false; > IJavaProject project = projects[0]; >- if (!containerInitializationInProgress(project).contains(containerPath)) >- return false; > IClasspathContainer previousSessionContainer = getPreviousSessionContainer(containerPath, project); > final IClasspathEntry[] newEntries = container.getClasspathEntries(); > if (previousSessionContainer == null) >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/ClasspathInitializerTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathInitializerTests.java,v >retrieving revision 1.45 >diff -u -r1.45 ClasspathInitializerTests.java >--- src/org/eclipse/jdt/core/tests/model/ClasspathInitializerTests.java 19 Feb 2007 17:24:23 -0000 1.45 >+++ src/org/eclipse/jdt/core/tests/model/ClasspathInitializerTests.java 28 Feb 2007 15:51:51 -0000 >@@ -812,6 +812,56 @@ > deleteProject("P1"); > } > } >+ >+/* >+ * Ensures that no resource deta is reported if a container is initialized right after startup to the same value it had before shutdown. >+ * (regression test for bug ) >+ */ >+public void testContainerInitializer17() throws CoreException { >+ IResourceChangeListener listener = new IResourceChangeListener() { >+ StringBuffer buffer = new StringBuffer(); >+ public void resourceChanged(IResourceChangeEvent event) { >+ this.buffer.append(event.getDelta().findMember(new Path("/P2"))); >+ } >+ public String toString() { >+ return this.buffer.toString(); >+ } >+ }; >+ try { >+ createProject("P1"); >+ createFile("/P1/lib.jar", ""); >+ ContainerInitializer.setInitializer(new DefaultContainerInitializer(new String[] {"P2", "/P1/lib.jar"})); >+ IJavaProject p2 = createJavaProject( >+ "P2", >+ new String[] {}, >+ new String[] {"org.eclipse.jdt.core.tests.model.TEST_CONTAINER"}, >+ ""); >+ >+ >+ // simulate state on startup >+ simulateExitRestart(); >+ >+ getWorkspace().addResourceChangeListener(listener, IResourceChangeEvent.POST_CHANGE); >+ >+ // simulate concurrency (another thread is initializing all containers in parallel and thus this flag is set to false) >+ JavaModelManager.getJavaModelManager().deltaState.rootsAreStale = false; >+ >+ // initialize to the same value >+ ContainerInitializer.setInitializer(new DefaultContainerInitializer(new String[] {"P2", "/P1/lib.jar"})); >+ ContainerInitializer.initializer.initialize(new Path("org.eclipse.jdt.core.tests.model.TEST_CONTAINER"), p2); >+ >+ assertEquals( >+ "Unexpected resource delta on container initialization", >+ "", >+ listener.toString() >+ ); >+ } finally { >+ getWorkspace().removeResourceChangeListener(listener); >+ deleteProject("P1"); >+ deleteProject("P2"); >+ } >+} >+ > public void testVariableInitializer01() throws CoreException { > try { > createProject("P1");
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 175849
: 59988 |
60141