Package com._1c.g5.v8.dt.erd.ui.support
Class ErdUiUtil
- java.lang.Object
-
- com._1c.g5.v8.dt.erd.ui.support.ErdUiUtil
-
public final class ErdUiUtil extends Object
Instance of this class contains basic methods for UI.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Collection<IErdEntity>
getAssociatedEntities(Collection<? extends org.eclipse.draw2d.IFigure> figures)
Returns associated with given figures entities.static MdObject
getAssociatedMdObject(IErdEntity entity, IBmModelManager bmModelManager, IV8ProjectManager projectManager, IResourceLookup resourceLookup)
Returns associated to given entity md object.static Configuration
getConfiguration(MdObject mdObject, IV8ProjectManager projectManager, IResourceLookup resourceLookup)
Returns given mdObject's configuration.static org.eclipse.core.resources.IProject
getProject(MdObject mdObject, IResourceLookup resourceLookup)
Returns given mdObject's project.static org.eclipse.swt.graphics.Color
getTextColor(org.eclipse.swt.graphics.Color backgroundColor)
Returns text color for given background color.static IV8Project
getV8Project(MdObject mdObject, IV8ProjectManager projectManager, IResourceLookup resourceLookup)
Returns given mdObject's v8project.static boolean
isSameConfiguration(IErdEntity entity, MdObject mdObject, IV8ProjectManager projectManager, IResourceLookup resourceLookup)
Returnstrue
if givenentity
andmdObject
from one configuration.static void
refreshOutlineView()
Refreshes outline view.
-
-
-
Method Detail
-
getProject
public static org.eclipse.core.resources.IProject getProject(MdObject mdObject, IResourceLookup resourceLookup)
Returns given mdObject's project.- Parameters:
mdObject
- - mdObject. Can't benull
.resourceLookup
- - resource lookup. Can't benull
.- Returns:
- given mdObject's project. Can return
null
.
-
getV8Project
public static IV8Project getV8Project(MdObject mdObject, IV8ProjectManager projectManager, IResourceLookup resourceLookup)
Returns given mdObject's v8project.- Parameters:
mdObject
- - mdObject. Can't benull
.projectManager
- - v8 project manager. Can't benull
.resourceLookup
- - resource lookup. Can't benull
.- Returns:
- given mdObject's v8project. Can return
null
.
-
getConfiguration
public static Configuration getConfiguration(MdObject mdObject, IV8ProjectManager projectManager, IResourceLookup resourceLookup)
Returns given mdObject's configuration.- Parameters:
mdObject
- - mdObject. Can't benull
.projectManager
- - v8 project manager. Can't benull
.resourceLookup
- - resource lookup. Can't benull
.- Returns:
- given mdObject's configuration. Can return
null
.
-
isSameConfiguration
public static boolean isSameConfiguration(IErdEntity entity, MdObject mdObject, IV8ProjectManager projectManager, IResourceLookup resourceLookup)
Returnstrue
if givenentity
andmdObject
from one configuration.- Parameters:
entity
- - entity. Can't benull
.mdObject
- - mdObject. Can't benull
.projectManager
- - v8 project manager. Can't benull
.resourceLookup
- - resource lookup. Can't benull
.- Returns:
true
if givenentity
andmdObject
from one configuration
-
getAssociatedMdObject
public static MdObject getAssociatedMdObject(IErdEntity entity, IBmModelManager bmModelManager, IV8ProjectManager projectManager, IResourceLookup resourceLookup)
Returns associated to given entity md object. If object can not be resolved, returns proxy.- Parameters:
entity
- - entity to get associated md object. Entity URI should not benull
. Can't benull
.bmModelManager
- - bm model manager. Can't benull
.projectManager
- - v8 project manager. Can't benull
.resourceLookup
- - resource lookup. Can't benull
.- Returns:
- associated to given entity md object. If object can not be resolved, returns proxy. Can't return
null
.
-
getTextColor
public static org.eclipse.swt.graphics.Color getTextColor(org.eclipse.swt.graphics.Color backgroundColor)
Returns text color for given background color.- Parameters:
backgroundColor
- - background color. If given value isnull
, returns black color. Can benull
.- Returns:
- text color. Can't return
null
.
-
getAssociatedEntities
public static Collection<IErdEntity> getAssociatedEntities(Collection<? extends org.eclipse.draw2d.IFigure> figures)
Returns associated with given figures entities.- Parameters:
figures
- - figures. Can't benull
.- Returns:
- associated with given figures entities. Can't return
null
.
-
refreshOutlineView
public static void refreshOutlineView()
Refreshes outline view.
-
-