Class QueryWizardLabelProvidersUtil


  • public class QueryWizardLabelProvidersUtil
    extends Object
    Util class containing useful methods for query wizard label providers.
    • Method Detail

      • getInstance

        public static QueryWizardLabelProvidersUtil getInstance()
        Returns instance of this class.
        Returns:
        instance of this class. Cannot return null.
      • getAssociatedIssues

        public List<org.eclipse.xtext.validation.Issue> getAssociatedIssues​(Object element,
                                                                            QueryWizardSource source)
        Returns issues associated with given element.
        Parameters:
        element - - element to look for issue. Cannot be null.
        source - - query wizard source containing issues. Cannot be null.
        Returns:
        issues associated with given element. Can return null.
      • getAssociatedIssues

        public List<org.eclipse.xtext.validation.Issue> getAssociatedIssues​(org.eclipse.emf.ecore.EObject eObject,
                                                                            QueryWizardSource source)
        Searches and returns issues associated with given eobject in query issues.
        Parameters:
        eObject - - object to search issue for. Cannot be null.
        source - - source to look for issues. Cannot be null.
        Returns:
        issues associated with given object. Can return null.
      • getGreatestSeverity

        public org.eclipse.xtext.diagnostics.Severity getGreatestSeverity​(Collection<org.eclipse.xtext.validation.Issue> issues)
        Returns greatest severity from given issues.
        Parameters:
        issues - - issues to get greatest severity. Cannot be null.
        Returns:
        greatest severity from given issues. Returns null if given issues is empty.
      • getGreatestSeverityImage

        public org.eclipse.swt.graphics.Image getGreatestSeverityImage​(List<org.eclipse.xtext.validation.Issue> issues)
        Returns image for issue with greatest severity.
        Parameters:
        issues - - issues to look for severity. Cannot be null.
        Returns:
        image for issue with greatest severity. Returns null if given issues is empty.
      • getSeverityIcon

        public org.eclipse.jface.resource.ImageDescriptor getSeverityIcon​(org.eclipse.xtext.diagnostics.Severity severity)
        Returns icon for given severity.
        Parameters:
        severity - - severity to get icon for. Cannot be null.
        Returns:
        icon for given severity. Returns non null only for Severity.ERROR and Severity.WARNING.