mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
copyright: fix initialization order configurables (IDEA-104512)
This commit is contained in:
+9
-2
@@ -59,10 +59,17 @@ public class CopyrightFormattingConfigurable extends SearchableConfigurable.Pare
|
||||
}
|
||||
|
||||
public JComponent createComponent() {
|
||||
myPanel = new TemplateCommentPanel(null, null, null, myProject);
|
||||
getOrCreateMainPanel();
|
||||
return myPanel.createComponent();
|
||||
}
|
||||
|
||||
private TemplateCommentPanel getOrCreateMainPanel() {
|
||||
if (myPanel == null) {
|
||||
myPanel = new TemplateCommentPanel(null, null, null, myProject);
|
||||
}
|
||||
return myPanel;
|
||||
}
|
||||
|
||||
public boolean isModified() {
|
||||
return myPanel.isModified();
|
||||
}
|
||||
@@ -89,7 +96,7 @@ public class CopyrightFormattingConfigurable extends SearchableConfigurable.Pare
|
||||
final Configurable[] children = new Configurable[types.length];
|
||||
Arrays.sort(types, new FileTypeUtil.SortByName());
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
children[i] = FileTypeCopyrightConfigurableFactory.createFileTypeConfigurable(myProject, types[i], myPanel);
|
||||
children[i] = FileTypeCopyrightConfigurableFactory.createFileTypeConfigurable(myProject, types[i], getOrCreateMainPanel());
|
||||
}
|
||||
return children;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user