|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.views.properties.tabbed.AbstractPropertySection
org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractModelerPropertySection
public abstract class AbstractModelerPropertySection
An abstract implementation of a section in a tab in the tabbed property sheet page for modeler.
Field Summary | |
---|---|
protected boolean |
disposed
a flag indicating if this property section got disposed |
protected org.eclipse.emf.ecore.EObject |
eObject
eObject should gradually replace EElement |
protected org.eclipse.emf.transaction.DemultiplexingListener |
eventListener
model event listener |
protected java.util.List |
input
object currently selected on either a diagram or a ME - a view |
protected static PropertiesServiceAdapterFactory |
propertiesProvider
|
protected static java.lang.String |
VALUE_CHANGED_STRING
value changed string |
Fields inherited from class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection |
---|
STANDARD_LABEL_WIDTH |
Constructor Summary | |
---|---|
AbstractModelerPropertySection()
|
Method Summary | |
---|---|
void |
aboutToBeHidden()
|
void |
aboutToBeShown()
|
protected org.eclipse.emf.ecore.EObject |
adapt(java.lang.Object object)
Adapt the object to an EObject - if possible |
protected boolean |
addToEObjectList(java.lang.Object object)
Add next object in the selection to the list of EObjects if this object could be adapted to an EObject |
protected ICommand |
createCommand(java.lang.String name,
org.eclipse.emf.ecore.EObject res,
java.lang.Runnable runnable)
|
protected ICommand |
createCommand(java.lang.String name,
org.eclipse.emf.ecore.resource.Resource res,
java.lang.Runnable runnable)
|
void |
createControls(Composite parent,
TabbedPropertySheetPage aTabbedPropertySheetPage)
|
protected boolean |
digIntoGroups()
Override to return true to have this property section work on the shapes in a GroupEditPart as if the shapes were multi-selected. |
void |
dispose()
|
protected CommandResult |
executeAsCompositeCommand(java.lang.String actionName,
java.util.List commands)
A utility method allows execute a list of commands by wrapping them\ in a composite command. |
protected void |
executeAsReadAction(java.lang.Runnable code)
A utility method allows execute a piece of code wrapping it in the read call to the model. |
protected org.eclipse.emf.transaction.TransactionalEditingDomain |
getEditingDomain()
Gets the editing domain from my EObject input. |
protected org.eclipse.emf.ecore.EObject |
getEObject()
|
protected java.util.List |
getEObjectList()
|
protected org.eclipse.emf.transaction.DemultiplexingListener |
getEventListener()
|
org.eclipse.emf.transaction.NotificationFilter |
getFilter()
Subclasses overriding this method should remember to override update(TransactionalEditingDomain, Notification) as required. |
java.util.List |
getInput()
Returns currently selected view object |
protected java.lang.Object |
getPrimarySelection()
Returns currently selected view object |
protected int |
getStandardLabelWidth(Composite parent,
java.lang.String[] labels)
Get the standard label width when labels for sections line up on the left hand side of the composite. |
protected SectionUpdateRequestCollapser |
getUpdateRequestCollapser()
|
void |
handleElementModifiedEvent(org.eclipse.emf.common.notify.Notification notification,
org.eclipse.emf.ecore.EObject element)
|
protected boolean |
isCurrentSelection(org.eclipse.emf.common.notify.Notification notification,
org.eclipse.emf.ecore.EObject element)
Determines if the page is displaying properties for this element |
protected boolean |
isDisposed()
|
protected boolean |
isNotifierDeleted(org.eclipse.emf.common.notify.Notification notification)
Returns whether or not the notifier for a particular notification has been deleted from its parent. |
protected boolean |
isReadOnly()
Determine if the property sheet page contributor is read only. |
protected void |
postUpdateRequest(java.lang.Runnable updateRequest)
Use requset collapser to post update requests. |
protected void |
setEditingDomain(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain)
Sets the editingDomain. |
protected void |
setEObject(org.eclipse.emf.ecore.EObject object)
|
void |
setInput(IWorkbenchPart part,
ISelection selection)
|
protected org.eclipse.emf.ecore.EObject |
unwrap(java.lang.Object object)
Unwarp the ME or diagram object down to the underlaying UML element |
void |
update(org.eclipse.emf.common.notify.Notification notification,
org.eclipse.emf.ecore.EObject element)
Update if nessesary, upon receiving the model event. |
protected void |
update(org.eclipse.emf.transaction.TransactionalEditingDomain domain,
org.eclipse.emf.common.notify.Notification notification)
Updates me if the notifier is an EObject by calling
update(Notification, EObject) . |
Methods inherited from class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection |
---|
getMinimumHeight, getPart, getSelection, getWidgetFactory, refresh, shouldUseExtraSpace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.eclipse.emf.transaction.DemultiplexingListener eventListener
protected static final PropertiesServiceAdapterFactory propertiesProvider
protected static java.lang.String VALUE_CHANGED_STRING
protected java.util.List input
protected org.eclipse.emf.ecore.EObject eObject
protected boolean disposed
Constructor Detail |
---|
public AbstractModelerPropertySection()
Method Detail |
---|
public void setInput(IWorkbenchPart part, ISelection selection)
setInput
in interface ISection
setInput
in class AbstractPropertySection
protected boolean digIntoGroups()
GroupEditPart
as if the shapes were multi-selected.
protected boolean addToEObjectList(java.lang.Object object)
EObject
object
- the object to add
protected org.eclipse.emf.ecore.EObject unwrap(java.lang.Object object)
object
- -
object from a diagram or ME
protected org.eclipse.emf.ecore.EObject adapt(java.lang.Object object)
object
- object from a diagram or ME
protected boolean isCurrentSelection(org.eclipse.emf.common.notify.Notification notification, org.eclipse.emf.ecore.EObject element)
notification
- The notificationelement
- The element to be tested
protected void executeAsReadAction(java.lang.Runnable code)
code
- -
Runnable code to executeprotected CommandResult executeAsCompositeCommand(java.lang.String actionName, java.util.List commands)
commands
- -
List of commands to executepublic java.util.List getInput()
public void aboutToBeHidden()
aboutToBeHidden
in interface ISection
aboutToBeHidden
in class AbstractPropertySection
public void aboutToBeShown()
aboutToBeShown
in interface ISection
aboutToBeShown
in class AbstractPropertySection
public void dispose()
dispose
in interface ISection
dispose
in class AbstractPropertySection
protected java.lang.Object getPrimarySelection()
protected org.eclipse.emf.ecore.EObject getEObject()
protected void setEObject(org.eclipse.emf.ecore.EObject object)
object
- The eObject to set.public org.eclipse.emf.transaction.NotificationFilter getFilter()
update(TransactionalEditingDomain, Notification)
as required.
The default implementation of
update(TransactionalEditingDomain, Notification)
will only
update if the notifier is an EObject
.
eventListener
.public void update(org.eclipse.emf.common.notify.Notification notification, org.eclipse.emf.ecore.EObject element)
notification
- notification objectelement
- element that has changedaboutToBeShown()
,
aboutToBeHidden()
protected void update(org.eclipse.emf.transaction.TransactionalEditingDomain domain, org.eclipse.emf.common.notify.Notification notification)
EObject
by calling
update(Notification, EObject)
. Does nothing otherwise.
Subclasses should override this method if they need to update based on
non-EObject notifiers.
domain
- the editing domainnotification
- the event notificationprotected boolean isNotifierDeleted(org.eclipse.emf.common.notify.Notification notification)
notification
-
true
if notification has been deleted from its parent, false
otherwiseprotected void postUpdateRequest(java.lang.Runnable updateRequest)
updateRequest
- -
runnable update codepublic void handleElementModifiedEvent(org.eclipse.emf.common.notify.Notification notification, org.eclipse.emf.ecore.EObject element)
protected java.util.List getEObjectList()
protected boolean isDisposed()
protected org.eclipse.emf.transaction.DemultiplexingListener getEventListener()
protected ICommand createCommand(java.lang.String name, org.eclipse.emf.ecore.resource.Resource res, java.lang.Runnable runnable)
protected ICommand createCommand(java.lang.String name, org.eclipse.emf.ecore.EObject res, java.lang.Runnable runnable)
protected org.eclipse.emf.transaction.TransactionalEditingDomain getEditingDomain()
protected void setEditingDomain(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain)
editingDomain
- The editingDomain to set.public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage)
createControls
in interface ISection
createControls
in class AbstractPropertySection
protected boolean isReadOnly()
true
if the contributor is read only.protected int getStandardLabelWidth(Composite parent, java.lang.String[] labels)
parent
- The parent composite used to create a GC.labels
- The list of labels.
protected SectionUpdateRequestCollapser getUpdateRequestCollapser()
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.