我们如何更改eclipse ide的项目资源管理器视图的默认标签提供程序以使用自定义标签呈现文件

时间:2022-05-13 22:22:57

I have a folder containing some xml files with some system generated names. I want to create a plugin which can replace the system generated name with the actual name of that file which is present in between name attribute of the xml file itself. I didnt find any way to modify the default label provider and I am newbie in eclipse plugin development.. Can any body tell me the appropriate way to achieve this task...

我有一个包含一些xml文件的文件夹,其中包含一些系统生成的名称我想创建一个插件,它可以将系统生成的名称替换为该文件的实际名称,该名称存在于xml文件本身的name属性之间。我没有找到任何修改默认标签提供程序的方法,我是eclipse插件开发中的新手。任何机构都可以告诉我实现此任务的适当方法......

1 个解决方案

#1


we can extend eclipse decoration extension point to provide custom label.
<extension point="org.eclipse.ui.decorators"> 
  <decorator  
    id="YourDecorator"  
    label="Decorator Label"  
    state="false"  
    class="YourDecorator.class"  
    objectClass="org.eclipse.core.resources.IResource"  
    adaptable="true">  
  </decorator>  
</extension>

for more info visit the following link :
:https://eclipse.org/articles/Article-Decorators/decorators.html

#1


we can extend eclipse decoration extension point to provide custom label.
<extension point="org.eclipse.ui.decorators"> 
  <decorator  
    id="YourDecorator"  
    label="Decorator Label"  
    state="false"  
    class="YourDecorator.class"  
    objectClass="org.eclipse.core.resources.IResource"  
    adaptable="true">  
  </decorator>  
</extension>

for more info visit the following link :
:https://eclipse.org/articles/Article-Decorators/decorators.html