Class UnifiedDiffCodeMiningProvider.UnifiedDiffLineHeaderCodeMining
java.lang.Object
org.eclipse.jface.text.codemining.AbstractCodeMining
org.eclipse.jface.text.codemining.LineHeaderCodeMining
org.eclipse.compare.unifieddiff.internal.UnifiedDiffCodeMiningProvider.UnifiedDiffLineHeaderCodeMining
- All Implemented Interfaces:
ICodeMining
- Enclosing class:
UnifiedDiffCodeMiningProvider
public static class UnifiedDiffCodeMiningProvider.UnifiedDiffLineHeaderCodeMining
extends LineHeaderCodeMining
-
Constructor Summary
ConstructorsConstructorDescriptionUnifiedDiffLineHeaderCodeMining(Position position, ICodeMiningProvider provider, UnifiedDiffManager.UnifiedDiff diff, int tabWidth, Color deletionBackgroundColor, Color detailedDiffColor, ITextViewer viewer) -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Dispose the mining.draw(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.Methods inherited from class AbstractCodeMining
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
-
UnifiedDiffLineHeaderCodeMining
public UnifiedDiffLineHeaderCodeMining(Position position, ICodeMiningProvider provider, UnifiedDiffManager.UnifiedDiff diff, int tabWidth, Color deletionBackgroundColor, Color detailedDiffColor, ITextViewer viewer) throws BadLocationException - Throws:
BadLocationException
-
-
Method Details
-
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.
-
getUnifiedDiff
-
dispose
public void dispose()Description copied from interface:ICodeMiningDispose the mining. Typically shuts down or cancels all related asynchronous operations.- Specified by:
disposein interfaceICodeMining- Overrides:
disposein classAbstractCodeMining
-
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.
-