Eclipse RCP Clear Button in Textinput - eclipse

I just started working on an eclipse RCP application in my company and search now for following component:
In the eclipse preference dialog is a text input field with a eraser which clears the text box (see image).
Is there a component in eclipse RCP which does exactly that? Or one where I can set an image in a text input field, so I can implement just the functionality.
Or have I to write my own component extending from Text?
Thanks.

Eclipse does not offer such a component, so you will have to implement one yourself.
But I wouldn't extend Text for this. Simply create a Composite with SWT.BORDER style, and a Text and Button as children. If you don't give the Text a border, it looks like the button is within the text box. Instead of the Button you could use a ToolBar with a single ToolItem, both with the SWT.FLAT style. This will look much better than a regular button.

Text text = new Text(parent, SWT.SEARCH | SWT.ICON_CANCEL);
This is present in Luna's API, don't know about older versions. You can check more here: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet309.java?view=co

Related

Rich Text Dialogs for Touch UI in AEM 6.5

I want to create Rich Text dialog in AEM 6.5
I have added the RTE plugins and UI settings but still it is not working.
Please see the attached image of the structure of rich text dialog.
Do we need to write some code or class so that rich text dialogs can work.
Please help.
The best way to figure out if you have done anything wrong is to copy the richtext from /libs/core/wcm/components/text/v1/text/cq:dialog/content/items/tabs/items/properties/items/columns/items/column/items/text to your dialog and check if the RTE is appearing or not. If it is, then compare the one you previously created with this one and figure out what is going wrong.
Always the best approach is to check the OOTB fields structure and compare it with your structure to figure out what is going wrong.
Rich Text Editor in Dialog
It is always better to configure dialogs directly with XML instead of doing it in CRXDE.
To start with you can look into the 'Text Component' dialog which has RTE in its dialog.
Look into the <text>...</text> part in the content.xml of the dialog. Hopefully, you will get a better idea.

AEM - Classic UI - Can we implement tooltip on Classic UI dialogue CQ widgets? If possible, how can we do it?

I am working on AEM Classic UI and I want to add a checkbox widget inside dialouge and to add a tooltip on it. Is that possible to add a tooltip or on mouse hover text inside dialogue on cq widgets? If possible, how can we implement it?
I found the solution.
The answer is NO. We can't implement direct tooltip inside dialogue box.
But we can implement a short text that works like tooltip.
eg:
feildLabel = <p title="Trust me! I am tooltip!!">Hover over me</p>
Note: In the above example, the tooltip text will appear only if we place the mouse over the base text for more then 1 second. There is an delay for a second.
We can implement tooltip in classic UI. Here below I gave the node structure to implement that.
Node Structure:
=> nt:unstructured
=> tooltip
jcr:primaryType = nt:unstructured
autoHide = true(Boolean)
title = title for tooltip
text = text for tooltip

Adding custom buttons to the about dialog in eclipse RCP

I'm trying to customize the about dialog in my eclipse RCP application. I already managed to add my logo and to replace the title and the text body as described under Branding Your Application.
I would also like to add some buttons to it: send a feedback or open the wiki page etc.
Is there a way to do it or achieve a similar functionality?
Any help is much appreciated.
The About diaog (org.eclipse.ui.internal.dialogs.AboutDialog) does not support any configuration.
The 'feature image row' you have highlighted is populated from the IBundleGroupProvider array returned by Platform.getBundleGroupProviders(), I don't see any way to add to this.

How can I add a custom column menu tab in ag-grid?

Is there a way to add a custom column menu tab with my own favourite icon which on click would render my custom react component?
something like
myColDef.menuTabs: ['generalMenuTab', 'filterMenuTab', 'myCustomMenuTab']
FYI I'm using v12.0.2
What you're after can't be done I'm afraid. The grid supports React components in all sorts of ways (renderers, editors, filters etc), but not via the column menu.
I've updated the docs page to remove the gibberish issue - it'll be fixed properly in the next release, thanks for highlighting this.
This would be helpful to have. In particular for us, we'd like to filter based off row properties, and not row values. Creating our own tab to filter by cell colors that we have assigned with our own set of labels would be useful.
I agree that it would be a nice feature to have. Apparently, there's no quick out-of-the-box solution to do it. The only workaround I see is to implement your own custom Header component which would display any buttons your want.
There you can put a button to open your own custom menu, which you can implement as any regular UI component. It also means you'll need to manually implement all standard menu options that Ag-Grid provides out of the box if you need them.

Eclipse RCP4: Display HandledToolItem with both image and label

I'm working on an Eclipse RCP 4 application and trying to add a HandledToolItem that displays both a label and an image to its left. Problem is whenever i add the image it only displays the image and hides the label. Is there any other way of getting this implemented other than creating a new ToolControl with a Button or a custom Toolbar that can handle this?
It would be nice to have the HandledToolItem because of the simpler management through Commands and Handlers.
Add FORCE_TEXT to the Tags (on the Supplementary tab) for the HandledToolItem in the e4xmi file.