Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 223327 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jface/text/hyperlink/MultipleHyperlinkPresenter.java (-32 / +27 lines)
Lines 10-15 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.jface.text.hyperlink;
11
package org.eclipse.jface.text.hyperlink;
12
12
13
import org.eclipse.jface.preference.IPreferenceStore;
14
import org.eclipse.jface.text.AbstractInformationControl;
15
import org.eclipse.jface.text.AbstractInformationControlManager;
16
import org.eclipse.jface.text.IInformationControl;
17
import org.eclipse.jface.text.IInformationControlCreator;
18
import org.eclipse.jface.text.IInformationControlExtension2;
19
import org.eclipse.jface.text.IInformationControlExtension3;
20
import org.eclipse.jface.text.IRegion;
21
import org.eclipse.jface.text.ITextHover;
22
import org.eclipse.jface.text.ITextHoverExtension;
23
import org.eclipse.jface.text.ITextViewer;
24
import org.eclipse.jface.text.IWidgetTokenKeeper;
25
import org.eclipse.jface.text.IWidgetTokenKeeperExtension;
26
import org.eclipse.jface.text.IWidgetTokenOwner;
27
import org.eclipse.jface.text.IWidgetTokenOwnerExtension;
28
import org.eclipse.jface.text.JFaceTextUtil;
29
import org.eclipse.jface.text.Region;
30
import org.eclipse.jface.util.Geometry;
31
import org.eclipse.jface.viewers.ColumnLabelProvider;
32
import org.eclipse.jface.viewers.IStructuredContentProvider;
33
import org.eclipse.jface.viewers.TableViewer;
34
import org.eclipse.jface.viewers.Viewer;
13
import org.eclipse.swt.SWT;
35
import org.eclipse.swt.SWT;
14
import org.eclipse.swt.events.KeyAdapter;
36
import org.eclipse.swt.events.KeyAdapter;
15
import org.eclipse.swt.events.KeyEvent;
37
import org.eclipse.swt.events.KeyEvent;
Lines 25-31 Link Here
25
import org.eclipse.swt.graphics.Point;
47
import org.eclipse.swt.graphics.Point;
26
import org.eclipse.swt.graphics.RGB;
48
import org.eclipse.swt.graphics.RGB;
27
import org.eclipse.swt.graphics.Rectangle;
49
import org.eclipse.swt.graphics.Rectangle;
28
import org.eclipse.swt.layout.GridLayout;
29
import org.eclipse.swt.widgets.Composite;
50
import org.eclipse.swt.widgets.Composite;
30
import org.eclipse.swt.widgets.Control;
51
import org.eclipse.swt.widgets.Control;
31
import org.eclipse.swt.widgets.Display;
52
import org.eclipse.swt.widgets.Display;
Lines 35-64 Link Here
35
import org.eclipse.swt.widgets.Table;
56
import org.eclipse.swt.widgets.Table;
36
import org.eclipse.swt.widgets.TableItem;
57
import org.eclipse.swt.widgets.TableItem;
37
58
38
import org.eclipse.jface.preference.IPreferenceStore;
39
import org.eclipse.jface.util.Geometry;
40
import org.eclipse.jface.viewers.ColumnLabelProvider;
41
import org.eclipse.jface.viewers.IStructuredContentProvider;
42
import org.eclipse.jface.viewers.TableViewer;
43
import org.eclipse.jface.viewers.Viewer;
44
45
import org.eclipse.jface.text.AbstractInformationControl;
46
import org.eclipse.jface.text.AbstractInformationControlManager;
47
import org.eclipse.jface.text.IInformationControl;
48
import org.eclipse.jface.text.IInformationControlCreator;
49
import org.eclipse.jface.text.IInformationControlExtension2;
50
import org.eclipse.jface.text.IInformationControlExtension3;
51
import org.eclipse.jface.text.IRegion;
52
import org.eclipse.jface.text.ITextHover;
53
import org.eclipse.jface.text.ITextHoverExtension;
54
import org.eclipse.jface.text.ITextViewer;
55
import org.eclipse.jface.text.IWidgetTokenKeeper;
56
import org.eclipse.jface.text.IWidgetTokenKeeperExtension;
57
import org.eclipse.jface.text.IWidgetTokenOwner;
58
import org.eclipse.jface.text.IWidgetTokenOwnerExtension;
59
import org.eclipse.jface.text.JFaceTextUtil;
60
import org.eclipse.jface.text.Region;
61
62
59
63
/**
60
/**
64
 * A hyperlink presenter capable of showing multiple hyperlinks in a hover.
61
 * A hyperlink presenter capable of showing multiple hyperlinks in a hover.
Lines 153-162 Link Here
153
		 */
150
		 */
154
		protected void createContent(Composite parent) {
151
		protected void createContent(Composite parent) {
155
			fParent= parent;
152
			fParent= parent;
156
			GridLayout layout= new GridLayout();
157
			layout.marginWidth= 0;
158
			layout.marginRight= 4;
159
			fParent.setLayout(layout);
160
			fParent.setForeground(fForegroundColor);
153
			fParent.setForeground(fForegroundColor);
161
			fParent.setBackground(fBackgroundColor);
154
			fParent.setBackground(fBackgroundColor);
162
		}
155
		}
Lines 178-192 Link Here
178
			int scrollBarHeight= fTable.getHorizontalBar().getSize().y;
171
			int scrollBarHeight= fTable.getHorizontalBar().getSize().y;
179
			
172
			
180
			int width;
173
			int width;
181
			if (preferedSize.y - scrollBarHeight < constraints.y) {
174
			if (preferedSize.y - scrollBarHeight <= constraints.y) {
182
				width= preferedSize.x - scrollBarWidth;
175
				width= preferedSize.x - scrollBarWidth;
176
				fTable.getVerticalBar().setVisible(false);
183
			} else {
177
			} else {
184
				width= Math.min(preferedSize.x, constraints.x);
178
				width= Math.min(preferedSize.x, constraints.x);
185
			}
179
			}
186
			
180
			
187
			int height;
181
			int height;
188
			if (preferedSize.x - scrollBarWidth < constraints.x) {
182
			if (preferedSize.x - scrollBarWidth <= constraints.x) {
189
				height= preferedSize.y - scrollBarHeight;
183
				height= preferedSize.y - scrollBarHeight - 1;
184
				fTable.getHorizontalBar().setVisible(false);
190
			} else {
185
			} else {
191
				height= Math.min(preferedSize.y, constraints.y);
186
				height= Math.min(preferedSize.y, constraints.y);
192
			}
187
			}

Return to bug 223327