Author: vrubezhny
Date: 2007-10-23 07:35:33 -0400 (Tue, 23 Oct 2007)
New Revision: 4446
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorComponent.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1124 hibernate tools code completion are no longer
available in hbm.xml editing
The org.hibernate.eclipse.mapper dependency is excluded from
org.jboss.tools.hibernate.xml.ui.
This also fixes the build issue described in letter:
-----Original Message-----
From: jbosstools-dev-bounces(a)lists.jboss.org
[mailto:jbosstools-dev-bounces@lists.jboss.org]On Behalf Of Denis
Golovin
Sent: Tuesday, October 23, 2007 2:17 AM
To: Max Rydahl Andersen; JBoss Tools Dev
Subject: [jbosstools-dev]
http://jira.jboss.org/jira/browse/JBIDE-498
Max,
we have to decide what component will contain hbm.xml editor. Now I have
problem to build RHDS ether it just my local config problem or something
has not been updated in CVN.
Here is an error during richfaces component buld where hbm.xml editor
was included. It requires org.hibernate.eclipse.mapper, that is not
included into richfaces component.
...
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorComponent.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorComponent.java 2007-10-23
11:35:22 UTC (rev 4445)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorComponent.java 2007-10-23
11:35:33 UTC (rev 4446)
@@ -64,15 +64,14 @@
protected boolean isStandAlone = false;
public XMLTextEditorComponent() {
- support.setProvider(this);
-/// XmlDocumentProvider p = (XmlDocumentProvider)getDocumentProvider();
-/// p.disableElementContentChange();
- ModelPlugin.getWorkspace().addResourceChangeListener(changeListener = new ICL());
+ this(true);
}
- public XMLTextEditorComponent(SourceViewerConfiguration configuration) {
- super(configuration);
+ public XMLTextEditorComponent(boolean useUseRHDSConfig) {
+ super(useUseRHDSConfig);
support.setProvider(this);
+ /// XmlDocumentProvider p = (XmlDocumentProvider)getDocumentProvider();
+ /// p.disableElementContentChange();
ModelPlugin.getWorkspace().addResourceChangeListener(changeListener = new ICL());
}
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java 2007-10-23
11:35:22 UTC (rev 4445)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java 2007-10-23
11:35:33 UTC (rev 4446)
@@ -92,31 +92,24 @@
XModelObject object = null;
public XMLTextEditor() {
- XmlEditorPlugin.getDefault().initDefaultPluginPreferences();
-/// dnd.setTextEditorDropProvider(new TextEditorDropProviderImpl());
- super.setSourceViewerConfiguration(new RedHatStructuredTextViewerConfigurationXML());
+ this (true);
}
- public XMLTextEditor(SourceViewerConfiguration config) {
- super.setSourceViewerConfiguration(config);
+ public XMLTextEditor(final boolean useRHDSConfig) {
+ this.useRHDSConfig = useRHDSConfig;
+
XmlEditorPlugin.getDefault().initDefaultPluginPreferences();
/// dnd.setTextEditorDropProvider(new TextEditorDropProviderImpl());
- if (config != null) {
- if (!(config instanceof RedHatStructuredTextViewerConfigurationXML)) {
- rhsvcEnabled = false;
- }
- super.setSourceViewerConfiguration(config);
+
+ if (useRHDSConfig) {
+ super.setSourceViewerConfiguration(new RedHatStructuredTextViewerConfigurationXML());
}
}
- private boolean rhsvcEnabled = true;
+ private boolean useRHDSConfig = true;
- protected boolean isRedHatSourceViewerConfigurationEnabled() {
- return rhsvcEnabled;
- }
-
protected void setSourceViewerConfiguration(SourceViewerConfiguration config) {
- if( isRedHatSourceViewerConfigurationEnabled()
+ if( useRHDSConfig
&& !(config instanceof RedHatStructuredTextViewerConfigurationXML)
&& (config instanceof StructuredTextViewerConfigurationXML
|| !(config instanceof StructuredTextViewerConfiguration)