Class UnifiedDiffCodeMiningProvider.FoldedRegionCodeMining
java.lang.Object
org.eclipse.jface.text.codemining.AbstractCodeMining
org.eclipse.jface.text.codemining.LineHeaderCodeMining
org.eclipse.compare.unifieddiff.internal.UnifiedDiffCodeMiningProvider.FoldedRegionCodeMining
- All Implemented Interfaces:
ICodeMining
- Enclosing class:
UnifiedDiffCodeMiningProvider
public static class UnifiedDiffCodeMiningProvider.FoldedRegionCodeMining
extends LineHeaderCodeMining
-
Constructor Summary
ConstructorsConstructorDescriptionFoldedRegionCodeMining(Position position, ICodeMiningProvider provider, ITextViewer viewer, Annotation foldAnnotation, int foldableLines, boolean collapsed, Color separatorColor, Color buttonColor) -
Method Summary
Modifier and TypeMethodDescriptiondraw(GC gc, StyledText textWidget, Color color, int x, int y) Draw theAbstractCodeMining.getLabel()of mining with gray color.getLabel()Returns the label may be set early in the class lifecycle, or upon completion of the future provided byICodeMining.resolve(ITextViewer, IProgressMonitor)operation.booleanWhether clicking this band shows the region rather than hiding it again.Methods inherited from class AbstractCodeMining
dispose, doResolve, getAction, getPosition, getProvider, isResolved, resolve, setLabelMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ICodeMining
getMouseHover, getMouseMove, getMouseOut
-
Constructor Details
-
FoldedRegionCodeMining
public FoldedRegionCodeMining(Position position, ICodeMiningProvider provider, ITextViewer viewer, Annotation foldAnnotation, int foldableLines, boolean collapsed, Color separatorColor, Color buttonColor) throws BadLocationException - Throws:
BadLocationException
-
-
Method Details
-
isExpander
public boolean isExpander()Whether clicking this band shows the region rather than hiding it again. -
getLabel
Description copied from interface:ICodeMiningReturns the label may be set early in the class lifecycle, or upon completion of the future provided byICodeMining.resolve(ITextViewer, IProgressMonitor)operation.The returned label can have several values:
nullwhen mining is not resolvednullwhen mining is resolved means that mining was resolved with an error and it will not be displayed.- empty when mining is resolved means that mining will not be displayed
- non empty when mining must be displayed
- Specified by:
getLabelin interfaceICodeMining- Overrides:
getLabelin classAbstractCodeMining- Returns:
- the label may be set early in the class lifecycle, or upon completion of the future
provided by
ICodeMining.resolve(ITextViewer, IProgressMonitor)operation.
-
draw
Description copied from class:AbstractCodeMiningDraw theAbstractCodeMining.getLabel()of mining with gray color. User can override this method to draw anything.- Specified by:
drawin interfaceICodeMining- Overrides:
drawin classLineHeaderCodeMining- Parameters:
gc- the graphics contexttextWidget- the text widget to draw oncolor- the color of the linex- the x position of the annotationy- the y position of the annotation- Returns:
- the size of the draw of mining.
-