Class XdtoUiUtil
- java.lang.Object
-
- com._1c.g5.v8.dt.xdto.ui.aef.models.XdtoUiUtil
-
public class XdtoUiUtil extends Object
Xdto Ui util.
-
-
Constructor Summary
Constructors Constructor Description XdtoUiUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
canPastToTarget(Object target)
Checks if can past copied objects to target.static IModel
createModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature)
CreatesIModel
instance by the given arguments.static Object[]
getCopiedObjects(org.eclipse.swt.widgets.Display display)
Returns copied objects from clipboard if present.static IMdObjectCopyTarget
getInsertionPoint(ISelection selection, Object[] copiedObjects)
Returns insertion point.static List<Package>
getPackageTreeElements(Object inputElement)
Returns package tree elenemts.static List<?>
getPackageTreeNodeChildren(Object parentNode)
Returns package tree node children.static Object
getParent(Object treeNode)
Returns package tree node parent.static String
getPresentationName(QName qname)
Gets UI presentation ofQName
: "localName (nsUri)"static boolean
isNonBmObject(org.eclipse.emf.ecore.EObject eObject)
Checks that selected e-object is non bm-object, because it contained in the plain e-object.static void
setEObjectName(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature eFeature, org.eclipse.emf.ecore.EObject eContainer)
Sets new package child object name.
-
-
-
Method Detail
-
canPastToTarget
public static boolean canPastToTarget(Object target)
Checks if can past copied objects to target.- Parameters:
target
- the target to insertion, cannot benull
- Returns:
true
if can copy orfalse
if insertion disabled
-
createModel
public static IModel createModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature)
CreatesIModel
instance by the given arguments.- Parameters:
object
- theEObject
instance, cannot benull
feature
- theEStructuralFeature
instance, cannot benull
- Returns:
- a newly created model.
-
getCopiedObjects
public static Object[] getCopiedObjects(org.eclipse.swt.widgets.Display display)
Returns copied objects from clipboard if present.- Parameters:
display
- the display, can benull
- Returns:
- the copied objects from the clipboard or
null
if no data of this type is available
-
getInsertionPoint
public static IMdObjectCopyTarget getInsertionPoint(ISelection selection, Object[] copiedObjects)
Returns insertion point.- Parameters:
selection
- the current selection, cannot benull
copiedObjects
- the copied objects, cannot benull
- Returns:
- the copy target, can be
null
if copied empty or insertion disabled
-
getPackageTreeElements
public static List<Package> getPackageTreeElements(Object inputElement)
Returns package tree elenemts.- Parameters:
inputElement
- the package or list packages, cannot benull
- Returns:
- the elements list packages or empty list, never
null
-
getPackageTreeNodeChildren
public static List<?> getPackageTreeNodeChildren(Object parentNode)
Returns package tree node children.- Parameters:
parentNode
- the package tree parent node, cannot benull
- Returns:
- child list or empty list, never
null
-
getParent
public static Object getParent(Object treeNode)
Returns package tree node parent.- Parameters:
treeNode
- the package tree node, cannot benull
- Returns:
- parent node or
null
-
getPresentationName
public static String getPresentationName(QName qname)
Gets UI presentation ofQName
: "localName (nsUri)"
-
isNonBmObject
public static boolean isNonBmObject(org.eclipse.emf.ecore.EObject eObject)
Checks that selected e-object is non bm-object, because it contained in the plain e-object.- Parameters:
eObject
- the checked e-object, cannot benull
- Returns:
true
if e-object contained in the plain e-object
-
setEObjectName
public static void setEObjectName(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature eFeature, org.eclipse.emf.ecore.EObject eContainer)
Sets new package child object name.- Parameters:
eClass
- the target object e-class, cannot benull
eContainer
- the target object container, cannot benull
eFeature
- , the target object container feature, cannot benull
-
-