1 /** 2 * <copyright> 3 * 4 * Copyright (c) 2004 IBM Corporation and others. 5 * All rights reserved. This program and the accompanying materials 6 * are made available under the terms of the Eclipse Public License v1.0 7 * which accompanies this distribution, and is available at 8 * http://www.eclipse.org/legal/epl-v10.html 9 * 10 * Contributors: 11 * IBM - Initial API and implementation 12 * 13 * </copyright> 14 * 15 * $Id: IWrapperItemProvider.java,v 1.4 2005/06/08 06:17:05 nickb Exp $ 16 */ 17 package org.eclipse.emf.edit.provider; 18 19 import org.eclipse.emf.ecore.EStructuralFeature; 20 21 22 /** 23 * The base interface for a value wrapper that can implement item provider interfaces. 24 */ 25 public interface IWrapperItemProvider extends IDisposable 26 { 27 /** 28 * Returns the wrapped value. 29 */ 30 Object getValue(); 31 32 /** 33 * Returns the object that owns the value. 34 */ 35 Object getOwner(); 36 37 /** 38 * Returns the structural feature through which the value can be set and retrieved, or null if the feature is 39 * unknown or not applicable. 40 */ 41 EStructuralFeature getFeature(); 42 43 /** 44 * The index at which the value is located, or {@link org.eclipse.emf.edit.command.CommandParameter#NO_INDEX} if the 45 * index isn't known to the wrapper. If {@link #feature} is non-null, this index is within that feature. 46 */ 47 int getIndex(); 48 49 /** 50 * Sets the index. Has no effect if the index isn't known to the wrapper. 51 */ 52 void setIndex(int index); 53 } 54