本文整理汇总了Java中org.eclipse.jface.internal.text.html.BrowserInformationControlInput类的典型用法代码示例。如果您正苦于以下问题:Java BrowserInformationControlInput类的具体用法?Java BrowserInformationControlInput怎么用?Java BrowserInformationControlInput使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BrowserInformationControlInput类属于org.eclipse.jface.internal.text.html包,在下文中一共展示了BrowserInformationControlInput类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setInformation
import org.eclipse.jface.internal.text.html.BrowserInformationControlInput; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @deprecated use {@link #setInput(Object)}
*/
public void setInformation(final String content)
{
setInput(new BrowserInformationControlInput(null)
{
public String getHtml()
{
return content;
}
public String getInputName()
{
return ""; //$NON-NLS-1$
}
public Object getInputElement()
{
return content;
}
});
}
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:26,代码来源:CustomBrowserInformationControl.java
示例2: populateToolbarActions
import org.eclipse.jface.internal.text.html.BrowserInformationControlInput; //导入依赖的package包/类
@Override
public void populateToolbarActions(ToolBarManager tbm, CustomBrowserInformationControl iControl)
{
final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
final OpenHelpAction openHelpAction = new OpenHelpAction(iControl);
tbm.add(openDeclarationAction);
tbm.add(openHelpAction);
IInputChangedListener inputChangeListener = new IInputChangedListener()
{
public void inputChanged(Object newInput)
{
if (newInput instanceof BrowserInformationControlInput)
{
openDeclarationAction.update();
openHelpAction.update();
}
}
};
iControl.addInputChangeListener(inputChangeListener);
}
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:21,代码来源:JSTextHover.java
示例3: update
import org.eclipse.jface.internal.text.html.BrowserInformationControlInput; //导入依赖的package包/类
/**
* Update the action
*/
void update()
{
BrowserInformationControlInput input = iControl.getInput();
if (input instanceof DocumentationBrowserInformationControlInput)
{
JSHyperlinkDetector detector = new JSHyperlinkDetector();
IRegion hoverRegion = ((DocumentationBrowserInformationControlInput) input).getHoverRegion();
if (hoverRegion != null)
{
hyperlinks = detector.detectHyperlinks((AbstractThemeableEditor) getEditor(), hoverRegion, false);
setEnabled(!ArrayUtil.isEmpty(hyperlinks) && hyperlinks[0] != null);
return;
}
}
setEnabled(false);
}
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:21,代码来源:JSTextHover.java
示例4: run
import org.eclipse.jface.internal.text.html.BrowserInformationControlInput; //导入依赖的package包/类
@Override
public void run() {
BrowserInformationControlInput previous = (BrowserInformationControlInput) fInfoControl.getInput()
.getPrevious();
if (previous != null) {
fInfoControl.setInput(previous);
}
}
开发者ID:cplutte,项目名称:bts,代码行数:9,代码来源:DefaultEObjectHoverProvider.java
示例5: update
import org.eclipse.jface.internal.text.html.BrowserInformationControlInput; //导入依赖的package包/类
public void update() {
BrowserInformationControlInput current = fInfoControl.getInput();
if (current != null && current.getPrevious() != null) {
BrowserInput previous = current.getPrevious();
setToolTipText(MessageFormat.format(XtextUIMessages.XtextBrowserInformationControlInput_BackTo,
new Object[] { previous.getInputName() }));
setEnabled(true);
} else {
setToolTipText(XtextUIMessages.XtextBrowserInformationControlInput_Back);
setEnabled(false);
}
}
开发者ID:cplutte,项目名称:bts,代码行数:14,代码来源:DefaultEObjectHoverProvider.java
示例6: update
import org.eclipse.jface.internal.text.html.BrowserInformationControlInput; //导入依赖的package包/类
/**
* Update the action
*/
void update()
{
node = null;
BrowserInformationControlInput input = iControl.getInput();
if (input instanceof DocumentationBrowserInformationControlInput)
{
Object inputElement = input.getInputElement();
if (inputElement instanceof BaseElement)
{
node = (BaseElement) inputElement;
}
}
setEnabled(node != null);
}
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:18,代码来源:HTMLTextHover.java
示例7: run
import org.eclipse.jface.internal.text.html.BrowserInformationControlInput; //导入依赖的package包/类
@Override
public void run() {
BrowserInformationControlInput previous= (BrowserInformationControlInput) fInfoControl.getInput().getPrevious();
if (previous != null) {
fInfoControl.setInput(previous);
}
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:8,代码来源:JavadocHover.java
示例8: update
import org.eclipse.jface.internal.text.html.BrowserInformationControlInput; //导入依赖的package包/类
public void update() {
BrowserInformationControlInput current= fInfoControl.getInput();
if (current != null && current.getPrevious() != null) {
BrowserInput previous= current.getPrevious();
setToolTipText(Messages.format(JavaHoverMessages.JavadocHover_back_toElement_toolTip, BasicElementLabels.getJavaElementName(previous.getInputName())));
setEnabled(true);
} else {
setToolTipText(JavaHoverMessages.JavadocHover_back);
setEnabled(false);
}
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:13,代码来源:JavadocHover.java
示例9: getInput
import org.eclipse.jface.internal.text.html.BrowserInformationControlInput; //导入依赖的package包/类
/**
* @noreference This method is not intended to be referenced by clients.
*/
public BrowserInformationControlInput getInput() {
return control.getInput();
}
开发者ID:cplutte,项目名称:bts,代码行数:7,代码来源:XtextBrowserInformationControlAdapter.java
示例10: setInput
import org.eclipse.jface.internal.text.html.BrowserInformationControlInput; //导入依赖的package包/类
/**
* {@inheritDoc} This control can handle {@link String} and {@link BrowserInformationControlInput}.
*/
public void setInput(Object input)
{
Assert.isLegal(input == null || input instanceof String || input instanceof BrowserInformationControlInput);
if (input instanceof String)
{
setInformation((String) input);
return;
}
fInput = (BrowserInformationControlInput) input;
String content = null;
if (fInput != null)
content = fInput.getHtml();
fBrowserHasContent = content != null && content.length() > 0;
if (!fBrowserHasContent)
content = "<html><body ></html>"; //$NON-NLS-1$
boolean RTL = (getShell().getStyle() & SWT.RIGHT_TO_LEFT) != 0;
boolean resizable = isResizable();
// The default "overflow:auto" would not result in a predictable width for the client area
// and the re-wrapping would cause visual noise
String[] styles = null;
if (RTL && resizable)
styles = new String[] { "direction:rtl;", "overflow:scroll;", "word-wrap:break-word;" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
else if (RTL && !resizable)
styles = new String[] { "direction:rtl;", "overflow:hidden;", "word-wrap:break-word;" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
else if (!resizable)
// XXX: In IE, "word-wrap: break-word;" causes bogus wrapping even in non-broken words :-(see e.g. Javadoc
// of String).
// Re-check whether we really still need this now that the Javadoc Hover header already sets this style.
styles = new String[] { "overflow:hidden;"/* , "word-wrap: break-word;" */}; //$NON-NLS-1$
else
styles = new String[] { "overflow:scroll;" }; //$NON-NLS-1$
StringBuffer buffer = new StringBuffer(content);
HTMLPrinter.insertStyles(buffer, styles);
content = buffer.toString();
/*
* XXX: Should add some JavaScript here that shows something like "(continued...)" or "..." at the end of the
* visible area when the page overflowed with "overflow:hidden;".
*/
fCompleted = false;
fBrowser.setText(content);
Object[] listeners = fInputChangeListeners.getListeners();
for (int i = 0; i < listeners.length; i++)
((IInputChangedListener) listeners[i]).inputChanged(fInput);
}
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:59,代码来源:CustomBrowserInformationControl.java
示例11: getInput
import org.eclipse.jface.internal.text.html.BrowserInformationControlInput; //导入依赖的package包/类
/**
* @return the current browser input or <code>null</code>
*/
public BrowserInformationControlInput getInput()
{
return fInput;
}
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:8,代码来源:CustomBrowserInformationControl.java
示例12: doCreateInformationControl
import org.eclipse.jface.internal.text.html.BrowserInformationControlInput; //导入依赖的package包/类
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
if (BrowserInformationControl.isAvailable(parent)) {
ToolBarManager tbm= new ToolBarManager(SWT.FLAT);
String font= PreferenceConstants.APPEARANCE_JAVADOC_FONT;
BrowserInformationControl iControl= new BrowserInformationControl(parent, font, tbm);
final BackAction backAction= new BackAction(iControl);
backAction.setEnabled(false);
tbm.add(backAction);
final ForwardAction forwardAction= new ForwardAction(iControl);
tbm.add(forwardAction);
forwardAction.setEnabled(false);
final ShowInJavadocViewAction showInJavadocViewAction= new ShowInJavadocViewAction(iControl);
tbm.add(showInJavadocViewAction);
final OpenDeclarationAction openDeclarationAction= new OpenDeclarationAction(iControl);
tbm.add(openDeclarationAction);
final SimpleSelectionProvider selectionProvider= new SimpleSelectionProvider();
if (fSite != null) {
OpenAttachedJavadocAction openAttachedJavadocAction= new OpenAttachedJavadocAction(fSite);
openAttachedJavadocAction.setSpecialSelectionProvider(selectionProvider);
openAttachedJavadocAction.setImageDescriptor(JavaPluginImages.DESC_ELCL_OPEN_BROWSER);
openAttachedJavadocAction.setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_OPEN_BROWSER);
selectionProvider.addSelectionChangedListener(openAttachedJavadocAction);
selectionProvider.setSelection(new StructuredSelection());
tbm.add(openAttachedJavadocAction);
}
IInputChangedListener inputChangeListener= new IInputChangedListener() {
public void inputChanged(Object newInput) {
backAction.update();
forwardAction.update();
if (newInput == null) {
selectionProvider.setSelection(new StructuredSelection());
} else if (newInput instanceof BrowserInformationControlInput) {
BrowserInformationControlInput input= (BrowserInformationControlInput) newInput;
Object inputElement= input.getInputElement();
selectionProvider.setSelection(new StructuredSelection(inputElement));
boolean isJavaElementInput= inputElement instanceof IJavaElement;
showInJavadocViewAction.setEnabled(isJavaElementInput);
openDeclarationAction.setEnabled(isJavaElementInput);
}
}
};
iControl.addInputChangeListener(inputChangeListener);
tbm.update(true);
addLinkListener(iControl);
return iControl;
} else {
return new DefaultInformationControl(parent, true);
}
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:58,代码来源:JavadocHover.java
示例13: getInput
import org.eclipse.jface.internal.text.html.BrowserInformationControlInput; //导入依赖的package包/类
/**
* @noreference This method is not intended to be referenced by clients.
*/
public BrowserInformationControlInput getInput();
开发者ID:cplutte,项目名称:bts,代码行数:5,代码来源:IXtextBrowserInformationControl.java
注:本文中的org.eclipse.jface.internal.text.html.BrowserInformationControlInput类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论