From 66cde8ea28d64a3f19bde9680f7cde6376d469fe Mon Sep 17 00:00:00 2001 From: Stefan Oehme Date: Tue, 6 Oct 2015 08:47:58 +0200 Subject: [PATCH] set rootpath and basename in GenerateXbase also add a validation so that this doesn't go unnoticed again --- .../eclipse/xtext/xtext/generator/WizardConfig.xtend | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/org.eclipse.xtext.xtext.generator/src/org/eclipse/xtext/xtext/generator/WizardConfig.xtend b/plugins/org.eclipse.xtext.xtext.generator/src/org/eclipse/xtext/xtext/generator/WizardConfig.xtend index 7d2df7eb8..5503be42e 100644 --- a/plugins/org.eclipse.xtext.xtext.generator/src/org/eclipse/xtext/xtext/generator/WizardConfig.xtend +++ b/plugins/org.eclipse.xtext.xtext.generator/src/org/eclipse/xtext/xtext/generator/WizardConfig.xtend @@ -44,11 +44,15 @@ class WizardConfig extends XtextProjectConfig { override checkConfiguration(Issues issues) { super.checkConfiguration(issues) - val runtimeBase = runtimeRoot?.path - if (runtimeBase.nullOrEmpty) { - issues.addError('The property \'runtimeRoot\' must be set.', this) + if (rootPath == null) { + issues.addError('The property \'rootPath\' must be set.', this) return } + if (baseName == null) { + issues.addError('The property \'baseName\' must be set.', this) + return + } + val runtimeBase = runtimeRoot?.path if (!Character.isJavaIdentifierPart(runtimeBase.charAt(runtimeBase.length - 1))) issues.addError('The runtime root path must end with a valid package name.', this) if ((ideaEditor || webSupport) && !genericIdeSupport)