當前位置: 首頁>>代碼示例>>Java>>正文


Java IInformationControlCreator類代碼示例

本文整理匯總了Java中org.eclipse.jface.text.IInformationControlCreator的典型用法代碼示例。如果您正苦於以下問題:Java IInformationControlCreator類的具體用法?Java IInformationControlCreator怎麽用?Java IInformationControlCreator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IInformationControlCreator類屬於org.eclipse.jface.text包,在下文中一共展示了IInformationControlCreator類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: doCreateInformationControl

import org.eclipse.jface.text.IInformationControlCreator; //導入依賴的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.IInformationControlCreator; //導入依賴的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.IInformationControlCreator; //導入依賴的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.IInformationControlCreator; //導入依賴的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.IInformationControlCreator; //導入依賴的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.IInformationControlCreator; //導入依賴的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: doCreateInformationControl

import org.eclipse.jface.text.IInformationControlCreator; //導入依賴的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

示例8: AdditionalInfoController

import org.eclipse.jface.text.IInformationControlCreator; //導入依賴的package包/類
/**
 * Creates a new additional information controller.
 * 
 * @param creator
 *            the information control creator to be used by this controller
 * @param delay
 *            time in milliseconds after which additional info should be displayed
 */
AdditionalInfoController(IInformationControlCreator creator, int delay)
{
	super(creator);
	setCloser(new Closer());
	fDelay = delay;
	setAnchor(ANCHOR_RIGHT);
	setFallbackAnchors(new Anchor[] { ANCHOR_RIGHT, ANCHOR_LEFT, ANCHOR_BOTTOM });

	/*
	 * Adjust the location by one pixel towards the proposal popup, so that the single pixel border of the
	 * additional info popup overlays with the border of the popup. This avoids having a double black line.
	 */
	int spacing = -1;
	setMargins(spacing, spacing); // see also adjustment in #computeLocation

	InformationControlReplacer replacer = new InformationControlReplacer(new DefaultPresenterControlCreator());
	getInternalAccessor().setInformationControlReplacer(replacer);
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:27,代碼來源:AdditionalInfoController.java

示例9: doCreateInformationControl

import org.eclipse.jface.text.IInformationControlCreator; //導入依賴的package包/類
public IInformationControl doCreateInformationControl(Shell parent)
{
	if (CustomBrowserInformationControl.isAvailable(parent))
	{
		CustomBrowserInformationControl iControl = new CustomBrowserInformationControl(parent, null,
				EditorsUI.getTooltipAffordanceString())
		{
			public IInformationControlCreator getInformationPresenterControlCreator()
			{
				return informationPresenterControlCreator;
			}
		};
		iControl.setBackgroundColor(getBackgroundColor());
		iControl.setForegroundColor(getForegroundColor());
		return iControl;
	}
	else
	{
		// return new ThemedInformationControl(parent, null, EditorsUI.getTooltipAffordanceString());
		return new DefaultInformationControl(parent, true);
	}
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:23,代碼來源:AbstractDocumentationHover.java

示例10: doCreateInformationControl

import org.eclipse.jface.text.IInformationControlCreator; //導入依賴的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

示例11: getHoverControlCreator

import org.eclipse.jface.text.IInformationControlCreator; //導入依賴的package包/類
@Override
public IInformationControlCreator getHoverControlCreator() {
	if (creator == null) {
		creator = new GradleTextHoverControlCreator();
	}
	return creator;
}
 
開發者ID:de-jcup,項目名稱:eclipse-bash-editor,代碼行數:8,代碼來源:BashTextHover.java

示例12: getInformationPresenterControlCreator

import org.eclipse.jface.text.IInformationControlCreator; //導入依賴的package包/類
@Override
public IInformationControlCreator getInformationPresenterControlCreator() {
	return new IInformationControlCreator() {
		@Override
		public IInformationControl createInformationControl(Shell parent) {
			ReducedBrowserInformationControl newControl = new ReducedBrowserInformationControl(parent);
			return newControl;
		}
	};
}
 
開發者ID:de-jcup,項目名稱:eclipse-bash-editor,代碼行數:11,代碼來源:ReducedBrowserInformationControl.java

示例13: getHoverControlCreator

import org.eclipse.jface.text.IInformationControlCreator; //導入依賴的package包/類
@Override
public IInformationControlCreator getHoverControlCreator() {
    return new IInformationControlCreator() {
        @Override
        public IInformationControl createInformationControl(Shell parent) {
            return new DefaultInformationControl(parent, EditorsUI.getTooltipAffordanceString());
        }
    };
}
 
開發者ID:pgcodekeeper,項目名稱:pgcodekeeper,代碼行數:10,代碼來源:SQLEditorTextHover.java

示例14: getInformationControlCreator

import org.eclipse.jface.text.IInformationControlCreator; //導入依賴的package包/類
@Override
public IInformationControlCreator getInformationControlCreator() {
	if (informationControlCreator == null) {
		informationControlCreator=new EGradleInformationControlCreator();
	}
	return informationControlCreator;
}
 
開發者ID:de-jcup,項目名稱:egradle,代碼行數:8,代碼來源:GradleCompletionProposal.java

示例15: doCreateInformationControl

import org.eclipse.jface.text.IInformationControlCreator; //導入依賴的package包/類
public IInformationControl doCreateInformationControl(Shell parent) {
	String tooltipAffordanceString = EditorsUI.getTooltipAffordanceString();
	if (de.darwinspl.preferences.resource.dwprofile.ui.DwprofileBrowserInformationControl.isAvailable(parent)) {
		de.darwinspl.preferences.resource.dwprofile.ui.DwprofileBrowserInformationControl iControl = new de.darwinspl.preferences.resource.dwprofile.ui.DwprofileBrowserInformationControl(parent, FONT, tooltipAffordanceString) {
			public IInformationControlCreator getInformationPresenterControlCreator() {
				return fInformationPresenterControlCreator;
			}
		};
		return iControl;
	} else {
		return new DefaultInformationControl(parent, tooltipAffordanceString);
	}
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:14,代碼來源:DwprofileTextHover.java


注:本文中的org.eclipse.jface.text.IInformationControlCreator類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。