Issue #1610 Fixed null pointer on FileTreeView when file updates arrive and view has not expanded file structure
Change-Id: Ibfa11dc41ee5fa2a7421469a58932b415261c343 Former-commit-id:7ede523b45
[formerly2f8b88df4d
] [formerlyecb0906597
] [formerly02207b777c
[formerlyecb0906597
[formerly 71b40ef692f0c2109e1026ac5d953d34e808938f]]] Former-commit-id:02207b777c
Former-commit-id: 25208ef3a3aee4c72d93ee79ac6912cad2b79071 [formerlybbc904894a
] Former-commit-id:66512cecc6
This commit is contained in:
parent
ff539f12fd
commit
4d6091450a
1 changed files with 10 additions and 4 deletions
|
@ -130,6 +130,8 @@ import com.raytheon.uf.viz.localization.service.ILocalizationService;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 26, 2010 mnash Initial creation
|
||||
* Feb 13, 2013 1610 mschenke Fixed null pointer by repopulating LocalizationFileGroupData
|
||||
* objects even if they weren't expanded
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -591,11 +593,15 @@ public class FileTreeView extends ViewPart implements IPartListener2,
|
|||
}
|
||||
|
||||
private void expand(Map<FileTreeEntryData, Boolean> map, TreeItem item) {
|
||||
if (map.containsKey(item.getData()) && map.get(item.getData())) {
|
||||
boolean wasExpanded = map.containsKey(item.getData())
|
||||
&& map.get(item.getData());
|
||||
if (wasExpanded || item.getData() instanceof LocalizationFileGroupData) {
|
||||
populateNode(item);
|
||||
item.setExpanded(true);
|
||||
for (TreeItem child : item.getItems()) {
|
||||
expand(map, child);
|
||||
if (wasExpanded) {
|
||||
item.setExpanded(true);
|
||||
for (TreeItem child : item.getItems()) {
|
||||
expand(map, child);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue