@@ -48,6 +48,7 @@ public class OverrideClassByAPreferenceDialog extends AbstractDialog { //NOPMD
48
48
@ NotNull
49
49
private final Project project ;
50
50
private final PhpClass targetClass ;
51
+ private boolean isInterface ;
51
52
private JPanel contentPane ;
52
53
private JButton buttonOK ;
53
54
private JButton buttonCancel ;
@@ -98,6 +99,7 @@ public OverrideClassByAPreferenceDialog(
98
99
this .targetClass = targetClass ;
99
100
this .validatorBundle = new ValidatorBundle ();
100
101
this .commonBundle = new CommonBundle ();
102
+ this .isInterface = false ;
101
103
102
104
setContentPane (contentPane );
103
105
setModal (true );
@@ -108,6 +110,9 @@ public OverrideClassByAPreferenceDialog(
108
110
inheritClass .setVisible (false );
109
111
inheritClassLabel .setVisible (false );
110
112
}
113
+ if (targetClass .isInterface ()) {
114
+ this .isInterface = true ;
115
+ }
111
116
suggestPreferenceClassName (targetClass );
112
117
suggestPreferenceDirectory (targetClass );
113
118
@@ -188,7 +193,8 @@ protected void onOK() {
188
193
targetClass ,
189
194
getPreferenceClassFqn (),
190
195
getNamespace (),
191
- isInheritClass ()
196
+ isInheritClass (),
197
+ isInterface
192
198
), project ).generate (OverrideClassByAPreferenceAction .ACTION_NAME , true );
193
199
194
200
this .setVisible (false );
0 commit comments