[
https://jira.jboss.org/jira/browse/JBIDE-2219?page=com.atlassian.jira.plu...
]
Victor Rubezhny commented on JBIDE-2219:
----------------------------------------
The regression was made by a number of developers who were made the latest changes on
org.jboss.tools.vpe plugin. The improper usage of IStructuredModel cause this blocker
issue:
The class SelectionUtil contains method:
public static VpeNodeMapping getNodeMappingBySourceSelection(
StructuredTextEditor sourceEditor, VpeDomMapping domMapping);
(MAreshkau) which locks the IStructuredModel object for edit but never RELEASES it.
The class NodesManagingUtil contains method
public static IStructuredModel getStructuredModel(
StructuredTextEditor sourceEditor)
(SDzmitrovich) but there is no pair-method like releaseStructuredModel - this is a
potential error of using the IStructuredModel objects
The class DocTypeUtil contains method
static private IDOMDocument getDocument(IFile file)
(MAreshkau). The model is accessed for read but NOT RELEASED!
The class SelectionManager contains method
final public void refreshVisualSelection()
(MAreshkau) which uses the following code:
// get element mapping
VpeNodeMapping nodeMapping = SelectionUtil
.getNodeMappingBySourceSelection(NodesManagingUtil
.getStructuredModel(getSourceEditor()),
getDomMapping(), focusOffcetInSourceDocument, anchorOffcetInSourceDocument);
It takes the IStructuredModel using the NodesManagingUtil.getStructuredModel(...) call but
never RELEASES the model. This happens at least twice in the code...
The classes MozillaEditor (MAreshkau) and VpeController (EStherbin) use the
DocTypeUtil.getDoctype() method which locks the IStructuredModel for read and never
RESEASE it.
The IStructuredModel is ALWAYS to be released!!!
Gentlemen, let's be carefull while using the IStructuredModel in your code. Each time
you're locking it using the IModelManager.getModelForRead/Edit/ or
IModelManager.getExistingModelForRead/Edit you must release it using the correspinding
release method (see the IModelManager interface).
The behaviour of the editors based on Structured Editor are unpredictable in case of
you're not releasing the model. These bugs are very difficult to figure out.
IMHO. These BLOCKER BUGs are to be fixed for 3.0.0.alfa also
I'm assigning the issue to MAreshkau to fix (Maxim will decide who will actually fix)
Default Seam's entity xhtml page save changes after closing file
and selecting do not save on Save Resource wizard.
--------------------------------------------------------------------------------------------------------------------
Key: JBIDE-2219
URL:
https://jira.jboss.org/jira/browse/JBIDE-2219
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: Visual Page Editor
Affects Versions: 3.0.0.alpha
Environment: JBoss Tools build form 14.05.2008 10:54:34
Reporter: Anton Klimkovich
Assignee: Victor Rubezhny
Priority: Blocker
Fix For: 3.0.0.beta1
Attachments: org.jboss.tools.seam.ui.patch
EXECUTE: Create default Seam Ear web project
EXECUTE: Create new Entity (name: NewEntity for examlpe)
EXECUTE: Open newEntity.xhtml
EXECUTE: Insert <s:button></s:button> after <ui:define
name="body"> and donot save changes.
EXECUTE: Close file .
EXECUTE: Select "No" on Save Resource wizard.
EXECUTE: Open newEntity.xhtml.
FAILURE: <s:button></s:button> is present in newEntity.xhtml.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira