Commit 2d67ed85 authored by Alexander Diewald's avatar Alexander Diewald
Browse files

Editors: Remove the Zoom box as it is broken upstream

Issue-Ref: 3672
Issue-Url: https://af3-developer.fortiss.org/issues/3672

Signed-off-by: Alexander Diewald's avatarAlexander Diewald <diewald@fortiss.org>
parent d94af79d
AdvancedTreeViewerEditorBase.java 9d9eded6848ee78991d1416592d1136efd71d2b7 GREEN
AllocationDiagramEditorBase.java fa544546f73eea1150d90b7257b0e6bce82c288c GREEN
CommonDiagramEditorBase.java 67496a1bb97ba03c40d19409e02866fe8df1adf1 YELLOW
CommonDiagramEditorBase.java bcb3cafd8320197e7c78b772f1d0025330df4379 YELLOW
ConstraintBasedProcessEditor.java 155a5a7ac41c668ae7ef978e8be13b83f5abd67d GREEN
ConstraintBasedProcessEditorHelper.java 11d48e8a2aecd48eea259a42ef1192c4b292a334 GREEN
DiagramEditorBase.java 09663ce095074d1a8eef086284eea0a7776e0431 GREEN
......
......@@ -86,7 +86,6 @@ import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.ISelectionListener;
......@@ -410,7 +409,6 @@ abstract class CommonDiagramEditorBase<T extends EObject> extends GEFEditorBase<
zoomManager.setZoomLevelContributions(getZoomLevelContributions());
registerZoomAction();
}
zoomContribution = new ZoomComboContributionItemFixed(getSite().getPage());
}
/** Registers and returns the id of the given action. */
......@@ -471,18 +469,6 @@ abstract class CommonDiagramEditorBase<T extends EObject> extends GEFEditorBase<
private static final List<String> defaultZoomLevelContribution =
Arrays.asList(new String[] {FIT_ALL, FIT_WIDTH, FIT_HEIGHT});
/** Registers global actions (including zoom action). */
@Override
public void registerGlobalActions(IActionBars bars) {
bars.getToolBarManager().add(zoomContribution);
}
/** Unregisters global actions (including zoom action). */
@Override
public void unregisterGlobalActions(IActionBars bars) {
bars.getToolBarManager().remove(zoomContribution);
}
/**
* Registers the select all action. Sub-classes may override to prevent the
* action registering.
......
/*-------------------------------------------------------------------------+
| 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;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment