Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarolyn MacLeod2007-06-14 14:39:09 -0400
committerCarolyn MacLeod2007-06-14 14:39:09 -0400
commit2c2b66c83afb0abefcdcee48e17ac17d804d06e6 (patch)
treeebf6bf861a25c3a646d4e1fe08fc6fac9377601c
parent25188fdb5484f90316edff46521d6ff765e4a05a (diff)
downloadeclipse.platform.swt-2c2b66c83afb0abefcdcee48e17ac17d804d06e6.tar.gz
eclipse.platform.swt-2c2b66c83afb0abefcdcee48e17ac17d804d06e6.tar.xz
eclipse.platform.swt-2c2b66c83afb0abefcdcee48e17ac17d804d06e6.zip
Set public static var in Accessible to IA2 class name, use reflection
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java32
1 files changed, 30 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
index ef6c5ed1d6..0e173ab06d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
@@ -11,6 +11,7 @@
package org.eclipse.swt.accessibility;
+import java.lang.reflect.Constructor;
import java.util.Vector;
import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
@@ -48,8 +49,12 @@ public class Accessible {
Vector textListeners = new Vector ();
Object[] variants;
Control control;
-
- Accessible(Control control) {
+
+// public COMObject HACK () {
+// return objIAccessible;
+// }
+//
+ public Accessible(Control control) {
this.control = control;
int /*long*/[] ppvObject = new int /*long*/[1];
/* CreateStdAccessibleObject([in] hwnd, [in] idObject, [in] riidInterface, [out] ppvObject).
@@ -142,7 +147,30 @@ public class Accessible {
* @param control the control to get the accessible object for
* @return the platform specific accessible object
*/
+ //TEMPORARY CODE
+ public static String ACCESSIBLE_CLASS_NAME;
public static Accessible internal_new_Accessible(Control control) {
+ if (ACCESSIBLE_CLASS_NAME != null) {
+ Class clazz = null;
+ try {
+ clazz = Class.forName(ACCESSIBLE_CLASS_NAME);
+ } catch (Throwable e) {
+ SWT.error (SWT.ERROR_NOT_IMPLEMENTED, e);
+ }
+ Constructor constructor = null;
+ try {
+ constructor = clazz.getConstructor (new Class [] {Control.class});
+ } catch (Throwable e1) {
+ SWT.error (SWT.ERROR_NOT_IMPLEMENTED, e1);
+ }
+ Object value = null;
+ try {
+ value = constructor.newInstance (new Object [] {control});
+ } catch (Throwable e) {
+ SWT.error (SWT.ERROR_NOT_IMPLEMENTED, e);
+ }
+ return (Accessible)value;
+ }
return new Accessible(control);
}

Back to the top