John Smith
John Smith

Reputation: 787

How to solve red square icon of an eclipse view?

I created a plugin in Eclipse that adds a view to a certain category. My problem is that there instead of having the icon that I've choosen for the view I can see a red square. This is only in Show View->Category_Name. When I open the view, the icon is displayed as it is normal.

This is the view extension part of my plugin.xml:

<extension
     point="org.eclipse.ui.views">    
           <view
  category="custom_category"
        class="com.warnings.compilation.views.TabViewer"
        id="com.warnings.compilation.view1"
        icon="icons/warning-icon.png"
        name="Log Plugin">

  </view>
  </extension>

My build.properties file looks like this:

source.. = src/
output.. = bin/
bin.includes = plugin.xml,\
               META-INF/,\
               .,\
               icons/,\
               contexts.xml,\
               lib/commons-io-2.4.jar,\
               lib/google-collections-1.0.jar,\
               config/,\
               lib/commons-lang3-3.0.1.jar,\
               lib/commons-configuration2-2.0-alpha1.jar

Upvotes: 0

Views: 2413

Answers (1)

Chandrayya G K
Chandrayya G K

Reputation: 8849

This category id is not matching in category tag and in view tag. Correct it. Make 1 and 2 same.

  <category
    id="com.warnings.compilation"   ------- 1
    name="TD4">
  </category>          
  <view
    category="custom_category"      ------- 2
    class="com.warnings.compilation.views.TabViewer"
    id="com.warnings.compilation.view1"
    icon="icons/warning-icon.png"
    name="Log Plugin">

  </view>
  </extension>

Upvotes: 1

Related Questions