mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Oops - forgot the change log for 66273...
This commit is contained in:
parent
7f558ffc16
commit
192beb6f39
3 changed files with 29 additions and 10 deletions
|
@ -1,11 +1,9 @@
|
|||
ChangeLog
|
||||
2004-06-09 Bogdan Gheorghe
|
||||
Fix for Bug 66273 - Opening declaration causes stack overflow
|
||||
|
||||
2004-06-08 Tanya Wolff
|
||||
Fix for bug 66139
|
||||
* src/org/eclipse/cdt/internal/ui/editor/CEditorMessages.properties
|
||||
Fix for bug 66136
|
||||
* src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.properties
|
||||
* src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferencesBlock.java
|
||||
* src/org/eclipse/cdt/internal/ui/util/EditorUtility.java
|
||||
|
||||
ChangeLog
|
||||
|
||||
2004-06-08 Tanya Wolff
|
||||
Fix for Bug 63467 - choice format for displaying plural
|
||||
|
|
|
@ -154,7 +154,7 @@ public class CSearchResultPage extends AbstractTextSearchViewPage {
|
|||
* @see org.eclipse.search.ui.text.AbstractTextSearchViewPage#configureTableViewer(org.eclipse.jface.viewers.TableViewer)
|
||||
*/
|
||||
protected void configureTableViewer(TableViewer viewer) {
|
||||
viewer.setLabelProvider(new CountLabelProvider(this, new CSearchResultLabelProvider()));
|
||||
viewer.setLabelProvider(new CountLabelProvider(this, new CSearchResultLabelProvider(this)));
|
||||
_contentProvider=new CSearchTableContentProvider(viewer);
|
||||
viewer.setContentProvider(_contentProvider);
|
||||
setSortOrder(_currentSortOrder);
|
||||
|
@ -250,4 +250,6 @@ public class CSearchResultPage extends AbstractTextSearchViewPage {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.eclipse.core.runtime.CoreException;
|
|||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.jface.viewers.LabelProvider;
|
||||
import org.eclipse.search.ui.ISearchResultViewEntry;
|
||||
import org.eclipse.search.ui.text.Match;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
|
||||
|
@ -43,6 +44,8 @@ public class CSearchResultLabelProvider extends LabelProvider {
|
|||
|
||||
public static final String POTENTIAL_MATCH = CSearchMessages.getString("CSearchResultLabelProvider.potentialMatch"); //$NON-NLS-1$
|
||||
|
||||
private CSearchResultPage searchPage = null;
|
||||
|
||||
public CSearchResultLabelProvider(){
|
||||
_sortOrder = SHOW_PATH;
|
||||
}
|
||||
|
@ -51,8 +54,7 @@ public class CSearchResultLabelProvider extends LabelProvider {
|
|||
* @param page
|
||||
*/
|
||||
public CSearchResultLabelProvider(CSearchResultPage page) {
|
||||
|
||||
// TODO Auto-generated constructor stub
|
||||
searchPage = page;
|
||||
}
|
||||
|
||||
public Image getImage( Object element ) {
|
||||
|
@ -160,6 +162,18 @@ public class CSearchResultLabelProvider extends LabelProvider {
|
|||
String result = ""; //$NON-NLS-1$
|
||||
String path = (resource != null ) ? resource.getFullPath().toString() : ""; //$NON-NLS-1$
|
||||
|
||||
// Object key = computeGroupByKey(match);
|
||||
|
||||
if (searchPage != null){
|
||||
int matchCount = searchPage.getDisplayedMatchCount(new Match(match,match.getStartOffset(),match.getEndOffset() - match.getStartOffset()));
|
||||
if (matchCount < 2){
|
||||
System.out.println("Singular");
|
||||
}else{
|
||||
System.out.println("Plural"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch( getOrder() ){
|
||||
case SHOW_NAME_ONLY:
|
||||
result = match.getName();
|
||||
|
@ -202,6 +216,11 @@ public class CSearchResultLabelProvider extends LabelProvider {
|
|||
_sortOrder = orderFlag;
|
||||
}
|
||||
|
||||
public Object computeGroupByKey(IMatch match) {
|
||||
|
||||
return match.getParentName() + "::" + match.getName() + " - " + match.getLocation(); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
private int _sortOrder;
|
||||
private int _textFlags;
|
||||
private int _imageFlags;
|
||||
|
|
Loading…
Add table
Reference in a new issue