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 66438 Details for
Bug 185733
Refreshing external jar doesn't update problem marker
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fix and regression tests v2
185733a.txt (text/plain), 4.24 KB, created by
Jerome Lanneluc
on 2007-05-09 07:30:18 EDT
(
hide
)
Description:
Fix and regression tests v2
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2007-05-09 07:30:18 EDT
Size:
4.24 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.300 >diff -u -r1.300 DeltaProcessor.java >--- model/org/eclipse/jdt/internal/core/DeltaProcessor.java 7 May 2007 08:49:22 -0000 1.300 >+++ model/org/eclipse/jdt/internal/core/DeltaProcessor.java 9 May 2007 11:27:13 -0000 >@@ -924,6 +924,7 @@ > System.out.println("- External JAR ADDED, affecting root: "+root.getElementName()); //$NON-NLS-1$ > } > elementAdded(root, null, null); >+ this.state.addClasspathValidation(javaProject); // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=185733 > hasDelta = true; > } else if (status == EXTERNAL_JAR_CHANGED) { > PackageFragmentRoot root = (PackageFragmentRoot) javaProject.getPackageFragmentRoot(entryPath.toString()); >@@ -938,6 +939,7 @@ > System.out.println("- External JAR REMOVED, affecting root: "+root.getElementName()); //$NON-NLS-1$ > } > elementRemoved(root, null, null); >+ this.state.addClasspathValidation(javaProject); // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=185733 > hasDelta = true; > } > } >#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.161 >diff -u -r1.161 ClasspathTests.java >--- src/org/eclipse/jdt/core/tests/model/ClasspathTests.java 13 Apr 2007 16:02:17 -0000 1.161 >+++ src/org/eclipse/jdt/core/tests/model/ClasspathTests.java 9 May 2007 11:27:15 -0000 >@@ -41,6 +41,7 @@ > import org.eclipse.jdt.core.IClasspathContainer; > import org.eclipse.jdt.core.IClasspathEntry; > import org.eclipse.jdt.core.ICompilationUnit; >+import org.eclipse.jdt.core.IJavaElement; > import org.eclipse.jdt.core.IJavaElementDelta; > import org.eclipse.jdt.core.IJavaModelMarker; > import org.eclipse.jdt.core.IJavaModelStatus; >@@ -2179,6 +2180,53 @@ > } > } > /* >+ * Ensures that adding an external jar and refreshing removed the markers >+ * (regression test for 185733 Refreshing external jar doesn't update problem marker) >+ */ >+public void testExternalJarAdd() throws CoreException, IOException { >+ String externalJarPath = getExternalPath() + "test185733.jar"; >+ try { >+ IJavaProject p = createJavaProject("P", new String[0], new String[] {externalJarPath}, ""); >+ waitUntilIndexesReady(); >+ waitForAutoBuild(); >+ // at this point, a marker indicates that test185733.jar has been created: "Project 'P' is missing required library: '[...]\test185733.jar'" >+ >+ createFile(new File(getExternalPath()), "test185733.jar", ""); >+ getJavaModel().refreshExternalArchives(new IJavaElement[] {p}, null); >+ assertMarkers( >+ "Unexpected markers", >+ "", >+ p); >+ } finally { >+ deleteFile(new File(externalJarPath)); >+ deleteProject("P"); >+ } >+} >+ >+/* >+ * Ensures that removing an external jar and refreshing creates the correct markers >+ * (regression test for 185733 Refreshing external jar doesn't update problem marker) >+ */ >+public void testExternalJarRemove() throws CoreException, IOException { >+ try { >+ File externalJar = createFile(new File(getExternalPath()), "test185733.jar", ""); >+ IJavaProject p = createJavaProject("P", new String[0], new String[] {externalJar.getPath()}, ""); >+ waitUntilIndexesReady(); >+ waitForAutoBuild(); >+ // at this point, the project has no markers >+ >+ deleteFile(externalJar); >+ getJavaModel().refreshExternalArchives(new IJavaElement[] {p}, null); >+ assertMarkers( >+ "Unexpected markers", >+ "Project \'P\' is missing required library: \'" + externalJar.getPath() + "\'", >+ p); >+ } finally { >+ deleteProject("P"); >+ } >+} >+ >+/* > * Ensures that setting 0 extra classpath attributes generates the correct .classpath file. > */ > public void testExtraAttributes1() throws CoreException { >@@ -3904,4 +3952,5 @@ > this.deleteProjects(new String[] {"P1", "P2"}); > } > } >+ > }
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 185733
:
66093
| 66438