This is an automated email from the ASF dual-hosted git repository.

hansva pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/main by this push:
     new 6a2807ff11 cleanup a couple of dialogs, fixes #6415 (#6416)
6a2807ff11 is described below

commit 6a2807ff1135af5ad24d661222d844a8f70fab82
Author: Hans Van Akelyen <[email protected]>
AuthorDate: Mon Jan 19 08:20:12 2026 +0100

    cleanup a couple of dialogs, fixes #6415 (#6416)
---
 .../transforms/excelinput/ExcelInputDialog.java    | 29 ++-------
 .../excelwriter/ExcelWriterTransformDialog.java    | 69 ++++++++--------------
 .../fileinput/text/TextFileInputDialog.java        | 34 +++--------
 .../textfileoutput/TextFileOutputDialog.java       | 57 +++++++-----------
 4 files changed, 59 insertions(+), 130 deletions(-)

diff --git 
a/plugins/transforms/excel/src/main/java/org/apache/hop/pipeline/transforms/excelinput/ExcelInputDialog.java
 
b/plugins/transforms/excel/src/main/java/org/apache/hop/pipeline/transforms/excelinput/ExcelInputDialog.java
index 653dfb4d4a..b49fa2fcd6 100644
--- 
a/plugins/transforms/excel/src/main/java/org/apache/hop/pipeline/transforms/excelinput/ExcelInputDialog.java
+++ 
b/plugins/transforms/excel/src/main/java/org/apache/hop/pipeline/transforms/excelinput/ExcelInputDialog.java
@@ -818,22 +818,10 @@ public class ExcelInputDialog extends BaseTransformDialog 
{
           setFlags();
         });
 
-    Group wManualSchemaDefinition = new Group(wFieldsComp, SWT.SHADOW_NONE);
-    PropsUi.setLook(wManualSchemaDefinition);
-    wManualSchemaDefinition.setText(
-        BaseMessages.getString(PKG, 
"ExcelInputDialog.ManualSchemaDefinition.Label"));
-
-    FormLayout manualSchemaDefinitionLayout = new FormLayout();
-    manualSchemaDefinitionLayout.marginWidth = 10;
-    manualSchemaDefinitionLayout.marginHeight = 10;
-    wManualSchemaDefinition.setLayout(manualSchemaDefinitionLayout);
-
-    wbGetFields = new Button(wManualSchemaDefinition, SWT.PUSH | SWT.CENTER);
+    wbGetFields = new Button(wFieldsComp, SWT.PUSH | SWT.CENTER);
     PropsUi.setLook(wbGetFields);
     wbGetFields.setText(BaseMessages.getString(PKG, 
"ExcelInputDialog.GetFields.Button"));
 
-    setButtonPositions(new Button[] {wbGetFields}, margin, null);
-
     final int FieldsRows = input.getFields().size();
     int fieldsWidth = 600;
     int fieldsHeight = 150;
