01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.core.ifeature;
11:
12: import java.io.Serializable;
13:
14: import org.eclipse.core.runtime.CoreException;
15: import org.eclipse.core.runtime.IAdaptable;
16: import org.eclipse.pde.core.IWritable;
17:
18: /**
19: * A base of all feature model objects.
20: */
21: public interface IFeatureObject extends IWritable, IAdaptable,
22: Serializable {
23: /**
24: * A property name that will be used to notify
25: * about changes in the "label" field.
26: */
27: String P_LABEL = "label"; //$NON-NLS-1$
28:
29: /**
30: * Returns the top-level feature model object.
31: * @return root feature object
32: */
33: public IFeature getFeature();
34:
35: /**
36: * Returns the label of this feature model object'
37: * @return feature object label
38: */
39: String getLabel();
40:
41: /**
42: * Returns the feature model that owns this model object.
43: *
44: * @return the feature model
45: */
46: IFeatureModel getModel();
47:
48: boolean isInTheModel();
49:
50: /**
51: * Returns the parent of this model object.
52: *
53: * @return the model object parent
54: */
55: public IFeatureObject getParent();
56:
57: /**
58: * Sets the new label of this model object.
59: * This method may throw a CoreException
60: * if the model is not editable.
61: *
62: * @param label the new label
63: */
64: void setLabel(String label) throws CoreException;
65:
66: /**
67: * Returns the translated label of this feature model object'
68: * @return feature object translated label
69: */
70: public String getTranslatableLabel();
71: }
|