[251720] [Graphical Editor] Provide better visual cues for abstract types/elements
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDBaseAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDBaseAdapter.java
index 4f2ff61..4db258d 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDBaseAdapter.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDBaseAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2007 IBM Corporation and others.
+ * Copyright (c) 2001, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -226,4 +226,13 @@
       return (IADTObject)adapter;
     return null;
   }
+
+  /**
+   * Indicates the presence of an abstract attribute
+   * @return true if the component's abstract attribute is true
+   */
+  public boolean isAbstract()
+  {
+    return false;
+  }
 }
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDComplexTypeDefinitionAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDComplexTypeDefinitionAdapter.java
index a43c563..e76cfce 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDComplexTypeDefinitionAdapter.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDComplexTypeDefinitionAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2008 IBM Corporation and others.
+ * Copyright (c) 2001, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -437,4 +437,10 @@
   {
     return this;
   }
+  
+  public boolean isAbstract()
+  {
+    return getXSDComplexTypeDefinition().isAbstract();
+  }
+
 }
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDElementDeclarationAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDElementDeclarationAdapter.java
index 21fbc6e..1397408 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDElementDeclarationAdapter.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDElementDeclarationAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2008 IBM Corporation and others.
+ * Copyright (c) 2001, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -331,4 +331,9 @@
     }
     return this;
   }
+  
+  public boolean isAbstract()
+  {
+    return getXSDElementDeclaration().isAbstract();
+  }
 }
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/TopLevelComponentEditPart.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/TopLevelComponentEditPart.java
index 079be5c..67614ee 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/TopLevelComponentEditPart.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/TopLevelComponentEditPart.java
@@ -35,6 +35,8 @@
 import org.eclipse.jface.action.IAction;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.IEditorPart;
@@ -76,6 +78,7 @@
   protected SimpleDirectEditPolicy simpleDirectEditPolicy = new SimpleDirectEditPolicy();
   protected boolean isReadOnly;
   protected boolean isSelected;
+  private Font italicFont;
 
   protected IFigure createFigure()
   {
@@ -120,6 +123,11 @@
 
   public void deactivate()
   {
+    if (italicFont != null)
+    {
+      italicFont.dispose();
+      italicFont = null;
+    }
     super.deactivate();
   }
 
@@ -138,6 +146,25 @@
       }
       // arrowLabel.setVisible(Boolean.TRUE.equals(adapter.getProperty(getModel(),
       // "drillDown")));
+      
+      if (adapter.isAbstract())
+      {
+        if (italicFont == null)
+        {
+          Font font = label.getFont();
+          FontData [] fd = font.getFontData();
+          if (fd.length > 0)
+          {
+            fd[0].setStyle(fd[0].getStyle() | SWT.ITALIC);
+            italicFont = new Font(font.getDevice(), fd);
+          }
+        }
+        label.setFont(italicFont);
+      }
+      else
+      {
+        label.setFont(label.getParent().getFont());
+      }
     }
     else
     {