| Summary: | [Validation] Need validation for queries | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Nan Li <nan.n.li> | ||||||||||||
| Component: | General | Assignee: | Nan Li <nan.n.li> | ||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||
| Severity: | enhancement | ||||||||||||||
| Priority: | P3 | CC: | neil.hauge | ||||||||||||
| Version: | unspecified | Flags: | neil.hauge:
review+
|
||||||||||||
| Target Milestone: | 3.0 M5 | ||||||||||||||
| Hardware: | PC | ||||||||||||||
| OS: | Windows 7 | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Nan Li
Created attachment 185676 [details]
Patch
The changes are tested and attached for review. Please note that until the fix has been committed, we want to leave the bug in an open state. Patch comments: - Regarding item 3. The Add Dialog name validation needs to consider whether or not the duplicate is really an override, in the case where it is being defined in the ORM XML. This would not be an error and therefore should be allowed. A warning could be used in this case to notify the user that the query will override an existing query. Created attachment 186435 [details]
Patch
This patch includes the previous fixes and the fixes for the patch review comments.
Additional comments to the patch:
1. Some warning messages are confusing. Possible changes could be
eclipselink_ui_details.properties:
EclipseLinkConverterStateObject_nameExists = The given name already exists. This converter may override the existing one(s) with the same name.
jpt_ui_details.properties:
AddQueryDialog_nameExists=The given name exists. This query may be overridden by or override the one(s) with the same name.
jpt_ui_details_orm.properties:
GeneratorStateObject_nameExists=The given name already exists. This generator may override the existing one(s) with the same name.
2. We could make a small change like below to the method clearMessage() of ValidatingDialog class to return a message instead of null when the creation is ready to go.
protected final void clearMessage(){
setMessage("It is ready to create!");
}
(In reply to comment #6) - I like the wording suggestions proposed in item 1. For clearMessage() we should set the message back to the default message displayed when the dialog is first displayed. - There is a missing file in the patch: org.eclipse.jpt.core.internal.validation.JpaValidationMessages - In JavaEclipseLinkConverter there is a reference to JpaValidationMessages.ID_MAPPING_UNRESOLVED_CONVERTER_NAME. Since this is a Converter reference this message should be defined in the EclipseLinkJpaValidationMessages. Not sure if there are any other instances like this. I'd like to chat with you about some of the validation logic as well so I'll get in touch with you tomorrow about that. (In reply to comment #7) > - I like the wording suggestions proposed in item 1. For clearMessage() we > should set the message back to the default message displayed when the dialog is > first displayed. This is done and will be in the new proposed patch of this bug along with the changes to the warning messages. > - There is a missing file in the patch: > org.eclipse.jpt.core.internal.validation.JpaValidationMessages This file was in the proposed patch of bug 332673 to avoid committing it multiple times, but will be included in the new proposed patch of this bug and remove it from the new proposed patch of bug 332673. > - In JavaEclipseLinkConverter there is a reference to > JpaValidationMessages.ID_MAPPING_UNRESOLVED_CONVERTER_NAME. Since this is a > Converter reference this message should be defined in the > EclipseLinkJpaValidationMessages. Not sure if there are any other instances > like this. The ID_MAPPING_UNRESOLVED_CONVERTER_NAME was defined in the wrong file, but the content of it is in the right file, EclipseLinkJpaValidationMessages. The reference is changed to EclipseLinkJpaValidationMessages.ID_MAPPING_UNRESOLVED_CONVERTER_NAME and this is the only case that has such issue. Created attachment 186772 [details]
Patch
Compare to the previous patch, this one includes
1. Fixes for the text range of converters
2. Updates for the warning message
3. Updates for integrating the comments
Created attachment 187219 [details]
Patch
-Merged the new changes of the code from others
-Updated the code according to the new changes
Created attachment 187323 [details]
Patch
-Merged new changes to OrmEclipseLinkConverterContainerImpl.java
Patch committed to head. |