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 53646 Details for
Bug 164081
XML log could contain package information
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_164081.txt (text/plain), 5.60 KB, created by
Olivier Thomann
on 2006-11-10 14:26:27 EST
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2006-11-10 14:26:27 EST
Size:
5.60 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v >retrieving revision 1.268 >diff -u -r1.268 Main.java >--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 24 Oct 2006 02:54:49 -0000 1.268 >+++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 10 Nov 2006 19:28:32 -0000 >@@ -99,6 +99,8 @@ > private static final String NUMBER_OF_WARNINGS = "warnings"; //$NON-NLS-1$ > private static final String OPTION = "option"; //$NON-NLS-1$ > private static final String OPTIONS = "options"; //$NON-NLS-1$ >+ private static final String OUTPUT = "output"; //$NON-NLS-1$ >+ private static final String PACKAGE = "package"; //$NON-NLS-1$ > private static final String PATH = "path"; //$NON-NLS-1$ > private static final String PROBLEM_ARGUMENT = "argument"; //$NON-NLS-1$ > private static final String PROBLEM_ARGUMENT_VALUE = "value"; //$NON-NLS-1$ >@@ -955,11 +957,29 @@ > public void startLoggingSource(CompilationResult compilationResult) { > if ((this.tagBits & Logger.XML) != 0) { > ICompilationUnit compilationUnit = compilationResult.compilationUnit; >- char[] fileName = compilationUnit.getFileName(); >- File f = new File(new String(fileName)); >- if (fileName != null) { >- if (compilationUnit != null) { >- this.parameters.put(Logger.PATH, f.getAbsolutePath()); >+ if (compilationUnit != null) { >+ char[] fileName = compilationUnit.getFileName(); >+ File f = new File(new String(fileName)); >+ if (fileName != null) { >+ this.parameters.put(Logger.PATH, f.getAbsolutePath()); >+ } >+ char[][] packageName = compilationResult.packageName; >+ if (packageName != null) { >+ this.parameters.put( >+ Logger.PACKAGE, >+ new String(CharOperation.concatWith(packageName, File.separatorChar))); >+ } >+ CompilationUnit unit = (CompilationUnit) compilationUnit; >+ String destinationPath = unit.destinationPath; >+ if (destinationPath == null) { >+ destinationPath = this.main.destinationPath; >+ } >+ if (destinationPath != null && destinationPath != NONE) { >+ if (File.separatorChar == '/') { >+ this.parameters.put(Logger.OUTPUT, destinationPath); >+ } else { >+ this.parameters.put(Logger.OUTPUT, destinationPath.replace('/', File.separatorChar)); >+ } > } > } > this.printTag(Logger.SOURCE, this.parameters, true, false); >Index: schema/compiler.dtd >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/schema/compiler.dtd,v >retrieving revision 1.11 >diff -u -r1.11 compiler.dtd >--- schema/compiler.dtd 21 Apr 2006 17:59:21 -0000 1.11 >+++ schema/compiler.dtd 10 Nov 2006 19:28:32 -0000 >@@ -30,7 +30,9 @@ > <!ATTLIST classpath path CDATA #REQUIRED > id CDATA #REQUIRED > > >-<!ATTLIST source path CDATA #REQUIRED> >+<!ATTLIST source path CDATA #REQUIRED >+ output CDATA #IMPLIED >+ package CDATA #IMPLIED> > <!ATTLIST problems problems CDATA #REQUIRED > errors CDATA #REQUIRED > warnings CDATA #REQUIRED >Index: compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java,v >retrieving revision 1.53 >diff -u -r1.53 CompilationResult.java >--- compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java 6 Nov 2006 21:54:07 -0000 1.53 >+++ compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java 10 Nov 2006 19:28:32 -0000 >@@ -72,6 +72,7 @@ > long[] suppressWarningIrritants; // irritant for suppressed warnings > long[] suppressWarningScopePositions; // (start << 32) + end > int suppressWarningsCount; >+ public char[][] packageName; > > private static final int[] EMPTY_LINE_ENDS = new int[0]; > private static final Comparator PROBLEM_COMPARATOR = new Comparator() { >@@ -375,7 +376,12 @@ > if (left < original_right) > quickPrioritize(problemList, left, original_right); > } >- >+/* >+ * Record the compilation unit result's package name >+ */ >+public void recordPackageName(char[][] packName) { >+ this.packageName = packName; >+} > public void record(CategorizedProblem newProblem, ReferenceContext referenceContext) { > //new Exception("VERBOSE PROBLEM REPORTING").printStackTrace(); > if(newProblem.getID() == IProblem.Task) { >Index: compiler/org/eclipse/jdt/internal/compiler/Compiler.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java,v >retrieving revision 1.79 >diff -u -r1.79 Compiler.java >--- compiler/org/eclipse/jdt/internal/compiler/Compiler.java 28 Sep 2006 14:14:29 -0000 1.79 >+++ compiler/org/eclipse/jdt/internal/compiler/Compiler.java 10 Nov 2006 19:28:32 -0000 >@@ -373,6 +373,10 @@ > // initial type binding creation > lookupEnvironment.buildTypeBindings(parsedUnit, null /*no access restriction*/); > this.addCompilationUnit(sourceUnits[i], parsedUnit); >+ ImportReference currentPackage = parsedUnit.currentPackage; >+ if (currentPackage != null) { >+ unitResult.recordPackageName(currentPackage.tokens); >+ } > //} catch (AbortCompilationUnit e) { > // requestor.acceptResult(unitResult.tagAsAccepted()); > } finally {
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 164081
: 53646