Class LineHeaderCodeMining
java.lang.Object
org.eclipse.jface.text.codemining.AbstractCodeMining
org.eclipse.jface.text.codemining.LineHeaderCodeMining
- All Implemented Interfaces:
- ICodeMining
Abstract class for line header code mining.
- Since:
- 3.13
- 
Constructor SummaryConstructorsConstructorDescriptionLineHeaderCodeMining(int beforeLineNumber, IDocument document, ICodeMiningProvider provider) CodeMining constructor to locate the code mining before the given line number.LineHeaderCodeMining(int beforeLineNumber, IDocument document, ICodeMiningProvider provider, Consumer<MouseEvent> action) CodeMining constructor to locate the code mining before the given line number.LineHeaderCodeMining(Position position, ICodeMiningProvider provider, Consumer<MouseEvent> action) CodeMining constructor to locate the code mining before the given line at the supplied position.
- 
Method SummaryModifier and TypeMethodDescriptiondraw(GC gc, StyledText textWidget, Color color, int x, int y) Draw theAbstractCodeMining.getLabel()of mining with gray color.Methods inherited from class org.eclipse.jface.text.codemining.AbstractCodeMiningdispose, doResolve, getAction, getLabel, getPosition, getProvider, isResolved, resolve, setLabelMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.jface.text.codemining.ICodeMininggetMouseHover, getMouseMove, getMouseOut
- 
Constructor Details- 
LineHeaderCodeMiningpublic LineHeaderCodeMining(int beforeLineNumber, IDocument document, ICodeMiningProvider provider) throws BadLocationException CodeMining constructor to locate the code mining before the given line number.- Parameters:
- beforeLineNumber- the line number where codemining must be drawn. Use 0 if you wish to locate the code mining before the first line number (1).
- document- the document.
- provider- the owner codemining provider which creates this mining.
- Throws:
- BadLocationException- when line number doesn't exists
 
- 
LineHeaderCodeMiningpublic LineHeaderCodeMining(int beforeLineNumber, IDocument document, ICodeMiningProvider provider, Consumer<MouseEvent> action) throws BadLocationException CodeMining constructor to locate the code mining before the given line number.- Parameters:
- beforeLineNumber- the line number where codemining must be drawn. Use 0 if you wish to locate the code mining before the first line number (1).
- document- the document.
- provider- the owner codemining provider which creates this mining.
- action- the action to execute when mining is clicked and null otherwise.
- Throws:
- BadLocationException- when line number doesn't exists
 
- 
LineHeaderCodeMiningpublic LineHeaderCodeMining(Position position, ICodeMiningProvider provider, Consumer<MouseEvent> action) throws BadLocationException CodeMining constructor to locate the code mining before the given line at the supplied position.- Parameters:
- position- the position where the mining must be drawn
- provider- the owner codemining provider which creates this mining.
- action- the action to execute when mining is clicked and null otherwise.
- Throws:
- BadLocationException- when line number doesn't exists
- Since:
- 3.17
 
 
- 
- 
Method Details- 
drawDescription copied from class:AbstractCodeMiningDraw theAbstractCodeMining.getLabel()of mining with gray color. User can override this method to draw anything.- Specified by:
- drawin interface- ICodeMining
- Overrides:
- drawin class- AbstractCodeMining
- Parameters:
- gc- the graphics context
- textWidget- the text widget to draw on
- color- the color of the line
- x- the x position of the annotation
- y- the y position of the annotation
- Returns:
- the size of the draw of mining.
 
 
-