use of eu.esdihumboldt.hale.ui.views.mapping.MappingView in project hale by halestudio.
the class TransformationReportPage method onDoubleClick.
@Override
protected void onDoubleClick(Message m) {
if (m instanceof TransformationMessage) {
TransformationMessage tm = (TransformationMessage) m;
AlignmentService as = PlatformUI.getWorkbench().getService(AlignmentService.class);
if (as != null && as.getAlignment().getCell(tm.getCellId()) != null) {
IWorkbenchWindow activeWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
// pin the property sheet if possible
IViewReference ref = activeWindow.getActivePage().findViewReference(IPageLayout.ID_PROP_SHEET);
if (ref != null) {
IViewPart part = ref.getView(false);
if (part instanceof PropertySheet) {
PropertySheet sheet = (PropertySheet) part;
if (!sheet.isPinned()) {
sheet.setPinned(true);
}
}
}
// show cell in mapping view
try {
IViewPart part = activeWindow.getActivePage().showView(MappingView.ID);
if (part instanceof MappingView) {
((MappingView) part).selectCell(tm.getCellId());
}
} catch (PartInitException e) {
// ignore
}
}
}
super.onDoubleClick(m);
}
use of eu.esdihumboldt.hale.ui.views.mapping.MappingView in project hale by halestudio.
the class TaskTreeView method onDoubleClick.
/**
* React on a double click on an item that represents the given identifier
*
* @param context the context object of the double-clicked node
*/
protected void onDoubleClick(Object context) {
String cellId;
if (context instanceof Cell) {
cellId = ((Cell) context).getId();
} else {
return;
}
IWorkbenchWindow activeWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
try {
IViewPart part = activeWindow.getActivePage().showView(MappingView.ID);
if (part instanceof MappingView) {
((MappingView) part).selectCell(cellId);
}
} catch (PartInitException e) {
// ignore
}
}
Aggregations