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

Bug 331848

Summary: "Replace by" tool acts unexpectedly when processing mixed case substitutions
Product: [Modeling] Acceleo Reporter: Glenview Jeff <junk>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: laurent.goubet
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Glenview Jeff CLA 2010-12-04 14:01:05 EST
Build Identifier: M20100211-1343

try.this.This.bug

if you select the word lower-case "this" above, hit control-space, then you get the following:

try.[name/].[name.toUpperFirst()/].bug

Before you hit enter, add "name.toLower()." 

What you'll then get is:  

try.[name.toLower()/].[name.toLower().toUpperFirst()/].bug

Acceleo should automatically add the .toLower so I don't have to.  Alternately it should warn you or ignore the extra methods added to the replacement name.

Of course I can split this into two separate replacement steps, but I'd prefer not to.

Thanks!
Jeff


Reproducible: Always

Steps to Reproduce:
See above
Comment 1 Laurent Goubet CLA 2016-03-31 03:59:01 EDT
This works as designed, and is not a feature we intend to change.

if the 'name' is mixed case, we do not want an automatic toLower(). For example if the name is "MyPackage" then adding an automatic toLower() would lose the capital P even with the subsequent toUpperFirst().