Author: vyemialyanchyk
Date: 2009-11-19 11:15:17 -0500 (Thu, 19 Nov 2009)
New Revision: 18748
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.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/jira/browse/JBIDE-5192 - fixed
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java 2009-11-19
15:57:37 UTC (rev 18747)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java 2009-11-19
16:15:17 UTC (rev 18748)
@@ -321,7 +321,7 @@
} else if (input instanceof DiagramEditorInput) {
diagramInput = (DiagramEditorInput)input;
}
- setPartName(DiagramViewerMessages.DiagramViewer_diagram_for + " " +
diagramInput.getName()); //$NON-NLS-1$
+ setPartName(diagramInput.getName());
super.setInput(diagramInput);
loadProperties();
}
@@ -349,7 +349,7 @@
public void refresh() {
getOrmDiagram().refresh();
- setPartName(DiagramViewerMessages.DiagramViewer_diagram_for + " " +
getDiagramInput().getName()); //$NON-NLS-1$
+ setPartName(getDiagramInput().getName());
}
/**
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 2009-11-19
15:57:37 UTC (rev 18747)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java 2009-11-19
16:15:17 UTC (rev 18748)
@@ -142,10 +142,21 @@
}
// sort to get same name for same combinations of entities
Collections.sort(names);
+ name = consoleConfigName + ":"; //$NON-NLS-1$
+ name += names.size() > 0 ? " " + names.get(0) : "";
//$NON-NLS-1$ //$NON-NLS-2$
+ if (names.size() > 1) {
+ if (names.size() == 2) {
+ name += " and " + names.get(1); //$NON-NLS-1$
+ } else {
+ name += " and " + (names.size() - 1) + " others"; //$NON-NLS-1$
//$NON-NLS-2$
+ }
+ }
+ /** /
name = names.size() > 0 ? names.get(0) : ""; //$NON-NLS-1$
for (int i = 1; i < names.size(); i++) {
name += " & " + names.get(i); //$NON-NLS-1$
}
+ /**/
return name;
}