I have created a sample eclipse plugin development with a button.
@PostConstruct
public void createPartControl(Composite parent) {
Button button = new Button(parent, SWT.PUSH);
button.setText("button");
button.addSelectionListener((SelectionListener) new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
System.out.println(e);
}
});
}
I want to initiate eclipse run for a other java file(any other java class) when this button is clicked. Is there any way to programmatically control the run button of the eclipse?