Community
Participate
Working Groups
Build Identifier: Source Editor - SQL Statement (Add, Add with Into, View, Validate, Remove, Reset) Source Editor - SQL Statement (Add, Add with Into, View, Validate, Remove, Reset) Reproducible: Always
More detailed description about this feature. Assume I have a record: record Item type sqlRecord { tablenames=[["EGL.ITEM"]], fieldsMatchColumns = yes, keyItems=[ITEM_ID] } ITEM_ID int {column="ITEM_ID"}; NAME string {column="NAME", maxLen=22}; IMAGE string {column="IMAGE", isSqlNullable=yes, maxLen=22}; PRICE decimal(7,2) {column="PRICE", isSqlNullable=yes}; DESCRIPTION string {column="DESCRIPTION", isSqlNullable=yes, maxLen=122}; end and an EGL variable whose type is Item: newRecord Item Function AddItem(newRecord Item, status StatusRec) add newRecord; end; When my mouse pointed at somewhere " add newRecord;", using SQL Statement --> Add will add the below SQL statement to " add newRecord;", and get: add newRecord with #sql{ insert into EGL.ITEM (ITEM_ID, NAME, IMAGE, PRICE, DESCRIPTION) values (:newRecord.ITEM_ID, :newRecord.name, :newRecord.Image, :newRecord.PRICE, :newRecord.DESCRIPTION) }; Other actions are similar to this one
changing from defect to enhancement.
As discussed, this should be implemented with content assist. Need to come up with a design for what needs to be implemented and the priorities.
Instead of Content Assist, Quick Assist might be a better choice to implement this function. Quick Assists are proposals available even if there is no problem or warning. They use the same short cut and action like Quick Fix. Quick assists are used for local code manipulations. See the Quick assist reference for more information. http://help.eclipse.org/indigo/topic/org.eclipse.jdt.doc.user/reference/ref-java-editor-quickassist.htm (In reply to comment #3) > As discussed, this should be implemented with content assist. Need to come up > with a design for what needs to be implemented and the priorities.
Created attachment 202952 [details] Framework support for sql edit
fix it offer Add SQL/Add SQL With Into/Remove SQL/Reset SQL using content assist style. only support basic record type.
reopen for more testing based on new spec
Please refer to bug 355573 for SQL Spec
1 Add Using Clause in default SQL generation, for using clause please refer to EXECUTE semantics 2. Quick Assist Cursor problem
Complete default SQL generation for simple scenarios for complex ones, please refer to bug 358837
close it