Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342665 - Generator Main class should use ./src-gen/ as output location
Summary: Generator Main class should use ./src-gen/ as output location
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: RC1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-13 03:08 EDT by Karsten Thoms CLA
Modified: 2017-09-19 17:05 EDT (History)
3 users (show)

See Also:
sebastian.zarnekow: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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