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 38150 Details for
Bug 80756
Multiple source folders to one bin forgot copy some files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch and regression test
80756.txt (text/plain), 3.64 KB, created by
Jerome Lanneluc
on 2006-04-10 10:03:59 EDT
(
hide
)
Description:
Proposed patch and regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2006-04-10 10:03:59 EDT
Size:
3.64 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.151 >diff -u -r1.151 ClasspathTests.java >--- src/org/eclipse/jdt/core/tests/model/ClasspathTests.java 6 Apr 2006 15:25:04 -0000 1.151 >+++ src/org/eclipse/jdt/core/tests/model/ClasspathTests.java 10 Apr 2006 13:54:37 -0000 >@@ -1627,8 +1627,8 @@ > this.deleteProject("P"); > } > } >-/** >- * 62713 - variation >+/* >+ * Ensures that a source folder with a custom output can be nested in the default output > */ > public void testClasspathValidation41() throws CoreException { > try { >@@ -1642,7 +1642,7 @@ > IJavaModelStatus status = JavaConventions.validateClasspath(proj, newCP, proj.getOutputLocation()); > > assertStatus( >- "Cannot nest \'P/src\' inside output folder \'P/\'", >+ "OK", > status); > } finally { > this.deleteProject("P"); >@@ -1672,6 +1672,29 @@ > this.deleteProject("P"); > } > } >+/* >+ * Ensure that a custom output folder cannot be nested in the default output folder >+ * (regression test for bug 80756 Multiple source folders to one bin forgot copy some files) >+ */ >+public void testClasspathValidation43() throws CoreException { >+ try { >+ IJavaProject proj = createJavaProject("P", new String[] {}, ""); >+ IClasspathEntry[] originalCP = proj.getRawClasspath(); >+ >+ IClasspathEntry[] newCP = new IClasspathEntry[originalCP.length+2]; >+ System.arraycopy(originalCP, 0, newCP, 0, originalCP.length); >+ newCP[originalCP.length] = JavaCore.newSourceEntry(new Path("/P/src1"), new IPath[0], new Path("/P/bin")); >+ newCP[originalCP.length+1] = JavaCore.newSourceEntry(new Path("/P/src2")); >+ >+ IJavaModelStatus status = JavaConventions.validateClasspath(proj, newCP, new Path("/P/bin/default")); >+ >+ assertStatus( >+ "Cannot nest output folder \'P/bin/default\' inside output folder \'P/bin\'", >+ status); >+ } finally { >+ deleteProject("P"); >+ } >+} > /** > * Setting the classpath with two entries specifying the same path > * should fail. >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/ClasspathEntry.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClasspathEntry.java,v >retrieving revision 1.92 >diff -u -r1.92 ClasspathEntry.java >--- model/org/eclipse/jdt/internal/core/ClasspathEntry.java 6 Apr 2006 01:47:51 -0000 1.92 >+++ model/org/eclipse/jdt/internal/core/ClasspathEntry.java 10 Apr 2006 13:54:40 -0000 >@@ -1377,6 +1377,16 @@ > } > } > } >+ // check nesting of project's output in custom output >+ int projectOutputIndex; >+ if ((projectOutputIndex = Util.indexOfEnclosingPath(projectOutputLocation, outputLocations, outputCount)) > 0) { >+ // allow project's output nesting in custom output if all source entries have a custom output >+ if (sourceEntryCount <= outputCount-1) { >+ allowNestingInOutputLocations[projectOutputIndex] = true; >+ } else { >+ return new JavaModelStatus(IJavaModelStatusConstants.INVALID_CLASSPATH, Messages.bind(Messages.classpath_cannotNestOutputInOutput, new String[] {projectOutputLocation.makeRelative().toString(), outputLocations[projectOutputIndex].makeRelative().toString()})); >+ } >+ } > // allow custom output nesting in project's output if all source entries have a custom output > if (sourceEntryCount <= outputCount-1) { > allowNestingInOutputLocations[0] = true;
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 80756
: 38150