Java Code Examples for com.intellij.openapi.editor.markup.GutterIconRenderer#Alignment

The following examples show how to use com.intellij.openapi.editor.markup.GutterIconRenderer#Alignment . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LineMarkerInfo.java    From consulo with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a line marker info for the element.
 *
 * @param element         the element for which the line marker is created.
 * @param range           the range (relative to beginning of file) with which the marker is associated
 * @param icon            the icon to show in the gutter for the line marker
 * @param updatePass      the ID of the daemon pass during which the marker should be recalculated
 * @param tooltipProvider the callback to calculate the tooltip for the gutter icon
 * @param navHandler      the handler executed when the gutter icon is clicked
 */
public LineMarkerInfo(@Nonnull T element,
                      @Nonnull TextRange range,
                      Image icon,
                      int updatePass,
                      @Nullable Function<? super T, String> tooltipProvider,
                      @Nullable GutterIconNavigationHandler<T> navHandler,
                      @Nonnull GutterIconRenderer.Alignment alignment) {
  myIcon = icon;
  myTooltipProvider = tooltipProvider;
  myIconAlignment = alignment;
  elementRef = SmartPointerManager.getInstance(element.getProject()).createSmartPsiElementPointer(element);
  myNavigationHandler = navHandler;
  startOffset = range.getStartOffset();
  endOffset = range.getEndOffset();
  this.updatePass = 11; //Pass.LINE_MARKERS;
}
 
Example 2
Source File: LambdaLineMarkerCollector.java    From consulo-csharp with Apache License 2.0 5 votes vote down vote up
public MarkerInfo(@Nonnull PsiElement element,
		@Nonnull TextRange textRange,
		Image icon,
		int updatePass,
		@Nullable Function<? super PsiElement, String> tooltipProvider,
		@Nullable GutterIconNavigationHandler<PsiElement> navHandler,
		@Nonnull GutterIconRenderer.Alignment alignment)
{
	super(element, textRange, icon, updatePass, tooltipProvider, navHandler, alignment);
}
 
Example 3
Source File: RelatedItemLineMarkerInfo.java    From consulo with Apache License 2.0 5 votes vote down vote up
public RelatedItemLineMarkerInfo(@Nonnull T element, @Nonnull TextRange range, Image icon, int updatePass,
                                 @Nullable Function<? super T, String> tooltipProvider,
                                 @Nullable GutterIconNavigationHandler<T> navHandler,
                                 GutterIconRenderer.Alignment alignment,
                                 @Nonnull NotNullLazyValue<Collection<? extends GotoRelatedItem>> targets) {
  super(element, range, icon, updatePass, tooltipProvider, navHandler, alignment);
  myTargets = targets;
}
 
Example 4
Source File: RelatedItemLineMarkerInfo.java    From consulo with Apache License 2.0 5 votes vote down vote up
public RelatedItemLineMarkerInfo(@Nonnull T element, @Nonnull TextRange range, Image icon, int updatePass,
                                 @Nullable Function<? super T, String> tooltipProvider,
                                 @Nullable GutterIconNavigationHandler<T> navHandler,
                                 GutterIconRenderer.Alignment alignment,
                                 @Nonnull final Collection<? extends GotoRelatedItem> targets) {
  this(element, range, icon, updatePass, tooltipProvider, navHandler, alignment, new NotNullLazyValue<Collection<? extends GotoRelatedItem>>() {
    @Nonnull
    @Override
    protected Collection<? extends GotoRelatedItem> compute() {
      return targets;
    }
  });
}
 
Example 5
Source File: MergeableLineMarkerInfo.java    From consulo with Apache License 2.0 5 votes vote down vote up
public MergeableLineMarkerInfo(@Nonnull T element,
                               @Nonnull TextRange textRange,
                               Image icon,
                               int updatePass,
                               @Nullable Function<? super T, String> tooltipProvider,
                               @Nullable GutterIconNavigationHandler<T> navHandler,
                               @Nonnull GutterIconRenderer.Alignment alignment) {
  super(element, textRange, icon, updatePass, tooltipProvider, navHandler, alignment);
}
 
Example 6
Source File: LineMarkerInfo.java    From consulo with Apache License 2.0 5 votes vote down vote up
/**
 * @deprecated use {@link LineMarkerInfo#LineMarkerInfo(PsiElement, TextRange, Image, int, Function, GutterIconNavigationHandler, GutterIconRenderer.Alignment)} instead
 */
public LineMarkerInfo(@Nonnull T element,
                      int startOffset,
                      Image icon,
                      int updatePass,
                      @Nullable Function<? super T, String> tooltipProvider,
                      @Nullable GutterIconNavigationHandler<T> navHandler,
                      @Nonnull GutterIconRenderer.Alignment alignment) {
  this(element, new TextRange(startOffset, startOffset), icon, updatePass, tooltipProvider, navHandler, alignment);
}
 
Example 7
Source File: MergeableLineMarkerInfo.java    From consulo with Apache License 2.0 4 votes vote down vote up
public GutterIconRenderer.Alignment getCommonIconAlignment(@Nonnull List<MergeableLineMarkerInfo> infos) {
  return GutterIconRenderer.Alignment.LEFT;
}
 
Example 8
Source File: NavigationGutterIconBuilder.java    From consulo with Apache License 2.0 4 votes vote down vote up
public NavigationGutterIconBuilder<T> setAlignment(@Nonnull final GutterIconRenderer.Alignment alignment) {
  myAlignment = alignment;
  return this;
}