I am new in developing Eclipse plugin and i have manage to do a lot of work. This is where i have got stuck. I have a view with a button. When a user cklicks on the button i want a new window to be opened(The window is a form with Text areas, buttons and other SWT widgets). I have finished creating the window.
After I compile the application, I get a new instance of the eclipse workbench(as expected) but when I open the view and clicks on the button, the window don't show up. This is the window code snippet:
public class NewWindow {
private Display display;
private Shell shell;
public NewWindow(){
this.display = new Display();
shell = new Shell(displaySWT.TITLE | SWT.MIN | SWT.CLOSE);
shell.setText("fffffffffffff");
// additional code here
...
...
shell.open();
this.shellSleep(); // this methode is implemented in my code
}
This is the code snippet that calls this class:
... ...
this.btnCreateNewQuery.addSelectionListener(new SelectionListener(){
public void widgetDefaultSelected(SelectionEvent e){
}
public void widgetSelected(SelectionEvent e){ NewWindow b = new NewWindow();
}
});
... ...
I don't understand why the window don't show up. I have tried to fix it but has not find anything yet. I read something on this site but i don't understand what they meant. this is the link: How do I get the workbench window to open a modal dialog in an Eclipse based project?