[
http://jira.jboss.com/jira/browse/JBIDE-1124?page=comments#action_12383541 ]
Victor Rubezhny commented on JBIDE-1124:
----------------------------------------
"1) There should not be any EL content assistance in hbm.xml files "
Is it a strong requirement to exclude any EL CA from hbm.xml files?
Why I'm asking: For some reasons there is a hack in RHDS text editors that always uses
RedHatStructuredTextViewerConfigurationXML configuration for all xml-files.
If we open an hbm.xml-file by JBoss Tools XML Text Editor (RHDS XML Text Editor) - the
EditorPartWrapperExtention finds the Hibernate3CompaundEditor in
"org.jboss.tools.common.model.ui.xmlEditor" extension point.
Hibernate3CompaundEditor is multipage editor which uses XMLTextEditor as source editor.
RedHatStructuredTextViewerConfigurationXML is hardcoded as XMLTextEditor's source
viewer cofiguration.
Result: You see the CA and OpenOns from the RHDS.
In another case, while we open an hbm-xml-file by XML Editor (non-JBoss Tools) the
XMLMultiPageEditorPart creates StructuredTextEditor as source editor. On setInput it
searches the registry for configuration and finds
RedHatStructuredTextViewerConfigurationXML as configuration for
target content type "org.jboss.tools.common.model.ui.xml".
This becomes as result of specifying "org.jboss.tools.common.model.ui.xml" as
the highest priority content type for any xml file.
Result: O-o-ops! You see the CA and OpenOns from the RHDS again. And no Hibernate CA.
As result I can add HBMXMLStructuredTextViewerConfiguration as "initial" source
viewer configuration and its CA processors will return Hibernate proposals simultaneously
with other JBoss Tools CA processors (Seam EL for example) registered for
RedHatStructuredTextViewerConfigurationXML.
For the XML Editor its needed to change
<content-type
base-type="org.eclipse.core.runtime.xml" ... />
to
<content-type
base-type="org.jboss.tools.common.model.ui.xml" ... />
in org.hibernate.eclipse.mapper/plugin.xml's declarations for content types.
This will invoke the BMXMLStructuredTextViewerConfiguration for hbm.xml-files in XML
Editor.
hibernate tools code completion are no longer available in hbm.xml
editing
--------------------------------------------------------------------------
Key: JBIDE-1124
URL:
http://jira.jboss.com/jira/browse/JBIDE-1124
Project: JBoss Tools
Issue Type: Bug
Components: Hibernate
Reporter: Max Andersen
Assigned To: Victor Rubezhny
Fix For: 2.0.0.CR1
EXECUTE: open a hbm.xml file with our structured xml editor
ASSERT: code completion is available for classes in e.g <class name="
This worked before, but now it seems like it is no longer picking up the hibernate tools
provided extensions in the xml source editor part.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira