Author: akazakov
Date: 2010-12-22 12:08:13 -0500 (Wed, 22 Dec 2010)
New Revision: 27676
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java
Log:
Release model after getting it for read
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java 2010-12-22
16:33:57 UTC (rev 27675)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java 2010-12-22
17:08:13 UTC (rev 27676)
@@ -996,8 +996,9 @@
if (webContentResource instanceof IContainer) {
IFile templateFile = (IFile) ((IContainer)
webContentResource).findMember(filePath); //$NON-NLS-1$
Document document = null;
+ IDOMModel wtpModel = null;
try {
- IDOMModel wtpModel =
(IDOMModel)StructuredModelManager.getModelManager().getModelForRead(templateFile);
+ wtpModel =
(IDOMModel)StructuredModelManager.getModelManager().getModelForRead(templateFile);
if (wtpModel != null) {
document = wtpModel.getDocument();
}
@@ -1005,6 +1006,10 @@
JspEditorPlugin.getPluginLog().logError(e);
} catch(CoreException e) {
JspEditorPlugin.getPluginLog().logError(e);
+ } finally {
+ if(wtpModel!=null) {
+ wtpModel.releaseFromRead();
+ }
}
if (null != document) {
/*
Show replies by date