Uploaded image for project: 'Apache Hop (Retired)'
  1. Apache Hop (Retired)
  2. HOP-2296

HopVfsFileDialog is unusable under windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.50
    • None

    Description

      1) TreeUtil.setOptimalWidthOnColumns try to process disposed widget when you click quickly

      org.eclipse.swt.SWTException: Widget is disposed
      at org.eclipse.swt.SWT.error(SWT.java:4723)
      at org.eclipse.swt.SWT.error(SWT.java:4638)
      at org.eclipse.swt.SWT.error(SWT.java:4609)
      at org.eclipse.swt.widgets.Widget.error(Widget.java:432)
      at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:351)
      at org.eclipse.swt.widgets.TreeItem.getFont(TreeItem.java:600)
      at org.apache.hop.ui.core.widget.TreeUtil.getMaxWidths(Unknown Source)
      at org.apache.hop.ui.core.widget.TreeUtil.setOptimalWidthOnColumns(TreeUtil.java:43)
      at org.apache.hop.ui.core.vfs.HopVfsFileDialog.resizeTableColumn(HopVfsFileDialog.java:1211)
      at org.apache.hop.ui.core.vfs.HopVfsFileDialog.lambda$11(HopVfsFileDialog.java:465)

       

      private static final void getMaxWidths( TreeItem[] items, int[] max, GC gc, int level ) {
      for ( int i = 0; i < items.length; i++ ) {
      ++ if (items[i].isDisposed() ) break;

       

      2) The width of the column is not sufficient, seems to not take into account the level of nesting

       

      Why not use method pack() +  extra width ?

       

      public class TreeUtil {
      public static final void setOptimalWidthOnColumns(Tree tree) {
           for (TreeColumn column : tree.getColumns())

      {          if (column.isDisposed()) break;          column.pack();          column.setWidth(column.getWidth() + (int) (40 * PropsUi.getInstance().getZoomFactor()));      }

      }

       

      Attachments

        1. image-2020-12-12-18-38-37-786.png
          11 kB
          Nicolas Adment

        Activity

          People

            nadment Nicolas Adment
            nadment Nicolas Adment
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 50m
                1h 50m