Community
Participate
Working Groups
We have an editor that wrappers the CompilationUnitEditor and presents it on a split pane initializing it through its API of createPartControl and init(IEditorSite,IEditorInput). Everything works great except for a few places. One of these is the class ManageBreakpointRulerActionDelegate that expects a specific ID only to be present. Could this be changed to not hard code the id of the editor part ? Either remove the check entirely ( which I don't see why it is actually necessary ) or else use some method that other edit parts could implement such as a marker interface. The method that does a hard coded check is shown below. public void setActiveEditor(IAction callerAction, IEditorPart targetEditor) { // only care about compilation unit and class file editors if (targetEditor != null) { String id= targetEditor.getSite().getId(); if (!id.equals(JavaUI.ID_CU_EDITOR) && !id.equals(JavaUI.ID_CF_EDITOR)) targetEditor= null; } super.setActiveEditor(callerAction, targetEditor); }
The actions EnableDisableBreakpointRulerActionDelegate and JavaBreakpointPropertiesRulerActionDelegate both work without checking the editor ID so to be consistent it would appear that it is safe for ManageBreakpointRulerActionDelegate to let any editor through.
I agree that it appears to be an unneccesary as the XML specifies the targetID and that should be the only restriction. Removed hard coded restriction. Please verify (Jared).
Placed fix in 2.0.1 branch
Verified.