});
showConceptMenuItem.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent arg0) {
ShowConcept showConcept = new ShowConcept(shell);
ConceptTO[] allConcepts = controller.getAllConcepts();
String []concepts = new String[allConcepts.length];
for(int i = 0; i<allConcepts.length;i++){
concepts[i] = allConcepts[i].getUri();
}
Arrays.sort(concepts);
showConcept.setConcepts(concepts);
String uri = (String) showConcept.open();
if(uri != null){
try {
viewer.setGraph(controller.createGraphFromConcept(uri));
updateGraph();
} catch (ConceptNotFoundException e) {
createErrorDialog(e);
}
}
}
});
conceptPathMenuItem.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent arg0) {
try {
ShowConceptPath sp = new ShowConceptPath(shell);
String[] concepts;
concepts = controller.getAvailablePaths();
Arrays.sort(concepts);
sp.setConcepts(concepts);
String uri = (String) sp.open();
if(uri != null){
viewer.setGraph(controller.createGraphForSpreading(uri));
updateGraph();
}
} catch (ConceptNotFoundException e) {
createErrorDialog(e);
} catch (Exception e) {
createErrorDialog(e);
}
}
});
showPathMenuItem.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent arg0) {
ShowSpreadingPath showConcept = new ShowSpreadingPath(shell);
String[] concepts;
try {
concepts = controller.getAvailableSpreading();
Arrays.sort(concepts);
showConcept.setConcepts(concepts);
String uri = (String) showConcept.open();
if(uri != null){
viewer.setGraph(controller.createGraphForSpreading(uri));
updateGraph();
}
} catch (ConceptNotFoundException e) {