@CalledInAwt private void reopenWithTool(@NotNull MergeTool tool) { if (myConflictResolved) { LOG.warn("Can't reopen with " + tool + " - conflict already resolved"); return; } if (!tool.canShow(myContext, myRequest)) { LOG.warn("Can't reopen with " + tool + " - " + myRequest); return; } MergeTool.MergeViewer newViewer; try { newViewer = tool.createComponent(myContext, myRequest); } catch (Throwable e) { LOG.error(e); return; } boolean wasFocused = isFocused(); destroyViewer(); myViewer = newViewer; updateBottomActions(); rebuildSouthPanel(); initViewer(); if (wasFocused) requestFocusInternal(); }
@NotNull private MergeTool getFittedTool() { for (MergeTool tool : myAvailableTools) { try { if (tool.canShow(myContext, myRequest)) return tool; } catch (Throwable e) { LOG.error(e); } } return ErrorMergeTool.INSTANCE; }