I am new to Eclipse RCP and I am working on an application (Eclipse 4), I have multiple parts within I display data from different sources. I would like to add a menu that displays a Dialog that offers the possibility to select dynamically the data sources that the user wants. When the options are selected I would like to re-instantiate the Part's class using the options as parameters and refresh the view. Is that possible ?
My Part's createComposite method :
@PostConstruct
public void createComposite(Composite parent) {
Composite composite = new Composite(parent, SWT.EMBEDDED);
parent_C = parent;
Frame frame_1 = SWT_AWT.new_Frame(composite);
JPanel mainPanel = new JPanel();
BorderLayout layout = new BorderLayout();
mainPanel.setLayout(layout);
/* Layout Definition */
}
I would like to add another parameter to the createComposite Method that indicates the options :
@PostConstruct
public void createComposite(Composite parent, String[] options) {
/*Code Here*/
}
The Value of the String array changes when the user validate the options from the Menu. When the users validate his options the part's class should be called with the new options.
Is there any way to do this ? Thank You