# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /home/matthias/NetBeansProjects/main-golden
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: db.sql.editor/nbproject/project.xml
--- db.sql.editor/nbproject/project.xml Base (BASE)
+++ db.sql.editor/nbproject/project.xml Locally Modified (Based On LOCAL)
@@ -81,7 +81,7 @@
0-1
- 0.8
+ 1.2
Index: db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionItem.java
--- db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionItem.java Base (BASE)
+++ db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionItem.java Locally Modified (Based On LOCAL)
@@ -108,8 +108,14 @@
}
// view - bit ugly but can be easily refactored
- public static SQLCompletionItem column(boolean view, QualIdent tupleName, String columnName, String substText, int substOffset, SubstitutionHandler substHandler) {
- return new Column(view, tupleName, columnName, substText, substOffset, substHandler);
+ public static SQLCompletionItem column(boolean view,
+ QualIdent tupleName,
+ String columnName,
+ String dataType,
+ String substText,
+ int substOffset,
+ SubstitutionHandler substHandler) {
+ return new Column(view, tupleName, columnName, dataType, substText, substOffset, substHandler);
}
public static SQLCompletionItem keyword(String keyword, int substOffset, SubstitutionHandler substHandler) {
@@ -132,7 +138,9 @@
}
public int getPreferredWidth(Graphics g, Font defaultFont) {
- return CompletionUtilities.getPreferredWidth(getLeftHtmlText(), getRightHtmlText(), g, defaultFont);
+ int width = CompletionUtilities.getPreferredWidth(getLeftHtmlText(), getRightHtmlText(), g, defaultFont);
+ width += 20; // give some more room for visible seperation
+ return width;
}
public void render(Graphics g, Font defaultFont, Color defaultColor, Color backgroundColor, int width, int height, boolean selected) {
@@ -375,12 +383,20 @@
private final String columnName;
private String leftText;
private String rightText;
+ private String dataType;
- public Column(boolean view, QualIdent tableName, String columnName, String substText, int substOffset, SubstitutionHandler substHandler) {
+ public Column(boolean view,
+ QualIdent tableName,
+ String columnName,
+ String dataType,
+ String substText,
+ int substOffset,
+ SubstitutionHandler substHandler) {
super(substText, substOffset, substHandler);
this.view = view;
this.tableName = tableName;
this.columnName = columnName;
+ this.dataType = dataType;
}
protected String getColumnName() {
@@ -412,8 +428,16 @@
sb.append(TABLE_COLOR);
sb.append(tableName.toString());
sb.append(COLOR_END);
- rightText = MessageFormat.format(NbBundle.getMessage(SQLCompletionItem.class, view ? "MSG_View" : "MSG_Table"), sb.toString());
+ rightText = MessageFormat.format(
+ NbBundle.getMessage(SQLCompletionItem.class, view ? "MSG_View" : "MSG_Table"), sb.toString());
+ sb.setLength(0);
+ if (dataType != null && (! dataType.trim().isEmpty())) {
+ sb.append(" (");
+ sb.append(dataType.trim());
+ sb.append(")");
+ rightText += sb.toString();
}
+ }
return rightText;
}
Index: db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionItems.java
--- db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionItems.java Base (BASE)
+++ db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionItems.java Locally Modified (Based On LOCAL)
@@ -213,6 +213,7 @@
tuple instanceof View,
qualTableName,
columnName,
+ column.getTypeName(),
doQuote(columnName, quote),
ownOffset,
ownHandler ?