From 383c5fd43f7c1a4707332ed548ca7ce8a7117784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD=20=D0=9F=D0=B0=D0=BB=D0=B0?= =?UTF-8?q?=D1=83=D0=B7=D0=BE=D0=B2?= Date: Mon, 20 Apr 2026 21:26:10 +0300 Subject: [PATCH] Generate{Persistence,Rule,Script}.mwe2: do not generate Validator.xtend stubs (#5503) --- .../persistence/GeneratePersistence.mwe2 | 3 ++ .../validation/PersistenceValidator.xtend | 36 ------------------- .../core/model/rule/GenerateRules.mwe2 | 3 ++ .../rule/validation/RulesValidator.xtend | 36 ------------------- .../core/model/script/GenerateScript.mwe2 | 3 ++ .../script/validation/ScriptValidator.xtend | 36 ------------------- 6 files changed, 9 insertions(+), 108 deletions(-) delete mode 100644 bundles/org.openhab.core.model.persistence/src/org/openhab/core/model/persistence/validation/PersistenceValidator.xtend delete mode 100644 bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/validation/RulesValidator.xtend delete mode 100644 bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/validation/ScriptValidator.xtend diff --git a/bundles/org.openhab.core.model.persistence/src/org/openhab/core/model/persistence/GeneratePersistence.mwe2 b/bundles/org.openhab.core.model.persistence/src/org/openhab/core/model/persistence/GeneratePersistence.mwe2 index 9a8e8a559..61885cfda 100644 --- a/bundles/org.openhab.core.model.persistence/src/org/openhab/core/model/persistence/GeneratePersistence.mwe2 +++ b/bundles/org.openhab.core.model.persistence/src/org/openhab/core/model/persistence/GeneratePersistence.mwe2 @@ -52,6 +52,9 @@ Workflow { serializer = { generateStub = false } + validator = { + generateStub = false + } } } } diff --git a/bundles/org.openhab.core.model.persistence/src/org/openhab/core/model/persistence/validation/PersistenceValidator.xtend b/bundles/org.openhab.core.model.persistence/src/org/openhab/core/model/persistence/validation/PersistenceValidator.xtend deleted file mode 100644 index daee0a776..000000000 --- a/bundles/org.openhab.core.model.persistence/src/org/openhab/core/model/persistence/validation/PersistenceValidator.xtend +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010-2026 Contributors to the openHAB project - * - * See the NOTICE file(s) distributed with this work for additional - * information. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0 - * - * SPDX-License-Identifier: EPL-2.0 - */ -/* - * generated by Xtext - */ -package org.openhab.core.model.persistence.validation -//import org.eclipse.xtext.validation.Check - -/** - * Custom validation rules. - * - * see http://www.eclipse.org/Xtext/documentation.html#validation - */ -class PersistenceValidator extends AbstractPersistenceValidator { - -// public static val INVALID_NAME = 'invalidName' -// -// @Check -// def checkGreetingStartsWithCapital(Greeting greeting) { -// if (!Character.isUpperCase(greeting.name.charAt(0))) { -// warning('Name should start with a capital', -// MyDslPackage.Literals.GREETING__NAME, -// INVALID_NAME) -// } -// } -} diff --git a/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/GenerateRules.mwe2 b/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/GenerateRules.mwe2 index 5759cf674..6a992101d 100644 --- a/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/GenerateRules.mwe2 +++ b/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/GenerateRules.mwe2 @@ -54,6 +54,9 @@ Workflow { serializer = { generateStub = false } + validator = { + generateStub = false + } } } } diff --git a/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/validation/RulesValidator.xtend b/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/validation/RulesValidator.xtend deleted file mode 100644 index 75350e41b..000000000 --- a/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/validation/RulesValidator.xtend +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010-2026 Contributors to the openHAB project - * - * See the NOTICE file(s) distributed with this work for additional - * information. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0 - * - * SPDX-License-Identifier: EPL-2.0 - */ -/* - * generated by Xtext - */ -package org.openhab.core.model.rule.validation -//import org.eclipse.xtext.validation.Check - -/** - * Custom validation rules. - * - * see http://www.eclipse.org/Xtext/documentation.html#validation - */ -class RulesValidator extends AbstractRulesValidator { - -// public static val INVALID_NAME = 'invalidName' -// -// @Check -// def checkGreetingStartsWithCapital(Greeting greeting) { -// if (!Character.isUpperCase(greeting.name.charAt(0))) { -// warning('Name should start with a capital', -// MyDslPackage.Literals.GREETING__NAME, -// INVALID_NAME) -// } -// } -} diff --git a/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/GenerateScript.mwe2 b/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/GenerateScript.mwe2 index 23af6cf39..5d87ad1c3 100644 --- a/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/GenerateScript.mwe2 +++ b/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/GenerateScript.mwe2 @@ -52,6 +52,9 @@ Workflow { serializer = { generateStub = false } + validator = { + generateStub = false + } } } } diff --git a/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/validation/ScriptValidator.xtend b/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/validation/ScriptValidator.xtend deleted file mode 100644 index 496007425..000000000 --- a/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/validation/ScriptValidator.xtend +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010-2026 Contributors to the openHAB project - * - * See the NOTICE file(s) distributed with this work for additional - * information. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0 - * - * SPDX-License-Identifier: EPL-2.0 - */ -/* - * generated by Xtext - */ -package org.openhab.core.model.script.validation -//import org.eclipse.xtext.validation.Check - -/** - * Custom validation rules. - * - * see http://www.eclipse.org/Xtext/documentation.html#validation - */ -class ScriptValidator extends AbstractScriptValidator { - -// public static val INVALID_NAME = 'invalidName' -// -// @Check -// def checkGreetingStartsWithCapital(Greeting greeting) { -// if (!Character.isUpperCase(greeting.name.charAt(0))) { -// warning('Name should start with a capital', -// MyDslPackage.Literals.GREETING__NAME, -// INVALID_NAME) -// } -// } -}