public class MDUtils
extends java.lang.Object
Constructor and Description |
---|
MDUtils() |
Modifier and Type | Method and Description |
---|---|
static com.nomagic.magicdraw.ui.browser.BrowserTabTree |
getActiveBrowser(boolean complain) |
static com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement |
getActiveDiagram(boolean complain) |
static java.lang.String |
getBranchId(com.nomagic.magicdraw.core.Project project) |
static long |
getRemoteVersion(com.nomagic.magicdraw.core.Project project) |
static java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
getSelection(java.awt.event.ActionEvent event) |
static java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
getSelection(java.awt.event.ActionEvent event,
boolean fromDiagram) |
static java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
getSelectionInContainmentBrowser() |
static java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> |
getSelectionInDiagram() |
static java.lang.Class<?> |
getType(com.nomagic.magicdraw.uml.BaseElement elem) |
static boolean |
isDeveloperMode() |
public static boolean isDeveloperMode()
public static java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> getSelection(java.awt.event.ActionEvent event)
event
- Element
s selected in MD's GUI.public static java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> getSelection(java.awt.event.ActionEvent event, boolean fromDiagram)
event
- fromDiagram
- Element
s selected in MD's GUI.public static com.nomagic.magicdraw.ui.browser.BrowserTabTree getActiveBrowser(boolean complain)
complain
- if true, any Throwable will be caught and printed with the
stack trace to stderr (or the MD message window)public static com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement getActiveDiagram(boolean complain)
complain
- if true, any Throwable will be caught and printed with the
stack trace to stderr (or the MD message window)public static java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> getSelectionInContainmentBrowser()
Element
s selected in the containment tree browser of
MD's GUI.public static java.util.Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element> getSelectionInDiagram()
Element
s selected in the active diagram of MD's GUI.public static java.lang.Class<?> getType(com.nomagic.magicdraw.uml.BaseElement elem)
public static java.lang.String getBranchId(com.nomagic.magicdraw.core.Project project) throws java.lang.RuntimeException
java.lang.RuntimeException
public static long getRemoteVersion(com.nomagic.magicdraw.core.Project project)