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 39789 Details for
Bug 138999
Regression: Fix for 128258 introduces regression in JavaProject.exists()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch and regression test
138999.txt (text/plain), 2.16 KB, created by
Jerome Lanneluc
on 2006-04-28 11:46:42 EDT
(
hide
)
Description:
Proposed patch and regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2006-04-28 11:46:42 EDT
Size:
2.16 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/WorkingCopyOwnerTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/WorkingCopyOwnerTests.java,v >retrieving revision 1.55 >diff -u -r1.55 WorkingCopyOwnerTests.java >--- src/org/eclipse/jdt/core/tests/model/WorkingCopyOwnerTests.java 29 Mar 2006 04:03:07 -0000 1.55 >+++ src/org/eclipse/jdt/core/tests/model/WorkingCopyOwnerTests.java 28 Apr 2006 15:45:54 -0000 >@@ -984,6 +984,19 @@ > this.workingCopy.commitWorkingCopy(true, null); > assertFalse("Should not have unsaved changes", this.workingCopy.hasUnsavedChanges()); > } >+ >+ /* >+ * Ensures that a Java project named " " doesn't exist if a working copy with no resource is created. >+ * (regression test for bug 138999 Regression: Fix for 128258 introduces regression in JavaProject.exists()) >+ */ >+ public void testNewWorkingCopy09() throws CoreException { >+ this.workingCopy = newExternalWorkingCopy( >+ "X.java", >+ "public class X {\n" + >+ "}" >+ ); >+ assertFalse("Java project named \" \" should not exist", getJavaProject(ExternalJavaProject.EXTERNAL_PROJECT_NAME).exists()); >+ } > > /** > * Ensures that creating a DOM AST and computing the bindings takes the owner's working copies into account. >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/JavaProject.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java,v >retrieving revision 1.369 >diff -u -r1.369 JavaProject.java >--- model/org/eclipse/jdt/internal/core/JavaProject.java 6 Apr 2006 19:15:52 -0000 1.369 >+++ model/org/eclipse/jdt/internal/core/JavaProject.java 28 Apr 2006 15:45:57 -0000 >@@ -1009,7 +1009,12 @@ > } > > public boolean exists() { >- return hasJavaNature(this.project); >+ try { >+ return this.project.hasNature(JavaCore.NATURE_ID); >+ } catch (CoreException e) { >+ // project does not exist or is not open >+ } >+ return false; > } > > /**
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 138999
: 39789