@@ -885,7 +873,7 @@ public class ExcelInputDialog extends BaseTransformDialog {
     wFields =
         new TableView(
             variables,
-            wManualSchemaDefinition,
+            wFieldsComp,
             SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER,
             colinf,
             FieldsRows,
@@ -896,9 +884,9 @@ public class ExcelInputDialog extends BaseTransformDialog {
 
     FormData fdFields = new FormData();
     fdFields.left = new FormAttachment(0, 0);
-    fdFields.top = new FormAttachment(0, 0);
+    fdFields.top = new FormAttachment(wIgnoreFields, margin);
     fdFields.right = new FormAttachment(100, 0);
-    fdFields.bottom = new FormAttachment(wbGetFields, -margin);
+    fdFields.bottom = new FormAttachment(wbGetFields, -margin * 2);
     wFields.setLayoutData(fdFields);
 
     FormData fdFieldsComp = new FormData();
@@ -908,14 +896,9 @@ public class ExcelInputDialog extends BaseTransformDialog {
     fdFieldsComp.bottom = new FormAttachment(100, 0);
     wFieldsComp.setLayoutData(fdFieldsComp);
 
-    wFieldsComp.layout();
+    setButtonPositions(new Button[] {wbGetFields}, margin, null);
 
-    FormData fdManualSchemaDefinitionComp = new FormData();
-    fdManualSchemaDefinitionComp.left = new FormAttachment(0, 0);
-    fdManualSchemaDefinitionComp.top = new FormAttachment(wIgnoreFields, 0);
-    fdManualSchemaDefinitionComp.right = new FormAttachment(100, 0);
-    fdManualSchemaDefinitionComp.bottom = new FormAttachment(100, 0);
-    wManualSchemaDefinition.setLayoutData(fdManualSchemaDefinitionComp);
+    wFieldsComp.layout();
 
     wFieldsTab.setControl(wFieldsComp);
     PropsUi.setLook(wFieldsComp);
diff --git 
a/plugins/transforms/excel/src/main/java/org/apache/hop/pipeline/transforms/excelwriter/ExcelWriterTransformDialog.java
 
b/plugins/transforms/excel/src/main/java/org/apache/hop/pipeline/transforms/excelwriter/ExcelWriterTransformDialog.java
index 47673e1e4e..d3d370671f 100644
--- 
a/plugins/transforms/excel/src/main/java/org/apache/hop/pipeline/transforms/excelwriter/ExcelWriterTransformDialog.java
+++ 
b/plugins/transforms/excel/src/main/java/org/apache/hop/pipeline/transforms/excelwriter/ExcelWriterTransformDialog.java
@@ -1352,39 +1352,6 @@ public class ExcelWriterTransformDialog extends 
BaseTransformDialog {
     PropsUi.setLook(wFieldsComp);
     wFieldsComp.setLayout(fieldLayout);
 
-    Group fieldGroup = new Group(wFieldsComp, SWT.SHADOW_NONE);
-    PropsUi.setLook(fieldGroup);
-    fieldGroup.setText(
-        BaseMessages.getString(PKG, 
"ExcelWriterDialog.ManualSchemaDefinition.Label"));
-
-    FormLayout fieldGroupGroupLayout = new FormLayout();
-    fieldGroupGroupLayout.marginWidth = 10;
-    fieldGroupGroupLayout.marginHeight = 10;
-    fieldGroup.setLayout(fieldGroupGroupLayout);
-
-    wGet = new Button(fieldGroup, SWT.PUSH);
-    wGet.setText(BaseMessages.getString(PKG, "System.Button.GetFields"));
-    wGet.setToolTipText(BaseMessages.getString(PKG, 
"System.Tooltip.GetFields"));
-
-    wMinWidth = new Button(fieldGroup, SWT.PUSH);
-    wMinWidth.setText(BaseMessages.getString(PKG, 
"ExcelWriterDialog.MinWidth.Button"));
-    wMinWidth.setToolTipText(BaseMessages.getString(PKG, 
"ExcelWriterDialog.MinWidth.Tooltip"));
-
-    setButtonPositions(new Button[] {wGet, wMinWidth}, margin, null);
-
-    final int FieldsRows = input.getOutputFields().size();
-
-    // Prepare a list of possible formats, filtering reserved internal formats 
away
-
-    List<String> allFormats = Arrays.asList(BuiltinFormats.getAll());
-    List<String> nonReservedFormats = new ArrayList<>(allFormats.size());
-
-    for (String format : allFormats) {
-      if (!format.startsWith("reserved")) {
-        nonReservedFormats.add(format);
-      }
-    }
-
     wSchemaDefinition =
         new MetaSelectionLine<>(
             variables,
@@ -1438,6 +1405,27 @@ public class ExcelWriterTransformDialog extends 
BaseTransformDialog {
           enableIgnorefiedls();
         });
 
+    wGet = new Button(wFieldsComp, SWT.PUSH);
+    wGet.setText(BaseMessages.getString(PKG, "System.Button.GetFields"));
+    wGet.setToolTipText(BaseMessages.getString(PKG, 
"System.Tooltip.GetFields"));
+
+    wMinWidth = new Button(wFieldsComp, SWT.PUSH);
+    wMinWidth.setText(BaseMessages.getString(PKG, 
"ExcelWriterDialog.MinWidth.Button"));
+    wMinWidth.setToolTipText(BaseMessages.getString(PKG, 
"ExcelWriterDialog.MinWidth.Tooltip"));
+
+    final int FieldsRows = input.getOutputFields().size();
+
+    // Prepare a list of possible formats, filtering reserved internal formats 
away
+
+    List<String> allFormats = Arrays.asList(BuiltinFormats.getAll());
+    List<String> nonReservedFormats = new ArrayList<>(allFormats.size());
+
+    for (String format : allFormats) {
+      if (!format.startsWith("reserved")) {
+        nonReservedFormats.add(format);
+      }
+    }
+
     Collections.sort(nonReservedFormats);
     String[] formats = nonReservedFormats.toArray(new String[0]);
 
@@ -1490,7 +1478,7 @@ public class ExcelWriterTransformDialog extends 
BaseTransformDialog {
     wFields =
         new TableView(
             variables,
-            fieldGroup,
+            wFieldsComp,
             SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI,
             colinf,
             FieldsRows,
@@ -1499,9 +1487,9 @@ public class ExcelWriterTransformDialog extends 
BaseTransformDialog {
 
     FormData fdFields = new FormData();
     fdFields.left = new FormAttachment(0, 0);
-    fdFields.top = new FormAttachment(0, 0);
+    fdFields.top = new FormAttachment(wIgnoreFields, margin);
     fdFields.right = new FormAttachment(100, 0);
-    fdFields.bottom = new FormAttachment(wGet, -margin);
+    fdFields.bottom = new FormAttachment(wGet, -margin * 2);
     wFields.setLayoutData(fdFields);
     wFields.addModifyListener(lsMod);
 
@@ -1526,13 +1514,6 @@ public class ExcelWriterTransformDialog extends 
BaseTransformDialog {
         };
     new Thread(runnable).start();
 
-    FormData fdFieldGroup = new FormData();
-    fdFieldGroup.left = new FormAttachment(0, margin);
-    fdFieldGroup.top = new FormAttachment(wIgnoreFields, margin);
-    fdFieldGroup.bottom = new FormAttachment(100, 0);
-    fdFieldGroup.right = new FormAttachment(100, -margin);
-    fieldGroup.setLayoutData(fdFieldGroup);
-
     FormData fdFieldComp = new FormData();
     fdFieldComp.left = new FormAttachment(0, 0);
     fdFieldComp.top = new FormAttachment(0, 0);
@@ -1540,6 +1521,8 @@ public class ExcelWriterTransformDialog extends 
BaseTransformDialog {
     fdFieldComp.bottom = new FormAttachment(100, 0);
     wFieldsComp.setLayoutData(fdFieldComp);
 
+    setButtonPositions(new Button[] {wGet, wMinWidth}, margin, null);
+
     wFieldsComp.layout();
     wFieldTab.setControl(wFieldsComp);
 
diff --git 
a/plugins/transforms/textfile/src/main/java/org/apache/hop/pipeline/transforms/fileinput/text/TextFileInputDialog.java
 
b/plugins/transforms/textfile/src/main/java/org/apache/hop/pipeline/transforms/fileinput/text/TextFileInputDialog.java
index beeef82bb1..773fa00d0e 100644
--- 
a/plugins/transforms/textfile/src/main/java/org/apache/hop/pipeline/transforms/fileinput/text/TextFileInputDialog.java
+++ 
b/plugins/transforms/textfile/src/main/java/org/apache/hop/pipeline/transforms/fileinput/text/TextFileInputDialog.java
@@ -2044,24 +2044,10 @@ public class TextFileInputDialog extends 
BaseTransformDialog
     fdIgnoreFields.top = new FormAttachment(wlIgnoreFields, 0, SWT.CENTER);
     wIgnoreFields.setLayoutData(fdIgnoreFields);
 
-    Group wManualSchemaDefinition = new Group(wFieldsComp, SWT.SHADOW_NONE);
-    PropsUi.setLook(wManualSchemaDefinition);
-    wManualSchemaDefinition.setText(
-        BaseMessages.getString(PKG, 
"TextFileInputDialog.ManualSchemaDefinition.Label"));
-
-    FormLayout manualSchemaDefinitionLayout = new FormLayout();
-    manualSchemaDefinitionLayout.marginWidth = 10;
-    manualSchemaDefinitionLayout.marginHeight = 10;
-    wManualSchemaDefinition.setLayout(manualSchemaDefinitionLayout);
-
-    wGet = new Button(wManualSchemaDefinition, SWT.PUSH);
+    wGet = new Button(wFieldsComp, SWT.PUSH);
     wGet.setText(BaseMessages.getString(PKG, "System.Button.GetFields"));
-    fdGet = new FormData();
-    fdGet.left = new FormAttachment(50, 0);
-    fdGet.bottom = new FormAttachment(100, 0);
-    wGet.setLayoutData(fdGet);
 
-    wMinWidth = new Button(wManualSchemaDefinition, SWT.PUSH);
+    wMinWidth = new Button(wFieldsComp, SWT.PUSH);
     wMinWidth.setText(BaseMessages.getString(PKG, 
"TextFileInputDialog.MinWidth.Button"));
     wMinWidth.setToolTipText(BaseMessages.getString(PKG, 
"TextFileInputDialog.MinWidth.Tooltip"));
     wMinWidth.addSelectionListener(
@@ -2071,7 +2057,6 @@ public class TextFileInputDialog extends 
BaseTransformDialog
             input.setChanged();
           }
         });
-    setButtonPositions(new Button[] {wGet, wMinWidth}, margin, null);
 
     final int FieldsRows = input.inputFields.length;
 
@@ -2142,7 +2127,7 @@ public class TextFileInputDialog extends 
BaseTransformDialog
     wFields =
         new TableView(
             variables,
-            wManualSchemaDefinition,
+            wFieldsComp,
             SWT.FULL_SELECTION | SWT.MULTI,
             colinf,
             FieldsRows,
@@ -2151,18 +2136,11 @@ public class TextFileInputDialog extends 
BaseTransformDialog
 
     FormData fdFields = new FormData();
     fdFields.left = new FormAttachment(0, 0);
-    fdFields.top = new FormAttachment(0, 0);
+    fdFields.top = new FormAttachment(wIgnoreFields, margin);
     fdFields.right = new FormAttachment(100, 0);
-    fdFields.bottom = new FormAttachment(wGet, -margin);
+    fdFields.bottom = new FormAttachment(wGet, -margin * 2);
     wFields.setLayoutData(fdFields);
 
-    FormData fdManualSchemaDefinitionComp = new FormData();
-    fdManualSchemaDefinitionComp.left = new FormAttachment(0, 0);
-    fdManualSchemaDefinitionComp.top = new FormAttachment(wIgnoreFields, 0);
-    fdManualSchemaDefinitionComp.right = new FormAttachment(100, 0);
-    fdManualSchemaDefinitionComp.bottom = new FormAttachment(100, 0);
-    wManualSchemaDefinition.setLayoutData(fdManualSchemaDefinitionComp);
-
     FormData fdFieldsComp = new FormData();
     fdFieldsComp.left = new FormAttachment(0, 0);
     fdFieldsComp.top = new FormAttachment(0, 0);
@@ -2170,6 +2148,8 @@ public class TextFileInputDialog extends 
BaseTransformDialog
     fdFieldsComp.bottom = new FormAttachment(100, 0);
     wFieldsComp.setLayoutData(fdFieldsComp);
 
+    setButtonPositions(new Button[] {wGet, wMinWidth}, margin, null);
+
     wFieldsComp.layout();
     wFieldsTab.setControl(wFieldsComp);
   }
diff --git 
a/plugins/transforms/textfile/src/main/java/org/apache/hop/pipeline/transforms/textfileoutput/TextFileOutputDialog.java
 
b/plugins/transforms/textfile/src/main/java/org/apache/hop/pipeline/transforms/textfileoutput/TextFileOutputDialog.java
index 1079e930df..391c9b1519 100644
--- 
a/plugins/transforms/textfile/src/main/java/org/apache/hop/pipeline/transforms/textfileoutput/TextFileOutputDialog.java
+++ 
b/plugins/transforms/textfile/src/main/java/org/apache/hop/pipeline/transforms/textfileoutput/TextFileOutputDialog.java
@@ -69,7 +69,6 @@ import org.eclipse.swt.layout.FormLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.TableItem;
@@ -1054,32 +1053,6 @@ public class TextFileOutputDialog extends 
BaseTransformDialog {
     PropsUi.setLook(wFieldsComp);
     wFieldsComp.setLayout(fieldsLayout);
 
-    Group fieldGroup = new Group(wFieldsComp, SWT.SHADOW_NONE);
-    PropsUi.setLook(fieldGroup);
-    fieldGroup.setText(
-        BaseMessages.getString(PKG, 
"TextFileOutputDialog.ManualSchemaDefinition.Label"));
-
-    FormLayout fieldGroupGroupLayout = new FormLayout();
-    fieldGroupGroupLayout.marginWidth = 10;
-    fieldGroupGroupLayout.marginHeight = 10;
-    fieldGroup.setLayout(fieldGroupGroupLayout);
-
-    wGet = new Button(fieldGroup, SWT.PUSH);
-    wGet.setText(BaseMessages.getString(PKG, "System.Button.GetFields"));
-    wGet.setToolTipText(BaseMessages.getString(PKG, 
"System.Tooltip.GetFields"));
-
-    Button wMinWidth = new Button(fieldGroup, SWT.PUSH);
-    wMinWidth.setText(BaseMessages.getString(PKG, 
"TextFileOutputDialog.MinWidth.Button"));
-    wMinWidth.setToolTipText(BaseMessages.getString(PKG, 
"TextFileOutputDialog.MinWidth.Tooltip"));
-    wMinWidth.addSelectionListener(
-        new SelectionAdapter() {
-          @Override
-          public void widgetSelected(SelectionEvent e) {
-            input.setChanged();
-          }
-        });
-    setButtonPositions(new Button[] {wGet, wMinWidth}, margin, null);
-
     wSchemaDefinition =
         new MetaSelectionLine<>(
             variables,
@@ -1124,6 +1097,21 @@ public class TextFileOutputDialog extends 
BaseTransformDialog {
     fdIgnoreFields.top = new FormAttachment(wlIgnoreFields, 0, SWT.CENTER);
     wIgnoreFields.setLayoutData(fdIgnoreFields);
 
+    wGet = new Button(wFieldsComp, SWT.PUSH);
+    wGet.setText(BaseMessages.getString(PKG, "System.Button.GetFields"));
+    wGet.setToolTipText(BaseMessages.getString(PKG, 
"System.Tooltip.GetFields"));
+
+    Button wMinWidth = new Button(wFieldsComp, SWT.PUSH);
+    wMinWidth.setText(BaseMessages.getString(PKG, 
"TextFileOutputDialog.MinWidth.Button"));
+    wMinWidth.setToolTipText(BaseMessages.getString(PKG, 
"TextFileOutputDialog.MinWidth.Tooltip"));
+    wMinWidth.addSelectionListener(
+        new SelectionAdapter() {
+          @Override
+          public void widgetSelected(SelectionEvent e) {
+            input.setChanged();
+          }
+        });
+
     wIgnoreFields.addSelectionListener(
         new SelectionAdapter() {
           @Override
@@ -1195,7 +1183,7 @@ public class TextFileOutputDialog extends 
BaseTransformDialog {
     wFields =
         new TableView(
             variables,
-            fieldGroup,
+            wFieldsComp,
             SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI,
             colinf,
             FieldsRows,
@@ -1204,9 +1192,9 @@ public class TextFileOutputDialog extends 
BaseTransformDialog {
 
     FormData fdFields = new FormData();
     fdFields.left = new FormAttachment(0, 0);
-    fdFields.top = new FormAttachment(0, 0);
+    fdFields.top = new FormAttachment(wIgnoreFields, margin);
     fdFields.right = new FormAttachment(100, 0);
-    fdFields.bottom = new FormAttachment(wGet, -margin);
+    fdFields.bottom = new FormAttachment(wGet, -margin * 2);
     wFields.setLayoutData(fdFields);
 
     //
@@ -1231,13 +1219,6 @@ public class TextFileOutputDialog extends 
BaseTransformDialog {
         };
     new Thread(runnable).start();
 
-    FormData fdFieldGroup = new FormData();
-    fdFieldGroup.left = new FormAttachment(0, margin);
-    fdFieldGroup.top = new FormAttachment(wIgnoreFields, margin);
-    fdFieldGroup.right = new FormAttachment(100, -margin);
-    fdFieldGroup.bottom = new FormAttachment(100, 0);
-    fieldGroup.setLayoutData(fdFieldGroup);
-
     FormData fdFieldsComp = new FormData();
     fdFieldsComp.left = new FormAttachment(0, 0);
     fdFieldsComp.top = new FormAttachment(0, 0);
@@ -1245,6 +1226,8 @@ public class TextFileOutputDialog extends 
BaseTransformDialog {
     fdFieldsComp.bottom = new FormAttachment(100, 0);
     wFieldsComp.setLayoutData(fdFieldsComp);
 
+    setButtonPositions(new Button[] {wGet, wMinWidth}, margin, null);
+
     wFieldsComp.layout();
     wFieldsTab.setControl(wFieldsComp);
 

Reply via email to