mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
add problems listener to update counter
This commit is contained in:
+6
-1
@@ -45,9 +45,11 @@ public class ErrorPaneConfigurable extends JPanel implements Configurable, Dispo
|
||||
private final Alarm myAlarm;
|
||||
private final ArrayList<ConfigurationError> myErrors = new ArrayList<ConfigurationError>();
|
||||
private final JTextPane myContent = new JTextPane();
|
||||
private Runnable myOnErrorsChanged;
|
||||
|
||||
public ErrorPaneConfigurable(final Project project, StructureConfigurableContext context) {
|
||||
public ErrorPaneConfigurable(final Project project, StructureConfigurableContext context, Runnable onErrorsChanged) {
|
||||
super(new BorderLayout());
|
||||
myOnErrorsChanged = onErrorsChanged;
|
||||
myContent.setEditorKit(UIUtil.getHTMLEditorKit());
|
||||
myContent.setEditable(false);
|
||||
myContent.setBackground(UIUtil.getListBackground());
|
||||
@@ -148,6 +150,9 @@ public class ErrorPaneConfigurable extends JPanel implements Configurable, Dispo
|
||||
}
|
||||
html += "</ol></body></html>";
|
||||
myContent.setText(html);
|
||||
if (myOnErrorsChanged != null) {
|
||||
myOnErrorsChanged.run();
|
||||
}
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
+6
-1
@@ -302,7 +302,12 @@ public class ProjectStructureConfigurable extends BaseConfigurable implements Se
|
||||
}
|
||||
|
||||
private void addErrorPane() {
|
||||
addConfigurable(new ErrorPaneConfigurable(myProject, myContext), true);
|
||||
addConfigurable(new ErrorPaneConfigurable(myProject, myContext, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mySidePanel.getList().repaint();
|
||||
}
|
||||
}), true);
|
||||
}
|
||||
|
||||
private void addGlobalLibrariesConfig() {
|
||||
|
||||
Reference in New Issue
Block a user