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 |
public static boolean isBidiSupportRequired(IConnectionProfile profile) { |
150 |
String bidiVisualProp = "BIDI_SUPPORT"; |
151 |
if ((profile == null) || (profile.getBaseProperties() == null)) |
152 |
return false; |
153 |
|
154 |
String connProperties = profile.getBaseProperties().getProperty(IJDBCConnectionProfileConstants.CONNECTION_PROPERTIES_PROP_ID); |
155 |
if (connProperties != null && connProperties.contains(bidiVisualProp)){ |
156 |
String propDelim = ",";//$NON-NLS-1$ |
157 |
|
158 |
StringTokenizer tk = new StringTokenizer(connProperties,propDelim); |
159 |
String str; |
160 |
while (tk.hasMoreTokens()){ |
161 |
str = tk.nextToken(); |
162 |
if (str.contains(bidiVisualProp)){ |
163 |
String value = str.substring(str.indexOf("=") + 1).trim(); |
164 |
if ("true".equalsIgnoreCase(value)) |
165 |
return true; |
166 |
} |
167 |
} |
168 |
return false; |
169 |
|
170 |
} |
171 |
return false; |
172 |
} |
146 |
} |
173 |
} |