Author: vyemialyanchyk
Date: 2010-09-21 11:20:36 -0400 (Tue, 21 Sep 2010)
New Revision: 25059
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramContentOutlinePage.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/LexicalSortingAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/BaseElement.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java
Log:
https://jira.jboss.org/browse/JBIDE-7070 - fixed
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramContentOutlinePage.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramContentOutlinePage.java 2010-09-21
15:17:10 UTC (rev 25058)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramContentOutlinePage.java 2010-09-21
15:20:36 UTC (rev 25059)
@@ -376,4 +376,8 @@
protected ActionRegistry getActionRegistry() {
return actionRegistry;
}
+
+ public void cleanupSelection() {
+ getViewer().deselectAll();
+ }
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/LexicalSortingAction.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/LexicalSortingAction.java 2010-09-21
15:17:10 UTC (rev 25058)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/LexicalSortingAction.java 2010-09-21
15:20:36 UTC (rev 25059)
@@ -56,6 +56,9 @@
private void valueChanged(final boolean on) {
BusyIndicator.showWhile(getDisplay(), new Runnable() {
public void run() {
+ if (outlinePage != null) {
+ outlinePage.cleanupSelection();
+ }
final OrmDiagram od = getOrmDiagram();
od.setDeepIntoSort(on);
od.refresh();
@@ -66,7 +69,7 @@
});
}
- protected Display getDisplay () {
+ protected Display getDisplay() {
if (diagramViewer != null && diagramViewer.getEditPartViewer() != null
&&
diagramViewer.getEditPartViewer().getControl() != null) {
return diagramViewer.getEditPartViewer().getControl().getDisplay();
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/BaseElement.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/BaseElement.java 2010-09-21
15:17:10 UTC (rev 25058)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/BaseElement.java 2010-09-21
15:20:36 UTC (rev 25059)
@@ -150,6 +150,15 @@
}
}
+ public void cleanupSelection() {
+ Iterator<Shape> it = getChildrenIterator();
+ while (it.hasNext()) {
+ Shape me = it.next();
+ me.setSelected(false);
+ }
+ setSelected(false);
+ }
+
public int compareTo(BaseElement be) {
return toString().compareToIgnoreCase(be.toString());
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java 2010-09-21
15:17:10 UTC (rev 25058)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java 2010-09-21
15:20:36 UTC (rev 25059)
@@ -265,6 +265,17 @@
}
}
+ public void cleanupSelection() {
+ Iterator<OrmShape> it = elements.values().iterator();
+ while (it.hasNext()) {
+ OrmShape ormShape = it.next();
+ ormShape.cleanupSelection();
+ }
+ for (int i = 0; i < connections.size(); i++) {
+ connections.get(i).cleanupSelection();
+ }
+ }
+
protected void createRulers() {
leftRuler = new DiagramRuler(false);
topRuler = new DiagramRuler(true);