Class ErdUiUtil


  • public final class ErdUiUtil
    extends Object
    Instance of this class contains basic methods for UI.
    • 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 be null.
        resourceLookup - - resource lookup. Can't be null.
        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 be null.
        projectManager - - v8 project manager. Can't be null.
        resourceLookup - - resource lookup. Can't be null.
        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 be null.
        projectManager - - v8 project manager. Can't be null.
        resourceLookup - - resource lookup. Can't be null.
        Returns:
        given mdObject's configuration. Can return null.
      • isSameConfiguration

        public static boolean isSameConfiguration​(IErdEntity entity,
                                                  MdObject mdObject,
                                                  IV8ProjectManager projectManager,
                                                  IResourceLookup resourceLookup)
        Returns true if given entity and mdObject from one configuration.
        Parameters:
        entity - - entity. Can't be null.
        mdObject - - mdObject. Can't be null.
        projectManager - - v8 project manager. Can't be null.
        resourceLookup - - resource lookup. Can't be null.
        Returns:
        true if given entity and mdObject 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 be null. Can't be null.
        bmModelManager - - bm model manager. Can't be null.
        projectManager - - v8 project manager. Can't be null.
        resourceLookup - - resource lookup. Can't be null.
        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 is null, returns black color. Can be null.
        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 be null.
        Returns:
        associated with given figures entities. Can't return null.
      • refreshOutlineView

        public static void refreshOutlineView()
        Refreshes outline view.