Select string from tooltip in RAP - swt

In my RAP application I have SWT Text and registered tooltip on it textSourceLink.setToolTipText("E.g.: p7eail/p7eail_SRN1l.pdf");
On UI when user hover Text tooltip is shown.
Is it possible to select text from that shown tooltip and for example copy that inside text?

No, text from a tooltip cannot be selected in RAP.

Related

Prevent closing cell editor in popup mode on outside click

I have custom text editor in table cell, after I select text in it I want to use top page panel to make it bold (outside of the table), but when I click on the button (on the top page panel) this action closes cell editor popup.
Is it posible to keep the cell editor open in popup mode after I click on buttons outside of the table?
In the current version of ag-grid (v24), clicking outside the grid does not close a popup editor, unless you set stopEditingWhenGridLosesFocus to true in the options.
See their example: https://www.ag-grid.com/javascript-grid-cell-editing/#example-dynamic-parameters

How do I change the dialog selected text color in Eclipse Mars?

I recently switched from Eclipse Kelper to Mars, and I cannot see my selected text in certain dialogs anymore.
For example, the preferences input box works fine. Here is an example of some selected text in the search bar:
However, other dialogs, such as find, the selection is invisible. Either it's transparent or it's exactly the same as the background color.
Why isn't this blue like the rest of text selections?
(Where) Does Eclipse override this for certain dialogs?
How do I fix this?

LibreOffice tooltip for disabled control

In LibreOffice Calc I have a form with checkbox controls. I use the Help Text property to display tooltips for them, but this only works when the control is enabled. How can I make a tooltip display also for a disabled control?
Libreoffice version 5.3.4.2
It could be that this is not possible to do, at least not the way I originally intended.
My solution: Remove the label text from the checkbox control, instead add it in a separate label control. Then put the tooltip (help text) on the label instead. It will not be as obvious as before when the checkbox is disabled as the label text is not greyed out, but the tooltip will always display.

Create jdt look like custom tool tip for GEF canvas objects

I have a graphical representation for my model, and I want to implement a tooltip that look like jdt tooltip in the following :
- the tooltip shows up when hover over the object in the canvas
- being able to click on the tooltip window to focus, and scroll bar is there if needed.
- Ability to resize the tooltip window after the user change focus to it
- being able to assign command with F2 keybind to pop up the tooltip window (I know how to create command, and how to associate keybind with it)
- Ability to have hyperlinks in the tooltip text ( optional )
I do not know from where to start.
Which eclipse interfaces/classes to implement, extensions to add, adaptors to support.
I tried to find a work through tutorial but I could not.
Thanks in advance
A lot of what you describe is specific to the Eclipse Text editor and JDT code so won't be available in a Canvas so you would have to write your own code.
You can create a tooltip based on org.eclipse.jface.window.ToolTip. If the tooltip contains StyledText you can create hyperlinks.
There is an example of a fairly elaborate custom tooltip Here
What Eclipse does when the tooltip is clicked is open a new normal window of exactly the same size and contents over the tooltip and close the tooltip.

JFace: Resizable tooltip with ColumnViewerToolTipSupport

Can anyone show me how to use org.eclipse.jface.viewers.ColumnViewerToolTipSupport to create a tooltip similar to the one shown in Eclipse IDE when you hover your mouse to any Java element? That is, I want the tooltip to be resizable, I also want to hook an F2 key to show the tooltip on demand in addition to mouse hover.
I have managed to add my own custom control to the tooltip (a TableViewer), but I can't see any methods/ways to set the tooltip to be resizable and only dissappear when user clicks on a key (e.g. esc key). Is this even possible with ColumnViewerToolTipSupport?
I have used as my reference an example at http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet037FancyCustomTooltips.java?view=markup
Thanks.
The window appearing in Eclipse when you hover mouse pointer over a Java element is not a tooltip, but InformationControl. See org.eclipse.jface.text.AbstractInformationControlManager.install(Control) for more information.
I don't think it will work right away with table cells, so you probably will have to combine some ColumnViewerToolTipSupport techniques with it.
Cheers,
Max