mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-103813 Character codes instead of characters when creating a new task: read action missed
(cherry picked from commit 044f548f9b973d07ed59b81fe7d59651d37c44b3)
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package com.intellij.tasks.generic;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.project.ProjectManager;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.XmlElementFactory;
|
||||
import com.intellij.psi.xml.XmlTag;
|
||||
@@ -105,8 +107,15 @@ public class GenericRepository extends BaseRepositoryImpl {
|
||||
String id = matcher.group(placeholders.indexOf(ID_PLACEHOLDER) + 1);
|
||||
String summary = matcher.group(placeholders.indexOf(SUMMARY_PLACEHOLDER) + 1);
|
||||
if (myResponseType == ResponseType.XML && summary != null) {
|
||||
XmlTag text = XmlElementFactory.getInstance(ProjectManager.getInstance().getDefaultProject()).createTagFromText("<a>" + summary + "</a>");
|
||||
summary = XmlUtil.decode(text.getValue().getTrimmedText());
|
||||
final String finalSummary = summary;
|
||||
summary = ApplicationManager.getApplication().runReadAction(new Computable<String>() {
|
||||
@Override
|
||||
public String compute() {
|
||||
XmlElementFactory factory = XmlElementFactory.getInstance(ProjectManager.getInstance().getDefaultProject());
|
||||
XmlTag text = factory.createTagFromText("<a>" + finalSummary + "</a>");
|
||||
return XmlUtil.decode(text.getValue().getTrimmedText());
|
||||
}
|
||||
});
|
||||
}
|
||||
tasks.add(new GenericTask(id, summary, this));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user