Eclipse RCP中相同处理程序之间的冲突

时间:2016-09-22 08:07:15

标签: eclipse-plugin eclipse-rcp

我正在开发一个Eclipse RCP应用程序,并且最近开始看到有关冲突处理程序的大量控制台错误消息,例如:

!ENTRY org.eclipse.ui 4 4 2016-09-22 08:57:41.828
!MESSAGE Conflicting handlers for org.eclipse.ui.edit.undo: {ActionHandler(org.eclipse.ui.operations.UndoActionHandler@7df5358)} vs {ActionHandler(org.eclipse.ui.operations.UndoActionHandler@7df5358)}
Status ERROR: org.eclipse.ui code=4 Conflicting handlers for org.eclipse.ui.edit.undo: {ActionHandler(org.eclipse.ui.operations.UndoActionHandler@7df5358)} vs {ActionHandler(org.eclipse.ui.operations.UndoActionHandler@7df5358)} null

!ENTRY org.eclipse.ui 4 4 2016-09-22 08:57:42.625
!MESSAGE Conflicting handlers for org.eclipse.ui.edit.redo: {ActionHandler(org.eclipse.ui.operations.RedoActionHandler@62ccbd95)} vs {ActionHandler(org.eclipse.ui.operations.RedoActionHandler@62ccbd95)}
Status ERROR: org.eclipse.ui code=4 Conflicting handlers for org.eclipse.ui.edit.redo: {ActionHandler(org.eclipse.ui.operations.RedoActionHandler@62ccbd95)} vs {ActionHandler(org.eclipse.ui.operations.RedoActionHandler@62ccbd95)} null

!ENTRY org.eclipse.ui 4 4 2016-09-22 08:57:43.100
!MESSAGE Conflicting handlers for org.eclipse.jdt.ui.edit.text.java.open.editor: {ActionHandler(org.eclipse.jdt.ui.actions.OpenAction@135ddb56)} vs {ActionHandler(org.eclipse.jdt.ui.actions.OpenAction@135ddb56)}
Status ERROR: org.eclipse.ui code=4 Conflicting handlers for org.eclipse.jdt.ui.edit.text.java.open.editor: {ActionHandler(org.eclipse.jdt.ui.actions.OpenAction@135ddb56)} vs {ActionHandler(org.eclipse.jdt.ui.actions.OpenAction@135ddb56)} null

!ENTRY org.eclipse.ui 4 4 2016-09-22 08:57:43.581
!MESSAGE Conflicting handlers for org.eclipse.jdt.ui.edit.text.java.open.editor: {ActionHandler(org.eclipse.jdt.ui.actions.OpenAction@135ddb56)} vs {ActionHandler(org.eclipse.jdt.ui.actions.OpenAction@135ddb56)}
Status ERROR: org.eclipse.ui code=4 Conflicting handlers for org.eclipse.jdt.ui.edit.text.java.open.editor: {ActionHandler(org.eclipse.jdt.ui.actions.OpenAction@135ddb56)} vs {ActionHandler(org.eclipse.jdt.ui.actions.OpenAction@135ddb56)} null

!ENTRY org.eclipse.ui 4 4 2016-09-22 08:57:43.595
!MESSAGE Conflicting handlers for org.eclipse.ui.edit.move: {ActionHandler(org.eclipse.ui.actions.MoveResourceAction@6859bbd4)} vs {ActionHandler(org.eclipse.ui.actions.MoveResourceAction@6859bbd4)}
Status ERROR: org.eclipse.ui code=4 Conflicting handlers for org.eclipse.ui.edit.move: {ActionHandler(org.eclipse.ui.actions.MoveResourceAction@6859bbd4)} vs {ActionHandler(org.eclipse.ui.actions.MoveResourceAction@6859bbd4)} null

!ENTRY org.eclipse.ui 4 4 2016-09-22 08:57:44.015
!MESSAGE Conflicting handlers for org.eclipse.ui.edit.move: {ActionHandler(org.eclipse.ui.actions.MoveResourceAction@6859bbd4)} vs {ActionHandler(org.eclipse.ui.actions.MoveResourceAction@6859bbd4)}
Status ERROR: org.eclipse.ui code=4 Conflicting handlers for org.eclipse.ui.edit.move: {ActionHandler(org.eclipse.ui.actions.MoveResourceAction@6859bbd4)} vs {ActionHandler(org.eclipse.ui.actions.MoveResourceAction@6859bbd4)} null

!ENTRY org.eclipse.ui 4 4 2016-09-22 08:57:44.026
!MESSAGE Conflicting handlers for org.eclipse.ui.edit.rename: {ActionHandler(org.eclipse.ui.actions.RenameResourceAction@7d836c4a)} vs {ActionHandler(org.eclipse.ui.actions.RenameResourceAction@7d836c4a)}
Status ERROR: org.eclipse.ui code=4 Conflicting handlers for org.eclipse.ui.edit.rename: {ActionHandler(org.eclipse.ui.actions.RenameResourceAction@7d836c4a)} vs {ActionHandler(org.eclipse.ui.actions.RenameResourceAction@7d836c4a)} null

值得注意的是,这些都是平台定义的处理程序,并且冲突似乎发生在每个处理程序和它自身之间,这至少可以说令人费解。

当我单击应用程序中Project Explorer视图中的条目时,会出现所有错误。当我点击时,Project Explorer的响应性会降低,直到上下文菜单不再弹出为止。

我的应用程序在Eclipse平台4.5版的兼容模式下运行。

另一个可能相关或不相关的细节是我在安装VisualVM Eclipse插件后开始看到这些消息。我已经卸载了它,但仍然看到错误。

1 个答案:

答案 0 :(得分:0)

我最终找到了问题并且能够修复它。

我添加到Project Explorer上下文菜单的新项目之一依赖于PropertyTester来决定何时显示它。由于实现错误,这个测试器非常慢(需要几秒钟才能执行),这显然导致了处理程序解析问题。

大幅提高PropertyTester的性能导致这些错误消息不再显示,Project Explorer再次正常工作。