mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Patch for Andrew Niefer
core: - fix bug 44026 by checking scope before reporting match in MatchLocator.report ui: -bug44032 - deleting/moving files breaks search * modified src/org/eclipse/cdt/ui/CSearchResultLabelProvider getText to return empty string instead of null -bug43130 - Selected resources is disabled but selected * src/org/eclipse/cdt/internal/ui/search/CSearchPage
This commit is contained in:
parent
e63b06fc5f
commit
77fbc604e7
5 changed files with 23 additions and 7 deletions
|
@ -1,3 +1,6 @@
|
|||
2003-10-01 Andrew Niefer
|
||||
- fix bug 44026 by checking scope before reporting match in MatchLocator.report
|
||||
|
||||
2003-10-01 Andrew Niefer
|
||||
- fix BasicSearchMatch.equals() for bug43988
|
||||
|
||||
|
|
|
@ -441,6 +441,10 @@ public class MatchLocator implements ISourceElementRequestor, ICSearchConstants
|
|||
|
||||
protected void report( ISourceElementCallbackDelegate node, int accuracyLevel ){
|
||||
try {
|
||||
if( currentResource != null && !searchScope.encloses(currentResource.getFullPath().toOSString() ) ){
|
||||
return;
|
||||
}
|
||||
|
||||
int offset = 0;
|
||||
int end = 0;
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2003-10-01 Andrew Niefer
|
||||
-bug44032 - deleting/moving files breaks search
|
||||
* modified src/org/eclipse/cdt/ui/CSearchResultLabelProvider getText to return empty string instead of null
|
||||
-bug43130 - Selected resources is disabled but selected
|
||||
* src/org/eclipse/cdt/internal/ui/search/CSearchPage
|
||||
|
||||
2003-10-01 Alain Magloire
|
||||
|
||||
Fix PR 44013, not defining a resource.
|
||||
|
|
|
@ -86,14 +86,17 @@ public class CSearchPage extends DialogPage implements ISearchPage, ICSearchCons
|
|||
String scopeDescription = ""; //$NON-NLS-1$
|
||||
|
||||
switch( getContainer().getSelectedScope() ) {
|
||||
case ISearchPageContainer.SELECTION_SCOPE:
|
||||
if( fStructuredSelection != null && fStructuredSelection.iterator().hasNext() ){
|
||||
scopeDescription = CSearchMessages.getString("SelectionScope"); //$NON-NLS-1$
|
||||
scope = CSearchScopeFactory.getInstance().createCSearchScope(fStructuredSelection);
|
||||
break;
|
||||
}
|
||||
/* else fall through to workspace scope */
|
||||
case ISearchPageContainer.WORKSPACE_SCOPE:
|
||||
scopeDescription = CSearchMessages.getString("WorkspaceScope"); //$NON-NLS-1$
|
||||
scope = SearchEngine.createWorkspaceScope();
|
||||
break;
|
||||
case ISearchPageContainer.SELECTION_SCOPE:
|
||||
scopeDescription = CSearchMessages.getString("SelectionScope"); //$NON-NLS-1$
|
||||
scope = CSearchScopeFactory.getInstance().createCSearchScope(fStructuredSelection);
|
||||
break;
|
||||
case ISearchPageContainer.WORKING_SET_SCOPE:
|
||||
IWorkingSet[] workingSets= getContainer().getSelectedWorkingSets();
|
||||
// should not happen - just to be sure
|
||||
|
|
|
@ -120,18 +120,18 @@ public class CSearchResultLabelProvider extends LabelProvider {
|
|||
try {
|
||||
match = (IMatch) marker.getAttribute(CSearchResultCollector.IMATCH);
|
||||
} catch (CoreException e) {
|
||||
return null;
|
||||
return "";
|
||||
}
|
||||
} else if( element instanceof IMatch ){
|
||||
match = (IMatch) element;
|
||||
}
|
||||
|
||||
if( match == null )
|
||||
return null;
|
||||
return "";
|
||||
|
||||
IResource resource = match.getResource();
|
||||
|
||||
String result = null;
|
||||
String result = "";
|
||||
String path = (resource != null ) ? resource.getFullPath().toString() : "";
|
||||
|
||||
switch( getOrder() ){
|
||||
|
|
Loading…
Add table
Reference in a new issue