mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
bug 52567 - cdt NPE prevents java search from working
This commit is contained in:
parent
92b0174888
commit
2c1e95c730
3 changed files with 14 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-02-20 Andrew Niefer
|
||||
bug 52567
|
||||
change the extension IDs for the C Search sorters to avoid conflict with the JDT
|
||||
check for nulls in PathNameSorter.compare
|
||||
|
||||
2004-02-18 Alain Magloire
|
||||
|
||||
Remove deprecated Eclipse-2.0 api calls
|
||||
|
|
|
@ -456,7 +456,7 @@
|
|||
icon="icons/full/clcl16/search_sortmatch.gif"
|
||||
tooltip="%ElementNameSorter.tooltip"
|
||||
class="org.eclipse.cdt.internal.ui.search.ElementNameSorter"
|
||||
id="org.eclipse.search.internal.ui.ElementNameSorter">
|
||||
id="org.eclipse.cdt.search.internal.ui.ElementNameSorter">
|
||||
</sorter>
|
||||
<sorter
|
||||
pageId="org.eclipse.cdt.ui.CSearchPage"
|
||||
|
@ -464,7 +464,7 @@
|
|||
icon="icons/full/clcl16/search_sortmatch.gif"
|
||||
tooltip="%ParentNameSorter.tooltip"
|
||||
class="org.eclipse.cdt.internal.ui.search.ParentNameSorter"
|
||||
id="org.eclipse.search.internal.ui.ParentNameSorter">
|
||||
id="org.eclipse.cdt.search.internal.ui.ParentNameSorter">
|
||||
</sorter>
|
||||
<sorter
|
||||
pageId="org.eclipse.cdt.ui.CSearchPage"
|
||||
|
@ -472,7 +472,7 @@
|
|||
icon="icons/full/clcl16/search_sortmatch.gif"
|
||||
tooltip="%PathNameSorter.tooltip"
|
||||
class="org.eclipse.cdt.internal.ui.search.PathNameSorter"
|
||||
id="org.eclipse.search.internal.ui.PathNameSorter">
|
||||
id="org.eclipse.cdt.search.internal.ui.PathNameSorter">
|
||||
</sorter>
|
||||
</extension>
|
||||
<extension
|
||||
|
|
|
@ -48,6 +48,9 @@ public class PathNameSorter extends ViewerSorter {
|
|||
match1 = (IMatch)entry1.getSelectedMarker().getAttribute( CSearchResultCollector.IMATCH );
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
if( match1 == null ){
|
||||
return 0;
|
||||
}
|
||||
name1 = match1.getLocation().toString();
|
||||
}
|
||||
if( e2 instanceof ISearchResultViewEntry ) {
|
||||
|
@ -56,6 +59,9 @@ public class PathNameSorter extends ViewerSorter {
|
|||
match2 = (IMatch)entry2.getSelectedMarker().getAttribute( CSearchResultCollector.IMATCH );
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
if( match2 == null ){
|
||||
return 0;
|
||||
}
|
||||
//name2 = _labelProvider.getText( e2 );
|
||||
name2 = match2.getLocation().toString();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue