Skip to content

Commit 9ed56a6

Browse files
committed
[target] Remove Content and Environment Section from the Definition page
Currently the Target-Editor contains two sections "Content" and "Environment" that roughly explain what these things can be used for if one clicks on the corresponding tabs. In practice, these information is barley usable for todays work an users uncertain would better consult the Eclipse Help or read a tutorial on PDE. More worse, these clutter the UI and steal valuable space not available for the actual content of the location leading to scrollbars appearing. This now removes the sections entirely ro reclaim the space for something the user is actually interested in.
1 parent 1708d71 commit 9ed56a6

File tree

1 file changed

+0
-48
lines changed
  • ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition

1 file changed

+0
-48
lines changed

ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/DefinitionPage.java

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,14 @@
1919
import org.eclipse.pde.internal.ui.PDEPlugin;
2020
import org.eclipse.pde.internal.ui.PDEUIMessages;
2121
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;
2522
import org.eclipse.swt.widgets.Composite;
2623
import org.eclipse.ui.PlatformUI;
2724
import org.eclipse.ui.forms.IManagedForm;
2825
import org.eclipse.ui.forms.editor.FormPage;
2926
import org.eclipse.ui.forms.events.HyperlinkEvent;
3027
import org.eclipse.ui.forms.events.IHyperlinkListener;
31-
import org.eclipse.ui.forms.widgets.ExpandableComposite;
32-
import org.eclipse.ui.forms.widgets.FormText;
3328
import org.eclipse.ui.forms.widgets.FormToolkit;
3429
import org.eclipse.ui.forms.widgets.ScrolledForm;
35-
import org.eclipse.ui.forms.widgets.Section;
36-
import org.eclipse.ui.forms.widgets.TableWrapData;
3730

3831
/**
3932
* First page in the target definition editor. Allows for editing of the name
@@ -84,47 +77,6 @@ private void fillBody(IManagedForm managedForm, FormToolkit toolkit) {
8477
body.setLayout(FormLayoutFactory.createFormGridLayout(true, 1));
8578
managedForm.addPart(new InformationSection(this, body));
8679
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;
12880
}
12981

13082
@Override

0 commit comments

Comments
 (0)