mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed after IDEA-CR-5228
This commit is contained in:
@@ -50,14 +50,14 @@ public class PyContentEntriesEditor extends CommonContentEntriesEditor {
|
||||
private final Module myModule;
|
||||
private Disposable myFilePointersDisposable;
|
||||
private MyContentEntryEditor myContentEntryEditor;
|
||||
private FacetErrorPanel myErrorPanel;
|
||||
private FacetErrorPanel myWarningPanel;
|
||||
|
||||
public PyContentEntriesEditor(Module module, ModuleConfigurationState moduleConfigurationState,
|
||||
JpsModuleSourceRootType<?>... rootTypes) {
|
||||
super(module.getName(), moduleConfigurationState, rootTypes);
|
||||
myRootTypeProviders = Extensions.getExtensions(PyRootTypeProvider.EP_NAME);
|
||||
myModule = module;
|
||||
myErrorPanel = new FacetErrorPanel();
|
||||
myWarningPanel = new FacetErrorPanel();
|
||||
reset();
|
||||
}
|
||||
|
||||
@@ -105,6 +105,10 @@ public class PyContentEntriesEditor extends CommonContentEntriesEditor {
|
||||
if (myFilePointersDisposable != null) {
|
||||
Disposer.dispose(myFilePointersDisposable);
|
||||
}
|
||||
|
||||
for (PyRootTypeProvider provider : myRootTypeProviders) {
|
||||
provider.disposeUIResources(myModule);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -292,10 +296,10 @@ public class PyContentEntriesEditor extends CommonContentEntriesEditor {
|
||||
|
||||
@Override
|
||||
protected void addAdditionalSettingsToPanel(JPanel mainPanel) {
|
||||
mainPanel.add(myErrorPanel.getComponent(), BorderLayout.SOUTH);
|
||||
mainPanel.add(myWarningPanel.getComponent(), BorderLayout.SOUTH);
|
||||
}
|
||||
|
||||
public FacetErrorPanel getErrorPanel() {
|
||||
return myErrorPanel;
|
||||
public FacetErrorPanel getWarningPanel() {
|
||||
return myWarningPanel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public abstract class PyRootTypeProvider {
|
||||
}
|
||||
};
|
||||
|
||||
public abstract void reset(@NotNull final Disposable disposable, PyContentEntriesEditor editor, Module module);
|
||||
public abstract void reset(@NotNull final Disposable disposable, PyContentEntriesEditor editor, @NotNull Module module);
|
||||
|
||||
public abstract void apply(Module module);
|
||||
|
||||
@@ -76,6 +76,9 @@ public abstract class PyRootTypeProvider {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void disposeUIResources(@NotNull Module module) {
|
||||
}
|
||||
|
||||
|
||||
protected class RootEntryEditingAction extends ContentEntryEditingAction {
|
||||
private final Disposable myDisposable;
|
||||
@@ -123,12 +126,12 @@ public abstract class PyRootTypeProvider {
|
||||
|
||||
private void addRoot(VirtualFilePointer root, PyContentEntriesEditor editor) {
|
||||
editor.getContentEntryEditor().addRoot(this, root);
|
||||
editor.getErrorPanel().getValidatorsManager().validate();
|
||||
editor.getWarningPanel().getValidatorsManager().validate();
|
||||
}
|
||||
|
||||
protected void removeRoot(VirtualFile selectedFile, PyContentEntriesEditor editor, ModifiableRootModel model) {
|
||||
editor.getContentEntryEditor().removeRoot(null, selectedFile.getUrl(), this);
|
||||
editor.getErrorPanel().getValidatorsManager().validate();
|
||||
editor.getWarningPanel().getValidatorsManager().validate();
|
||||
}
|
||||
|
||||
protected boolean hasRoot(VirtualFile file, PyContentEntriesEditor editor) {
|
||||
|
||||
Reference in New Issue
Block a user