Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 365600

Summary: UIEvents constants should not be in lined
Product: [Eclipse Project] Platform Reporter: Dean Roberts <dean.t.roberts>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: blocker    
Priority: P3 CC: tom.schindl
Version: 4.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

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) :-)