[no bug] Misc. Add try finally block
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/design/figures/CenteredIconFigure.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/design/figures/CenteredIconFigure.java
index 88776f2..74d07a1 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/design/figures/CenteredIconFigure.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/editor/internal/design/figures/CenteredIconFigure.java
@@ -44,16 +44,22 @@
protected void outlineShape(Graphics graphics)
{
graphics.pushState();
- if (mode == NORMAL)
- { // TODO: common up and organize colors....
- graphics.setForegroundColor(ReferenceConnection.inactiveConnection);
- }
- else if (mode == SELECTED)
+ try
{
- graphics.setForegroundColor(ColorConstants.black);
+ if (mode == NORMAL)
+ { // TODO: common up and organize colors....
+ graphics.setForegroundColor(ReferenceConnection.inactiveConnection);
+ }
+ else if (mode == SELECTED)
+ {
+ graphics.setForegroundColor(ColorConstants.black);
+ }
+ super.outlineShape(graphics);
}
- super.outlineShape(graphics);
- graphics.popState();
+ finally
+ {
+ graphics.popState();
+ }
}
protected void fillShape(Graphics g)