In ViewA, I have a panel within a frame being displayed. When I click on an object within this panel, I would like to send the object to a function in ViewB.
public class ViewA extends ViewPart{
public void createPartControl(Composite parent) {
Composite swtAwtComponent = new Composite(parent, SWT.EMBEDDED);
java.awt.Frame frame = SWT_AWT.new_Frame( swtAwtComponent );
javax.swing.JPanel panel = new javax.swing.JPanel( );
...
}
}
public class ViewB extends ViewPart{
...
public void foo(Object o){
}
}
I have seen many questions here regarding communicating between two views, using an ISelectionListener, and a link to the vogella tutorials on commands such as; Eclipse RCP let two views communicate, Eclipse RCP update a View after changes in the editor etc. However, every question's solution assumes the triggering event is a selection within a TableViewer (or any viewer) and not within a Frame/Panel mousePressed event. Please help.