use of com.liferay.blade.upgrade.liferay70.PropertiesFileChecker.KeyInfo in project liferay-ide by liferay.
the class LiferayVersionsProperties method analyze.
@Override
public List<Problem> analyze(File file) {
List<Problem> problems = new ArrayList<>();
if (file.getName().equals("liferay-plugin-package.properties")) {
PropertiesFileChecker propertiesFileChecker = new PropertiesFileChecker(file);
List<KeyInfo> keys = propertiesFileChecker.getInfos("liferay-versions");
if (ListUtil.isNotEmpty(keys)) {
String versions = keys.get(0).value;
if (!versions.matches(".*7\\.[0-9]\\.[0-9].*")) {
List<SearchResult> results = propertiesFileChecker.findProperties("liferay-versions");
if (results != null) {
String sectionHtml = problemSummary;
for (SearchResult searchResult : results) {
searchResult.autoCorrectContext = _PREFIX + "liferay-versions";
problems.add(new Problem(problemTitle, problemSummary, problemType, problemTickets, file, searchResult.startLine, searchResult.startOffset, searchResult.endOffset, sectionHtml, searchResult.autoCorrectContext, Problem.STATUS_NOT_RESOLVED, Problem.DEFAULT_MARKER_ID, Problem.MARKER_ERROR));
}
}
}
}
}
return problems;
}
Aggregations