ComboFieldEditor. Dynamic change of values

I am working on an RCP Eclipse project. As I walked through the walkthroughs, I came across a preferences page and started working around it.

Now I need to dynamically change the values ​​of ComboFieldEditor . As in the case when I make a choice on TextFieldEditor , the values ​​of ComboFieldEditor should change. I tried to find the answer and even tried one of the solutions that I found in Stack Overflow, but I always had a NullPointerException . Can anyone help me in this regard?

Technically, I want to dynamically change values ​​in ComboFieldEditor . As with the start of the listener, I want to add new values ​​to my list. I tried this solution, but I kept getting a NullPointerException .

+4
source share
1 answer

Ok This is what I have done so far. I created a class called CustomComboFieldEditor and added all the methods present in ComboFieldEditor. I changed the methods that helped to enter the values ​​in the combo box. I am doing a great job right now. I am sure that this is not the most beautiful of all methods, and I am sure that I will be crucified for this decision, but the time and situation forced me to use it. A curious way would be appreciated.

Thanks:)

0
source

Source: https://habr.com/ru/post/1393326/


All Articles