Skip to content
Snippets Groups Projects
Commit 8be86a1a authored by Alexander Diewald's avatar Alexander Diewald
Browse files

DiagramEditors: Overwrite eclipse zoom class for fixed height

parent 44dce018
No related branches found
No related tags found
1 merge request!69DiagramEditors: Overwrite eclipse zoom class for fixed height
AdvancedTreeViewerEditorBase.java 9d9eded6848ee78991d1416592d1136efd71d2b7 GREEN
AllocationDiagramEditorBase.java fa544546f73eea1150d90b7257b0e6bce82c288c GREEN
CommonDiagramEditorBase.java 69994faea09eec342b8dfaa484ffc03b60978496 GREEN
CommonDiagramEditorBase.java 67496a1bb97ba03c40d19409e02866fe8df1adf1 YELLOW
ConstraintBasedProcessEditor.java 155a5a7ac41c668ae7ef978e8be13b83f5abd67d GREEN
ConstraintBasedProcessEditorHelper.java 11d48e8a2aecd48eea259a42ef1192c4b292a334 GREEN
DiagramEditorBase.java 09663ce095074d1a8eef086284eea0a7776e0431 GREEN
......@@ -11,3 +11,4 @@ SourceEditorBase.java 662b921019fed964cd47838e8758194b66fa3a63 GREEN
SourceEditorConfigurationBase.java e8b810c0d974c475f0a8e6f21aa5b6fd9e17c33a GREEN
SourceEditorUndoRedo.java 08127a8e0afb4f9c2f4c21294ca3220282c25bf0 GREEN
TreeViewerEditorBase.java 1c59689ff57c4f3cc180d85f13021fc03461ecb0 GREEN
ZoomComboContributionItemFixed.java 274593bfb24461c39e70e048de6242e8a1660265 YELLOW
......@@ -410,7 +410,7 @@ abstract class CommonDiagramEditorBase<T extends EObject> extends GEFEditorBase<
zoomManager.setZoomLevelContributions(getZoomLevelContributions());
registerZoomAction();
}
zoomContribution = new ZoomComboContributionItem(getSite().getPage());
zoomContribution = new ZoomComboContributionItemFixed(getSite().getPage());
}
/** Registers and returns the id of the given action. */
......
/*-------------------------------------------------------------------------+
| Copyright 2019 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.ui.editor;
import org.eclipse.gef.ui.actions.ZoomComboContributionItem;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IPartService;
/**
* Overwrites {@link ZoomComboContributionItem} to fix the height adjustment of the zoom combo box.
*
* @author diewald
*/
public class ZoomComboContributionItemFixed extends ZoomComboContributionItem {
/** See {@link ZoomComboContributionItem#ZoomComboContributionItem(IPartService)}. */
public ZoomComboContributionItemFixed(IPartService partService) {
super(partService);
}
/** See {@link ZoomComboContributionItem#ZoomComboContributionItem(IPartService, String)}. */
public ZoomComboContributionItemFixed(IPartService partService, String initString) {
super(partService, initString);
}
/** See {@link ZoomComboContributionItem#ZoomComboContributionItem(IPartService, String[])}. */
public ZoomComboContributionItemFixed(IPartService partService, String[] initStrings) {
super(partService, initStrings);
}
/** {@inheritDoc} */
@Override
protected Control createControl(Composite parent) {
Control control = super.createControl(parent);
parent.setSize(control.computeSize(SWT.DEFAULT, SWT.DEFAULT));
return control;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment