Community
Participate
Working Groups
If no selection was made (i.e., the "selection" is just the cursor), "Create Snippet" doesn't do anything useful. It just produces the snippet ${cursor} IMHO, we should not waste space in the already packed editor context menu.
The tricky think is to do this test without having to write your own PropertyTester. Using a PropertyTest seems like a straight-forward solution, but we would not want opening the context menu to always load the org.eclipse.recommenders.snipmatch.rcp bundle. Maybe we can adapt the current selection to a String and then use not(equals("")) in our expression.
(In reply to Andreas Sewe from comment #1) > Maybe we can adapt the current selection to a String and then use > not(equals("")) in our expression. AFAICT, ITextSelection can only be adapted to IIterable and ICountable, but in both cases it is always a one-element entity. So checking with <count> won't work.
Asked in the Eclipse Platform forum about this [1]. [1] <https://www.eclipse.org/forums/index.php/m/1718307/#msg_1718307>
Unless we find a solution for the problem mentioned in comment 1, we cannot address this issue.