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 180240 Details for
Bug 322789
package-info.java Won't Build On First Compile Pass
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_322789.txt (text/plain), 3.90 KB, created by
Olivier Thomann
on 2010-10-05 09:54:47 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2010-10-05 09:54:47 EDT
Size:
3.90 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java,v >retrieving revision 1.69 >diff -u -r1.69 JDTCompilerAdapter.java >--- antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java 25 Apr 2010 20:10:09 -0000 1.69 >+++ antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java 5 Oct 2010 13:53:50 -0000 >@@ -119,8 +119,6 @@ > } > } > >- Path classpath = new Path(this.project); >- > /* > * Eclipse compiler doesn't support -extdirs. > * It is emulated using the classpath. We add extdirs entries after the >@@ -131,11 +129,17 @@ > cmd.createArgument().setPath(this.extdirs); > } > >+ Path classpath = new Path(this.project); > /* > * The java runtime is already handled, so we simply want to retrieve the > * ant runtime and the compile classpath. > */ > classpath.append(getCompileClasspath()); >+ /* >+ * Set the classpath for the Eclipse compiler. >+ */ >+ cmd.createArgument().setValue("-classpath"); //$NON-NLS-1$ >+ createClasspathArgument(cmd, classpath); > > // For -sourcepath, use the "sourcepath" value if present. > // Otherwise default to the "srcdir" value. >@@ -164,12 +168,8 @@ > } else { > sourcepath = this.src; > } >- classpath.append(sourcepath); >- /* >- * Set the classpath for the Eclipse compiler. >- */ >- cmd.createArgument().setValue("-classpath"); //$NON-NLS-1$ >- createClasspathArgument(cmd, classpath); >+ cmd.createArgument().setValue("-sourcepath"); //$NON-NLS-1$ >+ createClasspathArgument(cmd, sourcepath); > > final String javaVersion = JavaEnvUtils.getJavaVersion(); > String memoryParameterPrefix = javaVersion.equals(JavaEnvUtils.JAVA_1_1) ? "-J-" : "-J-X";//$NON-NLS-1$//$NON-NLS-2$ >Index: batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java,v >retrieving revision 1.55 >diff -u -r1.55 FileSystem.java >--- batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java 21 Feb 2010 03:35:52 -0000 1.55 >+++ batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java 5 Oct 2010 13:53:50 -0000 >@@ -201,13 +201,33 @@ > fileName = CharOperation.subarray(fileName, 0, lastIndexOf); > } > CharOperation.replace(fileName, '\\', '/'); >+ boolean globalPathMatches = false; >+ // the most nested path should be the selected one > for (int j = 0, max = this.classpaths.length; j < max; j++) { > char[] matchCandidate = this.classpaths[j].normalizedPath(); >- if (this.classpaths[j] instanceof ClasspathDirectory && >- CharOperation.prefixEquals(matchCandidate, fileName) && >- (matchingPathName == null || >- matchCandidate.length < matchingPathName.length)) { >- matchingPathName = matchCandidate; >+ boolean currentPathMatch = false; >+ if (this.classpaths[j] instanceof ClasspathDirectory >+ && CharOperation.prefixEquals(matchCandidate, fileName)) { >+ currentPathMatch = true; >+ if (matchingPathName == null) { >+ matchingPathName = matchCandidate; >+ } else { >+ if (currentPathMatch) { >+ // we have a second source folder that matches the path of the source file >+ if (matchCandidate.length > matchingPathName.length) { >+ // we want to preserve the shortest possible path >+ matchingPathName = matchCandidate; >+ } >+ } else { >+ // we want to preserve the shortest possible path >+ if (!globalPathMatches && matchCandidate.length < matchingPathName.length) { >+ matchingPathName = matchCandidate; >+ } >+ } >+ } >+ if (currentPathMatch) { >+ globalPathMatches = true; >+ } > } > } > if (matchingPathName == null) {
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 322789
:
176791
|
177741
|
179773
|
180237
| 180240