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

(-)batch/org/eclipse/jdt/internal/compiler/batch/messages.properties (-1 / +1 lines)
Lines 87-93 Link Here
87
unit.missing = File {0} is missing
87
unit.missing = File {0} is missing
88
88
89
### output
89
### output
90
output.noClassFileCreated = No .class file created for file named {0} because of an IOException.
90
output.noClassFileCreated = No .class file created for file {1} in {0} because of an IOException.
91
91
92
### miscellaneous
92
### miscellaneous
93
misc.version = {0} {1}, {2}
93
misc.version = {0} {1}, {2}
(-)batch/org/eclipse/jdt/internal/compiler/batch/Main.java (-7 / +5 lines)
Lines 356-362 Link Here
356
					this.parameters.put(Logger.PATH, f.getCanonicalPath());
356
					this.parameters.put(Logger.PATH, f.getCanonicalPath());
357
					this.printTag(Logger.CLASS_FILE, this.parameters, true, true);
357
					this.printTag(Logger.CLASS_FILE, this.parameters, true, true);
358
				} catch (IOException e) {
358
				} catch (IOException e) {
359
					this.logNoClassFileCreated(fileName);
359
					this.logNoClassFileCreated(outputPath, relativeFileName);
360
				}
360
				}
361
			}	
361
			}	
362
		}
362
		}
Lines 455-467 Link Here
455
		/**
455
		/**
456
		 * 
456
		 * 
457
		 */
457
		 */
458
		public void logNoClassFileCreated(String fileName) {
458
		public void logNoClassFileCreated(String outputDir, String relativeFileName) {
459
			if ((this.tagBits & Logger.XML) != 0) {
459
			if ((this.tagBits & Logger.XML) != 0) {
460
				this.parameters.clear();
460
				this.parameters.clear();
461
				this.parameters.put(Logger.MESSAGE, Main.bind("output.noClassFileCreated", fileName)); //$NON-NLS-1$
461
				this.parameters.put(Logger.MESSAGE, Main.bind("output.noClassFileCreated", outputDir, relativeFileName)); //$NON-NLS-1$
462
				this.printTag(Logger.ERROR_TAG, this.parameters, true, true);
462
				this.printTag(Logger.ERROR_TAG, this.parameters, true, true);
463
			}
463
			}
464
			this.printlnErr(Main.bind("output.noClassFileCreated", fileName)); //$NON-NLS-1$
464
			this.printlnErr(Main.bind("output.noClassFileCreated", outputDir, relativeFileName)); //$NON-NLS-1$
465
		}
465
		}
466
466
467
		public void logNoClasspath() {
467
		public void logNoClasspath() {
Lines 2788-2796 Link Here
2788
						this.destinationPath,
2788
						this.destinationPath,
2789
						relativeStringName);
2789
						relativeStringName);
2790
				} catch (IOException e) {
2790
				} catch (IOException e) {
2791
					String fileName = this.destinationPath + relativeStringName;
2791
					this.logger.logNoClassFileCreated(this.destinationPath, relativeStringName);
2792
					e.printStackTrace();
2793
					this.logger.logNoClassFileCreated(fileName);
2794
				}
2792
				}
2795
				this.exportedClassFilesCounter++;
2793
				this.exportedClassFilesCounter++;
2796
			}
2794
			}
(-)compiler/org/eclipse/jdt/internal/compiler/messages.properties (-5 / +3 lines)
Lines 23-34 Link Here
23
compilation_internalError = Internal compiler error
23
compilation_internalError = Internal compiler error
24
24
25
### output
25
### output
26
output_isFile =  The outDir is a file : {0}
26
output_isFile =  The output directory is a file : {0}
27
output_isFileNotDirectory = The outDir is a file not a directory.
27
output_notValidAll =  The output directory {0} is not a valid directory name. All the directories cannot be created
28
output_dirName =  The output dir name is : {0}
29
output_notValidAll =  The outDir is not a valid directory name. All the directories cannot be created.
30
output_fileName =  file name : {0}
28
output_fileName =  file name : {0}
31
output_notValid = The outDir is not a valid directory name. The directory cannot be created.
29
output_notValid = The output directoryr is not a valid directory name. The directory cannot be created
32
30
33
### problem
31
### problem
34
problem_noSourceInformation =
32
problem_noSourceInformation =
(-)compiler/org/eclipse/jdt/internal/compiler/ClassFile.java (-4 / +6 lines)
Lines 119-132 Link Here
119
		f = new File(outputPath);
119
		f = new File(outputPath);
120
		if (f.exists()) {
120
		if (f.exists()) {
121
			if (!f.isDirectory()) {
121
			if (!f.isDirectory()) {
122
				System.out.println(Messages.bind(Messages.output_isFile, f.getAbsolutePath()));
122
				final String message = Messages.bind(Messages.output_isFile, f.getAbsolutePath());
123
				throw new IOException(Messages.output_isFileNotDirectory);
123
				System.out.println(message);
124
				throw new IOException(message);
124
			}
125
			}
125
		} else {
126
		} else {
126
			// we have to create that directory
127
			// we have to create that directory
127
			if (!f.mkdirs()) {
128
			if (!f.mkdirs()) {
128
				System.out.println(Messages.bind(Messages.output_dirName, f.getAbsolutePath()));
129
				final String message = Messages.bind(Messages.output_notValidAll, f.getAbsolutePath());
129
				throw new IOException(Messages.output_notValidAll);
130
				System.out.println(message);
131
				throw new IOException(message);
130
			}
132
			}
131
		}
133
		}
132
		StringBuffer outDir = new StringBuffer(outputPath);
134
		StringBuffer outDir = new StringBuffer(outputPath);
(-)compiler/org/eclipse/jdt/internal/compiler/util/Messages.java (-2 lines)
Lines 88-95 Link Here
88
	public static String compilation_unit;
88
	public static String compilation_unit;
89
	public static String compilation_internalError;
89
	public static String compilation_internalError;
90
	public static String output_isFile;
90
	public static String output_isFile;
91
	public static String output_isFileNotDirectory;
92
	public static String output_dirName;
93
	public static String output_notValidAll;
91
	public static String output_notValidAll;
94
	public static String output_fileName;
92
	public static String output_fileName;
95
	public static String output_notValid;
93
	public static String output_notValid;

Return to bug 137053