How to add Eclipse Code Formatter file in Android Studio -


what have:

i have customised code format (.xml) file team wants use in our project. file includes predefined coding styles , conventions java file.

what want do:

now have add formatter default code format, when click shortcut of auto code format, entire file formatted according the conventions defined in formatter.

after long 2days effort managed steps integrate eclipse code formatter in android studio

here sharing step step procedures integrate eclipse code formatter in android studio:

step 1: go plugins section of android studio. easiest way click shift twice , type plugins. go plugins menu.

enter image description here

step 2: click on browse repositories

enter image description here

step 3: type eclipse code formatter in search box. select , click install button in right section

enter image description here

step 4: after successful installation can see blue eclipse icon in top pen

enter image description here

step 5: go settings >> other settings >> eclipse code formatter

click browse button.

enter image description here

step 6: select code format xml file

enter image description here

thats it

any time click code formatting command full code formatted according code formatter.

code formatting shortcut:

windows: ctrl + alt + l

linux: ctrl + start + alt + l

mac: option + command + l

in case want see how code formatter xml looks, can check this one.

one of used code style used google here.


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -