Author: vyemialyanchyk
Date: 2008-08-07 11:03:48 -0400 (Thu, 07 Aug 2008)
New Revision: 9592
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/AbstractQueryEditor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2561
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/AbstractQueryEditor.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/AbstractQueryEditor.java 2008-08-07
11:56:08 UTC (rev 9591)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/AbstractQueryEditor.java 2008-08-07
15:03:48 UTC (rev 9592)
@@ -134,17 +134,13 @@
final public void doSave(IProgressMonitor progressMonitor) {
// super.doSave(progressMonitor);
- IDocumentProvider p= getDocumentProvider();
- if (p == null)
- return;
-
QueryEditorInput hei = null;
if (getEditorInput() instanceof QueryEditorInput) {
hei = (QueryEditorInput) getEditorInput();
hei.setQuery( getQueryString() );
}
-
- if (p.isDeleted(getEditorInput()) || (hei != null && hei.getStorage()
instanceof QueryEditorStorage)) {
+ IDocumentProvider p = getDocumentProvider();
+ if (p != null && p.isDeleted(getEditorInput())) {
if (isSaveAsAllowed()) {
// 1GEUSSR: ITPUI:ALL - User should never loose changes made in the editors.
// Changed Behavior to make sure that if called inside a regular save (because
@@ -195,12 +191,12 @@
ActionContributionItem item = new ActionContributionItem( execAction );
tbm.add( item );
-
+
item = new ActionContributionItem( clearAction );
tbm.add( item );
ControlContribution cc = new ConfigurationCombo( "hql-target", this );
//$NON-NLS-1$
- tbm.add( cc );
+ tbm.add( cc );
tbm.add( new Separator() );