Toggle navigation
Home
java.lang.String to de.plushnikov.intellij.plugin.lombokconfig.ConfigValue
No. of Instances - 9
No. of Commits - 1
No. of Projects - {'lombok-intellij-plugin'}
Hierarchy/Composition: Composition
Primitive Info: -
NameSpace: Jdk -> Internal
Mapping:
Other
==
to
!=
==
to
!=
Rename Variable
property
to
configValue
property
to
configValue
Cascading Type Change (Similar)
DataIndexer<ConfigIndexKey,String,FileContent>
to
DataIndexer<ConfigIndexKey,ConfigValue,FileContent>
Update Anonymous class
{ @NotNull @Override public Map<ConfigIndexKey,String> map( @NotNull FileContent inputData){ Map<ConfigIndexKey,String> result=Collections.emptyMap(); final VirtualFile directoryFile=inputData.getFile().getParent(); if (null != directoryFile) { final String canonicalPath=PathUtil.toSystemIndependentName(directoryFile.getCanonicalPath()); if (null != canonicalPath) { final Map<String,String> configValues=extractValues((LombokConfigFile)inputData.getPsiFile()); result=new HashMap<>(); for ( Map.Entry<String,String> entry : configValues.entrySet()) { result.put(new ConfigIndexKey(canonicalPath,entry.getKey()),entry.getValue()); } } } return result; } private Map<String,String> extractValues( LombokConfigFile configFile){ Map<String,String> result=new HashMap<>(); final LombokConfigCleaner[] configCleaners=LombokConfigUtil.getLombokConfigCleaners(configFile); for ( LombokConfigCleaner configCleaner : configCleaners) { final String key=LombokConfigPsiUtil.getKey(configCleaner); final ConfigKey configKey=ConfigKey.fromConfigStringKey(key); if (null != configKey) { result.put(key,configKey.getConfigDefaultValue()); } } final LombokConfigProperty[] configProperties=LombokConfigUtil.getLombokConfigProperties(configFile); for ( LombokConfigProperty configProperty : configProperties) { final String key=LombokConfigPsiUtil.getKey(configProperty); final String value=LombokConfigPsiUtil.getValue(configProperty); final String sign=LombokConfigPsiUtil.getSign(configProperty); if (null == sign) { result.put(key,value); } else { final String previousValue=StringUtil.defaultIfEmpty(result.get(key),""); final String combinedValue=previousValue + sign + value+ ";"; result.put(key,combinedValue); } } return result; } }
to
{ @NotNull @Override public Map<ConfigIndexKey,ConfigValue> map( @NotNull FileContent inputData){ Map<ConfigIndexKey,ConfigValue> result=Collections.emptyMap(); final VirtualFile directoryFile=inputData.getFile().getParent(); if (null != directoryFile) { final String canonicalPath=PathUtil.toSystemIndependentName(directoryFile.getCanonicalPath()); if (null != canonicalPath) { final Map<String,String> configValues=extractValues((LombokConfigFile)inputData.getPsiFile()); final boolean stopBubblingValue=Boolean.parseBoolean(configValues.get(ConfigKey.CONFIG_STOP_BUBBLING.getConfigKey())); result=Stream.of(ConfigKey.values()).map(ConfigKey::getConfigKey).collect(Collectors.toMap(key -> new ConfigIndexKey(canonicalPath,key),key -> new ConfigValue(configValues.get(key),stopBubblingValue))); } } return result; } private Map<String,String> extractValues( LombokConfigFile configFile){ Map<String,String> result=new HashMap<>(); final LombokConfigCleaner[] configCleaners=LombokConfigUtil.getLombokConfigCleaners(configFile); for ( LombokConfigCleaner configCleaner : configCleaners) { final String key=StringUtil.toLowerCase(LombokConfigPsiUtil.getKey(configCleaner)); final ConfigKey configKey=ConfigKey.fromConfigStringKey(key); if (null != configKey) { result.put(key,configKey.getConfigDefaultValue()); } } final LombokConfigProperty[] configProperties=LombokConfigUtil.getLombokConfigProperties(configFile); for ( LombokConfigProperty configProperty : configProperties) { final String key=StringUtil.toLowerCase(LombokConfigPsiUtil.getKey(configProperty)); final String value=LombokConfigPsiUtil.getValue(configProperty); final String sign=LombokConfigPsiUtil.getSign(configProperty); if (null == sign) { result.put(key,value); } else { final String previousValue=StringUtil.defaultIfEmpty(result.get(key),""); final String combinedValue=previousValue + sign + value+ ";"; result.put(key,combinedValue); } } return result; } }