Project

General

Profile

Actions

feature request #5969

closed

feature request #3958: Handle CDMPreference table

Implement CdmPreference reading for database preferences

Added by Andreas Müller over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Highest
Assignee:
Category:
taxeditor
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal

Description

Start with NomenclaturalCode. The values are available through IPreferenceService.

See also #3958, #5971


Related issues

Related to EDIT - feature request #5971: Implement database wide CdmPreference writingClosedKatja Luther

Actions
Related to EDIT - bug #3658: Update Nomenclatural code for datasourcesClosedAndreas Müller

Actions
Related to EDIT - feature request #5970: Implement allowOverride in CdmPreferenceClosedAndreas Müller

Actions
Related to EDIT - bug #6215: NPE when opening preferences with no DB connectionClosedKatja Luther

Actions
Precedes EDIT - bug #6105: Make CdmPreferences editable in separate viewClosedKatja Luther

Actions
Precedes EDIT - bug #6106: [Discuss] Handle rights and roles for CdmPreferencesClosedAndreas Müller

Actions
Actions #1

Updated by Katja Luther over 7 years ago

  • Description updated (diff)
  • Status changed from New to Resolved
  • Assignee changed from Katja Luther to Andreas Müller
  • % Done changed from 0 to 50

first implementation added.

Actions #2

Updated by Andreas Müller over 7 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

When trying to open Preferences-Taxonomic-NomenclaturalCode I got an NPE:

login : admin
editor version : 4.3.0.201609141050
server : test.e-taxonomy.eu / edit-test
schema version : 4.0.0.0.201604200000
os : Windows Server 2012 6.2 amd64
java : 1.7.0_65
java.lang.NullPointerException
    at eu.etaxonomy.taxeditor.preference.PreferencesUtil.setPreferredNomenclaturalCode(PreferencesUtil.java:119)
    at eu.etaxonomy.taxeditor.preference.NomenclaturalCodePreferences.init(NomenclaturalCodePreferences.java:86)
    at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceNode.createPage(WorkbenchPreferenceNode.java:57)
    at org.eclipse.jface.preference.PreferenceDialog.createPage(PreferenceDialog.java:1339)
    at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.createPage(FilteredPreferenceDialog.java:376)
    at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1230)
    at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:674)
    at org.eclipse.jface.preference.PreferenceDialog$10.run(PreferenceDialog.java:708)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.jface.preference.PreferenceDialog$9.selectionChanged(PreferenceDialog.java:704)
    at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:888)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
    at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:886)
    at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1226)
    at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1251)
    at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:262)
    at org.eclipse.jface.util.OpenStrategy.access$5(OpenStrategy.java:256)
    at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:433)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:215)
    at org.eclipse.ui.internal.handlers.ShowPreferencePageHandler.execute(ShowPreferencePageHandler.java:54)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
    at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
    at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
    at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829)
    at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815)
    at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    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:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Actions #3

Updated by Katja Luther over 7 years ago

there was no check whether the preference is already in DB, now if the preference could not find in DB the local one is used.

Actions #4

Updated by Katja Luther over 7 years ago

  • Assignee changed from Katja Luther to Andreas Müller
Actions #5

Updated by Andreas Müller over 7 years ago

Actions #6

Updated by Andreas Müller over 7 years ago

Actions #7

Updated by Andreas Müller over 7 years ago

  • Precedes bug #6105: Make CdmPreferences editable in separate view added
Actions #8

Updated by Andreas Müller over 7 years ago

The implementation in the local preferences UI works well now and I think we can close the ticket.

But maybe we can leave a remark in the UI that this value is stored in the database, not in the local preferences, to warn users.

Implementation in a separate UI is handled in a follow up ticket: #6105

Another issue is rights management which is handled by #6106

Actions #9

Updated by Andreas Müller over 7 years ago

  • Assignee changed from Andreas Müller to Katja Luther
Actions #10

Updated by Andreas Müller over 7 years ago

  • Precedes bug #6106: [Discuss] Handle rights and roles for CdmPreferences added
Actions #11

Updated by Andreas Müller over 7 years ago

If no datasource is selected an NPE occurs:

login : 
editor version : 4.3.0.201609201350
server :  / 
schema version : 
os : Windows Server 2012 6.2 amd64
java : 1.7.0_65
java.lang.NullPointerException
    at eu.etaxonomy.taxeditor.preference.PreferencesUtil.setPreferredNomenclaturalCode(PreferencesUtil.java:118)
    at eu.etaxonomy.taxeditor.preference.NomenclaturalCodePreferences.init(NomenclaturalCodePreferences.java:86)
    at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceNode.createPage(WorkbenchPreferenceNode.java:57)
    at org.eclipse.jface.preference.PreferenceDialog.createPage(PreferenceDialog.java:1339)
    at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.createPage(FilteredPreferenceDialog.java:376)
    at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1230)
    at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:674)
    at org.eclipse.jface.preference.PreferenceDialog$10.run(PreferenceDialog.java:708)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.jface.preference.PreferenceDialog$9.selectionChanged(PreferenceDialog.java:704)
    at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:888)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)

This is kind of important because it is currently the only possibility to set the local preference (in case a database preference is not yet set)

Actions #12

Updated by Katja Luther over 7 years ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

In Revision 4625a011 a check for the existence of the preference in DB is added.

Actions #13

Updated by Andreas Müller over 7 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther
  • % Done changed from 50 to 80

Katja Luther wrote:

In Revision 4625a011 a check for the existence of the preference in DB is added.

This does not seem to fix the problem. I checked with the latest nightly (Sep. 30th)

Please also add the remark on the UI as mentioned in #note-8 before closing the ticket fully.

Actions #14

Updated by Katja Luther over 7 years ago

I added a remark that that the preference is stored in db and a check whether the editor is already connected to a datasource.

Actions #15

Updated by Katja Luther over 7 years ago

  • Assignee changed from Katja Luther to Andreas Müller
Actions #16

Updated by Andreas Müller over 7 years ago

  • Related to bug #3658: Update Nomenclatural code for datasources added
Actions #17

Updated by Andreas Müller over 7 years ago

Actions #18

Updated by Andreas Müller over 7 years ago

  • Status changed from Feedback to Closed

I think we can close this ticket now. Open issues will be checked in #5971 and are more related to writing then reading

Actions #19

Updated by Andreas Müller over 7 years ago

  • Assignee changed from Andreas Müller to Katja Luther
  • % Done changed from 80 to 100
Actions #20

Updated by Andreas Müller over 7 years ago

  • Related to bug #6215: NPE when opening preferences with no DB connection added
Actions #21

Updated by Andreas Müller over 7 years ago

  • Parent task set to #3958
Actions #22

Updated by Andreas Müller over 6 years ago

  • Private changed from Yes to No
Actions

Also available in: Atom PDF