|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gmf.runtime.diagram.ui.util.EditPartUtil
provides different utility functions for the EditPart
| Constructor Summary | |
EditPartUtil()
|
|
| Method Summary | |
static java.lang.String |
getSemanticEClassName(IGraphicalEditPart editPart)
gets the Editpart's semantic element Class Id, this could be used to
check the semantic element type |
static boolean |
isWriteTransactionInProgress(IGraphicalEditPart editPart,
boolean includeUnprotected,
boolean otherThread)
Checks if the current active transaction is a Write transaction or not unprotected transaction are not considered write transaction |
static void |
removeCanonicalEditPolicies(EditPart editPart,
boolean considerChildren)
remove all the canonical edit policies on the passed edit part, if the considerChildren flag is ON, it will remove the canonical editpolicies on every edit part in the passed edit part hirarchy |
static void |
synchronizeRunnableToMainThread(IGraphicalEditPart editPart,
java.lang.Runnable runThreadSafe)
Used as general utility usually in the context of handling notifications to ensure that a runnable will be run in the appropriate thread context so that SWT or other reservered resources can be accessed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EditPartUtil()
| Method Detail |
public static java.lang.String getSemanticEClassName(IGraphicalEditPart editPart)
Editpart's semantic element Class Id, this could be used to
check the semantic element type
public static void removeCanonicalEditPolicies(EditPart editPart,
boolean considerChildren)
editPart - the edit part to remove the edit policy fromconsiderChildren - determine the the canonical edit policies will be removed from
children as well or not
public static void synchronizeRunnableToMainThread(IGraphicalEditPart editPart,
java.lang.Runnable runThreadSafe)
editPart - the EditPart that is receiving notification or is being accessed potentially
on a worker thread that needs to ensure safe access to SWT or other resources reserved for the main thread.runThreadSafe - the Runnable that is to be executed in a thread safe manner.
public static boolean isWriteTransactionInProgress(IGraphicalEditPart editPart,
boolean includeUnprotected,
boolean otherThread)
editPart - the IGraphicalEditPart that is used as a context to find the currently
running transaction if any.includeUnprotected - boolean value that if true will consider unprotected
transactions when determining if a write transaction is in progress.otherThread - boolean value that if true, will verify whether there is
an active transaction only when on a different thread then the caller. This is useful to determine if a
deadlock scenario will occur.
true if the current active transaction is a write transaction
|
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.