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


Java FragmentSide.getIndex方法代碼示例

本文整理匯總了Java中com.intellij.openapi.diff.impl.highlighting.FragmentSide.getIndex方法的典型用法代碼示例。如果您正苦於以下問題:Java FragmentSide.getIndex方法的具體用法?Java FragmentSide.getIndex怎麽用?Java FragmentSide.getIndex使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.openapi.diff.impl.highlighting.FragmentSide的用法示例。


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

示例1: createPolygon

import com.intellij.openapi.diff.impl.highlighting.FragmentSide; //導入方法依賴的package包/類
private static DividerPolygon createPolygon(@NotNull Transformation[] transformations,
                                            @NotNull Trapezium trapezium,
                                            @Nullable Color color,
                                            @NotNull FragmentSide left,
                                            int diffDividerPolygonsOffset, boolean applied) {
  Interval base1 = trapezium.getBase(left);
  Interval base2 = trapezium.getBase(left.otherSide());
  Transformation leftTransform = transformations[left.getIndex()];
  Transformation rightTransform = transformations[left.otherSide().getIndex()];
  int start1 = leftTransform.transform(base1.getStart());
  int end1 = leftTransform.transform(base1.getEnd());
  int start2 = rightTransform.transform(base2.getStart());
  int end2 = rightTransform.transform(base2.getEnd());
  return new DividerPolygon(start1 - diffDividerPolygonsOffset, start2 - diffDividerPolygonsOffset,
                            end1 - diffDividerPolygonsOffset, end2 - diffDividerPolygonsOffset,
                            color, applied);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:18,代碼來源:DividerPolygon.java

示例2: add

import com.intellij.openapi.diff.impl.highlighting.FragmentSide; //導入方法依賴的package包/類
public void add(@NotNull TextRange base, @NotNull TextRange version, @NotNull FragmentSide side) {
  int index = side.getIndex();
  int otherIndex = side.otherSide().getIndex();
  EqualPair pair = new EqualPair(base, version, side);

  LOG.assertTrue(myPairs[index] == null || pair.getBaseStart() - myPairs[index].getBaseEnd() >= 0); // '==' can be in case of insertion
  LOG.assertTrue(myPairs[otherIndex] == null || pair.getBaseStart() >= myPairs[otherIndex].getBaseStart());

  myPairs[index] = pair;
  if (myPairs[otherIndex] != null && myPairs[index].getBaseStart() >= myPairs[otherIndex].getBaseEnd()) myPairs[otherIndex] = null;

  process();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:14,代碼來源:MergeBuilder.java

示例3: getDocument

import com.intellij.openapi.diff.impl.highlighting.FragmentSide; //導入方法依賴的package包/類
@NotNull
public Document getDocument(@NotNull FragmentSide side) {
  return myDocuments[side.getIndex()];
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:ChangeList.java

示例4: getStart

import com.intellij.openapi.diff.impl.highlighting.FragmentSide; //導入方法依賴的package包/類
public int getStart(@NotNull FragmentSide side) {
  return myStarts[side.getIndex()];
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:ChangeList.java

示例5: getChangeSide

import com.intellij.openapi.diff.impl.highlighting.FragmentSide; //導入方法依賴的package包/類
@Override
@NotNull
public ChangeSide getChangeSide(@NotNull FragmentSide side) {
  return mySides[side.getIndex()];
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:SimpleChange.java


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