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

Bug 363031

Summary: [xbase][compiler] Allow to inline static extensions (e.g. operation_plus)
Product: [Modeling] TMF Reporter: Sebastian Zarnekow <sebastian.zarnekow>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: jan, sven.efftinge
Version: 2.1.0Flags: sebastian.zarnekow: juno+
Target Milestone: M6   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Sebastian Zarnekow CLA 2011-11-07 04:44:31 EST
I think a very simple approach could be something along these lines:

public class StringExtensions {

  @Inline("%0s + %1s")
  public static String operator_plus(String a, String b) {
    return a + b;
  }

}
Comment 1 Sebastian Zarnekow CLA 2012-02-27 15:07:27 EST
Pushed to master.
Comment 2 Jan Koehnlein CLA 2012-02-28 05:10:48 EST
Cool, macros in Xbase :-)
Comment 3 Karsten Thoms CLA 2017-09-19 16:55:42 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 17:06:35 EDT
Closing all bugs that were set to RESOLVED before Neon.0