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 125210 Details for
Bug 261594
Adjust code to new PRE_REFRESH semantics
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
proposed fix & test
patch.txt (text/plain), 3.23 KB, created by
Srikanth Sankaran
on 2009-02-10 03:37:19 EST
(
hide
)
Description:
proposed fix & test
Filename:
MIME Type:
Creator:
Srikanth Sankaran
Created:
2009-02-10 03:37:19 EST
Size:
3.23 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.196 >diff -u -r1.196 ClasspathTests.java >--- src/org/eclipse/jdt/core/tests/model/ClasspathTests.java 15 Jan 2009 14:21:07 -0000 1.196 >+++ src/org/eclipse/jdt/core/tests/model/ClasspathTests.java 10 Feb 2009 08:24:07 -0000 >@@ -526,6 +526,26 @@ > } > > /* >+ * Ensures that creating an external library folder referenced by a library entry and refreshing the workspace doesn't log a NPE >+ * (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=262363 ) >+ */ >+public void testAddExternalLibFolder7() throws CoreException { >+ try { >+ createJavaProject("P", new String[0], new String[] {getExternalResourcePath("externalLib")}, ""); >+ waitForAutoBuild(); >+ createExternalFolder("externalLib"); >+ startLogListening(null/*listen to Platform's log*/); >+ getWorkspaceRoot().refreshLocal(IResource.DEPTH_INFINITE, null); >+ waitForManualRefresh(); >+ assertLogEquals(""); >+ } finally { >+ stopLogListening(); >+ deleteExternalResource("externalLib"); >+ deleteProject("P"); >+ } >+} >+ >+/* > * Ensures that adding a library entry for an existing external ZIP archive doesn't generate a marker > */ > public void testAddZIPArchive1() throws CoreException { >#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.331 >diff -u -r1.331 DeltaProcessor.java >--- model/org/eclipse/jdt/internal/core/DeltaProcessor.java 7 Jan 2009 16:29:42 -0000 1.331 >+++ model/org/eclipse/jdt/internal/core/DeltaProcessor.java 10 Feb 2009 08:24:15 -0000 >@@ -21,6 +21,7 @@ > import org.eclipse.core.resources.IResourceChangeEvent; > import org.eclipse.core.resources.IResourceDelta; > import org.eclipse.core.resources.IResourceDeltaVisitor; >+import org.eclipse.core.resources.IWorkspace; > import org.eclipse.core.resources.IWorkspaceRoot; > import org.eclipse.core.resources.IWorkspaceRunnable; > import org.eclipse.core.resources.ResourcesPlugin; >@@ -1897,7 +1898,18 @@ > return; > > case IResourceChangeEvent.PRE_REFRESH: >- JavaModelManager.getExternalManager().refreshReferences((IProject) resource, null); >+ IProject [] projects = null; >+ Object o = event.getSource(); >+ if (o instanceof IProject) { >+ projects = new IProject[] { (IProject) o }; >+ } else if (o instanceof IWorkspace) { >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=261594. The single workspace refresh >+ // notification we see, implies that all projects are about to be refreshed. >+ projects = ((IWorkspace) o).getRoot().getProjects(IContainer.INCLUDE_HIDDEN); >+ } >+ for (int i = 0; projects != null && i < projects.length; i++) { >+ JavaModelManager.getExternalManager().refreshReferences(projects[i], null); >+ } > return; > > case IResourceChangeEvent.POST_CHANGE :
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
Flags:
jerome_lanneluc
:
iplog+
jerome_lanneluc
:
review+
Actions:
View
|
Diff
Attachments on
bug 261594
: 125210