Apache Hop version?
2.20
Java version?
21
Operating system
Windows
What happened?
What happened?
In the Formula transform dialog (inside a pipeline), opening the formula editor multiple times causes the formula text area to collapse or resize inconsistently due to improper SashForm default weights.
When opening the formula editor dialog repeatedly:
- 1st open: The formula input area and bottom description pane open normally.
- 2nd open (after clicking OK and reopening): The formula input area opens partially (truncated/half-size), requiring manual resizing again.
- Subsequent opens: The cycle repeats.
Steps to Reproduce
- Create or open a pipeline in Hop GUI.
- Add a Formula transform and open it.
- Add a new row in the Fields table and click on the Formula cell to open the Formula Expression Editor dialog.
- Close the dialog (click OK/Cancel).
- Open the Formula Expression Editor again for the same row.
- Observe that the top text editor area has collapsed or hidden its text input box until the divider is manually dragged.
Suggested Fix / Root Cause
The issue is caused by the initial weight distribution in the right sash layout (rightSash.setWeights(new int[] {10, 80});), which gives too little initial vertical space to the upper text area and causes it to collapse on subsequent renders.
Adjusting the weights to allocate more proportion to the formula editor area resolves the collapse:
Files:
plugins/transforms/formula/src/main/java/org/apache/hop/pipeline/transforms/formula/editor/FormulaEditor.java
plugins/transforms/janino/src/main/java/org/apache/hop/pipeline/transforms/janino/editor/FormulaEditor.java
Change:
// Replace:
rightSash.setWeights(new int[] {10, 80});
// With:
rightSash.setWeights(new int[] {40, 60});
Results After Changing
Issue Priority
Priority: 3
Issue Component
Component: Hop Gui
Apache Hop version?
2.20
Java version?
21
Operating system
Windows
What happened?
What happened?
In the Formula transform dialog (inside a pipeline), opening the formula editor multiple times causes the formula text area to collapse or resize inconsistently due to improper
SashFormdefault weights.When opening the formula editor dialog repeatedly:
Steps to Reproduce
Suggested Fix / Root Cause
The issue is caused by the initial weight distribution in the right sash layout (
rightSash.setWeights(new int[] {10, 80});), which gives too little initial vertical space to the upper text area and causes it to collapse on subsequent renders.Adjusting the weights to allocate more proportion to the formula editor area resolves the collapse:
Files:
plugins/transforms/formula/src/main/java/org/apache/hop/pipeline/transforms/formula/editor/FormulaEditor.javaplugins/transforms/janino/src/main/java/org/apache/hop/pipeline/transforms/janino/editor/FormulaEditor.javaChange:
Results After Changing
Issue Priority
Priority: 3
Issue Component
Component: Hop Gui