Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-8602

Too many error icons on file content in Project Explorer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.2.1.M1, 3.3.0.M1
    • 3.2.0.Final
    • common
    • None

      If a file, for which JBoss Tools provide content extension to Project explorer, contains an error, all node icons under file node are decorated by the error icon.

      The cause of that is adapting of XModelObject to IResource by implementing getAdapter(Class). It was done to fix JBIDE-7555 - since Eclipse services that init actions/wizards/etc by resources need selected object to be adaptable to IResource. But Project Explorer in decorating nodes, also adapts each node to IResource, and if the resource has error markers on it, marks each node as error node.

      The solution is to adapt model object to resource not by implementing getAdapter() but by registering an adapter factory in 'org.eclipse.core.runtime.adapters'. Project Explorer does not look into factories, while other services do that.

        1. TooManyErrorIcons.png
          142 kB
          Viacheslav Kabanovich
        2. JBIDE-8602.patch
          3 kB
          Viacheslav Kabanovich

            scabanovich Viacheslav Kabanovich (Inactive)
            scabanovich Viacheslav Kabanovich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: