use of com.microsoft.intellij.ui.components.DefaultDialogWrapper in project azure-tools-for-java by Microsoft.
the class ApplicatioInsightsAction method onActionPerformed.
@Override
public void onActionPerformed(AnActionEvent event) {
final Module module = event.getData(LangDataKeys.MODULE);
DefaultDialogWrapper dialog = new DefaultDialogWrapper(module.getProject(), new ApplicationInsightsPanel(module));
dialog.show();
}
use of com.microsoft.intellij.ui.components.DefaultDialogWrapper in project azure-tools-for-java by Microsoft.
the class LibrariesConfigurationDialog method editLibrary.
private void editLibrary() {
AzureLibrary azureLibrary = (AzureLibrary) librariesList.getSelectedValue();
final ModifiableRootModel modifiableModel = ModuleRootManager.getInstance(module).getModifiableModel();
OrderEntry libraryOrderEntry = null;
for (OrderEntry orderEntry : modifiableModel.getOrderEntries()) {
if (orderEntry instanceof ModuleLibraryOrderEntryImpl && azureLibrary.getName().equals(((ModuleLibraryOrderEntryImpl) orderEntry).getLibraryName())) {
libraryOrderEntry = orderEntry;
break;
}
}
if (libraryOrderEntry != null) {
LibraryPropertiesPanel libraryPropertiesPanel = new LibraryPropertiesPanel(module, azureLibrary, true, ((ModuleLibraryOrderEntryImpl) libraryOrderEntry).isExported());
DefaultDialogWrapper libraryProperties = new DefaultDialogWrapper(module.getProject(), libraryPropertiesPanel);
libraryProperties.show();
if (libraryProperties.isOK()) {
AccessToken token = WriteAction.start();
try {
((ModuleLibraryOrderEntryImpl) libraryOrderEntry).setExported(libraryPropertiesPanel.isExported());
modifiableModel.commit();
} finally {
token.finish();
}
LocalFileSystem.getInstance().findFileByPath(PluginUtil.getModulePath(module)).refresh(true, true);
}
} else {
PluginUtil.displayInfoDialog("Library not found", "Library was not found");
}
}
Aggregations