Project

General

Profile

task #6745

feature request #7431: [MASTER] remaining E4 migration issues

Investigate how e4 model changes affect the cached application model in existing Taxeditor installation

Added by Patrick Plitzner over 1 year ago. Updated 3 months ago.

Status:
New
Priority:
New
Category:
taxeditor
Target version:
Start date:
06/21/2017
Due date:
% Done:

0%

Severity:
normal
Tags:

Description

The application model of the Taxeditor is stored in {home}/.cdmLibrary/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi. This stores all parts, menu items, commands, etc.

While we are still migrating from e3 to e4 and make a lot of changes to the model there could be situation when after installing a new taxeditor (for developers: after git pull) new GUI objects do not show up because of the existing application model cache. Deleting the workbench.xmi file solves this problem (developers can also add -clearPersistedState to the program arguments in the launch configuration of the taxeditor.

We could think about about delivering an extra a batch file that starts the editor with the -clearPersistedState parameter in order to once reset the application model. Afterwards the editor could be started normally. Having this parameter set for every launch would always lead to a fresh application model i.e. none of the layout of the windows are opened editors would be restored.

We should look at the parameter apply in the org.eclipse.e4.workbench.model extension point which defines when a model fragment should be applied to the cached one.

====

This ticket may also include restore functionality of name editors (#7071)


Related issues

Related to Edit - task #6839: remove old workbench.xmi from .cdmlibrary Rejected 07/21/2017
Related to Edit - feature request #7071: Reenable restore functionality New 10/06/2017
Related to Edit - feature request #7007: Migrate IMemento functionality Rejected 10/06/2017
Related to Edit - bug #7997: Some editor windows do not open at the expected location New 01/17/2019

Associated revisions

Revision 1818a5f4 (diff)
Added by Patrick Plitzner over 1 year ago

fix #6776 ref #6745 Parts with tag "nonRestore" will not be persisted

  • they will be removed from the application model before it is saved

Revision 0cf9635f (diff)
Added by Patrick Plitzner over 1 year ago

fix #6776 ref #6745 Parts with tag "nonRestore" will not be persisted

  • they will be removed from the application model before it is saved

Revision f8f1f3fe (diff)
Added by Patrick Plitzner over 1 year ago

ref #6745 Change save location of workbench.xmi

  • Register own copy of ResourceHandler to handle loading and storing of the application model

Revision 8c8d24e5 (diff)
Added by Patrick Plitzner over 1 year ago

ref #6745 Change location of workbench.xmi to {install}/configuration

History

#1 Updated by Patrick Plitzner over 1 year ago

  • Tags set to eclipse4

#2 Updated by Andreas Müller over 1 year ago

Ja, das ist ein wichtiges Thema. Insbesondere wenn man nightly häufig neuinstalliert, bekommt man beim ersten mal immer Probleme, weil er irgendwas öffnen will was irgendwo wohl mal geöffnet war, obwohl ich in der Zwischenzeit der Editor schon sehr häufig mit anderem Layout geschlossen habe.
Ich habe das noch nicht systematisch untersucht, aber sollten wir machen.

#3 Updated by Patrick Plitzner over 1 year ago

  • Subject changed from Investigate how e4 model changes affect the cached application model in exisiting Taxeditor installation to Investigate how e4 model changes affect the cached application model in existing Taxeditor installation

#4 Updated by Andreas Müller over 1 year ago

This is a general problem when working with >1 installations of the editor. We should try to store instance specific xmi files

#5 Updated by Patrick Plitzner over 1 year ago

This article might help. Seems like you can programmatically store and load the application model.
http://www.vogella.com/tutorials/Eclipse4ModelPersistence/article.html

#6 Updated by Andreas Müller over 1 year ago

  • Related to task #6839: remove old workbench.xmi from .cdmlibrary added

#7 Updated by Patrick Plitzner over 1 year ago

After implementing #6847 the launch flag -clearPersistedState does not seem to work anymore. During development you have to manually delete the workbench.xmi in {workspace}/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool/configuration

Maybe we can implement a switch for dev and release

#8 Updated by Patrick Plitzner about 1 year ago

Andreas:

"[Im Editor] der noch keine Verbindung zu einer DB hat, wird versucht, einen Nameeditor zu öffnen. Das scheint mir nicht sinnvoll. Es sollte erst nach öffnen der Verbindung passieren.

Wenn ich dann in den ausgegrauten Nameeditor klicke, bekomme ich zudem folgende NPE:

Ich habe das jetzt nochmal beobachtet. Es passiert immer, wenn man mehrere TaxEditor Instanzen parallel auf hat. Dann übernimmt er die Information von der bereits geöffneten Instanz. Da müssen wir uns noch was ausdenken."

login :

editor version : 4.11.0.201710181800

server :  ()

schema version :

os : Windows Server 2012 R2 6.3 amd64

java : 1.8.0_121

org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException)

                at org.eclipse.swt.SWT.error(SWT.java:4533)

                at org.eclipse.swt.SWT.error(SWT.java:4448)

                at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)

                at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211)

                at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827)

                at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)

                at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)

                at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)

                at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)

                at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)

                at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)

                at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)

                at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)

                at eu.etaxonomy.taxeditor.Application.start(Application.java:24)

                at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)

                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)

                at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)

                at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:498)

                at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)

                at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)

                at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

Caused by: org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException

                at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65)

                at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:56)

                at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)

                at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)

                ... 23 more

Caused by: java.lang.NullPointerException

                at eu.etaxonomy.taxeditor.navigation.navigator.e4.TaxonNavigatorE4.updateCurrentTaxon(TaxonNavigatorE4.java:210)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:498)

                at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)

                ... 26 more

#9 Updated by Patrick Plitzner 8 months ago

#10 Updated by Patrick Plitzner 8 months ago

#11 Updated by Andreas Müller 8 months ago

  • Parent task set to #6565

#12 Updated by Andreas Müller 8 months ago

  • Parent task changed from #6565 to #7431

#13 Updated by Andreas Müller 8 months ago

  • Description updated (diff)

#14 Updated by Andreas Müller 5 months ago

  • Target version changed from Unassigned CDM tickets to Release 5.4

#15 Updated by Patrick Plitzner 3 months ago

  • Target version changed from Release 5.4 to Release 5.5

#16 Updated by Patrick Plitzner 3 months ago

  • Target version changed from Release 5.5 to Release 5.6

#17 Updated by Patrick Plitzner 1 day ago

  • Related to bug #7997: Some editor windows do not open at the expected location added

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)