KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > edit > provider > IEditingDomainItemProvider


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2002-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: IEditingDomainItemProvider.java,v 1.2 2005/06/08 06:17:05 nickb Exp $
16  */

17 package org.eclipse.emf.edit.provider;
18
19
20 import java.util.Collection JavaDoc;
21
22 import org.eclipse.emf.common.command.Command;
23 import org.eclipse.emf.edit.command.CommandParameter;
24 import org.eclipse.emf.edit.domain.EditingDomain;
25
26
27 /**
28  * This is the interface used by {@link EditingDomain}
29  * to impose a hierarchical relation on the model objects,
30  * and to map operations on those objects onto an underlying EMF model {@link Command}s.
31  * See {@link EditingDomain} for more details about how this is used.
32  */

33 public interface IEditingDomainItemProvider
34 {
35   /**
36    * This does the same thing as {@link org.eclipse.emf.edit.domain.EditingDomain#getChildren EditingDomain.getChildren},
37    * i.e., it imposes a hierarchical relation on a domain's model objects.
38    */

39   public Collection JavaDoc getChildren(Object JavaDoc object);
40
41   /**
42    * This does the same thing as {@link org.eclipse.emf.edit.domain.EditingDomain#getParent EditingDomain.getParent},
43    * i.e., it imposes a hierarchical relation on a domain's model objects.
44    */

45   public Object JavaDoc getParent(Object JavaDoc object);
46
47   /**
48    * This does the same thing as {@link
49    * org.eclipse.emf.edit.domain.EditingDomain#getNewChildDescriptors
50    * EditingDomain.getNewChildDescriptors}, i.e., it returns a collection of
51    * objects describing the children that can be added under an object in
52    * the editing domain.
53    */

54   public Collection JavaDoc getNewChildDescriptors(Object JavaDoc object, EditingDomain editingDomain, Object JavaDoc sibling);
55
56   /**
57    * This does the same thing as {@link org.eclipse.emf.edit.domain.EditingDomain#createCommand EditingDomain.createCommand},
58    * i.e., it creates commands for a domain's model objects.
59    */

60   public Command createCommand(Object JavaDoc object, EditingDomain editingDomain, Class JavaDoc commandClass, CommandParameter commandParameter);
61 }
62
Popular Tags