blob: 8be1d2ebc3bf297858c1504e9b473cd4d8815879 [file] [log] [blame]
/**
* <copyright>
*
* Copyright (c) 2002-2006 IBM Corporation 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:
* IBM - Initial API and implementation
*
* </copyright>
*
* $Id: XSDMinFacetItemProvider.java,v 1.3 2006/12/29 18:32:33 marcelop Exp $
*/
package org.eclipse.xsd.provider;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.xsd.XSDMinFacet;
/**
* This is the item provider adpater for a {@link org.eclipse.xsd.XSDMinFacet} object.
*/
public class XSDMinFacetItemProvider
extends XSDFixedFacetItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource
{
/**
* This constructs an instance from a factory and a notifier.
*/
public XSDMinFacetItemProvider(AdapterFactory adapterFactory)
{
super(adapterFactory);
}
@Override
public String getText(Object object)
{
XSDMinFacet xsdMinFacet = ((XSDMinFacet)object);
String result = xsdMinFacet.getLexicalValue();
return result == null ? "" : result;
}
/**
* This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}.
*/
@Override
public void notifyChanged(Notification msg)
{
if (
msg.getFeature() == xsdPackage.getXSDMinFacet_Value()
)
{
fireNotifyChanged(msg);
return;
}
super.notifyChanged(msg);
}
}