| Summary: | [xtend2] quick fix for application of += operator on String objects not supported | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Matthias Wienand <matthias.wienand> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | nyssen, sebastian.zarnekow, sven.efftinge |
| Version: | 2.0.1 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Matthias Wienand
The operator '+=' is mapped to functions with the name 'add' (operator overloading). Since int doesn't define such a function (and there is no such extension function defined as well) the operator is not available for int. It wouldn't behave like in C or Java though, because ints are immutable. (In reply to comment #1) > The operator '+=' is mapped to functions with the name 'add' (operator > overloading). Since int doesn't define such a function (and there is no such > extension function defined as well) the operator is not available for int. It > wouldn't behave like in C or Java though, because ints are immutable. Okay. I expected it to work like in Java. Now I took a closer look at the documentation and noticed the difference between _operator_add() and _operator_plus() :) However, there is no quick fix available for Strings, though similar looking operators (<=) exist. Closed as won't fix since similar looking is not really similar if 50% of the characters are different. It would actually involve less keystrokes to fix the operator manually instead of scrolling through a list of proposals like !=, ==, <=, >=, <, > where even the alphabetic order is not too meaningful for the user. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |