use of com.intellij.openapi.module.ModulePointerManager in project intellij-community by JetBrains.
the class ModuleOutputElementTypeBase method chooseAndCreate.
@NotNull
public List<? extends PackagingElement<?>> chooseAndCreate(@NotNull ArtifactEditorContext context, @NotNull Artifact artifact, @NotNull CompositePackagingElement<?> parent) {
List<Module> suitableModules = getSuitableModules(context);
List<Module> selected = context.chooseModules(suitableModules, ProjectBundle.message("dialog.title.packaging.choose.module"));
final List<PackagingElement<?>> elements = new ArrayList<>();
final ModulePointerManager pointerManager = ModulePointerManager.getInstance(context.getProject());
for (Module module : selected) {
elements.add(createElement(context.getProject(), pointerManager.create(module)));
}
return elements;
}
use of com.intellij.openapi.module.ModulePointerManager in project intellij-plugins by JetBrains.
the class DependenciesImpl method loadState.
public void loadState(@NotNull State state, Project project) {
myTargetPlayer = state.TARGET_PLAYER;
myComponentSet = state.COMPONENT_SET;
myFrameworkLinkage = LinkageType.valueOf(state.FRAMEWORK_LINKAGE, DEFAULT_FRAMEWORK_LINKAGE);
ModulePointerManager pointerManager = ModulePointerManager.getInstance(project);
myEntries.clear();
for (EntryState info : state.ENTRIES) {
if (info.LIBRARY_ID != null) {
ModuleLibraryEntryImpl libraryEntry = new ModuleLibraryEntryImpl(info.LIBRARY_ID);
libraryEntry.getDependencyType().loadState(info.DEPENDENCY_TYPE);
myEntries.add(libraryEntry);
} else if (info.LIBRARY_NAME != null) {
SharedLibraryEntryImpl libraryEntry = new SharedLibraryEntryImpl(info.LIBRARY_NAME, info.LIBRARY_LEVEL);
libraryEntry.getDependencyType().loadState(info.DEPENDENCY_TYPE);
myEntries.add(libraryEntry);
} else if (info.BC_NAME != null) {
BuildConfigurationEntryImpl bcEntry = new BuildConfigurationEntryImpl(pointerManager.create(info.MODULE_NAME), info.BC_NAME);
bcEntry.getDependencyType().loadState(info.DEPENDENCY_TYPE);
myEntries.add(bcEntry);
} else {
throw new RuntimeException("unknown entry");
}
}
mySdk = state.SDK != null ? new SdkEntryImpl(state.SDK) : null;
if (mySdk != null && mySdk.getName().isEmpty()) {
mySdk = null;
}
}
use of com.intellij.openapi.module.ModulePointerManager in project intellij-community by JetBrains.
the class CloudModuleDeploymentRuntimeProviderBase method getDeploymentSources.
@Override
public Collection<DeploymentSource> getDeploymentSources(Project project) {
List<DeploymentSource> result = new ArrayList<>();
ModulePointerManager pointerManager = ModulePointerManager.getInstance(project);
for (Module module : ModuleManager.getInstance(project).getModules()) {
result.add(new ModuleDeploymentSourceImpl(pointerManager.create(module)));
}
return result;
}
Aggregations