|
19 | 19 | import org.eclipse.pde.internal.ui.PDEPlugin; |
20 | 20 | import org.eclipse.pde.internal.ui.PDEUIMessages; |
21 | 21 | import org.eclipse.pde.internal.ui.editor.FormLayoutFactory; |
22 | | -import org.eclipse.swt.SWT; |
23 | | -import org.eclipse.swt.SWTException; |
24 | | -import org.eclipse.swt.layout.GridData; |
25 | 22 | import org.eclipse.swt.widgets.Composite; |
26 | 23 | import org.eclipse.ui.PlatformUI; |
27 | 24 | import org.eclipse.ui.forms.IManagedForm; |
28 | 25 | import org.eclipse.ui.forms.editor.FormPage; |
29 | 26 | import org.eclipse.ui.forms.events.HyperlinkEvent; |
30 | 27 | import org.eclipse.ui.forms.events.IHyperlinkListener; |
31 | | -import org.eclipse.ui.forms.widgets.ExpandableComposite; |
32 | | -import org.eclipse.ui.forms.widgets.FormText; |
33 | 28 | import org.eclipse.ui.forms.widgets.FormToolkit; |
34 | 29 | import org.eclipse.ui.forms.widgets.ScrolledForm; |
35 | | -import org.eclipse.ui.forms.widgets.Section; |
36 | | -import org.eclipse.ui.forms.widgets.TableWrapData; |
37 | 30 |
|
38 | 31 | /** |
39 | 32 | * First page in the target definition editor. Allows for editing of the name |
@@ -84,47 +77,6 @@ private void fillBody(IManagedForm managedForm, FormToolkit toolkit) { |
84 | 77 | body.setLayout(FormLayoutFactory.createFormGridLayout(true, 1)); |
85 | 78 | managedForm.addPart(new InformationSection(this, body)); |
86 | 79 | managedForm.addPart(new LocationsSection(this, body)); |
87 | | - Composite linkComposite = toolkit.createComposite(body); |
88 | | - linkComposite.setLayout(FormLayoutFactory.createFormGridLayout(true, 2)); |
89 | | - linkComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); |
90 | | - createContentsSection(linkComposite, toolkit); |
91 | | - createEnvironmentSection(linkComposite, toolkit); |
92 | | - } |
93 | | - |
94 | | - private void createContentsSection(Composite parent, FormToolkit toolkit) { |
95 | | - Section section = createSection(parent, toolkit, PDEUIMessages.OverviewPage_contentTitle); |
96 | | - createText(section, PDEUIMessages.OverviewPage_contentDescription, toolkit); |
97 | | - } |
98 | | - |
99 | | - private void createEnvironmentSection(Composite parent, FormToolkit toolkit) { |
100 | | - Section section = createSection(parent, toolkit, PDEUIMessages.OverviewPage_environmentTitle); |
101 | | - createText(section, PDEUIMessages.OverviewPage_environmentDescription, toolkit); |
102 | | - } |
103 | | - |
104 | | - private Section createSection(Composite parent, FormToolkit toolkit, String title) { |
105 | | - Section section = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR); |
106 | | - section.clientVerticalSpacing = FormLayoutFactory.SECTION_HEADER_VERTICAL_SPACING; |
107 | | - section.setText(title); |
108 | | - section.setLayout(FormLayoutFactory.createClearTableWrapLayout(false, 1)); |
109 | | - section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING)); |
110 | | - return section; |
111 | | - } |
112 | | - |
113 | | - private FormText createText(Section section, String content, FormToolkit toolkit) { |
114 | | - Composite container = toolkit.createComposite(section, SWT.NONE); |
115 | | - container.setLayout(FormLayoutFactory.createSectionClientTableWrapLayout(false, 1)); |
116 | | - section.setClient(container); |
117 | | - FormText text = toolkit.createFormText(container, true); |
118 | | - try { |
119 | | - text.setText(content, true, false); |
120 | | - } catch (SWTException e) { |
121 | | - text.setText(e.getMessage(), false, false); |
122 | | - } |
123 | | - TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB); |
124 | | - data.maxWidth = 250; |
125 | | - text.setLayoutData(data); |
126 | | - text.addHyperlinkListener(this); |
127 | | - return text; |
128 | 80 | } |
129 | 81 |
|
130 | 82 | @Override |
|
0 commit comments