Project: Eclipse_Platform_UI
Bug 14068 Views should not hardcode assumptions about open strategy
Reported: 2002-04-17 21:13:20 | Status: resolved fixed

Build 20020416 I noticed several places in the code with the following pattern: boolean activate = OpenStrategy.getOpenMethod() == OpenStrategy.DOUBLE_CLICK; page.openEditor(marker,activate); This hardcodes the assumption that the only strategy which activates on open is double click. It would be better to ask OpenStrategy whether it should activate on open. E.g. what happens if a new strategy is added which also requires activation?

Files changed in fix:
bundles/org.eclipse.ui/Eclipse JFace/org/eclipse/jface/util/OpenStrategy.java bundles/org.eclipse.ui/Eclipse UI Standard Components/org/eclipse/ui/views/bookmarkexplorer/OpenBookmarkAction.java bundles/org.eclipse.ui/Eclipse UI Standard Components/org/eclipse/ui/views/tasklist/GotoTaskAction.java bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/actions/OpenFileAction.java