Catalin Gerea Messages: 86 Registered: July 2009 Location: Bucharest, Romania
Problem A - 2 questions:
I emulate a form: two Label + two Text + Submit/Cancel Button. (org.eclipse.swt.widgets.Label,org.eclipse.swt.widgets.Text, org.eclipse.swt.Button).
1. Is there a way to automatically trigger the decoration of the org.eclipse.swt.widgets.Text when the the focus is lost? Similar lets say to the one in ColumnViewerEditorActivationStrategy class? Or do I have to add a focus listener and trigger the decoration on focusLost?
2. How can I change the properties of the org.eclipse.swt.widgets.Text when the decoration is performed? I mean I want to add an small error icon as decoration AND make the border of the org.eclipse.swt.widgets.Text red to clearly show where the error is (image a situation where there are >=30 Text fields and 3 have errors and 3 have warnings -> not very easy to find sometimes).
Problem B - 2 questions:
I have a JFace Tree and I need to decorate the images shown in the tree entries. I tried the extension point approach and it didn't worked (most likely I did not understood correctly the examples from this article)
1. Do I have to use a Lightweight decorator or a regular one?
2. How do I map the decorator to my model behind the tree?
If somebody needs additional details regarding the problems I want to solve just let me know.
Sorry if I posted in the wrong forum. If this is the case then let me know and I will use the correct one.