I am currently creating a Eclipse RCP application using JUNG. The idea is to display a graph and to display the properties of each node of a graph in another view. I suppose that we must use the selection listener and selection provider mechanism. However, as I am quite new to Java, I am wondering how we can build a selection provider (ISelectionProvider) on the graph so that the other view can react properly. I suppose that I need to fill the methods for a new type of ISelectionProvider that is special for the graph... but I don't really know how to do it. Can you give me some hints ?
C.
class GraphSelectionProvider implements ISelectionProvider {
@Override
public void addSelectionChangedListener(ISelectionChangedListener listener) {
// ??
This is not really the best place to ask questions about general Java or Eclipse RCP programming. If you're not comfortable with Java, you may want to go through their website tutorials.
Joshua
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am currently creating a Eclipse RCP application using JUNG. The idea is to display a graph and to display the properties of each node of a graph in another view. I suppose that we must use the selection listener and selection provider mechanism. However, as I am quite new to Java, I am wondering how we can build a selection provider (ISelectionProvider) on the graph so that the other view can react properly. I suppose that I need to fill the methods for a new type of ISelectionProvider that is special for the graph... but I don't really know how to do it. Can you give me some hints ?
C.
class GraphSelectionProvider implements ISelectionProvider {
@Override
public void addSelectionChangedListener(ISelectionChangedListener listener) {
// ??
}
@Override
public ISelection getSelection() {
// ??
return null ;
}
@Override
public void removeSelectionChangedListener( ISelectionChangedListener listener) {
// ??
}
@Override
public void setSelection(ISelection selection) {
// ??
}
}
This is not really the best place to ask questions about general Java or Eclipse RCP programming. If you're not comfortable with Java, you may want to go through their website tutorials.
Joshua