use of org.jkiss.dbeaver.erd.ui.action.DiagramRefreshAction in project dbeaver by serge-rider.
the class ERDEditorPart method fillDefaultEditorContributions.
protected void fillDefaultEditorContributions(IContributionManager toolBarManager) {
ZoomManager zoomManager = rootPart.getZoomManager();
String[] zoomStrings = new String[] { ZoomManager.FIT_ALL, ZoomManager.FIT_HEIGHT, ZoomManager.FIT_WIDTH };
// Init zoom combo with dummy part service
// to prevent zoom disable on part change - as it is standalone zoom control, not global one
zoomCombo = new ZoomComboContributionItem(new IPartService() {
@Override
public void addPartListener(IPartListener listener) {
}
@Override
public void addPartListener(IPartListener2 listener) {
}
@Override
public IWorkbenchPart getActivePart() {
return ERDEditorPart.this;
}
@Override
public IWorkbenchPartReference getActivePartReference() {
return null;
}
@Override
public void removePartListener(IPartListener listener) {
}
@Override
public void removePartListener(IPartListener2 listener) {
}
}, zoomStrings);
zoomCombo.setZoomManager(zoomManager);
toolBarManager.add(zoomCombo);
// toolBarManager.add(new UndoAction(ERDEditorPart.this));
// toolBarManager.add(new RedoAction(ERDEditorPart.this));
// toolBarManager.add(new PrintAction(ERDEditorPart.this));
ZoomInAction zoomInAction = new ZoomInAction(zoomManager);
zoomInAction.setImageDescriptor(DBeaverIcons.getImageDescriptor(UIIcon.ZOOM_IN));
ZoomOutAction zoomOutAction = new ZoomOutAction(zoomManager);
zoomOutAction.setImageDescriptor(DBeaverIcons.getImageDescriptor(UIIcon.ZOOM_OUT));
toolBarManager.add(zoomInAction);
toolBarManager.add(zoomOutAction);
toolBarManager.add(new Separator());
// toolBarManager.add(createAttributeVisibilityMenu());
toolBarManager.add(new DiagramLayoutAction(ERDEditorPart.this));
toolBarManager.add(new DiagramToggleGridAction());
toolBarManager.add(new DiagramRefreshAction(ERDEditorPart.this));
toolBarManager.add(new Separator());
{
toolBarManager.add(ActionUtils.makeCommandContribution(getSite(), IWorkbenchCommandConstants.FILE_PRINT, ERDUIMessages.erd_editor_control_action_print_diagram, UIIcon.PRINT));
toolBarManager.add(ActionUtils.makeCommandContribution(getSite(), IWorkbenchCommandConstants.FILE_SAVE_AS, ERDUIMessages.erd_editor_control_action_save_external_format, UIIcon.PICTURE_SAVE));
toolBarManager.add(ActionUtils.makeCommandContribution(getSite(), IWorkbenchCommandConstants.FILE_SAVE, null, UIIcon.SAVE));
}
toolBarManager.add(new Separator());
{
Action configAction = new Action(ERDUIMessages.erd_editor_control_action_configuration) {
@Override
public void run() {
UIUtils.showPreferencesFor(getSite().getShell(), ERDEditorPart.this, ERDPreferencePage.PAGE_ID);
}
};
configAction.setImageDescriptor(DBeaverIcons.getImageDescriptor(UIIcon.CONFIGURATION));
toolBarManager.add(configAction);
}
}
use of org.jkiss.dbeaver.erd.ui.action.DiagramRefreshAction in project dbeaver by dbeaver.
the class ERDEditorPart method fillDefaultEditorContributions.
protected void fillDefaultEditorContributions(IContributionManager toolBarManager) {
ZoomManager zoomManager = rootPart.getZoomManager();
String[] zoomStrings = new String[] { ZoomManager.FIT_ALL, ZoomManager.FIT_HEIGHT, ZoomManager.FIT_WIDTH };
// Init zoom combo with dummy part service
// to prevent zoom disable on part change - as it is standalone zoom control, not global one
zoomCombo = new ZoomComboContributionItem(new IPartService() {
@Override
public void addPartListener(IPartListener listener) {
}
@Override
public void addPartListener(IPartListener2 listener) {
}
@Override
public IWorkbenchPart getActivePart() {
return ERDEditorPart.this;
}
@Override
public IWorkbenchPartReference getActivePartReference() {
return null;
}
@Override
public void removePartListener(IPartListener listener) {
}
@Override
public void removePartListener(IPartListener2 listener) {
}
}, zoomStrings);
zoomCombo.setZoomManager(zoomManager);
toolBarManager.add(zoomCombo);
// toolBarManager.add(new UndoAction(ERDEditorPart.this));
// toolBarManager.add(new RedoAction(ERDEditorPart.this));
// toolBarManager.add(new PrintAction(ERDEditorPart.this));
ZoomInAction zoomInAction = new ZoomInAction(zoomManager);
zoomInAction.setImageDescriptor(DBeaverIcons.getImageDescriptor(UIIcon.ZOOM_IN));
ZoomOutAction zoomOutAction = new ZoomOutAction(zoomManager);
zoomOutAction.setImageDescriptor(DBeaverIcons.getImageDescriptor(UIIcon.ZOOM_OUT));
toolBarManager.add(zoomInAction);
toolBarManager.add(zoomOutAction);
toolBarManager.add(new Separator());
// toolBarManager.add(createAttributeVisibilityMenu());
toolBarManager.add(new DiagramLayoutAction(ERDEditorPart.this));
toolBarManager.add(new DiagramToggleGridAction());
toolBarManager.add(new DiagramRefreshAction(ERDEditorPart.this));
toolBarManager.add(new Separator());
{
toolBarManager.add(ActionUtils.makeCommandContribution(getSite(), IWorkbenchCommandConstants.FILE_PRINT, ERDUIMessages.erd_editor_control_action_print_diagram, UIIcon.PRINT));
toolBarManager.add(ActionUtils.makeCommandContribution(getSite(), IWorkbenchCommandConstants.FILE_SAVE_AS, ERDUIMessages.erd_editor_control_action_save_external_format, UIIcon.PICTURE_SAVE));
toolBarManager.add(ActionUtils.makeCommandContribution(getSite(), IWorkbenchCommandConstants.FILE_SAVE, null, UIIcon.SAVE));
}
toolBarManager.add(new Separator());
{
Action configAction = new Action(ERDUIMessages.erd_editor_control_action_configuration) {
@Override
public void run() {
UIUtils.showPreferencesFor(getSite().getShell(), ERDEditorPart.this, ERDPreferencePage.PAGE_ID);
}
};
configAction.setImageDescriptor(DBeaverIcons.getImageDescriptor(UIIcon.CONFIGURATION));
toolBarManager.add(configAction);
}
}
Aggregations