当前位置: 首页>>代码示例>>Java>>正文


Java IInformationControl类代码示例

本文整理汇总了Java中org.eclipse.jface.text.IInformationControl的典型用法代码示例。如果您正苦于以下问题:Java IInformationControl类的具体用法?Java IInformationControl怎么用?Java IInformationControl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IInformationControl类属于org.eclipse.jface.text包,在下文中一共展示了IInformationControl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doCreateInformationControl

import org.eclipse.jface.text.IInformationControl; //导入依赖的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);
	}
}
 
开发者ID:Yakindu,项目名称:solidity-ide,代码行数:21,代码来源:CustomCSSHelpHoverProvider.java

示例2: getInformationPresenterControlCreator

import org.eclipse.jface.text.IInformationControl; //导入依赖的package包/类
@Override
public IInformationControlCreator getInformationPresenterControlCreator() {
	/*
	 * Its necessary to implement this - otherwise leaving the origin
	 * tooltip area, which does not contain the browser control, will hide
	 * the control. It would be nicer if eclipse would have an easier
	 * mechanism to reuse the origin control!
	 */
	return new IInformationControlCreator() {
		@Override
		public IInformationControl createInformationControl(Shell parent) {
			SimpleBrowserInformationControl newControl = new SimpleBrowserInformationControl(parent, 20);
			newControl.setBrowserEGradleLinkListener(browserEGradleLinkListener);
			return newControl;
		}
	};
}
 
开发者ID:de-jcup,项目名称:egradle,代码行数:18,代码来源:SimpleBrowserInformationControl.java

示例3: showQuickAnnotations

import org.eclipse.jface.text.IInformationControl; //导入依赖的package包/类
private void showQuickAnnotations(final JavaEditor editor) {
  InformationPresenter presenter = new InformationPresenter(new IInformationControlCreator() {
    public IInformationControl createInformationControl(Shell parent) {
      int shellStyle = SWT.RESIZE;
      int treeStyle = SWT.V_SCROLL | SWT.H_SCROLL;
      return new QuickAnnotationInformationControl(parent, shellStyle, treeStyle, editor);
    }
  });

  IInformationProvider provider = new JavaElementProvider(editor, false);
  presenter.setInformationProvider(provider, IDocument.DEFAULT_CONTENT_TYPE);

  presenter.install(editor.getViewer());
  presenter.install(editor.getViewer().getTextWidget());
  presenter.showInformation();
}
 
开发者ID:nblix,项目名称:overviewruler,代码行数:17,代码来源:OpenHandler.java

示例4: doCreateInformationControl

import org.eclipse.jface.text.IInformationControl; //导入依赖的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);
	}
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:24,代码来源:HoverControlCreator.java

示例5: installProjectionSupport

import org.eclipse.jface.text.IInformationControl; //导入依赖的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);
	}
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:24,代码来源:JavaScriptLightWeightEditor.java

示例6: doCreateInformationControl

import org.eclipse.jface.text.IInformationControl; //导入依赖的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);
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:22,代码来源:DefaultEObjectHoverProvider.java

示例7: getContentAssistant

import org.eclipse.jface.text.IInformationControl; //导入依赖的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;
}
 
开发者ID:RichardBirenheide,项目名称:brainfuck,代码行数:26,代码来源:BfSourceViewerConfiguration.java

示例8: doCreateInformationControl

import org.eclipse.jface.text.IInformationControl; //导入依赖的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);
	}
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:18,代码来源:GamlHoverProvider.java

示例9: doCreateInformationControl

import org.eclipse.jface.text.IInformationControl; //导入依赖的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);
	}
}
 
开发者ID:angelozerr,项目名称:eclipse-wtp-json,代码行数:24,代码来源:JSONHoverControlCreator.java

示例10: doCreateInformationControl

import org.eclipse.jface.text.IInformationControl; //导入依赖的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);
	}
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:19,代码来源:AbstractDocumentationHover.java

示例11: doCreateInformationControl

import org.eclipse.jface.text.IInformationControl; //导入依赖的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);
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:21,代码来源:JavadocHover.java

示例12: fillToolBar

import org.eclipse.jface.text.IInformationControl; //导入依赖的package包/类
@Override
public void fillToolBar(ToolBarManager manager, IInformationControl infoControl) {
	super.fillToolBar(manager, infoControl);
	if (!(annotation instanceof IJavaAnnotation))
		return;

	IJavaAnnotation javaAnnotation= (IJavaAnnotation) annotation;

	String optionId= JavaCore.getOptionForConfigurableSeverity(javaAnnotation.getId());
	if (optionId != null) {
		IJavaProject javaProject= javaAnnotation.getCompilationUnit().getJavaProject();
		boolean isJavadocProblem= (javaAnnotation.getId() & IProblem.Javadoc) != 0;
		ConfigureProblemSeverityAction problemSeverityAction= new ConfigureProblemSeverityAction(javaProject, optionId, isJavadocProblem, infoControl);
		manager.add(problemSeverityAction);
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:17,代码来源:ProblemHover.java

示例13: getContentAssistant

import org.eclipse.jface.text.IInformationControl; //导入依赖的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;
}
 
开发者ID:apache,项目名称:ant-ivyde,代码行数:21,代码来源:XMLConfiguration.java

示例14: createInformationControl

import org.eclipse.jface.text.IInformationControl; //导入依赖的package包/类
@Override
public IInformationControl createInformationControl(Shell parent) {

    //            try { -- this would show the 'F2' for focus, but we don't actually handle that, so, don't use it.
    //                tooltipAffordanceString = EditorsUI.getTooltipAffordanceString();
    //            } catch (Throwable e) {
    //                //Not available on Eclipse 3.2
    //            }

    //Note: don't use the parent because when it's closed we don't want the parent to have focus (we want the original
    //widget that had focus to regain the focus).
    //            if (parent == null) {
    //                parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    //            }

    String tooltipAffordanceString = null;
    if (this.informationPresenterControlManager != null) {
        InformationPresenterControlManager m = this.informationPresenterControlManager.get();
        if (m != null) {
            tooltipAffordanceString = m.getTooltipAffordanceString();
        }
    }
    PyInformationControl tooltip = new PyInformationControl(null, tooltipAffordanceString, presenter);
    return tooltip;
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:26,代码来源:InformationPresenterHelpers.java

示例15: getHoverControlCreator

import org.eclipse.jface.text.IInformationControl; //导入依赖的package包/类
@Override
public IInformationControlCreator getHoverControlCreator() {
    return new IInformationControlCreator() {

        @Override
        public IInformationControl createInformationControl(Shell parent) {
            String tooltipAffordanceString = null;
            try {
                tooltipAffordanceString = EditorsUI.getTooltipAffordanceString();
            } catch (Throwable e) {
                //Not available on Eclipse 3.2
            }
            informationControl = new PyInformationControl(parent, tooltipAffordanceString,
                    informationPresenter);
            return informationControl;
        }
    };
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:19,代码来源:AbstractPyEditorTextHover.java


注:本文中的org.eclipse.jface.text.IInformationControl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。