Author: scabanovich
Date: 2012-02-21 22:02:02 -0500 (Tue, 21 Feb 2012)
New Revision: 38953
Modified:
branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewDSXMLWizard.java
Log:
JBIDE-10787
https://issues.jboss.org/browse/JBIDE-10787
Merged to Beta1: Driver filled with jar name.
Modified:
branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewDSXMLWizard.java
===================================================================
---
branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewDSXMLWizard.java 2012-02-22
03:00:26 UTC (rev 38952)
+++
branches/jbosstools-3.3.0.Beta1/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewDSXMLWizard.java 2012-02-22
03:02:02 UTC (rev 38953)
@@ -280,7 +280,7 @@
String jarname =
(String)model.getProperty(IDSDataModelProperties.JDBC_DRIVER_JAR_NAME);
if(jarname != null) {
IPath container = getContainerFullPath();
- IPath target = container.append(jarname + ".jar"); //$NON-NLS-1$
+ IPath target = container.append(jarname);
IFile targetFile = ResourcesPlugin.getWorkspace().getRoot().getFile(target);
if(!targetFile.exists()) {
return targetFile;
@@ -296,7 +296,7 @@
File jarSource = new File(jars[0]);
if(jarSource.isFile()) {
IPath container = getContainerFullPath();
- IPath target = container.append(jarname + ".jar"); //$NON-NLS-1$
+ IPath target = container.append(jarname);
IFile targetFile = ResourcesPlugin.getWorkspace().getRoot().getFile(target);
if(!targetFile.exists()) {
try {
@@ -550,7 +550,7 @@
String DATATOOLS_JDBC_DRIVER_JAR_PATH =
"org.eclipse.datatools.connectivity.driverDefinitionID"; //$NON-NLS-1$
String JDBC_CONNECTION_NAME = "datasource.name"; //$NON-NLS-1$
- String JDBC_DRIVER_JAR_NAME = "driver.jar.name.without.dot.jar";
//$NON-NLS-1$
+ String JDBC_DRIVER_JAR_NAME = "driver.jar.name"; //$NON-NLS-1$
}
class DSDataModelProvider extends AbstractDataModelProvider implements
IDSDataModelProperties {
@@ -676,7 +676,7 @@
String jarList = props.getProperty("jarList"); //$NON-NLS-1$
int q = jarList.indexOf(".jar"); //$NON-NLS-1$
if(q >= 0) {
- String jar = jarList.substring(0, q);
+ String jar = jarList.substring(0, q + 4);
int b = jar.replace('\\', '/').lastIndexOf('/');
String jarName = jar.substring(b + 1);
model.setProperty(JDBC_DRIVER_JAR_NAME, jarName);
@@ -963,7 +963,7 @@
JDBC_TEMPLATE.addFilter("catalogProperty","${catalog.property}");
//$NON-NLS-1$ //$NON-NLS-2$
JDBC_TEMPLATE.addFilter("schemaProperty","${schema.property}");
//$NON-NLS-1$ //$NON-NLS-2$
JDBC_TEMPLATE.addFilter("datasourcename","${datasource.name}");
//$NON-NLS-1$ //$NON-NLS-2$
- JDBC_TEMPLATE.addFilter("driverjarnamewithoutdotjar","${driver.jar.name.without.dot.jar}");
//$NON-NLS-1$ //$NON-NLS-2$
+ JDBC_TEMPLATE.addFilter("driverjarnamewithoutdotjar","${driver.jar.name}");
//$NON-NLS-1$ //$NON-NLS-2$
PROJECT_TEMPLATE = new FilterSet();
PROJECT_TEMPLATE.addFilter("projectName","${project.name}");
//$NON-NLS-1$ //$NON-NLS-2$