14
14
import fr .adrienbrault .idea .symfony2plugin .util .SymfonyBundleUtil ;
15
15
import fr .adrienbrault .idea .symfony2plugin .util .dict .SymfonyBundle ;
16
16
import org .apache .commons .lang .StringUtils ;
17
+ import org .jetbrains .annotations .NotNull ;
17
18
import org .jetbrains .annotations .Nullable ;
18
19
19
20
import javax .swing .*;
@@ -40,7 +41,7 @@ public class TranslatorKeyExtractorDialog extends JDialog {
40
41
private final Project project ;
41
42
private final PsiFile fileContext ;
42
43
43
- public TranslatorKeyExtractorDialog (Project project , PsiFile fileContext , Collection <String > domains , String defaultDomain , OnOkCallback okCallback ) {
44
+ public TranslatorKeyExtractorDialog (@ NotNull Project project , @ NotNull PsiFile fileContext , @ NotNull Collection <String > domains , @ Nullable String defaultKey , @ NotNull String defaultDomain , @ NotNull OnOkCallback okCallback ) {
44
45
45
46
this .project = project ;
46
47
this .fileContext = fileContext ;
@@ -50,6 +51,10 @@ public TranslatorKeyExtractorDialog(Project project, PsiFile fileContext, Collec
50
51
comboBox1 .addItem (domain );
51
52
}
52
53
54
+ if (defaultKey != null ) {
55
+ textTranslationKey .setText (defaultKey );
56
+ }
57
+
53
58
setContentPane (contentPane );
54
59
setModal (true );
55
60
getRootPane ().setDefaultButton (buttonOK );
@@ -241,7 +246,7 @@ public IconColumn() {
241
246
public Icon valueOf (TranslationFileModel modelParameter ) {
242
247
243
248
if (modelParameter .isBoldness ()) {
244
- return Symfony2Icons .SYMFONY ;
249
+ return Symfony2Icons .BUNDLE ;
245
250
}
246
251
247
252
return modelParameter .getPsiFile ().getIcon (0 );
0 commit comments