@Override
@SuppressWarnings("deprecation")
protected void configureGraphicalViewer() {
super.configureGraphicalViewer();
ScrollingGraphicalViewer viewer = (ScrollingGraphicalViewer) getGraphicalViewer();
ScalableFreeformRootEditPart root = new ScalableFreeformRootEditPart();
double[] zoomLevels;
ArrayList<String> zoomContributions;
ZoomManager manager = root.getZoomManager();
getActionRegistry().registerAction(new ZoomInAction(manager));
getActionRegistry().registerAction(new ZoomOutAction(manager));
zoomLevels = new double[] { 0.25, 0.5, 0.75, 1.0, 1.5, 2.0, 2.5, 3.0 };
manager.setZoomLevels(zoomLevels);
zoomContributions = new ArrayList<String>();
zoomContributions.add(ZoomManager.FIT_ALL);
zoomContributions.add(ZoomManager.FIT_HEIGHT);
zoomContributions.add(ZoomManager.FIT_WIDTH);
manager.setZoomLevelContributions(zoomContributions);
IAction zoomIn = new ZoomInAction(root.getZoomManager());
IAction zoomOut = new ZoomOutAction(root.getZoomManager());
getActionRegistry().registerAction(zoomIn);
getActionRegistry().registerAction(zoomOut);
getSite().getKeyBindingService().registerAction(zoomIn);
getSite().getKeyBindingService().registerAction(zoomOut);
// MeasureProofreadingAction activateMeasureValidationAction = new
// MeasureProofreadingAction(
// this);
// getActionRegistry().registerAction(activateMeasureValidationAction);
// RefreshScreenAction imageRefreshAction = new
// RefreshScreenAction(this);
// getActionRegistry().registerAction(imageRefreshAction);
ScoreImageExportAction scoreImageExportAction = new ScoreImageExportAction(
this);
getActionRegistry().registerAction(scoreImageExportAction);
MEIPruningAction meiPruningAction = new MEIPruningAction(this);
getActionRegistry().registerAction(meiPruningAction);
ManageSourcesAction manageSourcesAction = new ManageSourcesAction(this);
getActionRegistry().registerAction(manageSourcesAction);
InsertMeasuresAction insertMeasuresAction = new InsertMeasuresAction(
this);
getActionRegistry().registerAction(insertMeasuresAction);
InsertStaffdefsAction insertStaffdefsAction = new InsertStaffdefsAction(
this);
getActionRegistry().registerAction(insertStaffdefsAction);
// Add specific addChild actions
addSpecificChildActions();
viewer.setRootEditPart(root);
viewer.setEditPartFactory(new GraphicalPartFactory());
ContextMenuProvider provider = new MusicContextMenuProvider(viewer,
getActionRegistry());
viewer.setContextMenu(provider);
getSite().registerContextMenu(
"info.textgrid.lab.noteeditor.outline.contextmenu", //$NON-NLS-1$
provider, viewer);
viewer.setKeyHandler(new GraphicalViewerKeyHandler(viewer)
.setParent(getCommonKeyHandler()));
getSite().setSelectionProvider(viewer);
loadProperties();
// Actions