[rfc][icedtea-web] PolicyEditor Save As Changes

Jie Kang jkang at redhat.com
Thu May 22 18:36:26 UTC 2014


Hello,

You are right that the UI is a bit inconsistent there. I actually thought the Reload pane would pop-up after deletion but there is no check for the FileNotFound exception inside checkPolicyChangesWithDialog(). I have made the appropriate adjustments and attached it to the patch file. Following is the revised changelog.

2014-05-20  Jie Kang  <jkang at redhat.com>

    * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java
    (saveAsButtonAction): set changesMade to true to allow savePolicyFile to save
    (savePolicyFile): no longer immediately returns if changesMade is false
    (updateMd5WithDialog): use changesMade along with file MD5 sum changes to determine
    whether to continue saving to disk, added check for FileNotFound and displays
    warning message telling user what has happened, also privatized method and
    renamed method to checkPolicyChangesWithDialog
    * netx/net/sourceforge/jnlp/util/MD5SumWatcher.java
    Removed unused imports.
    * netx/net/sourceforge/jnlp/resources/Message.properties
    (PEFileMissing) Added new warning message for PolicyEditor


Thanks,

----- Original Message -----
From: "Andrew Azores" <aazores at redhat.com>
To: "Jie Kang" <jkang at redhat.com>
Cc: distro-pkg-dev at openjdk.java.net
Sent: Thursday, May 22, 2014 9:31:13 AM
Subject: Re: [rfc][icedtea-web] PolicyEditor Save As Changes

Thank you! I was able to confirm the flawed behaviour and that your 
patch resolves the problems. However, I think the UI feels a little 
funny in the case of the file being deleted by another process. If the 
file is modified then we prompt the user informing them and asking if 
they'd like to first reload/re-edit, or overwrite, or just cancel. If 
the file has disappeared from disk, then it just saves as usual, and the 
standard "Changes Saved" dialog appears. This is /okay/, and there's no 
point in showing the "Reload file?" dialog if the file is gone, but 
perhaps there should be a warning dialog that informs the user that 
their file has mysteriously disappeared from the disk, even though it 
used to be there? Anyway this is just a hint at a possible feature 
enhancement, if you disagree with this UI change let me know and this 
patch can go in as-is.

Thanks,

-- 
Andrew A

-------------- next part --------------
A non-text attachment was scrubbed...
Name: policyeditor-saveas.patch
Type: text/x-patch
Size: 4485 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20140522/a99145dd/policyeditor-saveas-0001.patch>


More information about the distro-pkg-dev mailing list