本文整理汇总了Java中org.eclipse.jface.text.IInputChangedListener类的典型用法代码示例。如果您正苦于以下问题:Java IInputChangedListener类的具体用法?Java IInputChangedListener怎么用?Java IInputChangedListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IInputChangedListener类属于org.eclipse.jface.text包,在下文中一共展示了IInputChangedListener类的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: populateToolbarActions
点赞 3
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的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
示例2: doCreateInformationControl
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
public IInformationControl doCreateInformationControl(Shell parent) {
if (de.darwinspl.preferences.resource.dwprofile.ui.DwprofileBrowserInformationControl.isAvailable(parent)) {
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
de.darwinspl.preferences.resource.dwprofile.ui.DwprofileBrowserInformationControl iControl = new de.darwinspl.preferences.resource.dwprofile.ui.DwprofileBrowserInformationControl(parent, FONT, tbm);
final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
tbm.add(openDeclarationAction);
final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
IInputChangedListener inputChangeListener = new IInputChangedListener() {
public void inputChanged(Object newInput) {
if (newInput == null) {
selectionProvider.setSelection(new StructuredSelection());
} else if (newInput instanceof de.darwinspl.preferences.resource.dwprofile.ui.DwprofileDocBrowserInformationControlInput) {
de.darwinspl.preferences.resource.dwprofile.ui.DwprofileDocBrowserInformationControlInput input = (de.darwinspl.preferences.resource.dwprofile.ui.DwprofileDocBrowserInformationControlInput) newInput;
Object inputElement = input.getInputElement();
selectionProvider.setSelection(new StructuredSelection(inputElement));
// If there is an element of type EObject in the input element, the button to open
// the declaration will be set enable
boolean isEObjectInput = inputElement instanceof EObject;
openDeclarationAction.setEnabled(isEObjectInput);
if (isEObjectInput) {
String simpleName = inputElement.getClass().getSimpleName();
simpleName = simpleName.substring(0, simpleName.length() - 4);
openDeclarationAction.setText("Open " + simpleName);
} else openDeclarationAction.setText("Open Declaration");
}
}
};
iControl.addInputChangeListener(inputChangeListener);
tbm.update(true);
return iControl;
} else {
return new DefaultInformationControl(parent, true);
}
}
开发者ID:DarwinSPL,
项目名称:DarwinSPL,
代码行数:37,
代码来源:DwprofileTextHover.java
示例3: doCreateInformationControl
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
public IInformationControl doCreateInformationControl(Shell parent) {
if (eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionBrowserInformationControl.isAvailable(parent)) {
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionBrowserInformationControl iControl = new eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionBrowserInformationControl(parent, FONT, tbm);
final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
tbm.add(openDeclarationAction);
final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
IInputChangedListener inputChangeListener = new IInputChangedListener() {
public void inputChanged(Object newInput) {
if (newInput == null) {
selectionProvider.setSelection(new StructuredSelection());
} else if (newInput instanceof eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionDocBrowserInformationControlInput) {
eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionDocBrowserInformationControlInput input = (eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionDocBrowserInformationControlInput) newInput;
Object inputElement = input.getInputElement();
selectionProvider.setSelection(new StructuredSelection(inputElement));
// If there is an element of type EObject in the input element, the button to open
// the declaration will be set enable
boolean isEObjectInput = inputElement instanceof EObject;
openDeclarationAction.setEnabled(isEObjectInput);
if (isEObjectInput) {
String simpleName = inputElement.getClass().getSimpleName();
simpleName = simpleName.substring(0, simpleName.length() - 4);
openDeclarationAction.setText("Open " + simpleName);
} else openDeclarationAction.setText("Open Declaration");
}
}
};
iControl.addInputChangeListener(inputChangeListener);
tbm.update(true);
return iControl;
} else {
return new DefaultInformationControl(parent, true);
}
}
开发者ID:DarwinSPL,
项目名称:DarwinSPL,
代码行数:37,
代码来源:HyexpressionTextHover.java
示例4: doCreateInformationControl
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
public IInformationControl doCreateInformationControl(Shell parent) {
if (eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaBrowserInformationControl.isAvailable(parent)) {
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaBrowserInformationControl iControl = new eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaBrowserInformationControl(parent, FONT, tbm);
final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
tbm.add(openDeclarationAction);
final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
IInputChangedListener inputChangeListener = new IInputChangedListener() {
public void inputChanged(Object newInput) {
if (newInput == null) {
selectionProvider.setSelection(new StructuredSelection());
} else if (newInput instanceof eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaDocBrowserInformationControlInput) {
eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaDocBrowserInformationControlInput input = (eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaDocBrowserInformationControlInput) newInput;
Object inputElement = input.getInputElement();
selectionProvider.setSelection(new StructuredSelection(inputElement));
// If there is an element of type EObject in the input element, the button to open
// the declaration will be set enable
boolean isEObjectInput = inputElement instanceof EObject;
openDeclarationAction.setEnabled(isEObjectInput);
if (isEObjectInput) {
String simpleName = inputElement.getClass().getSimpleName();
simpleName = simpleName.substring(0, simpleName.length() - 4);
openDeclarationAction.setText("Open " + simpleName);
} else openDeclarationAction.setText("Open Declaration");
}
}
};
iControl.addInputChangeListener(inputChangeListener);
tbm.update(true);
return iControl;
} else {
return new DefaultInformationControl(parent, true);
}
}
开发者ID:DarwinSPL,
项目名称:DarwinSPL,
代码行数:37,
代码来源:HyvalidityformulaTextHover.java
示例5: doCreateInformationControl
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
public IInformationControl doCreateInformationControl(Shell parent) {
if (eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueBrowserInformationControl.isAvailable(parent)) {
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueBrowserInformationControl iControl = new eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueBrowserInformationControl(parent, FONT, tbm);
final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
tbm.add(openDeclarationAction);
final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
IInputChangedListener inputChangeListener = new IInputChangedListener() {
public void inputChanged(Object newInput) {
if (newInput == null) {
selectionProvider.setSelection(new StructuredSelection());
} else if (newInput instanceof eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueDocBrowserInformationControlInput) {
eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueDocBrowserInformationControlInput input = (eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueDocBrowserInformationControlInput) newInput;
Object inputElement = input.getInputElement();
selectionProvider.setSelection(new StructuredSelection(inputElement));
// If there is an element of type EObject in the input element, the button to open
// the declaration will be set enable
boolean isEObjectInput = inputElement instanceof EObject;
openDeclarationAction.setEnabled(isEObjectInput);
if (isEObjectInput) {
String simpleName = inputElement.getClass().getSimpleName();
simpleName = simpleName.substring(0, simpleName.length() - 4);
openDeclarationAction.setText("Open " + simpleName);
} else openDeclarationAction.setText("Open Declaration");
}
}
};
iControl.addInputChangeListener(inputChangeListener);
tbm.update(true);
return iControl;
} else {
return new DefaultInformationControl(parent, true);
}
}
开发者ID:DarwinSPL,
项目名称:DarwinSPL,
代码行数:37,
代码来源:HydatavalueTextHover.java
示例6: doCreateInformationControl
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
public IInformationControl doCreateInformationControl(Shell parent) {
if (eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingBrowserInformationControl.isAvailable(parent)) {
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingBrowserInformationControl iControl = new eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingBrowserInformationControl(parent, FONT, tbm);
final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
tbm.add(openDeclarationAction);
final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
IInputChangedListener inputChangeListener = new IInputChangedListener() {
public void inputChanged(Object newInput) {
if (newInput == null) {
selectionProvider.setSelection(new StructuredSelection());
} else if (newInput instanceof eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingDocBrowserInformationControlInput) {
eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingDocBrowserInformationControlInput input = (eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingDocBrowserInformationControlInput) newInput;
Object inputElement = input.getInputElement();
selectionProvider.setSelection(new StructuredSelection(inputElement));
// If there is an element of type EObject in the input element, the button to open
// the declaration will be set enable
boolean isEObjectInput = inputElement instanceof EObject;
openDeclarationAction.setEnabled(isEObjectInput);
if (isEObjectInput) {
String simpleName = inputElement.getClass().getSimpleName();
simpleName = simpleName.substring(0, simpleName.length() - 4);
openDeclarationAction.setText("Open " + simpleName);
} else openDeclarationAction.setText("Open Declaration");
}
}
};
iControl.addInputChangeListener(inputChangeListener);
tbm.update(true);
return iControl;
} else {
return new DefaultInformationControl(parent, true);
}
}
开发者ID:DarwinSPL,
项目名称:DarwinSPL,
代码行数:37,
代码来源:HymappingTextHover.java
示例7: doCreateInformationControl
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
public IInformationControl doCreateInformationControl(Shell parent) {
if (eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsBrowserInformationControl.isAvailable(parent)) {
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsBrowserInformationControl iControl = new eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsBrowserInformationControl(parent, FONT, tbm);
final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
tbm.add(openDeclarationAction);
final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
IInputChangedListener inputChangeListener = new IInputChangedListener() {
public void inputChanged(Object newInput) {
if (newInput == null) {
selectionProvider.setSelection(new StructuredSelection());
} else if (newInput instanceof eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsDocBrowserInformationControlInput) {
eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsDocBrowserInformationControlInput input = (eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsDocBrowserInformationControlInput) newInput;
Object inputElement = input.getInputElement();
selectionProvider.setSelection(new StructuredSelection(inputElement));
// If there is an element of type EObject in the input element, the button to open
// the declaration will be set enable
boolean isEObjectInput = inputElement instanceof EObject;
openDeclarationAction.setEnabled(isEObjectInput);
if (isEObjectInput) {
String simpleName = inputElement.getClass().getSimpleName();
simpleName = simpleName.substring(0, simpleName.length() - 4);
openDeclarationAction.setText("Open " + simpleName);
} else openDeclarationAction.setText("Open Declaration");
}
}
};
iControl.addInputChangeListener(inputChangeListener);
tbm.update(true);
return iControl;
} else {
return new DefaultInformationControl(parent, true);
}
}
开发者ID:DarwinSPL,
项目名称:DarwinSPL,
代码行数:37,
代码来源:HyconstraintsTextHover.java
示例8: doCreateInformationControl
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
public IInformationControl doCreateInformationControl(Shell parent) {
if (eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestBrowserInformationControl.isAvailable(parent)) {
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestBrowserInformationControl iControl = new eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestBrowserInformationControl(parent, FONT, tbm);
final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(iControl);
tbm.add(openDeclarationAction);
final SimpleSelectionProvider selectionProvider = new SimpleSelectionProvider();
IInputChangedListener inputChangeListener = new IInputChangedListener() {
public void inputChanged(Object newInput) {
if (newInput == null) {
selectionProvider.setSelection(new StructuredSelection());
} else if (newInput instanceof eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestDocBrowserInformationControlInput) {
eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestDocBrowserInformationControlInput input = (eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestDocBrowserInformationControlInput) newInput;
Object inputElement = input.getInputElement();
selectionProvider.setSelection(new StructuredSelection(inputElement));
// If there is an element of type EObject in the input element, the button to open
// the declaration will be set enable
boolean isEObjectInput = inputElement instanceof EObject;
openDeclarationAction.setEnabled(isEObjectInput);
if (isEObjectInput) {
String simpleName = inputElement.getClass().getSimpleName();
simpleName = simpleName.substring(0, simpleName.length() - 4);
openDeclarationAction.setText("Open " + simpleName);
} else openDeclarationAction.setText("Open Declaration");
}
}
};
iControl.addInputChangeListener(inputChangeListener);
tbm.update(true);
return iControl;
} else {
return new DefaultInformationControl(parent, true);
}
}
开发者ID:DarwinSPL,
项目名称:DarwinSPL,
代码行数:37,
代码来源:HymanifestTextHover.java
示例9: configureControl
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
/**
* @since 2.3
*/
protected void configureControl(final IXtextBrowserInformationControl control, ToolBarManager tbm, String font){
final BackAction backAction = new BackAction(control);
backAction.setEnabled(false);
tbm.add(backAction);
final ForwardAction forwardAction = new ForwardAction(control);
tbm.add(forwardAction);
forwardAction.setEnabled(false);
// final ShowInJavadocViewAction showInJavadocViewAction= new ShowInJavadocViewAction(iControl);
// tbm.add(showInJavadocViewAction);
final OpenDeclarationAction openDeclarationAction = new OpenDeclarationAction(control);
tbm.add(openDeclarationAction);
// final SimpleSelectionProvider selectionProvider= new SimpleSelectionProvider();
IInputChangedListener inputChangeListener = new IInputChangedListener() {
public void inputChanged(Object newInput) {
backAction.update();
forwardAction.update();
if (newInput == null) {
// selectionProvider.setSelection(new StructuredSelection());
} else if (newInput instanceof XtextBrowserInformationControlInput) {
// XtextBrowserInformationControlInput input= (XtextBrowserInformationControlInput) newInput;
// Object inputElement = input.getInputElement();
// selectionProvider.setSelection(new StructuredSelection(inputElement));
// boolean isJavaElementInput= inputElement instanceof IJavaElement;
// showInJavadocViewAction.setEnabled(isJavaElementInput);
openDeclarationAction.setEnabled(true);
}
}
};
control.addInputChangeListener(inputChangeListener);
tbm.update(true);
addLinkListener(control);
}
开发者ID:cplutte,
项目名称:bts,
代码行数:40,
代码来源:DefaultEObjectHoverProvider.java
示例10: setInput
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
/**
* {@inheritDoc} This control can handle {@link String}(no handle) and
*/
public void setInput(Object input) {
Assert.isLegal(input == null || input instanceof String || input instanceof de.darwinspl.preferences.resource.dwprofile.ui.DwprofileDocBrowserInformationControlInput);
if (input instanceof String) {
setInformation((String)input);
return;
}
fInput= (de.darwinspl.preferences.resource.dwprofile.ui.DwprofileDocBrowserInformationControlInput) input;
String content= null;
if (fInput != null) content= fInput.getHtml();
fBrowserHasContent= content != null && content.length() > 0;
if (!fBrowserHasContent) content= "<html><body ></html>";
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;" };
} else if (RTL && !resizable) {
styles= new String[] { "direction:rtl;", "overflow:hidden;", "word-wrap:break-word;" };
} 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;"*/ };
} else {
styles= new String[] { "overflow:scroll;" };
}
StringBuffer buffer= new StringBuffer(content);
de.darwinspl.preferences.resource.dwprofile.ui.DwprofileHTMLPrinter.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:DarwinSPL,
项目名称:DarwinSPL,
代码行数:56,
代码来源:DwprofileBrowserInformationControl.java
示例11: setInput
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
/**
* {@inheritDoc} This control can handle {@link String}(no handle) and
*/
public void setInput(Object input) {
Assert.isLegal(input == null || input instanceof String || input instanceof eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionDocBrowserInformationControlInput);
if (input instanceof String) {
setInformation((String)input);
return;
}
fInput= (eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionDocBrowserInformationControlInput) input;
String content= null;
if (fInput != null) content= fInput.getHtml();
fBrowserHasContent= content != null && content.length() > 0;
if (!fBrowserHasContent) content= "<html><body ></html>";
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;" };
} else if (RTL && !resizable) {
styles= new String[] { "direction:rtl;", "overflow:hidden;", "word-wrap:break-word;" };
} 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;"*/ };
} else {
styles= new String[] { "overflow:scroll;" };
}
StringBuffer buffer= new StringBuffer(content);
eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionHTMLPrinter.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:DarwinSPL,
项目名称:DarwinSPL,
代码行数:56,
代码来源:HyexpressionBrowserInformationControl.java
示例12: setInput
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
/**
* {@inheritDoc} This control can handle {@link String}(no handle) and
*/
public void setInput(Object input) {
Assert.isLegal(input == null || input instanceof String || input instanceof eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaDocBrowserInformationControlInput);
if (input instanceof String) {
setInformation((String)input);
return;
}
fInput= (eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaDocBrowserInformationControlInput) input;
String content= null;
if (fInput != null) content= fInput.getHtml();
fBrowserHasContent= content != null && content.length() > 0;
if (!fBrowserHasContent) content= "<html><body ></html>";
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;" };
} else if (RTL && !resizable) {
styles= new String[] { "direction:rtl;", "overflow:hidden;", "word-wrap:break-word;" };
} 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;"*/ };
} else {
styles= new String[] { "overflow:scroll;" };
}
StringBuffer buffer= new StringBuffer(content);
eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaHTMLPrinter.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:DarwinSPL,
项目名称:DarwinSPL,
代码行数:56,
代码来源:HyvalidityformulaBrowserInformationControl.java
示例13: setInput
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
/**
* {@inheritDoc} This control can handle {@link String}(no handle) and
*/
public void setInput(Object input) {
Assert.isLegal(input == null || input instanceof String || input instanceof eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueDocBrowserInformationControlInput);
if (input instanceof String) {
setInformation((String)input);
return;
}
fInput= (eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueDocBrowserInformationControlInput) input;
String content= null;
if (fInput != null) content= fInput.getHtml();
fBrowserHasContent= content != null && content.length() > 0;
if (!fBrowserHasContent) content= "<html><body ></html>";
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;" };
} else if (RTL && !resizable) {
styles= new String[] { "direction:rtl;", "overflow:hidden;", "word-wrap:break-word;" };
} 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;"*/ };
} else {
styles= new String[] { "overflow:scroll;" };
}
StringBuffer buffer= new StringBuffer(content);
eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueHTMLPrinter.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:DarwinSPL,
项目名称:DarwinSPL,
代码行数:56,
代码来源:HydatavalueBrowserInformationControl.java
示例14: setInput
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
/**
* {@inheritDoc} This control can handle {@link String}(no handle) and
*/
public void setInput(Object input) {
Assert.isLegal(input == null || input instanceof String || input instanceof eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingDocBrowserInformationControlInput);
if (input instanceof String) {
setInformation((String)input);
return;
}
fInput= (eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingDocBrowserInformationControlInput) input;
String content= null;
if (fInput != null) content= fInput.getHtml();
fBrowserHasContent= content != null && content.length() > 0;
if (!fBrowserHasContent) content= "<html><body ></html>";
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;" };
} else if (RTL && !resizable) {
styles= new String[] { "direction:rtl;", "overflow:hidden;", "word-wrap:break-word;" };
} 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;"*/ };
} else {
styles= new String[] { "overflow:scroll;" };
}
StringBuffer buffer= new StringBuffer(content);
eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingHTMLPrinter.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:DarwinSPL,
项目名称:DarwinSPL,
代码行数:56,
代码来源:HymappingBrowserInformationControl.java
示例15: setInput
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
/**
* {@inheritDoc} This control can handle {@link String}(no handle) and
*/
public void setInput(Object input) {
Assert.isLegal(input == null || input instanceof String || input instanceof eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsDocBrowserInformationControlInput);
if (input instanceof String) {
setInformation((String)input);
return;
}
fInput= (eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsDocBrowserInformationControlInput) input;
String content= null;
if (fInput != null) content= fInput.getHtml();
fBrowserHasContent= content != null && content.length() > 0;
if (!fBrowserHasContent) content= "<html><body ></html>";
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;" };
} else if (RTL && !resizable) {
styles= new String[] { "direction:rtl;", "overflow:hidden;", "word-wrap:break-word;" };
} 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;"*/ };
} else {
styles= new String[] { "overflow:scroll;" };
}
StringBuffer buffer= new StringBuffer(content);
eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsHTMLPrinter.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:DarwinSPL,
项目名称:DarwinSPL,
代码行数:56,
代码来源:HyconstraintsBrowserInformationControl.java
示例16: setInput
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
/**
* {@inheritDoc} This control can handle {@link String}(no handle) and
*/
public void setInput(Object input) {
Assert.isLegal(input == null || input instanceof String || input instanceof eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestDocBrowserInformationControlInput);
if (input instanceof String) {
setInformation((String)input);
return;
}
fInput= (eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestDocBrowserInformationControlInput) input;
String content= null;
if (fInput != null) content= fInput.getHtml();
fBrowserHasContent= content != null && content.length() > 0;
if (!fBrowserHasContent) content= "<html><body ></html>";
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;" };
} else if (RTL && !resizable) {
styles= new String[] { "direction:rtl;", "overflow:hidden;", "word-wrap:break-word;" };
} 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;"*/ };
} else {
styles= new String[] { "overflow:scroll;" };
}
StringBuffer buffer= new StringBuffer(content);
eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestHTMLPrinter.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:DarwinSPL,
项目名称:DarwinSPL,
代码行数:56,
代码来源:HymanifestBrowserInformationControl.java
示例17: addInputChangeListener
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
public void addInputChangeListener(IInputChangedListener inputChangeListener) {
control.addInputChangeListener(inputChangeListener);
}
开发者ID:cplutte,
项目名称:bts,
代码行数:4,
代码来源:XtextBrowserInformationControlAdapter.java
示例18: setInput
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的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
示例19: setDelayedInputChangeListener
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
public void setDelayedInputChangeListener(IInputChangedListener inputChangeListener)
{
fDelayedInputChangeListener = inputChangeListener;
}
开发者ID:apicloudcom,
项目名称:APICloud-Studio,
代码行数:5,
代码来源:CustomBrowserInformationControl.java
示例20: doCreateInformationControl
点赞 2
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的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
示例21: addInputChangeListener
点赞 1
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
/**
* <p>
* Adds a listener for input changes to this input change provider. Has no effect
* if an identical listener is already registered.
* </p>
*
* @param inputChangeListener the listener to add
*
* @since 3.4
*/
public void addInputChangeListener(IInputChangedListener inputChangeListener) {
Assert.isNotNull(inputChangeListener);
fInputChangeListeners.add(inputChangeListener);
}
开发者ID:DarwinSPL,
项目名称:DarwinSPL,
代码行数:15,
代码来源:DwprofileBrowserInformationControl.java
示例22: removeInputChangeListener
点赞 1
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
/**
* <p>
* Removes the given input change listener from this input change provider. Has no
* effect if an identical listener is not registered.
* </p>
*
* @param inputChangeListener the listener to remove
*
* @since 3.4
*/
public void removeInputChangeListener(IInputChangedListener inputChangeListener) {
fInputChangeListeners.remove(inputChangeListener);
}
开发者ID:DarwinSPL,
项目名称:DarwinSPL,
代码行数:14,
代码来源:DwprofileBrowserInformationControl.java
示例23: setDelayedInputChangeListener
点赞 1
import org.eclipse.jface.text.IInputChangedListener; //导入依赖的package包/类
/**
*
* @see
* IDelayedInputChangeProvider#setDelayedInputChangeListener(IInputChangedListener)
*
* @since 3.4
*/
public void setDelayedInputChangeListener(IInputChangedListener inputChangeListener) {
fDelayedInputChangeListener= inputChangeListener;
}
开发者ID:DarwinSPL,
项目名称:DarwinSPL,
代码行数:11,
代码来源:DwprofileBrowserInformationControl.java