Opened 16 years ago

Last modified 16 years ago

#50 assigned feature

Make application configuration persistent between sessions

Reported by: Henrik Heimbuerger Owned by: nobody
Priority: minor Milestone: MS4: Future extensions
Component: ui Version: pre-1.0
Keywords: configuration, persistence Cc:

Description

The configurable parts of the application should be persisted between sessions. This includes:

  • Input device configuration where applicable (e.g. key definitions, but not Wiimote connections!)
  • UI configuration: open views, placement of views, size of views
  • ...

The Eclipse RCP framework might already have a facility to do this for the UI configuration that may also be usable for the remaining configuration data. That needs to be researched.
Otherwise, a simple XML file should do.

Change History (15)

comment:1 Changed 16 years ago by Henrik Heimbuerger

Milestone: MS3: Input device and slot car track supportMS1: First usable version

Batch moved MS3 (input device/technology integration) to MS1 (first working version).

comment:2 Changed 16 years ago by Henrik Heimbuerger

Component: unspecifiedui

comment:3 Changed 16 years ago by Henrik Heimbuerger

[15:55:08] Christian Spaeth: ... Views und Windowgröße kannst du auch automatisch wiederherstellen lassen...
[15:55:33] Christian Spaeth: in ApplicationWorkbenchAdvisor.initialize() die folgende Zeile einfügen:
[15:55:36] Christian Spaeth: configurer.setSaveAndRestore(true);
[15:56:07] Christian Spaeth: damit wird's aktiviert, ist aus per default...

comment:4 Changed 16 years ago by Henrik Heimbuerger

Owner: changed from somebody to nobody

Batch reassigned all tickets owned by the virtual user 'somebody' to the virtual user 'nobody'.

comment:5 Changed 16 years ago by Henrik Heimbuerger

Owner: changed from nobody to Henrik Heimbuerger
Status: newassigned

comment:6 Changed 16 years ago by Fabian Rohn

Owner: changed from Henrik Heimbuerger to Fabian Rohn

comment:7 Changed 16 years ago by SVN

New commit by frohn (revision [242]):
[Fix for ticket #50] Workbench persistent between sessions

The solution was pretty simple and actually a "one liner". The key was configure.setSaveAndRestore(true) in the ApplicationWorkbenchAdvisor?.

@Override
public void initialize(IWorkbenchConfigurer configurer)
{
        configurer.setSaveAndRestore(true);
        super.initialize(configurer);
}

Further informations @ http://www.java-forum.org/de/topic74144_eclipse-rcp-perspektiven-speichern.html

After I had integrated this, I had to fix some Listenerproblems in the TileExplorer? and TrackOutline?.

Furthermore I set these views to not-closeable, because if you close them and afterwards the application, you have a problem at restart. In this case the view would be already close.
Maybe we could change this another time.

NOTE: If you have crashed your workbench settings or your layout is pretty ugly and you don't know how to clean your workbench, do the following:

  • delete the folder {WORKSPACE_LOCATION}JACAVI\

untime-workspace-JACAVI\.metadata\.plugins\org.eclipse.ui.workbench

(I am sure there is an easyer way)

comment:8 Changed 16 years ago by Fabian Rohn

You can also clean your workbench if you set the "Clear" flag in the Run Configurations... Dialog.

comment:9 Changed 16 years ago by Henrik Heimbuerger

Notes:

  • create a simple Preferences dialog (should come with RCP)
  • store preference whether to display track lanes
  • store and reopen opened editors

comment:10 Changed 16 years ago by Henrik Heimbuerger

Bug: the current perspective should not be made persistent. Right now, if you close JaCaVi while in the race perspective and then restart it, it tries to start in the race perspective and crashes horribly because the necessary data structures aren't initialized.

comment:11 Changed 16 years ago by SVN

New commit by frohn (revision [255]):
[Partial Fix for ticket #50] Current Perspective isn't persistent anymore

I fixed this bug by resetting the perspective to EditorPerspective? by shutting down the workbench.

comment:12 Changed 16 years ago by SVN

New commit by frohn (revision [257]):
[Fix for ticket #50] Added a new launch configuration to clean the Workbench

comment:13 Changed 16 years ago by SVN

New commit by hheimbuerger (revision [294]):
[Partial fix for ticket #50] Added preferences dialog and made displaying the lanes optional.

comment:14 Changed 16 years ago by SVN

New commit by hheimbuerger (revision [297]):
[Partial fix for ticket #50] Added proof-of-concept implementation of persistent editors. (Needs review.)

In the ApplicationWorkbenchAdvisor, new string preferences 'editor0' to 'editorN' are now stored with the filenames as values. The following one is removed from the preferences store to prevent loading old entries.

During startup, these preferences are read and the corresponding editors are restored (until an empty entry is found).

The TrackDesignerInput now stores the filename, but the implementation seems to be buggy -- particularly when newly created tracks are involved.

Also removed the demo.track.xml added in the last commit which seems to have been commit accidentally and doesn't even load.

comment:15 Changed 16 years ago by Henrik Heimbuerger

Milestone: MS1: First usable versionMS5: Optional extensions
Owner: changed from Fabian Rohn to nobody

The UI configuration is sufficiently persisted. The next step should be to persist more data from the player settings dialog and ideally also their attached connectors and controllers.

Note: See TracTickets for help on using tickets.