use of com.intellij.openapi.externalSystem.service.settings.ExternalSystemConfigLocator in project intellij-community by JetBrains.
the class ExternalSystemNodeAction method getExternalConfig.
@Nullable
protected VirtualFile getExternalConfig(@NotNull ExternalConfigPathAware data, ProjectSystemId externalSystemId) {
String path = data.getLinkedExternalProjectPath();
LocalFileSystem fileSystem = LocalFileSystem.getInstance();
VirtualFile externalSystemConfigPath = fileSystem.refreshAndFindFileByPath(path);
if (externalSystemConfigPath == null) {
return null;
}
VirtualFile toOpen = externalSystemConfigPath;
for (ExternalSystemConfigLocator locator : ExternalSystemConfigLocator.EP_NAME.getExtensions()) {
if (externalSystemId.equals(locator.getTargetExternalSystemId())) {
toOpen = locator.adjust(toOpen);
if (toOpen == null) {
return null;
}
break;
}
}
return toOpen.isDirectory() ? null : toOpen;
}
Aggregations