mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
FUS: Add method to read dictionary service URL
This commit is contained in:
+8
-1
@@ -6,6 +6,7 @@ import com.intellij.openapi.application.ApplicationInfo;
|
||||
import com.intellij.openapi.application.impl.ApplicationInfoImpl;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
@@ -20,6 +21,7 @@ import java.util.Set;
|
||||
*/
|
||||
public class FUStatisticsSettingsService extends StatisticsConnectionService {
|
||||
private static final String APPROVED_GROUPS_SERVICE = "white-list-service";
|
||||
private static final String DICTIONARY_SERVICE = "dictionary-service";
|
||||
public static FUStatisticsSettingsService getInstance() {return new FUStatisticsSettingsService();}
|
||||
|
||||
private FUStatisticsSettingsService() {
|
||||
@@ -29,7 +31,7 @@ public class FUStatisticsSettingsService extends StatisticsConnectionService {
|
||||
@NotNull
|
||||
@Override
|
||||
public String[] getAttributeNames() {
|
||||
return ArrayUtil.mergeArrays(super.getAttributeNames(), APPROVED_GROUPS_SERVICE);
|
||||
return ArrayUtil.mergeArrays(super.getAttributeNames(), APPROVED_GROUPS_SERVICE, DICTIONARY_SERVICE);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -41,6 +43,11 @@ public class FUStatisticsSettingsService extends StatisticsConnectionService {
|
||||
return FUStatisticsWhiteListGroupsService.getApprovedGroups(getProductRelatedUrl(approvedGroupsServiceUrl));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getDictionaryServiceUrl() {
|
||||
return getSettingValue(DICTIONARY_SERVICE);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getProductRelatedUrl(@NotNull String approvedGroupsServiceUrl) {
|
||||
return approvedGroupsServiceUrl + ApplicationInfo.getInstance().getBuild().getProductCode() + ".json";
|
||||
|
||||
Reference in New Issue
Block a user