Author: vyemialyanchyk
Date: 2009-06-09 12:39:22 -0400 (Tue, 09 Jun 2009)
New Revision: 15828
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/CriteriaEditorAction.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenQueryEditorAction.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtilsEjb3.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4431 - remove unnecessary
.setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP) and cosmetic changes
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/CriteriaEditorAction.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/CriteriaEditorAction.java 2009-06-09
16:10:57 UTC (rev 15827)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/CriteriaEditorAction.java 2009-06-09
16:39:22 UTC (rev 15828)
@@ -127,14 +127,12 @@
enName = enName.substring(enName.lastIndexOf('.') + 1);
propCriteria = NLS.bind(alias, prName, prName.charAt(0));
}
- else {
- return ""; //$NON-NLS-1$
- }
}
- } else {
+ }
+ if ("".equals(enName)) { //$NON-NLS-1$
return ""; //$NON-NLS-1$
}
enCriteria = NLS.bind(criteria, enName + ".class"); //$NON-NLS-1$
- return sess + enCriteria + propCriteria +
"\n.setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP)"; //$NON-NLS-1$
+ return sess + enCriteria + propCriteria;
}
}
\ No newline at end of file
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenQueryEditorAction.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenQueryEditorAction.java 2009-06-09
16:10:57 UTC (rev 15827)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenQueryEditorAction.java 2009-06-09
16:39:22 UTC (rev 15828)
@@ -9,8 +9,6 @@
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
-import org.hibernate.mapping.PersistentClass;
-import org.hibernate.mapping.Property;
public abstract class OpenQueryEditorAction extends SelectionListenerAction {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java 2009-06-09
16:10:57 UTC (rev 15827)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java 2009-06-09
16:39:22 UTC (rev 15828)
@@ -504,6 +504,9 @@
return OpenMappingUtilsEjb3.enumDocuments(cc2);
}
});
+ if (documentPaths == null) {
+ return file;
+ }
IJavaProject[] projs = ProjectUtils.findJavaProjects(consoleConfig);
ArrayList<IPath> pathsSrc = new ArrayList<IPath>();
ArrayList<IPath> pathsOut = new ArrayList<IPath>();
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtilsEjb3.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtilsEjb3.java 2009-06-09
16:10:57 UTC (rev 15827)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtilsEjb3.java 2009-06-09
16:39:22 UTC (rev 15828)
@@ -103,12 +103,14 @@
}
try {
addMetadataFromVisitor(visitor, visitorJarURL.getPath(), metadata);
+ /** /
JarVisitor.Filter[] otherXmlFilter = getFilters(metadata,
CollectionHelper.EMPTY_MAP, false);
for (String jarFile : metadata.getJarFiles()) {
// TODO: test this code
//vit//visitor = JarVisitor.getVisitor(jarFile, otherXmlFilter);
//vit//addMetadataFromVisitor(visitor, metadata);
}
+ /**/
} catch (IOException e) {
//ignore
}