Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,7 @@ private void createProjectTargetSelection(Composite container)
{
Composite mainComposite = new Composite(container, SWT.NONE);
mainComposite.setLayout(new GridLayout(2, false));
GridData gridData = new GridData(GridData.FILL_BOTH);
gridData.horizontalSpan = 20;
gridData.verticalSpan = 5;
mainComposite.setLayoutData(gridData);
mainComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
Label label = new Label(mainComposite, SWT.NONE);
label.setText(Messages.NewProjectTargetSelection_Label);
EspConfigParser parser = new EspConfigParser();
Expand All @@ -91,7 +88,7 @@ private void createProjectNameGroup(Composite container)
{
Composite mainComposite = new Composite(container, SWT.NONE);
mainComposite.setLayout(new GridLayout());
GridData gridData = new GridData(GridData.FILL_BOTH);
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
gridData.horizontalSpan = 20;
gridData.verticalSpan = 5;

Comment on lines +91 to 94

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Replace fixed spans with fill-based layout

Using fixed span values (20, 5) can cause layout issues when resizing the window. Consider using a fill-based approach instead.

-		GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
-		gridData.horizontalSpan = 20;
-		gridData.verticalSpan = 5;
+		GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
gridData.horizontalSpan = 20;
gridData.verticalSpan = 5;
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);

Expand All @@ -106,7 +103,7 @@ private void createProjectNameGroup(Composite container)
projectNameLabel.setText(IDEWorkbenchMessages.WizardNewProjectCreationPage_nameLabel);

projectNameField = new Text(projectNameGroup, SWT.BORDER);
projectNameField.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
projectNameField.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
projectNameField.addModifyListener(new ModifyListener()
{
@Override
Expand Down