1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 10:46:02 +02:00

2005-02-09 Alain Magloire

PR 84841: Description of the template in the hover was incorrect.
	* src/org/eclipse/cdt/internal/ui/text/TemplateEngine.java
This commit is contained in:
Alain Magloire 2005-02-09 23:17:43 +00:00
parent 3f424875d3
commit ac858eec7c
2 changed files with 23 additions and 2 deletions

View file

@ -1,4 +1,8 @@
2005-02-016 Alain Magloire
2005-02-09 Alain Magloire
PR 84841: Description of the template in the hover was incorrect.
* src/org/eclipse/cdt/internal/ui/text/TemplateEngine.java
2005-02-06 Alain Magloire
PR 84423, Patch from : Tomaszewski Przemek
Added keybinding next/previous(CTRL-SHIFT-UP/DOWN) to from
member to member in the CEditor(PR 84423).

View file

@ -13,10 +13,13 @@ import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.internal.corext.template.c.TranslationUnitContext;
import org.eclipse.cdt.internal.corext.template.c.TranslationUnitContextType;
import org.eclipse.cdt.internal.ui.CPluginImages;
import org.eclipse.cdt.internal.ui.text.c.hover.SourceViewerInformationControl;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.text.ICCompletionProposal;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IInformationControl;
import org.eclipse.jface.text.IInformationControlCreator;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.Region;
@ -25,8 +28,10 @@ import org.eclipse.jface.text.templates.TemplateContext;
import org.eclipse.jface.text.templates.TemplateContextType;
import org.eclipse.jface.text.templates.TemplateProposal;
import org.eclipse.jface.util.Assert;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
public class TemplateEngine {
@ -35,6 +40,18 @@ public class TemplateEngine {
public class CTemplateProposal extends TemplateProposal implements ICCompletionProposal {
/* (non-Javadoc)
* @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension3#getInformationControlCreator()
*/
public IInformationControlCreator getInformationControlCreator() {
return new IInformationControlCreator() {
public IInformationControl createInformationControl(Shell parent) {
int shellStyle= SWT.RESIZE;
int style= SWT.V_SCROLL | SWT.H_SCROLL;
return new SourceViewerInformationControl(parent, shellStyle, style);
}
};
}
/**
* @param template
* @param context