void (final boolean keepSelection) { try { ComponentPtr[] selection = null; Map<String, String> tabbedPaneSelectedTabs = null; if (keepSelection) { selection = SelectionState.getSelection(this); tabbedPaneSelectedTabs = saveTabbedPaneSelectedTabs(); } Locale oldLocale = null; if (myRootContainer != null) { oldLocale = myRootContainer.getStringDescriptorLocale(); } final String text = myDocument.getText(); final ClassLoader classLoader = LoaderFactory.getInstance(getProject()).getLoader(myFile); final LwRootContainer rootContainer = Utils.getRootContainer(text, new CompiledClassPropertiesProvider(classLoader)); final RadRootContainer container = XmlReader.createRoot(this, rootContainer, classLoader, oldLocale); setRootContainer(container); if (keepSelection) { SelectionState.restoreSelection(this, selection); restoreTabbedPaneSelectedTabs(tabbedPaneSelectedTabs); } myInvalid = false; myCardLayout.show(myCardPanel, CARD_VALID); refresh(); } catch (Exception exc) { Throwable original = exc; while (original instanceof InvocationTargetException) { original = original.getCause(); } showInvalidCard(original); } catch (final LinkageError exc) { showInvalidCard(exc); } }