blob: 97867172e9a60b005ecdf74c7bada4b4909c8440 [file] [log] [blame]
/**
*
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
*/
@xcore.lang.GenModel(fileExtensions="message")
@GenModel(modelName="MessageDSL")
@GenModel(prefix="MessageDSL")
@GenModel(updateClasspath="false")
// force bigModel == false
@GenModel(loadInitialization="false")
@GenModel(literalsInterface="true")
@GenModel(copyrightText="Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
Based on ideas from Xtext, Xtend, Xcore
Contributors:
Christophe Loetz (Loetz GmbH&Co.KG) - Initial implementation
")
@Ecore(nsURI="http://osbp.eclipse.org/xtext/messagedsl/MessageDSL")
@Ecore(nsPrefix="messageDSL")
@Ecore(rootPackage="messageDSL")
package org.eclipse.osbp.xtext.messagedsl
import org.eclipse.osbp.dsl.semantic.common.types.LPackage
import org.eclipse.xtext.xtype.XImportSection
class MessageModel {
contains XImportSection importSection
contains MessagePackage pckg
}
class MessagePackage extends LPackage {
contains MessageCategory[] categories
}
class MessageCategory {
String name
contains MessageItem[] items
}
class MessageItem {
String name
contains MessageParameter[] parameters
SeverityEnum[] severities
contains MessageText allOutput
contains MessageText logOutput
contains MessageText showOutput
}
class MessageParameter {
String name
ParameterTypeEnum oftype
}
enum ParameterTypeEnum {
BOOLEAN as 'boolean'
INTEGER as 'int'
DOUBLE as 'double'
STRING as 'String'
CLASS as 'Class'
OBJECT as 'Object'
EXCEPTION as 'Exception'
}
enum SeverityEnum {
LOG_TRACE as 'log-trace'
LOG_DEBUG as 'log-debug'
LOG_INFO as 'log-info'
LOG_WARN as 'log-warn'
LOG_ERROR as 'log-error'
SHOW_INFO as 'show-info'
SHOW_WARN as 'show-warn'
SHOW_ERROR as 'show-error'
}
class MessageText {
String text
}