| Summary: | [1.7][quick assist]Quick assists for base conversion | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Deepak Azad <deepakazad> | ||||
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> | ||||
| Status: | ASSIGNED --- | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P4 | CC: | markus.kell.r, pyvesdev | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Deepak Azad
The relevance of these quick assists should be lower than the relevance of the Extract ... quick assists.
Negative numbers will need some special love, otherwise converting e.g.
public static final int CONST= 0xFFFFFFFF;
to decimal will result in -1, and when you convert only the NumberLiteral back to hex, you'd get -0x1.
Also make sure it behaves well with floating-point literals.
Created attachment 197682 [details]
v0.5
I had written this code a while back. The patch uses apis from Integer class to do the parsing and conversion, but these APIs have not been completely updated (e.g. they do not handle underscores). Hence the patch is far from perfect. Will come back to it at some point in the future.
This seems like a nice feature. Any chance you could complete your patch Deepak? :) |