|
From: Johannes S. (JIRA) <no...@sp...> - 2008-10-29 21:06:00
|
FileChooserUtils should add file extension automatically
--------------------------------------------------------
Key: RCP-580
URL: http://jira.springframework.org/browse/RCP-580
Project: Spring Rich Client Project
Issue Type: New Feature
Reporter: Johannes Schneider
FileChooserUtils#showFileChooser should append the file suffix automatically if the user didn't add it.
something like (pseudo):
if (!file.getName().endsWith(suffix)){
file.getName()+suffix;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Rogan D. (JIRA) <no...@sp...> - 2008-10-30 07:04:47
|
[ http://jira.springframework.org/browse/RCP-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=40745#action_40745 ]
Rogan Dawes commented on RCP-580:
---------------------------------
I think it could be done a bit more carefully.
For example (more pseudo):
if (!file.getName().endsWith(suffix)){
if (file.exists()) // That's what I said, that's what I want!
return file;
if ((file.getName()+suffix).exists())
return file.getName()+suffix;
}
> FileChooserUtils should add file extension automatically
> --------------------------------------------------------
>
> Key: RCP-580
> URL: http://jira.springframework.org/browse/RCP-580
> Project: Spring Rich Client Project
> Issue Type: New Feature
> Reporter: Johannes Schneider
>
> FileChooserUtils#showFileChooser should append the file suffix automatically if the user didn't add it.
> something like (pseudo):
> if (!file.getName().endsWith(suffix)){
> file.getName()+suffix;
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Lieven D. (JIRA) <no...@sp...> - 2008-10-30 14:42:44
|
[ http://jira.springframework.org/browse/RCP-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=40761#action_40761 ]
Lieven Doclo commented on RCP-580:
----------------------------------
as always, patches welcome :)
> FileChooserUtils should add file extension automatically
> --------------------------------------------------------
>
> Key: RCP-580
> URL: http://jira.springframework.org/browse/RCP-580
> Project: Spring Rich Client Project
> Issue Type: New Feature
> Reporter: Johannes Schneider
>
> FileChooserUtils#showFileChooser should append the file suffix automatically if the user didn't add it.
> something like (pseudo):
> if (!file.getName().endsWith(suffix)){
> file.getName()+suffix;
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Lieven D. (JIRA) <no...@sp...> - 2008-10-30 14:42:44
|
[ http://jira.springframework.org/browse/RCP-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=40760#action_40760 ]
Lieven Doclo commented on RCP-580:
----------------------------------
I think you're both right, johannes' solution will work for save actions, whileas rogan's solution is more appropriate for open actions
> FileChooserUtils should add file extension automatically
> --------------------------------------------------------
>
> Key: RCP-580
> URL: http://jira.springframework.org/browse/RCP-580
> Project: Spring Rich Client Project
> Issue Type: New Feature
> Reporter: Johannes Schneider
>
> FileChooserUtils#showFileChooser should append the file suffix automatically if the user didn't add it.
> something like (pseudo):
> if (!file.getName().endsWith(suffix)){
> file.getName()+suffix;
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Johannes S. (JIRA) <no...@sp...> - 2008-10-30 15:44:39
|
[ http://jira.springframework.org/browse/RCP-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=40765#action_40765 ]
Johannes Schneider commented on RCP-580:
----------------------------------------
Rogan: You are right. Your approach seems to be better - also for save actions.
> FileChooserUtils should add file extension automatically
> --------------------------------------------------------
>
> Key: RCP-580
> URL: http://jira.springframework.org/browse/RCP-580
> Project: Spring Rich Client Project
> Issue Type: New Feature
> Reporter: Johannes Schneider
>
> FileChooserUtils#showFileChooser should append the file suffix automatically if the user didn't add it.
> something like (pseudo):
> if (!file.getName().endsWith(suffix)){
> file.getName()+suffix;
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Lieven D. (JIRA) <no...@sp...> - 2008-10-30 19:14:47
|
[ http://jira.springframework.org/browse/RCP-580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lieven Doclo updated RCP-580:
-----------------------------
Affects Version/s: 1.0.1
Description:
FileChooserUtils#showFileChooser should append the file suffix automatically if the user didn't add it.
something like (pseudo):
{noformat}
if (!file.getName().endsWith(suffix)){
file.getName()+suffix;
}
{noformat}
was:
FileChooserUtils#showFileChooser should append the file suffix automatically if the user didn't add it.
something like (pseudo):
if (!file.getName().endsWith(suffix)){
file.getName()+suffix;
}
Fix Version/s: 1.x
currently assigned to 1.x
> FileChooserUtils should add file extension automatically
> --------------------------------------------------------
>
> Key: RCP-580
> URL: http://jira.springframework.org/browse/RCP-580
> Project: Spring Rich Client Project
> Issue Type: New Feature
> Affects Versions: 1.0.1
> Reporter: Johannes Schneider
> Fix For: 1.x
>
>
> FileChooserUtils#showFileChooser should append the file suffix automatically if the user didn't add it.
> something like (pseudo):
> {noformat}
> if (!file.getName().endsWith(suffix)){
> file.getName()+suffix;
> }
> {noformat}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|