rcp小问题总结

1.Unable to open editor, unknown editor ID 错误,你会发现你的Editor的ID和你所调用的ID写得是一模一样,控制台却总是报这个错误,说无法找到该ID。

解决办法:检查一下你在扩展editor的时候有没有添加icon属性,如果没有请加上,即使不显示图片,也要icon设为空,即plugin.xml中显示如下: icon = ""

网上有一段很经典的话来描述这个问题,顺便转来了:

Have you specified the 'icon' attribute in the plugin extension editor for your editor? It may sound strange, but the icon attribute is required if you supply your own class in the 'class' attribute to implement the IEditorPart interface.

Well, the icon itself does not need to exist, but the 'icon' attribute's field must not be empty. Without the icon defined, your editor never gets into the editor registry when the plugin extensions are read, so an attempt later to retrieve this editor by its id fails, even though the editor ID is correct.

 

2. 在实现IEditorInput时,其中的getToolTipText()方法切记不能返回null,否则也会报错,错误信息如下:Error opening the editor.Reason: null argument: The editor input must have a non-null name

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值