PhpStorm 9.0.0 Help

Add New Field or Constant

UML Class diagram - Context menu of a node element | New | Field
Alt+Insert


ItemDescription
VisibilityFrom this drop-down list, select the desired visibility modifier.
TypeSpecify the type of the new field. Note that code completion works here. As you type, the suggestion list shrinks to show the matching options. Non-existent type is marked as a syntax error.
NameSpecify the name of the new field.
InitializerSpecify the initial value of the new field. Note that such value should correspond to the declared type. For example, if the type is String, the suggested initializer should be enclosed in quotes.

Note that code completion works here. As you type, the suggestion list shrinks to show the matching options. Non-existent type is marked as a syntax error.

StaticSelect this check box to add static to the field declaration.
FinalSelect this check box to add final to the field declaration.
PreviewThis read-only area shows the draft declaration as you fill in the dialog fields.

See Also

Last modified: 5 June 2015