Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343880 - DecoratingFileSearchLabelProvider uses JDT color constant
Summary: DecoratingFileSearchLabelProvider uses JDT color constant
Status: CLOSED DUPLICATE of bug 329533
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Search (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Search-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-26 12:00 EDT by Mohamed Hussein CLA
Modified: 2011-04-26 12:02 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mohamed Hussein CLA 2011-04-26 12:00:27 EDT
Build Identifier: 

org.eclipse.search.internal.ui.text.DecoratingFileSearchLabelProvider uses a JDT constant for the highlight search color "org.eclipse.jdt.ui.ColoredLabels.match_highlight"

If you use the Search plugin in an RCP without JDT you will not get highlights.

The irony is that the JDT constant just refers to the constant in the search plugin:

 <colorDefinition
	            label="%coloredLabels.match_highlight.label"
	            categoryId="org.eclipse.jdt.ui.presentation"
	            defaultsTo="org.eclipse.search.ui.match.highlight"
	            id="org.eclipse.jdt.ui.ColoredLabels.match_highlight">
	         <description>
	            %coloredLabels.match_highlight.description
	         </description>

The actual color is in the search plugin itself
      <colorDefinition
	         label="%match_highlight.label"
	         categoryId="org.eclipse.ui.workbenchMisc"
	         value="206,204,247"
	         id="org.eclipse.search.ui.match.highlight">
	         <description>
	            %match_highlight.description
	         </description>
	      </colorDefinition>
To get highlight working I had to redefine the JDT constant in my plugin to the actual value
<extension
              point="org.eclipse.ui.themes">
           <colorDefinition
                 id="org.eclipse.jdt.ui.ColoredLabels.match_highlight"
                 label="text color for search result"
                 value="206,204,247">
           </colorDefinition>
        </extension>
A weird thing is that when I used the defaultsTo it gave me black background??


Reproducible: Always

Steps to Reproduce:
1. Create RCP application with projects and Search but no JDT dependency :-)
2. Search for text
3. You will not get highlight in the search result view
Comment 1 Dani Megert CLA 2011-04-26 12:02:15 EDT

*** This bug has been marked as a duplicate of bug 329533 ***