Lines 16-27
Link Here
|
16 |
import java.sql.Driver; |
16 |
import java.sql.Driver; |
17 |
import java.util.ArrayList; |
17 |
import java.util.ArrayList; |
18 |
import java.util.Enumeration; |
18 |
import java.util.Enumeration; |
|
|
19 |
import java.util.StringTokenizer; |
19 |
import java.util.jar.JarFile; |
20 |
import java.util.jar.JarFile; |
20 |
import java.util.zip.ZipEntry; |
21 |
import java.util.zip.ZipEntry; |
21 |
import java.util.zip.ZipException; |
22 |
import java.util.zip.ZipException; |
22 |
import java.util.zip.ZipFile; |
23 |
import java.util.zip.ZipFile; |
23 |
|
24 |
|
24 |
import org.eclipse.core.runtime.IProgressMonitor; |
25 |
import org.eclipse.core.runtime.IProgressMonitor; |
|
|
26 |
import org.eclipse.datatools.connectivity.IConnectionProfile; |
27 |
import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCConnectionProfileConstants; |
25 |
|
28 |
|
26 |
/** |
29 |
/** |
27 |
* Set of utility methods to process class names from jar files |
30 |
* Set of utility methods to process class names from jar files |
Lines 143-146
Link Here
|
143 |
|
146 |
|
144 |
return outclass; |
147 |
return outclass; |
145 |
} |
148 |
} |
|
|
149 |
|
150 |
public static boolean is3270SupportRequired(IConnectionProfile profile) { |
151 |
if ((profile == null) || (profile.getBaseProperties() == null)) |
152 |
return false; |
153 |
String field3270SupportProp = ConnectivityPlugin.getDefault().getResourceString("JDBCConnection.Field3270Support"); //$NON-NLS-1$ |
154 |
|
155 |
String connProperties = profile.getBaseProperties().getProperty(IJDBCConnectionProfileConstants.CONNECTION_PROPERTIES_PROP_ID); |
156 |
if (connProperties != null && connProperties.contains(field3270SupportProp)){ |
157 |
String propDelim = ",";//$NON-NLS-1$ |
158 |
|
159 |
StringTokenizer tk = new StringTokenizer(connProperties,propDelim); |
160 |
String str; |
161 |
while (tk.hasMoreTokens()){ |
162 |
str = tk.nextToken(); |
163 |
if (str.contains(field3270SupportProp)){ |
164 |
String value = str.substring(str.indexOf("=") + 1).trim(); |
165 |
if ("true".equalsIgnoreCase(value)) |
166 |
return true; |
167 |
} |
168 |
} |
169 |
return false; |
170 |
|
171 |
} |
172 |
return false; |
173 |
} |
146 |
} |
174 |
} |