本文整理汇总了Java中org.eclipse.jface.text.DefaultInformationControl类的典型用法代码示例。如果您正苦于以下问题:Java DefaultInformationControl类的具体用法?Java DefaultInformationControl怎么用?Java DefaultInformationControl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DefaultInformationControl类属于org.eclipse.jface.text包,在下文中一共展示了DefaultInformationControl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doCreateInformationControl
import org.eclipse.jface.text.DefaultInformationControl; //导入依赖的package包/类
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
String tooltipAffordanceString = EditorsUI
.getTooltipAffordanceString();
if (BrowserInformationControl.isAvailable(parent)) {
String font = "org.eclipse.jdt.ui.javadocfont";
BrowserInformationControl iControl = new BrowserInformationControl(
parent, font, false) {
@Override
public IInformationControlCreator getInformationPresenterControlCreator() {
return fInformationPresenterControlCreator;
}
};
addLinkListener(iControl);
return iControl;
} else {
return new DefaultInformationControl(parent,
tooltipAffordanceString);
}
}
示例2: doCreateInformationControl
import org.eclipse.jface.text.DefaultInformationControl; //导入依赖的package包/类
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
String tooltipAffordanceString = "Press F2 for focus";
if (BrowserInformationControl.isAvailable(parent)) {
String font = JFaceResources.DIALOG_FONT;
BrowserInformationControl iControl = new BrowserInformationControl(
parent, font, tooltipAffordanceString) {
/*
* @see org.eclipse.jface.text.IInformationControlExtension5#
* getInformationPresenterControlCreator()
*/
@Override
public IInformationControlCreator getInformationPresenterControlCreator() {
return fInformationPresenterControlCreator;
}
};
addLinkListener(iControl);
return iControl;
} else {
return new DefaultInformationControl(parent,
tooltipAffordanceString);
}
}
示例3: installProjectionSupport
import org.eclipse.jface.text.DefaultInformationControl; //导入依赖的package包/类
/**
* Install everything necessary to get document folding working and enable
* document folding
*
* @param sourceViewer
*/
private void installProjectionSupport() {
ProjectionViewer projectionViewer = (ProjectionViewer) getSourceViewer();
fProjectionSupport = new ProjectionSupport(projectionViewer, getAnnotationAccess(), getSharedColors());
fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error"); //$NON-NLS-1$
fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning"); //$NON-NLS-1$
fProjectionSupport.setHoverControlCreator(new IInformationControlCreator() {
public IInformationControl createInformationControl(Shell parent) {
return new DefaultInformationControl(parent);
}
});
fProjectionSupport.install();
if (isFoldingEnabled()) {
projectionViewer.doOperation(ProjectionViewer.TOGGLE);
}
}
示例4: doCreateInformationControl
import org.eclipse.jface.text.DefaultInformationControl; //导入依赖的package包/类
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
String tooltipAffordanceString = ""; //"Press 'F2' for focus";//EditorsUI.getTooltipAffordanceString();
if (BrowserInformationControl.isAvailable(parent)) {
String font = "org.eclipse.jdt.ui.javadocfont"; // FIXME: PreferenceConstants.APPEARANCE_JAVADOC_FONT;
IXtextBrowserInformationControl iControl = new XtextBrowserInformationControl(parent, font,
tooltipAffordanceString) {
/*
* @see org.eclipse.jface.text.IInformationControlExtension5#getInformationPresenterControlCreator()
*/
@Override
public IInformationControlCreator getInformationPresenterControlCreator() {
return fInformationPresenterControlCreator;
}
};
addLinkListener(iControl);
return iControl;
} else {
return new DefaultInformationControl(parent, tooltipAffordanceString);
}
}
示例5: getContentAssistant
import org.eclipse.jface.text.DefaultInformationControl; //导入依赖的package包/类
@Override
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
ContentAssistant assistant = new ContentAssistant();
assistant.setDocumentPartitioning(this.getConfiguredDocumentPartitioning(sourceViewer));
CompletionProposalToggler toggler = new CompletionProposalToggler();
assistant.setContentAssistProcessor(toggler, IDocument.DEFAULT_CONTENT_TYPE);
assistant.setContentAssistProcessor(toggler, EditorConstants.PARTITION_TYPE_BRAINFUCK_CODE);
assistant.addCompletionListener(toggler);
assistant.setStatusLineVisible(true);
assistant.setRepeatedInvocationMode(true);
assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
assistant.setAutoActivationDelay(500);
assistant.enableAutoActivation(false);
assistant.setInformationControlCreator(new AbstractReusableInformationControlCreator() {
@Override
protected IInformationControl doCreateInformationControl(Shell parent) {
return new DefaultInformationControl(parent);
}
});
assistant.setContentAssistProcessor(null, EditorConstants.PARTITION_TYPE_MULTILINE_COMMENT);
return assistant;
}
示例6: doCreateInformationControl
import org.eclipse.jface.text.DefaultInformationControl; //导入依赖的package包/类
@Override
public IInformationControl doCreateInformationControl(final Shell parent) {
final String tooltipAffordanceString = EditorsUI.getTooltipAffordanceString();
if (BrowserInformationControl.isAvailable(parent)) {
final String font = "org.eclipse.jdt.ui.javadocfont"; // FIXME:
// PreferenceConstants.APPEARANCE_JAVADOC_FONT;
final IXtextBrowserInformationControl iControl =
new GamlInformationControl(parent, font, tooltipAffordanceString) {
};
addLinkListener(iControl);
return iControl;
} else {
return new DefaultInformationControl(parent, tooltipAffordanceString);
}
}
示例7: doCreateInformationControl
import org.eclipse.jface.text.DefaultInformationControl; //导入依赖的package包/类
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
String tooltipAffordanceString = "Press F2 for focus";
if (BrowserInformationControl.isAvailable(parent)) {
String font = JFaceResources.DIALOG_FONT;
BrowserInformationControl iControl = new BrowserInformationControl(
parent, font, tooltipAffordanceString) {
/*
* @see org.eclipse.jface.text.IInformationControlExtension5#
* getInformationPresenterControlCreator()
*/
@Override
public IInformationControlCreator getInformationPresenterControlCreator() {
return fInformationPresenterControlCreator;
}
};
// addLinkListener(iControl);
return iControl;
} else {
return new DefaultInformationControl(parent,
tooltipAffordanceString);
}
}
示例8: doCreateInformationControl
import org.eclipse.jface.text.DefaultInformationControl; //导入依赖的package包/类
public IInformationControl doCreateInformationControl(Shell parent)
{
if (BrowserInformationControl.isAvailable(parent))
{
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
CustomBrowserInformationControl iControl = new CustomBrowserInformationControl(parent, null, tbm);
iControl.setBackgroundColor(documentationHover.getBackgroundColor());
iControl.setForegroundColor(documentationHover.getForegroundColor());
documentationHover.populateToolbarActions(tbm, iControl);
tbm.update(true);
documentationHover.installLinkListener(iControl);
return iControl;
}
else
{
return new DefaultInformationControl(parent, true);
}
}
示例9: doCreateInformationControl
import org.eclipse.jface.text.DefaultInformationControl; //导入依赖的package包/类
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
String tooltipAffordanceString= fAdditionalInfoAffordance ? JavaPlugin.getAdditionalInfoAffordanceString() : EditorsUI.getTooltipAffordanceString();
if (BrowserInformationControl.isAvailable(parent)) {
String font= PreferenceConstants.APPEARANCE_JAVADOC_FONT;
BrowserInformationControl iControl= new BrowserInformationControl(parent, font, tooltipAffordanceString) {
/*
* @see org.eclipse.jface.text.IInformationControlExtension5#getInformationPresenterControlCreator()
*/
@Override
public IInformationControlCreator getInformationPresenterControlCreator() {
return fInformationPresenterControlCreator;
}
};
addLinkListener(iControl);
return iControl;
} else {
return new DefaultInformationControl(parent, tooltipAffordanceString);
}
}
示例10: getContentAssistant
import org.eclipse.jface.text.DefaultInformationControl; //导入依赖的package包/类
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
// Create content assistant
ContentAssistant assistant = new ContentAssistant();
// required to display additional info
assistant.setInformationControlCreator(new IInformationControlCreator() {
public IInformationControl createInformationControl(Shell parent) {
return new DefaultInformationControl(parent, true);
}
});
processor.setFile(file);
// Set this processor for each supported content type
assistant.setContentAssistProcessor(processor, XMLPartitionScanner.XML_TAG);
assistant.setContentAssistProcessor(processor, XMLPartitionScanner.XML_DEFAULT);
assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
// Return the content assistant
return assistant;
}
示例11: createPartControl
import org.eclipse.jface.text.DefaultInformationControl; //导入依赖的package包/类
@Override
public void createPartControl(Composite parent) {
super.createPartControl(parent);
try {
ProjectionViewer projectionViewer = (ProjectionViewer) getSourceViewer();
fProjectionSupport = new ProjectionSupport(projectionViewer, getAnnotationAccess(), getSharedColors());
fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error");
fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning");
fProjectionSupport.setHoverControlCreator(new IInformationControlCreator() {
@Override
public IInformationControl createInformationControl(Shell shell) {
return new DefaultInformationControl(shell);
}
});
fProjectionSupport.install();
if (isFoldingEnabled()) {
projectionViewer.doOperation(ProjectionViewer.TOGGLE);
}
} catch (Exception e) {
Log.log(e);
}
}
示例12: createInformationControl
import org.eclipse.jface.text.DefaultInformationControl; //导入依赖的package包/类
@Override
public IInformationControl createInformationControl(Shell parent) {
if (ReducedBrowserInformationControl.isAvailableFor(parent)) {
ReducedBrowserInformationControl control = new ReducedBrowserInformationControl(parent);
return control;
} else {
return new DefaultInformationControl(parent, true);
}
}
示例13: getHoverControlCreator
import org.eclipse.jface.text.DefaultInformationControl; //导入依赖的package包/类
@Override
public IInformationControlCreator getHoverControlCreator() {
return new IInformationControlCreator() {
@Override
public IInformationControl createInformationControl(Shell parent) {
return new DefaultInformationControl(parent, EditorsUI.getTooltipAffordanceString());
}
};
}
示例14: doCreateInformationControl
import org.eclipse.jface.text.DefaultInformationControl; //导入依赖的package包/类
@Override
public IInformationControl doCreateInformationControl(Shell shell) {
if (SimpleBrowserInformationControl.isAvailableFor(shell)){
SimpleBrowserInformationControl control = new SimpleBrowserInformationControl(shell,20);
if (lazyBuilder!=null){
control.setBrowserEGradleLinkListener(new DefaultEGradleLinkListener(lazyBuilder.getFgColor(), lazyBuilder.getBgColor(), lazyBuilder.getCommentColor(), lazyBuilder.getBuilder()));
}
return control;
}
return new DefaultInformationControl(shell, true);
}
示例15: createInformationControl
import org.eclipse.jface.text.DefaultInformationControl; //导入依赖的package包/类
@Override
public IInformationControl createInformationControl(Shell parent) {
if (SimpleBrowserInformationControl.isAvailableFor(parent)) {
SimpleBrowserInformationControl control = new SimpleBrowserInformationControl(parent);
control.setBrowserEGradleLinkListener(
new DefaultEGradleLinkListener(fgColor, bgColor, commentColorWeb, builder));
return control;
} else {
return new DefaultInformationControl(parent, true);
}
}