blob: 5850940f44467e47744669db087d10296bada75f [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2015 Willink Transformations and others.
* 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:
* E.D.Willink - initial API and implementation
*******************************************************************************/
package org.eclipse.qvtd.cs2as.runtime;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.ecore.EObject;
public class CS2ASDiagnostic<CS extends EObject> extends BasicDiagnostic
implements EObjectDiagnostic {
private CS csObject;
public CS2ASDiagnostic(CS csObject, int severity, String source, int code, String message) {
super(severity, source, code, message, null);
this.csObject = csObject;
}
/**
* A simple (no source, code) CS2AS error diagnostic
* @param csObject the source CSObject
* @param message the erroneus situation
*/
public CS2ASDiagnostic(CS csObject, String message) {
this(csObject, Diagnostic.ERROR, null, 0, message);
}
@Override
public CS getEObject() {
return csObject;
}
}