Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342665

Summary: Generator Main class should use ./src-gen/ as output location
Product: [Modeling] TMF Reporter: Karsten Thoms <karsten.thoms>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: knut.wannheden, sebastian.zarnekow, sven.efftinge
Version: 2.0.0Flags: sebastian.zarnekow: indigo+
Target Milestone: RC1   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Karsten Thoms CLA 2011-04-13 03:08:40 EDT
The generated Main class uses "src-gen/" as output location. I created a situation where this lead to an NPE, see bug#342663. Changing the output location to "./src-gen/" avoids this and should be equivalent.

   fileAccess.setOutputPath("./src-gen/");
Comment 1 Knut Wannheden CLA 2011-04-13 03:45:25 EDT
Maybe it would make sense to verify if changing JavaIoFileSystemAccess#createFolder() to simply use File#mkdirs() instead of having it recursively call File#mkdir() solves the problem. I.e.

	protected void createFolder(File parent) {
		if(!parent.exists()) {
			parent.mkdirs();
		}
	}

or even just:

	protected void createFolder(File parent) {
		parent.mkdirs();
	}

instead of:

	protected void createFolder(File parent) {
		if(!parent.exists()) {
			createFolder(parent.getParentFile());
			parent.mkdir();
		}
	}
Comment 2 Sebastian Zarnekow CLA 2011-04-14 17:05:19 EDT
see also bug 342663
Comment 3 Sebastian Zarnekow CLA 2011-05-04 06:11:38 EDT
Preliminary scheduled for 2.0RC1
Comment 4 Sven Efftinge CLA 2011-05-11 10:41:51 EDT
pushed
Comment 5 Karsten Thoms CLA 2017-09-19 16:54:10 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 6 Karsten Thoms CLA 2017-09-19 17:05:00 EDT
Closing all bugs that were set to RESOLVED before Neon.0