mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
Bug 282495 - Add hotkey for "mouse hover" like tooltip
Patch by Marc-Andre Laperle
This commit is contained in:
parent
fa2d625b25
commit
6cd02fdd00
1 changed files with 16 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2000, 2010 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -8,6 +8,7 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
* Sergey Prigogin (Google)
|
||||
* Marc-Andre Laperle - bug 282495
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.ui.text.c.hover;
|
||||
|
||||
|
@ -28,6 +29,7 @@ import org.eclipse.cdt.ui.text.c.hover.ICEditorTextHover;
|
|||
public class CTypeHover implements ICEditorTextHover, ITextHoverExtension, ITextHoverExtension2, IInformationProviderExtension2 {
|
||||
private AbstractCEditorTextHover fProblemHover;
|
||||
private AbstractCEditorTextHover fCDocHover;
|
||||
private AbstractCEditorTextHover fBestMatchHover;
|
||||
|
||||
private AbstractCEditorTextHover fCurrentHover;
|
||||
|
||||
|
@ -35,6 +37,7 @@ public class CTypeHover implements ICEditorTextHover, ITextHoverExtension, IText
|
|||
fProblemHover= new ProblemHover();
|
||||
fCDocHover= new CDocHover();
|
||||
fCurrentHover= null;
|
||||
fBestMatchHover = new BestMatchHover();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -43,6 +46,7 @@ public class CTypeHover implements ICEditorTextHover, ITextHoverExtension, IText
|
|||
public void setEditor(IEditorPart editor) {
|
||||
fProblemHover.setEditor(editor);
|
||||
fCDocHover.setEditor(editor);
|
||||
fBestMatchHover.setEditor(editor);
|
||||
fCurrentHover= null;
|
||||
}
|
||||
|
||||
|
@ -74,8 +78,17 @@ public class CTypeHover implements ICEditorTextHover, ITextHoverExtension, IText
|
|||
return hoverInfo;
|
||||
}
|
||||
|
||||
fCurrentHover= fCDocHover;
|
||||
return fCDocHover.getHoverInfo2(textViewer, hoverRegion);
|
||||
hoverInfo = fCDocHover.getHoverInfo2(textViewer, hoverRegion);
|
||||
if(hoverInfo != null){
|
||||
fCurrentHover= fCDocHover;
|
||||
}
|
||||
|
||||
hoverInfo = fBestMatchHover.getHoverInfo(textViewer, hoverRegion);
|
||||
if(hoverInfo != null){
|
||||
fCurrentHover = fBestMatchHover;
|
||||
}
|
||||
|
||||
return hoverInfo;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue