Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » A slot with name 'uml-gen' has not been configured exception
A slot with name 'uml-gen' has not been configured exception [message #1755647] Mon, 06 March 2017 14:11
Akira Tanaka is currently offline Akira TanakaFriend
Messages: 98
Registered: March 2010
We are working on extended Domainmodel. This produces two kinds of code, Java source code and PlantUML data (text data). Currently we do not have issues under eclipse, but when we move to outside of eclipse, things change a lot.

We use maven for grammar project, and gradle for example project. We followed xtextcast EPISODE #16 for output configuration. When trying to build example project, I get 'A slot with name 'uml-gen' has not been configured' exception ('uml-gen' is a folder/directory to store generated PlantUML data). I tried various modifications but no luck.

I searched 'uml-gen' in our grammar project, and found the following occurrences (BTW project name is modified).

- (grammar project)
public class ModelOutputConfigurationProvider implements IOutputConfigurationProvider {

	public static final String DEFAULT_OUTPUT = "src-gen";
	public static final String DIAGRAM_OUTPUT = "uml-gen";

	 * @return a set of {@link OutputConfiguration} available for the generator
	public Set<OutputConfiguration> getOutputConfigurations() {
		OutputConfiguration defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
		defaultOutput.setDescription("Output Folder");

		OutputConfiguration diagramOutput = new OutputConfiguration(DIAGRAM_OUTPUT);
		diagramOutput.setDescription("PlantUML output Folder");

		return newHashSet(defaultOutput, diagramOutput);

- generator workflow file (grammar project)
module com.example.domain.Generator

import org.eclipse.emf.mwe.utils.*

var srcDirModel = "src/main/model"
var targetDir = "uml-gen"

Workflow {
    component = DirectoryCleaner {
        directory = "${targetDir}"
    component = org.eclipse.xtext.mwe.Reader {
    	register = ModelStandaloneSetup {}
    	loadResource = {
    		slot = "model"
    	path = srcDirModel
    component = org.eclipse.xtext.generator.GeneratorComponent {
    	register = ModelStandaloneSetup {}
    	slot = "model"
    	outlet = {
    		outletName = "uml-gen"
    		path = targetDir

and, 'build.gradle' (example project)
xtext {
    languages {
        model {
            fileExtension = 'model'
            setup = 'com.example.domain.ModelStandaloneSetup'
            qualifiedName = 'com.example.domain.Model'
			generator.outlet.producesJava = true
    sourceSets {
        main {
            srcDir 'src/main/model'
			output {

Before applying this setting/configuration, I tested with MyDsl, and I got no such exception by doing the same gradle build ("./gradlew clean build").

I would appreciate any advice on which part of the code (and what) I should check.

Previous Topic:How to run automatically generated java file has a method main in Xtext generator ?
Next Topic:Inheriting from Java based validator fails due to changed naming
Goto Forum:

Current Time: Thu Jun 08 05:36:48 GMT 2023

Powered by FUDForum. Page generated in 0.02395 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top