本文整理汇总了Java中com.intellij.psi.xml.XmlText.displayToPhysical方法的典型用法代码示例。如果您正苦于以下问题:Java XmlText.displayToPhysical方法的具体用法?Java XmlText.displayToPhysical怎么用?Java XmlText.displayToPhysical使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.psi.xml.XmlText
的用法示例。
在下文中一共展示了XmlText.displayToPhysical方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getValueRange
import com.intellij.psi.xml.XmlText; //导入方法依赖的package包/类
private static TextRange getValueRange(final XmlText xmlText) {
final int offset = xmlText.getStartOffsetInParent();
final String value = xmlText.getValue();
final String trimmed = value.trim();
final int i = value.indexOf(trimmed);
final int start = xmlText.displayToPhysical(i) + offset;
return trimmed.isEmpty()
? new TextRange(start, start) : new TextRange(start, xmlText.displayToPhysical(i + trimmed.length() - 1) + offset + 1);
}
示例2: getValueRange
import com.intellij.psi.xml.XmlText; //导入方法依赖的package包/类
private static TextRange getValueRange(final XmlText xmlText) {
final int offset = xmlText.getStartOffsetInParent();
final String value = xmlText.getValue();
final String trimmed = value.trim();
final int i = value.indexOf(trimmed);
final int start = xmlText.displayToPhysical(i) + offset;
return trimmed.length() == 0 ? new TextRange(start, start) : new TextRange(start, xmlText.displayToPhysical(i + trimmed.length() - 1) + offset + 1);
}
示例3: getValueRange
import com.intellij.psi.xml.XmlText; //导入方法依赖的package包/类
private static TextRange getValueRange(final XmlText xmlText)
{
final int offset = xmlText.getStartOffsetInParent();
final String value = xmlText.getValue();
final String trimmed = value.trim();
final int i = value.indexOf(trimmed);
final int start = xmlText.displayToPhysical(i) + offset;
return trimmed.isEmpty() ? new TextRange(start, start) : new TextRange(start, xmlText.displayToPhysical(i + trimmed.length() - 1) + offset + 1);
}
示例4: getValueRange
import com.intellij.psi.xml.XmlText; //导入方法依赖的package包/类
private static TextRange getValueRange(final XmlText xmlText) {
final String value = xmlText.getValue();
final int i = value.indexOf(value);
final int start = xmlText.displayToPhysical(i);
return value.isEmpty() ? new TextRange(start, start) : new TextRange(start, xmlText.displayToPhysical(i + value.length() - 1) + 1);
}
示例5: getValueRange
import com.intellij.psi.xml.XmlText; //导入方法依赖的package包/类
private static TextRange getValueRange(final XmlText xmlText) {
final String value = xmlText.getValue();
final int i = value.indexOf(value);
final int start = xmlText.displayToPhysical(i);
return value.length() == 0 ? new TextRange(start, start) : new TextRange(start, xmlText.displayToPhysical(i + value.length() - 1) + 1);
}