View | Details | Raw Unified | Return to bug 164081
Collapse All | Expand All

(-)batch/org/eclipse/jdt/internal/compiler/batch/Main.java (-5 / +25 lines)
Lines 99-104 Link Here
99
		private static final String NUMBER_OF_WARNINGS = "warnings"; //$NON-NLS-1$
99
		private static final String NUMBER_OF_WARNINGS = "warnings"; //$NON-NLS-1$
100
		private static final String OPTION = "option"; //$NON-NLS-1$
100
		private static final String OPTION = "option"; //$NON-NLS-1$
101
		private static final String OPTIONS = "options"; //$NON-NLS-1$
101
		private static final String OPTIONS = "options"; //$NON-NLS-1$
102
		private static final String OUTPUT = "output"; //$NON-NLS-1$
103
		private static final String PACKAGE = "package"; //$NON-NLS-1$
102
		private static final String PATH = "path"; //$NON-NLS-1$
104
		private static final String PATH = "path"; //$NON-NLS-1$
103
		private static final String PROBLEM_ARGUMENT = "argument"; //$NON-NLS-1$
105
		private static final String PROBLEM_ARGUMENT = "argument"; //$NON-NLS-1$
104
		private static final String PROBLEM_ARGUMENT_VALUE = "value"; //$NON-NLS-1$
106
		private static final String PROBLEM_ARGUMENT_VALUE = "value"; //$NON-NLS-1$
Lines 955-965 Link Here
955
		public void startLoggingSource(CompilationResult compilationResult) {
957
		public void startLoggingSource(CompilationResult compilationResult) {
956
			if ((this.tagBits & Logger.XML) != 0) {
958
			if ((this.tagBits & Logger.XML) != 0) {
957
				ICompilationUnit compilationUnit = compilationResult.compilationUnit;
959
				ICompilationUnit compilationUnit = compilationResult.compilationUnit;
958
				char[] fileName = compilationUnit.getFileName();
960
				if (compilationUnit != null) {
959
				File f = new File(new String(fileName));
961
    				char[] fileName = compilationUnit.getFileName();
960
				if (fileName != null) {
962
    				File f = new File(new String(fileName));
961
					if (compilationUnit != null) {
963
    				if (fileName != null) {
962
						this.parameters.put(Logger.PATH, f.getAbsolutePath());
964
    					this.parameters.put(Logger.PATH, f.getAbsolutePath());
965
    				}
966
    				char[][] packageName = compilationResult.packageName;
967
    				if (packageName != null) {
968
    					this.parameters.put(
969
    							Logger.PACKAGE,
970
    							new String(CharOperation.concatWith(packageName, File.separatorChar)));
971
    				}
972
    				CompilationUnit unit = (CompilationUnit) compilationUnit;
973
    				String destinationPath = unit.destinationPath;
974
					if (destinationPath == null) {
975
						destinationPath = this.main.destinationPath;
976
					}
977
					if (destinationPath != null && destinationPath != NONE) {
978
						if (File.separatorChar == '/') {
979
							this.parameters.put(Logger.OUTPUT, destinationPath);
980
						} else {
981
							this.parameters.put(Logger.OUTPUT, destinationPath.replace('/', File.separatorChar));
982
						}
963
					}
983
					}
964
				}
984
				}
965
				this.printTag(Logger.SOURCE, this.parameters, true, false);
985
				this.printTag(Logger.SOURCE, this.parameters, true, false);
(-)schema/compiler.dtd (-1 / +3 lines)
Lines 30-36 Link Here
30
<!ATTLIST classpath path CDATA #REQUIRED
30
<!ATTLIST classpath path CDATA #REQUIRED
31
                    id   CDATA #REQUIRED
31
                    id   CDATA #REQUIRED
32
>
32
>
33
<!ATTLIST source path CDATA #REQUIRED>
33
<!ATTLIST source path    CDATA #REQUIRED
34
                 output  CDATA #IMPLIED
35
                 package CDATA #IMPLIED>
34
<!ATTLIST problems problems CDATA #REQUIRED
36
<!ATTLIST problems problems CDATA #REQUIRED
35
				   errors   CDATA #REQUIRED
37
				   errors   CDATA #REQUIRED
36
				   warnings CDATA #REQUIRED
38
				   warnings CDATA #REQUIRED
(-)compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java (-1 / +7 lines)
Lines 72-77 Link Here
72
	long[] suppressWarningIrritants;  // irritant for suppressed warnings
72
	long[] suppressWarningIrritants;  // irritant for suppressed warnings
73
	long[] suppressWarningScopePositions; // (start << 32) + end 
73
	long[] suppressWarningScopePositions; // (start << 32) + end 
74
	int suppressWarningsCount;
74
	int suppressWarningsCount;
75
	public char[][] packageName;
75
	
76
	
76
private static final int[] EMPTY_LINE_ENDS = new int[0];
77
private static final int[] EMPTY_LINE_ENDS = new int[0];
77
private static final Comparator PROBLEM_COMPARATOR = new Comparator() {
78
private static final Comparator PROBLEM_COMPARATOR = new Comparator() {
Lines 375-381 Link Here
375
	if (left < original_right)
376
	if (left < original_right)
376
		quickPrioritize(problemList, left, original_right);
377
		quickPrioritize(problemList, left, original_right);
377
}
378
}
378
379
/*
380
 * Record the compilation unit result's package name
381
 */
382
public void recordPackageName(char[][] packName) {
383
	this.packageName = packName;
384
}
379
public void record(CategorizedProblem newProblem, ReferenceContext referenceContext) {
385
public void record(CategorizedProblem newProblem, ReferenceContext referenceContext) {
380
	//new Exception("VERBOSE PROBLEM REPORTING").printStackTrace();
386
	//new Exception("VERBOSE PROBLEM REPORTING").printStackTrace();
381
	if(newProblem.getID() == IProblem.Task) {
387
	if(newProblem.getID() == IProblem.Task) {
(-)compiler/org/eclipse/jdt/internal/compiler/Compiler.java (+4 lines)
Lines 373-378 Link Here
373
				// initial type binding creation
373
				// initial type binding creation
374
				lookupEnvironment.buildTypeBindings(parsedUnit, null /*no access restriction*/);
374
				lookupEnvironment.buildTypeBindings(parsedUnit, null /*no access restriction*/);
375
				this.addCompilationUnit(sourceUnits[i], parsedUnit);
375
				this.addCompilationUnit(sourceUnits[i], parsedUnit);
376
				ImportReference currentPackage = parsedUnit.currentPackage;
377
				if (currentPackage != null) {
378
					unitResult.recordPackageName(currentPackage.tokens);
379
				}
376
				//} catch (AbortCompilationUnit e) {
380
				//} catch (AbortCompilationUnit e) {
377
				//	requestor.acceptResult(unitResult.tagAsAccepted());
381
				//	requestor.acceptResult(unitResult.tagAsAccepted());
378
			} finally {
382
			} finally {

Return to bug 164081