我有一个扩展的类型DeleteResourceAction
。Eclipse 给了我以下警告:
An anonymous type defined in mishanesterenko.changevisualizer.command.handler.DeleteResourceCommandHandler.execute(ExecutionEvent) illegally extends DeleteResourceAction
这个警告的原因是什么?
UPD
我有以下生成警告的代码:
DeleteResourceAction deleteAction = new org.eclipse.ui.actions.DeleteResourceAction(new CustomShellProvider(activeWindow)) {
@Override
public IStructuredSelection getStructuredSelection() {
IStructuredSelection selection = (IStructuredSelection) selectionService.getSelection();
Object element = selection.getFirstElement();
if (element instanceof CustomProject) {
return new StructuredSelection(((CustomProject) element).getProject());
}
return selection;
}
};