fidley / ABAPFavorites

ABAP Favorites Eclipse Plugin
https://abapblog.com
37 stars 6 forks source link

Import after Export doesn't work at first glance #94

Closed aztechowski closed 5 months ago

aztechowski commented 5 months ago

This issue is related to: https://github.com/fidley/ABAPFavorites/issues/93

I've done following:

  1. I've exported favorites into XML.
  2. I've reorganized the structure of folders in the XML
  3. I've imported the XML file which ended with error: "Unhandled event loop exception" and "Widget is disposed".

I'm using following plugin Version: ABAPBlog.com Extensions for ABAP Development Tools 1.0.63.202403142022 ABAP_Favorites_Feature_Project

I've simplified and anonimized XML to give you an idea what I've done.

Exported XML

<folderDO description="parent" devObjFolder="true"  folderID="XYZ" longDescription=""  name="Old location" project="XXX" projectIndependent="false">
  <folderDO description="child" devObjFolder="true" folderID="ABC" longDescription="" name="subfolder to move" project="XXX" projectIndependent="false">
... some items (part 1)
... some items (part 2)
</folderDO>
</folderDO>

New XML to be imported Exported XML

<folderDO description="parent" devObjFolder="true" folderID="XYZ" longDescription="" name="Old location" project="XXX" projectIndependent="false">
... some items (part 1)
</folderDO>
<folderDO description="child" devObjFolder="true" folderID="DEF" longDescription="" name="subfolder to move" project="XXX" projectIndependent="false">
... some items (part 2)
</folderDO>

Stack trace

org.eclipse.swt.SWTException: Widget is disposed
    at org.eclipse.swt.SWT.error(SWT.java:4922)
    at org.eclipse.swt.SWT.error(SWT.java:4837)
    at org.eclipse.swt.SWT.error(SWT.java:4808)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:450)
    at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:369)
    at org.eclipse.swt.widgets.Tree.setRedraw(Tree.java:4955)
    at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1414)
    at org.eclipse.ui.dialogs.FilteredTree$NotifyingTreeViewer.refresh(FilteredTree.java:966)
    at com.abapblog.favorites.superview.Superview.refreshViewer(Superview.java:926)
    at com.abapblog.favorites.superview.Superview.lambda$0(Superview.java:132)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    at com.abapblog.favorites.superview.Superview.refreshActiveViews(Superview.java:131)
    at com.abapblog.favorites.xml.XMLhandler.replaceFavFile(XMLhandler.java:497)
    at com.abapblog.favorites.superview.Actions.importFavorites(Actions.java:525)
    at com.abapblog.favorites.superview.Actions.access$0(Actions.java:516)
    at com.abapblog.favorites.superview.Actions$5.run(Actions.java:202)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:581)
    at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:415)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4274)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:152)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1459)

Session data

eclipse.buildId=4.31.0.20240307-1200
java.version=17.0.8.1
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product

After above error the favorites are not displayed correclty, but after closing and reopening the widget everything seems to be OK.

fidley commented 5 months ago

please try the installation of the version 1.0.64 available from now.

fidley commented 5 months ago

Reopen if it's not corrected at your end.