1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

bug 65477

This commit is contained in:
Andrew Niefer 2004-06-03 13:45:11 +00:00
parent 34bb8dd348
commit 6ceb2d0ee8
3 changed files with 17 additions and 0 deletions

View file

@ -112,6 +112,8 @@ public abstract class FindAction extends SelectionParseAction {
if( obj == null || !(obj instanceof ICElement ) ){ if( obj == null || !(obj instanceof ICElement ) ){
operationNotAvailable(); operationNotAvailable();
return; return;
} else {
clearStatusLine();
} }
ICElement element = (ICElement) obj; ICElement element = (ICElement) obj;
@ -152,6 +154,8 @@ public abstract class FindAction extends SelectionParseAction {
if (node == null || !( node instanceof IASTNode )){ if (node == null || !( node instanceof IASTNode )){
operationNotAvailable(); operationNotAvailable();
return; return;
} else {
clearStatusLine();
} }
CSearchQuery job = createSearchQuery(node); CSearchQuery job = createSearchQuery(node);

View file

@ -187,6 +187,8 @@ public class OpenDeclarationsAction extends SelectionParseAction implements IUpd
if( namedElement == null ){ if( namedElement == null ){
operationNotAvailable(); operationNotAvailable();
return; return;
} else {
clearStatusLine();
} }
if( storage.getResource() != null ) if( storage.getResource() != null )

View file

@ -130,6 +130,17 @@ public class SelectionParseAction extends Action {
if( statusManager != null ) if( statusManager != null )
statusManager.setErrorMessage(CSearchMessages.getString("CSearchOperation.operationUnavailable.message"));//$NON-NLS-1$ statusManager.setErrorMessage(CSearchMessages.getString("CSearchOperation.operationUnavailable.message"));//$NON-NLS-1$
} }
protected void clearStatusLine() {
IStatusLineManager statusManager = null;
if (fSite instanceof IViewSite){
statusManager = ((IViewSite) fSite).getActionBars().getStatusLineManager();
}
else if (fSite instanceof IEditorSite){
statusManager = ((IEditorSite) fSite).getActionBars().getStatusLineManager();
}
if( statusManager != null )
statusManager.setErrorMessage( "" ); //$NON-NLS-1$
}
//TODO: Change this to work with qualified identifiers //TODO: Change this to work with qualified identifiers
public SelSearchNode getSelection( int fPos ) { public SelSearchNode getSelection( int fPos ) {