So I have two view. One view for my table and one view for my buttons.
I want to change the table when I click a button...

I have some code, so I paste here the most of it.

ControlView
Java Code:
public class ControlView extends ViewPart implements SelectionListener {
           // class level variables

	@Override
	public void createPartControl(final Composite parent) {
		IViewRegistry viewRegistry = PlatformUI.getWorkbench().getViewRegistry();
		IViewDescriptor desc = viewRegistry.find(TableView.ID);
		try {
			tableView = (TableView) desc.createView();
		} catch (CoreException e) {
			e.printStackTrace();
		}
                      //code to create the gui, I also add here
                      //the listeners for the buttons
	}

	@Override
	public void setFocus() {
	}

	@Override
	public void widgetDefaultSelected(final SelectionEvent arg0) {
	}

	@Override
	public void widgetSelected(final SelectionEvent event) {
		if (event.getSource().equals(b1)) {
			add();
			return;
		}
		if (event.getSource().equals(b2)) {
			delete();
			return;
		}
		if (event.getSource().equals(b3)) {
			modify();
			return;
		}
		if (event.getSource().equals(b4)) {
			ok();
			return;
		}
		if (event.getSource().equals(b5)) {
			cancel();
			return;
		}
	}

	private void add() {
                 // code
	}

           // code

	private void ok() {
		if ("".equals(t2.getText()) || "".equals(t3.getText())) {
			return;
		}
		if ("Add".equals(l1.getText())) {
			StudentManagerServiceFactory.getInstance().getTableManagerService().add(new Student("", t2.getText(), t3.getText()));
			showHide(false);
			tableView.myReload();
			return;
		}
		if ("Delete".equals(l1.getText())) {
			StudentManagerServiceFactory.getInstance().getTableManagerService().delete(
					new Student(t1.getText(), t2.getText(), t3.getText()));
			showHide(false);
			return;
		}
                      //code
	}
           // code
}
TableView
Java Code:
public class TableView extends ViewPart {
	public static final String	ID	= "Lab6.tableView";

	private TableViewer			viewer;

	@Override
	public void createPartControl(final Composite parent) {
		viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
		createColumns(viewer);
		viewer.setContentProvider(new StudentContentProvider());
		viewer.setLabelProvider(new StudentLabelProvider());
		viewer.setInput(StudentModelProvider.getInstance().getStudents());
	}

	private void createColumns(final TableViewer viewer) {
		Table table = viewer.getTable();
		String[] titles = { "Student ID", "Student Name", "Group ID" };
		int[] bounds = { 100, 100, 100 };

		for (int i = 0; i < titles.length; i++) {
			TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
			column.getColumn().setText(titles[i]);
			column.getColumn().setWidth(bounds[i]);
			column.getColumn().setResizable(true);
			column.getColumn().setMoveable(true);
		}
		table.setHeaderVisible(true);
		table.setLinesVisible(true);
	}

	@Override
	public void setFocus() {
		viewer.getControl().setFocus();
	}

	public Student getCurrentRow() {
                // So here I want to return the selected row in a Student Object...
	}

	public void myReload() {
                 // Here I want to reload my table, because I got the source of the table
                 // from a database, and when I update the database I also
                 // want to update my table
	}
}
So you can see, that in TableView class I need to implement the getCurrentRow() and myReload() methods...
And in this line: "tableView = (TableView) desc.createView();"
do you think I get the current instance of TableView?
Please correct me if I am wrong..

Maybe do you have any idea or solution?