Community
Participate
Working Groups
We have exceptional cases when the action is enabled on two different files with different states but the content is identical. We only find out about that inside our SaveableCompareInput.prepareCompareInput(IProgressMonitor) implementation. In such case we return null. SaveableCompareInput.prepareInput dereferences the input to set the title without checking if it is null. Could you set the title only if it isn't null and javadoc prepareCompareInput can return null? The super type CompareEditorInput.prepareInput specs null is valid: * If <code>null</code> is returned no differences were found and no compare editor needs to be opened. Today we worked around it by not calling super.prepareInput Imaging showing the history of a file and comparing any historical state with a local file. We need a server operation to decide if the contents are identical. In the common case, the compare editor shows up immediately - rapid UI feedback - and performs the fetch and comparison in the background. In some accidental cases the compare editor was not needed and the Eclipse dialog prompts the user. This seems like a good pattern. What do you think?
Adding the null check is trivial. We will do so for 3.3.1.
Created attachment 72346 [details] Null check
Patch released to HEAD. I will release it to 3.3.1 once Europa ships.
Patch released to 3.3.1.
Verified.
VERIFIED in M20070822-0800 and M1.