use of com.intellij.openapi.module.impl.ModuleConfigurationStateImpl in project intellij-community by JetBrains.
the class PlatformContentEntriesConfigurable method createEditor.
private void createEditor() {
myModifiableModel = ApplicationManager.getApplication().runReadAction(new Computable<ModifiableRootModel>() {
@Override
public ModifiableRootModel compute() {
return ModuleRootManager.getInstance(myModule).getModifiableModel();
}
});
final ModuleConfigurationStateImpl moduleConfigurationState = new ModuleConfigurationStateImpl(myModule.getProject(), new DefaultModulesProvider(myModule.getProject())) {
@Override
public ModifiableRootModel getRootModel() {
return myModifiableModel;
}
@Override
public FacetsProvider getFacetsProvider() {
return DefaultFacetsProvider.INSTANCE;
}
};
myEditor = new CommonContentEntriesEditor(myModule.getName(), moduleConfigurationState, true, myRootTypes) {
@Override
protected List<ContentEntry> addContentEntries(VirtualFile[] files) {
List<ContentEntry> entries = super.addContentEntries(files);
addContentEntryPanels(entries.toArray(new ContentEntry[entries.size()]));
return entries;
}
};
JComponent component = ApplicationManager.getApplication().runReadAction(new Computable<JComponent>() {
@Override
public JComponent compute() {
return myEditor.createComponent();
}
});
myTopPanel.add(component, BorderLayout.CENTER);
}
use of com.intellij.openapi.module.impl.ModuleConfigurationStateImpl in project intellij-community by JetBrains.
the class PyContentEntriesModuleConfigurable method createEditor.
private void createEditor() {
if (myModule == null)
return;
myModifiableModel = ApplicationManager.getApplication().runReadAction(new Computable<ModifiableRootModel>() {
@Override
public ModifiableRootModel compute() {
return ModuleRootManager.getInstance(myModule).getModifiableModel();
}
});
final ModuleConfigurationStateImpl moduleConfigurationState = new ModuleConfigurationStateImpl(myModule.getProject(), new DefaultModulesProvider(myModule.getProject())) {
@Override
public ModifiableRootModel getRootModel() {
return myModifiableModel;
}
@Override
public FacetsProvider getFacetsProvider() {
return DefaultFacetsProvider.INSTANCE;
}
};
myEditor = createEditor(myModule, moduleConfigurationState);
JComponent component = ApplicationManager.getApplication().runReadAction(new Computable<JComponent>() {
@Override
public JComponent compute() {
return myEditor.createComponent();
}
});
myTopPanel.add(component, BorderLayout.CENTER);
}
Aggregations