Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365600 - UIEvents constants should not be in lined
Summary: UIEvents constants should not be in lined
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-05 09:43 EST by Dean Roberts CLA
Modified: 2011-12-05 09:46 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Roberts CLA 2011-12-05 09:43:00 EST
As Tom Schindl pointed out, it is probably a good idea that the UIEvents constants NOT be in lined by the compiler.  

As it stands now, if we where to change the constants we could break any code that was not recompiled when the constants change.

The static initializer trick used by the Databinding-API would work fine.

public static final String MYKEY = notInlined("Test");
 		 		 		 
static String notInlined(String s) {
     return s;
}

Only marking this as a blocker so folks can decide if this should go in with this milestone.

I think it would be a good idea since it would be nice if the code went out without in lined constants.  But feel free to reduce the severity as you think best.

I will attach a patch in the next few minutes.
Comment 1 Thomas Schindl CLA 2011-12-05 09:46:46 EST
as outlined on the mailing list not inlineing is a bad idea because you can't use those values in annotations anymore (and String-Switch) :-)