IntelliJ IDEA 2017.3 Help

New MXML Component dialog

File | New | MXML Component

Use this dialog to specify the settings for an MXML component to be created. You can also create a new package if you specify the package that doesn't yet exist.

Item Description
Name Specify the name of the component. This is the name of the .mxml file which will be created.

When the cursor is in this field, you can use the Up and Down arrow keys to browse the contents of the Template list.

Package Specify the fully qualified name of the package in which the component should be created. To do that, you can:
  • Select the package from the list.
  • Click browseButton (Shift+Enter) and select the package in the Choose Destination Package dialog that opens.
  • Type in the field. To enable package name completion, press Ctrl+Space.

This field may be left blank. In this case, the component will be created in the default root package (usually corresponds to the src folder).

If you type the name of a package that doesn't yet exist (the name in this case is shown red), the corresponding package will be created.

You can create more than one package at once. For example, if you type myPackage.mySubpackage and none of these packages currently exists, both these packages (myPackage and mySubpackage) will be created.

Template Select the file template to be used.

Initially, there is only one choice which is different depending on the Flex SDK version associated with the active build configuration (MXML 4 Component for Flex SDK 4 or MXML 3 Component for Flex SDK 3).

  • Class. Select this template to create a class that doesn't extend another class or implement an interface.
  • Class with Supers. Select this template to create a class that extends another class and/or implements one or more interfaces.
  • Interface. Select this template to create an interface.

To edit an existing file template or to create a new one, click browseButton (Shift+Enter). The File Templates dialog will open.

If the selected template contains variables whose values are undefined, the Next button appears in the dialog instead of the Create button. In such a case, if you click Next, an additional dialog opens in which you can set the variable values. (This may happen if a custom template that contains custom variables is used.)

See also, Predefined file template variables for ActionScript and Flex and An example of creating a custom file template for an MXML component.

Parent component Specify a parent component for the component that you are creating. The parent component defines the root tag of the new MXML component, e.g. <s:Application>, <s:Module>, <s:ComboBox>.

To specify the parent component, you can:

  • Click browseButton (Shift+Enter) and select the component in the Choose Superclass dialog that opens.
  • Type in the field. To enable component name completion, press Ctrl+Space.
Last modified: 6 March 2018

See Also