| Summary: | replace "&&" with "&" in setPartName(String) | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | David Becker <david.becker> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ivan |
| Version: | 2.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
The ampersand character is escaped in DefaultTabItem#updateTabText. See line 115: http://grepcode.com/file/repository.grepcode.com/java/eclipse.org/3.7/org.eclipse.ui/workbench/3.7.0/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabItem.java?av=f This is the original workbench code. Please note that the workbench used by RAP is based on 3.7. Thank you for the clarification. I build as a workaround: 2 bundles with export the same package -> 1 package does nothing with the string (imported by RAP) -> 1 package replaces "&" with "&&" (imported by RCP) Are there Plans to backport recent changes in RCP into RAP-workbench? I'll mark this bug as INVALID as the code in question is original workbench 3.7 code. Updating the workbench to more recent code-base requires a lot of effort and we have no resources to do it in a close future. Any valuable contributions are welcomed. David, which RCP version did you use? If this issue is fixed in the 3.8 workbench code, we could get the change into RAP. Or is it only fixed in the Eclipse 4 compatibility layer? Ralf, sorry for late response - I was on vacation. I used RCP 4.2 |
In RCP a single "&" makes the next Glyph a Hotkey for the Part, but in RAP there is not the same behavior. RCP: setPartName("A&B") produces "A_B" (where "_" is below the "B" and makes the Part react to [ALT] + [B] setPartName("A&&B") produces "A&B" RAP setPartName("A&B") produces "A&B" (no Hotkey) setPartName("A&&B") produces "A&&B" This different behavior makes it difficult to single-source, so I would like it when setPartName() would react the same way. I don't need the hotkey funktion, so I replaced all "&" in my Titles with "&&", but now they don't look nice with RAP. Is there a workaround to check at runtime whether the code is run in a RAP or in a RCP environment?