--- old/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java 2018-12-04 16:35:10.177054100 +0530 +++ new/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java 2018-12-04 16:35:06.436110900 +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;