You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Miłosz Pigłas (JIRA)" <ji...@apache.org> on 2013/08/28 12:48:52 UTC

[jira] [Comment Edited] (CAY-1866) Change in General Modeler Preferences reverts old settings to default value

    [ https://issues.apache.org/jira/browse/CAY-1866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13752279#comment-13752279 ] 

Miłosz Pigłas edited comment on CAY-1866 at 8/28/13 10:48 AM:
--------------------------------------------------------------

You may want to try with this patch 1886_2.patch. It rewrites method CayennePreference.getNode. It looks for preferences in "/package/class_name". If such node doesn't exist, it creates one and copy prefs from node "/package". 

However it isn't ideal. All preferenceses saved in original node are copied, but I don't have an idea how to clean this up. 

It is backward compatible, i.e. users shouldn't lost theirs old settings, when they upgrade modeler. Also method's semantic doesn't change.
                
      was (Author: kurhan):
    You may want to try with this patch 1886_2.patch. It rewrites method CayennePreference.getNode. It looks for preferences in "/package/class_name". If such node doesn't exist, it creates one and copy prefs from node "/package". 

However it isn't ideal. All preferenceses saved in original node are copied, but I don't have an idea how to clean this up. 

It is backward compatible, i.e. users shouldn't lost theirs old settings, when they upgrade modeler.
                  
> Change in General Modeler Preferences reverts old settings to default value
> ---------------------------------------------------------------------------
>
>                 Key: CAY-1866
>                 URL: https://issues.apache.org/jira/browse/CAY-1866
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Modeler
>    Affects Versions: 3.1B2, 3.2M1
>         Environment: Linux/Debian jdk 1.7
>            Reporter: Miłosz Pigłas
>            Priority: Minor
>             Fix For: 3.1B3, 3.2M2
>
>         Attachments: 1866_2.patch, 1866.patch
>
>
> How to reproduce
> Cayenne Modeler
> 1. Tools->Preferences
> 2. Check "Automatically load last opened project"
> 3. Click 'Save'
> 4. Tools->Preferences
> 5. Check 'Always delete items without prompt'
> 6. Click 'Save'
> 7 Tools->Preferences: checkbox 'Automatically load last opened project' is unchecked; 'Always delete items ...'  is checked.
> ClasspathPreferences and GeneralPreferences store preferences in the same node.
> When user opens preferences editor and org.apache.cayenne.modeler.dialog.pref.ClasspathPreferences is initalized keys for general preferences ('autoLoadProject, deletePrompt) are removed, because they aren't integers and default values are set.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira