Skip to content

Commit 3d3d752

Browse files
committed
1.1.18 h2 add comment
1 parent d1514b0 commit 3d3d752

File tree

14 files changed

+167
-87
lines changed

14 files changed

+167
-87
lines changed

META-INF/MANIFEST.MF

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: ermasterr
44
Bundle-SymbolicName: org.insightech.er;singleton:=true
5-
Bundle-Version: 1.1.17
5+
Bundle-Version: 1.1.18
66
Bundle-Activator: org.insightech.er.ERDiagramActivator
77
Bundle-Localization: plugin
88
Require-Bundle: org.eclipse.ui,

README.md

+71-71
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,71 @@
1-
# ERMaster
2-
3-
A fork of ERMaster. Faster, Better, VCS-friendly.
4-
5-
Original version is http://ermaster.sourceforge.net
6-
7-
> ERMaster is GUI editor for ER diagram.
8-
> It runs as Eclipse plug-in.
9-
> It can be done graphically to making ER diagram, printing ER diagram, exporting the DDL from ER diagram, etc. .
10-
> Moreover, importing from DB, management of the group, and the historical management, etc. are supported.
11-
12-
# Install
13-
14-
1. Install Eclipse
15-
16-
Package: `Eclipse IDE for Java Developers`
17-
18-
2. Install PDE plug-in
19-
20-
Plug-in name: `Eclipse PDE Plug-in Developer Resources`
21-
22-
3. Install ermasterr
23-
24-
Update Site:
25-
26-
`https://thinkgem.gitee.io/ermasterr/updatesite`
27-
28-
or
29-
30-
`https://thinkgem.github.io/ermasterr/updatesite`
31-
32-
or
33-
34-
Copy the contents of the [dropins folder](https://gitee.com/thinkgem/ermasterr/tree/master/dropins/ermasterr/eclipse/plugins) to the dropins folder located in the root of your Eclipse installation.
35-
36-
Directory tree example:
37-
38-
```
39-
your_eclipse_install_dir/
40-
└── dropins/
41-
└── ermasterr/
42-
└── eclipse/
43-
└── plugins/
44-
└── org.insightech.er_x.y.z.jar
45-
```
46-
47-
or put jar file to dropins directly.
48-
49-
```
50-
your_eclipse_install_dir/
51-
└── dropins/
52-
└── org.insightech.er_x.y.z.jar
53-
```
54-
55-
# Features
56-
57-
## Faster
58-
59-
* ermasterr prevented a increase of the drawing time by getting rid of tabs of each category and skipping expensive initialization for each category.
60-
61-
## Better
62-
63-
* ermasterr has fixed the issue that erdiagram data file size becomes gigantic in sometimes by writing a large amount of same xml tags. (https://sourceforge.net/p/ermaster/bugs/119/)
64-
65-
## VCS-friendly
66-
67-
* ermasterr can write git-mergable erdiagram data as far as possible. (https://sourceforge.net/p/ermaster/feature-requests/104/)
68-
69-
# License
70-
71-
Apache License V2.0
1+
# ERMaster
2+
3+
A fork of ERMaster. Faster, Better, VCS-friendly.
4+
5+
Original version is http://ermaster.sourceforge.net
6+
7+
> ERMaster is GUI editor for ER diagram.
8+
> It runs as Eclipse plug-in.
9+
> It can be done graphically to making ER diagram, printing ER diagram, exporting the DDL from ER diagram, etc. .
10+
> Moreover, importing from DB, management of the group, and the historical management, etc. are supported.
11+
12+
# Install
13+
14+
1. Install Eclipse
15+
16+
Package: `Eclipse IDE for Java Developers`
17+
18+
2. Install PDE plug-in
19+
20+
Plug-in name: `Eclipse PDE Plug-in Developer Resources`
21+
22+
3. Install ermasterr
23+
24+
Update Site:
25+
26+
`https://thinkgem.gitee.io/ermasterr/updatesite`
27+
28+
or
29+
30+
`https://thinkgem.github.io/ermasterr/updatesite`
31+
32+
or
33+
34+
Copy the contents of the [org.insightech.er_x.y.z.jar](https://gitee.com/thinkgem/ermasterr/tree/master/updatesite/plugins) latest version to the dropins folder located in the root of your Eclipse installation.
35+
36+
Directory tree example:
37+
38+
```
39+
your_eclipse_install_dir/
40+
└── dropins/
41+
└── ermasterr/
42+
└── eclipse/
43+
└── plugins/
44+
└── org.insightech.er_x.y.z.jar
45+
```
46+
47+
or put jar file to dropins directly.
48+
49+
```
50+
your_eclipse_install_dir/
51+
└── dropins/
52+
└── org.insightech.er_x.y.z.jar
53+
```
54+
55+
# Features
56+
57+
## Faster
58+
59+
* ermasterr prevented a increase of the drawing time by getting rid of tabs of each category and skipping expensive initialization for each category.
60+
61+
## Better
62+
63+
* ermasterr has fixed the issue that erdiagram data file size becomes gigantic in sometimes by writing a large amount of same xml tags. (https://sourceforge.net/p/ermaster/bugs/119/)
64+
65+
## VCS-friendly
66+
67+
* ermasterr can write git-mergable erdiagram data as far as possible. (https://sourceforge.net/p/ermaster/feature-requests/104/)
68+
69+
# License
70+
71+
Apache License V2.0
Binary file not shown.

features/feature.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<feature
33
id="org.insightech.er"
44
label="ERMaster Features"
5-
version="1.1.17"
5+
version="1.1.18"
66
provider-name="jeesite.com">
77

88
<description url="http://jeesite.com">

src/org/insightech/er/db/impl/h2/H2DDLCreator.java

+85
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
package org.insightech.er.db.impl.h2;
22

3+
import java.util.ArrayList;
4+
import java.util.List;
5+
36
import org.insightech.er.editor.model.ERDiagram;
47
import org.insightech.er.editor.model.dbexport.ddl.DDLCreator;
58
import org.insightech.er.editor.model.diagram_contents.element.node.category.Category;
9+
import org.insightech.er.editor.model.diagram_contents.element.node.table.ERTable;
10+
import org.insightech.er.editor.model.diagram_contents.element.node.table.column.Column;
11+
import org.insightech.er.editor.model.diagram_contents.element.node.table.column.NormalColumn;
12+
import org.insightech.er.editor.model.diagram_contents.not_element.group.ColumnGroup;
613
import org.insightech.er.editor.model.diagram_contents.not_element.sequence.Sequence;
714
import org.insightech.er.editor.model.diagram_contents.not_element.tablespace.Tablespace;
815
import org.insightech.er.util.Check;
@@ -13,6 +20,84 @@ public H2DDLCreator(final ERDiagram diagram, final Category targetCategory, fina
1320
super(diagram, targetCategory, semicolon);
1421
}
1522

23+
/**
24+
* {@inheritDoc}
25+
*/
26+
@Override
27+
public List<String> getCommentDDL(final ERTable table) {
28+
final List<String> ddlList = new ArrayList<String>();
29+
30+
String tableComment = filterComment(table.getLogicalName(), table.getDescription(), false);
31+
tableComment = replaceLF(tableComment, LF());
32+
33+
if (!Check.isEmpty(tableComment)) {
34+
final StringBuilder ddl = new StringBuilder();
35+
36+
ddl.append("COMMENT ON TABLE ");
37+
ddl.append(filterName(table.getNameWithSchema(getDiagram().getDatabase())));
38+
ddl.append(" IS '");
39+
ddl.append(tableComment.replaceAll("'", "''"));
40+
ddl.append("'");
41+
if (semicolon) {
42+
ddl.append(";");
43+
}
44+
45+
ddlList.add(ddl.toString());
46+
}
47+
48+
for (final Column column : table.getColumns()) {
49+
if (column instanceof NormalColumn) {
50+
final NormalColumn normalColumn = (NormalColumn) column;
51+
52+
String comment = filterComment(normalColumn.getLogicalName(), normalColumn.getDescription(), true);
53+
comment = replaceLF(comment, LF());
54+
55+
if (!Check.isEmpty(comment)) {
56+
final StringBuilder ddl = new StringBuilder();
57+
58+
ddl.append("COMMENT ON COLUMN ");
59+
ddl.append(filterName(table.getNameWithSchema(getDiagram().getDatabase())));
60+
ddl.append(".");
61+
ddl.append(filterName(normalColumn.getPhysicalName()));
62+
ddl.append(" IS '");
63+
ddl.append(comment.replaceAll("'", "''"));
64+
ddl.append("'");
65+
if (semicolon) {
66+
ddl.append(";");
67+
}
68+
69+
ddlList.add(ddl.toString());
70+
}
71+
72+
} else {
73+
final ColumnGroup columnGroup = (ColumnGroup) column;
74+
75+
for (final NormalColumn normalColumn : columnGroup.getColumns()) {
76+
final String comment = filterComment(normalColumn.getLogicalName(), normalColumn.getDescription(), true);
77+
78+
if (!Check.isEmpty(comment)) {
79+
final StringBuilder ddl = new StringBuilder();
80+
81+
ddl.append("COMMENT ON COLUMN ");
82+
ddl.append(filterName(table.getNameWithSchema(getDiagram().getDatabase())));
83+
ddl.append(".");
84+
ddl.append(filterName(normalColumn.getPhysicalName()));
85+
ddl.append(" IS '");
86+
ddl.append(comment.replaceAll("'", "''"));
87+
ddl.append("'");
88+
if (semicolon) {
89+
ddl.append(";");
90+
}
91+
92+
ddlList.add(ddl.toString());
93+
}
94+
}
95+
}
96+
}
97+
98+
return ddlList;
99+
}
100+
16101
@Override
17102
protected String getDDL(final Tablespace tablespace) {
18103
return null;

src/org/insightech/er/editor/controller/editpart/outline/sequence/SequenceSetOutlineEditPart.java

+6-8
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,12 @@ protected List getModelChildren() {
2929
*/
3030
@Override
3131
protected void refreshOutlineVisuals() {
32-
if (!DBManagerFactory.getDBManager(getDiagram()).isSupported(DBManager.SUPPORT_SEQUENCE)) {
33-
((TreeItem) getWidget()).setForeground(ColorConstants.lightGray);
34-
35-
} else {
36-
((TreeItem) getWidget()).setForeground(ColorConstants.black);
37-
38-
}
39-
32+
// if (!DBManagerFactory.getDBManager(getDiagram()).isSupported(DBManager.SUPPORT_SEQUENCE)) {
33+
// ((TreeItem) getWidget()).setForeground(ColorConstants.lightGray);
34+
//
35+
// } else {
36+
// ((TreeItem) getWidget()).setForeground(ColorConstants.black);
37+
// }
4038
setWidgetText(ResourceString.getResourceString("label.sequence") + " (" + getModelChildren().size() + ")");
4139
setWidgetImage(ERDiagramActivator.getImage(ImageKey.DICTIONARY));
4240
}

updatesite/artifacts.jar

22 Bytes
Binary file not shown.

updatesite/content.jar

555 Bytes
Binary file not shown.
669 Bytes
Binary file not shown.

updatesite/site.xml

+3-6
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@
33
<description name="ermasterr" url="https://gitee.com/thinkgem/ermasterr">
44
ER Master 是一个用于设计ER模型图的Eclipse插件。提供的功能包括:从数据库导入关系生成ER图,导出设计图,导出DDL数据定义语句等。目前完整支持的数据库包括 MySQL、PostgreSQL、Oracle、SQLServer、DB2等。
55
</description>
6-
<feature url="features/org.insightech.er_1.1.16.jar" id="org.insightech.er" version="1.1.16">
7-
<category name="ermaster"/>
6+
<feature url="features/org.insightech.er_1.1.18.jar" id="org.insightech.er" version="1.1.18">
7+
<category name="ERMaster"/>
88
</feature>
9-
<feature url="features/org.insightech.er_1.1.17.jar" id="org.insightech.er" version="1.1.17">
10-
<category name="ermaster"/>
11-
</feature>
12-
<category-def name="ermaster" label="ERMaster"/>
9+
<category-def name="ERMaster" label="ERMaster"/>
1310
</site>

0 commit comments

Comments
 (0)