use of com.intellij.openapi.roots.ui.configuration.projectRoot.daemon.ModuleProjectStructureElement in project intellij-community by JetBrains.
the class ProjectJdkConfigurable method clearCaches.
private void clearCaches() {
final ModuleStructureConfigurable rootConfigurable = ModuleStructureConfigurable.getInstance(myProject);
Module[] modules = rootConfigurable.getModules();
for (Module module : modules) {
final StructureConfigurableContext context = rootConfigurable.getContext();
context.getDaemonAnalyzer().queueUpdate(new ModuleProjectStructureElement(context, module));
}
}
use of com.intellij.openapi.roots.ui.configuration.projectRoot.daemon.ModuleProjectStructureElement in project intellij-community by JetBrains.
the class ModuleJdkConfigurable method clearCaches.
private void clearCaches() {
final Module module = getRootModel().getModule();
final Project project = module.getProject();
final StructureConfigurableContext context = ModuleStructureConfigurable.getInstance(project).getContext();
context.getDaemonAnalyzer().queueUpdate(new ModuleProjectStructureElement(context, module));
}
use of com.intellij.openapi.roots.ui.configuration.projectRoot.daemon.ModuleProjectStructureElement in project intellij-community by JetBrains.
the class ModuleStructureConfigurable method removeLibraryOrderEntry.
public void removeLibraryOrderEntry(final Module module, final Library library) {
final ModuleEditor moduleEditor = myContext.myModulesConfigurator.getModuleEditor(module);
LOG.assertTrue(moduleEditor != null, "Current module editor was not initialized");
final ModifiableRootModel modelProxy = moduleEditor.getModifiableRootModelProxy();
final OrderEntry[] entries = modelProxy.getOrderEntries();
for (OrderEntry entry : entries) {
if (entry instanceof LibraryOrderEntry && Comparing.strEqual(entry.getPresentableName(), library.getName())) {
modelProxy.removeOrderEntry(entry);
break;
}
}
myContext.getDaemonAnalyzer().queueUpdate(new ModuleProjectStructureElement(myContext, module));
myTree.repaint();
}
use of com.intellij.openapi.roots.ui.configuration.projectRoot.daemon.ModuleProjectStructureElement in project intellij-community by JetBrains.
the class ClasspathPanelImpl method addItems.
@Override
public void addItems(List<ClasspathTableItem<?>> toAdd) {
for (ClasspathTableItem<?> item : toAdd) {
myModel.addRow(item);
}
TIntArrayList toSelect = new TIntArrayList();
for (int i = myModel.getRowCount() - toAdd.size(); i < myModel.getRowCount(); i++) {
toSelect.add(myEntryTable.convertRowIndexToView(i));
}
TableUtil.selectRows(myEntryTable, toSelect.toNativeArray());
TableUtil.scrollSelectionToVisible(myEntryTable);
final StructureConfigurableContext context = ModuleStructureConfigurable.getInstance(myState.getProject()).getContext();
context.getDaemonAnalyzer().queueUpdate(new ModuleProjectStructureElement(context, getRootModel().getModule()));
}
use of com.intellij.openapi.roots.ui.configuration.projectRoot.daemon.ModuleProjectStructureElement in project intellij-community by JetBrains.
the class ClasspathPanelImpl method removeSelectedItems.
private void removeSelectedItems(final List removedRows) {
if (removedRows.isEmpty()) {
return;
}
for (final Object removedRow : removedRows) {
final ClasspathTableItem<?> item = (ClasspathTableItem<?>) ((Object[]) removedRow)[ClasspathTableModel.ITEM_COLUMN];
final OrderEntry orderEntry = item.getEntry();
if (orderEntry == null) {
continue;
}
getRootModel().removeOrderEntry(orderEntry);
}
final int[] selectedRows = myEntryTable.getSelectedRows();
myModel.fireTableDataChanged();
TableUtil.selectRows(myEntryTable, selectedRows);
final StructureConfigurableContext context = ModuleStructureConfigurable.getInstance(myState.getProject()).getContext();
context.getDaemonAnalyzer().queueUpdate(new ModuleProjectStructureElement(context, getRootModel().getModule()));
}
Aggregations