Omaha #4028 Error occurs when closing and reopening CAVE with multiple files open in Localization
Change-Id: Ia0d1acd9fcd3cea330167e0881b0860bd178e862 Former-commit-id: 4b828349684cf8ed6720ab555e00a33f521fd3b7
This commit is contained in:
parent
a21d7f74bb
commit
12d352ba88
1 changed files with 16 additions and 4 deletions
|
@ -137,6 +137,7 @@ import com.raytheon.uf.viz.localization.service.ILocalizationService;
|
|||
* Oct 9, 2013 2104 mschenke Fixed file delete/add refresh issue and file change message
|
||||
* found when testing scalesInfo.xml file
|
||||
* Sep 18, 2014 3531 bclement fixed file delete/add refresh issue when paths share string prefixes
|
||||
* Feb 06, 2015 4028 mapeters fixed file selection issue when reopening CAVE with files open
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -437,11 +438,21 @@ public class FileTreeView extends ViewPart implements IPartListener2,
|
|||
.getResource();
|
||||
IWorkbenchPage page = getSite().getPage();
|
||||
for (IEditorReference ref : page.getEditorReferences()) {
|
||||
IEditorPart part = ref.getEditor(false);
|
||||
IEditorInput input = part.getEditorInput();
|
||||
IEditorInput input = null;
|
||||
try {
|
||||
input = ref.getEditorInput();
|
||||
} catch (PartInitException pie) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
pie.getLocalizedMessage(), pie);
|
||||
}
|
||||
if (input instanceof LocalizationEditorInput) {
|
||||
if (file == ((LocalizationEditorInput) input)
|
||||
.getFile()) {
|
||||
if (file.equals(((LocalizationEditorInput) input)
|
||||
.getFile())) {
|
||||
/*
|
||||
* Can only safely pass true to getEditor()
|
||||
* once above conditions are met.
|
||||
*/
|
||||
IEditorPart part = ref.getEditor(true);
|
||||
page.activate(part);
|
||||
break;
|
||||
}
|
||||
|
@ -485,6 +496,7 @@ public class FileTreeView extends ViewPart implements IPartListener2,
|
|||
MenuManager menuMgr = new MenuManager();
|
||||
menuMgr.setRemoveAllWhenShown(true);
|
||||
menuMgr.addMenuListener(new IMenuListener() {
|
||||
@Override
|
||||
public void menuAboutToShow(IMenuManager mgr) {
|
||||
fillContextMenu(mgr);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue