Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio - IntelliJ new java class wizard

After last Android Studio update, there's the following new java class wizard right after picking the name:

enter image description here

Couldn't find any guide on how to use it because it doesn't auto-completes anything.

Is there a way to return to the old wizard?

like image 639
piojo Avatar asked Jun 12 '20 07:06

piojo


Video Answer


2 Answers

You can disable this dialog by reset your class template to default in Settings -> Editor -> File and Code Templates: screenshot

This dialog shown when template has variables which can not be provided automatically. I think studio installer forgot update templates from previous setup where new class dialog had more options.

like image 185
xkor Avatar answered Oct 19 '22 23:10

xkor


Couldn't find any guide on how to use it because it doesn't auto-completes anything.

From the Android Studio Documentation:

Android Studio replaces file template variables with values in the generated Java file. You enter the values in the Create New Class dialog. The template has the following variables that you can use:

  • IMPORT_BLOCK - A newline-delimited list of Java import statements necessary to support any superclass or interfaces, or an empty string (""). For example, If you only implement the Runnable interface and extend nothing, this variable will be import java.lang.Runnable;\n. If you implement the Runnable interface and extend the Activity class, it will be import android.app.Activity;\nimportjava.lang.Runnable;\n.
  • VISIBILITY - Whether the class will have public access or not. It can have a value of PUBLIC or PACKAGE_PRIVATE.
  • SUPERCLASS - A single class name, or empty. If present, there will be an extends ${SUPERCLASS} clause after the new class name.
  • INTERFACES - A comma-separated list of interfaces, or empty. If present, there will be an implements ${INTERFACES} clause after the superclass, or after the class name if there’s no superclass. For interfaces and annotation types, the interfaces have the extends keyword.
  • ABSTRACT - Whether the class should be abstract or not. It can have a value of TRUE or FALSE.
  • FINAL - Whether the class should be final or not. It can have a value of TRUE or FALSE.

Is there a way to return to the old wizard?

NO. you cannot revert back to old style new class dialog.

like image 35
Maddy Blacklisted Avatar answered Oct 20 '22 01:10

Maddy Blacklisted