Project

General

Profile

Actions

task #6745

open

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 about 5 years ago. Updated over 2 years ago.

Status:
New
Priority:
Highest
Assignee:
Category:
taxeditor
Start date:
Due date:
% Done:

0%

Estimated time:
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)

====
a lot of eclipse initialization and lifecycle management is defined in plugin.xml of taxeditor.application

plugin.xml of taxeditor.application


Files

picture298-1.png (75.9 KB) picture298-1.png plugin.xml of taxeditor.application Patrick Plitzner, 12/06/2019 12:16 PM

Related issues

Related to EDIT - task #6839: remove old workbench.xmi from .cdmlibraryRejectedPatrick Plitzner

Actions
Related to EDIT - feature request #7071: Reenable restore functionalityNewKatja Luther

Actions
Related to EDIT - feature request #7007: Migrate IMemento functionalityRejectedPatrick Plitzner

Actions
Related to EDIT - bug #7997: Some editor windows do not open at the expected locationNewKatja Luther

Actions
Actions #1

Updated by Patrick Plitzner about 5 years ago

  • Tags set to eclipse4
Actions #2

Updated by Andreas Müller about 5 years 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.

Actions #3

Updated by Patrick Plitzner about 5 years 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
Actions #4

Updated by Andreas Müller about 5 years ago

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

Actions #5

Updated by Patrick Plitzner about 5 years ago

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

Actions #6

Updated by Andreas Müller about 5 years ago

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

Updated by Patrick Plitzner almost 5 years 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

Actions #8

Updated by Patrick Plitzner almost 5 years 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
Actions #9

Updated by Patrick Plitzner over 4 years ago

Actions #10

Updated by Patrick Plitzner over 4 years ago

Actions #11

Updated by Andreas Müller over 4 years ago

  • Parent task set to #6565
Actions #12

Updated by Andreas Müller over 4 years ago

  • Parent task changed from #6565 to #7431
Actions #13

Updated by Andreas Müller over 4 years ago

  • Description updated (diff)
Actions #14

Updated by Andreas Müller almost 4 years ago

  • Target version changed from Unassigned CDM tickets to Release 5.4
Actions #15

Updated by Patrick Plitzner almost 4 years ago

  • Target version changed from Release 5.4 to Release 5.5
Actions #16

Updated by Patrick Plitzner almost 4 years ago

  • Target version changed from Release 5.5 to Release 5.6
Actions #17

Updated by Patrick Plitzner over 3 years ago

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

Updated by Patrick Plitzner over 3 years ago

  • Priority changed from New to Highest
Actions #19

Updated by Patrick Plitzner over 3 years ago

  • Target version changed from Release 5.6 to Reviewed Next Major Release
Actions #20

Updated by Andreas Müller over 2 years ago

  • Tags changed from eclipse4 to eclipse4, pp_uebergabe
Actions #21

Updated by Andreas Müller over 2 years ago

  • Assignee changed from Patrick Plitzner to Katja Luther
Actions #22

Updated by Patrick Plitzner over 2 years ago

Actions

Also available in: Atom PDF