Merge "Omaha #4028 Error occurs when closing and reopening CAVE with multiple files open in Localization" into omaha_15.1.1
Former-commit-id: b4721871a34c252deef29e26019103d66c6c31af
This commit is contained in:
commit
8909b1b60e
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