當前位置: 首頁>>代碼示例>>Java>>正文


Java IndentGuideDescriptor類代碼示例

本文整理匯總了Java中com.intellij.openapi.editor.IndentGuideDescriptor的典型用法代碼示例。如果您正苦於以下問題:Java IndentGuideDescriptor類的具體用法?Java IndentGuideDescriptor怎麽用?Java IndentGuideDescriptor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IndentGuideDescriptor類屬於com.intellij.openapi.editor包,在下文中一共展示了IndentGuideDescriptor類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getCaretIndentGuide

import com.intellij.openapi.editor.IndentGuideDescriptor; //導入依賴的package包/類
@Override
public IndentGuideDescriptor getCaretIndentGuide() {
  final LogicalPosition pos = myEditor.getCaretModel().getLogicalPosition();
  final int column = pos.column;
  final int line = pos.line;

  if (column > 0) {
    for (IndentGuideDescriptor indent : myIndents) {
      if (column == indent.indentLevel && line >= indent.startLine && line < indent.endLine) {
        return indent;
      }
    }
  }
  return null;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:16,代碼來源:IndentsModelImpl.java

示例2: assumeIndents

import com.intellij.openapi.editor.IndentGuideDescriptor; //導入依賴的package包/類
@Override
public void assumeIndents(@NotNull List<IndentGuideDescriptor> descriptors) {
  myIndents = descriptors;
  myIndentsByLines.clear();
  for (IndentGuideDescriptor descriptor : myIndents) {
    myIndentsByLines.put(new IntPair(descriptor.startLine, descriptor.endLine), descriptor);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:9,代碼來源:IndentsModelImpl.java

示例3: assumeIndents

import com.intellij.openapi.editor.IndentGuideDescriptor; //導入依賴的package包/類
@Override
public void assumeIndents(@Nonnull List<IndentGuideDescriptor> descriptors) {
  myIndents = descriptors;
  myIndentsByLines.clear();
  for (IndentGuideDescriptor descriptor : myIndents) {
    myIndentsByLines.put(new IntPair(descriptor.startLine, descriptor.endLine), descriptor);
  }
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:9,代碼來源:IndentsModelImpl.java

示例4: getCaretIndentGuide

import com.intellij.openapi.editor.IndentGuideDescriptor; //導入依賴的package包/類
@Override
public IndentGuideDescriptor getCaretIndentGuide() {
  return null;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:EmptyIndentsModel.java

示例5: getDescriptor

import com.intellij.openapi.editor.IndentGuideDescriptor; //導入依賴的package包/類
@Override
public IndentGuideDescriptor getDescriptor(int startLine, int endLine) {
  return null;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:EmptyIndentsModel.java

示例6: assumeIndents

import com.intellij.openapi.editor.IndentGuideDescriptor; //導入依賴的package包/類
@Override
public void assumeIndents(List<IndentGuideDescriptor> descriptors) {
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:EmptyIndentsModel.java

示例7: getIndents

import com.intellij.openapi.editor.IndentGuideDescriptor; //導入依賴的package包/類
@NotNull
public List<IndentGuideDescriptor> getIndents() {
  return myIndents;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:IndentsModelImpl.java

示例8: getDescriptor

import com.intellij.openapi.editor.IndentGuideDescriptor; //導入依賴的package包/類
@Override
public IndentGuideDescriptor getDescriptor(int startLine, int endLine) {
  return myIndentsByLines.get(new IntPair(startLine, endLine));
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:IndentsModelImpl.java

示例9: getIndents

import com.intellij.openapi.editor.IndentGuideDescriptor; //導入依賴的package包/類
@Nonnull
public List<IndentGuideDescriptor> getIndents() {
  return myIndents;
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:5,代碼來源:IndentsModelImpl.java


注:本文中的com.intellij.openapi.editor.IndentGuideDescriptor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。