org.eclipse.cdt.internal.ui.editor
Class InactiveCodeHighlighting

java.lang.Object
  extended by org.eclipse.cdt.internal.ui.editor.InactiveCodeHighlighting
All Implemented Interfaces:
ICReconcilingListener, org.eclipse.jface.text.ITextInputListener

public class InactiveCodeHighlighting
extends java.lang.Object
implements ICReconcilingListener, org.eclipse.jface.text.ITextInputListener

Paints code lines disabled by preprocessor directives (#ifdef etc.) with a configurable background color (default light gray).

Since:
4.0
See Also:
LineBackgroundPainter

Constructor Summary
InactiveCodeHighlighting(java.lang.String highlightKey)
          Create a highlighter for the given key.
 
Method Summary
 void aboutToBeReconciled()
          Called before reconciling is started.
 void inputDocumentAboutToBeChanged(org.eclipse.jface.text.IDocument oldInput, org.eclipse.jface.text.IDocument newInput)
           
 void inputDocumentChanged(org.eclipse.jface.text.IDocument oldInput, org.eclipse.jface.text.IDocument newInput)
           
 void install(CEditor editor, LineBackgroundPainter lineBackgroundPainter)
          Install this highlighting on the given editor and line background painter.
 void reconciled(org.eclipse.cdt.core.dom.ast.IASTTranslationUnit ast, boolean force, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
          Called after reconciling has been finished.
 void refresh()
          Force refresh.
 void uninstall()
          Uninstall this highlighting from the editor.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InactiveCodeHighlighting

public InactiveCodeHighlighting(java.lang.String highlightKey)
Create a highlighter for the given key.

Parameters:
highlightKey -
Method Detail

install

public void install(CEditor editor,
                    LineBackgroundPainter lineBackgroundPainter)
Install this highlighting on the given editor and line background painter.

Parameters:
editor -
lineBackgroundPainter -

uninstall

public void uninstall()
Uninstall this highlighting from the editor. Does nothing if already uninstalled.


refresh

public void refresh()
Force refresh.


aboutToBeReconciled

public void aboutToBeReconciled()
Description copied from interface: ICReconcilingListener
Called before reconciling is started.

Specified by:
aboutToBeReconciled in interface ICReconcilingListener

reconciled

public void reconciled(org.eclipse.cdt.core.dom.ast.IASTTranslationUnit ast,
                       boolean force,
                       org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Description copied from interface: ICReconcilingListener
Called after reconciling has been finished.

Specified by:
reconciled in interface ICReconcilingListener
Parameters:
ast - the translation unit AST or null if the working copy was consistent or reconcilation has been cancelled
force - flag indicating whether the reconciler was invoked forcefully
progressMonitor - the progress monitor

inputDocumentAboutToBeChanged

public void inputDocumentAboutToBeChanged(org.eclipse.jface.text.IDocument oldInput,
                                          org.eclipse.jface.text.IDocument newInput)
Specified by:
inputDocumentAboutToBeChanged in interface org.eclipse.jface.text.ITextInputListener

inputDocumentChanged

public void inputDocumentChanged(org.eclipse.jface.text.IDocument oldInput,
                                 org.eclipse.jface.text.IDocument newInput)
Specified by:
inputDocumentChanged in interface org.eclipse.jface.text.ITextInputListener