W
wylhf
Unregistered / Unconfirmed
GUEST, unregistred user!
我做了一个带有快捷菜单的插件,且在菜单的action实现类里的selectionChanged过程中加了下面这一句话:
this.selection = (IStructuredSelection) selection;
Iterator iter = ((IStructuredSelection)selection).iterator();
Object obj = iter.next();
if (obj instanceof IJavaProject)
{
IProject proj = ((IJavaProject) obj).getProject();
........
}
运行到if (obj instanceof IJavaProject)这句话时,报了这样的错误:
Could not create action delegate for id: myplugin3.myAction
Reason:
Internal plug-in action delegate error on creation.
而且我发现,只要是判断是否为IProject、IJavaProject,或进行对IProject、IJavaProject的强制转化时总会报这样的错。
请问这是怎么回事啊,应该如何处理呢?
我的eclipse的版本是3.0.2
this.selection = (IStructuredSelection) selection;
Iterator iter = ((IStructuredSelection)selection).iterator();
Object obj = iter.next();
if (obj instanceof IJavaProject)
{
IProject proj = ((IJavaProject) obj).getProject();
........
}
运行到if (obj instanceof IJavaProject)这句话时,报了这样的错误:
Could not create action delegate for id: myplugin3.myAction
Reason:
Internal plug-in action delegate error on creation.
而且我发现,只要是判断是否为IProject、IJavaProject,或进行对IProject、IJavaProject的强制转化时总会报这样的错。
请问这是怎么回事啊,应该如何处理呢?
我的eclipse的版本是3.0.2