Java Code Examples for org.eclipse.ui.forms.widgets.Section#setText()
The following examples show how to use
org.eclipse.ui.forms.widgets.Section#setText() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OutputPage.java From typescript.java with MIT License | 6 votes |
private void createDebuggingSection(Composite parent) { FormToolkit toolkit = super.getToolkit(); Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR); section.setDescription(TsconfigEditorMessages.OutputPage_DebuggingSection_desc); section.setText(TsconfigEditorMessages.OutputPage_DebuggingSection_title); TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB); section.setLayoutData(data); Composite body = createBody(section); createCheckbox(body, TsconfigEditorMessages.OutputPage_sourceMap_label, new JSONPath("compilerOptions.sourceMap")); createTextAndBrowseButton(body, TsconfigEditorMessages.OutputPage_sourceRoot_label, new JSONPath("compilerOptions.sourceRoot"), false); createTextAndBrowseButton(body, TsconfigEditorMessages.OutputPage_mapRoot_label, new JSONPath("compilerOptions.mapRoot"), false); createCheckbox(body, TsconfigEditorMessages.OutputPage_inlineSourceMap_label, new JSONPath("compilerOptions.inlineSourceMap")); createCheckbox(body, TsconfigEditorMessages.OutputPage_inlineSources_label, new JSONPath("compilerOptions.inlineSources")); }
Example 2
Source File: SankeyMiniViewAction.java From olca-app with Mozilla Public License 2.0 | 6 votes |
private Composite createForm(Composite parent) { FormToolkit toolkit = new FormToolkit(Display.getCurrent()); ScrolledForm form = toolkit.createScrolledForm(parent); Composite body = form.getBody(); body.setLayout(new FillLayout()); toolkit.paintBordersFor(body); SashForm sash = new SashForm(body, SWT.VERTICAL); toolkit.adapt(sash, true, true); Section section = toolkit.createSection(sash, ExpandableComposite.NO_TITLE | ExpandableComposite.EXPANDED); section.setText(""); Composite composite = toolkit.createComposite(section, SWT.NONE); composite.setLayout(new GridLayout()); section.setClient(composite); toolkit.paintBordersFor(composite); return composite; }
Example 3
Source File: ImportWorkspaceControlSupplier.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
private void doCreateWorkspaceTips(Composite mainComposite) { Label workspaceTips = new Label(mainComposite, SWT.NONE); workspaceTips.setLayoutData(GridDataFactory.fillDefaults().create()); workspaceTips.setText(Messages.workspaceTips); final Section section = new Section(mainComposite, Section.TREE_NODE | Section.CLIENT_INDENT); section.setLayout(GridLayoutFactory.fillDefaults().margins(0, 0).create()); section.setLayoutData( GridDataFactory.swtDefaults().align(SWT.FILL, SWT.TOP).hint(200, SWT.DEFAULT) .grab(true, false).create()); section.setText(Messages.moreInfo); Label label = new Label(section, SWT.WRAP); label.setLayoutData(GridDataFactory.swtDefaults().create()); label.setText(Messages.importWorkspaceOverwriteBehavior); section.setClient(label); section.setExpanded(false); section.addExpansionListener(new UpdateLayoutListener(mainComposite)); }
Example 4
Source File: OutputPage.java From typescript.java with MIT License | 6 votes |
private void createReportingSection(Composite parent) { FormToolkit toolkit = super.getToolkit(); Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR); section.setDescription(TsconfigEditorMessages.OutputPage_ReportingSection_desc); section.setText(TsconfigEditorMessages.OutputPage_ReportingSection_title); TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB); section.setLayoutData(data); Composite body = createBody(section); createCheckbox(body, TsconfigEditorMessages.OutputPage_diagnostics_label, new JSONPath("compilerOptions.diagnostics")); createCheckbox(body, TsconfigEditorMessages.OutputPage_pretty_label, new JSONPath("compilerOptions.pretty")); createCheckbox(body, TsconfigEditorMessages.OutputPage_traceResolution_label, new JSONPath("compilerOptions.traceResolution")); createCheckbox(body, TsconfigEditorMessages.OutputPage_listEmittedFiles_label, new JSONPath("compilerOptions.listEmittedFiles")); }
Example 5
Source File: FormHelper.java From tlaplus with MIT License | 6 votes |
/** * Constructs a section and returns a section client composite * * the section layout is TableWrapLayout * * * @param parent parent container for the section * @param title title of the section * @param description description of the section * @param toolkit toolkit to create the composite * @param sectionFlags parameters of the section * @param expansionListener * @return a section client (the content container of the section) */ public static Section createSectionComposite(Composite parent, String title, String description, FormToolkit toolkit, int sectionFlags, IExpansionListener expansionListener) { final Section section = toolkit.createSection(parent, sectionFlags); section.setData(SECTION_IS_NOT_SPACE_GRABBING, new Object()); section.setText(title); section.setDescription(description); if (expansionListener != null) { section.addExpansionListener(expansionListener); } // create section client Composite sectionClient = toolkit.createComposite(section); TableWrapLayout layout = new TableWrapLayout(); layout.numColumns = 1; sectionClient.setLayout(layout); section.setClient(sectionClient); // draw flat borders toolkit.paintBordersFor(sectionClient); return section; }
Example 6
Source File: ConstraintEditionControl.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
private void createConstraintDescriptionSection(Composite parent, DataBindingContext ctx) { Section section = formPage.getToolkit().createSection(parent, Section.EXPANDED); section.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create()); section.setLayout(GridLayoutFactory.fillDefaults().create()); section.setText(Messages.description); Composite client = formPage.getToolkit().createComposite(section); client.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create()); client.setLayout(GridLayoutFactory.fillDefaults().margins(10, 10).create()); IObservableValue descriptionObservable = EMFObservables.observeDetailValue(Realm.getDefault(), selectedConstraintObservable, BusinessDataModelPackage.Literals.UNIQUE_CONSTRAINT__DESCRIPTION); new TextAreaWidget.Builder() .widthHint(500) .heightHint(70) .bindTo(descriptionObservable) .inContext(ctx) .adapt(formPage.getToolkit()) .createIn(client); section.setClient(client); }
Example 7
Source File: ConfigurationFormToolkit.java From neoscada with Eclipse Public License 1.0 | 5 votes |
public void createListSection ( final ScrolledForm form, final ConfigurationEditorInput input, final String attribute, final String label, final String delimiter, final String pattern ) { final IObservableList list = StringSplitListObservable.observeString ( Observables.observeMapEntry ( input.getDataMap (), attribute, String.class ), delimiter, pattern ); // section final Section section = this.toolkit.createSection ( form.getBody (), ExpandableComposite.TITLE_BAR ); section.setText ( label ); final Composite client = this.toolkit.createComposite ( section, SWT.NONE ); section.setClient ( client ); this.toolkit.paintBordersFor ( client ); client.setLayout ( new GridLayout ( 1, true ) ); final GridData gd = new GridData ( GridData.FILL_BOTH ); gd.horizontalSpan = 2; section.setLayoutData ( gd ); // fields final ListViewer viewer = new ListViewer ( client ); viewer.setContentProvider ( new ObservableListContentProvider () ); viewer.setInput ( list ); viewer.getControl ().setLayoutData ( new GridData ( GridData.FILL_BOTH ) ); viewer.setSorter ( new ViewerSorter () ); }
Example 8
Source File: CamelDependenciesEditor.java From tesb-studio-se with Apache License 2.0 | 5 votes |
private CamelDependenciesPanel createTableViewer(Composite parent, FormToolkit toolkit, String title, String type) { Section section = toolkit.createSection(parent, Section.TITLE_BAR); section.setText(title); final CamelDependenciesPanel c = (type == ManifestItem.BUNDLE_CLASSPATH) ? new CheckedCamelDependenciesPanel(section, type, isReadOnly(), this, this) : new CamelDependenciesPanel(section, type, isReadOnly(), this, this); section.setClient(c); toolkit.adapt(c); return c; }
Example 9
Source File: ConfigurationFormToolkit.java From neoscada with Eclipse Public License 1.0 | 5 votes |
public Composite createStandardSection ( final Composite parent, final String sectionLabel, final boolean fillVeritcal ) { final Section section = this.toolkit.createSection ( parent, sectionLabel != null ? ExpandableComposite.TITLE_BAR : ExpandableComposite.NO_TITLE ); if ( sectionLabel != null ) { section.setText ( sectionLabel ); } final Composite client = createStandardComposite ( section ); section.setClient ( client ); client.setLayout ( new GridLayout ( 3, false ) ); section.setLayoutData ( new GridData ( GridData.FILL, GridData.BEGINNING, true, fillVeritcal ) ); return client; }
Example 10
Source File: OutputPage.java From typescript.java with MIT License | 5 votes |
private void createJSXSection(Composite parent) { FormToolkit toolkit = super.getToolkit(); Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR); section.setDescription(TsconfigEditorMessages.OutputPage_JSXSection_desc); section.setText(TsconfigEditorMessages.OutputPage_JSXSection_title); TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB); section.setLayoutData(data); Composite body = createBody(section); CCombo jsxCombo = createCombo(body, TsconfigEditorMessages.OutputPage_jsx_label, new JSONPath("compilerOptions.jsx"), new String[] { "", "preserve", "react" }); Text reactNamespaceText = createText(body, TsconfigEditorMessages.OutputPage_reactNamespace_label, new JSONPath("compilerOptions.reactNamespace"), null, "jsxFactory"); }
Example 11
Source File: AggregatorPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * */ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) { Section propertiesSection = widgetFactory.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED); propertiesSection.setText(EipMessages.AggregatorPropertiesEditionPart_PropertiesGroupLabel); GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL); propertiesSectionData.horizontalSpan = 3; propertiesSection.setLayoutData(propertiesSectionData); Composite propertiesGroup = widgetFactory.createComposite(propertiesSection); GridLayout propertiesGroupLayout = new GridLayout(); propertiesGroupLayout.numColumns = 3; propertiesGroup.setLayout(propertiesGroupLayout); propertiesSection.setClient(propertiesGroup); return propertiesGroup; }
Example 12
Source File: IndexControl.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
private void createIndexEditionSection(Composite parent, DataBindingContext ctx) { Section section = formPage.getToolkit().createSection(parent, Section.EXPANDED); section.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); section.setLayout(GridLayoutFactory.fillDefaults().create()); section.setText(Messages.attributes); indexEditionControl = new IndexEditionControl(section, formPage, ctx, selectedIndexObservable, actualsFieldsObservable); section.setClient(indexEditionControl); }
Example 13
Source File: RouterPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * */ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) { Section propertiesSection = widgetFactory.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED); propertiesSection.setText(EipMessages.RouterPropertiesEditionPart_PropertiesGroupLabel); GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL); propertiesSectionData.horizontalSpan = 3; propertiesSection.setLayoutData(propertiesSectionData); Composite propertiesGroup = widgetFactory.createComposite(propertiesSection); GridLayout propertiesGroupLayout = new GridLayout(); propertiesGroupLayout.numColumns = 3; propertiesGroup.setLayout(propertiesGroupLayout); propertiesSection.setClient(propertiesGroup); return propertiesGroup; }
Example 14
Source File: InvocableEndpointPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * */ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) { Section propertiesSection = widgetFactory.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED); propertiesSection.setText(EipMessages.InvocableEndpointPropertiesEditionPart_PropertiesGroupLabel); GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL); propertiesSectionData.horizontalSpan = 3; propertiesSection.setLayoutData(propertiesSectionData); Composite propertiesGroup = widgetFactory.createComposite(propertiesSection); GridLayout propertiesGroupLayout = new GridLayout(); propertiesGroupLayout.numColumns = 3; propertiesGroup.setLayout(propertiesGroupLayout); propertiesSection.setClient(propertiesGroup); return propertiesGroup; }
Example 15
Source File: ICETableComponentSectionPart.java From ice with Eclipse Public License 1.0 | 5 votes |
/** * <p> * This operation reads the TableComponent assigned to this SectionPart and * renders the view of that data for the user. * </p> * */ public void renderSection() { // Local Declarations Section section = getSection(); // Add the main description and title to the section section.setDescription(tableComponent.getDescription()); section.setText(tableComponent.getName()); // setup the composite given the IManagedForm (parentForm) // and the section of this sectionPart. sectionClient = parentForm.getToolkit().createComposite(section); // Set the layout to have three columns. // Sets the table to take up one column, and the // add and delete buttons take the next column. sectionClient.setLayout(new GridLayout(2, false)); // Setup the tableComponentViewer and buttons this.setupTableViewer(); this.setupButtons(); // Set an expansion listener in order to control the // sectionPart's visibility to the user. section.addExpansionListener(new ExpansionAdapter() { @Override public void expansionStateChanged(ExpansionEvent e) { parentForm.reflow(true); } }); // Add the sectionClient Composite to the sectionPart. section.setClient(sectionClient); return; }
Example 16
Source File: BusinessDataModelFormPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
private void createMavenArtifactPropertiesGroup(Composite parent, DataBindingContext ctx) { Section section = formPage.getToolkit().createSection(parent, Section.EXPANDED); section.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create()); section.setLayout(GridLayoutFactory.fillDefaults().create()); section.setText(Messages.mavenArtifactProperties); Composite client = formPage.getToolkit().createComposite(section); client.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create()); client.setLayout(GridLayoutFactory.fillDefaults().margins(5, 10).create()); new TextWidget.Builder() .withLabel(Messages.groupId) .labelAbove() .fill() .withTootltip(Messages.mavenArtifactPropertiesHint) .grabHorizontalSpace() .bindTo(EMFObservables.observeDetailValue(Realm.getDefault(), formPage.observeWorkingCopy(), BusinessDataModelPackage.Literals.BUSINESS_OBJECT_MODEL__GROUP_ID)) .withTargetToModelStrategy(UpdateStrategyFactory.updateValueStrategy() .withValidator(new GroupIdValidator(formPage.getRepositoryAccessor().getWorkspace())) .create()) .inContext(ctx) .adapt(formPage.getToolkit()) .createIn(client); formPage.getToolkit().createLabel(client, ""); section.setClient(client); }
Example 17
Source File: CommonGui.java From CodeCheckerEclipsePlugin with Eclipse Public License 1.0 | 4 votes |
/** * Creates the resolution method group, and the package directory inputs. * * @param toolkit * The toolkit to be used. * @return The encapsulating Section. */ private Section createConfigSection(FormToolkit toolkit) { final Section packageConfigSection = toolkit.createSection(form.getBody(), ExpandableComposite.SHORT_TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED); packageConfigSection.setEnabled(true); final Composite client = toolkit.createComposite(packageConfigSection); client.setLayout(new GridLayout(FORM_COLUMNS, false)); packageConfigSection.setClient(client); packageConfigSection.setText("Configuration"); Group resolutionType = new Group(client, SWT.NULL); resolutionType.setText("CodeChecker resolution method."); GridLayoutFactory.fillDefaults().numColumns(1).applyTo(resolutionType); GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.CENTER) .span(FORM_COLUMNS, FORM_ONE_ROW).applyTo(resolutionType); resolutionType.setBackground(client.getBackground()); ccDirClient = toolkit.createComposite(client); GridLayoutFactory.fillDefaults().numColumns(FORM_COLUMNS).applyTo(ccDirClient); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(FORM_COLUMNS, FORM_ONE_ROW) .applyTo(ccDirClient); ccDirClient.setBackground(client.getBackground()); pathCc = toolkit.createButton(resolutionType, "Search in PATH", SWT.RADIO); pathCc.setData(ResolutionMethodTypes.PATH); pathCc.addSelectionListener(new PackageResolutionSelectionAdapter()); preBuiltCc = toolkit.createButton(resolutionType, "Pre built package", SWT.RADIO); preBuiltCc.setData(ResolutionMethodTypes.PRE); preBuiltCc.addSelectionListener(new PackageResolutionSelectionAdapter()); codeCheckerDirectoryField = addTextField(toolkit, ccDirClient, CC_BIN_LABEL, ""); codeCheckerDirectoryField.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { locateCodeChecker(); refreshDisplay(); } }); Button codeCheckerDirectoryFieldBrowse = new Button(ccDirClient, SWT.PUSH); codeCheckerDirectoryFieldBrowse.setText(BROSWE); codeCheckerDirectoryFieldBrowse.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { FileDialog dlg = new FileDialog(client.getShell()); dlg.setFilterPath(codeCheckerDirectoryField.getText()); dlg.setText("Browse CodeChecker binary"); String dir = dlg.open(); if (dir != null) { codeCheckerDirectoryField.setText(dir); locateCodeChecker(); refreshDisplay(); } } }); changeDirectoryInputs(); return packageConfigSection; }
Example 18
Source File: OpenMiniatureViewAction.java From olca-app with Mozilla Public License 2.0 | 4 votes |
@Override protected Control createContents(final Composite parent) { FormToolkit toolkit = new FormToolkit(Display.getCurrent()); ScrolledForm scrolledForm = toolkit.createScrolledForm(parent); Composite body = scrolledForm.getBody(); body.setLayout(new FillLayout()); toolkit.paintBordersFor(body); SashForm sashForm = new SashForm(body, SWT.VERTICAL); toolkit.adapt(sashForm, true, true); Section categorySection = toolkit .createSection(sashForm, ExpandableComposite.NO_TITLE | ExpandableComposite.EXPANDED); categorySection.setText(""); Composite composite = toolkit.createComposite(categorySection, SWT.NONE); composite.setLayout(new GridLayout()); categorySection.setClient(composite); toolkit.paintBordersFor(composite); final Scale scale = new Scale(composite, SWT.NONE); scale.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); final double[] values = GraphConfig.ZOOM_LEVELS; final int increment = 100 / (values.length - 1); scale.setIncrement(increment); scale.setMinimum(0); scale.setMaximum(100); Controls.onSelect(scale, (e) -> { zoomManager.setZoom(values[scale.getSelection() / increment]); }); scale.setSelection(increment * (values.length - 1) / 2); Canvas canvas = new Canvas(composite, SWT.BORDER); canvas.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); lws = new LightweightSystem(canvas); thumbnail = new ScrollableThumbnail(port); thumbnail.setSource(figure); lws.setContents(thumbnail); disposeListener = new DisposeListener() { @Override public void widgetDisposed(final DisposeEvent e) { if (thumbnail != null) { thumbnail.deactivate(); thumbnail = null; } if (control != null && !control.isDisposed()) control.removeDisposeListener(disposeListener); close(); } }; control.addDisposeListener(disposeListener); return super.createContents(parent); }
Example 19
Source File: OverviewPage.java From typescript.java with MIT License | 4 votes |
private void createValidatingSection(Composite parent) { FormToolkit toolkit = super.getToolkit(); Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR); section.setDescription(TsconfigEditorMessages.OverviewPage_ValidatingSection_desc); section.setText(TsconfigEditorMessages.OverviewPage_ValidatingSection_title); TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB); section.setLayoutData(data); Composite body = createBody(section); createCheckbox(body, TsconfigEditorMessages.OverviewPage_noImplicitAny_label, new JSONPath("compilerOptions.noImplicitAny")); createCheckbox(body, TsconfigEditorMessages.OverviewPage_noImplicitThis_label, new JSONPath("compilerOptions.noImplicitThis")); createCheckbox(body, TsconfigEditorMessages.OverviewPage_noUnusedLocals_label, new JSONPath("compilerOptions.noUnusedLocals")); createCheckbox(body, TsconfigEditorMessages.OverviewPage_noUnusedParameters_label, new JSONPath("compilerOptions.noUnusedParameters")); createCheckbox(body, TsconfigEditorMessages.OverviewPage_skipDefaultLibCheck_label, new JSONPath("compilerOptions.skipDefaultLibCheck")); createCheckbox(body, TsconfigEditorMessages.OverviewPage_skipLibCheck_label, new JSONPath("compilerOptions.skipLibCheck")); createCheckbox(body, TsconfigEditorMessages.OverviewPage_suppressExcessPropertyErrors_label, new JSONPath("compilerOptions.suppressExcessPropertyErrors")); createCheckbox(body, TsconfigEditorMessages.OverviewPage_suppressImplicitAnyIndexErrors_label, new JSONPath("compilerOptions.suppressImplicitAnyIndexErrors")); createCheckbox(body, TsconfigEditorMessages.OverviewPage_allowUnusedLabels_label, new JSONPath("compilerOptions.allowUnusedLabels")); createCheckbox(body, TsconfigEditorMessages.OverviewPage_noImplicitReturns_label, new JSONPath("compilerOptions.noImplicitReturns")); createCheckbox(body, TsconfigEditorMessages.OverviewPage_noFallthroughCasesInSwitch_label, new JSONPath("compilerOptions.noFallthroughCasesInSwitch")); createCheckbox(body, TsconfigEditorMessages.OverviewPage_allowUnreachableCode_label, new JSONPath("compilerOptions.allowUnreachableCode")); createCheckbox(body, TsconfigEditorMessages.OverviewPage_forceConsistentCasingInFileNames_label, new JSONPath("compilerOptions.forceConsistentCasingInFileNames")); createCheckbox(body, TsconfigEditorMessages.OverviewPage_allowSyntheticDefaultImports_label, new JSONPath("compilerOptions.allowSyntheticDefaultImports")); createCheckbox(body, TsconfigEditorMessages.OverviewPage_strictNullChecks_label, new JSONPath("compilerOptions.strictNullChecks")); }
Example 20
Source File: GeneralSectionBuilder.java From APICloud-Studio with GNU General Public License v3.0 | 4 votes |
/** * @wbp.parser.entryPoint */ @Override public void buildUI() { Section generalSection = formToolkit.createSection(composite, Section.TWISTIE | Section.TITLE_BAR); GridData gd_generalSection = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1); gd_generalSection.heightHint = 240; generalSection.setLayoutData(gd_generalSection); formToolkit.paintBordersFor(generalSection); generalSection.setText(Messages.BASICATTRIBUTE); generalSection.setExpanded(true); Composite generalComposite = new Composite(generalSection, SWT.NONE); formToolkit.adapt(generalComposite); formToolkit.paintBordersFor(generalComposite); generalSection.setClient(generalComposite); generalComposite.setLayout(new GridLayout(4, false)); FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault() .getFieldDecoration(FieldDecorationRegistry.DEC_ERROR); String decorationDescription = Messages.NULLERROR; Image decorationImage = fieldDecoration.getImage(); Label appNameLabel = formToolkit.createLabel(generalComposite, Messages.APPNAME, SWT.NONE); appNameLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); appNameText = formToolkit.createText(generalComposite, StringUtils.EMPTY_STRING, SWT.NONE); appNameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); appNameDecoration = createTextErrorDecoration(appNameText, decorationDescription, decorationImage); Label lblNewLabel_1 = formToolkit.createLabel(generalComposite, Messages.AUTHERNAME, SWT.NONE); lblNewLabel_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); authorNameText = formToolkit.createText(generalComposite, StringUtils.EMPTY_STRING, SWT.NONE); authorNameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); authorNameDecoration = createTextErrorDecoration(authorNameText, decorationDescription, decorationImage); Label lblNewLabel_2 = formToolkit.createLabel(generalComposite,Messages.AUTHEREMAIL, SWT.NONE); lblNewLabel_2.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); authorEmailText = formToolkit.createText(generalComposite, StringUtils.EMPTY_STRING, SWT.NONE); authorEmailText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); authorEmailDecoration = createTextErrorDecoration(authorEmailText, decorationDescription, decorationImage); Label lblNewLabel_3 = formToolkit.createLabel(generalComposite,Messages.AUTHORIZEDCONNECTION, SWT.NONE); lblNewLabel_3.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); authorHrefText = formToolkit.createText(generalComposite, StringUtils.EMPTY_STRING, SWT.NONE); authorHrefText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); authorHrefDecoration = createTextErrorDecoration(authorHrefText, decorationDescription, decorationImage); Label lblNewLabel_4 = formToolkit.createLabel(generalComposite,Messages.STARTPAGE, SWT.NONE); lblNewLabel_4.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1)); ContentSrcText = formToolkit.createText(generalComposite, StringUtils.EMPTY_STRING, SWT.NONE); ContentSrcText.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1)); ContentSrcDecoration = createTextErrorDecoration(ContentSrcText, decorationDescription, decorationImage); Label lblNewLabel_6 = new Label(generalComposite, SWT.NONE); lblNewLabel_6.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); formToolkit.adapt(lblNewLabel_6, true, true); lblNewLabel_6.setText("\u63CF\u8FF0"); descriptionText = new Text(generalComposite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL | SWT.MULTI); GridData gd_descriptionText = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1); gd_descriptionText.heightHint = 49; descriptionText.setLayoutData(gd_descriptionText); formToolkit.adapt(descriptionText, true, true); }