blob: ffb8596fa4710c49a3e0d9a63d32237c68a6825c [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2008-2011 Chair for Applied Software Engineering,
* Technische Universitaet Muenchen.
* 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:
******************************************************************************/
package org.eclipse.emf.ecp.validation.providers;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.viewers.ColumnLabelProvider;
/**
* ColumnLabelProvider showing the constraint name.
*
* @author Carmen Carlan
*
*/
public class ConstraintLabelProvider extends ColumnLabelProvider {
/**
* {@inheritDoc}
*/
@Override
public String getText(Object element) {
if (element instanceof IStatus) {
IStatus constraint = (IStatus) element;
return constraint.getMessage();
}
return super.getText(element);
}
}