This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 431367 - dirty save prompt with empty entries
Summary: dirty save prompt with empty entries
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.4 M7   Edit
Assignee: Dirk Fauth CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-27 10:43 EDT by Joerg Buchberger CLA
Modified: 2014-04-29 08:46 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Buchberger CLA 2014-03-27 10:43:27 EDT
suggested fix for org.eclipse.e4.ui.model.LocalizationHelper

since
    getLocalized(String, MApplicationElement, IEclipseContext)
already follows the policy of returning the key-String as value in case no
translation service or translation is available

it would be consequent to follow the same policy also in
    getLocalized(String, MApplicationElement)
when no context is available

as of now, it will return null, which produces empty entries in the save
prompt for multiple dirty files, because the anonymous PartServiceSaveHandler
setup in WorkbenchWindow makes use of the LocalizationHelper

you may say, that normally a MPart should always have a parent,
but believe me, that is not always the case ... as for the proprietary
components we make use of in our software product, their heavyweight
dirty MParts from hidden perspectives have no parent, when their perspective
is inactive, yet the save prompt, of course, still should be able to show
them upon exit
Comment 1 Dirk Fauth CLA 2014-03-27 11:19:08 EDT
Sounds reasonable, although the check should be performed in getLocalized(String, MApplicationElement, IEclipseContext) to always have the same behaviour.

Fixed with https://git.eclipse.org/r/#/c/24001/