views:

51

answers:

1

I find it a waste of time that every time I need to enter a string that I have to go edit the strings.xml file manually. What I'd like to be able to do ideally is have Eclipse pop up a dialog box that lets me specify the name of the resource and the value for it. Then Eclipse would generate the code in strings.xml and paste the correct reference to the string at the cursor position.

Does anyone know if such a facility exists? Anyone want to volunteer?

Thanks! Jeff

+1  A: 

Select a String, click Refactor --> Android --> Extract Android String.

antonyt
That's awesome, thanks! I never noticed the android submenu in the refactoring and found no mention of this in the ADT instructions on the android developer pages. Is there a list of supported refactorings (since they seem to be context sensitive?)Thanks!
glenviewjeff
I have never seen anything else other than "Extract Android String" in the Android refactoring submenu; although it is context sensitive the "Extract Android Substring" option always appears, albeit sometimes greyed out. I have nothing official to back me up unfortunately!
antonyt