Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMélanie Bats2017-05-16 12:33:20 +0000
committerStéphane Bégaudeau2017-05-17 08:20:09 +0000
commit790154e3e22c9f323381b385057bd386c4fbc130 (patch)
tree818031d713e376d8d9b83271e4cd5706f512097e
parentfe8702b35f48ca4d8b84ecbeb4966582bac988b2 (diff)
downloadorg.eclipse.eef-790154e3e22c9f323381b385057bd386c4fbc130.tar.gz
org.eclipse.eef-790154e3e22c9f323381b385057bd386c4fbc130.tar.xz
org.eclipse.eef-790154e3e22c9f323381b385057bd386c4fbc130.zip
[516667] Improve the layout of the hyperlinks
Bug: 516667 Change-Id: Ic4f4339c49b30a2c4a6385db57b4847d79e1d6ff Signed-off-by: Mélanie Bats <melanie.bats@obeo.fr>
-rw-r--r--plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFHyperlinkLifecycleManager.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFHyperlinkLifecycleManager.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFHyperlinkLifecycleManager.java
index e7057d55c..5fff7b48d 100644
--- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFHyperlinkLifecycleManager.java
+++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFHyperlinkLifecycleManager.java
@@ -12,7 +12,6 @@ package org.eclipse.eef.ide.ui.internal.widgets;
import java.util.ArrayList;
import java.util.List;
-import java.util.Optional;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.eef.EEFHyperlinkDescription;
@@ -105,17 +104,10 @@ public class EEFHyperlinkLifecycleManager extends AbstractEEFWidgetLifecycleMana
* @see org.eclipse.eef.ide.ui.api.widgets.AbstractEEFWidgetLifecycleManager#createMainControl(org.eclipse.swt.widgets.Composite,
* org.eclipse.eef.common.ui.api.IEEFFormContainer)
*/
- @SuppressWarnings("boxing")
@Override
protected void createMainControl(Composite parent, IEEFFormContainer formContainer) {
this.widgetFactory = formContainer.getWidgetFactory();
- // if there is no actions defined the hyperlink does not need to grab all the horizontal space
- if (this.description.getActions().size() == 0) {
- Optional.ofNullable(parent.getLayoutData()).filter(GridData.class::isInstance).map(GridData.class::cast)
- .map(gridData -> gridData.grabExcessHorizontalSpace = false);
- }
-
// this is the parent composite
Composite hyperlinkComposite = this.widgetFactory.createFlatFormComposite(parent);
GridLayout layout = new GridLayout(2, false);
@@ -126,7 +118,6 @@ public class EEFHyperlinkLifecycleManager extends AbstractEEFWidgetLifecycleMana
GridData gridData = new GridData(SWT.FILL, SWT.CENTER, false, false);
hyperlinkComposite.setLayoutData(gridData);
- gridData.grabExcessHorizontalSpace = false;
this.createHyperlink(hyperlinkComposite);
this.createWidgetActionButtons(hyperlinkComposite);
@@ -143,7 +134,7 @@ public class EEFHyperlinkLifecycleManager extends AbstractEEFWidgetLifecycleMana
*/
private void createHyperlink(Composite parent) {
this.hyperlink = widgetFactory.createStyledText(parent, SWT.READ_ONLY);
- GridData gridData = new GridData(SWT.FILL, SWT.CENTER, false, false);
+ GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false);
gridData.horizontalIndent = VALIDATION_MARKER_OFFSET;
this.hyperlink.setLayoutData(gridData);
this.hyperlink.setEditable(false);

Back to the top