我有一個類型,延伸DeleteResourceAction
。 Eclipse給了我以下警告:我的類型非法擴展DeleteResourceAction
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;
}
};
哪裏是生成此警告的代碼? – Jeffrey
如果你描述你正在努力達到的目標,你會得到更好的答案。 – pstanton
@Jeffrey,更新的問題與代碼 –