// GMF action plugins, not used by Alive public void removeDashboardAction(DashboardActionDescriptor descriptor) { IFigure actionFigure = contributions.remove(descriptor); if (actionFigure == null) { return; // not contributed; just ignore } ActionContainer location = locations.get(descriptor.getLocation()); if (location == null) { Plugin.getDefault() .getLog() .log( Plugin.createError( "Unknown ALIVE Dashboard location: " + descriptor.getLocation(), null)); //$NON-NLS-1$ return; } location.removeAction(actionFigure, descriptor.isStandard()); }
// GMF action plugins, not used by Alive public void addDashboardAction(DashboardActionDescriptor descriptor) { ActionContainer location = locations.get(descriptor.getLocation()); if (location == null) { Plugin.getDefault() .getLog() .log( Plugin.createError( "Unknown ALIVE Dashboard location: " + descriptor.getLocation(), null)); //$NON-NLS-1$ return; } InternalDashboardAction<AliveDashboardState> action = descriptor.createDashboardAction(); if (action == null) { return; } IFigure actionFigure = createLinkFigure(descriptor.getLabel(), action); location.addAction(actionFigure, descriptor.isStandard()); contributions.put(descriptor, actionFigure); }