Bug 1169777
| Summary: | Source tab inconsistencies - editing allowed | ||
|---|---|---|---|
| Product: | [Retired] JBoss BRMS Platform 6 | Reporter: | Zuzana Krejčová <zkrejcov> |
| Component: | Data Modeler | Assignee: | Walter Medvedeo <wmedvede> |
| Status: | CLOSED EOL | QA Contact: | Lukáš Petrovický <lpetrovi> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.1.0 | CC: | etirelli, kverlaen, lpetrovi |
| Target Milestone: | ER3 | ||
| Target Release: | 6.1.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-03-27 19:42:06 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Zuzana Krejčová
2014-12-02 12:32:09 UTC
The fact of letting the user edit the code was done by intention. It was requested to have an editable source tab in order to let the user do "small" modifications or to put some other annotations, etc. So I guess this is something we should maintain. A trade-off we can do is to set the source tab editable ONLY for users with roles developer or admin. It is still something we should avoid. 1. There is no guarantee that admin and developer users will have any knowledge of java and therefore be able to make the small change you talk about and only that small change. 2. If there is a mistake, the Data Modeler still allows you to save the changes, no validation is done. Sure, there is the Problems panel, but many compile-time errors will be quite confusing for the typical user (imagine forgetting a semicolon or something like that). The source tab doesn't even have any syntax highlighting to make debugging easier. 3. Yes, we need to be able to work with annotations, but doing it this way is rather unfortunate. You're trying to fix a flaw in the design (of the DM tool) by a patch in the code - things like that simply don't work, they just bring more bugs in the code. 4. If we insist on allowing business-central users to manually change the java code of the data model, we should also make sure that the DM can handle all the possible changes made in the Source tab. 5. If the Source tab is to be editable, it would be better to rename it (for the DM) to something like source editor or simple editor or something similar. As I've said, for other assets, Source tab is not editable, therefore, users might not even notice they have changed something in the DM Source tab. Well, to be honest I'm not sure if there's at ticket. But It was largely discussed, etc. And of course we know that this is not a complete Web JAVA IDE. The "Editor tab" can manage a subset of the java language, basically the fields, constructors, jbpm/drools related anntations, that are of our interest at the moment. If there are pieces of code that the "Editor tab" can't manage they will remain untouched. (no code loses) The source tab can be used for many thinigs, etc., if the user pull a .java file with sintax errors, then instead of just letting .java useless, the source tab can be used to correct errors, or again it can be used to add annotations that we don't manage at the moment. A common example is projects that uses JPA, the "Editor tab" can't manage this annotations at the moment, but if some small change needs to be done we can still use the source tab, etc. For more doubts or if it's wanted to remove this feature please ask Edson Tirelly / Mark Proctor. I believe the recommendation to only make the source tab editable in case you are an admin / developer is best (at least short term, i.e. for 6.1). We expect a person with the role developer to know what he's doing (or not change the source if he doesn't), at least for now. The idea (as Walter explained) is to allow developers to do small changes without necessarily having to go through git to fetch the source and push changes. Walter, could you also make sure that, if the developer does make a mistake, that the data modeler can still be opened (possibly in the source tab), so he can correct his mistake at least? Correct, we can provide an editable source tab for admin/developer roles, and let the source tab to be opened by default when a .java file has errors. Alright, this seems like a reasonable compromise. Thanks for the input and explanations, Kris, Walter. The change has been done in both 6.2.x and master branches. Now the source edition will be available for users with role "admin" or "developer". 6.2.x http://github.com/droolsjbpm/kie-wb-common/commit/500df0bdf push master URL: http://github.com/droolsjbpm/kie-wb-common/commit/1481eb9d1 push 6.2.x http://github.com/droolsjbpm/kie-wb-distributions/commit/4309fb875 push master URL: http://github.com/droolsjbpm/kie-wb-distributions/commit/4c0348109 |