--- old/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java 2018-12-11 16:46:31.919598400 +0530 +++ new/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java 2018-12-11 16:46:27.079730400 +0530 @@ -160,7 +160,7 @@ Thread abthread = new Thread(new dllRunner()); abthread.setDaemon(true); abthread.start(); - debugString("AccessBridge started"); + debugString("[INFO]:AccessBridge started"); } /* @@ -178,7 +178,7 @@ private class shutdownHook implements Runnable { public void run() { - debugString("***** shutdownHook: shutting down..."); + debugString("[INFO]:***** shutdownHook: shutting down..."); javaShutdown(); } } @@ -297,7 +297,7 @@ try { componentParemter[0] = Class.forName("java.awt.Component"); } catch (ClassNotFoundException e) { - debugString("Exception: " + e.toString()); + debugString("[ERROR]:Exception: " + e.toString()); } toolkit = Toolkit.getDefaultToolkit(); return; @@ -386,12 +386,12 @@ */ private void saveContextToWindowHandleMapping(AccessibleContext ac, int nativeHandle) { - debugString("saveContextToWindowHandleMapping..."); + debugString("[INFO]:saveContextToWindowHandleMapping..."); if (ac == null) { return; } if (! contextToWindowHandleMap.containsKey(ac)) { - debugString("saveContextToWindowHandleMapping: ac = "+ac+"; handle = "+nativeHandle); + debugString("[INFO]: saveContextToWindowHandleMapping: ac = "+ac+"; handle = "+nativeHandle); contextToWindowHandleMap.put(ac, nativeHandle); } } @@ -434,7 +434,7 @@ * returns 0 on error */ private int getNativeWindowHandleFromContext(AccessibleContext ac) { - debugString("getNativeWindowHandleFromContext: ac = "+ac); + debugString("[INFO]: getNativeWindowHandleFromContext: ac = "+ac); try { return contextToWindowHandleMap.get(ac); } catch (Exception ex) { @@ -515,7 +515,7 @@ */ private AccessibleContext getAccessibleContextAt_1(final int x, final int y, final AccessibleContext parent) { - debugString(" : getAccessibleContextAt_1 called"); + debugString("[INFO]: getAccessibleContextAt_1 called"); debugString(" -> x = " + x + " y = " + y + " parent = " + parent); if (parent == null) return null; @@ -563,7 +563,7 @@ */ private AccessibleContext getAccessibleContextAt_2(final int x, final int y, AccessibleContext parent) { - debugString("getAccessibleContextAt_2 called"); + debugString("[INFO]: getAccessibleContextAt_2 called"); debugString(" -> x = " + x + " y = " + y + " parent = " + parent); return InvocationUtils.invokeAndWait(new Callable() { @@ -573,7 +573,7 @@ if (a != null) { AccessibleContext childAC = a.getAccessibleContext(); if (childAC != null) { - debugString(" returning childAC = " + childAC); + debugString("[INFO]: returning childAC = " + childAC); return childAC; } } @@ -608,7 +608,7 @@ * returns the AccessibleName from an AccessibleContext */ private String getAccessibleNameFromContext(final AccessibleContext ac) { - debugString("***** ac = "+ac.getClass()); + debugString("[INFO]: ***** ac = "+ac.getClass()); if (ac != null) { String s = InvocationUtils.invokeAndWait(new Callable() { @Override @@ -618,13 +618,13 @@ }, ac); if (s != null) { references.increment(s); - debugString("Returning AccessibleName from Context: " + s); + debugString("[INFO]: Returning AccessibleName from Context: " + s); return s; } else { return null; } } else { - debugString("getAccessibleNameFromContext; ac = null!"); + debugString("[INFO]: getAccessibleNameFromContext; ac = null!"); return null; } } @@ -649,7 +649,7 @@ } }, ac); if ( ( null != nameString ) && ( 0 != nameString.length () ) ) { - debugString ("bk -- The Virtual Accessible Name was obtained from AccessibleContext::getAccessibleName."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from AccessibleContext::getAccessibleName."); references.increment (nameString); return nameString; } @@ -660,12 +660,12 @@ } }, ac); if ( ( null != descriptionString ) && ( 0 != descriptionString.length () ) ) { - debugString ("bk -- The Virtual Accessible Name was obtained from AccessibleContext::getAccessibleDescription."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from AccessibleContext::getAccessibleDescription."); references.increment (descriptionString); return descriptionString; } - debugString ("The Virtual Accessible Name was not found using AccessibleContext::getAccessibleDescription. or getAccessibleName"); + debugString ("[WARN]: The Virtual Accessible Name was not found using AccessibleContext::getAccessibleDescription. or getAccessibleName"); /* Step 2: ======= @@ -702,7 +702,7 @@ } if (false == bExtendedSearch) { - debugString ("bk -- getVirtualAccessibleNameFromContext will not use the extended name search algorithm. role = " + ( role != null ? role.toDisplayString(Locale.US) : "null") ); + debugString ("[INFO]: bk -- getVirtualAccessibleNameFromContext will not use the extended name search algorithm. role = " + ( role != null ? role.toDisplayString(Locale.US) : "null") ); /* Step 3: ======= @@ -735,7 +735,7 @@ }, ac); String text = getAccessibleTextRangeFromContext (ac, 0, charCount); if (null != text) { - debugString ("bk -- The Virtual Accessible Name was obtained from the Accessible Text of the LABEL object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from the Accessible Text of the LABEL object."); references.increment (text); return text; } @@ -743,7 +743,7 @@ /* Does the label support the Accessible Icon Interface? */ - debugString ("bk -- Attempting to obtain the Virtual Accessible Name from the Accessible Icon information."); + debugString ("[INFO]: bk -- Attempting to obtain the Virtual Accessible Name from the Accessible Icon information."); final AccessibleIcon [] ai = InvocationUtils.invokeAndWait(new Callable() { @Override public AccessibleIcon[] call() throws Exception { @@ -758,7 +758,7 @@ } }, ac); if (iconDescription != null){ - debugString ("bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the LABEL object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the LABEL object."); references.increment (iconDescription); return iconDescription; } @@ -780,7 +780,7 @@ } }, ac); final AccessibleContext acTableCell = getAccessibleChildFromContext (parentContext, indexInParent); - debugString ("bk -- Making a second attempt to obtain the Virtual Accessible Name from the Accessible Icon information for the Table Cell."); + debugString ("[INFO]: bk -- Making a second attempt to obtain the Virtual Accessible Name from the Accessible Icon information for the Table Cell."); if (acTableCell != null) { final AccessibleIcon [] aiRet =InvocationUtils.invokeAndWait(new Callable() { @Override @@ -796,7 +796,7 @@ } }, ac); if (iconDescription != null){ - debugString ("bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the Table Cell object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the Table Cell object."); references.increment (iconDescription); return iconDescription; } @@ -810,7 +810,7 @@ /* Does the button support the Accessible Icon Interface? */ - debugString ("bk -- Attempting to obtain the Virtual Accessible Name from the Accessible Icon information."); + debugString ("[INFO]: bk -- Attempting to obtain the Virtual Accessible Name from the Accessible Icon information."); final AccessibleIcon [] ai = InvocationUtils.invokeAndWait(new Callable() { @Override public AccessibleIcon[] call() throws Exception { @@ -825,7 +825,7 @@ } }, ac); if (iconDescription != null){ - debugString ("bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the TOGGLE_BUTTON or PUSH_BUTTON object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the TOGGLE_BUTTON or PUSH_BUTTON object."); references.increment (iconDescription); return iconDescription; } @@ -905,7 +905,7 @@ if ( (AccessibleRole.SLIDER == role) && (AccessibleRole.PANEL == parentRole) && (null != parentName) ) { - debugString ("bk -- The Virtual Accessible Name was obtained from the Accessible Name of the SLIDER object's parent object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from the Accessible Name of the SLIDER object's parent object."); references.increment (parentName); return parentName; } @@ -922,11 +922,11 @@ (AccessibleRole.COMBO_BOX == parentRole) ) { bIsEditCombo = true; if (null != parentName) { - debugString ("bk -- The Virtual Accessible Name for this Edit Combo box was obtained from the Accessible Name of the object's parent object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name for this Edit Combo box was obtained from the Accessible Name of the object's parent object."); references.increment (parentName); return parentName; } else if (null != parentDescription) { - debugString ("bk -- The Virtual Accessible Name for this Edit Combo box was obtained from the Accessible Description of the object's parent object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name for this Edit Combo box was obtained from the Accessible Description of the object's parent object."); references.increment (parentDescription); return parentDescription; } @@ -969,11 +969,11 @@ String labelName = labelContext.getAccessibleName (); String labelDescription = labelContext.getAccessibleDescription (); if (null != labelName) { - debugString ("bk -- The Virtual Accessible Name was obtained using the LABELED_BY AccessibleRelation -- Name Case."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained using the LABELED_BY AccessibleRelation -- Name Case."); references.increment (labelName); return labelName; } else if (null != labelDescription) { - debugString ("bk -- The Virtual Accessible Name was obtained using the LABELED_BY AccessibleRelation -- Description Case."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained using the LABELED_BY AccessibleRelation -- Description Case."); references.increment (labelDescription); return labelDescription; } @@ -1068,7 +1068,7 @@ } }, ac); if ( null != childName ) { - debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned to the left of the object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned to the left of the object."); references.increment (childName); return childName; } @@ -1079,7 +1079,7 @@ } }, ac); if ( null != childDescription ) { - debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned to the left of the object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned to the left of the object."); references.increment (childDescription); return childDescription; } @@ -1092,7 +1092,7 @@ } }, ac); if ( null != childName ) { - debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned above the object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned above the object."); references.increment (childName); return childName; } @@ -1103,7 +1103,7 @@ } }, ac); if ( null != childDescription ) { - debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned above the object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned above the object."); references.increment (childDescription); return childDescription; } @@ -1151,7 +1151,7 @@ } }, ac); if ( null != childName ) { - debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned to the left of the object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned to the left of the object."); references.increment (childName); return childName; } @@ -1162,7 +1162,7 @@ } }, ac); if ( null != childDescription ) { - debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned to the left of the object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned to the left of the object."); references.increment (childDescription); return childDescription; } @@ -1175,7 +1175,7 @@ } }, ac); if ( null != childName ) { - debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned above the object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned above the object."); references.increment (childName); return childName; } @@ -1186,7 +1186,7 @@ } }, ac); if ( null != childDescription ) { - debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned above the object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned above the object."); references.increment (childDescription); return childDescription; } @@ -1248,7 +1248,7 @@ } }, ac); if ( null != childName ) { - debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object."); references.increment (childName); return childName; } @@ -1259,7 +1259,7 @@ } }, ac); if ( null != childDescription ) { - debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object."); references.increment (childDescription); return childDescription; } @@ -1308,7 +1308,7 @@ } }, ac); if ( null != childName ) { - debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object."); references.increment (childName); return childName; } @@ -1319,7 +1319,7 @@ } }, ac); if ( null != childDescription ) { - debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object."); + debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object."); references.increment (childDescription); return childDescription; } @@ -1332,7 +1332,7 @@ } return null; } else { - debugString ("AccessBridge::getVirtualAccessibleNameFromContext error - ac == null."); + debugString ("[ERROR]: AccessBridge::getVirtualAccessibleNameFromContext error - ac == null."); return null; } } @@ -1350,11 +1350,11 @@ }, ac); if (s != null) { references.increment(s); - debugString("Returning AccessibleDescription from Context: " + s); + debugString("[INFO]: Returning AccessibleDescription from Context: " + s); return s; } } else { - debugString("getAccessibleDescriptionFromContext; ac = null"); + debugString("[ERROR]: getAccessibleDescriptionFromContext; ac = null"); } return null; } @@ -1374,12 +1374,12 @@ String s = role.toDisplayString(Locale.US); if (s != null) { references.increment(s); - debugString("Returning AccessibleRole from Context: " + s); + debugString("[INFO]: Returning AccessibleRole from Context: " + s); return s; } } } else { - debugString("getAccessibleRoleStringFromContext; ac = null"); + debugString("[ERROR]: getAccessibleRoleStringFromContext; ac = null"); } return null; } @@ -1418,12 +1418,12 @@ s += AccessibleState.MANAGES_DESCENDANTS.toDisplayString(Locale.US); } references.increment(s); - debugString("Returning AccessibleStateSet from Context: " + s); + debugString("[INFO]: Returning AccessibleStateSet from Context: " + s); return s; } } } else { - debugString("getAccessibleStatesStringFromContext; ac = null"); + debugString("[ERROR]: getAccessibleStatesStringFromContext; ac = null"); } return null; } @@ -1449,11 +1449,11 @@ } } references.increment(s); - debugString("Returning AccessibleStateSet en_US from Context: " + s); + debugString("[INFO]: Returning AccessibleStateSet en_US from Context: " + s); return s; } } - debugString("getAccessibleStatesStringFromContext; ac = null"); + debugString("[ERROR]: getAccessibleStatesStringFromContext; ac = null"); return null; } @@ -1607,11 +1607,11 @@ if (ac != null) { Rectangle r = getAccessibleBoundsOnScreenFromContext(ac); if (r != null) { - debugString(" - Returning Accessible x coord from Context: " + r.x); + debugString("[INFO]: Returning Accessible x coord from Context: " + r.x); return r.x; } } else { - debugString("getAccessibleXcoordFromContext ac = null"); + debugString("[ERROR]: getAccessibleXcoordFromContext ac = null"); } return -1; } @@ -1620,14 +1620,14 @@ * returns the AccessibleComponent y-coord from an AccessibleContext */ private int getAccessibleYcoordFromContext(AccessibleContext ac) { - debugString("getAccessibleYcoordFromContext() called"); + debugString("[INFO]: getAccessibleYcoordFromContext() called"); if (ac != null) { Rectangle r = getAccessibleBoundsOnScreenFromContext(ac); if (r != null) { return r.y; } } else { - debugString("getAccessibleYcoordFromContext; ac = null"); + debugString("[ERROR]: getAccessibleYcoordFromContext; ac = null"); } return -1; } @@ -1642,7 +1642,7 @@ return r.height; } } else { - debugString("getAccessibleHeightFromContext; ac = null"); + debugString("[ERROR]: getAccessibleHeightFromContext; ac = null"); } return -1; } @@ -1657,7 +1657,7 @@ return r.width; } } else { - debugString("getAccessibleWidthFromContext; ac = null"); + debugString("[ERROR]: getAccessibleWidthFromContext; ac = null"); } return -1; } @@ -1672,11 +1672,11 @@ return ac.getAccessibleComponent(); }, ac); if (acmp != null) { - debugString("Returning AccessibleComponent Context"); + debugString("[INFO]: Returning AccessibleComponent Context"); return acmp; } } else { - debugString("getAccessibleComponentFromContext; ac = null"); + debugString("[ERROR]: getAccessibleComponentFromContext; ac = null"); } return null; } @@ -1685,7 +1685,7 @@ * returns the AccessibleAction from an AccessibleContext */ private AccessibleAction getAccessibleActionFromContext(final AccessibleContext ac) { - debugString("Returning AccessibleAction Context"); + debugString("[INFO]: Returning AccessibleAction Context"); return ac == null ? null : InvocationUtils.invokeAndWait(new Callable() { @Override public AccessibleAction call() throws Exception { @@ -1737,7 +1737,7 @@ * XXX */ private Rectangle getCaretLocation(final AccessibleContext ac) { - debugString("getCaretLocation"); + debugString("[INFO]: getCaretLocation"); if (ac==null) return null; return InvocationUtils.invokeAndWait(new Callable() { @@ -1858,7 +1858,7 @@ */ private int getAccessibleIndexAtPointFromContext(final AccessibleContext ac, final int x, final int y) { - debugString("getAccessibleIndexAtPointFromContext: x = "+x+"; y = "+y); + debugString("[INFO]: getAccessibleIndexAtPointFromContext: x = "+x+"; y = "+y); if (ac==null) return -1; return InvocationUtils.invokeAndWait(new Callable() { @@ -1912,7 +1912,7 @@ return s; } } else { - debugString("getAccessibleLetterAtIndexFromContext; ac = null"); + debugString("[ERROR]: getAccessibleLetterAtIndexFromContext; ac = null"); } return null; } @@ -1935,7 +1935,7 @@ return s; } } else { - debugString("getAccessibleWordAtIndexFromContext; ac = null"); + debugString("[ERROR]: getAccessibleWordAtIndexFromContext; ac = null"); } return null; } @@ -1958,7 +1958,7 @@ return s; } } else { - debugString("getAccessibleSentenceAtIndexFromContext; ac = null"); + debugString("[ERROR]: getAccessibleSentenceAtIndexFromContext; ac = null"); } return null; } @@ -2016,7 +2016,7 @@ return s; } } else { - debugString("getAccessibleTextSelectedTextFromContext; ac = null"); + debugString("[ERROR]: getAccessibleTextSelectedTextFromContext; ac = null"); } return null; } @@ -2277,7 +2277,7 @@ return r.x; } } else { - debugString("getAccessibleXcoordTextRectAtIndexFromContext; ac = null"); + debugString("[ERROR]: getAccessibleXcoordTextRectAtIndexFromContext; ac = null"); } return -1; } @@ -2292,7 +2292,7 @@ return r.y; } } else { - debugString("getAccessibleYcoordTextRectAtIndexFromContext; ac = null"); + debugString("[ERROR]: getAccessibleYcoordTextRectAtIndexFromContext; ac = null"); } return -1; } @@ -2307,7 +2307,7 @@ return r.height; } } else { - debugString("getAccessibleHeightTextRectAtIndexFromContext; ac = null"); + debugString("[ERROR]: getAccessibleHeightTextRectAtIndexFromContext; ac = null"); } return -1; } @@ -2322,7 +2322,7 @@ return r.width; } } else { - debugString("getAccessibleWidthTextRectAtIndexFromContext; ac = null"); + debugString("[ERROR]: getAccessibleWidthTextRectAtIndexFromContext; ac = null"); } return -1; } @@ -2336,7 +2336,7 @@ if (as != null) { return StyleConstants.isBold(as); } else { - debugString("getBoldFromAttributeSet; as = null"); + debugString("[ERROR]: getBoldFromAttributeSet; as = null"); } return false; } @@ -2348,7 +2348,7 @@ if (as != null) { return StyleConstants.isItalic(as); } else { - debugString("getItalicFromAttributeSet; as = null"); + debugString("[ERROR]: getItalicFromAttributeSet; as = null"); } return false; } @@ -2360,7 +2360,7 @@ if (as != null) { return StyleConstants.isUnderline(as); } else { - debugString("getUnderlineFromAttributeSet; as = null"); + debugString("[ERROR]: getUnderlineFromAttributeSet; as = null"); } return false; } @@ -2372,7 +2372,7 @@ if (as != null) { return StyleConstants.isStrikeThrough(as); } else { - debugString("getStrikethroughFromAttributeSet; as = null"); + debugString("[ERROR]: getStrikethroughFromAttributeSet; as = null"); } return false; } @@ -2384,7 +2384,7 @@ if (as != null) { return StyleConstants.isSuperscript(as); } else { - debugString("getSuperscriptFromAttributeSet; as = null"); + debugString("[ERROR]: getSuperscriptFromAttributeSet; as = null"); } return false; } @@ -2396,7 +2396,7 @@ if (as != null) { return StyleConstants.isSubscript(as); } else { - debugString("getSubscriptFromAttributeSet; as = null"); + debugString("[ERROR]: getSubscriptFromAttributeSet; as = null"); } return false; } @@ -2412,7 +2412,7 @@ return s; } } else { - debugString("getBackgroundColorFromAttributeSet; as = null"); + debugString("[ERROR]: getBackgroundColorFromAttributeSet; as = null"); } return null; } @@ -2428,7 +2428,7 @@ return s; } } else { - debugString("getForegroundColorFromAttributeSet; as = null"); + debugString("[ERROR]: getForegroundColorFromAttributeSet; as = null"); } return null; } @@ -2444,7 +2444,7 @@ return s; } } else { - debugString("getFontFamilyFromAttributeSet; as = null"); + debugString("[ERROR]: getFontFamilyFromAttributeSet; as = null"); } return null; } @@ -2456,7 +2456,7 @@ if (as != null) { return StyleConstants.getFontSize(as); } else { - debugString("getFontSizeFromAttributeSet; as = null"); + debugString("[ERROR]: getFontSizeFromAttributeSet; as = null"); } return -1; } @@ -2468,7 +2468,7 @@ if (as != null) { return StyleConstants.getAlignment(as); } else { - debugString("getAlignmentFromAttributeSet; as = null"); + debugString("[ERROR]: getAlignmentFromAttributeSet; as = null"); } return -1; } @@ -2480,7 +2480,7 @@ if (as != null) { return StyleConstants.getBidiLevel(as); } else { - debugString("getBidiLevelFromAttributeSet; as = null"); + debugString("[ERROR]: getBidiLevelFromAttributeSet; as = null"); } return -1; } @@ -2493,7 +2493,7 @@ if (as != null) { return StyleConstants.getFirstLineIndent(as); } else { - debugString("getFirstLineIndentFromAttributeSet; as = null"); + debugString("[ERROR]: getFirstLineIndentFromAttributeSet; as = null"); } return -1; } @@ -2505,7 +2505,7 @@ if (as != null) { return StyleConstants.getLeftIndent(as); } else { - debugString("getLeftIndentFromAttributeSet; as = null"); + debugString("[ERROR]: getLeftIndentFromAttributeSet; as = null"); } return -1; } @@ -2517,7 +2517,7 @@ if (as != null) { return StyleConstants.getRightIndent(as); } else { - debugString("getRightIndentFromAttributeSet; as = null"); + debugString("[ERROR]: getRightIndentFromAttributeSet; as = null"); } return -1; } @@ -2529,7 +2529,7 @@ if (as != null) { return StyleConstants.getLineSpacing(as); } else { - debugString("getLineSpacingFromAttributeSet; as = null"); + debugString("[ERROR]: getLineSpacingFromAttributeSet; as = null"); } return -1; } @@ -2541,7 +2541,7 @@ if (as != null) { return StyleConstants.getSpaceAbove(as); } else { - debugString("getSpaceAboveFromAttributeSet; as = null"); + debugString("[ERROR]: getSpaceAboveFromAttributeSet; as = null"); } return -1; } @@ -2553,7 +2553,7 @@ if (as != null) { return StyleConstants.getSpaceBelow(as); } else { - debugString("getSpaceBelowFromAttributeSet; as = null"); + debugString("[ERROR]: getSpaceBelowFromAttributeSet; as = null"); } return -1; } @@ -2702,7 +2702,7 @@ } } } else { - debugString("getCurrentAccessibleValueFromContext; ac = null"); + debugString("[ERROR]: getCurrentAccessibleValueFromContext; ac = null"); } return null; } @@ -2730,7 +2730,7 @@ } } } else { - debugString("getMaximumAccessibleValueFromContext; ac = null"); + debugString("[ERROR]: getMaximumAccessibleValueFromContext; ac = null"); } return null; } @@ -2758,7 +2758,7 @@ } } } else { - debugString("getMinimumAccessibleValueFromContext; ac = null"); + debugString("[ERROR]: getMinimumAccessibleValueFromContext; ac = null"); } return null; } @@ -2941,7 +2941,7 @@ * returns the row count for an AccessibleTable */ private int getAccessibleTableRowCount(final AccessibleContext ac) { - debugString("##### getAccessibleTableRowCount"); + debugString("[INFO]: ##### getAccessibleTableRowCount"); return InvocationUtils.invokeAndWait(new Callable() { @Override public Integer call() throws Exception { @@ -2960,7 +2960,7 @@ * returns the column count for an AccessibleTable */ private int getAccessibleTableColumnCount(final AccessibleContext ac) { - debugString("##### getAccessibleTableColumnCount"); + debugString("[INFO]: ##### getAccessibleTableColumnCount"); return InvocationUtils.invokeAndWait(new Callable() { @Override public Integer call() throws Exception { @@ -2980,7 +2980,7 @@ */ private AccessibleContext getAccessibleTableCellAccessibleContext(final AccessibleTable at, final int row, final int column) { - debugString("getAccessibleTableCellAccessibleContext: at = "+at.getClass()); + debugString("[INFO]: getAccessibleTableCellAccessibleContext: at = "+at.getClass()); if (at == null) return null; return InvocationUtils.invokeAndWait(new Callable() { @Override @@ -3025,7 +3025,7 @@ * returns the index of a cell at a given row and column in an AccessibleTable */ private int getAccessibleTableCellIndex(final AccessibleTable at, int row, int column) { - debugString("##### getAccessibleTableCellIndex: at="+at); + debugString("[INFO]: ##### getAccessibleTableCellIndex: at="+at); if (at != null) { int cellIndex = row * InvocationUtils.invokeAndWait(new Callable() { @@ -3035,10 +3035,10 @@ } }, getContextFromAccessibleTable(at)) + column; - debugString(" ##### getAccessibleTableCellIndex="+cellIndex); + debugString("[INFO]: ##### getAccessibleTableCellIndex="+cellIndex); return cellIndex; } - debugString(" ##### getAccessibleTableCellIndex FAILED"); + debugString("[ERROR]: ##### getAccessibleTableCellIndex FAILED"); return -1; } @@ -3046,7 +3046,7 @@ * returns the row extent of a cell at a given row and column in an AccessibleTable */ private int getAccessibleTableCellRowExtent(final AccessibleTable at, final int row, final int column) { - debugString("##### getAccessibleTableCellRowExtent"); + debugString("[INFO]: ##### getAccessibleTableCellRowExtent"); if (at != null) { int rowExtent = InvocationUtils.invokeAndWait(new Callable() { @Override @@ -3055,10 +3055,10 @@ } }, getContextFromAccessibleTable(at)); - debugString(" ##### getAccessibleTableCellRowExtent="+rowExtent); + debugString("[INFO]: ##### getAccessibleTableCellRowExtent="+rowExtent); return rowExtent; } - debugString(" ##### getAccessibleTableCellRowExtent FAILED"); + debugString("[ERROR]: ##### getAccessibleTableCellRowExtent FAILED"); return -1; } @@ -3066,7 +3066,7 @@ * returns the column extent of a cell at a given row and column in an AccessibleTable */ private int getAccessibleTableCellColumnExtent(final AccessibleTable at, final int row, final int column) { - debugString("##### getAccessibleTableCellColumnExtent"); + debugString("[INFO]: ##### getAccessibleTableCellColumnExtent"); if (at != null) { int columnExtent = InvocationUtils.invokeAndWait(new Callable() { @Override @@ -3075,10 +3075,10 @@ } }, getContextFromAccessibleTable(at)); - debugString(" ##### getAccessibleTableCellColumnExtent="+columnExtent); + debugString("[INFO]: ##### getAccessibleTableCellColumnExtent="+columnExtent); return columnExtent; } - debugString(" ##### getAccessibleTableCellColumnExtent FAILED"); + debugString("[ERROR]: ##### getAccessibleTableCellColumnExtent FAILED"); return -1; } @@ -3087,7 +3087,7 @@ */ private boolean isAccessibleTableCellSelected(final AccessibleTable at, final int row, final int column) { - debugString("##### isAccessibleTableCellSelected: ["+row+"]["+column+"]"); + debugString("[INFO]: ##### isAccessibleTableCellSelected: ["+row+"]["+column+"]"); if (at == null) return false; return InvocationUtils.invokeAndWait(new Callable() { @@ -3114,7 +3114,7 @@ * AccessibleTable */ private AccessibleTable getAccessibleTableRowHeader(final AccessibleContext ac) { - debugString(" ##### getAccessibleTableRowHeader called"); + debugString("[INFO]: ##### getAccessibleTableRowHeader called"); AccessibleTable at = InvocationUtils.invokeAndWait(new Callable() { @Override public AccessibleTable call() throws Exception { @@ -3138,7 +3138,7 @@ * AccessibleTable */ private AccessibleTable getAccessibleTableColumnHeader(final AccessibleContext ac) { - debugString("##### getAccessibleTableColumnHeader"); + debugString("[INFO]: ##### getAccessibleTableColumnHeader"); if (ac == null) return null; AccessibleTable at = InvocationUtils.invokeAndWait(new Callable() { @@ -3177,7 +3177,7 @@ */ private int getAccessibleTableRowHeaderRowCount(AccessibleContext ac) { - debugString(" ##### getAccessibleTableRowHeaderRowCount called"); + debugString("[INFO]: ##### getAccessibleTableRowHeaderRowCount called"); if (ac != null) { final AccessibleTable atRowHeader = getAccessibleTableRowHeader(ac); if (atRowHeader != null) { @@ -3200,7 +3200,7 @@ * the row header in an AccessibleTable */ private int getAccessibleTableRowHeaderColumnCount(AccessibleContext ac) { - debugString(" ##### getAccessibleTableRowHeaderColumnCount called"); + debugString("[INFO]: ##### getAccessibleTableRowHeaderColumnCount called"); if (ac != null) { final AccessibleTable atRowHeader = getAccessibleTableRowHeader(ac); if (atRowHeader != null) { @@ -3215,7 +3215,7 @@ }, ac); } } - debugString(" ##### getAccessibleTableRowHeaderColumnCount FAILED"); + debugString("[ERROR]: ##### getAccessibleTableRowHeaderColumnCount FAILED"); return -1; } @@ -3225,7 +3225,7 @@ */ private int getAccessibleTableColumnHeaderRowCount(AccessibleContext ac) { - debugString("##### getAccessibleTableColumnHeaderRowCount"); + debugString("[INFO]: ##### getAccessibleTableColumnHeaderRowCount"); if (ac != null) { final AccessibleTable atColumnHeader = getAccessibleTableColumnHeader(ac); if (atColumnHeader != null) { @@ -3240,7 +3240,7 @@ }, ac); } } - debugString(" ##### getAccessibleTableColumnHeaderRowCount FAILED"); + debugString("[ERROR]: ##### getAccessibleTableColumnHeaderRowCount FAILED"); return -1; } @@ -3250,7 +3250,7 @@ */ private int getAccessibleTableColumnHeaderColumnCount(AccessibleContext ac) { - debugString("##### getAccessibleTableColumnHeaderColumnCount"); + debugString("[ERROR]: ##### getAccessibleTableColumnHeaderColumnCount"); if (ac != null) { final AccessibleTable atColumnHeader = getAccessibleTableColumnHeader(ac); if (atColumnHeader != null) { @@ -3265,7 +3265,7 @@ }, ac); } } - debugString(" ##### getAccessibleTableColumnHeaderColumnCount FAILED"); + debugString("[ERROR]: ##### getAccessibleTableColumnHeaderColumnCount FAILED"); return -1; } @@ -3532,7 +3532,7 @@ */ private AccessibleContext getAccessibleRelationTarget(final AccessibleContext ac, final int i, final int j) { - debugString("***** getAccessibleRelationTarget"); + debugString("[INFO]: ***** getAccessibleRelationTarget"); return InvocationUtils.invokeAndWait(new Callable() { @Override public AccessibleContext call() throws Exception { @@ -3565,7 +3565,7 @@ * Returns the AccessibleHypertext */ private AccessibleHypertext getAccessibleHypertext(final AccessibleContext ac) { - debugString("getAccessibleHyperlink"); + debugString("[INFO]: getAccessibleHyperlink"); if (ac==null) return null; AccessibleHypertext hypertext = InvocationUtils.invokeAndWait(new Callable() { @@ -3586,7 +3586,7 @@ * Returns the number of AccessibleHyperlinks */ private int getAccessibleHyperlinkCount(AccessibleContext ac) { - debugString("getAccessibleHyperlinkCount"); + debugString("[INFO]: getAccessibleHyperlinkCount"); if (ac == null) { return 0; } @@ -3607,7 +3607,7 @@ * Returns the hyperlink at the specified index */ private AccessibleHyperlink getAccessibleHyperlink(final AccessibleHypertext hypertext, final int i) { - debugString("getAccessibleHyperlink"); + debugString("[INFO]: getAccessibleHyperlink"); if (hypertext == null) { return null; } @@ -3639,7 +3639,7 @@ * Returns the hyperlink object description */ private String getAccessibleHyperlinkText(final AccessibleHyperlink link) { - debugString("getAccessibleHyperlinkText"); + debugString("[INFO]: getAccessibleHyperlinkText"); if (link == null) { return null; } @@ -3659,7 +3659,7 @@ * Returns the hyperlink URL */ private String getAccessibleHyperlinkURL(final AccessibleHyperlink link) { - debugString("getAccessibleHyperlinkURL"); + debugString("[INFO]: getAccessibleHyperlinkURL"); if (link == null) { return null; } @@ -3680,7 +3680,7 @@ * Returns the start index of the hyperlink text */ private int getAccessibleHyperlinkStartIndex(final AccessibleHyperlink link) { - debugString("getAccessibleHyperlinkStartIndex"); + debugString("[INFO]: getAccessibleHyperlinkStartIndex"); if (link == null) { return -1; } @@ -3696,7 +3696,7 @@ * Returns the end index of the hyperlink text */ private int getAccessibleHyperlinkEndIndex(final AccessibleHyperlink link) { - debugString("getAccessibleHyperlinkEndIndex"); + debugString("[INFO]: getAccessibleHyperlinkEndIndex"); if (link == null) { return -1; } @@ -3714,7 +3714,7 @@ * is no hyperlink associated with this index. */ private int getAccessibleHypertextLinkIndex(final AccessibleHypertext hypertext, final int charIndex) { - debugString("getAccessibleHypertextLinkIndex: charIndex = "+charIndex); + debugString("[INFO]: getAccessibleHypertextLinkIndex: charIndex = "+charIndex); if (hypertext == null) { return -1; } @@ -3724,7 +3724,7 @@ return hypertext.getLinkIndex(charIndex); } }, hyperTextContextMap.get(hypertext)); - debugString("getAccessibleHypertextLinkIndex returning "+linkIndex); + debugString("[INFO]: getAccessibleHypertextLinkIndex returning "+linkIndex); return linkIndex; } @@ -3743,7 +3743,7 @@ return link.doAccessibleAction(0); } }, ac); - debugString("activateAccessibleHyperlink: returning = "+retval); + debugString("[INFO]: activateAccessibleHyperlink: returning = "+retval); return retval; } @@ -3871,17 +3871,17 @@ int fKey = fKeyNumber(keyStroke); if (fKey != 0) { // return 0x00000001 through 0x00000018 - debugString(" Shortcut is: F" + fKey); + debugString("[INFO]: Shortcut is: F" + fKey); return (char)fKey; } // If the accelerator is a control character, return it int keyCode = controlCode(keyStroke); if (keyCode != 0) { - debugString(" Shortcut is control character: " + Integer.toHexString(keyCode)); + debugString("[INFO]: Shortcut is control character: " + Integer.toHexString(keyCode)); return (char)keyCode; } String keyText = KeyEvent.getKeyText(keyStroke.getKeyCode()); - debugString(" Shortcut is: " + keyText); + debugString("[INFO]: Shortcut is: " + keyText); if (keyText != null || keyText.length() > 0) { CharSequence seq = keyText.subSequence(0, 1); if (seq != null || seq.length() > 0) { @@ -3897,7 +3897,7 @@ private int getModifiers(KeyStroke keyStroke) { if (keyStroke == null) return 0; - debugString("In AccessBridge.getModifiers"); + debugString("[INFO]: In AccessBridge.getModifiers"); // modifiers is a bit strip where bits 0-7 indicate a traditional modifier // such as Ctrl/Alt/Shift, bit 8 indicates an F key shortcut, and bit 9 indicates // a control code shortcut such as the delete key. @@ -3924,15 +3924,15 @@ // 0-3 are shift, ctrl, meta, alt // 4-7 are for Solaris workstations (though not being used) if (text.startsWith("met")) { - debugString(" found meta"); + debugString("[INFO]: found meta"); modifiers |= ActionEvent.META_MASK; } if (text.startsWith("ctr")) { - debugString(" found ctrl"); + debugString("[INFO]: found ctrl"); modifiers |= ActionEvent.CTRL_MASK; } if (text.startsWith("alt")) { - debugString(" found alt"); + debugString("[INFO]: found alt"); modifiers |= ActionEvent.ALT_MASK; } if (text.startsWith("shi")) { @@ -3940,7 +3940,7 @@ modifiers |= ActionEvent.SHIFT_MASK; } } - debugString(" returning modifiers: 0x" + Integer.toHexString(modifiers)); + debugString("[INFO]: returning modifiers: 0x" + Integer.toHexString(modifiers)); return modifiers; } @@ -4019,7 +4019,7 @@ * return the number of icons associated with this context */ private int getAccessibleIconsCount(final AccessibleContext ac) { - debugString("getAccessibleIconsCount"); + debugString("[INFO]: getAccessibleIconsCount"); if (ac == null) { return 0; } @@ -4039,7 +4039,7 @@ * return icon description at the specified index */ private String getAccessibleIconDescription(final AccessibleContext ac, final int index) { - debugString("getAccessibleIconDescription: index = "+index); + debugString("[INFO]: getAccessibleIconDescription: index = "+index); if (ac == null) { return null; } @@ -4059,7 +4059,7 @@ * return icon height at the specified index */ private int getAccessibleIconHeight(final AccessibleContext ac, final int index) { - debugString("getAccessibleIconHeight: index = "+index); + debugString("[INFO]: getAccessibleIconHeight: index = "+index); if (ac == null) { return 0; } @@ -4079,7 +4079,7 @@ * return icon width at the specified index */ private int getAccessibleIconWidth(final AccessibleContext ac, final int index) { - debugString("getAccessibleIconWidth: index = "+index); + debugString("[INFO]: getAccessibleIconWidth: index = "+index); if (ac == null) { return 0; } @@ -4101,7 +4101,7 @@ * return the number of icons associated with this context */ private int getAccessibleActionsCount(final AccessibleContext ac) { - debugString("getAccessibleActionsCount"); + debugString("[INFO]: getAccessibleActionsCount"); if (ac == null) { return 0; } @@ -4120,7 +4120,7 @@ * return icon description at the specified index */ private String getAccessibleActionName(final AccessibleContext ac, final int index) { - debugString("getAccessibleActionName: index = "+index); + debugString("[INFO]: getAccessibleActionName: index = "+index); if (ac == null) { return null; } @@ -4139,7 +4139,7 @@ * return icon description at the specified index */ private boolean doAccessibleActions(final AccessibleContext ac, final String name) { - debugString("doAccessibleActions: action name = "+name); + debugString("[INFO]: doAccessibleActions: action name = "+name); if (ac == null || name == null) { return false; } @@ -4177,14 +4177,14 @@ * Returns whether successful. */ private boolean setTextContents(final AccessibleContext ac, final String text) { - debugString("setTextContents: ac = "+ac+"; text = "+text); + debugString("[INFO]: setTextContents: ac = "+ac+"; text = "+text); if (! (ac instanceof AccessibleEditableText)) { - debugString(" ac not instanceof AccessibleEditableText: "+ac); + debugString("[WARN]: ac not instanceof AccessibleEditableText: "+ac); return false; } if (text == null) { - debugString(" text is null"); + debugString("[WARN]: text is null"); return false; } @@ -4221,7 +4221,7 @@ * (AccessibleContext)0 on error. */ private AccessibleContext getTopLevelObject (final AccessibleContext ac) { - debugString("getTopLevelObject; ac = "+ac); + debugString("[INFO]: getTopLevelObject; ac = "+ac); if (ac == null) { return null; } @@ -4258,8 +4258,7 @@ */ private AccessibleContext getParentWithRole (final AccessibleContext ac, final String roleName) { - debugString("getParentWithRole; ac = "+ac); - debugString("role = "+roleName); + debugString("[INFO]: getParentWithRole; ac = "+ac + "\n role = "+roleName); if (ac == null || roleName == null) { return null; } @@ -4315,7 +4314,7 @@ * Returns -1 on error. */ private int getObjectDepth(final AccessibleContext ac) { - debugString("getObjectDepth: ac = "+ac); + debugString("[INFO]: getObjectDepth: ac = "+ac); if (ac == null) { return -1; @@ -4344,7 +4343,7 @@ * Returns (AccessibleContext)0 on error. */ private AccessibleContext getActiveDescendent (final AccessibleContext ac) { - debugString("getActiveDescendent: ac = "+ac); + debugString("[INFO]: getActiveDescendent: ac = "+ac); if (ac == null) { return null; } @@ -4412,7 +4411,7 @@ * Bug ID 4916682 - Implement JAWS AccessibleName policy */ private String getJAWSAccessibleName(final AccessibleContext ac) { - debugString("getJAWSAccessibleName"); + debugString("[INFO]: getJAWSAccessibleName"); if (ac == null) { return null; } @@ -4431,7 +4430,7 @@ * Bug ID 4944757 - requestFocus method needed */ private boolean requestFocus(final AccessibleContext ac) { - debugString("requestFocus"); + debugString("[INFO]: requestFocus"); if (ac == null) { return false; } @@ -4456,7 +4455,7 @@ * Bug ID 4944758 - selectTextRange method needed */ private boolean selectTextRange(final AccessibleContext ac, final int startIndex, final int endIndex) { - debugString("selectTextRange: start = "+startIndex+"; end = "+endIndex); + debugString("[INFO]: selectTextRange: start = "+startIndex+"; end = "+endIndex); if (ac == null) { return false; } @@ -4482,7 +4481,7 @@ * Bug ID 4944770 - setCaretPosition method needed */ private boolean setCaretPosition(final AccessibleContext ac, final int position) { - debugString("setCaretPosition: position = "+position); + debugString("[INFO]: setCaretPosition: position = "+position); if (ac == null) { return false; } @@ -4510,13 +4509,13 @@ private boolean _foundVisibleChild; private int getVisibleChildrenCount(AccessibleContext ac) { - debugString("getVisibleChildrenCount"); + debugString("[INFO]: getVisibleChildrenCount"); if (ac == null) { return -1; } _visibleChildrenCount = 0; _getVisibleChildrenCount(ac); - debugString(" _visibleChildrenCount = "+_visibleChildrenCount); + debugString("[INFO]: _visibleChildrenCount = "+_visibleChildrenCount); return _visibleChildrenCount; } @@ -4656,7 +4655,7 @@ * Bug ID 4944762- getVisibleChildren for list-like components needed */ private AccessibleContext getVisibleChild(AccessibleContext ac, int index) { - debugString("getVisibleChild: index = "+index); + debugString("[INFO]: getVisibleChild: index = "+index); if (ac == null) { return null; } @@ -4666,7 +4665,7 @@ _getVisibleChild(ac, index); if (_visibleChild != null) { - debugString( " getVisibleChild: found child = " + + debugString( "[INFO]: getVisibleChild: found child = " + InvocationUtils.invokeAndWait(new Callable() { @Override public String call() throws Exception { @@ -4855,7 +4854,7 @@ */ void increment(Object o) { if (o == null){ - debugString("ObjectReferences::increment - Passed in object is null"); + debugString("[WARN]: ObjectReferences::increment - Passed in object is null"); return; } @@ -4876,10 +4875,10 @@ if (aRef.value == 0) { refs.remove(o); } else if (aRef.value < 0) { - debugString("ERROR: decrementing reference count below 0"); + debugString("[ERROR]: decrementing reference count below 0"); } } else { - debugString("ERROR: object to decrement not in ObjectReferences table"); + debugString("[ERROR]: object to decrement not in ObjectReferences table"); } } @@ -5214,7 +5213,7 @@ // This is invoked on the EDT , as public void propertyChange(PropertyChangeEvent e) { - accessBridge.debugString("propertyChange(" + e.toString() + ") called"); + accessBridge.debugString("[INFO]: propertyChange(" + e.toString() + ") called"); if (e != null && (accessibilityEventMask & PROPERTY_EVENTS) != 0) { Object o = e.getSource(); @@ -5232,7 +5231,7 @@ if (ac != null) { InvocationUtils.registerAccessibleContext(ac, AppContext.getAppContext()); - accessBridge.debugString("AccessibleContext: " + ac); + accessBridge.debugString("[INFO]: AccessibleContext: " + ac); String propertyName = e.getPropertyName(); if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_CARET_PROPERTY) == 0) { @@ -5245,8 +5244,7 @@ if (e.getNewValue() instanceof Integer) { newValue = ((Integer) e.getNewValue()).intValue(); } - accessBridge.debugString(" - about to call propertyCaretChange()"); - accessBridge.debugString(" old value: " + oldValue + "new value: " + newValue); + accessBridge.debugString("[INFO]: - about to call propertyCaretChange() old value: " + oldValue + "new value: " + newValue); accessBridge.propertyCaretChange(e, ac, oldValue, newValue); } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY) == 0) { @@ -5259,8 +5257,7 @@ if (e.getNewValue() != null) { newValue = e.getNewValue().toString(); } - accessBridge.debugString(" - about to call propertyDescriptionChange()"); - accessBridge.debugString(" old value: " + oldValue + "new value: " + newValue); + accessBridge.debugString("[INFO]: - about to call propertyDescriptionChange() old value: " + oldValue + "new value: " + newValue); accessBridge.propertyDescriptionChange(e, ac, oldValue, newValue); } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_NAME_PROPERTY) == 0) { @@ -5273,12 +5270,11 @@ if (e.getNewValue() != null) { newValue = e.getNewValue().toString(); } - accessBridge.debugString(" - about to call propertyNameChange()"); - accessBridge.debugString(" old value: " + oldValue + " new value: " + newValue); + accessBridge.debugString("[INFO]: - about to call propertyNameChange() old value: " + oldValue + " new value: " + newValue); accessBridge.propertyNameChange(e, ac, oldValue, newValue); } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY) == 0) { - accessBridge.debugString(" - about to call propertySelectionChange() " + ac + " " + Thread.currentThread() + " " + e.getSource()); + accessBridge.debugString("[INFO]: - about to call propertySelectionChange() " + ac + " " + Thread.currentThread() + " " + e.getSource()); accessBridge.propertySelectionChange(e, ac); @@ -5296,11 +5292,11 @@ newValue = newState.toDisplayString(Locale.US); } - accessBridge.debugString(" - about to call propertyStateChange()"); + accessBridge.debugString("[INFO]: - about to call propertyStateChange()"); accessBridge.propertyStateChange(e, ac, oldValue, newValue); } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_TEXT_PROPERTY) == 0) { - accessBridge.debugString(" - about to call propertyTextChange()"); + accessBridge.debugString("[INFO]: - about to call propertyTextChange()"); accessBridge.propertyTextChange(e, ac); } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY) == 0) { // strings 'cause of floating point, etc. @@ -5313,7 +5309,7 @@ if (e.getNewValue() != null) { newValue = e.getNewValue().toString(); } - accessBridge.debugString(" - about to call propertyDescriptionChange()"); + accessBridge.debugString("[INFO]: - about to call propertyDescriptionChange()"); accessBridge.propertyValueChange(e, ac, oldValue, newValue); } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY) == 0) { @@ -5332,8 +5328,7 @@ newAC = (AccessibleContext) e.getNewValue(); InvocationUtils.registerAccessibleContext(newAC, AppContext.getAppContext()); } - accessBridge.debugString(" - about to call propertyChildChange()"); - accessBridge.debugString(" old AC: " + oldAC + "new AC: " + newAC); + accessBridge.debugString("[INFO]: - about to call propertyChildChange() old AC: " + oldAC + "new AC: " + newAC); accessBridge.propertyChildChange(e, ac, oldAC, newAC); } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY) == 0) { @@ -5396,10 +5391,7 @@ } prevAC = newAC; - accessBridge.debugString(" - about to call propertyActiveDescendentChange()"); - accessBridge.debugString(" AC: " + ac); - accessBridge.debugString(" old AC: " + oldAC + "new AC: " + newAC); - + accessBridge.debugString("[INFO]: - about to call propertyActiveDescendentChange() AC: " + ac + " old AC: " + oldAC + "new AC: " + newAC); InvocationUtils.registerAccessibleContext(oldAC, AppContext.getAppContext()); InvocationUtils.registerAccessibleContext(newAC, AppContext.getAppContext()); accessBridge.propertyActiveDescendentChange(e, ac, oldAC, newAC); @@ -5444,10 +5436,9 @@ // This is a popup with an item selected FocusEvent e = new FocusEvent(last, FocusEvent.FOCUS_GAINED); - accessBridge.debugString(" - about to call focusGained()"); AccessibleContext focusedAC = last.getAccessibleContext(); InvocationUtils.registerAccessibleContext(focusedAC, SunToolkit.targetToAppContext(last)); - accessBridge.debugString(" AC: " + focusedAC); + accessBridge.debugString("[INFO]: - about to call focusGained() AC: " + focusedAC); accessBridge.focusGained(e, focusedAC); } } @@ -5456,10 +5447,9 @@ if (focusOwner instanceof Accessible) { FocusEvent e = new FocusEvent(focusOwner, FocusEvent.FOCUS_GAINED); - accessBridge.debugString(" - about to call focusGained()"); AccessibleContext focusedAC = focusOwner.getAccessibleContext(); InvocationUtils.registerAccessibleContext(focusedAC, SunToolkit.targetToAppContext(focusOwner)); - accessBridge.debugString(" AC: " + focusedAC); + accessBridge.debugString("[INFO]: - about to call focusGained() AC: " + focusedAC); accessBridge.focusGained(e, focusedAC); } } @@ -5469,8 +5459,7 @@ if (e != null && (javaEventMask & FOCUS_LOST_EVENTS) != 0) { Accessible a = Translator.getAccessible(e.getSource()); if (a != null) { - accessBridge.debugString(" - about to call focusLost()"); - accessBridge.debugString(" AC: " + a.getAccessibleContext()); + accessBridge.debugString("[INFO]: - about to call focusLost() AC: " + a.getAccessibleContext()); AccessibleContext context = a.getAccessibleContext(); InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext()); accessBridge.focusLost(e, context); @@ -6173,7 +6162,7 @@ isLeaf = treeModel.isLeaf(obj); } } - debugString("AccessibleJTreeNode: name = "+getAccessibleName()+"; TreePath = "+p+"; parent = "+ap); + debugString("[INFO]: AccessibleJTreeNode: name = "+getAccessibleName()+"; TreePath = "+p+"; parent = "+ap); } private TreePath getChildTreePath(int i) { @@ -6213,14 +6202,14 @@ } private Component getCurrentComponent() { - debugString("AccessibleJTreeNode: getCurrentComponent"); + debugString("[INFO]: AccessibleJTreeNode: getCurrentComponent"); // is the object visible? // if so, get row, selected, focus & leaf state, // and then get the renderer component and return it if (tree != null && tree.isVisible(path)) { TreeCellRenderer r = tree.getCellRenderer(); if (r == null) { - debugString(" returning null 1"); + debugString("[WARN]: returning null 1"); return null; } TreeUI ui = tree.getUI(); @@ -6232,11 +6221,11 @@ Component retval = r.getTreeCellRendererComponent(tree, obj, selected, expanded, isLeaf, row, hasFocus); - debugString(" returning = "+retval.getClass()); + debugString("[INFO]: returning = "+retval.getClass()); return retval; } } - debugString(" returning null 2"); + debugString("[WARN]: returning null 2"); return null; } @@ -6249,13 +6238,13 @@ * object does not have a name */ public String getAccessibleName() { - debugString("AccessibleJTreeNode: getAccessibleName"); + debugString("[INFO]: AccessibleJTreeNode: getAccessibleName"); AccessibleContext ac = getCurrentAccessibleContext(); if (ac != null) { String name = ac.getAccessibleName(); if ((name != null) && (!name.isEmpty())) { String retval = ac.getAccessibleName(); - debugString(" returning "+retval); + debugString("[INFO]: returning "+retval); return retval; } else { return null; --- old/src/jdk.accessibility/windows/native/common/AccessBridgeDebug.cpp 2018-12-11 16:47:23.731347200 +0530 +++ new/src/jdk.accessibility/windows/native/common/AccessBridgeDebug.cpp 2018-12-11 16:47:18.759127700 +0530 @@ -31,19 +31,72 @@ #include #include #include +#include +#include +#include #ifdef __cplusplus extern "C" { #endif +static FILE* logFP = nullptr; + +void initializeFileLogger(char * suffix) { + auto var = "JAVA_ACCESSBRIDGE_LOGFILE"; + const auto envfilePath = getenv(var); + if (envfilePath != nullptr) { + auto ext = const_cast(strrchr(envfilePath, '.')); + auto filePath = static_cast(nullptr); + auto len = strlen(envfilePath); + auto suffixlen = suffix != nullptr ? strlen(suffix) : (decltype(strlen(nullptr)))0; + + if (ext == nullptr) { + filePath = new char[len + suffixlen + 5]; + memset(filePath, 0, len + suffixlen + 5); + memcpy(filePath, envfilePath, len); + memcpy(filePath + len, suffix, suffixlen); + memcpy(filePath + len + suffixlen, ".log", 4); + } else { + auto extLen = strlen(ext); + + filePath = new char[len + suffixlen + 1]; + memset(filePath, 0, len + suffixlen + 1); + memcpy(filePath, envfilePath, len - extLen); + memcpy(filePath + len - extLen, suffix, suffixlen); + memcpy(filePath + len + suffixlen - extLen, ext, extLen); + } + + logFP = fopen(filePath, "w"); + if (logFP == nullptr) { + PrintDebugString("couldnot open file %s", filePath); + } + + delete [] filePath; + } +} + +void finalizeFileLogger() { + if (logFP) { + fclose(logFP); + logFP = nullptr; + } +} + +auto getTimeStamp() -> long long { + using namespace std::chrono; + auto timeNow = duration_cast(steady_clock::now().time_since_epoch()); + + return timeNow.count(); +} + /** * print a GetLastError message */ char *printError(char *msg) { - LPVOID lpMsgBuf = NULL; - static char retbuf[256]; + LPVOID lpMsgBuf = nullptr; + static char retbuf[256] = {0}; - if (msg != NULL) { + if (msg != nullptr) { strncpy((char *)retbuf, msg, sizeof(retbuf)); // if msg text is >= 256 ensure buffer is null terminated retbuf[255] = '\0'; @@ -52,18 +105,18 @@ FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, + nullptr, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language (LPTSTR) &lpMsgBuf, 0, - NULL )) + nullptr)) { PrintDebugString(" %s: FormatMessage failed", msg); } else { PrintDebugString(" %s: %s", msg, (char *)lpMsgBuf); } - if (lpMsgBuf != NULL) { + if (lpMsgBuf != nullptr) { strncat((char *)retbuf, ": ", sizeof(retbuf) - strlen(retbuf) - 1); strncat((char *)retbuf, (char *)lpMsgBuf, sizeof(retbuf) - strlen(retbuf) - 1); LocalFree(lpMsgBuf); @@ -77,7 +130,7 @@ */ void PrintDebugString(char *msg, ...) { #ifdef DEBUGGING_ON - char buf[1024]; + char buf[1024] = {0}; va_list argprt; va_start(argprt, msg); // set up argptr @@ -90,6 +143,14 @@ printf("\r\n"); #endif #endif + if (logFP) { + fprintf(logFP, "[%lldu] ", getTimeStamp()); + va_list args; + va_start(args, msg); + vfprintf(logFP, msg, args); + va_end(args); + fprintf(logFP, "\r\n"); + } } /** @@ -97,7 +158,7 @@ */ void PrintJavaDebugString2(char *msg, ...) { #ifdef JAVA_DEBUGGING_ON - char buf[1024]; + char buf[1024] = {0}; va_list argprt; va_start(argprt, msg); // set up argptr @@ -110,13 +171,21 @@ printf("\r\n"); #endif #endif + if (logFP) { + fprintf(logFP, "[%llu] ", getTimeStamp()); + va_list args; + va_start(args, msg); + vfprintf(logFP, msg, args); + va_end(args); + fprintf(logFP, "\r\n"); + } } /** * Wide version of the method to send debugging info to the appropriate place */ void wPrintDebugString(wchar_t *msg, ...) { #ifdef DEBUGGING_ON - char buf[1024]; + char buf[1024] = {0}; char charmsg[256]; va_list argprt; @@ -131,6 +200,14 @@ printf("\r\n"); #endif #endif + if (logFP) { + fprintf(logFP, "[%llu] ", getTimeStamp()); + va_list args; + va_start(args, msg); + vfwprintf(logFP, msg, args); + va_end(args); + fprintf(logFP, "\r\n"); + } } /** @@ -138,8 +215,8 @@ */ void wPrintJavaDebugString(wchar_t *msg, ...) { #ifdef JAVA_DEBUGGING_ON - char buf[1024]; - char charmsg[256]; + char buf[1024] = {0}; + char charmsg[256] = {0}; va_list argprt; va_start(argprt, msg); // set up argptr @@ -153,6 +230,14 @@ printf("\r\n"); #endif #endif + if (logFP) { + fprintf(logFP, "[%llu] ", getTimeStamp()); + va_list args; + va_start(args, msg); + vfwprintf(logFP, msg, args); + va_end(args); + fprintf(logFP, "\r\n"); + } } #ifdef __cplusplus } --- old/src/jdk.accessibility/windows/native/common/AccessBridgeDebug.h 2018-12-11 16:48:02.578628200 +0530 +++ new/src/jdk.accessibility/windows/native/common/AccessBridgeDebug.h 2018-12-11 16:47:58.334343700 +0530 @@ -54,6 +54,8 @@ void PrintJavaDebugString(char *msg, ...); void wPrintJavaDebugString(wchar_t *msg, ...); void wPrintDebugString(wchar_t *msg, ...); + void initializeFileLogger(char * suffix); + void finalizeFileLogger(); #ifdef __cplusplus } --- old/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeATInstance.cpp 2018-12-11 16:48:48.444581400 +0530 +++ new/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeATInstance.cpp 2018-12-11 16:48:41.773848100 +0530 @@ -53,17 +53,17 @@ * AccessBridgeATInstance descructor */ AccessBridgeATInstance::~AccessBridgeATInstance() { - PrintDebugString("\r\nin AccessBridgeATInstance::~AccessBridgeATInstance"); + PrintDebugString("[INFO]: in AccessBridgeATInstance::~AccessBridgeATInstance"); // if IPC memory mapped file view is valid, unmap it if (memoryMappedView != (char *) 0) { - PrintDebugString(" unmapping memoryMappedView; view = %p", memoryMappedView); + PrintDebugString("[INFO]: unmapping memoryMappedView; view = %p", memoryMappedView); UnmapViewOfFile(memoryMappedView); memoryMappedView = (char *) 0; } // if IPC memory mapped file handle map is open, close it if (memoryMappedFileMapHandle != (HANDLE) 0) { - PrintDebugString(" closing memoryMappedFileMapHandle; handle = %p", memoryMappedFileMapHandle); + PrintDebugString("[INFO]: closing memoryMappedFileMapHandle; handle = %p", memoryMappedFileMapHandle); CloseHandle(memoryMappedFileMapHandle); memoryMappedFileMapHandle = (HANDLE) 0; } @@ -87,7 +87,7 @@ AccessBridgeATInstance::initiateIPC() { DWORD errorCode; - PrintDebugString("\r\nIn AccessBridgeATInstance::initiateIPC()"); + PrintDebugString("[INFO]: In AccessBridgeATInstance::initiateIPC()"); // open Windows-initiated IPC filemap & map it to a ptr @@ -95,10 +95,10 @@ FALSE, memoryMappedFileName); if (memoryMappedFileMapHandle == NULL) { errorCode = GetLastError(); - PrintDebugString(" Failed to CreateFileMapping for %s, error: %X", memoryMappedFileName, errorCode); + PrintDebugString("[ERROR]: Failed to CreateFileMapping for %s, error: %X", memoryMappedFileName, errorCode); return errorCode; } else { - PrintDebugString(" CreateFileMapping worked - filename: %s", memoryMappedFileName); + PrintDebugString("[INFO]: CreateFileMapping worked - filename: %s", memoryMappedFileName); } memoryMappedView = (char *) MapViewOfFile(memoryMappedFileMapHandle, @@ -106,20 +106,20 @@ 0, 0, 0); if (memoryMappedView == NULL) { errorCode = GetLastError(); - PrintDebugString(" Failed to MapViewOfFile for %s, error: %X", memoryMappedFileName, errorCode); + PrintDebugString("[ERROR]: Failed to MapViewOfFile for %s, error: %X", memoryMappedFileName, errorCode); return errorCode; } else { - PrintDebugString(" MapViewOfFile worked - view: %p", memoryMappedView); + PrintDebugString("[INFO]: MapViewOfFile worked - view: %p", memoryMappedView); } // look for the JavaDLL's answer to see if it could read the file if (strcmp(memoryMappedView, AB_MEMORY_MAPPED_FILE_OK_QUERY) != 0) { - PrintDebugString(" JavaVM failed to write to memory mapped file %s", + PrintDebugString("[ERROR]: JavaVM failed to write to memory mapped file %s", memoryMappedFileName); return -1; } else { - PrintDebugString(" JavaVM successfully wrote to file!"); + PrintDebugString("[INFO]: JavaVM successfully wrote to file!"); } @@ -213,8 +213,8 @@ LRESULT AccessBridgeATInstance::sendJavaEventPackage(char *buffer, int bufsize, long eventID) { - PrintDebugString("AccessBridgeATInstance::sendJavaEventPackage() eventID = %X", eventID); - PrintDebugString("AccessBridgeATInstance::sendJavaEventPackage() (using PostMessage) eventID = %X", eventID); + PrintDebugString("[INFO]: AccessBridgeATInstance::sendJavaEventPackage() eventID = %X", eventID); + PrintDebugString("[INFO]: AccessBridgeATInstance::sendJavaEventPackage() (using PostMessage) eventID = %X", eventID); if (eventID & javaEventMask) { do_event(buffer,bufsize,ourAccessBridgeWindow,winAccessBridgeWindow); @@ -234,7 +234,7 @@ LRESULT AccessBridgeATInstance::sendAccessibilityEventPackage(char *buffer, int bufsize, long eventID) { - PrintDebugString("AccessBridgeATInstance::sendAccessibilityEventPackage() eventID = %X", eventID); + PrintDebugString("[INFO]: AccessBridgeATInstance::sendAccessibilityEventPackage() eventID = %X", eventID); if (eventID & accessibilityEventMask) { do_event(buffer,bufsize,ourAccessBridgeWindow,winAccessBridgeWindow); --- old/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeJavaEntryPoints.cpp 2018-12-11 16:49:22.247450600 +0530 +++ new/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeJavaEntryPoints.cpp 2018-12-11 16:49:16.318695600 +0530 @@ -40,7 +40,7 @@ jobject bridgeObject) { jniEnv = jniEnvironment; accessBridgeObject = (jobject)bridgeObject; - PrintDebugString("AccessBridgeJavaEntryPoints(%p, %p) called", jniEnv, accessBridgeObject); + PrintDebugString("[INFO]: AccessBridgeJavaEntryPoints(%p, %p) called", jniEnv, accessBridgeObject); } @@ -56,15 +56,13 @@ #define FIND_CLASS(classRef, className) \ localClassRef = jniEnv->FindClass(className); \ if (localClassRef == (jclass) 0) { \ - PrintDebugString(" Error! FindClass(%s) failed!", className); \ - PrintDebugString(" -> jniEnv = %p", jniEnv); \ + PrintDebugString("[ERROR]: FindClass(%s) failed! -> jniEnv = %p", className, jniEnv); \ return FALSE; \ } \ classRef = (jclass) jniEnv->NewGlobalRef(localClassRef); \ jniEnv->DeleteLocalRef(localClassRef); \ if (classRef == (jclass) 0) { \ - PrintDebugString(" Error! FindClass(%s) failed!", className); \ - PrintDebugString(" -> (ran out of RAM)"); \ + PrintDebugString("[ERROR]: FindClass(%s) failed! -> (ran out of RAM)", className); \ return FALSE; \ } @@ -72,14 +70,13 @@ #define FIND_METHOD(methodID, classRef, methodString, methodSignature); \ methodID = jniEnv->GetMethodID(classRef, methodString, methodSignature); \ if (methodID == (jmethodID) 0) { \ - PrintDebugString(" Error! GetMethodID(%s) failed!", methodString); \ - PrintDebugString(" -> jniEnv = %p; classRef = %p", jniEnv, classRef); \ + PrintDebugString("[ERROR]: GetMethodID(%s) failed! -> jniEnv = %p; classRef = %p", methodString, jniEnv, classRef); \ return FALSE; \ } #define EXCEPTION_CHECK(situationDescription, returnVal) \ if (exception = jniEnv->ExceptionOccurred()) { \ - PrintDebugString("\r\n *** Exception occured while doing: %s; returning %d", situationDescription, returnVal); \ + PrintDebugString("[ERROR]: *** Exception occured while doing: %s; returning %d", situationDescription, returnVal); \ jniEnv->ExceptionDescribe(); \ jniEnv->ExceptionClear(); \ return (returnVal); \ @@ -87,7 +84,7 @@ #define EXCEPTION_CHECK_VOID(situationDescription) \ if (exception = jniEnv->ExceptionOccurred()) { \ - PrintDebugString("\r\n *** Exception occured while doing: %s", situationDescription); \ + PrintDebugString("[ERROR]: *** Exception occured while doing: %s", situationDescription); \ jniEnv->ExceptionDescribe(); \ jniEnv->ExceptionClear(); \ return; \ @@ -101,7 +98,7 @@ AccessBridgeJavaEntryPoints::BuildJavaEntryPoints() { jclass localClassRef; - PrintDebugString("Calling BuildJavaEntryPoints():"); + PrintDebugString("[INFO]: Calling BuildJavaEntryPoints():"); FIND_CLASS(bridgeClass, "com/sun/java/accessibility/internal/AccessBridge"); @@ -880,14 +877,14 @@ jthrowable exception; BOOL returnVal; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::isJavaWindow(%X):", window); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::isJavaWindow(%X):", window); if (isJavaWindowMethod != (jmethodID) 0) { returnVal = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, isJavaWindowMethod, window); EXCEPTION_CHECK("Getting isJavaWindow - call to CallBooleanMethod()", FALSE); return returnVal; } else { - PrintDebugString("\r\n Error! either jniEnv == 0 or isJavaWindowMethod == 0"); + PrintDebugString("[ERROR]: either jniEnv == 0 or isJavaWindowMethod == 0"); return FALSE; } } @@ -903,12 +900,12 @@ jthrowable exception; BOOL returnVal; - PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::isSameObject(%p %p):", obj1, obj2); + PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::isSameObject(%p %p):", obj1, obj2); returnVal = (BOOL) jniEnv->IsSameObject((jobject)obj1, (jobject)obj2); EXCEPTION_CHECK("Calling IsSameObject", FALSE); - PrintDebugString("\r\n isSameObject returning %d", returnVal); + PrintDebugString("[INFO]: isSameObject returning %d", returnVal); return returnVal; } @@ -924,7 +921,7 @@ jobject globalRef; jthrowable exception; - PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getAccessibleContextFromHWND(%X):", window); + PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getAccessibleContextFromHWND(%X):", window); if (getAccessibleContextFromHWNDMethod != (jmethodID) 0) { returnedAccessibleContext = @@ -935,7 +932,7 @@ EXCEPTION_CHECK("Getting AccessibleContextFromHWND - call to CallObjectMethod()", (jobject) 0); return globalRef; } else { - PrintDebugString("\r\n Error! either jniEnv == 0 or getAccessibleContextFromHWNDMethod == 0"); + PrintDebugString("[ERROR]: either jniEnv == 0 or getAccessibleContextFromHWNDMethod == 0"); return (jobject) 0; } } @@ -951,17 +948,17 @@ jthrowable exception; HWND rHWND; - PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getHWNDFromAccessibleContext(%X):", + PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getHWNDFromAccessibleContext(%X):", accessibleContext); if (getHWNDFromAccessibleContextMethod != (jmethodID) 0) { rHWND = (HWND)jniEnv->CallIntMethod(accessBridgeObject, getHWNDFromAccessibleContextMethod, accessibleContext); EXCEPTION_CHECK("Getting HWNDFromAccessibleContext - call to CallIntMethod()", (HWND)0); - PrintDebugString("\r\n rHWND = %X", rHWND); + PrintDebugString("[INFO]: rHWND = %X", rHWND); return rHWND; } else { - PrintDebugString("\r\n Error! either jniEnv == 0 or getHWNDFromAccessibleContextMethod == 0"); + PrintDebugString("[ERROR]: either jniEnv == 0 or getHWNDFromAccessibleContextMethod == 0"); return (HWND)0; } } @@ -977,7 +974,7 @@ jthrowable exception; BOOL result = FALSE; - PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::setTextContents(%p, %ls):", + PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::setTextContents(%p, %ls):", accessibleContext, text); if (setTextContentsMethod != (jmethodID) 0) { @@ -985,7 +982,7 @@ // create a Java String for the text jstring textString = jniEnv->NewString(text, (jsize)wcslen(text)); if (textString == 0) { - PrintDebugString("\r NewString failed"); + PrintDebugString("[ERROR]: NewString failed"); return FALSE; } @@ -993,10 +990,10 @@ setTextContentsMethod, accessibleContext, textString); EXCEPTION_CHECK("setTextContents - call to CallBooleanMethod()", FALSE); - PrintDebugString("\r\n result = %d", result); + PrintDebugString("[INFO]: result = %d", result); return result; } else { - PrintDebugString("\r\n Error! either jniEnv == 0 or setTextContentsMethod == 0"); + PrintDebugString("[ERROR]: either jniEnv == 0 or setTextContentsMethod == 0"); return result; } } @@ -1014,14 +1011,14 @@ jthrowable exception; jobject rAccessibleContext; - PrintDebugString("In AccessBridgeJavaEntryPoints::getParentWithRole(%p):", + PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getParentWithRole(%p):", accessibleContext); if (getParentWithRoleMethod != (jmethodID) 0) { // create a Java String for the role jstring roleName = jniEnv->NewString(role, (jsize)wcslen(role)); if (roleName == 0) { - PrintDebugString(" NewString failed"); + PrintDebugString("[ERROR]: NewString failed"); return FALSE; } @@ -1029,14 +1026,14 @@ getParentWithRoleMethod, accessibleContext, roleName); EXCEPTION_CHECK("Getting ParentWithRole - call to CallObjectMethod()", (AccessibleContext)0); - PrintDebugString(" rAccessibleContext = %p", rAccessibleContext); + PrintDebugString("[INFO]: rAccessibleContext = %p", rAccessibleContext); jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext); EXCEPTION_CHECK("Getting ParentWithRole - call to NewGlobalRef()", FALSE); - PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", + PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p", rAccessibleContext, globalRef); return globalRef; } else { - PrintDebugString("\r\n Error! either jniEnv == 0 or getParentWithRoleMethod == 0"); + PrintDebugString("[ERROR]: either jniEnv == 0 or getParentWithRoleMethod == 0"); return 0; } } @@ -1052,7 +1049,7 @@ jthrowable exception; jobject rAccessibleContext; - PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getTopLevelObject(%p):", + PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getTopLevelObject(%p):", accessibleContext); if (getTopLevelObjectMethod != (jmethodID) 0) { @@ -1060,14 +1057,14 @@ getTopLevelObjectMethod, accessibleContext); EXCEPTION_CHECK("Getting TopLevelObject - call to CallObjectMethod()", FALSE); - PrintDebugString("\r\n rAccessibleContext = %p", rAccessibleContext); + PrintDebugString("[INFO]: rAccessibleContext = %p", rAccessibleContext); jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext); EXCEPTION_CHECK("Getting TopLevelObject - call to NewGlobalRef()", FALSE); - PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", + PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p", rAccessibleContext, globalRef); return globalRef; } else { - PrintDebugString("\r\n Error! either jniEnv == 0 or getTopLevelObjectMethod == 0"); + PrintDebugString("[ERROR]: either jniEnv == 0 or getTopLevelObjectMethod == 0"); return 0; } } @@ -1083,7 +1080,7 @@ jthrowable exception; jobject rAccessibleContext; - PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getParentWithRoleElseRoot(%p):", + PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getParentWithRoleElseRoot(%p):", accessibleContext); if (getParentWithRoleElseRootMethod != (jmethodID) 0) { @@ -1091,7 +1088,7 @@ // create a Java String for the role jstring roleName = jniEnv->NewString(role, (jsize)wcslen(role)); if (roleName == 0) { - PrintDebugString("\r NewString failed"); + PrintDebugString("[ERROR]: NewString failed"); return FALSE; } @@ -1099,14 +1096,14 @@ getParentWithRoleElseRootMethod, accessibleContext, roleName); EXCEPTION_CHECK("Getting ParentWithRoleElseRoot - call to CallObjectMethod()", (AccessibleContext)0); - PrintDebugString(" rAccessibleContext = %p", rAccessibleContext); + PrintDebugString("[INFO]: rAccessibleContext = %p", rAccessibleContext); jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext); EXCEPTION_CHECK("Getting ParentWithRoleElseRoot - call to NewGlobalRef()", FALSE); - PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", + PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p", rAccessibleContext, globalRef); return globalRef; } else { - PrintDebugString("\r\n Error! either jniEnv == 0 or getParentWithRoleElseRootMethod == 0"); + PrintDebugString("[ERROR]: either jniEnv == 0 or getParentWithRoleElseRootMethod == 0"); return 0; } } @@ -1121,7 +1118,7 @@ jthrowable exception; jint rResult; - PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getObjectDepth(%p):", + PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getObjectDepth(%p):", accessibleContext); if (getObjectDepthMethod != (jmethodID) 0) { @@ -1129,10 +1126,10 @@ getObjectDepthMethod, accessibleContext); EXCEPTION_CHECK("Getting ObjectDepth - call to CallIntMethod()", -1); - PrintDebugString("\r\n rResult = %d", rResult); + PrintDebugString("[INFO]: rResult = %d", rResult); return rResult; } else { - PrintDebugString("\r\n Error! either jniEnv == 0 or getObjectDepthMethod == 0"); + PrintDebugString("[ERROR]: either jniEnv == 0 or getObjectDepthMethod == 0"); return -1; } } @@ -1148,7 +1145,7 @@ jthrowable exception; jobject rAccessibleContext; - PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getActiveDescendent(%p):", + PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getActiveDescendent(%p):", accessibleContext); if (getActiveDescendentMethod != (jmethodID) 0) { @@ -1156,14 +1153,14 @@ getActiveDescendentMethod, accessibleContext); EXCEPTION_CHECK("Getting ActiveDescendent - call to CallObjectMethod()", (AccessibleContext)0); - PrintDebugString("\r\n rAccessibleContext = %p", rAccessibleContext); + PrintDebugString("[INFO]: rAccessibleContext = %p", rAccessibleContext); jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext); EXCEPTION_CHECK("Getting ActiveDescendant - call to NewGlobalRef()", FALSE); - PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", + PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p", rAccessibleContext, globalRef); return globalRef; } else { - PrintDebugString("\r\n Error! either jniEnv == 0 or getActiveDescendentMethod == 0"); + PrintDebugString("[ERROR]: either jniEnv == 0 or getActiveDescendentMethod == 0"); return (AccessibleContext)0; } } @@ -1204,7 +1201,7 @@ const wchar_t * stringBytes = NULL; jthrowable exception = NULL; jsize length = 0; - PrintDebugString("\r\n getVirtualAccessibleName called."); + PrintDebugString("[INFO]: getVirtualAccessibleName called."); if (getVirtualAccessibleNameFromContextMethod != (jmethodID) 0) { js = (jstring) jniEnv->CallObjectMethod ( @@ -1231,12 +1228,12 @@ } else { - PrintDebugString(" Accessible Name is null."); + PrintDebugString("[INFO]: Accessible Name is null."); } } else { - PrintDebugString("\r\n Error! either jniEnv == 0 or getVirtualAccessibleNameFromContextMethod == 0"); + PrintDebugString("[INFO]: either jniEnv == 0 or getVirtualAccessibleNameFromContextMethod == 0"); return FALSE; } if ( 0 != name [0] ) @@ -1258,7 +1255,7 @@ jthrowable exception; BOOL result = FALSE; - PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::requestFocus(%p):", + PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::requestFocus(%p):", accessibleContext); if (requestFocusMethod != (jmethodID) 0) { @@ -1266,10 +1263,10 @@ requestFocusMethod, accessibleContext); EXCEPTION_CHECK("requestFocus - call to CallBooleanMethod()", FALSE); - PrintDebugString("\r\n result = %d", result); + PrintDebugString("[INFO]: result = %d", result); return result; } else { - PrintDebugString("\r\n Error! either jniEnv == 0 or requestFocusMethod == 0"); + PrintDebugString("[ERROR]: either jniEnv == 0 or requestFocusMethod == 0"); return result; } } @@ -1286,7 +1283,7 @@ jthrowable exception; BOOL result = FALSE; - PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::selectTextRange(%p start = %d end = %d):", + PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::selectTextRange(%p start = %d end = %d):", accessibleContext, startIndex, endIndex); if (selectTextRangeMethod != (jmethodID) 0) { @@ -1295,10 +1292,10 @@ accessibleContext, startIndex, endIndex); EXCEPTION_CHECK("selectTextRange - call to CallBooleanMethod()", FALSE); - PrintDebugString("\r\n result = %d", result); + PrintDebugString("[INFO]: result = %d", result); return result; } else { - PrintDebugString("\r\n Error! either jniEnv == 0 or selectTextRangeMethod == 0"); + PrintDebugString("[ERROR]: either jniEnv == 0 or selectTextRangeMethod == 0"); return result; } } @@ -1355,7 +1352,7 @@ jsize length; BOOL result = FALSE; - PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getTextAttributesInRange(%p start = %d end = %d):", + PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getTextAttributesInRange(%p start = %d end = %d):", accessibleContext, startIndex, endIndex); *len = 0; @@ -1370,12 +1367,12 @@ AccessibleTextAttributesInfo test_attributes = *attributes; // Get the full test_attributes string at i if (getAccessibleAttributesAtIndexFromContextMethod != (jmethodID) 0) { - PrintDebugString(" Getting full test_attributes string from Context..."); + PrintDebugString("[INFO]: Getting full test_attributes string from Context..."); js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject, getAccessibleAttributesAtIndexFromContextMethod, accessibleContext, i); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallObjectMethod()", FALSE); - PrintDebugString(" returned from CallObjectMethod(), js = %p", js); + PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js); if (js != (jstring) 0) { stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to GetStringChars()", FALSE); @@ -1389,16 +1386,16 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallVoidMethod()", FALSE); - wPrintDebugString(L" Accessible Text attributes = %ls", test_attributes.fullAttributesString); + wPrintDebugString(L"[INFO]: Accessible Text attributes = %ls", test_attributes.fullAttributesString); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Accessible Text attributes is null."); + PrintDebugString("[WARN]: Accessible Text attributes is null."); test_attributes.fullAttributesString[0] = (wchar_t) 0; return FALSE; } } else { - PrintDebugString(" Error! either env == 0 or getAccessibleAttributesAtIndexFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleAttributesAtIndexFromContextMethod == 0"); return FALSE; } @@ -1421,14 +1418,14 @@ AccessBridgeJavaEntryPoints::getVisibleChildrenCount(const jobject accessibleContext) { jthrowable exception; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getVisibleChildrenCount(%p)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getVisibleChildrenCount(%p)", accessibleContext); // get the visible children count int numChildren = jniEnv->CallIntMethod(accessBridgeObject, getVisibleChildrenCountMethod, accessibleContext); EXCEPTION_CHECK("##### Getting visible children count - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### visible children count = %d", numChildren); + PrintDebugString("[INFO]: ##### visible children count = %d", numChildren); return numChildren; } @@ -1448,14 +1445,14 @@ jthrowable exception; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getVisibleChildren(%p, startIndex = %d)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getVisibleChildren(%p, startIndex = %d)", accessibleContext, nStartIndex); // get the visible children count int numChildren = jniEnv->CallIntMethod(accessBridgeObject, getVisibleChildrenCountMethod, accessibleContext); EXCEPTION_CHECK("##### Getting visible children count - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### visible children count = %d", numChildren); + PrintDebugString("[INFO]: ##### visible children count = %d", numChildren); if (nStartIndex >= numChildren) { return FALSE; @@ -1464,7 +1461,7 @@ // get the visible children int bufIndex = 0; for (int i = nStartIndex; (i < numChildren) && (i < nStartIndex + MAX_VISIBLE_CHILDREN); i++) { - PrintDebugString(" getting visible child %d ...", i); + PrintDebugString("[INFO]: getting visible child %d ...", i); // get the visible child at index i jobject ac = jniEnv->CallObjectMethod(accessBridgeObject, getVisibleChildMethod, @@ -1473,13 +1470,13 @@ jobject globalRef = jniEnv->NewGlobalRef(ac); EXCEPTION_CHECK("##### getVisibleChildMethod - call to NewGlobalRef()", FALSE); visibleChildrenInfo->children[bufIndex] = (JOBJECT64)globalRef; - PrintDebugString(" ##### visible child = %p", globalRef); + PrintDebugString("[INFO]: ##### visible child = %p", globalRef); bufIndex++; } visibleChildrenInfo->returnedChildrenCount = bufIndex; - PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getVisibleChildren succeeded"); + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getVisibleChildren succeeded"); return TRUE; } @@ -1494,7 +1491,7 @@ jthrowable exception; BOOL result = FALSE; - PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::setCaretPostion(%p position = %d):", + PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::setCaretPostion(%p position = %d):", accessibleContext, position); if (setCaretPositionMethod != (jmethodID) 0) { @@ -1502,10 +1499,10 @@ setCaretPositionMethod, accessibleContext, position); EXCEPTION_CHECK("setCaretPostion - call to CallBooleanMethod()", FALSE); - PrintDebugString("\r\n result = %d", result); + PrintDebugString("[ERROR]: result = %d", result); return result; } else { - PrintDebugString("\r\n Error! either jniEnv == 0 or setCaretPositionMethod == 0"); + PrintDebugString("[ERROR]: either jniEnv == 0 or setCaretPositionMethod == 0"); return result; } } @@ -1525,19 +1522,19 @@ jthrowable exception; jsize length; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getVersionInfo():"); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getVersionInfo():"); if (getJavaVersionPropertyMethod != (jmethodID) 0) { js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject, getJavaVersionPropertyMethod); EXCEPTION_CHECK("Getting JavaVersionProperty - call to CallObjectMethod()", FALSE); - PrintDebugString(" returned from CallObjectMethod(), js = %p", js); + PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js); if (js != (jstring) 0) { length = jniEnv->GetStringLength(js); stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); if (stringBytes == NULL) { if (!jniEnv->ExceptionCheck()) { - PrintDebugString("\r\n *** Exception when getting JavaVersionProperty - call to GetStringChars"); + PrintDebugString("[ERROR]: *** Exception when getting JavaVersionProperty - call to GetStringChars"); jniEnv->ExceptionDescribe(); jniEnv->ExceptionClear(); } @@ -1572,12 +1569,12 @@ jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting JavaVersionProperty - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Java version is null."); + PrintDebugString("[WARN]: Java version is null."); info->VMversion[0] = (wchar_t) 0; return FALSE; } } else { - PrintDebugString(" Error! either env == 0 or getJavaVersionPropertyMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getJavaVersionPropertyMethod == 0"); return FALSE; } @@ -1594,15 +1591,15 @@ BOOL retval; jthrowable exception; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::verifyAccessibleText"); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::verifyAccessibleText"); if (jniEnv->GetJavaVM(&vm) != 0) { - PrintDebugString(" Error! No Java VM"); + PrintDebugString("[ERROR]: No Java VM"); return FALSE; } if (obj == (jobject)0) { - PrintDebugString(" Error! Null jobject"); + PrintDebugString("[ERROR]: Null jobject"); return FALSE; } @@ -1612,16 +1609,16 @@ getAccessibleTextFromContextMethod, (jobject)obj); EXCEPTION_CHECK("Getting AccessibleText - call to CallObjectMethod()", FALSE); - PrintDebugString(" AccessibleText = %p", returnedJobject); + PrintDebugString("[ERROR]: AccessibleText = %p", returnedJobject); retval = returnedJobject != (jobject) 0; jniEnv->DeleteLocalRef(returnedJobject); EXCEPTION_CHECK("Getting AccessibleText - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleTextFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextFromContextMethod == 0"); return FALSE; } if (retval == FALSE) { - PrintDebugString(" Error! jobject is not an AccessibleText"); + PrintDebugString("[ERROR]: jobject is not an AccessibleText"); } return retval; } @@ -1646,7 +1643,7 @@ jobject globalRef; jthrowable exception; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleContextAt(%d, %d, %p):", + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleContextAt(%d, %d, %p):", x, y, accessibleContext); if (getAccessibleContextAtMethod != (jmethodID) 0) { @@ -1656,11 +1653,11 @@ EXCEPTION_CHECK("Getting AccessibleContextAt - call to CallObjectMethod()", FALSE); globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext); EXCEPTION_CHECK("Getting AccessibleContextAt - call to NewGlobalRef()", FALSE); - PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", + PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p", returnedAccessibleContext, globalRef); return globalRef; } else { - PrintDebugString(" Error! either env == 0 or getAccessibleContextAtMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleContextAtMethod == 0"); return (jobject) 0; } } @@ -1681,7 +1678,7 @@ jobject globalRef; jthrowable exception; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleContextWithFocus()"); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleContextWithFocus()"); if (getAccessibleContextWithFocusMethod != (jmethodID) 0) { returnedAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject, @@ -1689,11 +1686,11 @@ EXCEPTION_CHECK("Getting AccessibleContextWithFocus - call to CallObjectMethod()", FALSE); globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext); EXCEPTION_CHECK("Getting AccessibleContextWithFocus - call to NewGlobalRef()", FALSE); - PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", + PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p", returnedAccessibleContext, globalRef); return globalRef; } else { - PrintDebugString(" Error! either jniEnv == 0 or getAccessibleContextWithFocusMethod == 0"); + PrintDebugString("[ERROR]: either jniEnv == 0 or getAccessibleContextWithFocusMethod == 0"); return (jobject) 0; } } @@ -1718,12 +1715,12 @@ jthrowable exception; jsize length; - PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleContextInfo(%p):", accessibleContext); + PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleContextInfo(%p):", accessibleContext); ZeroMemory(info, sizeof(AccessibleContextInfo)); if (accessibleContext == (jobject) 0) { - PrintDebugString(" passed in AccessibleContext == null! (oops)"); + PrintDebugString("[WARN]: passed in AccessibleContext == null! (oops)"); return (FALSE); } @@ -1746,15 +1743,15 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting AccessibleName - call to CallVoidMethod()", FALSE); - wPrintDebugString(L" Accessible Name = %ls", info->name); + wPrintDebugString(L"[INFO]: Accessible Name = %ls", info->name); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleName - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Accessible Name is null."); + PrintDebugString("[WARN]: Accessible Name is null."); info->name[0] = (wchar_t) 0; } } else { - PrintDebugString(" Error! either env == 0 or getAccessibleNameFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleNameFromContextMethod == 0"); return FALSE; } @@ -1778,15 +1775,15 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting AccessibleName - call to CallVoidMethod()", FALSE); - wPrintDebugString(L" Accessible Description = %ls", info->description); + wPrintDebugString(L"[INFO]: Accessible Description = %ls", info->description); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleName - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Accessible Description is null."); + PrintDebugString("[WARN]: Accessible Description is null."); info->description[0] = (wchar_t) 0; } } else { - PrintDebugString(" Error! either env == 0 or getAccessibleDescriptionFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleDescriptionFromContextMethod == 0"); return FALSE; } @@ -1810,15 +1807,15 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting AccessibleRole - call to CallVoidMethod()", FALSE); - wPrintDebugString(L" Accessible Role = %ls", info->role); + wPrintDebugString(L"[INFO]: Accessible Role = %ls", info->role); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleRole - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Accessible Role is null."); + PrintDebugString("[WARN]: Accessible Role is null."); info->role[0] = (wchar_t) 0; } } else { - PrintDebugString(" Error! either env == 0 or getAccessibleRoleStringFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleRoleStringFromContextMethod == 0"); return FALSE; } @@ -1842,15 +1839,15 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting AccessibleRole_en_US - call to CallVoidMethod()", FALSE); - wPrintDebugString(L" Accessible Role en_US = %ls", info->role_en_US); + wPrintDebugString(L"[INFO]: Accessible Role en_US = %ls", info->role_en_US); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleRole_en_US - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Accessible Role en_US is null."); + PrintDebugString("[WARN]: Accessible Role en_US is null."); info->role[0] = (wchar_t) 0; } } else { - PrintDebugString(" Error! either env == 0 or getAccessibleRoleStringFromContext_en_USMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleRoleStringFromContext_en_USMethod == 0"); return FALSE; } @@ -1873,15 +1870,15 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting AccessibleState - call to CallVoidMethod()", FALSE); - wPrintDebugString(L" Accessible States = %ls", info->states); + wPrintDebugString(L"[INFO]: Accessible States = %ls", info->states); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleState - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Accessible States is null."); + PrintDebugString("[WARN]: Accessible States is null."); info->states[0] = (wchar_t) 0; } } else { - PrintDebugString(" Error! either env == 0 or getAccessibleStatesStringFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleStatesStringFromContextMethod == 0"); return FALSE; } @@ -1904,15 +1901,15 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting AccessibleState_en_US - call to CallVoidMethod()", FALSE); - wPrintDebugString(L" Accessible States en_US = %ls", info->states_en_US); + wPrintDebugString(L"[INFO]: Accessible States en_US = %ls", info->states_en_US); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleState_en_US - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Accessible States en_US is null."); + PrintDebugString("[WARN]: Accessible States en_US is null."); info->states[0] = (wchar_t) 0; } } else { - PrintDebugString(" Error! either env == 0 or getAccessibleStatesStringFromContext_en_USMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleStatesStringFromContext_en_USMethod == 0"); return FALSE; } @@ -1923,14 +1920,14 @@ getAccessibleIndexInParentFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleIndexInParent - call to CallIntMethod()", FALSE); - PrintDebugString(" Index in Parent = %d", info->indexInParent); + PrintDebugString("[INFO]: Index in Parent = %d", info->indexInParent); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleIndexInParentFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleIndexInParentFromContextMethod == 0"); return FALSE; } - PrintDebugString("*** jniEnv: %p; accessBridgeObject: %p; AccessibleContext: %p ***", + PrintDebugString("[INFO]: *** jniEnv: %p; accessBridgeObject: %p; AccessibleContext: %p ***", jniEnv, accessBridgeObject, accessibleContext); // Get the children count @@ -1939,13 +1936,13 @@ getAccessibleChildrenCountFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleChildrenCount - call to CallIntMethod()", FALSE); - PrintDebugString(" Children count = %d", info->childrenCount); + PrintDebugString("[INFO]: Children count = %d", info->childrenCount); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleChildrenCountFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleChildrenCountFromContextMethod == 0"); return FALSE; } - PrintDebugString("*** jniEnv: %p; accessBridgeObject: %p; AccessibleContext: %X ***", + PrintDebugString("[INFO]: *** jniEnv: %p; accessBridgeObject: %p; AccessibleContext: %X ***", jniEnv, accessBridgeObject, accessibleContext); @@ -1955,13 +1952,13 @@ getAccessibleXcoordFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleXcoord - call to CallIntMethod()", FALSE); - PrintDebugString(" X coord = %d", info->x); + PrintDebugString("[INFO]: X coord = %d", info->x); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleXcoordFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleXcoordFromContextMethod == 0"); return FALSE; } - PrintDebugString("*** jniEnv: %X; accessBridgeObject: %X; AccessibleContext: %p ***", + PrintDebugString("[INFO]: *** jniEnv: %X; accessBridgeObject: %X; AccessibleContext: %p ***", jniEnv, accessBridgeObject, accessibleContext); @@ -1971,9 +1968,9 @@ getAccessibleYcoordFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleYcoord - call to CallIntMethod()", FALSE); - PrintDebugString(" Y coord = %d", info->y); + PrintDebugString("[INFO]: Y coord = %d", info->y); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleYcoordFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleYcoordFromContextMethod == 0"); return FALSE; } @@ -1983,9 +1980,9 @@ getAccessibleWidthFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleWidth - call to CallIntMethod()", FALSE); - PrintDebugString(" Width = %d", info->width); + PrintDebugString("[INFO]: Width = %d", info->width); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleWidthFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleWidthFromContextMethod == 0"); return FALSE; } @@ -1995,9 +1992,9 @@ getAccessibleHeightFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleHeight - call to CallIntMethod()", FALSE); - PrintDebugString(" Height = %d", info->height); + PrintDebugString("[INFO]: Height = %d", info->height); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleHeightFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleHeightFromContextMethod == 0"); return FALSE; } @@ -2007,12 +2004,12 @@ getAccessibleComponentFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleComponent - call to CallObjectMethod()", FALSE); - PrintDebugString(" AccessibleComponent = %p", returnedJobject); + PrintDebugString("[INFO]: AccessibleComponent = %p", returnedJobject); info->accessibleComponent = (returnedJobject != (jobject) 0 ? TRUE : FALSE); jniEnv->DeleteLocalRef(returnedJobject); EXCEPTION_CHECK("Getting AccessibleComponent - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleComponentFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleComponentFromContextMethod == 0"); return FALSE; } @@ -2022,12 +2019,12 @@ getAccessibleActionFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleAction - call to CallObjectMethod()", FALSE); - PrintDebugString(" AccessibleAction = %p", returnedJobject); + PrintDebugString("[INFO]: AccessibleAction = %p", returnedJobject); info->accessibleAction = (returnedJobject != (jobject) 0 ? TRUE : FALSE); jniEnv->DeleteLocalRef(returnedJobject); EXCEPTION_CHECK("Getting AccessibleAction - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleActionFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleActionFromContextMethod == 0"); return FALSE; } @@ -2037,24 +2034,24 @@ getAccessibleSelectionFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleSelection - call to CallObjectMethod()", FALSE); - PrintDebugString(" AccessibleSelection = %p", returnedJobject); + PrintDebugString("[INFO]: AccessibleSelection = %p", returnedJobject); info->accessibleSelection = (returnedJobject != (jobject) 0 ? TRUE : FALSE); jniEnv->DeleteLocalRef(returnedJobject); EXCEPTION_CHECK("Getting AccessibleSelection - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleSelectionFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleSelectionFromContextMethod == 0"); return FALSE; } // Get the AccessibleTable if (getAccessibleTableFromContextMethod != (jmethodID) 0) { - PrintDebugString("##### Calling getAccessibleTableFromContextMethod ..."); + PrintDebugString("[INFO]: ##### Calling getAccessibleTableFromContextMethod ..."); returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject, getAccessibleTableFromContextMethod, accessibleContext); - PrintDebugString("##### ... Returned from getAccessibleTableFromContextMethod"); + PrintDebugString("[INFO]: ##### ... Returned from getAccessibleTableFromContextMethod"); EXCEPTION_CHECK("##### Getting AccessibleTable - call to CallObjectMethod()", FALSE); - PrintDebugString(" ##### AccessibleTable = %p", returnedJobject); + PrintDebugString("[INFO]: ##### AccessibleTable = %p", returnedJobject); if (returnedJobject != (jobject) 0) { info->accessibleInterfaces |= cAccessibleTableInterface; } @@ -2072,7 +2069,7 @@ */ } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableFromContextMethod == 0"); return FALSE; } @@ -2082,12 +2079,12 @@ getAccessibleTextFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleText - call to CallObjectMethod()", FALSE); - PrintDebugString(" AccessibleText = %p", returnedJobject); + PrintDebugString("[INFO]: AccessibleText = %p", returnedJobject); info->accessibleText = (returnedJobject != (jobject) 0 ? TRUE : FALSE); jniEnv->DeleteLocalRef(returnedJobject); EXCEPTION_CHECK("Getting AccessibleText - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleTextFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextFromContextMethod == 0"); return FALSE; } @@ -2097,14 +2094,14 @@ getAccessibleValueFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleValue - call to CallObjectMethod()", FALSE); - PrintDebugString(" AccessibleValue = %p", returnedJobject); + PrintDebugString("[INFO]: AccessibleValue = %p", returnedJobject); if (returnedJobject != (jobject) 0) { info->accessibleInterfaces |= cAccessibleValueInterface; } jniEnv->DeleteLocalRef(returnedJobject); EXCEPTION_CHECK("Getting AccessibleValue - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleValueFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleValueFromContextMethod == 0"); return FALSE; } @@ -2120,7 +2117,7 @@ getAccessibleHypertextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleHypertext - call to CallObjectMethod()", FALSE); - PrintDebugString(" AccessibleHypertext = %p", + PrintDebugString("[INFO]: AccessibleHypertext = %p", returnedJobject); if (returnedJobject != (jobject) 0) { info->accessibleInterfaces |= cAccessibleHypertextInterface; @@ -2161,7 +2158,7 @@ jobject globalRef; jthrowable exception; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleChildContext(%p, %d):", + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleChildContext(%p, %d):", accessibleContext, childIndex); if (getAccessibleChildFromContextMethod != (jmethodID) 0) { @@ -2173,11 +2170,11 @@ EXCEPTION_CHECK("Getting AccessibleChild - call to NewGlobalRef()", FALSE); jniEnv->DeleteLocalRef(returnedAccessibleContext); EXCEPTION_CHECK("Getting AccessibleChild - call to DeleteLocalRef()", FALSE); - PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", + PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p", returnedAccessibleContext, globalRef); return globalRef; } else { - PrintDebugString(" Error! either env == 0 or getAccessibleChildContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleChildContextMethod == 0"); return (jobject) 0; } } @@ -2193,7 +2190,7 @@ jobject globalRef; jthrowable exception; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleParentFromContext(%p):", accessibleContext); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleParentFromContext(%p):", accessibleContext); if (getAccessibleParentFromContextMethod != (jmethodID) 0) { returnedAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject, @@ -2204,11 +2201,11 @@ EXCEPTION_CHECK("Getting AccessibleParent - call to NewGlobalRef()", FALSE); jniEnv->DeleteLocalRef(returnedAccessibleContext); EXCEPTION_CHECK("Getting AccessibleParent - call to DeleteLocalRef()", FALSE); - PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", + PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p", returnedAccessibleContext, globalRef); return globalRef; } else { - PrintDebugString(" Error! either env == 0 or getAccessibleParentFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleParentFromContextMethod == 0"); return (jobject) 0; } } @@ -2222,7 +2219,7 @@ jthrowable exception; - PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableInfo(%p):", + PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableInfo(%p):", accessibleContext); // get the table row count @@ -2231,9 +2228,9 @@ getAccessibleTableRowCountMethod, accessibleContext); EXCEPTION_CHECK("##### Getting AccessibleTableRowCount - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### table row count = %d", tableInfo->rowCount); + PrintDebugString("[INFO]: ##### table row count = %d", tableInfo->rowCount); } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleRowCountMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleRowCountMethod == 0"); return FALSE; } @@ -2243,43 +2240,43 @@ getAccessibleTableColumnCountMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleTableColumnCount - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### table column count = %d", tableInfo->columnCount); + PrintDebugString("[INFO]: ##### table column count = %d", tableInfo->columnCount); } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableColumnCountMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableColumnCountMethod == 0"); return FALSE; } // get the AccessibleTable if (getAccessibleTableFromContextMethod != (jmethodID) 0) { - PrintDebugString("##### Calling getAccessibleTableFromContextMethod ..."); + PrintDebugString("[INFO]: ##### Calling getAccessibleTableFromContextMethod ..."); jobject accTable = jniEnv->CallObjectMethod(accessBridgeObject, getAccessibleTableFromContextMethod, accessibleContext); - PrintDebugString("##### ... Returned from getAccessibleTableFromContextMethod"); + PrintDebugString("[INFO]: ##### ... Returned from getAccessibleTableFromContextMethod"); EXCEPTION_CHECK("##### Getting AccessibleTable - call to CallObjectMethod()", FALSE); jobject globalRef = jniEnv->NewGlobalRef(accTable); EXCEPTION_CHECK("##### Getting AccessibleTable - call to NewGlobalRef()", FALSE); tableInfo->accessibleTable = (JOBJECT64)globalRef; - PrintDebugString(" ##### accessibleTable = %p", globalRef); + PrintDebugString("[INFO]: ##### accessibleTable = %p", globalRef); } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableFromContextMethod == 0"); return FALSE; } // cache the AccessibleContext if (getContextFromAccessibleTableMethod != (jmethodID) 0) { - PrintDebugString("##### Calling getContextFromAccessibleTable Method ..."); + PrintDebugString("[INFO]: ##### Calling getContextFromAccessibleTable Method ..."); jobject ac = jniEnv->CallObjectMethod(accessBridgeObject, getContextFromAccessibleTableMethod, accessibleContext); - PrintDebugString("##### ... Returned from getContextFromAccessibleTable Method"); + PrintDebugString("[INFO]: ##### ... Returned from getContextFromAccessibleTable Method"); EXCEPTION_CHECK("##### Getting AccessibleTable - call to CallObjectMethod()", FALSE); jobject globalRef = jniEnv->NewGlobalRef(ac); EXCEPTION_CHECK("##### Getting AccessibleTable - call to NewGlobalRef()", FALSE); tableInfo->accessibleContext = (JOBJECT64)globalRef; - PrintDebugString(" ##### accessibleContext = %p", globalRef); + PrintDebugString("[INFO]: ##### accessibleContext = %p", globalRef); } else { - PrintDebugString(" ##### Error! either env == 0 or getContextFromAccessibleTable Method == 0"); + PrintDebugString("[ERROR]: either env == 0 or getContextFromAccessibleTable Method == 0"); return FALSE; } @@ -2287,7 +2284,7 @@ tableInfo->caption = NULL; tableInfo->summary = NULL; - PrintDebugString("##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableInfo succeeded"); + PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableInfo succeeded"); return TRUE; } @@ -2297,7 +2294,7 @@ jthrowable exception; - PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(%p): row=%d, column=%d", + PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(%p): row=%d, column=%d", accessibleTable, row, column); // FIX @@ -2312,9 +2309,9 @@ getAccessibleTableCellIndexMethod, accessibleTable, row, column); EXCEPTION_CHECK("##### Getting AccessibleTableCellIndex - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### table cell index = %d", tableCellInfo->index); + PrintDebugString("[INFO]: ##### table cell index = %d", tableCellInfo->index); } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableCellIndexMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableCellIndexMethod == 0"); return FALSE; } @@ -2324,9 +2321,9 @@ getAccessibleTableCellRowExtentMethod, accessibleTable, row, column); EXCEPTION_CHECK("##### Getting AccessibleTableCellRowExtentCount - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### table cell row extent = %d", tableCellInfo->rowExtent); + PrintDebugString("[INFO]: ##### table cell row extent = %d", tableCellInfo->rowExtent); } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableCellRowExtentMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableCellRowExtentMethod == 0"); return FALSE; } @@ -2336,9 +2333,9 @@ getAccessibleTableCellColumnExtentMethod, accessibleTable, row, column); EXCEPTION_CHECK("##### Getting AccessibleTableCellColumnExtentCount - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### table cell column extent = %d", tableCellInfo->columnExtent); + PrintDebugString("[INFO]: ##### table cell column extent = %d", tableCellInfo->columnExtent); } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableCellColumnExtentMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableCellColumnExtentMethod == 0"); return FALSE; } @@ -2348,9 +2345,9 @@ isAccessibleTableCellSelectedMethod, accessibleTable, row, column); EXCEPTION_CHECK("##### Getting isAccessibleTableCellSelected - call to CallBooleanMethod()", FALSE); - PrintDebugString(" ##### table cell isSelected = %d", tableCellInfo->isSelected); + PrintDebugString("[INFO]: ##### table cell isSelected = %d", tableCellInfo->isSelected); } else { - PrintDebugString(" ##### Error! either env == 0 or isAccessibleTableCellSelectedMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or isAccessibleTableCellSelectedMethod == 0"); return FALSE; } @@ -2363,13 +2360,13 @@ jobject globalRef = jniEnv->NewGlobalRef(tableCellAC); EXCEPTION_CHECK("##### Getting AccessibleTableCellAccessibleContext - call to NewGlobalRef()", FALSE); tableCellInfo->accessibleContext = (JOBJECT64)globalRef; - PrintDebugString(" ##### table cell AccessibleContext = %p", globalRef); + PrintDebugString("[INFO]: ##### table cell AccessibleContext = %p", globalRef); } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableCellAccessibleContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableCellAccessibleContextMethod == 0"); return FALSE; } - PrintDebugString(" ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo succeeded"); + PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo succeeded"); return TRUE; } @@ -2378,7 +2375,7 @@ jthrowable exception; - PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(%p):", + PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(%p):", acParent); // get the header row count @@ -2387,9 +2384,9 @@ getAccessibleTableRowHeaderRowCountMethod, acParent); EXCEPTION_CHECK("##### Getting AccessibleTableRowHeaderRowCount - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### table row count = %d", tableInfo->rowCount); + PrintDebugString("[INFO]: ##### table row count = %d", tableInfo->rowCount); } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleRowHeaderRowCountMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleRowHeaderRowCountMethod == 0"); return FALSE; } @@ -2399,9 +2396,9 @@ getAccessibleTableRowHeaderColumnCountMethod, acParent); EXCEPTION_CHECK("Getting AccessibleTableRowHeaderColumnCount - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### table column count = %d", tableInfo->columnCount); + PrintDebugString("[INFO]: ##### table column count = %d", tableInfo->columnCount); } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableRowHeaderColumnCountMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableRowHeaderColumnCountMethod == 0"); return FALSE; } @@ -2414,9 +2411,9 @@ jobject globalRef = jniEnv->NewGlobalRef(accTable); EXCEPTION_CHECK("##### Getting AccessibleTableRowHeader - call to NewGlobalRef()", FALSE); tableInfo->accessibleTable = (JOBJECT64)globalRef; - PrintDebugString(" ##### row header AccessibleTable = %p", globalRef); + PrintDebugString("[INFO]: ##### row header AccessibleTable = %p", globalRef); } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableRowHeaderMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableRowHeaderMethod == 0"); return FALSE; } @@ -2425,7 +2422,7 @@ tableInfo->summary = NULL; tableInfo->accessibleContext = NULL; - PrintDebugString(" ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader succeeded"); + PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader succeeded"); return TRUE; } @@ -2433,7 +2430,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(jobject acParent, AccessibleTableInfo *tableInfo) { jthrowable exception; - PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(%p):", + PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(%p):", acParent); // get the header row count @@ -2442,9 +2439,9 @@ getAccessibleTableColumnHeaderRowCountMethod, acParent); EXCEPTION_CHECK("##### Getting AccessibleTableColumnHeaderRowCount - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### table row count = %d", tableInfo->rowCount); + PrintDebugString("[INFO]: ##### table row count = %d", tableInfo->rowCount); } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleColumnHeaderRowCountMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleColumnHeaderRowCountMethod == 0"); return FALSE; } @@ -2454,9 +2451,9 @@ getAccessibleTableColumnHeaderColumnCountMethod, acParent); EXCEPTION_CHECK("Getting AccessibleTableColumnHeaderColumnCount - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### table column count = %d", tableInfo->columnCount); + PrintDebugString("[INFO]: ##### table column count = %d", tableInfo->columnCount); } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableColumnHeaderColumnCountMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableColumnHeaderColumnCountMethod == 0"); return FALSE; } // get the header AccessibleTable @@ -2468,9 +2465,9 @@ jobject globalRef = jniEnv->NewGlobalRef(accTable); EXCEPTION_CHECK("##### Getting AccessibleTableColumnHeader - call to NewGlobalRef()", FALSE); tableInfo->accessibleTable = (JOBJECT64)globalRef; - PrintDebugString(" ##### column header AccessibleTable = %p", globalRef); + PrintDebugString("[INFO]: ##### column header AccessibleTable = %p", globalRef); } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableColumnHeaderMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableColumnHeaderMethod == 0"); return FALSE; } @@ -2479,7 +2476,7 @@ tableInfo->summary = NULL; tableInfo->accessibleContext = NULL; - PrintDebugString(" ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader succeeded"); + PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader succeeded"); return TRUE; } @@ -2490,7 +2487,7 @@ jobject globalRef; jthrowable exception; - PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowDescription(%p):", + PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowDescription(%p):", acParent); if (getAccessibleTableRowDescriptionMethod != (jmethodID) 0) { @@ -2502,11 +2499,11 @@ EXCEPTION_CHECK("Getting AccessibleTableRowDescription - call to NewGlobalRef()", FALSE); jniEnv->DeleteLocalRef(returnedAccessibleContext); EXCEPTION_CHECK("Getting AccessibleTableRowDescription - call to DeleteLocalRef()", FALSE); - PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", + PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p", returnedAccessibleContext, globalRef); return globalRef; } else { - PrintDebugString(" Error! either env == 0 or getAccessibleTableRowDescriptionMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableRowDescriptionMethod == 0"); return (jobject) 0; } } @@ -2518,7 +2515,7 @@ jobject globalRef; jthrowable exception; - PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnDescription(%p):", + PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnDescription(%p):", acParent); if (getAccessibleTableColumnDescriptionMethod != (jmethodID) 0) { @@ -2531,11 +2528,11 @@ EXCEPTION_CHECK("Getting AccessibleTableColumnDescription - call to NewGlobalRef()", FALSE); jniEnv->DeleteLocalRef(returnedAccessibleContext); EXCEPTION_CHECK("Getting AccessibleTableColumnDescription - call to DeleteLocalRef()", FALSE); - PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", + PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p", returnedAccessibleContext, globalRef); return globalRef; } else { - PrintDebugString(" Error! either env == 0 or getAccessibleTableColumnDescriptionMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableColumnDescriptionMethod == 0"); return (jobject) 0; } } @@ -2546,7 +2543,7 @@ jthrowable exception; jint count; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount(%p)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount(%p)", accessibleTable); // Get the table row selection count @@ -2555,14 +2552,14 @@ getAccessibleTableRowSelectionCountMethod, accessibleTable); EXCEPTION_CHECK("##### Getting AccessibleTableRowSelectionCount - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### table row selection count = %d", count); + PrintDebugString("[INFO]: ##### table row selection count = %d", count); return count; } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableRowSelectionCountMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableRowSelectionCountMethod == 0"); return 0; } - PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount failed"); + PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount failed"); return 0; } @@ -2571,7 +2568,7 @@ jthrowable exception; BOOL result; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected(%p, %d)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected(%p, %d)", accessibleTable, row); if (isAccessibleTableRowSelectedMethod != (jmethodID) 0) { @@ -2579,14 +2576,14 @@ isAccessibleTableRowSelectedMethod, accessibleTable, row); EXCEPTION_CHECK("##### Getting isAccessibleTableRowSelected - call to CallBooleanMethod()", FALSE); - PrintDebugString(" ##### table row isSelected = %d", result); + PrintDebugString("[INFO]: ##### table row isSelected = %d", result); return result; } else { - PrintDebugString(" ##### Error! either env == 0 or isAccessibleTableRowSelectedMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or isAccessibleTableRowSelectedMethod == 0"); return FALSE; } - PrintDebugString(" ##### AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected failed"); + PrintDebugString("[ERROR]: AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected failed"); return FALSE; } @@ -2596,7 +2593,7 @@ jthrowable exception; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections(%p, %d %p)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections(%p, %d %p)", accessibleTable, count, selections); if (getAccessibleTableRowSelectionsMethod == (jmethodID) 0) { @@ -2610,10 +2607,10 @@ accessibleTable, i); EXCEPTION_CHECK("##### Getting AccessibleTableRowSelections - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### table row selection[%d] = %d", i, selections[i]); + PrintDebugString("[INFO]: ##### table row selection[%d] = %d", i, selections[i]); } - PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections succeeded"); + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections succeeded"); return TRUE; } @@ -2624,7 +2621,7 @@ jthrowable exception; jint count; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount(%p)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount(%p)", accessibleTable); // Get the table column selection count @@ -2633,14 +2630,14 @@ getAccessibleTableColumnSelectionCountMethod, accessibleTable); EXCEPTION_CHECK("##### Getting AccessibleTableColumnSelectionCount - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### table column selection count = %d", count); + PrintDebugString("[INFO]: ##### table column selection count = %d", count); return count; } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleRowCountMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleRowCountMethod == 0"); return 0; } - PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount failed"); + PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount failed"); return 0; } @@ -2649,7 +2646,7 @@ jthrowable exception; BOOL result; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected(%p, %d)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected(%p, %d)", accessibleTable, column); if (isAccessibleTableColumnSelectedMethod != (jmethodID) 0) { @@ -2657,14 +2654,14 @@ isAccessibleTableColumnSelectedMethod, accessibleTable, column); EXCEPTION_CHECK("##### Getting isAccessibleTableColumnSelected - call to CallBooleanMethod()", FALSE); - PrintDebugString(" ##### table column isSelected = %d", result); + PrintDebugString("[INFO]: ##### table column isSelected = %d", result); return result; } else { - PrintDebugString(" ##### Error! either env == 0 or isAccessibleTableColumnSelectedMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or isAccessibleTableColumnSelectedMethod == 0"); return FALSE; } - PrintDebugString(" ##### AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected failed"); + PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected failed"); return FALSE; } @@ -2673,7 +2670,7 @@ jint *selections) { jthrowable exception; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections(%p, %d, %p)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections(%p, %d, %p)", accessibleTable, count, selections); if (getAccessibleTableColumnSelectionsMethod == (jmethodID) 0) { @@ -2687,10 +2684,10 @@ accessibleTable, i); EXCEPTION_CHECK("##### Getting AccessibleTableColumnSelections - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### table Column selection[%d] = %d", i, selections[i]); + PrintDebugString("[INFO]: ##### table Column selection[%d] = %d", i, selections[i]); } - PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections succeeded"); + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections succeeded"); return TRUE; } @@ -2700,7 +2697,7 @@ jthrowable exception; jint result; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableRow(%p, index=%d)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRow(%p, index=%d)", accessibleTable, index); if (getAccessibleTableRowMethod != (jmethodID) 0) { @@ -2708,14 +2705,14 @@ getAccessibleTableRowMethod, accessibleTable, index); EXCEPTION_CHECK("##### Getting AccessibleTableRow - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### table row = %d", result); + PrintDebugString("[INFO]: ##### table row = %d", result); return result; } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableRowMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableRowMethod == 0"); return -1; } - PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableRow failed"); + PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRow failed"); return -1; } @@ -2724,7 +2721,7 @@ jthrowable exception; jint result; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableColumn(%p, index=%d)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumn(%p, index=%d)", accessibleTable, index); if (getAccessibleTableColumnMethod != (jmethodID) 0) { @@ -2732,14 +2729,14 @@ getAccessibleTableColumnMethod, accessibleTable, index); EXCEPTION_CHECK("##### Getting AccessibleTableColumn - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### table column = %d", result); + PrintDebugString("[INFO]: ##### table column = %d", result); return result; } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableColumnMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableColumnMethod == 0"); return -1; } - PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumn failed"); + PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumn failed"); return -1; } @@ -2748,7 +2745,7 @@ jthrowable exception; jint result; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableIndex(%p, row=%d, col=%d)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableIndex(%p, row=%d, col=%d)", accessibleTable, row, column); if (getAccessibleTableIndexMethod != (jmethodID) 0) { @@ -2756,14 +2753,14 @@ getAccessibleTableIndexMethod, accessibleTable, row, column); EXCEPTION_CHECK("##### Getting getAccessibleTableIndex - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### table index = %d", result); + PrintDebugString("[INFO]: ##### table index = %d", result); return result; } else { - PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableIndexMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableIndexMethod == 0"); return -1; } - PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableIndex failed"); + PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableIndex failed"); return -1; } @@ -2780,7 +2777,7 @@ const wchar_t *stringBytes; jsize length; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleRelationSet(%p, %p)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleRelationSet(%p, %p)", accessibleContext, relationSet); if (getAccessibleRelationCountMethod == (jmethodID) 0 || @@ -2795,7 +2792,7 @@ getAccessibleRelationCountMethod, accessibleContext); EXCEPTION_CHECK("##### Getting AccessibleRelationCount - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### AccessibleRelation count = %d", relationSet->relationCount); + PrintDebugString("[INFO]: ##### AccessibleRelation count = %d", relationSet->relationCount); // Get the relation set @@ -2820,11 +2817,11 @@ // jniEnv->CallVoidMethod(accessBridgeObject, // decrementReferenceMethod, js); //EXCEPTION_CHECK("Getting AccessibleRelation key - call to CallVoidMethod()", FALSE); - PrintDebugString("##### AccessibleRelation key = %ls", relationSet->relations[i].key ); + PrintDebugString("[INFO]: ##### AccessibleRelation key = %ls", relationSet->relations[i].key ); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleRelation key - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" AccessibleRelation key is null."); + PrintDebugString("[WARN]: AccessibleRelation key is null."); relationSet->relations[i].key [0] = (wchar_t) 0; } @@ -2840,11 +2837,11 @@ jobject globalRef = jniEnv->NewGlobalRef(target); EXCEPTION_CHECK("Getting AccessibleRelationSet - call to NewGlobalRef()", FALSE); relationSet->relations[i].targets[j] = (JOBJECT64)globalRef; - PrintDebugString(" relation set item: %p", globalRef); + PrintDebugString("[INFO]: relation set item: %p", globalRef); } } - PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleRelationSet succeeded"); + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleRelationSet succeeded"); return TRUE; } @@ -2862,7 +2859,7 @@ const wchar_t *stringBytes; jsize length; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleHypertext(%p, %p)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHypertext(%p, %p)", accessibleContext, hypertext); // get the AccessibleHypertext @@ -2873,10 +2870,10 @@ jobject globalRef = jniEnv->NewGlobalRef(ht); EXCEPTION_CHECK("##### Getting AccessibleHypertext - call to NewGlobalRef()", FALSE); hypertext->accessibleHypertext = (JOBJECT64)globalRef; - PrintDebugString(" ##### AccessibleHypertext = %p", globalRef); + PrintDebugString("[INFO]: ##### AccessibleHypertext = %p", globalRef); if (hypertext->accessibleHypertext == 0) { - PrintDebugString(" ##### null AccessibleHypertext; returning FALSE"); + PrintDebugString("[WARN]: ##### null AccessibleHypertext; returning FALSE"); return false; } @@ -2885,7 +2882,7 @@ getAccessibleHyperlinkCountMethod,accessibleContext); EXCEPTION_CHECK("##### Getting hyperlink count - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### hyperlink count = %d", hypertext->linkCount); + PrintDebugString("[INFO]: ##### hyperlink count = %d", hypertext->linkCount); // get the hypertext links @@ -2900,7 +2897,7 @@ jobject globalRef = jniEnv->NewGlobalRef(hl); EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to NewGlobalRef()", FALSE); hypertext->links[i].accessibleHyperlink = (JOBJECT64)globalRef; - PrintDebugString(" ##### AccessibleHyperlink = %p", globalRef); + PrintDebugString("[INFO]: ##### AccessibleHyperlink = %p", globalRef); // get the hyperlink text jstring js = (jstring)jniEnv->CallObjectMethod(accessBridgeObject, @@ -2924,11 +2921,11 @@ // jniEnv->CallVoidMethod(accessBridgeObject, // decrementReferenceMethod, js); //EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to CallVoidMethod()", FALSE); - PrintDebugString("##### AccessibleHyperlink text = %ls", hypertext->links[i].text ); + PrintDebugString("[INFO]: ##### AccessibleHyperlink text = %ls", hypertext->links[i].text ); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" AccessibleHyperlink text is null."); + PrintDebugString("[WARN]: AccessibleHyperlink text is null."); hypertext->links[i].text[0] = (wchar_t) 0; } @@ -2937,7 +2934,7 @@ hypertext->links[i].accessibleHyperlink, i); EXCEPTION_CHECK("##### Getting hyperlink start index - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### hyperlink start index = %d", hypertext->links[i].startIndex); + PrintDebugString("[INFO]: ##### hyperlink start index = %d", hypertext->links[i].startIndex); hypertext->links[i].endIndex = jniEnv->CallIntMethod(accessBridgeObject, @@ -2945,11 +2942,11 @@ hypertext->links[i].accessibleHyperlink, i); EXCEPTION_CHECK("##### Getting hyperlink end index - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### hyperlink end index = %d", hypertext->links[i].endIndex); + PrintDebugString("[INFO]: ##### hyperlink end index = %d", hypertext->links[i].endIndex); } - PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleHypertext succeeded"); + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHypertext succeeded"); return TRUE; } @@ -2963,7 +2960,7 @@ jthrowable exception; BOOL returnVal; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::activateAccessibleHyperlink(%p, %p):", + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::activateAccessibleHyperlink(%p, %p):", accessibleContext, accessibleHyperlink); if (activateAccessibleHyperlinkMethod != (jmethodID) 0) { @@ -2972,7 +2969,7 @@ EXCEPTION_CHECK("activateAccessibleHyperlink - call to CallBooleanMethod()", FALSE); return returnVal; } else { - PrintDebugString("\r\n Error! either jniEnv == 0 or activateAccessibleHyperlinkMethod == 0"); + PrintDebugString("[ERROR]: either jniEnv == 0 or activateAccessibleHyperlinkMethod == 0"); return FALSE; } } @@ -2993,7 +2990,7 @@ jthrowable exception; const wchar_t *stringBytes; jsize length; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(%p, %p, startIndex = %d)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(%p, %p, startIndex = %d)", accessibleContext, hypertext, nStartIndex); // get the AccessibleHypertext @@ -3003,9 +3000,9 @@ jobject globalRef = jniEnv->NewGlobalRef(ht); EXCEPTION_CHECK("##### Getting AccessibleHypertext - call to NewGlobalRef()", FALSE); hypertext->accessibleHypertext = (JOBJECT64)globalRef; - PrintDebugString(" ##### AccessibleHypertext = %p", globalRef); + PrintDebugString("[INFO]: ##### AccessibleHypertext = %p", globalRef); if (hypertext->accessibleHypertext == 0) { - PrintDebugString(" ##### null AccessibleHypertext; returning FALSE"); + PrintDebugString("[WARN]: ##### null AccessibleHypertext; returning FALSE"); return FALSE; } @@ -3013,7 +3010,7 @@ hypertext->linkCount = jniEnv->CallIntMethod(accessBridgeObject, getAccessibleHyperlinkCountMethod, accessibleContext); EXCEPTION_CHECK("##### Getting hyperlink count - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### hyperlink count = %d", hypertext->linkCount); + PrintDebugString("[INFO]: ##### hyperlink count = %d", hypertext->linkCount); if (nStartIndex >= hypertext->linkCount) { return FALSE; @@ -3025,7 +3022,7 @@ // i < hypertext->linkCount int bufIndex = 0; for (int i = nStartIndex; (i < hypertext->linkCount) && (i < nStartIndex + MAX_HYPERLINKS); i++) { - PrintDebugString(" getting hyperlink %d ...", i); + PrintDebugString("[INFO]: getting hyperlink %d ...", i); // get the hyperlink jobject hl = jniEnv->CallObjectMethod(accessBridgeObject, @@ -3036,7 +3033,7 @@ jobject globalRef = jniEnv->NewGlobalRef(hl); EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to NewGlobalRef()", FALSE); hypertext->links[bufIndex].accessibleHyperlink = (JOBJECT64)globalRef; - PrintDebugString(" ##### AccessibleHyperlink = %p", globalRef); + PrintDebugString("[INFO]: ##### AccessibleHyperlink = %p", globalRef); // get the hyperlink text jstring js = (jstring)jniEnv->CallObjectMethod(accessBridgeObject, @@ -3061,12 +3058,12 @@ // jniEnv->CallVoidMethod(accessBridgeObject, // decrementReferenceMethod, js); //EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to CallVoidMethod()", FALSE); - PrintDebugString("##### AccessibleHyperlink text = %ls", hypertext->links[bufIndex].text ); + PrintDebugString("[INFO]: ##### AccessibleHyperlink text = %ls", hypertext->links[bufIndex].text ); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" AccessibleHyperlink text is null."); + PrintDebugString("[WARN]: AccessibleHyperlink text is null."); hypertext->links[bufIndex].text[0] = (wchar_t) 0; } @@ -3075,19 +3072,19 @@ hypertext->links[bufIndex].accessibleHyperlink, i); EXCEPTION_CHECK("##### Getting hyperlink start index - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### hyperlink start index = %d", hypertext->links[bufIndex].startIndex); + PrintDebugString("[INFO]: ##### hyperlink start index = %d", hypertext->links[bufIndex].startIndex); hypertext->links[bufIndex].endIndex = jniEnv->CallIntMethod(accessBridgeObject, getAccessibleHyperlinkEndIndexMethod, hypertext->links[bufIndex].accessibleHyperlink, i); EXCEPTION_CHECK("##### Getting hyperlink end index - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### hyperlink end index = %d", hypertext->links[bufIndex].endIndex); + PrintDebugString("[INFO]: ##### hyperlink end index = %d", hypertext->links[bufIndex].endIndex); bufIndex++; } - PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleHypertextExt succeeded"); + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHypertextExt succeeded"); return TRUE; } @@ -3095,7 +3092,7 @@ jthrowable exception; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleHyperlinkCount(%X)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHyperlinkCount(%X)", accessibleContext); if (getAccessibleHyperlinkCountMethod == (jmethodID)0) { @@ -3106,7 +3103,7 @@ jint linkCount = jniEnv->CallIntMethod(accessBridgeObject, getAccessibleHyperlinkCountMethod, accessibleContext); EXCEPTION_CHECK("##### Getting hyperlink count - call to CallIntMethod()", -1); - PrintDebugString(" ##### hyperlink count = %d", linkCount); + PrintDebugString("[INFO]: ##### hyperlink count = %d", linkCount); return linkCount; } @@ -3117,7 +3114,7 @@ jthrowable exception; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleHypertextLinkIndex(%p, index = %d)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHypertextLinkIndex(%p, index = %d)", hypertext, nIndex); if (getAccessibleHypertextLinkIndexMethod == (jmethodID)0) { @@ -3129,7 +3126,7 @@ hypertext, nIndex); EXCEPTION_CHECK("##### Getting hyperlink index - call to CallIntMethod()", -1); - PrintDebugString(" ##### hyperlink index = %d", index); + PrintDebugString("[INFO]: ##### hyperlink index = %d", index); return index; } @@ -3142,7 +3139,7 @@ const wchar_t *stringBytes; jsize length; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleHyperlink(%p, index = %d)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHyperlink(%p, index = %d)", hypertext, index); @@ -3155,7 +3152,7 @@ jobject globalRef = jniEnv->NewGlobalRef(hl); EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to NewGlobalRef()", FALSE); info->accessibleHyperlink = (JOBJECT64)globalRef; - PrintDebugString(" ##### AccessibleHyperlink = %p", globalRef); + PrintDebugString("[INFO]: ##### AccessibleHyperlink = %p", globalRef); // get the hyperlink text jstring js = (jstring)jniEnv->CallObjectMethod(accessBridgeObject, @@ -3180,12 +3177,12 @@ // jniEnv->CallVoidMethod(accessBridgeObject, // decrementReferenceMethod, js); //EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to CallVoidMethod()", FALSE); - PrintDebugString("##### AccessibleHyperlink text = %ls", info->text ); + PrintDebugString("[INFO]: ##### AccessibleHyperlink text = %ls", info->text ); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" AccessibleHyperlink text is null."); + PrintDebugString("[WARN]: AccessibleHyperlink text is null."); info->text[0] = (wchar_t) 0; } @@ -3194,14 +3191,14 @@ info->accessibleHyperlink, index); EXCEPTION_CHECK("##### Getting hyperlink start index - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### hyperlink start index = %d", info->startIndex); + PrintDebugString("[INFO]: ##### hyperlink start index = %d", info->startIndex); info->endIndex = jniEnv->CallIntMethod(accessBridgeObject, getAccessibleHyperlinkEndIndexMethod, info->accessibleHyperlink, index); EXCEPTION_CHECK("##### Getting hyperlink end index - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### hyperlink end index = %d", info->endIndex); + PrintDebugString("[INFO]: ##### hyperlink end index = %d", info->endIndex); return TRUE; } @@ -3215,7 +3212,7 @@ jthrowable exception; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleKeyBindings(%p, %p)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleKeyBindings(%p, %p)", accessibleContext, keyBindings); if (getAccessibleKeyBindingsCountMethod == (jmethodID) 0 || @@ -3230,7 +3227,7 @@ EXCEPTION_CHECK("##### Getting key bindings count - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### key bindings count = %d", keyBindings->keyBindingsCount); + PrintDebugString("[INFO]: ##### key bindings count = %d", keyBindings->keyBindingsCount); // get the key bindings for (int i = 0; i < keyBindings->keyBindingsCount && i < MAX_KEY_BINDINGS; i++) { @@ -3241,8 +3238,9 @@ accessibleContext, i); EXCEPTION_CHECK("##### Getting key binding character - call to CallCharMethod()", FALSE); - PrintDebugString(" ##### key binding character = %c", keyBindings->keyBindingInfo[i].character); - PrintDebugString(" ##### key binding character in hex = %hx", keyBindings->keyBindingInfo[i].character); + PrintDebugString("[INFO]: ##### key binding character = %c"\ + " ##### key binding character in hex = %hx"\ + , keyBindings->keyBindingInfo[i].character, keyBindings->keyBindingInfo[i].character); // get the key binding modifiers keyBindings->keyBindingInfo[i].modifiers = jniEnv->CallIntMethod(accessBridgeObject, @@ -3250,7 +3248,7 @@ accessibleContext, i); EXCEPTION_CHECK("##### Getting key binding modifiers - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### key binding modifiers = %x", keyBindings->keyBindingInfo[i].modifiers); + PrintDebugString("[INFO]: ##### key binding modifiers = %x", keyBindings->keyBindingInfo[i].modifiers); } return FALSE; } @@ -3263,14 +3261,14 @@ const wchar_t *stringBytes; jsize length; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleIcons(%p, %p)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleIcons(%p, %p)", accessibleContext, icons); if (getAccessibleIconsCountMethod == (jmethodID) 0 || getAccessibleIconDescriptionMethod == (jmethodID) 0 || getAccessibleIconHeightMethod == (jmethodID) 0 || getAccessibleIconWidthMethod == (jmethodID) 0) { - PrintDebugString(" ##### missing method(s) !!!"); + PrintDebugString("[WARN]: ##### missing method(s) !!!"); return FALSE; } @@ -3280,7 +3278,7 @@ getAccessibleIconsCountMethod, accessibleContext); EXCEPTION_CHECK("##### Getting icons count - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### icons count = %d", icons->iconsCount); + PrintDebugString("[INFO]: ##### icons count = %d", icons->iconsCount); // get the icons @@ -3308,11 +3306,11 @@ // jniEnv->CallVoidMethod(accessBridgeObject, // decrementReferenceMethod, js); //EXCEPTION_CHECK("Getting AccessibleIcon description - call to CallVoidMethod()", FALSE); - PrintDebugString("##### AccessibleIcon description = %ls", icons->iconInfo[i].description ); + PrintDebugString("[INFO]: ##### AccessibleIcon description = %ls", icons->iconInfo[i].description ); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleIcon description - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" AccessibleIcon description is null."); + PrintDebugString("[WARN]: AccessibleIcon description is null."); icons->iconInfo[i].description[0] = (wchar_t) 0; } @@ -3323,7 +3321,7 @@ accessibleContext, i); EXCEPTION_CHECK("##### Getting icon height - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### icon height = %d", icons->iconInfo[i].height); + PrintDebugString("[INFO]: ##### icon height = %d", icons->iconInfo[i].height); // get the icon width icons->iconInfo[i].width = jniEnv->CallIntMethod(accessBridgeObject, @@ -3331,7 +3329,7 @@ accessibleContext, i); EXCEPTION_CHECK("##### Getting icon width - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### icon width = %d", icons->iconInfo[i].width); + PrintDebugString("[INFO]: ##### icon width = %d", icons->iconInfo[i].width); } return FALSE; } @@ -3344,12 +3342,12 @@ const wchar_t *stringBytes; jsize length; - PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleIcons(%p, %p)", + PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleIcons(%p, %p)", accessibleContext, actions); if (getAccessibleActionsCountMethod == (jmethodID) 0 || getAccessibleActionNameMethod == (jmethodID) 0) { - PrintDebugString(" ##### missing method(s) !!!"); + PrintDebugString("[WARN]: ##### missing method(s) !!!"); return FALSE; } @@ -3359,7 +3357,7 @@ getAccessibleActionsCountMethod,accessibleContext); EXCEPTION_CHECK("##### Getting actions count - call to CallIntMethod()", FALSE); - PrintDebugString(" ##### key actions count = %d", actions->actionsCount); + PrintDebugString("[INFO]: ##### key actions count = %d", actions->actionsCount); // get the actions @@ -3387,11 +3385,11 @@ // jniEnv->CallVoidMethod(accessBridgeObject, // decrementReferenceMethod, js); //EXCEPTION_CHECK("Getting AccessibleAction name - call to CallVoidMethod()", FALSE); - PrintDebugString("##### AccessibleAction name = %ls", actions->actionInfo[i].name ); + PrintDebugString("[INFO]: ##### AccessibleAction name = %ls", actions->actionInfo[i].name ); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleAction name - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" AccessibleAction name is null."); + PrintDebugString("[WARN]: AccessibleAction name is null."); actions->actionInfo[i].name [0] = (wchar_t) 0; } } @@ -3405,7 +3403,7 @@ jthrowable exception; BOOL returnVal; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::doAccessibleActions(%p, #actions %d %s):", + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::doAccessibleActions(%p, #actions %d %s):", accessibleContext, actionsToDo->actionsCount, actionsToDo->actions[0].name); @@ -3415,15 +3413,15 @@ return FALSE; } - PrintDebugString("\r\n doing %d actions ...", actionsToDo->actionsCount); + PrintDebugString("[INFO]: doing %d actions ...", actionsToDo->actionsCount); for (int i = 0; i < actionsToDo->actionsCount && i < MAX_ACTIONS_TO_DO; i++) { - PrintDebugString("\r doing action %d: %s ...", i, actionsToDo->actions[i].name); + PrintDebugString("[INFO]: doing action %d: %s ...", i, actionsToDo->actions[i].name); // create a Java String for the action name wchar_t *actionName = (wchar_t *)actionsToDo->actions[i].name; jstring javaName = jniEnv->NewString(actionName, (jsize)wcslen(actionName)); if (javaName == 0) { - PrintDebugString("\r NewString failed"); + PrintDebugString("[ERROR]: NewString failed"); *failure = i; return FALSE; } @@ -3434,7 +3432,7 @@ EXCEPTION_CHECK("doAccessibleActions - call to CallBooleanMethod()", FALSE); if (returnVal != TRUE) { - PrintDebugString("\r Action %d failed", i); + PrintDebugString("[ERROR]: Action %d failed", i); *failure = i; return FALSE; } @@ -3458,7 +3456,7 @@ return FALSE; } - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextInfo(%p, %d, %d):", + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextInfo(%p, %d, %d):", accessibleContext, x, y); // Get the character count @@ -3467,9 +3465,9 @@ getAccessibleCharCountFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleCharCount - call to CallIntMethod()", FALSE); - PrintDebugString(" Char count = %d", textInfo->charCount); + PrintDebugString("[INFO]: Char count = %d", textInfo->charCount); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleCharCountFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleCharCountFromContextMethod == 0"); return FALSE; } @@ -3479,9 +3477,9 @@ getAccessibleCaretPositionFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleCaretPosition - call to CallIntMethod()", FALSE); - PrintDebugString(" Index at caret = %d", textInfo->caretIndex); + PrintDebugString("[INFO]: Index at caret = %d", textInfo->caretIndex); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleCaretPositionFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleCaretPositionFromContextMethod == 0"); return FALSE; } @@ -3496,9 +3494,9 @@ accessibleContext, x, y); EXCEPTION_CHECK("Getting AccessibleIndexAtPoint - call to CallIntMethod()", FALSE); } - PrintDebugString(" Index at point = %d", textInfo->indexAtPoint); + PrintDebugString("[INFO]: Index at point = %d", textInfo->indexAtPoint); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleIndexAtPointFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleIndexAtPointFromContextMethod == 0"); return FALSE; } return TRUE; @@ -3512,7 +3510,7 @@ jthrowable exception; jsize length; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextItems(%p):", accessibleContext); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextItems(%p):", accessibleContext); // Verify the Java VM still exists and AccessibleContext is // an instance of AccessibleText @@ -3526,7 +3524,7 @@ getAccessibleLetterAtIndexFromContextMethod, accessibleContext, index); EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to CallIntMethod()", FALSE); - PrintDebugString(" returned from CallObjectMethod(), js = %p", js); + PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js); if (js != (jstring) 0) { stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to GetStringChars()", FALSE); @@ -3536,15 +3534,15 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to CallVoidMethod()", FALSE); - PrintDebugString(" Accessible Text letter = %c", textItems->letter); + PrintDebugString("[INFO]: Accessible Text letter = %c", textItems->letter); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Accessible Text letter is null."); + PrintDebugString("[WARN]: Accessible Text letter is null."); textItems->letter = (wchar_t) 0; } } else { - PrintDebugString(" Error! either env == 0 or getAccessibleLetterAtIndexFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleLetterAtIndexFromContextMethod == 0"); return FALSE; } @@ -3555,7 +3553,7 @@ getAccessibleWordAtIndexFromContextMethod, accessibleContext, index); EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to CallIntMethod()", FALSE); - PrintDebugString(" returned from CallObjectMethod(), js = %p", js); + PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js); if (js != (jstring) 0) { stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to GetStringChars()", FALSE); @@ -3569,15 +3567,15 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to CallVoidMethod()", FALSE); - wPrintDebugString(L" Accessible Text word = %ls", textItems->word); + wPrintDebugString(L"[INFO]: Accessible Text word = %ls", textItems->word); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Accessible Text word is null."); + PrintDebugString("[WARN]: Accessible Text word is null."); textItems->word[0] = (wchar_t) 0; } } else { - PrintDebugString(" Error! either env == 0 or getAccessibleWordAtIndexFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleWordAtIndexFromContextMethod == 0"); return FALSE; } @@ -3587,7 +3585,7 @@ getAccessibleSentenceAtIndexFromContextMethod, accessibleContext, index); EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to CallObjectMethod()", FALSE); - PrintDebugString(" returned from CallObjectMethod(), js = %p", js); + PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js); if (js != (jstring) 0) { stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to GetStringChars()", FALSE); @@ -3605,15 +3603,15 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to CallVoidMethod()", FALSE); - wPrintDebugString(L" Accessible Text sentence = %ls", textItems->sentence); + wPrintDebugString(L"[INFO]: Accessible Text sentence = %ls", textItems->sentence); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Accessible Text sentence is null."); + PrintDebugString("[WARN]: Accessible Text sentence is null."); textItems->sentence[0] = (wchar_t) 0; } } else { - PrintDebugString(" Error! either env == 0 or getAccessibleSentenceAtIndexFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleSentenceAtIndexFromContextMethod == 0"); return FALSE; } @@ -3628,7 +3626,7 @@ jthrowable exception; jsize length; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextSelectionInfo(%p):", + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextSelectionInfo(%p):", accessibleContext); // Verify the Java VM still exists and AccessibleContext is @@ -3643,9 +3641,9 @@ getAccessibleTextSelectionStartFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleTextSelectionStart - call to CallIntMethod()", FALSE); - PrintDebugString(" Selection start = %d", selectionInfo->selectionStartIndex); + PrintDebugString("[INFO]: Selection start = %d", selectionInfo->selectionStartIndex); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleTextSelectionStartFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextSelectionStartFromContextMethod == 0"); return FALSE; } @@ -3655,9 +3653,9 @@ getAccessibleTextSelectionEndFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleTextSelectionEnd - call to CallIntMethod()", FALSE); - PrintDebugString(" Selection end = %d", selectionInfo->selectionEndIndex); + PrintDebugString("[INFO]: Selection end = %d", selectionInfo->selectionEndIndex); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleTextSelectionEndFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextSelectionEndFromContextMethod == 0"); return FALSE; } @@ -3667,7 +3665,7 @@ getAccessibleTextSelectedTextFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to CallObjectMethod()", FALSE); - PrintDebugString(" returned from CallObjectMethod(), js = %p", js); + PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js); if (js != (jstring) 0) { stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to GetStringChars()", FALSE); @@ -3681,15 +3679,15 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to CallVoidMethod()", FALSE); - PrintDebugString(" Accessible's selected text = %s", selectionInfo->selectedText); + PrintDebugString("[INFO]: Accessible's selected text = %s", selectionInfo->selectedText); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Accessible's selected text is null."); + PrintDebugString("[WARN]: Accessible's selected text is null."); selectionInfo->selectedText[0] = (wchar_t) 0; } } else { - PrintDebugString(" Error! either env == 0 or getAccessibleTextSelectedTextFromContextMethod == 0"); + PrintDebugString("[WARN]: either env == 0 or getAccessibleTextSelectedTextFromContextMethod == 0"); return FALSE; } return TRUE; @@ -3703,7 +3701,7 @@ jthrowable exception; jsize length; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(%p):", accessibleContext); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(%p):", accessibleContext); // Verify the Java VM still exists and AccessibleContext is // an instance of AccessibleText @@ -3712,7 +3710,7 @@ } if (accessibleContext == (jobject) 0) { - PrintDebugString(" passed in AccessibleContext == null! (oops)"); + PrintDebugString("[WARN]: passed in AccessibleContext == null! (oops)"); attributes->bold = FALSE; attributes->italic = FALSE; @@ -3739,19 +3737,19 @@ // Get the AttributeSet if (getAccessibleAttributeSetAtIndexFromContextMethod != (jmethodID) 0) { - PrintDebugString(" Getting AttributeSet at index..."); + PrintDebugString("[INFO]: Getting AttributeSet at index..."); AttributeSet = jniEnv->CallObjectMethod(accessBridgeObject, getAccessibleAttributeSetAtIndexFromContextMethod, accessibleContext, index); EXCEPTION_CHECK("Getting AccessibleAttributeSetAtIndex - call to CallObjectMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleAttributeSetAtIndexFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleAttributeSetAtIndexFromContextMethod == 0"); return FALSE; } // It is legal for the AttributeSet object to be null, in which case we return false! if (AttributeSet == (jobject) 0) { - PrintDebugString(" AttributeSet returned at index is null (this is legal! - see AWT in J2SE 1.3"); + PrintDebugString("[WARN]: AttributeSet returned at index is null (this is legal! - see AWT in J2SE 1.3"); attributes->bold = FALSE; attributes->italic = FALSE; @@ -3778,13 +3776,13 @@ // Get the bold setting if (getBoldFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting bold from AttributeSet..."); + PrintDebugString("[INFO]: Getting bold from AttributeSet..."); attributes->bold = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, getBoldFromAttributeSetMethod, AttributeSet); EXCEPTION_CHECK("Getting BoldFromAttributeSet - call to CallBooleanMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getBoldFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getBoldFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting BoldFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -3795,13 +3793,13 @@ // Get the italic setting if (getItalicFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting italic from AttributeSet..."); + PrintDebugString("[INFO]: Getting italic from AttributeSet..."); attributes->italic = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, getItalicFromAttributeSetMethod, AttributeSet); EXCEPTION_CHECK("Getting ItalicFromAttributeSet - call to CallBooleanMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getItalicdFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getItalicdFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting ItalicFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -3812,13 +3810,13 @@ // Get the underline setting if (getUnderlineFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting underline from AttributeSet..."); + PrintDebugString("[INFO]: Getting underline from AttributeSet..."); attributes->underline = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, getUnderlineFromAttributeSetMethod, AttributeSet); EXCEPTION_CHECK("Getting UnderlineFromAttributeSet - call to CallBooleanMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getUnderlineFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getUnderlineFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting UnderlineFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -3829,13 +3827,13 @@ // Get the strikethrough setting if (getStrikethroughFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting strikethrough from AttributeSet..."); + PrintDebugString("[INFO]: Getting strikethrough from AttributeSet..."); attributes->strikethrough = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, getStrikethroughFromAttributeSetMethod, AttributeSet); EXCEPTION_CHECK("Getting StrikethroughFromAttributeSet - call to CallBooleanMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getStrikethroughFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getStrikethroughFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting StrikethroughFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -3846,13 +3844,13 @@ // Get the superscript setting if (getSuperscriptFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting superscript from AttributeSet..."); + PrintDebugString("[INFO]: Getting superscript from AttributeSet..."); attributes->superscript = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, getSuperscriptFromAttributeSetMethod, AttributeSet); EXCEPTION_CHECK("Getting SuperscriptFromAttributeSet - call to CallBooleanMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getSuperscripteFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getSuperscripteFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting SuperscriptFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -3863,13 +3861,13 @@ // Get the subscript setting if (getSubscriptFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting subscript from AttributeSet..."); + PrintDebugString("[INFO]: Getting subscript from AttributeSet..."); attributes->subscript = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, getSubscriptFromAttributeSetMethod, AttributeSet); EXCEPTION_CHECK("Getting SubscriptFromAttributeSet - call to CallBooleanMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getSubscriptFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getSubscriptFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting SubscriptFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -3880,7 +3878,7 @@ // Get the backgroundColor setting if (getBackgroundColorFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting backgroundColor from AttributeSet..."); + PrintDebugString("[INFO]: Getting backgroundColor from AttributeSet..."); js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject, getBackgroundColorFromAttributeSetMethod, AttributeSet); @@ -3898,15 +3896,15 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to CallVoidMethod()", FALSE); - wPrintDebugString(L" AttributeSet's background color = %ls", attributes->backgroundColor); + wPrintDebugString(L"[INFO]: AttributeSet's background color = %ls", attributes->backgroundColor); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" AttributeSet's background color is null."); + PrintDebugString("[WARN]: AttributeSet's background color is null."); attributes->backgroundColor[0] = (wchar_t) 0; } } else { - PrintDebugString(" Error! either env == 0 or getBackgroundColorFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getBackgroundColorFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -3917,7 +3915,7 @@ // Get the foregroundColor setting if (getForegroundColorFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting foregroundColor from AttributeSet..."); + PrintDebugString("[INFO]: Getting foregroundColor from AttributeSet..."); js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject, getForegroundColorFromAttributeSetMethod, AttributeSet); @@ -3935,15 +3933,15 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to CallVoidMethod()", FALSE); - wPrintDebugString(L" AttributeSet's foreground color = %ls", attributes->foregroundColor); + wPrintDebugString(L"[INFO]: AttributeSet's foreground color = %ls", attributes->foregroundColor); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" AttributeSet's foreground color is null."); + PrintDebugString("[WARN]: AttributeSet's foreground color is null."); attributes->foregroundColor[0] = (wchar_t) 0; } } else { - PrintDebugString(" Error! either env == 0 or getForegroundColorFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getForegroundColorFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -3954,7 +3952,7 @@ // Get the fontFamily setting if (getFontFamilyFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting fontFamily from AttributeSet..."); + PrintDebugString("[INFO]: Getting fontFamily from AttributeSet..."); js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject, getFontFamilyFromAttributeSetMethod, AttributeSet); @@ -3972,15 +3970,15 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to CallVoidMethod()", FALSE); - wPrintDebugString(L" AttributeSet's fontFamily = %ls", attributes->fontFamily); + wPrintDebugString(L"[INFO]: AttributeSet's fontFamily = %ls", attributes->fontFamily); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" AttributeSet's fontFamily is null."); + PrintDebugString("[WARN]: AttributeSet's fontFamily is null."); attributes->backgroundColor[0] = (wchar_t) 0; } } else { - PrintDebugString(" Error! either env == 0 or getFontFamilyFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getFontFamilyFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -3991,14 +3989,14 @@ // Get the font size if (getFontSizeFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting font size from AttributeSet..."); + PrintDebugString("[INFO]: Getting font size from AttributeSet..."); attributes->fontSize = jniEnv->CallIntMethod(accessBridgeObject, getFontSizeFromAttributeSetMethod, AttributeSet); EXCEPTION_CHECK("Getting FontSizeFromAttributeSet - call to CallIntMethod()", FALSE); - PrintDebugString(" AttributeSet's font size = %d", attributes->fontSize); + PrintDebugString("[INFO]: AttributeSet's font size = %d", attributes->fontSize); } else { - PrintDebugString(" Error! either env == 0 or getAlignmentFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAlignmentFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting FontSizeFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -4016,7 +4014,7 @@ AttributeSet); EXCEPTION_CHECK("Getting AlignmentFromAttributeSet - call to CallIntMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getAlignmentFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAlignmentFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting AlignmentFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -4027,13 +4025,13 @@ // Get the bidiLevel setting if (getBidiLevelFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting bidiLevel from AttributeSet..."); + PrintDebugString("[INFO]: Getting bidiLevel from AttributeSet..."); attributes->bidiLevel = jniEnv->CallIntMethod(accessBridgeObject, getBidiLevelFromAttributeSetMethod, AttributeSet); EXCEPTION_CHECK("Getting BidiLevelFromAttributeSet - call to CallIntMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getBidiLevelFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getBidiLevelFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting BidiLevelFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -4044,13 +4042,13 @@ // Get the firstLineIndent setting if (getFirstLineIndentFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting firstLineIndent from AttributeSet..."); + PrintDebugString("[ERROR]: Getting firstLineIndent from AttributeSet..."); attributes->firstLineIndent = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject, getFirstLineIndentFromAttributeSetMethod, AttributeSet); EXCEPTION_CHECK("Getting FirstLineIndentFromAttributeSet - call to CallIntMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getFirstLineIndentFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getFirstLineIndentFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting FirstLineIndentFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -4061,13 +4059,13 @@ // Get the leftIndent setting if (getLeftIndentFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting leftIndent from AttributeSet..."); + PrintDebugString("[INFO]: Getting leftIndent from AttributeSet..."); attributes->leftIndent = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject, getLeftIndentFromAttributeSetMethod, AttributeSet); EXCEPTION_CHECK("Getting LeftIndentFromAttributeSet - call to CallIntMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getLeftIndentFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getLeftIndentFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting LeftIndentFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -4078,13 +4076,13 @@ // Get the rightIndent setting if (getRightIndentFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting rightIndent from AttributeSet..."); + PrintDebugString("[INFO]: Getting rightIndent from AttributeSet..."); attributes->rightIndent = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject, getRightIndentFromAttributeSetMethod, AttributeSet); EXCEPTION_CHECK("Getting RightIndentFromAttributeSet - call to CallIntMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getRightIndentFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getRightIndentFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting RightIndentFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -4095,13 +4093,13 @@ // Get the lineSpacing setting if (getLineSpacingFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting lineSpacing from AttributeSet..."); + PrintDebugString("[INFO]: Getting lineSpacing from AttributeSet..."); attributes->lineSpacing = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject, getLineSpacingFromAttributeSetMethod, AttributeSet); EXCEPTION_CHECK("Getting LineSpacingFromAttributeSet - call to CallIntMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getLineSpacingFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getLineSpacingFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting LineSpacingFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -4112,13 +4110,13 @@ // Get the spaceAbove setting if (getSpaceAboveFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting spaceAbove from AttributeSet..."); + PrintDebugString("[INFO]: Getting spaceAbove from AttributeSet..."); attributes->spaceAbove = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject, getSpaceAboveFromAttributeSetMethod, AttributeSet); EXCEPTION_CHECK("Getting SpaceAboveFromAttributeSet - call to CallIntMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getSpaceAboveFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getSpaceAboveFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting SpaceAboveFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -4129,13 +4127,13 @@ // Get the spaceBelow setting if (getSpaceBelowFromAttributeSetMethod != (jmethodID) 0) { - PrintDebugString(" Getting spaceBelow from AttributeSet..."); + PrintDebugString("[INFO]: Getting spaceBelow from AttributeSet..."); attributes->spaceBelow = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject, getSpaceBelowFromAttributeSetMethod, AttributeSet); EXCEPTION_CHECK("Getting SpaceBelowFromAttributeSet - call to CallIntMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or getSpaceBelowFromAttributeSetMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getSpaceBelowFromAttributeSetMethod == 0"); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Getting SpaceBelowFromAttributeSet - call to CallVoidMethod()", FALSE); @@ -4146,12 +4144,12 @@ // Release the AttributeSet object if (decrementReferenceMethod != (jmethodID) 0) { - PrintDebugString(" Decrementing reference to AttributeSet..."); + PrintDebugString("[INFO]: Decrementing reference to AttributeSet..."); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, AttributeSet); EXCEPTION_CHECK("Releasing AttributeSet object - call to CallVoidMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or accessBridgeObject == 0"); + PrintDebugString("[ERROR]: either env == 0 or accessBridgeObject == 0"); jniEnv->DeleteLocalRef(AttributeSet); EXCEPTION_CHECK("Releasing AttributeSet object - call to DeleteLocalRef()", FALSE); return FALSE; @@ -4159,12 +4157,12 @@ // Get the full attributes string at index if (getAccessibleAttributesAtIndexFromContextMethod != (jmethodID) 0) { - PrintDebugString(" Getting full attributes string from Context..."); + PrintDebugString("[INFO]: Getting full attributes string from Context..."); js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject, getAccessibleAttributesAtIndexFromContextMethod, accessibleContext, index); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallObjectMethod()", FALSE); - PrintDebugString(" returned from CallObjectMethod(), js = %p", js); + PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js); if (js != (jstring) 0) { stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to GetStringChars()", FALSE); @@ -4178,18 +4176,18 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallVoidMethod()", FALSE); - wPrintDebugString(L" Accessible Text attributes = %ls", attributes->fullAttributesString); + wPrintDebugString(L"[INFO]: Accessible Text attributes = %ls", attributes->fullAttributesString); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" Accessible Text attributes is null."); + PrintDebugString("[WARN]: Accessible Text attributes is null."); attributes->fullAttributesString[0] = (wchar_t) 0; jniEnv->DeleteLocalRef(AttributeSet); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to DeleteLocalRef()", FALSE); return FALSE; } } else { - PrintDebugString(" Error! either env == 0 or getAccessibleAttributesAtIndexFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleAttributesAtIndexFromContextMethod == 0"); jniEnv->DeleteLocalRef(AttributeSet); return FALSE; } @@ -4204,7 +4202,7 @@ jthrowable exception; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextRect(%p), index = %d", + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextRect(%p), index = %d", accessibleContext, index); // Verify the Java VM still exists and AccessibleContext is @@ -4219,9 +4217,9 @@ getAccessibleXcoordTextRectAtIndexFromContextMethod, accessibleContext, index); EXCEPTION_CHECK("Getting AccessibleXcoordTextRect - call to CallIntMethod()", FALSE); - PrintDebugString(" X coord = %d", rectInfo->x); + PrintDebugString("[INFO]: X coord = %d", rectInfo->x); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleXcoordTextRectAtIndexFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleXcoordTextRectAtIndexFromContextMethod == 0"); return FALSE; } @@ -4231,9 +4229,9 @@ getAccessibleYcoordTextRectAtIndexFromContextMethod, accessibleContext, index); EXCEPTION_CHECK("Getting AccessibleYcoordTextRect - call to CallIntMethod()", FALSE); - PrintDebugString(" Y coord = %d", rectInfo->y); + PrintDebugString("[INFO]: Y coord = %d", rectInfo->y); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleYcoordTextRectAtIndexFromContextMethod == 0"); + PrintDebugString("[INFO]: either env == 0 or getAccessibleYcoordTextRectAtIndexFromContextMethod == 0"); return FALSE; } @@ -4243,9 +4241,9 @@ getAccessibleWidthTextRectAtIndexFromContextMethod, accessibleContext, index); EXCEPTION_CHECK("Getting AccessibleWidthTextRect - call to CallIntMethod()", FALSE); - PrintDebugString(" Width = %d", rectInfo->width); + PrintDebugString("[INFO]: Width = %d", rectInfo->width); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleWidthTextRectAtIndexFromContextMethod == 0"); + PrintDebugString("[INFO]: either env == 0 or getAccessibleWidthTextRectAtIndexFromContextMethod == 0"); return FALSE; } @@ -4255,9 +4253,9 @@ getAccessibleHeightTextRectAtIndexFromContextMethod, accessibleContext, index); EXCEPTION_CHECK("Getting AccessibleHeightTextRect - call to CallIntMethod()", FALSE); - PrintDebugString(" Height = %d", rectInfo->height); + PrintDebugString("[INFO]: Height = %d", rectInfo->height); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleHeightTextRectAtIndexFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleHeightTextRectAtIndexFromContextMethod == 0"); return FALSE; } @@ -4274,7 +4272,7 @@ jthrowable exception; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getCaretLocation(%p), index = %d", + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getCaretLocation(%p), index = %d", accessibleContext, index); // Verify the Java VM still exists and AccessibleContext is @@ -4289,9 +4287,9 @@ getCaretLocationXMethod, accessibleContext, index); EXCEPTION_CHECK("Getting caret X coordinate - call to CallIntMethod()", FALSE); - PrintDebugString(" X coord = %d", rectInfo->x); + PrintDebugString("[INFO]: X coord = %d", rectInfo->x); } else { - PrintDebugString(" Error! either env == 0 or getCaretLocationXMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getCaretLocationXMethod == 0"); return FALSE; } @@ -4301,9 +4299,9 @@ getCaretLocationYMethod, accessibleContext, index); EXCEPTION_CHECK("Getting caret Y coordinate - call to CallIntMethod()", FALSE); - PrintDebugString(" Y coord = %d", rectInfo->y); + PrintDebugString("[INFO]: Y coord = %d", rectInfo->y); } else { - PrintDebugString(" Error! either env == 0 or getCaretLocationYMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getCaretLocationYMethod == 0"); return FALSE; } @@ -4313,9 +4311,9 @@ getCaretLocationWidthMethod, accessibleContext, index); EXCEPTION_CHECK("Getting caret width - call to CallIntMethod()", FALSE); - PrintDebugString(" Width = %d", rectInfo->width); + PrintDebugString("[INFO]: Width = %d", rectInfo->width); } else { - PrintDebugString(" Error! either env == 0 or getCaretLocationWidthMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getCaretLocationWidthMethod == 0"); return FALSE; } @@ -4325,9 +4323,9 @@ getCaretLocationHeightMethod, accessibleContext, index); EXCEPTION_CHECK("Getting caret height - call to CallIntMethod()", FALSE); - PrintDebugString(" Height = %d", rectInfo->height); + PrintDebugString("[INFO]: Height = %d", rectInfo->height); } else { - PrintDebugString(" Error! either env == 0 or getCaretLocationHeightMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getCaretLocationHeightMethod == 0"); return FALSE; } @@ -4341,7 +4339,7 @@ jthrowable exception; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextLineBounds(%p):", accessibleContext); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextLineBounds(%p):", accessibleContext); // Verify the Java VM still exists and AccessibleContext is // an instance of AccessibleText @@ -4355,9 +4353,9 @@ getAccessibleTextLineLeftBoundsFromContextMethod, accessibleContext, index); EXCEPTION_CHECK("Getting AccessibleTextLineLeftBounds - call to CallIntMethod()", FALSE); - PrintDebugString(" startIndex = %d", *startIndex); + PrintDebugString("[INFO]: startIndex = %d", *startIndex); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleTextLineLeftBoundsFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextLineLeftBoundsFromContextMethod == 0"); return FALSE; } @@ -4367,9 +4365,9 @@ getAccessibleTextLineRightBoundsFromContextMethod, accessibleContext, index); EXCEPTION_CHECK("Getting AccessibleTextLineRightBounds - call to CallIntMethod()", FALSE); - PrintDebugString(" endIndex = %d", *endIndex); + PrintDebugString("[INFO]: endIndex = %d", *endIndex); } else { - PrintDebugString(" Error! either env == 0 or getAccessibleTextLineRightBoundsFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextLineRightBoundsFromContextMethod == 0"); return FALSE; } @@ -4384,7 +4382,7 @@ jthrowable exception; jsize length; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextRange(%p, %d, %d, *text, %d):", accessibleContext, start, end, len); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextRange(%p, %d, %d, *text, %d):", accessibleContext, start, end, len); // Verify the Java VM still exists and AccessibleContext is // an instance of AccessibleText @@ -4394,7 +4392,7 @@ // range is inclusive if (end < start) { - PrintDebugString(" Error! end < start!"); + PrintDebugString("[ERROR]: end < start!"); text[0] = (wchar_t) 0; return FALSE; } @@ -4405,32 +4403,32 @@ getAccessibleTextRangeFromContextMethod, accessibleContext, start, end); EXCEPTION_CHECK("Getting AccessibleTextRange - call to CallObjectMethod()", FALSE); - PrintDebugString(" returned from CallObjectMethod(), js = %p", js); + PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js); if (js != (jstring) 0) { stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); EXCEPTION_CHECK("Getting AccessibleTextRange - call to GetStringChars()", FALSE); - wPrintDebugString(L" Accessible Text stringBytes returned from Java = %ls", stringBytes); + wPrintDebugString(L"[INFO]: Accessible Text stringBytes returned from Java = %ls", stringBytes); wcsncpy(text, stringBytes, len); length = jniEnv->GetStringLength(js); - PrintDebugString(" Accessible Text stringBytes length = %d", length); + PrintDebugString("[INFO]: Accessible Text stringBytes length = %d", length); text[length < len ? length : len - 2] = (wchar_t) 0; - wPrintDebugString(L" Accessible Text 'text' after null termination = %ls", text); + wPrintDebugString(L"[INFO]: Accessible Text 'text' after null termination = %ls", text); EXCEPTION_CHECK("Getting AccessibleTextRange - call to GetStringLength()", FALSE); jniEnv->ReleaseStringChars(js, stringBytes); EXCEPTION_CHECK("Getting AccessibleTextRange - call to ReleaseStringChars()", FALSE); jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting AccessibleTextRange - call to CallVoidMethod()", FALSE); - wPrintDebugString(L" Accessible Text range = %ls", text); + wPrintDebugString(L"[INFO]: Accessible Text range = %ls", text); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting AccessibleTextRange - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" current Accessible Text range is null."); + PrintDebugString("[WARN]: current Accessible Text range is null."); text[0] = (wchar_t) 0; return FALSE; } } else { - PrintDebugString(" Error! either env == 0 or getAccessibleTextRangeFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextRangeFromContextMethod == 0"); return FALSE; } return TRUE; @@ -4445,7 +4443,7 @@ jthrowable exception; jsize length; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getCurrentAccessibleValueFromContext(%p):", accessibleContext); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getCurrentAccessibleValueFromContext(%p):", accessibleContext); // Get the current Accessible Value if (getCurrentAccessibleValueFromContextMethod != (jmethodID) 0) { @@ -4453,7 +4451,7 @@ getCurrentAccessibleValueFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to CallObjectMethod()", FALSE); - PrintDebugString(" returned from CallObjectMethod(), js = %p", js); + PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js); if (js != (jstring) 0) { stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to GetStringChars()", FALSE); @@ -4466,16 +4464,16 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to CallVoidMethod()", FALSE); - PrintDebugString(" current Accessible Value = %s", value); + PrintDebugString("[INFO]: current Accessible Value = %s", value); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" current Accessible Value is null."); + PrintDebugString("[WARN]: current Accessible Value is null."); value[0] = (wchar_t) 0; return FALSE; } } else { - PrintDebugString(" Error! either env == 0 or getCurrentAccessibleValueFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getCurrentAccessibleValueFromContextMethod == 0"); return FALSE; } return TRUE; @@ -4488,7 +4486,7 @@ jthrowable exception; jsize length; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getMaximumAccessibleValueFromContext(%p):", accessibleContext); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getMaximumAccessibleValueFromContext(%p):", accessibleContext); // Get the maximum Accessible Value if (getMaximumAccessibleValueFromContextMethod != (jmethodID) 0) { @@ -4496,7 +4494,7 @@ getMaximumAccessibleValueFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to CallObjectMethod()", FALSE); - PrintDebugString(" returned from CallObjectMethod(), js = %p", js); + PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js); if (js != (jstring) 0) { stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to GetStringChars()", FALSE); @@ -4509,16 +4507,16 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to CallVoidMethod()", FALSE); - PrintDebugString(" maximum Accessible Value = %s", value); + PrintDebugString("[INFO]: maximum Accessible Value = %s", value); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" maximum Accessible Value is null."); + PrintDebugString("[WARN]: maximum Accessible Value is null."); value[0] = (wchar_t) 0; return FALSE; } } else { - PrintDebugString(" Error! either env == 0 or getMaximumAccessibleValueFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getMaximumAccessibleValueFromContextMethod == 0"); return FALSE; } return TRUE; @@ -4531,7 +4529,7 @@ jthrowable exception; jsize length; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getMinimumAccessibleValueFromContext(%p):", accessibleContext); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getMinimumAccessibleValueFromContext(%p):", accessibleContext); // Get the mimimum Accessible Value if (getMinimumAccessibleValueFromContextMethod != (jmethodID) 0) { @@ -4539,7 +4537,7 @@ getMinimumAccessibleValueFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to CallObjectMethod()", FALSE); - PrintDebugString(" returned from CallObjectMethod(), js = %p", js); + PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js); if (js != (jstring) 0) { stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to GetStringChars()", FALSE); @@ -4552,16 +4550,16 @@ jniEnv->CallVoidMethod(accessBridgeObject, decrementReferenceMethod, js); EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to CallVoidMethod()", FALSE); - PrintDebugString(" mimimum Accessible Value = %s", value); + PrintDebugString("[INFO]: mimimum Accessible Value = %s", value); jniEnv->DeleteLocalRef(js); EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to DeleteLocalRef()", FALSE); } else { - PrintDebugString(" mimimum Accessible Value is null."); + PrintDebugString("[WARN]: mimimum Accessible Value is null."); value[0] = (wchar_t) 0; return FALSE; } } else { - PrintDebugString(" Error! either env == 0 or getMinimumAccessibleValueFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getMinimumAccessibleValueFromContextMethod == 0"); return FALSE; } return TRUE; @@ -4574,7 +4572,7 @@ AccessBridgeJavaEntryPoints::addAccessibleSelectionFromContext(jobject accessibleContext, int i) { jthrowable exception; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::addAccessibleSelectionFromContext(%p):", accessibleContext); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::addAccessibleSelectionFromContext(%p):", accessibleContext); // Add the child to the AccessibleSelection if (addAccessibleSelectionFromContextMethod != (jmethodID) 0) { @@ -4582,9 +4580,9 @@ addAccessibleSelectionFromContextMethod, accessibleContext, i); EXCEPTION_CHECK_VOID("Doing addAccessibleSelection - call to CallVoidMethod()"); - PrintDebugString(" returned from CallObjectMethod()"); + PrintDebugString("[INFO]: returned from CallObjectMethod()"); } else { - PrintDebugString(" Error! either env == 0 or addAccessibleSelectionFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or addAccessibleSelectionFromContextMethod == 0"); } } @@ -4592,7 +4590,7 @@ AccessBridgeJavaEntryPoints::clearAccessibleSelectionFromContext(jobject accessibleContext) { jthrowable exception; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::clearAccessibleSelectionFromContext(%p):", accessibleContext); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::clearAccessibleSelectionFromContext(%p):", accessibleContext); // Clearing the Selection of the AccessibleSelection if (clearAccessibleSelectionFromContextMethod != (jmethodID) 0) { @@ -4600,9 +4598,9 @@ clearAccessibleSelectionFromContextMethod, accessibleContext); EXCEPTION_CHECK_VOID("Doing clearAccessibleSelection - call to CallVoidMethod()"); - PrintDebugString(" returned from CallObjectMethod()"); + PrintDebugString("[INFO]: returned from CallObjectMethod()"); } else { - PrintDebugString(" Error! either env == 0 or clearAccessibleSelectionFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or clearAccessibleSelectionFromContextMethod == 0"); } } @@ -4612,7 +4610,7 @@ jobject globalRef; jthrowable exception; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleSelectionFromContext(%p):", accessibleContext); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleSelectionFromContext(%p):", accessibleContext); if (getAccessibleSelectionContextFromContextMethod != (jmethodID) 0) { returnedAccessibleContext = jniEnv->CallObjectMethod( @@ -4624,11 +4622,11 @@ EXCEPTION_CHECK("Getting AccessibleSelectionContext - call to NewGlobalRef()", (jobject) 0); jniEnv->DeleteLocalRef(returnedAccessibleContext); EXCEPTION_CHECK("Getting AccessibleSelectionContext - call to DeleteLocalRef()", (jobject) 0); - PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", + PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p", returnedAccessibleContext, globalRef); return globalRef; } else { - PrintDebugString(" Error! either env == 0 or getAccessibleSelectionContextFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleSelectionContextFromContextMethod == 0"); return (jobject) 0; } } @@ -4638,7 +4636,7 @@ int count; jthrowable exception; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleSelectionCountFromContext(%p):", accessibleContext); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleSelectionCountFromContext(%p):", accessibleContext); // Get (& return) the # of items selected in the AccessibleSelection if (getAccessibleSelectionCountFromContextMethod != (jmethodID) 0) { @@ -4646,10 +4644,10 @@ getAccessibleSelectionCountFromContextMethod, accessibleContext); EXCEPTION_CHECK("Getting AccessibleSelectionCount - call to CallIntMethod()", -1); - PrintDebugString(" returned from CallObjectMethod()"); + PrintDebugString("[INFO]: returned from CallObjectMethod()"); return count; } else { - PrintDebugString(" Error! either env == 0 or getAccessibleSelectionCountFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or getAccessibleSelectionCountFromContextMethod == 0"); return -1; } } @@ -4659,7 +4657,7 @@ jboolean result; jthrowable exception; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::isAccessibleChildSelectedFromContext(%p):", accessibleContext); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::isAccessibleChildSelectedFromContext(%p):", accessibleContext); // Get (& return) the # of items selected in the AccessibleSelection if (isAccessibleChildSelectedFromContextMethod != (jmethodID) 0) { @@ -4667,12 +4665,12 @@ isAccessibleChildSelectedFromContextMethod, accessibleContext, i); EXCEPTION_CHECK("Doing isAccessibleChildSelected - call to CallBooleanMethod()", FALSE); - PrintDebugString(" returned from CallObjectMethod()"); + PrintDebugString("[INFO]: returned from CallObjectMethod()"); if (result != 0) { return TRUE; } } else { - PrintDebugString(" Error! either env == 0 or isAccessibleChildSelectedFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or isAccessibleChildSelectedFromContextMethod == 0"); } return FALSE; } @@ -4682,7 +4680,7 @@ AccessBridgeJavaEntryPoints::removeAccessibleSelectionFromContext(jobject accessibleContext, int i) { jthrowable exception; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::removeAccessibleSelectionFromContext(%p):", accessibleContext); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::removeAccessibleSelectionFromContext(%p):", accessibleContext); // Remove the i-th child from the AccessibleSelection if (removeAccessibleSelectionFromContextMethod != (jmethodID) 0) { @@ -4690,9 +4688,9 @@ removeAccessibleSelectionFromContextMethod, accessibleContext, i); EXCEPTION_CHECK_VOID("Doing removeAccessibleSelection - call to CallVoidMethod()"); - PrintDebugString(" returned from CallObjectMethod()"); + PrintDebugString("[INFO]: returned from CallObjectMethod()"); } else { - PrintDebugString(" Error! either env == 0 or removeAccessibleSelectionFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or removeAccessibleSelectionFromContextMethod == 0"); } } @@ -4700,7 +4698,7 @@ AccessBridgeJavaEntryPoints::selectAllAccessibleSelectionFromContext(jobject accessibleContext) { jthrowable exception; - PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::selectAllAccessibleSelectionFromContext(%p):", accessibleContext); + PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::selectAllAccessibleSelectionFromContext(%p):", accessibleContext); // Select all children (if possible) of the AccessibleSelection if (selectAllAccessibleSelectionFromContextMethod != (jmethodID) 0) { @@ -4708,9 +4706,9 @@ selectAllAccessibleSelectionFromContextMethod, accessibleContext); EXCEPTION_CHECK_VOID("Doing selectAllAccessibleSelection - call to CallVoidMethod()"); - PrintDebugString(" returned from CallObjectMethod()"); + PrintDebugString("[INFO]: returned from CallObjectMethod()"); } else { - PrintDebugString(" Error! either env == 0 or selectAllAccessibleSelectionFromContextMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or selectAllAccessibleSelectionFromContextMethod == 0"); } } @@ -4721,7 +4719,7 @@ AccessBridgeJavaEntryPoints::addJavaEventNotification(jlong type) { jthrowable exception; - PrintDebugString("\r\n in AccessBridgeJavaEntryPoints::addJavaEventNotification(%016I64X);", type); + PrintDebugString("[INFO]: in AccessBridgeJavaEntryPoints::addJavaEventNotification(%016I64X);", type); // Let AccessBridge know we want to add an event type if (addJavaEventNotificationMethod != (jmethodID) 0) { @@ -4729,7 +4727,7 @@ addJavaEventNotificationMethod, type); EXCEPTION_CHECK("Doing addJavaEventNotification - call to CallVoidMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or addJavaEventNotificationMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or addJavaEventNotificationMethod == 0"); return FALSE; } return TRUE; @@ -4739,7 +4737,7 @@ AccessBridgeJavaEntryPoints::removeJavaEventNotification(jlong type) { jthrowable exception; - PrintDebugString("\r\n in AccessBridgeJavaEntryPoints::removeJavaEventNotification(%016I64X):", type); + PrintDebugString("[INFO]: in AccessBridgeJavaEntryPoints::removeJavaEventNotification(%016I64X):", type); // Let AccessBridge know we want to remove an event type if (removeJavaEventNotificationMethod != (jmethodID) 0) { @@ -4747,7 +4745,7 @@ removeJavaEventNotificationMethod, type); EXCEPTION_CHECK("Doing removeJavaEventNotification - call to CallVoidMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or removeJavaEventNotificationMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or removeJavaEventNotificationMethod == 0"); return FALSE; } return TRUE; @@ -4757,19 +4755,19 @@ AccessBridgeJavaEntryPoints::addAccessibilityEventNotification(jlong type) { jthrowable exception; - PrintDebugString("\r\n in AccessBridgeJavaEntryPoints::addAccessibilityEventNotification(%016I64X);", type); + PrintDebugString("[INFO]: in AccessBridgeJavaEntryPoints::addAccessibilityEventNotification(%016I64X);", type); // Let AccessBridge know we want to add an event type if (addAccessibilityEventNotificationMethod != (jmethodID) 0) { - PrintDebugString("\r\n addAccessibilityEventNotification: calling void method: accessBridgeObject = %p", accessBridgeObject); + PrintDebugString("[INFO]: addAccessibilityEventNotification: calling void method: accessBridgeObject = %p", accessBridgeObject); jniEnv->CallVoidMethod(accessBridgeObject, addAccessibilityEventNotificationMethod, type); EXCEPTION_CHECK("Doing addAccessibilityEvent - call to CallVoidMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or addAccessibilityEventNotificationMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or addAccessibilityEventNotificationMethod == 0"); return FALSE; } - PrintDebugString("\r\n addAccessibilityEventNotification: just returning true"); + PrintDebugString("[INFO]: addAccessibilityEventNotification: just returning true"); return TRUE; } @@ -4777,7 +4775,7 @@ AccessBridgeJavaEntryPoints::removeAccessibilityEventNotification(jlong type) { jthrowable exception; - PrintDebugString("\r\n in AccessBridgeJavaEntryPoints::removeAccessibilityEventNotification(%016I64X):", type); + PrintDebugString("[INFO]: in AccessBridgeJavaEntryPoints::removeAccessibilityEventNotification(%016I64X):", type); // Let AccessBridge know we want to remove an event type if (removeAccessibilityEventNotificationMethod != (jmethodID) 0) { @@ -4785,7 +4783,7 @@ removeAccessibilityEventNotificationMethod, type); EXCEPTION_CHECK("Doing removeAccessibilityEvent - call to CallVoidMethod()", FALSE); } else { - PrintDebugString(" Error! either env == 0 or removeAccessibilityEventNotificationMethod == 0"); + PrintDebugString("[ERROR]: either env == 0 or removeAccessibilityEventNotificationMethod == 0"); return FALSE; } return TRUE; --- old/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp 2018-12-11 16:50:03.878132100 +0530 +++ new/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp 2018-12-11 16:49:54.866178300 +0530 @@ -85,7 +85,7 @@ */ JNIEXPORT void JNICALL Java_com_sun_java_accessibility_internal_AccessBridge_runDLL(JNIEnv *env, jobject obj) { - PrintDebugString("\r\nJavaAccessBridge.DLL runDLL() called"); + PrintDebugString("[INFO]: JavaAccessBridge.DLL runDLL() called"); theJavaAccessBridge->javaRun(env, obj); } @@ -100,20 +100,20 @@ switch (message) { case WM_INITDIALOG: - PrintDebugString("In AccessBridgeDialog - Initializing"); + PrintDebugString("[INFO]: In AccessBridgeDialog - Initializing"); break; case WM_COMMAND: command = LOWORD (wParam); - PrintDebugString("In AccessBridgeDialog - Got WM_COMMAND, command: %X", command); + PrintDebugString("[INFO]: In AccessBridgeDialog - Got WM_COMMAND, command: %X", command); break; // call from Java with data for us to deliver case WM_COPYDATA: if (theDialogWindow == (HWND) wParam) { - PrintDebugString("In AccessBridgeDialog - Got WM_COPYDATA from ourselves"); + PrintDebugString("[INFO]: In AccessBridgeDialog - Got WM_COPYDATA from ourselves"); } else { - PrintDebugString("In AccessBridgeDialog - Got WM_COPYDATA from HWND %p", wParam); + PrintDebugString("[INFO]: In AccessBridgeDialog - Got WM_COPYDATA from HWND %p", wParam); sentToUs = (COPYDATASTRUCT *) lParam; package = (char *) sentToUs->lpData; theJavaAccessBridge->processPackage(package, sentToUs->cbData); @@ -125,16 +125,16 @@ // wParam == sourceHwnd // lParam == buffer size in shared memory if (theDialogWindow == (HWND) wParam) { - PrintDebugString("In AccessBridgeDialog - Got AB_MESSAGE_WAITING from ourselves"); + PrintDebugString("[INFO]: In AccessBridgeDialog - Got AB_MESSAGE_WAITING from ourselves"); } else { - PrintDebugString("In AccessBridgeDialog - Got AB_MESSAGE_WAITING from HWND %p", wParam); + PrintDebugString("[INFO]: In AccessBridgeDialog - Got AB_MESSAGE_WAITING from HWND %p", wParam); LRESULT returnVal = theJavaAccessBridge->receiveMemoryPackage((HWND) wParam, (long) lParam); } break; // a JavaAccessBridge DLL is going away case AB_DLL_GOING_AWAY: - PrintDebugString("In AccessBridgeDialog - Got AB_DLL_GOING_AWAY message"); + PrintDebugString("[INFO]: In AccessBridgeDialog - Got AB_DLL_GOING_AWAY message"); theJavaAccessBridge->WindowsATDestroyed((HWND) wParam); break; @@ -145,7 +145,7 @@ // A new Windows AT just said "hi"; // say "hi" back so it can mate up with us // otherwise don't do anything (e.g. don't set up data structures yet) - PrintDebugString("In AccessBridgeDialog - Got theFromWindowsHelloMsgID message"); + PrintDebugString("[INFO]: In AccessBridgeDialog - Got theFromWindowsHelloMsgID message"); theJavaAccessBridge->postHelloToWindowsDLLMsg((HWND) wParam); } } @@ -165,6 +165,7 @@ JavaAccessBridge::JavaAccessBridge(HINSTANCE hInstance) { windowsInstance = hInstance; ATs = (AccessBridgeATInstance *) 0; + initializeFileLogger("_java_access_bridge"); initBroadcastMessageIDs(); // get the unique to us broadcast msg. IDs } @@ -177,7 +178,7 @@ JavaAccessBridge::~JavaAccessBridge() { // inform all other AccessBridges that we're going away - PrintDebugString("\r\nin JavaAccessBridge::~JavaAccessBridge()"); + PrintDebugString("[INFO]: in JavaAccessBridge::~JavaAccessBridge()"); // Send a shutdown message for those applications like StarOffice that do // send a shutdown message themselves. @@ -185,13 +186,13 @@ AccessBridgeATInstance *current = ATs; while (current != (AccessBridgeATInstance *) 0) { - PrintDebugString(" telling %p we're going away", current->winAccessBridgeWindow); + PrintDebugString("[INFO]: telling %p we're going away", current->winAccessBridgeWindow); SendMessage(current->winAccessBridgeWindow, AB_DLL_GOING_AWAY, (WPARAM) dialogWindow, (LPARAM) 0); current = current->nextATInstance; } - PrintDebugString(" finished telling ATs about our demise"); + PrintDebugString("[INFO]: finished telling ATs about our demise"); if(JavaBridgeThreadId) { @@ -201,8 +202,9 @@ delete ATs; - PrintDebugString(" finished deleting ATs"); - PrintDebugString("GOODBYE CRUEL WORLD..."); + PrintDebugString("[INFO]: finished deleting ATs"); + PrintDebugString("[INFO]: GOODBYE CRUEL WORLD..."); + finalizeFileLogger(); } @@ -210,17 +212,17 @@ JavaAccessBridge::javaRun(JNIEnv *env, jobject obj) { MSG msg; - PrintDebugString("JavaAccessBridge::javaRun(%p, %p) called", env, obj); + PrintDebugString("[INFO]: JavaAccessBridge::javaRun(%p, %p) called", env, obj); if (env->GetJavaVM(&javaVM) != 0) { return; // huh!?!?! } - PrintDebugString(" -> javaVM = %p", javaVM); + PrintDebugString("[INFO]: -> javaVM = %p", javaVM); if (javaVM->AttachCurrentThread((void **) &windowsThreadJNIEnv, NULL) != 0) { return; // huh!?!?! } - PrintDebugString(" -> windowsThreadJNIEnv = %p", windowsThreadJNIEnv); + PrintDebugString("[INFO]: -> windowsThreadJNIEnv = %p", windowsThreadJNIEnv); javaThreadABObject = env->NewGlobalRef(obj); windowsThreadABObject = windowsThreadJNIEnv->NewGlobalRef(obj); @@ -230,7 +232,7 @@ if (javaThreadEntryPoints->BuildJavaEntryPoints() == FALSE) { return; // couldn't build our entry points; let's get out of here! } - PrintDebugString(" all Java thread entry points successfully found."); + PrintDebugString("[INFO]: all Java thread entry points successfully found."); // initialize the Windows thread AccessBridge entry points windowsThreadEntryPoints = new AccessBridgeJavaEntryPoints(windowsThreadJNIEnv, @@ -238,12 +240,12 @@ if (windowsThreadEntryPoints->BuildJavaEntryPoints() == FALSE) { return; // couldn't build our entry points; let's get out of here! } - PrintDebugString(" all Windows thread entry points successfully found."); + PrintDebugString("[INFO]: all Windows thread entry points successfully found."); // open our window if (initWindow() == TRUE) { - PrintDebugString(" Window created. HWND = %p", dialogWindow); + PrintDebugString("[INFO]: Window created. HWND = %p", dialogWindow); // post a broadcast msg.; let other AccessBridge DLLs know we exist postHelloToWindowsDLLMsg(HWND_BROADCAST); @@ -254,7 +256,7 @@ DispatchMessage(&msg); } } else { - PrintDebugString(" FAILED TO CREATE WINDOW!!!"); + PrintDebugString("[ERROR]: FAILED TO CREATE WINDOW!!!"); } javaVM->DetachCurrentThread(); @@ -301,8 +303,8 @@ */ void JavaAccessBridge::postHelloToWindowsDLLMsg(HWND destHwnd) { - PrintDebugString("\r\nIn JavaAccessBridge::postHelloToWindowsDLLMsg"); - PrintDebugString(" calling PostMessage(%p, %X, %p, %p)", + PrintDebugString("[INFO]: In JavaAccessBridge::postHelloToWindowsDLLMsg"); + PrintDebugString("[INFO]: calling PostMessage(%p, %X, %p, %p)", destHwnd, theFromJavaHelloMsgID, dialogWindow, dialogWindow); PostMessage(destHwnd, theFromJavaHelloMsgID, (WPARAM) dialogWindow, (LPARAM) dialogWindow); } @@ -333,10 +335,10 @@ void JavaAccessBridge::sendJavaEventPackage(char *buffer, int bufsize, long type) { - PrintDebugString("JavaAccessBridge::sendJavaEventPackage(), type = %X", type); + PrintDebugString("[INFO]: JavaAccessBridge::sendJavaEventPackage(), type = %X", type); if (ATs == (AccessBridgeATInstance *) 0) { - PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); + PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)"); } AccessBridgeATInstance *ati = ATs; @@ -353,10 +355,10 @@ void JavaAccessBridge::sendAccessibilityEventPackage(char *buffer, int bufsize, long type) { - PrintDebugString("JavaAccessBridge::sendAccessibilityEventPackage(), type = %X", type); + PrintDebugString("[INFO]: JavaAccessBridge::sendAccessibilityEventPackage(), type = %X", type); if (ATs == (AccessBridgeATInstance *) 0) { - PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); + PrintDebugString("[ERROR] ATs == 0! (shouldn't happen here!)"); } AccessBridgeATInstance *ati = ATs; @@ -381,11 +383,11 @@ JavaAccessBridge::receiveMemoryPackage(HWND srcWindow, long bufsize) { char *IPCview; - PrintDebugString("\r\nJavaAccessBridge::receiveMemoryPackage(%p, %d)", srcWindow, bufsize); + PrintDebugString("[INFO]: JavaAccessBridge::receiveMemoryPackage(%p, %d)", srcWindow, bufsize); // look-up the appropriate IPCview based on the srcHWND of the Windows AccessBridge DLL if (ATs == (AccessBridgeATInstance *) 0) { - PrintDebugString(" ERROR! - ATs == 0 (shouldn't happen in receiveMemoryPackage()!"); + PrintDebugString("[ERROR]: - ATs == 0 (shouldn't happen in receiveMemoryPackage()!"); return FALSE; } AccessBridgeATInstance *ati = ATs->findABATInstanceFromATHWND(srcWindow); @@ -408,7 +410,7 @@ } else { //DEBUG_CODE(AppendToCallInfo("ERROR receiving memory package: couldn't find srcWindow")); - PrintDebugString("ERROR receiving memory package: couldn't find srcWindow"); + PrintDebugString("[ERROR]: receiving memory package: couldn't find srcWindow"); return FALSE; } } @@ -420,11 +422,11 @@ */ LRESULT JavaAccessBridge::processPackage(char *buffer, int bufsize) { - PrintDebugString("\r\nProcessing package sent from Windows, bufsize = %d:", bufsize); + PrintDebugString("[INFO]: Processing package sent from Windows, bufsize = %d:", bufsize); PackageType *type = (PackageType *) buffer; LRESULT returnVal = 0; - PrintDebugString(" PackageType = %X:", *type); + PrintDebugString("[INFO]: PackageType = %X:", *type); jobject rAC; switch (*type) { @@ -433,13 +435,13 @@ case cMemoryMappedFileCreatedPackage: // Windows is telling us it created a memory mapped file for us to use // in repsonding to various information querying packages (see below) - PrintDebugString(" type == cMemoryMappedFileCreatedPackage"); + PrintDebugString("[INFO]: type == cMemoryMappedFileCreatedPackage"); if (bufsize == (sizeof(PackageType) + sizeof(MemoryMappedFileCreatedPackage))) { MemoryMappedFileCreatedPackage *pkg = (MemoryMappedFileCreatedPackage *) (buffer + sizeof(PackageType)); returnVal = MemoryMappedFileCreated((HWND)ABLongToHandle(pkg->bridgeWindow), pkg->filename); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(MemoryMappedFileCreatedPackage)); } break; @@ -447,84 +449,84 @@ // ------------ information querying packages ------------------ case cReleaseJavaObjectPackage: - PrintDebugString(" type == cReleaseJavaObjectPackage"); + PrintDebugString("[INFO]: type == cReleaseJavaObjectPackage"); if (bufsize == (sizeof(PackageType) + sizeof(ReleaseJavaObjectPackage))) { ReleaseJavaObjectPackage *pkg = (ReleaseJavaObjectPackage *) (buffer + sizeof(PackageType)); releaseJavaObject((jobject)pkg->object); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(ReleaseJavaObjectPackage)); } break; case cGetAccessBridgeVersionPackage: - PrintDebugString(" type == cGetAccessBridgeVersionPackage"); + PrintDebugString("[INFO]: type == cGetAccessBridgeVersionPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessBridgeVersionPackage))) { GetAccessBridgeVersionPackage *pkg = (GetAccessBridgeVersionPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getVersionInfo(&(pkg->rVersionInfo)); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessBridgeVersionPackage)); } break; case cIsJavaWindowPackage: - PrintDebugString(" type == cIsJavaWindowPackage"); + PrintDebugString("[INFO]: type == cIsJavaWindowPackage"); if (bufsize == (sizeof(PackageType) + sizeof(IsJavaWindowPackage))) { IsJavaWindowPackage *pkg = (IsJavaWindowPackage *) (buffer + sizeof(PackageType)); pkg->rResult = windowsThreadEntryPoints->isJavaWindow(pkg->window); - PrintDebugString(" -> returning result = %d", pkg->rResult); + PrintDebugString("[INFO]: -> returning result = %d", pkg->rResult); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(IsJavaWindowPackage)); } break; case cIsSameObjectPackage: - PrintDebugString(" type == cIsSameObjectPackage"); + PrintDebugString("[INFO]: type == cIsSameObjectPackage"); if (bufsize == (sizeof(PackageType) + sizeof(IsSameObjectPackage))) { IsSameObjectPackage *pkg = (IsSameObjectPackage *) (buffer + sizeof(PackageType)); pkg->rResult = windowsThreadEntryPoints->isSameObject((jobject)pkg->obj1, (jobject)pkg->obj2); - PrintDebugString(" -> returning result = %d", pkg->rResult); + PrintDebugString("[INFO]: -> returning result = %d", pkg->rResult); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(IsSameObjectPackage)); } break; case cGetAccessibleContextFromHWNDPackage: - PrintDebugString(" type == cGetAccessibleContextFromHWNDPackage"); + PrintDebugString("[INFO]: type == cGetAccessibleContextFromHWNDPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleContextFromHWNDPackage))) { GetAccessibleContextFromHWNDPackage *pkg = (GetAccessibleContextFromHWNDPackage *) (buffer + sizeof(PackageType)); rAC = windowsThreadEntryPoints->getAccessibleContextFromHWND(pkg->window); pkg->rAccessibleContext = (JOBJECT64)rAC; pkg->rVMID = HandleToLong(dialogWindow); - PrintDebugString(" -> returning AC = %p, vmID = %X", rAC, pkg->rVMID); + PrintDebugString("[INFO]: -> returning AC = %p, vmID = %X", rAC, pkg->rVMID); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleContextFromHWNDPackage)); } break; case cGetHWNDFromAccessibleContextPackage: - PrintDebugString(" type == cGetHWNDFromAccessibleContextPackage"); + PrintDebugString("[INFO]: type == cGetHWNDFromAccessibleContextPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetHWNDFromAccessibleContextPackage))) { GetHWNDFromAccessibleContextPackage *pkg = (GetHWNDFromAccessibleContextPackage *) (buffer + sizeof(PackageType)); pkg->rHWND = ABHandleToLong( windowsThreadEntryPoints->getHWNDFromAccessibleContext((jobject)pkg->accessibleContext) ); - PrintDebugString(" -> returning HWND = %p", pkg->rHWND); + PrintDebugString("[INFO]: -> returning HWND = %p", pkg->rHWND); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetHWNDFromAccessibleContextPackage)); } break; @@ -533,15 +535,15 @@ /* ===== utility methods ===== */ case cSetTextContentsPackage: - PrintDebugString(" type == cSetTextContentsPackage"); + PrintDebugString("[INFO]: type == cSetTextContentsPackage"); if (bufsize == (sizeof(PackageType) + sizeof(SetTextContentsPackage))) { SetTextContentsPackage *pkg = (SetTextContentsPackage *) (buffer + sizeof(PackageType)); pkg->rResult = windowsThreadEntryPoints->setTextContents((jobject)pkg->accessibleContext, pkg->text); - PrintDebugString(" -> returning result = %d", pkg->rResult); + PrintDebugString("[INFO]: -> returning result = %d", pkg->rResult); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(SetTextContentsPackage)); } break; @@ -552,75 +554,76 @@ (GetParentWithRolePackage *) (buffer + sizeof(PackageType)); rAC = windowsThreadEntryPoints->getParentWithRole((jobject)pkg->accessibleContext, pkg->role); pkg->rAccessibleContext = (JOBJECT64)rAC; - PrintDebugString(" type == cGetParentWithRolePackage"); - PrintDebugString(" pkg->vmID: %X", pkg->vmID); - PrintDebugString(" pkg->accessibleContext: %p", (jobject)pkg->accessibleContext); - PrintDebugString(" pkg->role: %ls", pkg->role); - PrintDebugString(" -> returning rAccessibleContext = %p", rAC); + PrintDebugString("[INFO]: type == cGetParentWithRolePackage\n"\ + " pkg->vmID: %X"\ + " pkg->accessibleContext: %p"\ + " pkg->role: %ls"\ + " -> returning rAccessibleContext = %p"\ + , pkg->vmID, (jobject)pkg->accessibleContext, pkg->role, rAC); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetParentWithRolePackage)); } break; case cGetTopLevelObjectPackage: - PrintDebugString(" type == cGetTopLevelObjectPackage"); + PrintDebugString("[INFO]: type == cGetTopLevelObjectPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetTopLevelObjectPackage))) { GetTopLevelObjectPackage *pkg = (GetTopLevelObjectPackage *) (buffer + sizeof(PackageType)); rAC = windowsThreadEntryPoints->getTopLevelObject((jobject)pkg->accessibleContext); pkg->rAccessibleContext = (JOBJECT64)rAC; - PrintDebugString(" -> returning rAccessibleContext = %p", rAC); + PrintDebugString("[INFO]: -> returning rAccessibleContext = %p", rAC); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetTopLevelObjectPackage)); } break; case cGetParentWithRoleElseRootPackage: - PrintDebugString(" type == cGetParentWithRoleElseRootPackage"); + PrintDebugString("[INFO]: type == cGetParentWithRoleElseRootPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetParentWithRoleElseRootPackage))) { GetParentWithRoleElseRootPackage *pkg = (GetParentWithRoleElseRootPackage *) (buffer + sizeof(PackageType)); rAC = windowsThreadEntryPoints->getParentWithRoleElseRoot((jobject)pkg->accessibleContext, pkg->role); pkg->rAccessibleContext = (JOBJECT64)rAC; - PrintDebugString(" -> returning rAccessibleContext = %p", rAC); + PrintDebugString("[INFO]: -> returning rAccessibleContext = %p", rAC); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetParentWithRoleElseRootPackage)); } break; case cGetObjectDepthPackage: - PrintDebugString(" type == cGetObjectDepthPackage"); + PrintDebugString("[INFO]: type == cGetObjectDepthPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetObjectDepthPackage))) { GetObjectDepthPackage *pkg = (GetObjectDepthPackage *) (buffer + sizeof(PackageType)); pkg->rResult = windowsThreadEntryPoints->getObjectDepth((jobject)pkg->accessibleContext); - PrintDebugString(" -> returning rResult = %d", pkg->rResult); + PrintDebugString("[INFO]: -> returning rResult = %d", pkg->rResult); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetObjectDepthPackage)); } break; case cGetActiveDescendentPackage: - PrintDebugString(" type == cGetActiveDescendentPackage"); + PrintDebugString("[INFO]: type == cGetActiveDescendentPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetActiveDescendentPackage))) { GetActiveDescendentPackage *pkg = (GetActiveDescendentPackage *) (buffer + sizeof(PackageType)); rAC = windowsThreadEntryPoints->getActiveDescendent((jobject)pkg->accessibleContext); pkg->rAccessibleContext = (JOBJECT64)rAC; - PrintDebugString(" -> returning rAccessibleContext = %p", rAC); + PrintDebugString("[INFO]: -> returning rAccessibleContext = %p", rAC); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetActiveDescendentPackage)); } break; case cGetAccessibleContextAtPackage: - PrintDebugString(" type == cGetAccessibleContextAtPackage"); + PrintDebugString("[INFO]: type == cGetAccessibleContextAtPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleContextAtPackage))) { GetAccessibleContextAtPackage *pkg = (GetAccessibleContextAtPackage *) (buffer + sizeof(PackageType)); @@ -628,13 +631,13 @@ windowsThreadEntryPoints->getAccessibleContextAt(pkg->x, pkg->y, (jobject)pkg->AccessibleContext); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleContextAtPackage)); } break; case cGetAccessibleContextWithFocusPackage: - PrintDebugString(" type == cGetAccessibleContextWithFocusPackage"); + PrintDebugString("[INFO]: type == cGetAccessibleContextWithFocusPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleContextWithFocusPackage))) { GetAccessibleContextWithFocusPackage *pkg = (GetAccessibleContextWithFocusPackage *) (buffer + sizeof(PackageType)); @@ -642,46 +645,46 @@ windowsThreadEntryPoints->getAccessibleContextWithFocus(); pkg->rVMID = HandleToLong(dialogWindow); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleContextWithFocusPackage)); } break; case cGetAccessibleContextInfoPackage: - PrintDebugString(" type == cGetAccessibleContextInfoPackage"); + PrintDebugString("[INFO]: type == cGetAccessibleContextInfoPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleContextInfoPackage))) { GetAccessibleContextInfoPackage *pkg = (GetAccessibleContextInfoPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleContextInfo( (jobject)pkg->AccessibleContext, &(pkg->rAccessibleContextInfo)); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleContextInfoPackage)); } break; case cGetAccessibleChildFromContextPackage: - PrintDebugString(" type == cGetAccessibleChildFromContextPackage"); + PrintDebugString("[INFO]: type == cGetAccessibleChildFromContextPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleChildFromContextPackage))) { GetAccessibleChildFromContextPackage *pkg = (GetAccessibleChildFromContextPackage *) (buffer + sizeof(PackageType)); pkg->rAccessibleContext = (JOBJECT64)windowsThreadEntryPoints->getAccessibleChildFromContext( (jobject)pkg->AccessibleContext, pkg->childIndex); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleChildFromContextPackage)); } break; case cGetAccessibleParentFromContextPackage: - PrintDebugString(" type == cGetAccessibleParentFromContextPackage"); + PrintDebugString("[INFO]: type == cGetAccessibleParentFromContextPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleParentFromContextPackage))) { GetAccessibleParentFromContextPackage *pkg = (GetAccessibleParentFromContextPackage *) (buffer + sizeof(PackageType)); pkg->rAccessibleContext = (JOBJECT64)windowsThreadEntryPoints->getAccessibleParentFromContext( (jobject)pkg->AccessibleContext); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleParentFromContextPackage)); } break; @@ -689,106 +692,106 @@ // ------------ begin AccessibleTable packages ------------------ case cGetAccessibleTableInfoPackage: - PrintDebugString(" ##### type == cGetAccessibleTableInfoPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleTableInfoPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableInfoPackage))) { GetAccessibleTableInfoPackage *pkg = (GetAccessibleTableInfoPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleTableInfo((jobject)pkg->accessibleContext, &(pkg->rTableInfo)); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableInfoPackage)); } break; case cGetAccessibleTableCellInfoPackage: - PrintDebugString(" ##### type == cGetAccessibleTableCellInfoPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleTableCellInfoPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableCellInfoPackage))) { GetAccessibleTableCellInfoPackage *pkg = (GetAccessibleTableCellInfoPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleTableCellInfo((jobject)pkg->accessibleTable, pkg->row, pkg->column, &(pkg->rTableCellInfo)); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableCellInfoPackage)); } break; case cGetAccessibleTableRowHeaderPackage: - PrintDebugString(" ##### type == cGetAccessibleTableRowHeaderPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleTableRowHeaderPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableRowHeaderPackage))) { GetAccessibleTableRowHeaderPackage *pkg = (GetAccessibleTableRowHeaderPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleTableRowHeader((jobject)pkg->accessibleContext, &(pkg->rTableInfo)); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableRowHeaderPackage)); } break; case cGetAccessibleTableColumnHeaderPackage: - PrintDebugString(" ##### type == cGetAccessibleTableColumnHeaderPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleTableColumnHeaderPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableColumnHeaderPackage))) { GetAccessibleTableColumnHeaderPackage *pkg = (GetAccessibleTableColumnHeaderPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleTableColumnHeader((jobject)pkg->accessibleContext, &(pkg->rTableInfo)); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableColumnHeaderPackage)); } break; case cGetAccessibleTableRowDescriptionPackage: - PrintDebugString(" ##### type == cGetAccessibleTableRowDescriptionPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleTableRowDescriptionPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableRowDescriptionPackage))) { GetAccessibleTableRowDescriptionPackage *pkg = (GetAccessibleTableRowDescriptionPackage *) (buffer + sizeof(PackageType)); pkg->rAccessibleContext = (JOBJECT64)windowsThreadEntryPoints->getAccessibleTableRowDescription( (jobject)pkg->accessibleContext, pkg->row); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableRowDescriptionPackage)); } break; case cGetAccessibleTableColumnDescriptionPackage: - PrintDebugString(" ##### type == cGetAccessibleTableColumnDescriptionPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleTableColumnDescriptionPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableColumnDescriptionPackage))) { GetAccessibleTableColumnDescriptionPackage *pkg = (GetAccessibleTableColumnDescriptionPackage *) (buffer + sizeof(PackageType)); pkg->rAccessibleContext = (JOBJECT64)windowsThreadEntryPoints->getAccessibleTableColumnDescription( (jobject)pkg->accessibleContext, pkg->column); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableColumnDescriptionPackage)); } break; case cGetAccessibleTableColumnSelectionCountPackage: - PrintDebugString(" ##### type == cGetAccessibleTableColumnSelectionCountPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleTableColumnSelectionCountPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableColumnSelectionCountPackage))) { GetAccessibleTableColumnSelectionCountPackage *pkg = (GetAccessibleTableColumnSelectionCountPackage *) (buffer + sizeof(PackageType)); pkg->rCount = windowsThreadEntryPoints->getAccessibleTableColumnSelectionCount( (jobject)pkg->accessibleTable); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableColumnSelectionCountPackage)); } break; case cGetAccessibleTableRowSelectionCountPackage: - PrintDebugString(" ##### type == cGetAccessibleTableRowSelectionCountPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleTableRowSelectionCountPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableRowSelectionCountPackage))) { GetAccessibleTableRowSelectionCountPackage *pkg = (GetAccessibleTableRowSelectionCountPackage *) (buffer + sizeof(PackageType)); @@ -796,114 +799,114 @@ pkg->rCount = windowsThreadEntryPoints->getAccessibleTableRowSelectionCount( (jobject)pkg->accessibleTable); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableRowSelectionCountPackage)); } break; case cIsAccessibleTableRowSelectedPackage: - PrintDebugString(" ##### type == cIsAccessibleTableRowSelectedPackage"); + PrintDebugString("[INFO]: ##### type == cIsAccessibleTableRowSelectedPackage"); if (bufsize == (sizeof(PackageType) + sizeof(IsAccessibleTableRowSelectedPackage))) { IsAccessibleTableRowSelectedPackage *pkg = (IsAccessibleTableRowSelectedPackage *) (buffer + sizeof(PackageType)); pkg->rResult = windowsThreadEntryPoints->isAccessibleTableRowSelected( (jobject)pkg->accessibleTable, pkg->row); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(IsAccessibleTableRowSelectedPackage)); } break; case cIsAccessibleTableColumnSelectedPackage: - PrintDebugString(" ##### type == cIsAccessibleTableColumnSelectedPackage"); + PrintDebugString("[INFO]: ##### type == cIsAccessibleTableColumnSelectedPackage"); if (bufsize == (sizeof(PackageType) + sizeof(IsAccessibleTableColumnSelectedPackage))) { IsAccessibleTableColumnSelectedPackage *pkg = (IsAccessibleTableColumnSelectedPackage *) (buffer + sizeof(PackageType)); pkg->rResult = windowsThreadEntryPoints->isAccessibleTableColumnSelected( (jobject)pkg->accessibleTable, pkg->column); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(IsAccessibleTableColumnSelectedPackage)); } break; case cGetAccessibleTableColumnSelectionsPackage: - PrintDebugString(" ##### type == cGetAccessibleTableColumnSelectionsPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleTableColumnSelectionsPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableColumnSelectionsPackage))) { GetAccessibleTableColumnSelectionsPackage *pkg = (GetAccessibleTableColumnSelectionsPackage *) (buffer + sizeof(PackageType)); - PrintDebugString(" ##### cGetAccessibleTableColumnSelectionsPackage count=%d", pkg->count); + PrintDebugString("[INFO]: ##### cGetAccessibleTableColumnSelectionsPackage count=%d", pkg->count); windowsThreadEntryPoints->getAccessibleTableColumnSelections( (jobject)pkg->accessibleTable, pkg->count, pkg->rSelections); for (int i = 0; i < pkg->count; i++) { - PrintDebugString(" ##### cGetAccessibleTableColumnSelectionsPackage(%d)=%d", i, pkg->rSelections[i]); + PrintDebugString("[INFO]: ##### cGetAccessibleTableColumnSelectionsPackage(%d)=%d", i, pkg->rSelections[i]); } - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableColumnSelectionsPackage)); } break; case cGetAccessibleTableRowSelectionsPackage: - PrintDebugString(" ##### type == cGetAccessibleTableRowSelectionsPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleTableRowSelectionsPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableRowSelectionsPackage))) { GetAccessibleTableRowSelectionsPackage *pkg = (GetAccessibleTableRowSelectionsPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleTableRowSelections( (jobject)pkg->accessibleTable, pkg->count, pkg->rSelections); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableRowSelectionsPackage)); } break; case cGetAccessibleTableRowPackage: - PrintDebugString(" ##### type == cGetAccessibleTableRowPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleTableRowPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableRowPackage))) { GetAccessibleTableRowPackage *pkg = (GetAccessibleTableRowPackage *) (buffer + sizeof(PackageType)); pkg->rRow = windowsThreadEntryPoints->getAccessibleTableRow( (jobject)pkg->accessibleTable, pkg->index); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableRowPackage)); } break; case cGetAccessibleTableColumnPackage: - PrintDebugString(" ##### type == cGetAccessibleTableColumnPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleTableColumnPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableColumnPackage))) { GetAccessibleTableColumnPackage *pkg = (GetAccessibleTableColumnPackage *) (buffer + sizeof(PackageType)); pkg->rColumn = windowsThreadEntryPoints->getAccessibleTableColumn( (jobject)pkg->accessibleTable, pkg->index); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableColumnPackage)); } break; case cGetAccessibleTableIndexPackage: - PrintDebugString(" ##### type == cGetAccessibleTableIndexPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleTableIndexPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableIndexPackage))) { GetAccessibleTableIndexPackage *pkg = (GetAccessibleTableIndexPackage *) (buffer + sizeof(PackageType)); pkg->rIndex = windowsThreadEntryPoints->getAccessibleTableIndex( (jobject)pkg->accessibleTable, pkg->row, pkg->column); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableIndexPackage)); } break; @@ -914,15 +917,15 @@ // ------------ begin AccessibleRelationSet packages ------------------ case cGetAccessibleRelationSetPackage: - PrintDebugString(" ##### type == cGetAccessibleRelationSetPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleRelationSetPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleRelationSetPackage))) { GetAccessibleRelationSetPackage *pkg = (GetAccessibleRelationSetPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleRelationSet( (jobject)pkg->accessibleContext, &(pkg->rAccessibleRelationSetInfo)); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleRelationSetPackage)); } break; @@ -932,85 +935,85 @@ // ------------ begin AccessibleHypertext packages ------------------ case cGetAccessibleHypertextPackage: - PrintDebugString(" ##### type == cGetAccessibleHypertextPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleHypertextPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleHypertextPackage))) { GetAccessibleHypertextPackage *pkg = (GetAccessibleHypertextPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleHypertext( (jobject)pkg->accessibleContext, &(pkg->rAccessibleHypertextInfo)); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleHypertextPackage)); } break; case cActivateAccessibleHyperlinkPackage: - PrintDebugString(" ##### type == cActivateAccessibleHyperlinkPackage"); + PrintDebugString("[INFO]: ##### type == cActivateAccessibleHyperlinkPackage"); if (bufsize == (sizeof(PackageType) + sizeof(ActivateAccessibleHyperlinkPackage))) { ActivateAccessibleHyperlinkPackage *pkg = (ActivateAccessibleHyperlinkPackage *) (buffer + sizeof(PackageType)); pkg->rResult = windowsThreadEntryPoints->activateAccessibleHyperlink( (jobject)pkg->accessibleContext, (jobject)pkg->accessibleHyperlink); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(ActivateAccessibleHyperlinkPackage)); } break; case cGetAccessibleHyperlinkCountPackage: - PrintDebugString(" ##### type == cGetAccessibleHyperlinkCountPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleHyperlinkCountPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleHyperlinkCountPackage))) { GetAccessibleHyperlinkCountPackage *pkg = (GetAccessibleHyperlinkCountPackage *) (buffer + sizeof(PackageType)); pkg->rLinkCount = windowsThreadEntryPoints->getAccessibleHyperlinkCount( (jobject)pkg->accessibleContext); - PrintDebugString(" ##### processing succeeded: pkg->rLinkCount = %d", pkg->rLinkCount); + PrintDebugString("[INFO]: ##### processing succeeded: pkg->rLinkCount = %d", pkg->rLinkCount); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleHyperlinkCountPackage)); } break; case cGetAccessibleHypertextExtPackage: - PrintDebugString(" ##### type == cGetAccessibleHypertextExtPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleHypertextExtPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleHypertextExtPackage))) { GetAccessibleHypertextExtPackage *pkg = (GetAccessibleHypertextExtPackage *) (buffer + sizeof(PackageType)); pkg->rSuccess = windowsThreadEntryPoints->getAccessibleHypertextExt( (jobject)pkg->accessibleContext, pkg->startIndex, &(pkg->rAccessibleHypertextInfo)); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleHypertextExtPackage)); } break; case cGetAccessibleHypertextLinkIndexPackage: - PrintDebugString(" ##### type == cGetAccessibleHypertextLinkIndexPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleHypertextLinkIndexPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleHypertextLinkIndexPackage))) { GetAccessibleHypertextLinkIndexPackage *pkg = (GetAccessibleHypertextLinkIndexPackage *) (buffer + sizeof(PackageType)); pkg->rLinkIndex = windowsThreadEntryPoints->getAccessibleHypertextLinkIndex( (jobject)pkg->hypertext, pkg->charIndex); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleHypertextLinkIndexPackage)); } break; case cGetAccessibleHyperlinkPackage: - PrintDebugString(" ##### type == cGetAccessibleHyperlinkPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleHyperlinkPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleHyperlinkPackage))) { GetAccessibleHyperlinkPackage *pkg = (GetAccessibleHyperlinkPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleHyperlink((jobject)pkg->hypertext, pkg->linkIndex, &(pkg->rAccessibleHyperlinkInfo)); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleHyperlinkPackage)); } break; @@ -1020,59 +1023,59 @@ // ------------ begin Accessible KeyBindings, Icons and Actions case cGetAccessibleKeyBindingsPackage: - PrintDebugString(" ##### type == cGetAccessibleKeyBindingsPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleKeyBindingsPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleKeyBindingsPackage))) { GetAccessibleKeyBindingsPackage *pkg = (GetAccessibleKeyBindingsPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleKeyBindings ( (jobject)pkg->accessibleContext, &(pkg->rAccessibleKeyBindings)); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleKeyBindingsPackage)); } break; case cGetAccessibleIconsPackage: - PrintDebugString(" ##### type == cGetAccessibleIconsPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleIconsPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleIconsPackage))) { GetAccessibleIconsPackage *pkg = (GetAccessibleIconsPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleIcons ( (jobject)pkg->accessibleContext, &(pkg->rAccessibleIcons)); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleIconsPackage)); } break; case cGetAccessibleActionsPackage: - PrintDebugString(" ##### type == cGetAccessibleActionsPackage"); + PrintDebugString("[INFO]: ##### type == cGetAccessibleActionsPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleActionsPackage))) { GetAccessibleActionsPackage *pkg = (GetAccessibleActionsPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleActions ( (jobject)pkg->accessibleContext, &(pkg->rAccessibleActions)); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleActionsPackage)); } break; case cDoAccessibleActionsPackage: - PrintDebugString(" ##### type == cDoAccessibleActionsPackage"); + PrintDebugString("[INFO]: ##### type == cDoAccessibleActionsPackage"); if (bufsize == (sizeof(PackageType) + sizeof(DoAccessibleActionsPackage))) { DoAccessibleActionsPackage *pkg = (DoAccessibleActionsPackage *) (buffer + sizeof(PackageType)); pkg->rResult = windowsThreadEntryPoints->doAccessibleActions((jobject)pkg->accessibleContext, &(pkg->actionsToDo), &(pkg->failure)); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(DoAccessibleActionsPackage)); } break; @@ -1080,50 +1083,50 @@ // ------------ begin addtional methods for Teton case cGetVirtualAccessibleNamePackage: - PrintDebugString(" ##### type == GetVirtualAccessibleNamePackage"); + PrintDebugString("[INFO]: ##### type == GetVirtualAccessibleNamePackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetVirtualAccessibleNamePackage))) { GetVirtualAccessibleNamePackage *pkg = (GetVirtualAccessibleNamePackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getVirtualAccessibleName ((const jobject)pkg->accessibleContext, pkg->rName, pkg->len); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetVirtualAccessibleNamePackage)); } break; case cRequestFocusPackage: - PrintDebugString(" ##### type == RequestFocusPackage"); + PrintDebugString("[INFO]: ##### type == RequestFocusPackage"); if (bufsize == (sizeof(PackageType) + sizeof(RequestFocusPackage))) { RequestFocusPackage *pkg = (RequestFocusPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->requestFocus ( (jobject)pkg->accessibleContext); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(RequestFocusPackage)); } break; case cSelectTextRangePackage: - PrintDebugString(" ##### type == SelectTextRangePackage"); + PrintDebugString("[INFO]: ##### type == SelectTextRangePackage"); if (bufsize == (sizeof(PackageType) + sizeof(SelectTextRangePackage))) { SelectTextRangePackage *pkg = (SelectTextRangePackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->selectTextRange ( (jobject)pkg->accessibleContext, pkg->startIndex, pkg->endIndex); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(SelectTextRangePackage)); } break; case cGetTextAttributesInRangePackage: - PrintDebugString(" ##### type == GetTextAttributesInRangePackage"); + PrintDebugString("[INFO]: ##### type == GetTextAttributesInRangePackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetTextAttributesInRangePackage))) { GetTextAttributesInRangePackage *pkg = (GetTextAttributesInRangePackage *) (buffer + sizeof(PackageType)); @@ -1131,30 +1134,30 @@ (jobject)pkg->accessibleContext, pkg->startIndex, pkg->endIndex, (AccessibleTextAttributesInfo *)&(pkg->attributes), &(pkg->rLength)); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetTextAttributesInRangePackage)); } break; case cGetVisibleChildrenCountPackage: - PrintDebugString(" ##### type == GetVisibleChildrenCountPackage"); + PrintDebugString("[INFO]: ##### type == GetVisibleChildrenCountPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetVisibleChildrenCountPackage))) { GetVisibleChildrenCountPackage *pkg = (GetVisibleChildrenCountPackage *) (buffer + sizeof(PackageType)); pkg->rChildrenCount = windowsThreadEntryPoints->getVisibleChildrenCount ((jobject)pkg->accessibleContext); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetVisibleChildrenCountPackage)); } break; case cGetVisibleChildrenPackage: - PrintDebugString(" ##### type == GetVisibleChildrenPackage"); + PrintDebugString("[INFO]: ##### type == GetVisibleChildrenPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetVisibleChildrenPackage))) { GetVisibleChildrenPackage *pkg = (GetVisibleChildrenPackage *) (buffer + sizeof(PackageType)); @@ -1162,23 +1165,23 @@ pkg->startIndex, &(pkg->rVisibleChildrenInfo)); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetVisibleChildrenPackage)); } break; case cSetCaretPositionPackage: - PrintDebugString(" ##### type == SetCaretPositionPackage"); + PrintDebugString("[INFO]: ##### type == SetCaretPositionPackage"); if (bufsize == (sizeof(PackageType) + sizeof(SetCaretPositionPackage))) { SetCaretPositionPackage *pkg = (SetCaretPositionPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->setCaretPosition ( (jobject)pkg->accessibleContext, pkg->position); - PrintDebugString(" ##### processing succeeded"); + PrintDebugString("[INFO]: ##### processing succeeded"); } else { - PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(SetCaretPositionPackage)); } break; @@ -1190,105 +1193,105 @@ // ------------ Accessible Text packages ------------------ case cGetAccessibleTextInfoPackage: - PrintDebugString(" type == cGetAccessibleTextInfoPackage"); + PrintDebugString("[INFO]: type == cGetAccessibleTextInfoPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextInfoPackage))) { GetAccessibleTextInfoPackage *pkg = (GetAccessibleTextInfoPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleTextInfo((jobject)pkg->AccessibleContext, &(pkg->rTextInfo), pkg->x, pkg->y); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextInfoPackage)); } break; case cGetAccessibleTextItemsPackage: - PrintDebugString(" type == cGetAccessibleTextItemsPackage"); + PrintDebugString("[INFO]: type == cGetAccessibleTextItemsPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextItemsPackage))) { GetAccessibleTextItemsPackage *pkg = (GetAccessibleTextItemsPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleTextItems((jobject)pkg->AccessibleContext, &(pkg->rTextItemsInfo), pkg->index); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextInfoPackage)); } break; case cGetAccessibleTextSelectionInfoPackage: - PrintDebugString(" type == cGetAccessibleTextSelectionInfoPackage"); + PrintDebugString("[INFO]: type == cGetAccessibleTextSelectionInfoPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextSelectionInfoPackage))) { GetAccessibleTextSelectionInfoPackage *pkg = (GetAccessibleTextSelectionInfoPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleTextSelectionInfo( (jobject)pkg->AccessibleContext, &(pkg->rTextSelectionItemsInfo)); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextSelectionInfoPackage)); } break; case cGetAccessibleTextAttributeInfoPackage: - PrintDebugString(" type == cGetAccessibleTextAttributeInfoPackage"); + PrintDebugString("[INFO]: type == cGetAccessibleTextAttributeInfoPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextAttributeInfoPackage))) { GetAccessibleTextAttributeInfoPackage *pkg = (GetAccessibleTextAttributeInfoPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleTextAttributes( (jobject)pkg->AccessibleContext, pkg->index, (AccessibleTextAttributesInfo *) &(pkg->rAttributeInfo)); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextAttributeInfoPackage)); } break; case cGetAccessibleTextRectInfoPackage: - PrintDebugString(" type == cGetAccessibleTextRectInfoPackage"); + PrintDebugString("[INFO]: type == cGetAccessibleTextRectInfoPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextRectInfoPackage))) { GetAccessibleTextRectInfoPackage *pkg = (GetAccessibleTextRectInfoPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleTextRect((jobject)pkg->AccessibleContext, &(pkg->rTextRectInfo), pkg->index); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextRectInfoPackage)); } break; case cGetCaretLocationPackage: - PrintDebugString(" type == cGetCaretLocationPackage"); + PrintDebugString("[INFO]: type == cGetCaretLocationPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetCaretLocationPackage))) { GetCaretLocationPackage *pkg = (GetCaretLocationPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getCaretLocation((jobject)pkg->AccessibleContext, &(pkg->rTextRectInfo), pkg->index); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetCaretLocationPackage)); } break; case cGetAccessibleTextLineBoundsPackage: - PrintDebugString(" type == cGetAccessibleTextLineBoundsPackage"); + PrintDebugString("[INFO]: type == cGetAccessibleTextLineBoundsPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextLineBoundsPackage))) { GetAccessibleTextLineBoundsPackage *pkg = (GetAccessibleTextLineBoundsPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleTextLineBounds((jobject)pkg->AccessibleContext, pkg->index, &(pkg->rLineStart), &(pkg->rLineEnd)); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextLineBoundsPackage)); } break; case cGetAccessibleTextRangePackage: - PrintDebugString(" type == cGetAccessibleTextRangePackage"); + PrintDebugString("[INFO]: type == cGetAccessibleTextRangePackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextRangePackage))) { GetAccessibleTextRangePackage *pkg = (GetAccessibleTextRangePackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getAccessibleTextRange((jobject)pkg->AccessibleContext, pkg->start, pkg->end, (wchar_t *) &(pkg->rText), (sizeof(pkg->rText) / sizeof(wchar_t))); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextRangePackage)); } break; @@ -1297,40 +1300,40 @@ // ------------ Accessible Value packages ------------------ case cGetCurrentAccessibleValueFromContextPackage: - PrintDebugString(" type == cGetCurrentAccessibleValueFromContextPackage"); + PrintDebugString("[INFO]: type == cGetCurrentAccessibleValueFromContextPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetCurrentAccessibleValueFromContextPackage))) { GetCurrentAccessibleValueFromContextPackage *pkg = (GetCurrentAccessibleValueFromContextPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getCurrentAccessibleValueFromContext((jobject)pkg->AccessibleContext, (wchar_t *) &(pkg->rValue), (sizeof(pkg->rValue) / sizeof(wchar_t))); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetCurrentAccessibleValueFromContextPackage)); } break; case cGetMaximumAccessibleValueFromContextPackage: - PrintDebugString(" type == cGetMaximumAccessibleValueFromContextPackage"); + PrintDebugString("[INFO]: type == cGetMaximumAccessibleValueFromContextPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetMaximumAccessibleValueFromContextPackage))) { GetMaximumAccessibleValueFromContextPackage *pkg = (GetMaximumAccessibleValueFromContextPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getMaximumAccessibleValueFromContext((jobject)pkg->AccessibleContext, (wchar_t *) &(pkg->rValue), (sizeof(pkg->rValue) / sizeof(wchar_t))); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetMaximumAccessibleValueFromContextPackage)); } break; case cGetMinimumAccessibleValueFromContextPackage: - PrintDebugString(" type == cGetMinimumAccessibleValueFromContextPackage"); + PrintDebugString("[INFO]: type == cGetMinimumAccessibleValueFromContextPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetMinimumAccessibleValueFromContextPackage))) { GetMinimumAccessibleValueFromContextPackage *pkg = (GetMinimumAccessibleValueFromContextPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->getMinimumAccessibleValueFromContext((jobject)pkg->AccessibleContext, (wchar_t *) &(pkg->rValue), (sizeof(pkg->rValue) / sizeof(wchar_t))); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetMinimumAccessibleValueFromContextPackage)); } break; @@ -1338,90 +1341,90 @@ // ------------ Accessible Selection packages ------------------ case cAddAccessibleSelectionFromContextPackage: - PrintDebugString(" type == cAddAccessibleSelectionFromContextPackage"); + PrintDebugString("[INFO]: type == cAddAccessibleSelectionFromContextPackage"); if (bufsize == (sizeof(PackageType) + sizeof(AddAccessibleSelectionFromContextPackage))) { AddAccessibleSelectionFromContextPackage *pkg = (AddAccessibleSelectionFromContextPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->addAccessibleSelectionFromContext((jobject)pkg->AccessibleContext, pkg->index); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(AddAccessibleSelectionFromContextPackage)); } break; case cClearAccessibleSelectionFromContextPackage: - PrintDebugString(" type == cClearAccessibleSelectionFromContextPackage"); + PrintDebugString("[INFO]: type == cClearAccessibleSelectionFromContextPackage"); if (bufsize == (sizeof(PackageType) + sizeof(ClearAccessibleSelectionFromContextPackage))) { ClearAccessibleSelectionFromContextPackage *pkg = (ClearAccessibleSelectionFromContextPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->clearAccessibleSelectionFromContext((jobject)pkg->AccessibleContext); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(ClearAccessibleSelectionFromContextPackage)); } break; case cGetAccessibleSelectionFromContextPackage: - PrintDebugString(" type == cGetAccessibleSelectionFromContextPackage"); + PrintDebugString("[INFO]: type == cGetAccessibleSelectionFromContextPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleSelectionFromContextPackage))) { GetAccessibleSelectionFromContextPackage *pkg = (GetAccessibleSelectionFromContextPackage *) (buffer + sizeof(PackageType)); pkg->rAccessibleContext = (JOBJECT64)windowsThreadEntryPoints->getAccessibleSelectionFromContext( (jobject)pkg->AccessibleContext, pkg->index); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleSelectionFromContextPackage)); } break; case cGetAccessibleSelectionCountFromContextPackage: - PrintDebugString(" type == cGetAccessibleSelectionCountFromContextPackage"); + PrintDebugString("[INFO]: type == cGetAccessibleSelectionCountFromContextPackage"); if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleSelectionCountFromContextPackage))) { GetAccessibleSelectionCountFromContextPackage *pkg = (GetAccessibleSelectionCountFromContextPackage *) (buffer + sizeof(PackageType)); pkg->rCount = windowsThreadEntryPoints->getAccessibleSelectionCountFromContext( (jobject)pkg->AccessibleContext); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(GetAccessibleSelectionCountFromContextPackage)); } break; case cIsAccessibleChildSelectedFromContextPackage: - PrintDebugString(" type == cIsAccessibleChildSelectedFromContextPackage"); + PrintDebugString("[INFO]: type == cIsAccessibleChildSelectedFromContextPackage"); if (bufsize == (sizeof(PackageType) + sizeof(IsAccessibleChildSelectedFromContextPackage))) { IsAccessibleChildSelectedFromContextPackage *pkg = (IsAccessibleChildSelectedFromContextPackage *) (buffer + sizeof(PackageType)); pkg->rResult = windowsThreadEntryPoints->isAccessibleChildSelectedFromContext( (jobject)pkg->AccessibleContext, pkg->index); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(IsAccessibleChildSelectedFromContextPackage)); } break; case cRemoveAccessibleSelectionFromContextPackage: - PrintDebugString(" type == cRemoveAccessibleSelectionFromContextPackage"); + PrintDebugString("[INFO]: type == cRemoveAccessibleSelectionFromContextPackage"); if (bufsize == (sizeof(PackageType) + sizeof(RemoveAccessibleSelectionFromContextPackage))) { RemoveAccessibleSelectionFromContextPackage *pkg = (RemoveAccessibleSelectionFromContextPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->removeAccessibleSelectionFromContext((jobject)pkg->AccessibleContext, pkg->index); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(RemoveAccessibleSelectionFromContextPackage)); } break; case cSelectAllAccessibleSelectionFromContextPackage: - PrintDebugString(" type == cSelectAllAccessibleSelectionFromContextPackage"); + PrintDebugString("[INFO]: type == cSelectAllAccessibleSelectionFromContextPackage"); if (bufsize == (sizeof(PackageType) + sizeof(SelectAllAccessibleSelectionFromContextPackage))) { SelectAllAccessibleSelectionFromContextPackage *pkg = (SelectAllAccessibleSelectionFromContextPackage *) (buffer + sizeof(PackageType)); windowsThreadEntryPoints->selectAllAccessibleSelectionFromContext((jobject)pkg->AccessibleContext); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(SelectAllAccessibleSelectionFromContextPackage)); } break; @@ -1430,60 +1433,60 @@ // ------------ event notification management packages ------------------ case cAddJavaEventNotificationPackage: - PrintDebugString(" type = cAddJavaEventNotificationPackage"); + PrintDebugString("[INFO]: type = cAddJavaEventNotificationPackage"); if (bufsize == (sizeof(PackageType) + sizeof(AddJavaEventNotificationPackage))) { AddJavaEventNotificationPackage *pkg = (AddJavaEventNotificationPackage *) (buffer + sizeof(PackageType)); addJavaEventNotification(pkg->type, (HWND)ABLongToHandle( pkg->DLLwindow ) ); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(AddJavaEventNotificationPackage)); } break; case cRemoveJavaEventNotificationPackage: - PrintDebugString(" type = cRemoveJavaEventNotificationPackage"); + PrintDebugString("[INFO]: type = cRemoveJavaEventNotificationPackage"); if (bufsize == (sizeof(PackageType) + sizeof(RemoveJavaEventNotificationPackage))) { RemoveJavaEventNotificationPackage *pkg = (RemoveJavaEventNotificationPackage *) (buffer + sizeof(PackageType)); removeJavaEventNotification(pkg->type, (HWND)ABLongToHandle( pkg->DLLwindow )); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(RemoveJavaEventNotificationPackage)); } break; case cAddAccessibilityEventNotificationPackage: - PrintDebugString(" type = cAddAccessibilityEventNotificationPackage"); + PrintDebugString("[INFO]: type = cAddAccessibilityEventNotificationPackage"); if (bufsize == (sizeof(PackageType) + sizeof(AddAccessibilityEventNotificationPackage))) { AddAccessibilityEventNotificationPackage *pkg = (AddAccessibilityEventNotificationPackage *) (buffer + sizeof(PackageType)); addAccessibilityEventNotification(pkg->type, (HWND)ABLongToHandle(pkg->DLLwindow)); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(AddAccessibilityEventNotificationPackage)); } break; case cRemoveAccessibilityEventNotificationPackage: - PrintDebugString(" type = cRemoveAccessibilityEventNotificationPackage"); + PrintDebugString("[INFO]: type = cRemoveAccessibilityEventNotificationPackage"); if (bufsize == (sizeof(PackageType) + sizeof(RemoveAccessibilityEventNotificationPackage))) { RemoveAccessibilityEventNotificationPackage *pkg = (RemoveAccessibilityEventNotificationPackage *) (buffer + sizeof(PackageType)); removeAccessibilityEventNotification(pkg->type, (HWND)ABLongToHandle(pkg->DLLwindow)); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(RemoveAccessibilityEventNotificationPackage)); } break; default: - PrintDebugString(" processing FAILED!! -> don't know how to handle type = %X", *type); + PrintDebugString("[ERROR]: processing FAILED!! -> don't know how to handle type = %X", *type); returnVal = -1; break; } - PrintDebugString(" package processing completed"); + PrintDebugString("[INFO]: package processing completed"); return returnVal; } @@ -1502,17 +1505,17 @@ */ LRESULT JavaAccessBridge::MemoryMappedFileCreated(HWND ATBridgeDLLWindow, char *filename) { - PrintDebugString(" in MemoryMappedFileCreated(%p, %s)!", ATBridgeDLLWindow, filename); + PrintDebugString("[INFO]: in MemoryMappedFileCreated(%p, %s)!", ATBridgeDLLWindow, filename); AccessBridgeATInstance *newAT = new AccessBridgeATInstance(dialogWindow, ATBridgeDLLWindow, filename, ATs); - PrintDebugString(" just created a new ATInstance = %p, old = %p", newAT, ATs); + PrintDebugString("[INFO]: just created a new ATInstance = %p, old = %p", newAT, ATs); ATs = newAT; LRESULT returnVal = ATs->initiateIPC(); if (returnVal == 0) { - PrintDebugString(" Successfully initiated IPC with AT!!!"); + PrintDebugString("[INFO]: Successfully initiated IPC with AT!!!"); } else { - PrintDebugString(" ERROR: Failed to initiate IPC with AT!!!"); + PrintDebugString("[ERROR]: Failed to initiate IPC with AT!!!"); } return returnVal; @@ -1525,9 +1528,9 @@ */ void JavaAccessBridge::WindowsATDestroyed(HWND ATBridgeDLLWindow) { - PrintDebugString("\r\nin JavaAccessBridge::WindowsATDestroyed(%p)", ATBridgeDLLWindow); + PrintDebugString("[INFO]: in JavaAccessBridge::WindowsATDestroyed(%p)", ATBridgeDLLWindow); if (ATs == (AccessBridgeATInstance *) 0) { - PrintDebugString(" ERROR!! -> ATs == 0! (shouldn't happen here)"); + PrintDebugString("[ERROR]: -> ATs == 0! (shouldn't happen here)"); return; } @@ -1539,20 +1542,20 @@ removeJavaEventNotification(currentAT->javaEventMask, ATBridgeDLLWindow); removeAccessibilityEventNotification(currentAT->accessibilityEventMask, ATBridgeDLLWindow); delete currentAT; - PrintDebugString(" data structures successfully removed"); + PrintDebugString("[INFO]: data structures successfully removed"); } else { while (currentAT != (AccessBridgeATInstance *) NULL) { if (currentAT->winAccessBridgeWindow == ATBridgeDLLWindow) { previousAT->nextATInstance = currentAT->nextATInstance; delete currentAT; - PrintDebugString(" data structures successfully removed"); + PrintDebugString("[INFO]: data structures successfully removed"); return; } else { previousAT = currentAT; currentAT = currentAT->nextATInstance; } } - PrintDebugString(" ERROR!! couldn't find matching data structures!"); + PrintDebugString("[ERROR]: couldn't find matching data structures!"); } } @@ -1570,13 +1573,13 @@ */ void JavaAccessBridge::releaseJavaObject(jobject object) { - PrintDebugString("In JavaAccessBridge::releaseJavaObject"); - PrintDebugString(" object X: %p", object); + PrintDebugString("[INFO]: In JavaAccessBridge::releaseJavaObject"); + PrintDebugString("[INFO]: object X: %p", object); if (windowsThreadJNIEnv != (JNIEnv *) 0) { windowsThreadJNIEnv->DeleteGlobalRef(object); - PrintDebugString(" global reference deleted.", object); + PrintDebugString("[INFO]: global reference deleted.", object); } else { - PrintDebugString(" Error! windowsThreadJNIEnv == 0"); + PrintDebugString("[ERROR]: windowsThreadJNIEnv == 0"); } } @@ -1590,23 +1593,23 @@ JavaAccessBridge::addJavaEventNotification(jlong type, HWND DLLwindow) { // walk through list of ATs, find this one and add this type // and, if we weren't listening for these before, ask Java for 'em - PrintDebugString(" adding Java event type %016I64X to HWND %p", type, DLLwindow); + PrintDebugString("[INFO]: adding Java event type %016I64X to HWND %p", type, DLLwindow); AccessBridgeATInstance *ati = ATs; long globalEventMask = 0; while (ati != (AccessBridgeATInstance *) 0) { if (ati->winAccessBridgeWindow == DLLwindow) { ati->javaEventMask |= type; - PrintDebugString(" found HWND, javaEventMask now is %X", ati->javaEventMask); + PrintDebugString("[INFO]: found HWND, javaEventMask now is %X", ati->javaEventMask); } else { globalEventMask |= ati->javaEventMask; } ati = ati->nextATInstance; } - PrintDebugString(" union of all Java AT event masks: %X", globalEventMask); + PrintDebugString("[INFO]: union of all Java AT event masks: %X", globalEventMask); if (!(globalEventMask & type)) { // no other ATs wanted this event; // start getting them from Java - PrintDebugString(" no other AT wanted this Java event (so not registered); adding to AccessBridge.java"); + PrintDebugString("[INFO]: no other AT wanted this Java event (so not registered); adding to AccessBridge.java"); windowsThreadEntryPoints->addJavaEventNotification(type); } } @@ -1619,23 +1622,23 @@ JavaAccessBridge::removeJavaEventNotification(jlong type, HWND DLLwindow) { // walk through list of ATs, find this one and remove this type // and, if no other AT wants 'em either, tell Java we no longer want 'em - PrintDebugString(" removing Java event type %016I64X from HWND %p", type, DLLwindow); + PrintDebugString("[INFO]: removing Java event type %016I64X from HWND %p", type, DLLwindow); AccessBridgeATInstance *ati = ATs; long globalEventMask = 0; while (ati != (AccessBridgeATInstance *) 0) { if (ati->winAccessBridgeWindow == DLLwindow) { ati->javaEventMask &= (0xFFFFFFFF - type); - PrintDebugString(" found HWND, javaEventMask now is %X", ati->javaEventMask); + PrintDebugString("[INFO]: found HWND, javaEventMask now is %X", ati->javaEventMask); } else { globalEventMask |= ati->javaEventMask; } ati = ati->nextATInstance; } - PrintDebugString(" union of all Java AT event masks: %X", globalEventMask); + PrintDebugString("[INFO]: union of all Java AT event masks: %X", globalEventMask); if (!(globalEventMask & type)) { // no other ATs wanted this event; // stop getting them from Java - PrintDebugString(" no other AT wanted this Java event (so can remove); removing from AccessBridge.java"); + PrintDebugString("[INFO]: no other AT wanted this Java event (so can remove); removing from AccessBridge.java"); windowsThreadEntryPoints->removeJavaEventNotification(type); } } @@ -1649,23 +1652,23 @@ JavaAccessBridge::addAccessibilityEventNotification(jlong type, HWND DLLwindow) { // walk through list of ATs, find this one and add this type // and, if we weren't listening for these before, ask Java for 'em - PrintDebugString(" adding Accesibility event type %016I64X to HWND %p", type, DLLwindow); + PrintDebugString("[INFO]: adding Accesibility event type %016I64X to HWND %p", type, DLLwindow); AccessBridgeATInstance *ati = ATs; long globalEventMask = 0; while (ati != (AccessBridgeATInstance *) 0) { if (ati->winAccessBridgeWindow == DLLwindow) { ati->accessibilityEventMask |= type; - PrintDebugString(" found HWND, accessibilityEventMask now is %X", ati->accessibilityEventMask); + PrintDebugString("[INFO]: found HWND, accessibilityEventMask now is %X", ati->accessibilityEventMask); } else { globalEventMask |= ati->accessibilityEventMask; } ati = ati->nextATInstance; } - PrintDebugString(" union of all Accessibility AT event masks: %X", globalEventMask); + PrintDebugString("[INFO]: union of all Accessibility AT event masks: %X", globalEventMask); if (!(globalEventMask & type)) { // no other ATs wanted this event; // start getting them from Java - PrintDebugString(" no other AT wanted this Accesibility event (so not registered); adding to AccessBridge.java"); + PrintDebugString("[INFO]: no other AT wanted this Accesibility event (so not registered); adding to AccessBridge.java"); windowsThreadEntryPoints->addAccessibilityEventNotification(type); } } @@ -1678,23 +1681,23 @@ JavaAccessBridge::removeAccessibilityEventNotification(jlong type, HWND DLLwindow) { // walk through list of ATs, find this one and remove this type // and, if no other AT wants 'em either, tell Java we no longer want 'em - PrintDebugString(" removing Accesibility event type %016I64X from HWND %p", type, DLLwindow); + PrintDebugString("[INFO]: removing Accesibility event type %016I64X from HWND %p", type, DLLwindow); AccessBridgeATInstance *ati = ATs; long globalEventMask = 0; while (ati != (AccessBridgeATInstance *) 0) { if (ati->winAccessBridgeWindow == DLLwindow) { ati->accessibilityEventMask &= (0xFFFFFFFF - type); - PrintDebugString(" found HWND, accessibilityEventMask now is %X", ati->accessibilityEventMask); + PrintDebugString("[INFO]: found HWND, accessibilityEventMask now is %X", ati->accessibilityEventMask); } else { globalEventMask |= ati->accessibilityEventMask; } ati = ati->nextATInstance; } - PrintDebugString(" union of all Accessibility AT event masks: %X", globalEventMask); + PrintDebugString("[INFO]: union of all Accessibility AT event masks: %X", globalEventMask); if (!(globalEventMask & type)) { // no other ATs wanted this event; // stop getting them from Java - PrintDebugString(" no other AT wanted this Accessibility event (so can remove); removing from AccessBridge.java"); + PrintDebugString("[INFO]: no other AT wanted this Accessibility event (so can remove); removing from AccessBridge.java"); windowsThreadEntryPoints->removeAccessibilityEventNotification(type); } } @@ -1711,13 +1714,13 @@ jobject event, jobject source, jint oldValue, jint newValue) { - PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyCaretChanged(%p, %p, %p, %p, %d, %d)", + PrintDebugString("[INFO]: Java_com_sun_java_accessibility_internal_AccessBridge_propertyCaretChanged(%p, %p, %p, %p, %d, %d)", env, callingObj, event, source, oldValue, newValue); // sanity check if (ATs == (AccessBridgeATInstance *) 0) { - PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); + PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)"); return; // panic! } @@ -1733,17 +1736,17 @@ while (ati != (AccessBridgeATInstance *) 0) { if (ati->accessibilityEventMask & cPropertyCaretChangeEvent) { - PrintDebugString(" sending to AT"); + PrintDebugString("[INFO]: sending to AT"); // make new GlobalRefs for this AT pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %p"\ + " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\ + " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource); #endif pkg->oldPosition = oldValue; @@ -1753,7 +1756,7 @@ } ati = ati->nextATInstance; } - PrintDebugString(" done with propertyCaretChange event"); + PrintDebugString("[INFO]: done with propertyCaretChange event"); } /** @@ -1765,13 +1768,13 @@ jobject event, jobject source, jstring oldValue, jstring newValue){ - PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyDescriptionChanged(%p, %p, %p, %p, %p, %p)", + PrintDebugString("[INFO]: Java_com_sun_java_accessibility_internal_AccessBridge_propertyDescriptionChanged(%p, %p, %p, %p, %p, %p)", env, callingObj, event, source, oldValue, newValue); // sanity check if (ATs == (AccessBridgeATInstance *) 0) { - PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); + PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)"); return; // panic! } @@ -1788,17 +1791,17 @@ while (ati != (AccessBridgeATInstance *) 0) { if (ati->accessibilityEventMask & cPropertyCaretChangeEvent) { - PrintDebugString(" sending to AT"); + PrintDebugString("[INFO]: sending to AT"); // make new GlobalRefs for this AT pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %p"\ + " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\ + " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource); #endif if (oldValue != (jstring) 0) { @@ -1839,7 +1842,7 @@ } ati = ati->nextATInstance; } - PrintDebugString(" done with propertyDescriptionChange event"); + PrintDebugString("[INFO]: done with propertyDescriptionChange event"); } /** @@ -1851,13 +1854,13 @@ jobject event, jobject source, jstring oldValue, jstring newValue){ - PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyNameChanged(%p, %p, %p, %p, %p, %p)", + PrintDebugString("[INFO]: Java_com_sun_java_accessibility_internal_AccessBridge_propertyNameChanged(%p, %p, %p, %p, %p, %p)", env, callingObj, event, source, oldValue, newValue); // sanity check if (ATs == (AccessBridgeATInstance *) 0) { - PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); + PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)"); return; // panic! } @@ -1874,17 +1877,17 @@ while (ati != (AccessBridgeATInstance *) 0) { if (ati->accessibilityEventMask & cPropertyNameChangeEvent) { - PrintDebugString(" sending to AT"); + PrintDebugString("[INFO]: sending to AT"); // make new GlobalRefs for this AT pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %p"\ + " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\ + " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource); #endif if (oldValue != (jstring) 0) { @@ -1925,7 +1928,7 @@ } ati = ati->nextATInstance; } - PrintDebugString(" done with propertyNameChange event"); + PrintDebugString("[INFO]: done with propertyNameChange event"); } @@ -1937,12 +1940,12 @@ JavaAccessBridge::firePropertySelectionChange(JNIEnv *env, jobject callingObj, jobject event, jobject source) { - PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertySelectionChanged(%p, %p, %p, %p)", + PrintDebugString("[INFO]: Java_com_sun_java_accessibility_internal_AccessBridge_propertySelectionChanged(%p, %p, %p, %p)", env, callingObj, event, source); // sanity check if (ATs == (AccessBridgeATInstance *) 0) { - PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); + PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)"); return; // panic! } @@ -1958,24 +1961,24 @@ while (ati != (AccessBridgeATInstance *) 0) { if (ati->accessibilityEventMask & cPropertySelectionChangeEvent) { - PrintDebugString(" sending to AT"); + PrintDebugString("[INFO]: sending to AT"); // make new GlobalRefs for this AT pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %p"\ + " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\ + " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource); #endif ati->sendAccessibilityEventPackage(buffer, sizeof(buffer), cPropertySelectionChangeEvent); } ati = ati->nextATInstance; } - PrintDebugString(" done with propertySelectionChange event"); + PrintDebugString("[INFO]: done with propertySelectionChange event"); } @@ -1988,13 +1991,13 @@ jobject event, jobject source, jstring oldValue, jstring newValue){ - PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyStateChanged(%p, %p, %p, %p, %p, %p)", + PrintDebugString("[INFO]: Java_com_sun_java_accessibility_internal_AccessBridge_propertyStateChanged(%p, %p, %p, %p, %p, %p)", env, callingObj, event, source, oldValue, newValue); // sanity check if (ATs == (AccessBridgeATInstance *) 0) { - PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); + PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)"); return; // panic! } @@ -2011,17 +2014,17 @@ while (ati != (AccessBridgeATInstance *) 0) { if (ati->accessibilityEventMask & cPropertyStateChangeEvent) { - PrintDebugString(" sending to AT"); + PrintDebugString("[INFO]: sending to AT"); // make new GlobalRefs for this AT pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %p"\ + " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\ + " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource); #endif if (oldValue != (jstring) 0) { @@ -2062,7 +2065,7 @@ } ati = ati->nextATInstance; } - PrintDebugString(" done with propertyStateChange event"); + PrintDebugString("[INFO]: done with propertyStateChange event"); } @@ -2074,12 +2077,12 @@ JavaAccessBridge::firePropertyTextChange(JNIEnv *env, jobject callingObj, jobject event, jobject source) { - PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyTextChanged(%p, %p, %p, %p)", + PrintDebugString("[INFO]: Java_com_sun_java_accessibility_internal_AccessBridge_propertyTextChanged(%p, %p, %p, %p)", env, callingObj, event, source); // sanity check if (ATs == (AccessBridgeATInstance *) 0) { - PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); + PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)"); return; // panic! } @@ -2095,24 +2098,24 @@ while (ati != (AccessBridgeATInstance *) 0) { if (ati->accessibilityEventMask & cPropertyTextChangeEvent) { - PrintDebugString(" sending to AT"); + PrintDebugString("[INFO]: sending to AT"); // make new GlobalRefs for this AT pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %p"\ + " GlobalRef'd Source: %p",pkg->Event, pkg->AccessibleContextSource); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\ + " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource); #endif ati->sendAccessibilityEventPackage(buffer, sizeof(buffer), cPropertyTextChangeEvent); } ati = ati->nextATInstance; } - PrintDebugString(" done with propertyTextChange event"); + PrintDebugString("[INFO]: done with propertyTextChange event"); } @@ -2125,13 +2128,13 @@ jobject event, jobject source, jstring oldValue, jstring newValue){ - PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyValueChanged(%p, %p, %p, %p, %p, %p)", + PrintDebugString("[INFO]: Java_com_sun_java_accessibility_internal_AccessBridge_propertyValueChanged(%p, %p, %p, %p, %p, %p)", env, callingObj, event, source, oldValue, newValue); // sanity check if (ATs == (AccessBridgeATInstance *) 0) { - PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); + PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)"); return; // panic! } @@ -2148,17 +2151,17 @@ while (ati != (AccessBridgeATInstance *) 0) { if (ati->accessibilityEventMask & cPropertyValueChangeEvent) { - PrintDebugString(" sending to AT"); + PrintDebugString("[INFO]: sending to AT"); // make new GlobalRefs for this AT pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %p"\ + " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\ + " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource); #endif if (oldValue != (jstring) 0) { @@ -2199,7 +2202,7 @@ } ati = ati->nextATInstance; } - PrintDebugString(" done with propertyValueChange event"); + PrintDebugString("[INFO]: done with propertyValueChange event"); } /** @@ -2210,12 +2213,12 @@ JavaAccessBridge::firePropertyVisibleDataChange(JNIEnv *env, jobject callingObj, jobject event, jobject source) { - PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyVisibleDataChanged(%p, %p, %p, %p)", + PrintDebugString("[INFO]: Java_com_sun_java_accessibility_internal_AccessBridge_propertyVisibleDataChanged(%p, %p, %p, %p)", env, callingObj, event, source); // sanity check if (ATs == (AccessBridgeATInstance *) 0) { - PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); + PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)"); return; // panic! } @@ -2231,24 +2234,24 @@ while (ati != (AccessBridgeATInstance *) 0) { if (ati->accessibilityEventMask & cPropertyVisibleDataChangeEvent) { - PrintDebugString(" sending to AT"); + PrintDebugString("[INFO]: sending to AT"); // make new GlobalRefs for this AT pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %p"\ + " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\ + " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource); #endif ati->sendAccessibilityEventPackage(buffer, sizeof(buffer), cPropertyVisibleDataChangeEvent); } ati = ati->nextATInstance; } - PrintDebugString(" done with propertyVisibleDataChange event"); + PrintDebugString("[INFO]: done with propertyVisibleDataChange event"); } @@ -2261,13 +2264,13 @@ jobject event, jobject source, jobject oldValue, jobject newValue){ - PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyChildPropertyChanged(%p, %p, %p, %p, %p, %p)", + PrintDebugString("[INFO]: Java_com_sun_java_accessibility_internal_AccessBridge_propertyChildPropertyChanged(%p, %p, %p, %p, %p, %p)", env, callingObj, event, source, oldValue, newValue); // sanity check if (ATs == (AccessBridgeATInstance *) 0) { - PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); + PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)"); return; // panic! } @@ -2283,7 +2286,7 @@ while (ati != (AccessBridgeATInstance *) 0) { if (ati->accessibilityEventMask & cPropertyChildChangeEvent) { - PrintDebugString(" sending to AT"); + PrintDebugString("[INFO]: sending to AT"); // make new GlobalRefs for this AT pkg->Event = (JOBJECT64)env->NewGlobalRef(event); @@ -2291,22 +2294,24 @@ pkg->oldChildAccessibleContext = (JOBJECT64)env->NewGlobalRef(oldValue); pkg->newChildAccessibleContext = (JOBJECT64)env->NewGlobalRef(newValue); #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); - PrintDebugString(" GlobalRef'd OldChildAC: %p", pkg->oldChildAccessibleContext); - PrintDebugString(" GlobalRef'd NewChildAC: %p", pkg->newChildAccessibleContext); + PrintDebugString("[INFO]: GlobalRef'd Event: %p"\ + " GlobalRef'd Source: %p"\ + " GlobalRef'd OldChildAC: %p"\ + " GlobalRef'd NewChildAC: %p"\ + , pkg->Event, pkg->AccessibleContextSource, pkg->oldChildAccessibleContext, pkg->newChildAccessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); - PrintDebugString(" GlobalRef'd OldChildAC: %016I64X", pkg->oldChildAccessibleContext); - PrintDebugString(" GlobalRef'd NewChildAC: %016I64X", pkg->newChildAccessibleContext); + PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\ + " GlobalRef'd Source: %016I64X"\ + " GlobalRef'd OldChildAC: %016I64X"\ + " GlobalRef'd NewChildAC: %016I64X"\ + , pkg->Event, pkg->AccessibleContextSource, pkg->oldChildAccessibleContext, pkg->newChildAccessibleContext); #endif ati->sendAccessibilityEventPackage(buffer, sizeof(buffer), cPropertyChildChangeEvent); } ati = ati->nextATInstance; } - PrintDebugString(" done with propertyChildChange event"); + PrintDebugString("[INFO]: done with propertyChildChange event"); } @@ -2319,13 +2324,13 @@ jobject event, jobject source, jobject oldValue, jobject newValue){ - PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyActiveDescendentPropertyChanged(%p, %p, %p, %p, %p, %p)", + PrintDebugString("[INFO]: Java_com_sun_java_accessibility_internal_AccessBridge_propertyActiveDescendentPropertyChanged(%p, %p, %p, %p, %p, %p)", env, callingObj, event, source, oldValue, newValue); // sanity check if (ATs == (AccessBridgeATInstance *) 0) { - PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); + PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)"); return; // panic! } @@ -2341,7 +2346,7 @@ while (ati != (AccessBridgeATInstance *) 0) { if (ati->accessibilityEventMask & cPropertyActiveDescendentChangeEvent) { - PrintDebugString(" sending to AT"); + PrintDebugString("[INFO]: sending to AT"); // make new GlobalRefs for this AT pkg->Event = (JOBJECT64)env->NewGlobalRef(event); @@ -2349,22 +2354,24 @@ pkg->oldActiveDescendentAccessibleContext = (JOBJECT64)env->NewGlobalRef(oldValue); pkg->newActiveDescendentAccessibleContext = (JOBJECT64)env->NewGlobalRef(newValue); #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); - PrintDebugString(" GlobalRef'd OldActiveDescendentAC: %p", pkg->oldActiveDescendentAccessibleContext); - PrintDebugString(" GlobalRef'd NewActiveDescendentAC: %p", pkg->newActiveDescendentAccessibleContext); + PrintDebugString("[INFO]: GlobalRef'd Event: %p"\ + " GlobalRef'd Source: %p"\ + " GlobalRef'd OldActiveDescendentAC: %p"\ + " GlobalRef'd NewActiveDescendentAC: %p"\ + , pkg->Event, pkg->AccessibleContextSource, pkg->oldActiveDescendentAccessibleContext, pkg->newActiveDescendentAccessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); - PrintDebugString(" GlobalRef'd OldActiveDescendentAC: %016I64X", pkg->oldActiveDescendentAccessibleContext); - PrintDebugString(" GlobalRef'd NewActiveDescendentAC: %016I64X", pkg->newActiveDescendentAccessibleContext); + PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\ + " GlobalRef'd Source: %016I64X"\ + " GlobalRef'd OldActiveDescendentAC: %016I64X"\ + " GlobalRef'd NewActiveDescendentAC: %016I64X"\ + , pkg->Event, pkg->AccessibleContextSource, pkg->oldActiveDescendentAccessibleContext, pkg->newActiveDescendentAccessibleContext); #endif ati->sendAccessibilityEventPackage(buffer, sizeof(buffer), cPropertyActiveDescendentChangeEvent); } ati = ati->nextATInstance; } - PrintDebugString(" done with propertyActiveChange event"); + PrintDebugString("[INFO]: done with propertyActiveChange event"); } /** @@ -2376,13 +2383,13 @@ jobject event, jobject source, jstring oldValue, jstring newValue){ - PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyTableModelChange(%p, %p, %p, %p, %p, %p)", + PrintDebugString("[INFO]: Java_com_sun_java_accessibility_internal_AccessBridge_propertyTableModelChange(%p, %p, %p, %p, %p, %p)", env, callingObj, event, source, oldValue, newValue); // sanity check if (ATs == (AccessBridgeATInstance *) 0) { - PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); + PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)"); return; // panic! } @@ -2405,11 +2412,11 @@ pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %p"\ + " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); - PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\ + " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource); #endif if (oldValue != (jstring) 0) { @@ -2450,31 +2457,31 @@ } ati = ati->nextATInstance; } - PrintDebugString(" done with propertyTableModelChange event"); + PrintDebugString("[INFO]: done with propertyTableModelChange event"); } #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #define PRINT_GLOBALREFS() \ - PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); \ - PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %p"\ + " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource); #else // JOBJECT64 is jlong (64 bit) #define PRINT_GLOBALREFS() \ - PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); \ - PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); + PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\ + " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource); #endif #define FIRE_EVENT(function, packageStruct, packageConstant, eventConstant) \ void JavaAccessBridge::function(JNIEnv *env, jobject callingObj, \ jobject eventObj, jobject source) { \ \ - PrintDebugString("\r\nFiring event id = %d(%p, %p, %p, %p); vmID = %X", \ - eventConstant, env, callingObj, eventObj, source, dialogWindow); \ + PrintDebugString("[INFO]: Firing event id = %d(%p, %p, %p, %p); vmID = %X", \ + eventConstant, env, callingObj, eventObj, source, dialogWindow);\ \ /* sanity check */ \ if (ATs == (AccessBridgeATInstance *) 0) { \ - PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); \ + PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)"); \ return; /* panic! */ \ } \ \ @@ -2488,11 +2495,11 @@ /* make new Global Refs, send events only to those ATs that want 'em */ \ AccessBridgeATInstance *ati = ATs; \ while (ati != (AccessBridgeATInstance *) 0) { \ - PrintDebugString("\r\njavaEventMask = %X eventConstant=%d pkg->vmID=%X", \ + PrintDebugString("[INFO]: javaEventMask = %X eventConstant=%d pkg->vmID=%X",\ ati->javaEventMask, eventConstant, pkg->vmID ); \ if (ati->javaEventMask & eventConstant) { \ \ - PrintDebugString(" sending to AT"); \ + PrintDebugString("[INFO]: sending to AT"); \ /* make new GlobalRefs for this AT */ \ pkg->Event = (JOBJECT64)env->NewGlobalRef(eventObj); \ pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); \ @@ -2502,17 +2509,17 @@ } \ ati = ati->nextATInstance; \ } \ - PrintDebugString(" done with firing AWT event"); \ + PrintDebugString("[INFO]: done with firing AWT event"); \ } void JavaAccessBridge::javaShutdown(JNIEnv *env, jobject callingObj) { - PrintDebugString("\r\nFiring event id = %d(%p, %p); vmID = %X", + PrintDebugString("[INFO]: Firing event id = %d(%p, %p); vmID = %X", cJavaShutdownEvent, env, callingObj, dialogWindow); /* sanity check */ if (ATs == (AccessBridgeATInstance *) 0) { - PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); + PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)"); return; /* panic! */ } @@ -2527,12 +2534,12 @@ AccessBridgeATInstance *ati = ATs; while (ati != (AccessBridgeATInstance *) 0) { if (ati->javaEventMask & cJavaShutdownEvent) { - PrintDebugString(" sending to AT"); + PrintDebugString("[INFO]: sending to AT"); ati->sendJavaEventPackage(buffer, sizeof(buffer), cJavaShutdownEvent); } ati = ati->nextATInstance; } - PrintDebugString(" done with firing AWT event"); + PrintDebugString("[INFO]: done with firing AWT event"); } FIRE_EVENT(fireFocusGained, FocusGainedPackage, cFocusGainedPackage, cFocusGainedEvent) --- old/src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeEventHandler.cpp 2018-12-11 16:50:36.147925200 +0530 +++ new/src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeEventHandler.cpp 2018-12-11 16:50:29.826126000 +0530 @@ -170,7 +170,7 @@ if (propertyChangeFP != (AccessBridge_PropertyChangeFP) 0) { propertyChangeFP(vmID, event, source, property, oldName, newName); } else { - DEBUG_CODE(AppendToCallInfo(" Error! propertyChangeFP == 0\r\n")); + DEBUG_CODE(AppendToCallInfo("[ERROR]: propertyChangeFP == 0")); } } @@ -186,9 +186,9 @@ * */ #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) -const char fireEventDebugString[] = "\r\nIn AccessBridgeEventHandler::%s(%p, %p); vmID = %X\r\n"; +const char fireEventDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s(%p, %p); vmID = %X\r\n"; #else // JOBJECT64 is jlong (64 bit) -const char fireEventDebugString[] = "\r\nIn AccessBridgeEventHandler::%s(%016I64X, %016I64X); vmID = %X\r\n"; +const char fireEventDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s(%016I64X, %016I64X); vmID = %X\r\n"; #endif #define FIRE_EVENT(method, FPprototype, eventFP) \ @@ -199,18 +199,18 @@ if (eventFP != (FPprototype) 0) { \ eventFP(vmID, event, source); \ } else { \ - DEBUG_CODE(AppendToCallInfo(" Error! eventFP == 0\r\n")); \ + DEBUG_CODE(AppendToCallInfo("[ERROR]: eventFP == 0")); \ } \ } void AccessBridgeEventHandler::fireJavaShutdown(long vmID) { DEBUG_CODE(char debugBuf[255]); - DEBUG_CODE(sprintf(debugBuf, "\r\nCalling fireJavaShutdown; vmID = %X\r\n", vmID)); + DEBUG_CODE(sprintf(debugBuf, "[INFO]: Calling fireJavaShutdown; vmID = %X\r\n", vmID)); DEBUG_CODE(AppendToCallInfo(debugBuf)); if (javaShutdownFP != (AccessBridge_JavaShutdownFP) 0) { javaShutdownFP(vmID); } else { - DEBUG_CODE(AppendToCallInfo(" Error! javaShutdownFP == 0\r\n")); + DEBUG_CODE(AppendToCallInfo("[ERROR]: javaShutdownFP == 0")); } } @@ -241,9 +241,9 @@ * */ #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) -const char firePropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%s, Firing a no-param property change (%p, %p):\r\n"; +const char firePropertyChangeDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s, Firing a no-param property change (%p, %p):\r\n"; #else // JOBJECT64 is jlong (64 bit) -const char firePropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%s, Firing a no-param property change (%016I64X, %016I64X):\r\n"; +const char firePropertyChangeDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s, Firing a no-param property change (%016I64X, %016I64X):\r\n"; #endif #define FIRE_PROPERTY_CHANGE(method, FPprototype, eventFP) \ @@ -254,7 +254,7 @@ if (eventFP != (FPprototype) 0) { \ eventFP(vmID, event, source); \ } else { \ - DEBUG_CODE(AppendToCallInfo(" Error! eventFP == 0\r\n")); \ + DEBUG_CODE(AppendToCallInfo("[ERROR]: eventFP == 0")); \ } \ } @@ -269,9 +269,9 @@ * */ #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) -const char fireStringPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%s, Firing a string property change (%p, %p, %ls, %ls):\r\n"; +const char fireStringPropertyChangeDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s, Firing a string property change (%p, %p, %ls, %ls):\r\n"; #else // JOBJECT64 is jlong (64 bit) -const char fireStringPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%s, Firing a string property change (%016I64X, %016I64X, %ls, %ls):\r\n"; +const char fireStringPropertyChangeDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s, Firing a string property change (%016I64X, %016I64X, %ls, %ls):\r\n"; #endif #define FIRE_STRING_PROPERTY_CHANGE(method, FPprototype, eventFP, oldValue, newValue) \ @@ -283,7 +283,7 @@ if (eventFP != (FPprototype) 0) { \ eventFP(vmID, event, source, oldValue, newValue); \ } else { \ - DEBUG_CODE(AppendToCallInfo(" Error! eventFP == 0\r\n")); \ + DEBUG_CODE(AppendToCallInfo("[ERROR]: eventFP == 0\r\n")); \ } \ } @@ -298,9 +298,9 @@ * */ #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) -const char fireIntPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%s, Firing an int property change (%p, %p, %d, %d):\r\n"; +const char fireIntPropertyChangeDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s, Firing an int property change (%p, %p, %d, %d):\r\n"; #else // JOBJECT64 is jlong (64 bit) -const char fireIntPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%s, Firing an int property change (%016I64X, %016I64X, %d, %d):\r\n"; +const char fireIntPropertyChangeDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s, Firing an int property change (%016I64X, %016I64X, %d, %d):\r\n"; #endif #define FIRE_INT_PROPERTY_CHANGE(method, FPprototype, eventFP) \ @@ -312,7 +312,7 @@ if (eventFP != (FPprototype) 0) { \ eventFP(vmID, event, source, oldValue, newValue); \ } else { \ - DEBUG_CODE(AppendToCallInfo(" Error! eventFP == 0\r\n")); \ + DEBUG_CODE(AppendToCallInfo("[ERROR]: eventFP == 0\r\n")); \ } \ } @@ -327,9 +327,9 @@ * */ #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) -const char fireACPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%s, Firing an AC property change (%p, %p, %p, %p):\r\n"; +const char fireACPropertyChangeDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s, Firing an AC property change (%p, %p, %p, %p):\r\n"; #else // JOBJECT64 is jlong (64 bit) -const char fireACPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%s, Firing an AC property change (%016I64X, %016I64X, %016I64X, %016I64X):\r\n"; +const char fireACPropertyChangeDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s, Firing an AC property change (%016I64X, %016I64X, %016I64X, %016I64X):\r\n"; #endif #define FIRE_AC_PROPERTY_CHANGE(method, FPprototype, eventFP) \ @@ -341,7 +341,7 @@ if (eventFP != (FPprototype) 0) { \ eventFP(vmID, event, source, oldValue, newValue); \ } else { \ - DEBUG_CODE(AppendToCallInfo(" Error! eventFP == 0\r\n")); \ + DEBUG_CODE(AppendToCallInfo("[ERROR]: eventFP == 0\r\n")); \ } \ } --- old/src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeJavaVMInstance.cpp 2018-12-11 16:50:55.620696400 +0530 +++ new/src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeJavaVMInstance.cpp 2018-12-11 16:50:51.666182800 +0530 @@ -198,8 +198,8 @@ toCopy.cbData = bufsize; toCopy.lpData = buffer; - PrintDebugString("In AccessBridgeVMInstance::sendPackage"); - PrintDebugString(" javaAccessBridgeWindow: %p", javaAccessBridgeWindow); + PrintDebugString("[INFO]: In AccessBridgeVMInstance::sendPackage"); + PrintDebugString("[INFO]: javaAccessBridgeWindow: %p", javaAccessBridgeWindow); /* This was SendMessage. Normally that is a blocking call. However, if * SendMessage is sent to another process, e.g. another JVM and an incoming * SendMessage is pending, control will be passed to the DialogProc to handle @@ -280,7 +280,7 @@ char *done = &memoryMappedView[bufsize]; *done = 0; - PrintDebugString(" javaAccessBridgeWindow: %p", javaAccessBridgeWindow); + PrintDebugString("[INFO]: javaAccessBridgeWindow: %p", javaAccessBridgeWindow); // See the comment above the call to SendMessageTimeout in SendPackage method above. UINT flags = SMTO_BLOCK | SMTO_NOTIMEOUTIFNOTHUNG; DWORD_PTR out; // not used @@ -309,7 +309,7 @@ */ HWND AccessBridgeJavaVMInstance::findAccessBridgeWindow(long javaVMID) { - PrintDebugString("In findAccessBridgeWindow"); + PrintDebugString("[INFO]: In findAccessBridgeWindow"); // no need to recurse really if (vmID == javaVMID) { return javaAccessBridgeWindow; @@ -338,7 +338,7 @@ */ AccessBridgeJavaVMInstance * AccessBridgeJavaVMInstance::findABJavaVMInstanceFromJavaHWND(HWND window) { - PrintDebugString("In findABJavaInstanceFromJavaHWND"); + PrintDebugString("[INFO]: In findABJavaInstanceFromJavaHWND"); // no need to recurse really if (javaAccessBridgeWindow == window) { return this; --- old/src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeMessageQueue.cpp 2018-12-11 16:51:18.577730700 +0530 +++ new/src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeMessageQueue.cpp 2018-12-11 16:51:15.206769700 +0530 @@ -84,17 +84,17 @@ */ QueueReturns AccessBridgeMessageQueue::add(AccessBridgeQueueElement *element) { - PrintDebugString(" in AccessBridgeMessageQueue::add()"); - PrintDebugString(" queue size = %d", size); + PrintDebugString("[INFO]: in AccessBridgeMessageQueue::add()"); + PrintDebugString("[INFO]: queue size = %d", size); QueueReturns returnVal = cElementPushedOK; if (queueLocked) { - PrintDebugString(" queue was locked; returning cQueueInUse!"); + PrintDebugString("[WARN]: queue was locked; returning cQueueInUse!"); return cQueueInUse; } queueLocked = TRUE; { - PrintDebugString(" adding element to queue!"); + PrintDebugString("[INFO]: adding element to queue!"); if (end == (AccessBridgeQueueElement *) 0) { if (start == (AccessBridgeQueueElement *) 0 && size == 0) { start = element; @@ -114,7 +114,7 @@ } } queueLocked = FALSE; - PrintDebugString(" returning from AccessBridgeMessageQueue::add()"); + PrintDebugString("[INFO]: returning from AccessBridgeMessageQueue::add()"); return returnVal; } @@ -125,17 +125,17 @@ */ QueueReturns AccessBridgeMessageQueue::remove(AccessBridgeQueueElement **element) { - PrintDebugString(" in AccessBridgeMessageQueue::remove()"); - PrintDebugString(" queue size = %d", size); + PrintDebugString("[INFO]: in AccessBridgeMessageQueue::remove()"); + PrintDebugString("[INFO]: queue size = %d", size); QueueReturns returnVal = cMoreMessages; if (queueLocked) { - PrintDebugString(" queue was locked; returning cQueueInUse!"); + PrintDebugString("[WARN]: queue was locked; returning cQueueInUse!"); return cQueueInUse; } queueLocked = TRUE; { - PrintDebugString(" removing element from queue!"); + PrintDebugString("[INFO]: removing element from queue!"); if (size > 0) { if (start != (AccessBridgeQueueElement *) 0) { *element = start; @@ -157,7 +157,7 @@ } } queueLocked = FALSE; - PrintDebugString(" returning from AccessBridgeMessageQueue::remove()"); + PrintDebugString("[INFO]: returning from AccessBridgeMessageQueue::remove()"); return returnVal; } --- old/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp 2018-12-11 16:51:43.461888600 +0530 +++ new/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp 2018-12-11 16:51:39.201561300 +0530 @@ -76,7 +76,7 @@ // Remind user later that a new JVM was installed case cRemindThereIsNewJVM: - PrintDebugString(" newJVMDialogProc: cRemindThereIsNewJVM"); + PrintDebugString("[INFO]: newJVMDialogProc: cRemindThereIsNewJVM"); // do nothing EndDialog(hwndDlg, wParam); return TRUE; @@ -130,13 +130,14 @@ switch (fdwReason) { case DLL_PROCESS_ATTACH: // A Windows executable loaded us - PrintDebugString("DLL_PROCESS_ATTACH"); + initializeFileLogger("_windows_access_bridge"); + PrintDebugString("[INFO]: DLL_PROCESS_ATTACH"); theWindowsAccessBridge = new WinAccessBridge(hinstDll); break; case DLL_PROCESS_DETACH: // A Windows executable unloaded us if (theWindowsAccessBridge != (WinAccessBridge *) 0) { - PrintDebugString("*** AccessBridgeDialogProc -> deleting theWindowsAccessBridge"); + PrintDebugString("[INFO]: *** AccessBridgeDialogProc -> deleting theWindowsAccessBridge"); delete theWindowsAccessBridge; } break; @@ -173,15 +174,15 @@ switch (message) { case WM_INITDIALOG: - PrintDebugString("AccessBridgeDialogProc -> Initializing"); + PrintDebugString("[INFO]: AccessBridgeDialogProc -> Initializing"); break; // call from Java with data for us to deliver case WM_COPYDATA: if (theDialogWindow == (HWND) wParam) { - PrintDebugString("AccessBridgeDialogProc -> Got WM_COPYDATA from Java Bridge DLL"); + PrintDebugString("[INFO]: AccessBridgeDialogProc -> Got WM_COPYDATA from Java Bridge DLL"); } else { - PrintDebugString("AccessBridgeDialogProc -> Got WM_COPYDATA from HWND %p", wParam); + PrintDebugString("[INFO]: AccessBridgeDialogProc -> Got WM_COPYDATA from HWND %p", wParam); sentToUs = (COPYDATASTRUCT *) lParam; package = (char *) sentToUs->lpData; theWindowsAccessBridge->preProcessPackage(package, sentToUs->cbData); @@ -190,7 +191,7 @@ // message to ourselves -> de-queue messages and send 'em case AB_MESSAGE_QUEUED: - PrintDebugString("AccessBridgeDialogProc -> Got AB_MESSAGE_QUEUED from ourselves"); + PrintDebugString("[INFO]: AccessBridgeDialogProc -> Got AB_MESSAGE_QUEUED from ourselves"); theWindowsAccessBridge->receiveAQueuedPackage(); break; @@ -214,12 +215,12 @@ // to the message queue. That would delay the destruction of the instance // until the chain is not being traversed. case AB_DLL_GOING_AWAY: - PrintDebugString("***** AccessBridgeDialogProc -> Got AB_DLL_GOING_AWAY message"); + PrintDebugString("[INFO]: ***** AccessBridgeDialogProc -> Got AB_DLL_GOING_AWAY message"); if (isVMInstanceChainInUse) { - PrintDebugString(" javaVMs chain in use, calling PostMessage"); + PrintDebugString("[INFO]: javaVMs chain in use, calling PostMessage"); PostMessage(hDlg, AB_DLL_GOING_AWAY, wParam, (LPARAM)0); } else { - PrintDebugString(" calling javaVMDestroyed"); + PrintDebugString("[INFO]: calling javaVMDestroyed"); theWindowsAccessBridge->JavaVMDestroyed((HWND) wParam); } break; @@ -228,7 +229,7 @@ // the JavaVM is saying "hi"! // wParam == sourceHwnd; lParam == JavaVMID if (message == theFromJavaHelloMsgID) { - PrintDebugString("AccessBridgeDialogProc -> Got theFromJavaHelloMsgID; wParam = %p, lParam = %p", wParam, lParam); + PrintDebugString("[INFO]: AccessBridgeDialogProc -> Got theFromJavaHelloMsgID; wParam = %p, lParam = %p", wParam, lParam); theWindowsAccessBridge->rendezvousWithNewJavaDLL((HWND) wParam, (long ) lParam); } break; @@ -250,7 +251,7 @@ */ WinAccessBridge::WinAccessBridge(HINSTANCE hInstance) { - PrintDebugString("WinAccessBridge ctor"); + PrintDebugString("[INFO]: WinAccessBridge ctor"); // IntializeCriticalSection should only be called once. InitializeCriticalSection(&sendMemoryIPCLock); @@ -276,25 +277,25 @@ // -> shut down all event listening // -> release all objects held in the JVM by us - PrintDebugString("*****in WinAccessBridge::~WinAccessBridge()"); + PrintDebugString("[INFO]: *****in WinAccessBridge::~WinAccessBridge()"); // send a broadcast msg.; let other AccessBridge DLLs know we're going away AccessBridgeJavaVMInstance *current = javaVMs; while (current != (AccessBridgeJavaVMInstance *) 0) { - PrintDebugString(" telling %p we're going away", current->javaAccessBridgeWindow); + PrintDebugString("[INFO]: telling %p we're going away", current->javaAccessBridgeWindow); SendMessage(current->javaAccessBridgeWindow, AB_DLL_GOING_AWAY, (WPARAM) dialogWindow, (LPARAM) 0); current = current->nextJVMInstance; } - PrintDebugString(" finished telling JVMs about our demise"); + PrintDebugString("[INFO]: finished telling JVMs about our demise"); delete eventHandler; delete messageQueue; delete javaVMs; - PrintDebugString(" finished deleting eventHandler, messageQueue, and javaVMs"); - PrintDebugString("GOODBYE CRUEL WORLD..."); + PrintDebugString("[INFO]: finished deleting eventHandler, messageQueue, and javaVMs"); + PrintDebugString("[INFO]: GOODBYE CRUEL WORLD..."); DestroyWindow(theDialogWindow); } @@ -338,7 +339,7 @@ WinAccessBridge::rendezvousWithNewJavaDLL(HWND JavaBridgeDLLwindow, long vmID) { LRESULT returnVal; - PrintDebugString("in WinAccessBridge::rendezvousWithNewJavaDLL(%p, %X)", + PrintDebugString("[INFO]: in WinAccessBridge::rendezvousWithNewJavaDLL(%p, %X)", JavaBridgeDLLwindow, vmID); isVMInstanceChainInUse = true; @@ -354,23 +355,23 @@ long javaEventMask = eventHandler->getJavaEventMask(); long accessibilityEventMask = eventHandler->getAccessibilityEventMask(); - PrintDebugString(" Setting Java event mask to: %X", javaEventMask); + PrintDebugString("[INFO]: Setting Java event mask to: %X", javaEventMask); if (javaEventMask != 0) { addJavaEventNotification(javaEventMask); } - PrintDebugString(" Setting Accessibility event mask to: %X", accessibilityEventMask); + PrintDebugString("[INFO]: Setting Accessibility event mask to: %X", accessibilityEventMask); if (accessibilityEventMask != 0) { addAccessibilityEventNotification(accessibilityEventMask); } } else { - PrintDebugString(" ERROR: Failed to initiate IPC with newly created JavaVM!!!"); + PrintDebugString("[ERROR]: Failed to initiate IPC with newly created JavaVM!!!"); return FALSE; } - PrintDebugString(" Success!! We rendezvoused with the JavaDLL"); + PrintDebugString("[INFO]: Success!! We rendezvoused with the JavaDLL"); return returnVal; } @@ -421,7 +422,7 @@ return FALSE; } } else { - PrintDebugString("ERROR sending memory package: couldn't find destWindow"); + PrintDebugString("[ERROR]: sending memory package: couldn't find destWindow"); return FALSE; } return TRUE; @@ -434,7 +435,7 @@ */ BOOL WinAccessBridge::queuePackage(char *buffer, long bufsize) { - PrintDebugString(" in WinAccessBridge::queuePackage(%p, %d)", buffer, bufsize); + PrintDebugString("[INFO]: in WinAccessBridge::queuePackage(%p, %d)", buffer, bufsize); AccessBridgeQueueElement *element = new AccessBridgeQueueElement(buffer, bufsize); @@ -454,37 +455,37 @@ WinAccessBridge::receiveAQueuedPackage() { AccessBridgeQueueElement *element = NULL; - PrintDebugString("in WinAccessBridge::receiveAQueuedPackage()"); + PrintDebugString("[INFO]: in WinAccessBridge::receiveAQueuedPackage()"); // ensure against re-entrancy problems... if (messageQueue->getRemoveLockSetting() == FALSE) { messageQueue->setRemoveLock(TRUE); - PrintDebugString(" dequeueing message"); + PrintDebugString("[INFO]: dequeueing message"); QueueReturns result = messageQueue->remove(&element); switch (result) { case cQueueBroken: - PrintDebugString(" ERROR!!! Queue seems to be broken!"); + PrintDebugString("[ERROR]: Queue seems to be broken!"); messageQueue->setRemoveLock(FALSE); return FALSE; case cMoreMessages: case cQueueEmpty: if (element != (AccessBridgeQueueElement *) 0) { - PrintDebugString(" found one; sending it!"); + PrintDebugString("[INFO]: found one; sending it!"); processPackage(element->buffer, element->bufsize); delete element; } else { - PrintDebugString(" ODD... element == 0!"); + PrintDebugString("[WARN]: ODD... element == 0!"); return FALSE; } break; case cQueueInUse: - PrintDebugString(" Queue in use, will try again later..."); + PrintDebugString("[WARN]: Queue in use, will try again later..."); PostMessage(dialogWindow, AB_MESSAGE_QUEUED, (WPARAM) 0, (LPARAM) 0); break; @@ -493,7 +494,7 @@ return FALSE; // should never get something we don't recognize! } } else { - PrintDebugString(" unable to dequeue message; remove lock is set"); + PrintDebugString("[WARN]: unable to dequeue message; remove lock is set"); PostMessage(dialogWindow, AB_MESSAGE_QUEUED, (WPARAM) 0, (LPARAM) 0); // Fix for 6995891 } @@ -510,13 +511,13 @@ */ void WinAccessBridge::preProcessPackage(char *buffer, long bufsize) { - PrintDebugString("PreProcessing package sent from Java:"); + PrintDebugString("[INFO]: PreProcessing package sent from Java:"); PackageType *type = (PackageType *) buffer; switch (*type) { - PrintDebugString(" type == %X", *type); + PrintDebugString("[INFO]: type == %X", *type); // event packages all get queued for later handling //case cPropertyChangePackage: @@ -555,11 +556,11 @@ // perhaps there will be some other packages to process at some point... // default: - PrintDebugString(" processing FAILED!! -> don't know how to handle type = %X", *type); + PrintDebugString("[ERROR]: processing FAILED!! -> don't know how to handle type = %X", *type); break; } - PrintDebugString(" package preprocessing completed"); + PrintDebugString("[INFO]: package preprocessing completed"); } @@ -568,12 +569,12 @@ if (bufsize == sizeof(PackageType) + sizeof(eventPackage)) { \ eventPackage *pkg = \ (eventPackage *) (buffer + sizeof(PackageType)); \ - PrintDebugString(" begin callback to AT, type == %X", *type); \ + PrintDebugString("[INFO]: begin callback to AT, type == %X", *type); \ theWindowsAccessBridge->eventHandler->fireEventMethod( \ pkg->vmID, pkg->Event, pkg->AccessibleContextSource); \ - PrintDebugString(" event callback complete!"); \ + PrintDebugString("[INFO]: event callback complete!"); \ } else { \ - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", \ + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", \ bufsize, sizeof(PackageType) + sizeof(eventPackage)); \ } \ break; @@ -583,13 +584,13 @@ if (bufsize == sizeof(PackageType) + sizeof(eventPackage)) { \ eventPackage *pkg = \ (eventPackage *) (buffer + sizeof(PackageType)); \ - PrintDebugString(" begin callback to AT, type == %X", *type); \ + PrintDebugString("[INFO]: begin callback to AT, type == %X", *type); \ theWindowsAccessBridge->eventHandler->fireEventMethod( \ pkg->vmID, pkg->Event, pkg->AccessibleContextSource, \ pkg->oldValue, pkg->newValue); \ - PrintDebugString(" event callback complete!"); \ + PrintDebugString("[INFO]: event callback complete!"); \ } else { \ - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", \ + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", \ bufsize, sizeof(PackageType) + sizeof(eventPackage)); \ } \ break; @@ -599,13 +600,13 @@ if (bufsize == sizeof(PackageType) + sizeof(eventPackage)) { \ eventPackage *pkg = \ (eventPackage *) (buffer + sizeof(PackageType)); \ - PrintDebugString(" begin callback to AT, type == %X", *type); \ + PrintDebugString("[INFO]: begin callback to AT, type == %X", *type); \ theWindowsAccessBridge->eventHandler->fireEventMethod( \ pkg->vmID, pkg->Event, pkg->AccessibleContextSource, \ pkg->oldValue, pkg->newValue); \ - PrintDebugString(" event callback complete!"); \ + PrintDebugString("[INFO]: event callback complete!"); \ } else { \ - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", \ + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", \ bufsize, sizeof(PackageType) + sizeof(eventPackage)); \ } \ break; @@ -617,24 +618,24 @@ */ void WinAccessBridge::processPackage(char *buffer, long bufsize) { - PrintDebugString("WinAccessBridge::Processing package sent from Java:"); + PrintDebugString("[INFO]: WinAccessBridge::Processing package sent from Java:"); PackageType *type = (PackageType *) buffer; switch (*type) { - PrintDebugString(" type == %X", *type); + PrintDebugString("[INFO]: type == %X", *type); case cJavaShutdownPackage: - PrintDebugString(" type == cJavaShutdownPackage"); + PrintDebugString("[INFO]: type == cJavaShutdownPackage"); if (bufsize == sizeof(PackageType) + sizeof(JavaShutdownPackage)) { JavaShutdownPackage *pkg = (JavaShutdownPackage *) (buffer + sizeof(PackageType)); theWindowsAccessBridge->eventHandler->fireJavaShutdown(pkg->vmID); - PrintDebugString(" event callback complete!"); - PrintDebugString(" event fired!"); + PrintDebugString("[INFO]: event callback complete!"); + PrintDebugString("[INFO]: event fired!"); } else { - PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", + PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", bufsize, sizeof(PackageType) + sizeof(JavaShutdownPackage)); } break; @@ -698,11 +699,11 @@ default: - PrintDebugString(" processing FAILED!! -> don't know how to handle type = %X", *type); + PrintDebugString("[ERROR]: processing FAILED!! -> don't know how to handle type = %X", *type); break; } - PrintDebugString(" package processing completed"); + PrintDebugString("[INFO]: package processing completed"); } @@ -710,7 +711,7 @@ void WinAccessBridge::JavaVMDestroyed(HWND VMBridgeDLLWindow) { - PrintDebugString("***** WinAccessBridge::JavaVMDestroyed(%p)", VMBridgeDLLWindow); + PrintDebugString("[INFO]: ***** WinAccessBridge::JavaVMDestroyed(%p)", VMBridgeDLLWindow); if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { return; @@ -723,7 +724,7 @@ javaVMs = javaVMs->nextJVMInstance; delete currentVM; - PrintDebugString(" data structures successfully removed"); + PrintDebugString("[INFO]: data structures successfully removed"); // [[[FIXME]]] inform Windows AT that a JVM went away, // and that any jobjects it's got lying around for that JVM @@ -735,7 +736,7 @@ previousVM->nextJVMInstance = currentVM->nextJVMInstance; delete currentVM; - PrintDebugString(" data structures successfully removed"); + PrintDebugString("[INFO]: data structures successfully removed"); // [[[FIXME]]] inform Windows AT that a JVM went away, // and that any jobjects it's got lying around for that JVM @@ -747,7 +748,7 @@ currentVM = currentVM->nextJVMInstance; } } - PrintDebugString(" ERROR!! couldn't find matching data structures!"); + PrintDebugString("[ERROR]: couldn't find matching data structures!"); } isVMInstanceChainInUse = false; } @@ -765,9 +766,9 @@ void WinAccessBridge::releaseJavaObject(long vmID, JOBJECT64 object) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::releaseJavaObject(%X, %p)", vmID, object); + PrintDebugString("[INFO]: WinAccessBridge::releaseJavaObject(%X, %p)", vmID, object); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::releaseJavaObject(%X, %016I64X)", vmID, object); + PrintDebugString("[INFO]: WinAccessBridge::releaseJavaObject(%X, %016I64X)", vmID, object); #endif if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { return; @@ -802,15 +803,16 @@ *type = cGetAccessBridgeVersionPackage; pkg->vmID = vmID; - PrintDebugString("WinAccessBridge::getVersionInfo(%X, )", vmID); + PrintDebugString("[INFO]: WinAccessBridge::getVersionInfo(%X, )", vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { memcpy(info, &(pkg->rVersionInfo), sizeof(AccessBridgeVersionInfo)); - PrintDebugString(" VMversion: %ls", info->VMversion); - PrintDebugString(" bridgeJavaClassVersion: %ls", info->bridgeJavaClassVersion); - PrintDebugString(" bridgeJavaDLLVersion: %ls", info->bridgeJavaDLLVersion); - PrintDebugString(" bridgeWinDLLVersion: %ls", info->bridgeWinDLLVersion); + PrintDebugString("[INFO]: VMversion: %ls\n"\ + " bridgeJavaClassVersion: %ls\n"\ + " bridgeJavaDLLVersion: %ls\n"\ + " bridgeWinDLLVersion: %ls\n"\ + , info->VMversion, info->bridgeJavaClassVersion, info->bridgeJavaDLLVersion, info->bridgeWinDLLVersion); return TRUE; } } @@ -843,7 +845,7 @@ return FALSE; } - PrintDebugString("In WinAccessBridge::isJavaWindow"); + PrintDebugString("[INFO]: In WinAccessBridge::isJavaWindow"); @@ -853,7 +855,7 @@ *type = cIsJavaWindowPackage; pkg->window = (jint) window; - PrintDebugString("WinAccessBridge::isJavaWindow(%p)", window); + PrintDebugString("[INFO]: WinAccessBridge::isJavaWindow(%p)", window); isVMInstanceChainInUse = true; AccessBridgeJavaVMInstance *current = javaVMs; @@ -908,9 +910,9 @@ WinAccessBridge::isSameObject(long vmID, JOBJECT64 obj1, JOBJECT64 obj2) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::isSameObject(%p %p)", obj1, obj2); + PrintDebugString("[INFO]: WinAccessBridge::isSameObject(%p %p)", obj1, obj2); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::isSameObject(%016I64X %016I64X)", obj1, obj2); + PrintDebugString("[INFO]: WinAccessBridge::isSameObject(%016I64X %016I64X)", obj1, obj2); #endif if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { @@ -928,14 +930,14 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(pkg->vmID); if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (pkg->rResult != 0) { - PrintDebugString(" WinAccessBridge::isSameObject returning TRUE (same object)"); + PrintDebugString("[INFO]: WinAccessBridge::isSameObject returning TRUE (same object)"); return TRUE; } else { - PrintDebugString(" WinAccessBridge::isSameObject returning FALSE (different object)"); + PrintDebugString("[INFO]: WinAccessBridge::isSameObject returning FALSE (different object)"); return FALSE; } } - PrintDebugString(" WinAccessBridge::isSameObject returning FALSE (sendMemoryPackage failed)"); + PrintDebugString("[ERROR]: WinAccessBridge::isSameObject returning FALSE (sendMemoryPackage failed)"); return FALSE; } @@ -958,7 +960,7 @@ *type = cGetAccessibleContextFromHWNDPackage; pkg->window = (jint) window; - PrintDebugString("WinAccessBridge::getAccessibleContextFromHWND(%p, )", window); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleContextFromHWND(%p, )", window); DEBUG_CODE(pkg->rVMID = (long ) 0x01010101); DEBUG_CODE(pkg->rAccessibleContext = (JOBJECT64) 0x01010101); @@ -971,15 +973,14 @@ if (pkg->rAccessibleContext != 0) { *vmID = pkg->rVMID; *AccessibleContext = (JOBJECT64)pkg->rAccessibleContext; - PrintDebugString(" current->vmID = %X", current->vmID); - PrintDebugString(" pkg->rVMID = %X", pkg->rVMID); + PrintDebugString("[INFO]: current->vmID = %X, pkg->rVMID = %X", current->vmID, pkg->rVMID); #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString(" pkg->rAccessibleContext = %p", pkg->rAccessibleContext); + PrintDebugString("[INFO]: pkg->rAccessibleContext = %p", pkg->rAccessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString(" pkg->rAccessibleContext = %016I64X", pkg->rAccessibleContext); + PrintDebugString("[INFO]: pkg->rAccessibleContext = %016I64X", pkg->rAccessibleContext); #endif if (pkg->rVMID != current->vmID) { - PrintDebugString(" ERROR! getAccessibleContextFromHWND vmIDs don't match!"); + PrintDebugString("[ERROR]: getAccessibleContextFromHWND vmIDs don't match!"); isVMInstanceChainInUse = false; return FALSE; } @@ -994,7 +995,7 @@ // This isn't really an error; it just means that the HWND was for a non-Java // window. It's also possible the HWND was for a Java window but the JVM has // since been shut down and sendMemoryPackage returned FALSE. - PrintDebugString(" ERROR! getAccessibleContextFromHWND no matching HWND found!"); + PrintDebugString("[ERROR]: getAccessibleContextFromHWND no matching HWND found!"); return FALSE; } @@ -1003,7 +1004,7 @@ */ HWND WinAccessBridge::getHWNDFromAccessibleContext(long vmID, JOBJECT64 accessibleContext) { - PrintDebugString(" in WinAccessBridge::getHWNDFromAccessibleContext"); + PrintDebugString("[INFO]: in WinAccessBridge::getHWNDFromAccessibleContext"); if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { return (HWND)0; } @@ -1015,9 +1016,9 @@ pkg->accessibleContext = accessibleContext; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getHWNDFromAccessibleContext(%p)", accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getHWNDFromAccessibleContext(%p)", accessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getHWNDFromAccessibleContext(%016I64X)", accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getHWNDFromAccessibleContext(%016I64X)", accessibleContext); #endif HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -1081,7 +1082,7 @@ pkg->x = x; pkg->y = y; - PrintDebugString("WinAccessBridge::getAccessibleContextAt(%X, %p, %d, %c)", vmID, AccessibleContextParent, x, y); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleContextAt(%X, %p, %d, %c)", vmID, AccessibleContextParent, x, y); HWND destABWindow = javaVMs->findAccessBridgeWindow(pkg->vmID); if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { *AccessibleContext = pkg->rAccessibleContext; @@ -1114,7 +1115,7 @@ GetAccessibleContextWithFocusPackage *pkg = (GetAccessibleContextWithFocusPackage *) (buffer + sizeof(PackageType)); *type = cGetAccessibleContextWithFocusPackage; - PrintDebugString("WinAccessBridge::getAccessibleContextWithFocus(%p, %X, )", window, vmID); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleContextWithFocus(%p, %X, )", window, vmID); // find vmID, etc. from HWND; ask that VM for the AC w/Focus HWND pkgVMID; if (getAccessibleContextFromHWND(window, (long *)&(pkgVMID), &(pkg->rAccessibleContext)) == TRUE) { @@ -1151,21 +1152,22 @@ pkg->AccessibleContext = accessibleContext; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getAccessibleContextInfo(%X, %p, )", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleContextInfo(%X, %p, )", vmID, accessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getAccessibleContextInfo(%X, %016I64X, )", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleContextInfo(%X, %016I64X, )", vmID, accessibleContext); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { memcpy(info, &(pkg->rAccessibleContextInfo), sizeof(AccessibleContextInfo)); - PrintDebugString(" name: %ls", info->name); - PrintDebugString(" description: %ls", info->description); - PrintDebugString(" role: %ls", info->role); - PrintDebugString(" role_en_US: %ls", info->role_en_US); - PrintDebugString(" states: %ls", info->states); - PrintDebugString(" states_en_US: %ls", info->states_en_US); + PrintDebugString("[INFO]: name: %ls\n"\ + " description: %ls\n"\ + " role: %ls\n"\ + " role_en_US: %ls\n"\ + " states: %ls\n"\ + " states_en_US: %ls\n"\ + , info->name, info->description, info->role, info->role_en_US, info->states, info->states_en_US); return TRUE; } } @@ -1200,9 +1202,9 @@ pkg->childIndex = childIndex; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getAccessibleChildFromContext(%X, %p, %d)", vmID, AccessibleContext, childIndex); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleChildFromContext(%X, %p, %d)", vmID, AccessibleContext, childIndex); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getAccessibleChildFromContext(%X, %016I64X, %d)", vmID, AccessibleContext, childIndex); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleChildFromContext(%X, %016I64X, %d)", vmID, AccessibleContext, childIndex); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -1235,7 +1237,7 @@ pkg->vmID = vmID; pkg->AccessibleContext = AccessibleContext; - PrintDebugString("WinAccessBridge::getAccessibleParentFromContext(%X, %p)", vmID, AccessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleParentFromContext(%X, %p)", vmID, AccessibleContext); // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { @@ -1255,10 +1257,10 @@ AccessibleTableInfo *tableInfo) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleTableInfo(%X, %p, %p)", vmID, accessibleContext, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableInfo(%X, %p, %p)", vmID, accessibleContext, tableInfo); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleTableInfo(%X, %016I64X, %p)", vmID, accessibleContext, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableInfo(%X, %016I64X, %p)", vmID, accessibleContext, tableInfo); #endif @@ -1278,12 +1280,12 @@ if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { memcpy(tableInfo, &(pkg->rTableInfo), sizeof(AccessibleTableInfo)); if (pkg->rTableInfo.rowCount != -1) { - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableInfo succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableInfo succeeded"); return TRUE; } } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableInfo failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableInfo failed"); return FALSE; } @@ -1292,7 +1294,7 @@ jint row, jint column, AccessibleTableCellInfo *tableCellInfo) { - PrintDebugString("##### WinAccessBridge::getAccessibleTableCellInfo(%X, %p, %d, %d, %p)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableCellInfo(%X, %p, %d, %d, %p)", vmID, accessibleTable, row, column, tableCellInfo); if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { @@ -1311,13 +1313,13 @@ if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" XXXX pkg->rTableCellInfo.accessibleContext = %p", pkg->rTableCellInfo.accessibleContext); + PrintDebugString("[INFO]: XXXX pkg->rTableCellInfo.accessibleContext = %p", pkg->rTableCellInfo.accessibleContext); memcpy(tableCellInfo, &(pkg->rTableCellInfo), sizeof(AccessibleTableCellInfo)); - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableCellInfo succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableCellInfo succeeded"); return TRUE; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableCellInfo failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableCellInfo failed"); return FALSE; } @@ -1326,9 +1328,9 @@ WinAccessBridge::getAccessibleTableRowHeader(long vmID, JOBJECT64 accessibleContext, AccessibleTableInfo *tableInfo) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleTableRowHeader(%X, %p)", vmID, accessibleContext); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowHeader(%X, %p)", vmID, accessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleTableRowHeader(%X, %016I64X)", vmID, accessibleContext); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowHeader(%X, %016I64X)", vmID, accessibleContext); #endif if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { @@ -1345,12 +1347,12 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRowHeader succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowHeader succeeded"); memcpy(tableInfo, &(pkg->rTableInfo), sizeof(AccessibleTableInfo)); return TRUE; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRowHeader failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableRowHeader failed"); return FALSE; } @@ -1358,9 +1360,9 @@ WinAccessBridge::getAccessibleTableColumnHeader(long vmID, JOBJECT64 accessibleContext, AccessibleTableInfo *tableInfo) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleTableColumnHeader(%X, %p)", vmID, accessibleContext); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnHeader(%X, %p)", vmID, accessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleTableColumnHeader(%X, %016I64X)", vmID, accessibleContext); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnHeader(%X, %016I64X)", vmID, accessibleContext); #endif if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { @@ -1377,12 +1379,12 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumnHeader succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnHeader succeeded"); memcpy(tableInfo, &(pkg->rTableInfo), sizeof(AccessibleTableInfo)); return TRUE; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumnHeader failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableColumnHeader failed"); return FALSE; } @@ -1392,10 +1394,10 @@ jint row) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleTableRowDescription(%X, %p, %d)", vmID, accessibleContext, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowDescription(%X, %p, %d)", vmID, accessibleContext, row); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleTableRowDescription(%X, %016I64X, %d)", vmID, accessibleContext, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowDescription(%X, %016I64X, %d)", vmID, accessibleContext, row); #endif @@ -1414,11 +1416,11 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRowDescription succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowDescription succeeded"); return pkg->rAccessibleContext; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRowDescription failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableRowDescription failed"); return (JOBJECT64)0; } @@ -1428,10 +1430,10 @@ jint column) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleTableColumnDescription(%X, %p, %d)", vmID, accessibleContext, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnDescription(%X, %p, %d)", vmID, accessibleContext, column); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleTableColumnDescription(%X, %016I64X, %d)", vmID, accessibleContext, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnDescription(%X, %016I64X, %d)", vmID, accessibleContext, column); #endif @@ -1451,11 +1453,11 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumnDescription succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnDescription succeeded"); return pkg->rAccessibleContext; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumnDescription failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableColumnDescription failed"); return (JOBJECT64)0; } @@ -1463,9 +1465,9 @@ WinAccessBridge::getAccessibleTableRowSelectionCount(long vmID, JOBJECT64 accessibleTable) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleTableRowSelectionCount(%X, %p)", vmID, accessibleTable); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowSelectionCount(%X, %p)", vmID, accessibleTable); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleTableRowSelectionCount(%X, %016I64X)", vmID, accessibleTable); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowSelectionCount(%X, %016I64X)", vmID, accessibleTable); #endif if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { @@ -1483,11 +1485,11 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRowSelectionCount succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowSelectionCount succeeded"); return pkg->rCount; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRowSelectionCount failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableRowSelectionCount failed"); return 0; } @@ -1495,9 +1497,9 @@ WinAccessBridge::isAccessibleTableRowSelected(long vmID, JOBJECT64 accessibleTable, jint row) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::isAccessibleTableRowSelected(%X, %p)", vmID, accessibleTable); + PrintDebugString("[INFO]: ##### WinAccessBridge::isAccessibleTableRowSelected(%X, %p)", vmID, accessibleTable); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::isAccessibleTableRowSelected(%X, %016I64X)", vmID, accessibleTable); + PrintDebugString("[INFO]: ##### WinAccessBridge::isAccessibleTableRowSelected(%X, %016I64X)", vmID, accessibleTable); #endif if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { @@ -1515,11 +1517,11 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### WinAccessBridge::isAccessibleTableRowSelected succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::isAccessibleTableRowSelected succeeded"); return pkg->rResult; } } - PrintDebugString(" ##### WinAccessBridge::isAccessibleTableRowSelected failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::isAccessibleTableRowSelected failed"); return FALSE; } @@ -1527,9 +1529,9 @@ WinAccessBridge::getAccessibleTableRowSelections(long vmID, JOBJECT64 accessibleTable, jint count, jint *selections) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleTableRowSelections(%X, %p)", vmID, accessibleTable); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowSelections(%X, %p)", vmID, accessibleTable); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleTableRowSelections(%X, %016I64X)", vmID, accessibleTable); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowSelections(%X, %016I64X)", vmID, accessibleTable); #endif if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { @@ -1548,12 +1550,12 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRowSelections succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowSelections succeeded"); memcpy(selections, pkg->rSelections, count * sizeof(jint)); return TRUE; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRowSelections failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableRowSelections failed"); return FALSE; } @@ -1562,10 +1564,10 @@ WinAccessBridge::getAccessibleTableColumnSelectionCount(long vmID, JOBJECT64 accessibleTable) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleTableColumnSelectionCount(%X, %p)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnSelectionCount(%X, %p)", vmID, accessibleTable); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleTableColumnSelectionCount(%X, %016I64X)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnSelectionCount(%X, %016I64X)", vmID, accessibleTable); #endif @@ -1584,20 +1586,20 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumnSelectionCount succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnSelectionCount succeeded"); return pkg->rCount; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumnSelectionCount failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableColumnSelectionCount failed"); return 0; } BOOL WinAccessBridge::isAccessibleTableColumnSelected(long vmID, JOBJECT64 accessibleTable, jint column) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::isAccessibleTableColumnSelected(%X, %p)", vmID, accessibleTable); + PrintDebugString("[INFO]: ##### WinAccessBridge::isAccessibleTableColumnSelected(%X, %p)", vmID, accessibleTable); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::isAccessibleTableColumnSelected(%X, %016I64X)", vmID, accessibleTable); + PrintDebugString("[INFO]: ##### WinAccessBridge::isAccessibleTableColumnSelected(%X, %016I64X)", vmID, accessibleTable); #endif if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { @@ -1615,11 +1617,11 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### WinAccessBridge::isAccessibleTableColumnSelected succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::isAccessibleTableColumnSelected succeeded"); return pkg->rResult; } } - PrintDebugString(" ##### WinAccessBridge::isAccessibleTableColumnSelected failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::isAccessibleTableColumnSelected failed"); return FALSE; } @@ -1628,9 +1630,9 @@ jint *selections) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleTableColumnSelections(%X, %p)", vmID, accessibleTable); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnSelections(%X, %p)", vmID, accessibleTable); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleTableColumnSelections(%X, %016I64X)", vmID, accessibleTable); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableColumnSelections(%X, %016I64X)", vmID, accessibleTable); #endif if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { @@ -1649,12 +1651,12 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumnSelections succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnSelections succeeded"); memcpy(selections, pkg->rSelections, count * sizeof(jint)); return TRUE; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumnSelections failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableColumnSelections failed"); return FALSE; } @@ -1662,10 +1664,10 @@ WinAccessBridge::getAccessibleTableRow(long vmID, JOBJECT64 accessibleTable, jint index) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleTableRow(%X, %p, index=%d)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRow(%X, %p, index=%d)", vmID, accessibleTable, index); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleTableRow(%X, %016I64X, index=%d)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRow(%X, %016I64X, index=%d)", vmID, accessibleTable, index); #endif @@ -1685,11 +1687,11 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRow succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRow succeeded"); return pkg->rRow; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRow failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableRow failed"); return 0; } @@ -1697,10 +1699,10 @@ WinAccessBridge::getAccessibleTableColumn(long vmID, JOBJECT64 accessibleTable, jint index) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleTableColumn(%X, %p, index=%d)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumn(%X, %p, index=%d)", vmID, accessibleTable, index); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleTableColumn(%X, %016I64X, index=%d)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumn(%X, %016I64X, index=%d)", vmID, accessibleTable, index); #endif @@ -1720,11 +1722,11 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumn succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumn succeeded"); return pkg->rColumn; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumn failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableColumn failed"); return 0; } @@ -1732,10 +1734,10 @@ WinAccessBridge::getAccessibleTableIndex(long vmID, JOBJECT64 accessibleTable, jint row, jint column) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleTableIndex(%X, %p, row=%d, col=%d)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableIndex(%X, %p, row=%d, col=%d)", vmID, accessibleTable, row, column); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleTableIndex(%X, %016I64X, row=%d, col=%d)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableIndex(%X, %016I64X, row=%d, col=%d)", vmID, accessibleTable, row, column); #endif @@ -1756,11 +1758,11 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableIndex succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableIndex succeeded"); return pkg->rIndex; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleTableIndex failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableIndex failed"); return 0; } @@ -1771,10 +1773,10 @@ AccessibleRelationSetInfo *relationSetInfo) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleRelationSet(%X, %p, %X)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleRelationSet(%X, %p, %X)", vmID, accessibleContext, relationSetInfo); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleRelationSet(%X, %016I64X, %X)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleRelationSet(%X, %016I64X, %X)", vmID, accessibleContext, relationSetInfo); #endif @@ -1792,14 +1794,14 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### pkg->rAccessibleRelationSetInfo.relationCount = %X", + PrintDebugString("[INFO]: ##### pkg->rAccessibleRelationSetInfo.relationCount = %X", pkg->rAccessibleRelationSetInfo.relationCount); memcpy(relationSetInfo, &(pkg->rAccessibleRelationSetInfo), sizeof(AccessibleRelationSetInfo)); - PrintDebugString(" ##### WinAccessBridge::getAccessibleRelationSet succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleRelationSet succeeded"); return TRUE; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleRelationSet failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleRelationSet failed"); return FALSE; } @@ -1811,10 +1813,10 @@ AccessibleHypertextInfo *hypertextInfo) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleHypertext(%X, %p, %X)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertext(%X, %p, %X)", vmID, accessibleContext, hypertextInfo); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleHypertext(%X, %016I64X, %X)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertext(%X, %016I64X, %X)", vmID, accessibleContext, hypertextInfo); #endif @@ -1834,13 +1836,13 @@ if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { memcpy(hypertextInfo, &(pkg->rAccessibleHypertextInfo), sizeof(AccessibleHypertextInfo)); - PrintDebugString(" ##### hypertextInfo.linkCount = %d", hypertextInfo->linkCount); - PrintDebugString(" ##### WinAccessBridge::getAccessibleHypertext succeeded"); + PrintDebugString("[INFO]: ##### hypertextInfo.linkCount = %d", hypertextInfo->linkCount); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertext succeeded"); return TRUE; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleHypertext failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleHypertext failed"); return FALSE; } @@ -1850,10 +1852,10 @@ JOBJECT64 accessibleHyperlink) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::activateAccessibleHyperlink(%p %p)", accessibleContext, + PrintDebugString("[INFO]: WinAccessBridge::activateAccessibleHyperlink(%p %p)", accessibleContext, accessibleHyperlink); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::activateAccessibleHyperlink(%016I64X %016I64X)", accessibleContext, + PrintDebugString("[INFO]: WinAccessBridge::activateAccessibleHyperlink(%016I64X %016I64X)", accessibleContext, accessibleHyperlink); #endif @@ -1873,7 +1875,7 @@ if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { return pkg->rResult; } - PrintDebugString(" WinAccessBridge::activateAccessibleHyperlink returning FALSE (sendMemoryPackage failed)"); + PrintDebugString("[ERROR]: WinAccessBridge::activateAccessibleHyperlink returning FALSE (sendMemoryPackage failed)"); return FALSE; } @@ -1887,10 +1889,10 @@ const AccessibleContext accessibleContext) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleHyperlinkCount(%X, %p)", + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHyperlinkCount(%X, %p)", vmID, accessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleHyperlinkCount(%X, %016I64X)", + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHyperlinkCount(%X, %016I64X)", vmID, accessibleContext); #endif @@ -1908,12 +1910,12 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### hypetext link count = %d", pkg->rLinkCount); - PrintDebugString(" ##### WinAccessBridge::getAccessibleHyperlinkCount succeeded"); + PrintDebugString("[INFO]: ##### hypetext link count = %d", pkg->rLinkCount); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHyperlinkCount succeeded"); return pkg->rLinkCount; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleHyperlinkCount failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleHyperlinkCount failed"); return -1; } @@ -1931,10 +1933,10 @@ /* OUT */ AccessibleHypertextInfo *hypertextInfo) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleHypertextExt(%X, %p %p)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertextExt(%X, %p %p)", vmID, accessibleContext, hypertextInfo); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleHypertextExt(%X, %016I64X %p)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertextExt(%X, %016I64X %p)", vmID, accessibleContext, hypertextInfo); #endif @@ -1953,19 +1955,18 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### pkg->rSuccess = %d", pkg->rSuccess); + PrintDebugString("[INFO]: ##### pkg->rSuccess = %d", pkg->rSuccess); memcpy(hypertextInfo, &(pkg->rAccessibleHypertextInfo), sizeof(AccessibleHypertextInfo)); if (pkg->rSuccess == TRUE) { - PrintDebugString(" ##### hypertextInfo.linkCount = %d", hypertextInfo->linkCount); - PrintDebugString(" ##### hypertextInfo.linkCount = %d", hypertextInfo->linkCount); + PrintDebugString("[INFO]: ##### hypertextInfo.linkCount = %d", hypertextInfo->linkCount); } else { - PrintDebugString(" ##### WinAccessBridge::getAccessibleHypertextExt failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleHypertextExt failed"); } - return pkg->rSuccess;; + return pkg->rSuccess; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleHypertextExt failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleHypertextExt failed"); return FALSE; } @@ -1982,10 +1983,10 @@ const jint charIndex) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleHypertextLinkIndex(%X, %p)", + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertextLinkIndex(%X, %p)", vmID, hypertext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleHypertextLinkIndex(%X, %016I64X)", + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertextLinkIndex(%X, %016I64X)", vmID, hypertext); #endif @@ -2004,12 +2005,12 @@ HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" ##### hypetext link index = %d", pkg->rLinkIndex); - PrintDebugString(" ##### WinAccessBridge::getAccessibleHypertextLinkIndex succeeded"); + PrintDebugString("[INFO]: ##### hypetext link index = %d", pkg->rLinkIndex); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertextLinkIndex succeeded"); return pkg->rLinkIndex; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleHypertextLinkIndex failed"); + PrintDebugString("[ERROR] ##### WinAccessBridge::getAccessibleHypertextLinkIndex failed"); return -1; } @@ -2025,10 +2026,10 @@ /* OUT */ AccessibleHyperlinkInfo *hyperlinkInfo) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleHyperlink(%X, %p, %p)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHyperlink(%X, %p, %p)", vmID, hypertext, hyperlinkInfo); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleHyperlink(%X, %016I64X, %p)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHyperlink(%X, %016I64X, %p)", vmID, hypertext, hyperlinkInfo); #endif @@ -2049,11 +2050,11 @@ if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { memcpy(hyperlinkInfo, &(pkg->rAccessibleHyperlinkInfo), sizeof(AccessibleHyperlinkInfo)); - PrintDebugString(" ##### WinAccessBridge::getAccessibleHypertext succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertext succeeded"); return TRUE; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleHypertext failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleHypertext failed"); return FALSE; } @@ -2065,10 +2066,10 @@ AccessibleKeyBindings *keyBindings) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleKeyBindings(%X, %p, %p)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleKeyBindings(%X, %p, %p)", vmID, accessibleContext, keyBindings); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleKeyBindings(%X, %016I64X, %p)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleKeyBindings(%X, %016I64X, %p)", vmID, accessibleContext, keyBindings); #endif @@ -2088,19 +2089,20 @@ if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { memcpy(keyBindings, &(pkg->rAccessibleKeyBindings), sizeof(AccessibleKeyBindings)); - PrintDebugString(" ##### keyBindings.keyBindingsCount = %d", keyBindings->keyBindingsCount); + PrintDebugString("[INFO]: ##### keyBindings.keyBindingsCount = %d", keyBindings->keyBindingsCount); for (int i = 0; i < keyBindings->keyBindingsCount; ++i) { - PrintDebugString(" Key Binding # %d", i+1); - PrintDebugString(" Modifiers: 0x%x", keyBindings->keyBindingInfo[i].modifiers); - PrintDebugString(" Character (hex): 0x%x", keyBindings->keyBindingInfo[i].character); - PrintDebugString(" Character (wide char): %lc", keyBindings->keyBindingInfo[i].character); + PrintDebugString("[INFO]: Key Binding # %d"\ + " Modifiers: 0x%x"\ + " Character (hex): 0x%x"\ + " Character (wide char): %lc"\ + , i+1, keyBindings->keyBindingInfo[i].modifiers, keyBindings->keyBindingInfo[i].character, keyBindings->keyBindingInfo[i].character); } - PrintDebugString(" ##### WinAccessBridge::getAccessibleKeyBindings succeeded"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleKeyBindings succeeded"); return TRUE; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleKeyBindings failed"); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleKeyBindings failed"); return FALSE; } @@ -2108,10 +2110,10 @@ WinAccessBridge::getAccessibleIcons(long vmID, JOBJECT64 accessibleContext, AccessibleIcons *icons) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleIcons(%X, %p, %p)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleIcons(%X, %p, %p)", vmID, accessibleContext, icons); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleIcons(%X, %016I64X, %p)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleIcons(%X, %016I64X, %p)", vmID, accessibleContext, icons); #endif @@ -2131,13 +2133,13 @@ if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { memcpy(icons, &(pkg->rAccessibleIcons), sizeof(AccessibleIcons)); - PrintDebugString(" ##### icons.iconsCount = %d", icons->iconsCount); - PrintDebugString(" ##### WinAccessBridge::getAccessibleIcons succeeded"); + PrintDebugString("[INFO]: ##### icons.iconsCount = %d", icons->iconsCount); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleIcons succeeded"); return TRUE; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleIcons failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleIcons failed"); return FALSE; } @@ -2145,10 +2147,10 @@ WinAccessBridge::getAccessibleActions(long vmID, JOBJECT64 accessibleContext, AccessibleActions *actions) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("##### WinAccessBridge::getAccessibleActions(%X, %p, %p)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleActions(%X, %p, %p)", vmID, accessibleContext, actions); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("##### WinAccessBridge::getAccessibleActions(%X, %016I64X, %p)", vmID, + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleActions(%X, %016I64X, %p)", vmID, accessibleContext, actions); #endif @@ -2168,13 +2170,13 @@ if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { memcpy(actions, &(pkg->rAccessibleActions), sizeof(AccessibleActions)); - PrintDebugString(" ##### actions.actionsCount = %d", actions->actionsCount); - PrintDebugString(" ##### WinAccessBridge::getAccessibleActions succeeded"); + PrintDebugString("[INFO]: ##### actions.actionsCount = %d", actions->actionsCount); + PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleActions succeeded"); return TRUE; } } - PrintDebugString(" ##### WinAccessBridge::getAccessibleActions failed"); + PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleActions failed"); return FALSE; } @@ -2183,11 +2185,11 @@ AccessibleActionsToDo *actionsToDo, jint *failure) { #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::doAccessibleActions(%p #actions %d %ls)", accessibleContext, + PrintDebugString("[INFO]: WinAccessBridge::doAccessibleActions(%p #actions %d %ls)", accessibleContext, actionsToDo->actionsCount, actionsToDo->actions[0].name); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::doAccessibleActions(%016I64X #actions %d %ls)", accessibleContext, + PrintDebugString("[INFO]: WinAccessBridge::doAccessibleActions(%016I64X #actions %d %ls)", accessibleContext, actionsToDo->actionsCount, actionsToDo->actions[0].name); #endif @@ -2209,7 +2211,7 @@ *failure = pkg->failure; return pkg->rResult; } - PrintDebugString(" WinAccessBridge::doAccessibleActions returning FALSE (sendMemoryPackage failed)"); + PrintDebugString("[ERROR]: WinAccessBridge::doAccessibleActions returning FALSE (sendMemoryPackage failed)"); return FALSE; } @@ -2234,9 +2236,9 @@ wcsncpy(pkg->text, text, sizeof(pkg->text)/sizeof(wchar_t)); // wide character copy #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::setTextContents(%X, %016I64X %ls)", vmID, accessibleContext, text); + PrintDebugString("[INFO]: WinAccessBridge::setTextContents(%X, %016I64X %ls)", vmID, accessibleContext, text); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::setTextContents(%X, %p %ls)", vmID, accessibleContext, text); + PrintDebugString("[INFO]: WinAccessBridge::setTextContents(%X, %p %ls)", vmID, accessibleContext, text); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -2271,18 +2273,19 @@ memcpy((void *)(&(pkg->role)), (void *)role, sizeof(pkg->role)); #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getParentWithRole(%X, %p)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getParentWithRole(%X, %p)", vmID, accessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getParentWithRole(%X, %016I64X)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getParentWithRole(%X, %016I64X)", vmID, accessibleContext); #endif - PrintDebugString(" pkg->vmID: %X", pkg->vmID); - PrintDebugString(" pkg->accessibleContext: %p", pkg->accessibleContext); - PrintDebugString(" pkg->role: %ls", pkg->role); + PrintDebugString("[INFO]: pkg->vmID: %X"\ + " pkg->accessibleContext: %p"\ + " pkg->role: %ls"\ + , pkg->vmID, pkg->accessibleContext, pkg->role); // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { - PrintDebugString(" pkg->rAccessibleContext: %p", pkg->rAccessibleContext); + PrintDebugString("[INFO]: pkg->rAccessibleContext: %p", pkg->rAccessibleContext); return pkg->rAccessibleContext; } } @@ -2310,9 +2313,9 @@ pkg->accessibleContext = accessibleContext; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getTopLevelObject(%X, %p)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getTopLevelObject(%X, %p)", vmID, accessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getTopLevelObject(%X, %016I64X)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getTopLevelObject(%X, %016I64X)", vmID, accessibleContext); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -2345,9 +2348,9 @@ memcpy((void *)(&(pkg->role)), (void *)role, sizeof(pkg->role)); #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getParentWithRoleElseRoot(%X, %p)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getParentWithRoleElseRoot(%X, %p)", vmID, accessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getParentWithRoleElseRoot(%X, %016I64X)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getParentWithRoleElseRoot(%X, %016I64X)", vmID, accessibleContext); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -2378,9 +2381,9 @@ pkg->accessibleContext = accessibleContext; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getObjectDepth(%X, %p)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getObjectDepth(%X, %p)", vmID, accessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getObjectDepth(%X, %016I64X)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getObjectDepth(%X, %016I64X)", vmID, accessibleContext); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -2410,9 +2413,9 @@ pkg->accessibleContext = accessibleContext; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getActiveDescendent(%X, %p)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getActiveDescendent(%X, %p)", vmID, accessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getActiveDescendent(%X, %016I64X)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getActiveDescendent(%X, %016I64X)", vmID, accessibleContext); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -2451,16 +2454,16 @@ pkg->len = (int)max; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getVirtualAccessibleName(%X, %p)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getVirtualAccessibleName(%X, %p)", vmID, accessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getVirtualAccessibleName(%X, %016I64X)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getVirtualAccessibleName(%X, %016I64X)", vmID, accessibleContext); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); if (destABWindow != (HWND) 0) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { wcsncpy(name, pkg->rName, max); - PrintDebugString(" WinAccessBridge::getVirtualAccessibleName: Virtual name = %ls", name); + PrintDebugString("[INFO]: WinAccessBridge::getVirtualAccessibleName: Virtual name = %ls", name); return TRUE; } } @@ -2486,9 +2489,9 @@ pkg->accessibleContext = accessibleContext; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::requestFocus(%X, %p)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::requestFocus(%X, %p)", vmID, accessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::requestFocus(%X, %016I64X)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::requestFocus(%X, %016I64X)", vmID, accessibleContext); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -2521,10 +2524,10 @@ pkg->endIndex = endIndex; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString(" WinAccessBridge::selectTextRange(%X, %p %d %d)", vmID, accessibleContext, + PrintDebugString("[INFO]: WinAccessBridge::selectTextRange(%X, %p %d %d)", vmID, accessibleContext, startIndex, endIndex); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString(" WinAccessBridge::selectTextRange(%X, %016I64X %d %d)", vmID, accessibleContext, + PrintDebugString("[INFO]: WinAccessBridge::selectTextRange(%X, %016I64X %d %d)", vmID, accessibleContext, startIndex, endIndex); #endif // need to call only the HWND/VM that contains this AC @@ -2563,10 +2566,10 @@ #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString(" WinAccessBridge::getTextAttributesInRange(%X, %p %d %d)", vmID, accessibleContext, + PrintDebugString("[INFO]: WinAccessBridge::getTextAttributesInRange(%X, %p %d %d)", vmID, accessibleContext, startIndex, endIndex); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString(" WinAccessBridge::getTextAttributesInRange(%X, %016I64X %d %d)", vmID, accessibleContext, + PrintDebugString("[INFO]: WinAccessBridge::getTextAttributesInRange(%X, %016I64X %d %d)", vmID, accessibleContext, startIndex, endIndex); #endif // need to call only the HWND/VM that contains this AC @@ -2600,9 +2603,9 @@ pkg->accessibleContext = accessibleContext; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getVisibleChildrenCount(%X, %p)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getVisibleChildrenCount(%X, %p)", vmID, accessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getVisibleChildrenCount(%X, %016I64X)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getVisibleChildrenCount(%X, %016I64X)", vmID, accessibleContext); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -2635,9 +2638,9 @@ pkg->startIndex = startIndex; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getVisibleChildren(%X, %p)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getVisibleChildren(%X, %p)", vmID, accessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getVisibleChildren(%X, %016I64X)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::getVisibleChildren(%X, %016I64X)", vmID, accessibleContext); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -2670,9 +2673,9 @@ pkg->position = position; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::setCaretPosition(%X, %p %ls)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::setCaretPosition(%X, %p %ls)", vmID, accessibleContext); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::setCaretPosition(%X, %016I64X %ls)", vmID, accessibleContext); + PrintDebugString("[INFO]: WinAccessBridge::setCaretPosition(%X, %016I64X %ls)", vmID, accessibleContext); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -2712,9 +2715,9 @@ pkg->y = y; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getAccessibleTextInfo(%X, %p, %p, %d, %d)", vmID, AccessibleContext, textInfo, x, y); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextInfo(%X, %p, %p, %d, %d)", vmID, AccessibleContext, textInfo, x, y); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getAccessibleTextInfo(%X, %016I64X, %p, %d, %d)", vmID, AccessibleContext, textInfo, x, y); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextInfo(%X, %016I64X, %p, %d, %d)", vmID, AccessibleContext, textInfo, x, y); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -2722,9 +2725,10 @@ if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { memcpy(textInfo, &(pkg->rTextInfo), sizeof(AccessibleTextInfo)); if (pkg->rTextInfo.charCount != -1) { - PrintDebugString(" charCount: %d", textInfo->charCount); - PrintDebugString(" caretIndex: %d", textInfo->caretIndex); - PrintDebugString(" indexAtPoint: %d", textInfo->indexAtPoint); + PrintDebugString("[INFO]: charCount: %d"\ + " caretIndex: %d"\ + " indexAtPoint: %d"\ + , textInfo->charCount, textInfo->caretIndex, textInfo->indexAtPoint); return TRUE; } } @@ -2760,9 +2764,9 @@ pkg->rTextItemsInfo.sentence[0] = '\0'; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getAccessibleTextItems(%X, %p, %p, %d)", vmID, AccessibleContext, textItems, index); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextItems(%X, %p, %p, %d)", vmID, AccessibleContext, textItems, index); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getAccessibleTextItems(%X, %016I64X, %p, %d)", vmID, AccessibleContext, textItems, index); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextItems(%X, %016I64X, %p, %d)", vmID, AccessibleContext, textItems, index); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -2799,9 +2803,9 @@ pkg->AccessibleContext = AccessibleContext; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getAccessibleTextSelectionInfo(%X, %p, %p)", vmID, AccessibleContext, selectionInfo); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextSelectionInfo(%X, %p, %p)", vmID, AccessibleContext, selectionInfo); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getAccessibleTextSelectionInfo(%X, %016I64X, %p)", vmID, AccessibleContext, selectionInfo); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextSelectionInfo(%X, %016I64X, %p)", vmID, AccessibleContext, selectionInfo); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -2839,9 +2843,9 @@ pkg->index = index; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getAccessibleTextAttributes(%X, %p, %d, %p)", vmID, AccessibleContext, index, attributes); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextAttributes(%X, %p, %d, %p)", vmID, AccessibleContext, index, attributes); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getAccessibleTextAttributes(%X, %016I64X, %d, %p)", vmID, AccessibleContext, index, attributes); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextAttributes(%X, %016I64X, %d, %p)", vmID, AccessibleContext, index, attributes); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -2877,9 +2881,9 @@ pkg->index = index; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getAccessibleTextRect(%X, %p, %p, %d)", vmID, AccessibleContext, rectInfo, index); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextRect(%X, %p, %p, %d)", vmID, AccessibleContext, rectInfo, index); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getAccessibleTextRect(%X, %016I64X, %p, %d)", vmID, AccessibleContext, rectInfo, index); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextRect(%X, %016I64X, %p, %d)", vmID, AccessibleContext, rectInfo, index); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -2917,9 +2921,9 @@ pkg->index = index; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getCaretLocation(%X, %p, %p, %d)", vmID, AccessibleContext, rectInfo, index); + PrintDebugString("[INFO]: WinAccessBridge::getCaretLocation(%X, %p, %p, %d)", vmID, AccessibleContext, rectInfo, index); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getCaretLocation(%X, %016I64X, %p, %d)", vmID, AccessibleContext, rectInfo, index); + PrintDebugString("[INFO]: WinAccessBridge::getCaretLocation(%X, %016I64X, %p, %d)", vmID, AccessibleContext, rectInfo, index); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -2969,9 +2973,9 @@ pkg->index = index; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getAccessibleTextLineBounds(%X, %p, %d, )", vmID, AccessibleContext, index); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextLineBounds(%X, %p, %d, )", vmID, AccessibleContext, index); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getAccessibleTextLineBounds(%X, %016I64X, %d, )", vmID, AccessibleContext, index); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextLineBounds(%X, %016I64X, %d, )", vmID, AccessibleContext, index); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -3011,9 +3015,9 @@ pkg->end = end; #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) - PrintDebugString("WinAccessBridge::getAccessibleTextRange(%X, %p, %d, %d, )", vmID, AccessibleContext, start, end); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextRange(%X, %p, %d, %d, )", vmID, AccessibleContext, start, end); #else // JOBJECT64 is jlong (64 bit) - PrintDebugString("WinAccessBridge::getAccessibleTextRange(%X, %016I64X, %d, %d, )", vmID, AccessibleContext, start, end); + PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextRange(%X, %016I64X, %d, %d, )", vmID, AccessibleContext, start, end); #endif // need to call only the HWND/VM that contains this AC HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); @@ -3290,7 +3294,7 @@ */ void WinAccessBridge::addJavaEventNotification(jlong type) { - PrintDebugString("WinAccessBridge::addJavaEventNotification(%016I64X)", type); + PrintDebugString("[INFO]: WinAccessBridge::addJavaEventNotification(%016I64X)", type); if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { return; } @@ -3302,7 +3306,7 @@ pkg->type = type; pkg->DLLwindow = ABHandleToLong(dialogWindow); - PrintDebugString(" ->pkgType = %X, eventType = %016I64X, DLLwindow = %p", + PrintDebugString("[INFO]: ->pkgType = %X, eventType = %016I64X, DLLwindow = %p", *pkgType, pkg->type, pkg->DLLwindow); // send addEventNotification message to all JVMs @@ -3327,7 +3331,7 @@ */ void WinAccessBridge::removeJavaEventNotification(jlong type) { - PrintDebugString("in WinAccessBridge::removeJavaEventNotification(%016I64X)", type); + PrintDebugString("[INFO]: in WinAccessBridge::removeJavaEventNotification(%016I64X)", type); if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { return; } @@ -3338,7 +3342,7 @@ pkg->type = type; pkg->DLLwindow = ABHandleToLong(dialogWindow); - PrintDebugString(" ->pkgType = %X, eventType = %016I64X, DLLwindow = %p", + PrintDebugString("[INFO]: ->pkgType = %X, eventType = %016I64X, DLLwindow = %p", *pkgType, pkg->type, pkg->DLLwindow); // send removeEventNotification message to all JVMs @@ -3365,7 +3369,7 @@ */ void WinAccessBridge::addAccessibilityEventNotification(jlong type) { - PrintDebugString("in WinAccessBridge::addAccessibilityEventNotification(%016I64X)", type); + PrintDebugString("[INFO]: in WinAccessBridge::addAccessibilityEventNotification(%016I64X)", type); if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { return; } @@ -3376,7 +3380,7 @@ pkg->type = type; pkg->DLLwindow = ABHandleToLong(dialogWindow); - PrintDebugString(" ->pkgType = %X, eventType = %016I64X, DLLwindow = %X", + PrintDebugString("[INFO]: ->pkgType = %X, eventType = %016I64X, DLLwindow = %X", *pkgType, pkg->type, pkg->DLLwindow); // send addEventNotification message to all JVMs @@ -3401,7 +3405,7 @@ */ void WinAccessBridge::removeAccessibilityEventNotification(jlong type) { - PrintDebugString("in WinAccessBridge::removeAccessibilityEventNotification(%016I64X)", type); + PrintDebugString("[INFO]: in WinAccessBridge::removeAccessibilityEventNotification(%016I64X)", type); if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { return; } @@ -3412,7 +3416,7 @@ pkg->type = type; pkg->DLLwindow = ABHandleToLong(dialogWindow); - PrintDebugString(" ->pkgType = %X, eventType = %016I64X, DLLwindow = %X", + PrintDebugString("[INFO]: ->pkgType = %X, eventType = %016I64X, DLLwindow = %X", *pkgType, pkg->type, pkg->DLLwindow); // send removeEventNotification message to all JVMs