diff options
Diffstat (limited to 'plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/NullDiagnostician.java')
-rw-r--r-- | plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/NullDiagnostician.java | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/NullDiagnostician.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/NullDiagnostician.java new file mode 100644 index 000000000..f67535eb7 --- /dev/null +++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/NullDiagnostician.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright (c) 2012 protos software gmbh (http://www.protos.de). + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * CONTRIBUTORS: + * Henrik Rentz-Reichert (initial contribution) + * + *******************************************************************************/ + +package org.eclipse.etrice.core.genmodel.fsm; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; + +/** + * @author Henrik Rentz-Reichert + * + */ +public class NullDiagnostician implements IDiagnostician { + + private boolean failed = false; + + /* (non-Javadoc) + * @see org.eclipse.etrice.core.genmodel.etricegen.IDiagnostician#warning(java.lang.String, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EStructuralFeature) + */ + @Override + public void warning(String msg, EObject source, EStructuralFeature feature) { + } + + /* (non-Javadoc) + * @see org.eclipse.etrice.core.genmodel.etricegen.IDiagnostician#warning(java.lang.String, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EStructuralFeature, int) + */ + @Override + public void warning(String msg, EObject source, EStructuralFeature feature, int idx) { + } + + /* (non-Javadoc) + * @see org.eclipse.etrice.core.genmodel.etricegen.IDiagnostician#error(java.lang.String, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EStructuralFeature) + */ + @Override + public void error(String msg, EObject source, EStructuralFeature feature) { + error(msg, source, feature, -1); + } + + /* (non-Javadoc) + * @see org.eclipse.etrice.core.genmodel.etricegen.IDiagnostician#error(java.lang.String, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EStructuralFeature, int) + */ + @Override + public void error(String msg, EObject source, EStructuralFeature feature, int idx) { + failed = true; + } + + /* (non-Javadoc) + * @see org.eclipse.etrice.core.genmodel.etricegen.IDiagnostician#isFailed() + */ + @Override + public boolean isFailed() { + return failed; + } + +} |