~ubuntu-branches/ubuntu/quantal/kdevplatform/quantal-proposed

« back to all changes in this revision

Viewing changes to language/highlighting/codehighlighting.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-24 00:06:18 UTC
  • mfrom: (0.3.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20101024000618-7otebin77mfcmt3b
Tags: 1.1.0-0ubuntu1
* New upstream release
  - Bump build-dependencies
  - Build against libboost-serialization1.42-dev
  - Update kdevplatform1-libs.install
  - Update kdevplatform-dev.install

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
 
96
96
    virtual void highlightDeclaration(KDevelop::Declaration* declaration, const QColor &color) const;
97
97
    virtual void highlightUse(KDevelop::DUContext* context, int index, const QColor &color) const;
98
 
    ///TODO: evaluate whether this should stay virtual for 4.1 and later
99
 
    virtual void highlightUses(KDevelop::DUContext* context) const;
 
98
    /**
 
99
     * @param context Should be the context from where the declaration is used, if a use is highlighted.
 
100
     * */
 
101
    virtual Types typeForDeclaration(KDevelop::Declaration* dec, KDevelop::DUContext* context) const;
100
102
 
101
103
    void highlightDUChainSimple(KDevelop::DUContext* context) const;
102
104
    void highlightDUChain(KDevelop::DUContext* context) const;
103
105
    void highlightDUChain(KDevelop::DUContext* context, QHash<KDevelop::Declaration*, uint> colorsForDeclarations, ColorMap) const;
 
106
    void highlightUses(KDevelop::DUContext* context) const;
104
107
    void outputRange( KTextEditor::SmartRange * range ) const;
105
108
 
106
109
    KDevelop::Declaration* localClassFromCodeContext(KDevelop::DUContext* context) const;
107
 
    /**
108
 
     * @param context Should be the context from where the declaration is used, if a use is highlighted.
109
 
     * TODO: make this virtual for 4.1
110
 
     * */
111
 
    Types typeForDeclaration(KDevelop::Declaration* dec, KDevelop::DUContext* context) const;
112
110
 
113
111
    //A temporary hash for speedup
114
112
    mutable QHash<KDevelop::DUContext*, KDevelop::Declaration*> m_contextClasses;
140
138
    KTextEditor::Attribute::Ptr attributeForType(Types type, Contexts context, const QColor &color) const;
141
139
    KTextEditor::Attribute::Ptr attributeForDepth(int depth) const;
142
140
 
 
141
  protected:
 
142
    //Can be overridden to create an own instance type
 
143
    virtual CodeHighlightingInstance* createInstance() const;
 
144
 
143
145
  private:
144
146
    //Returns whether the given attribute was set by the code highlighting, and not by something else
145
147
    //Always returns true when the attribute is zero
146
148
    bool isCodeHighlight(KTextEditor::Attribute::Ptr attr) const;
147
149
 
148
 
  ///TODO: 4.1 - reorder the functions to make more sense, cannot do now without changing ABI
149
 
  protected:
150
 
    //Can be overridden to create an own instance type
151
 
    virtual CodeHighlightingInstance* createInstance() const;
152
 
 
153
 
  private:
154
150
    friend class CodeHighlightingInstance;
155
151
 
156
152
    mutable QHash<Types, KTextEditor::Attribute::Ptr> m_definitionAttributes;