You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eclipse allow folding (collapsing) of code, often license headers are collapsed, however when some code is collapsed in the decompiler file editor which contains a link, the links bound do not change so clicking outside of collapsed region and seemingly not on a link opens the link.
See image for details (clicking in the cursor position on the image causes link to open):
This tend to get annoying especially when the license header is large in which case the link's position get into the actual decompiled code (ex. double clicking on the classname opens the license of the library twice instead of selecting the classname, if the license header is such size).
Cause
The problem is in JavaDecompilerClassFileEditor:
text.getCaretOffset( ) is used to get the current position of the caret on mouseUp event. This returns offset excluding collapsed region
This is checked if in bounds of links[j].getHyperlinkRegion( ).getOffset( );, this returns position including the collapsed regions
Solution
They must both either include or exclude collapsed region.
The text was updated successfully, but these errors were encountered:
Background
Eclipse allow folding (collapsing) of code, often license headers are collapsed, however when some code is collapsed in the decompiler file editor which contains a link, the links bound do not change so clicking outside of collapsed region and seemingly not on a link opens the link.
See image for details (clicking in the cursor position on the image causes link to open):
This tend to get annoying especially when the license header is large in which case the link's position get into the actual decompiled code (ex. double clicking on the classname opens the license of the library twice instead of selecting the classname, if the license header is such size).
Cause
The problem is in JavaDecompilerClassFileEditor:
text.getCaretOffset( )
is used to get the current position of the caret on mouseUp event. This returns offset excluding collapsed regionlinks[j].getHyperlinkRegion( ).getOffset( );
, this returns position including the collapsed regionsSolution
They must both either include or exclude collapsed region.
The text was updated successfully, but these errors were encountered: