org.eclipse.jface.internal.text.html.HTMLPrinter Java Examples
The following examples show how to use
org.eclipse.jface.internal.text.html.HTMLPrinter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractDocumentationHover.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
/** * Set the header string. * * @param header * A string to set (may be <code>null</code>) * @param buffer * @param useHTMLTags */ private void setHeader(String header, StringBuffer buffer, boolean useHTMLTags) { if (StringUtil.isEmpty(header)) { return; } if (useHTMLTags) { buffer.append("<div class=\"header\">"); //$NON-NLS-1$ HTMLPrinter.addSmallHeader(buffer, header); buffer.append("</div>"); //$NON-NLS-1$ } else { // plain printing buffer.append('['); buffer.append(header); buffer.append("]\n"); //$NON-NLS-1$ } }
Example #2
Source File: NLSStringHover.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
private String toHtml(String header, String string, String errorString, boolean addPreFormatted) { StringBuffer buffer= new StringBuffer(); HTMLPrinter.addSmallHeader(buffer, header); if (string != null) { if (addPreFormatted) { HTMLPrinter.addParagraph(buffer, ""); //$NON-NLS-1$ HTMLPrinter.addPreFormatted(buffer, HTMLPrinter.convertToHTMLContent(string)); } else { HTMLPrinter.addParagraph(buffer, string); } if (errorString != null) { HTMLPrinter.addParagraph(buffer, errorString); } } else { HTMLPrinter.addParagraph(buffer, JavaHoverMessages.NLSStringHover_NLSStringHover_missingKeyWarning); } HTMLPrinter.insertPageProlog(buffer, 0); HTMLPrinter.addPageEpilog(buffer); return buffer.toString(); }
Example #3
Source File: JavadocHover.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
private static String getInfoText(IJavaElement element, ITypeRoot editorInputElement, IRegion hoverRegion, boolean allowImage) { long flags= getHeaderFlags(element); StringBuffer label= new StringBuffer(JavaElementLinks.getElementLabel(element, flags)); if (element.getElementType() == IJavaElement.FIELD) { String constantValue= getConstantValue((IField) element, editorInputElement, hoverRegion); if (constantValue != null) { constantValue= HTMLPrinter.convertToHTMLContentWithWhitespace(constantValue); IJavaProject javaProject= element.getJavaProject(); label.append(getFormattedAssignmentOperator(javaProject)); label.append(constantValue); } } // if (element.getElementType() == IJavaElement.METHOD) { // IMethod method= (IMethod)element; // //TODO: add default value for annotation type members, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=249016 // } return getImageAndLabel(element, allowImage, label.toString()); }
Example #4
Source File: CommonAnnotationHover.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
/** * Hook method to formats the given messages. * <p> * Subclasses can change this to create a different format like HTML. * </p> * * @param messages * the messages to format (element type: {@link String}) * @return the formatted message */ @SuppressWarnings("rawtypes") protected String formatMultipleMessages(List messages) { StringBuffer buffer = new StringBuffer(); HTMLPrinter.addPageProlog(buffer); HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(Messages.CommonAnnotationHover_multipleMarkersMessage)); HTMLPrinter.startBulletList(buffer); Iterator e = messages.iterator(); while (e.hasNext()) { HTMLPrinter.addBullet(buffer, HTMLPrinter.convertToHTMLContent((String) e.next())); } HTMLPrinter.endBulletList(buffer); HTMLPrinter.addPageEpilog(buffer); return buffer.toString(); }
Example #5
Source File: JavaDoc2HTMLTextReader.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
private void printDefinitions(StringBuffer buffer, List<String> list, boolean firstword) { Iterator<String> e= list.iterator(); while (e.hasNext()) { String s= e.next(); buffer.append("<dd>"); //$NON-NLS-1$ if (!firstword) buffer.append(s); else { buffer.append("<b>"); //$NON-NLS-1$ int i= getParamEndOffset(s); if (i <= s.length()) { buffer.append(HTMLPrinter.convertToHTMLContent(s.substring(0, i))); buffer.append("</b>"); //$NON-NLS-1$ buffer.append(s.substring(i)); } else { buffer.append("</b>"); //$NON-NLS-1$ } } buffer.append("</dd>"); //$NON-NLS-1$ } }
Example #6
Source File: DefaultEObjectHoverProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 6 votes |
protected XtextBrowserInformationControlInput getHoverInfo(EObject element, IRegion hoverRegion, XtextBrowserInformationControlInput previous) { String html = getHoverInfoAsHtml(element); if (html != null) { StringBuffer buffer = new StringBuffer(html); ColorRegistry registry = JFaceResources.getColorRegistry(); RGB fgRGB = registry.getRGB("org.eclipse.ui.workbench.HOVER_FOREGROUND"); //$NON-NLS-1$ RGB bgRGB = registry.getRGB("org.eclipse.ui.workbench.HOVER_BACKGROUND"); //$NON-NLS-1$ if (fgRGB != null && bgRGB != null) { HTMLPrinter.insertPageProlog(buffer, 0, fgRGB, bgRGB, getStyleSheet()); } else { HTMLPrinter.insertPageProlog(buffer, 0, getStyleSheet()); } HTMLPrinter.addPageEpilog(buffer); html = buffer.toString(); return new XtextBrowserInformationControlInput(previous, element, html, labelProvider); } return null; }
Example #7
Source File: XbaseHoverProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override protected XtextBrowserInformationControlInput getHoverInfo(EObject element, IRegion hoverRegion, XtextBrowserInformationControlInput previous) { //TODO remove this check when the typesystem works without a java project if (isValidationDisabled(element)) return null; EObject objectToView = getObjectToView(element); if(objectToView == null || objectToView.eIsProxy()) return null; String html = getHoverInfoAsHtml(element, objectToView, hoverRegion); if (html != null) { StringBuffer buffer = new StringBuffer(html); ColorRegistry registry = JFaceResources.getColorRegistry(); RGB fgRGB = registry.getRGB("org.eclipse.ui.workbench.HOVER_FOREGROUND"); //$NON-NLS-1$ RGB bgRGB = registry.getRGB("org.eclipse.ui.workbench.HOVER_BACKGROUND"); //$NON-NLS-1$ if (fgRGB != null && bgRGB != null) { HTMLPrinter.insertPageProlog(buffer, 0, fgRGB, bgRGB, getStyleSheet()); } else { HTMLPrinter.insertPageProlog(buffer, 0, getStyleSheet()); } HTMLPrinter.addPageEpilog(buffer); html = buffer.toString(); IJavaElement javaElement = null; if (objectToView != element && objectToView instanceof JvmIdentifiableElement) { javaElement = javaElementFinder.findElementFor((JvmIdentifiableElement) objectToView); } return new XbaseInformationControlInput(previous, objectToView, javaElement, html, labelProvider); } return null; }
Example #8
Source File: XbaseHoverProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
/** * @since 2.3 */ protected String computeSignature(EObject astElement, EObject referencedElement) { String imageTag = hoverSignatureProvider.getImageTag(referencedElement); String signature = hoverSignatureProvider.getSignature(astElement); if(signature != null) { if (imageTag != null) { return "<div style='position: absolute; left: 0; top: 0;'>" + imageTag + "</div>" + LEADING_PADDING +"<b>"+ HTMLPrinter.convertToHTMLContent(signature) + "</b>" + TRAILING_PADDING; } else { return "<b>"+ HTMLPrinter.convertToHTMLContent(signature) + "</b>" + TRAILING_PADDING; } } return ""; }
Example #9
Source File: HTMLTypeScriptPrinter.java From typescript.java with MIT License | 5 votes |
public static void endPage(StringBuffer buffer, ITextViewer textViewer) { ITheme theme = null; if (textViewer != null) { TMPresentationReconciler reconciler = getTMPresentationReconciler(textViewer); if (reconciler != null) { theme = (ITheme) reconciler.getTokenProvider(); } if (theme == null) { theme = TMUIPlugin.getThemeManager().getDefaultTheme(); } } HTMLPrinter.insertPageProlog(buffer, 0, colorInfoForeground, colorInfoBackround, HTMLTypeScriptPrinter.getStyleSheet() + (theme != null ? theme.toCSSStyleSheet() : "")); HTMLPrinter.addPageEpilog(buffer); }
Example #10
Source File: HTMLTypeScriptPrinter.java From typescript.java with MIT License | 5 votes |
/** * Returns the Javadoc hover style sheet with the current Javadoc font from * the preferences. * * @return the updated style sheet * @since 3.4 */ private static String getStyleSheet() { if (fgStyleSheet == null) { fgStyleSheet = loadStyleSheet("/css/TypeScriptHoverStyleSheet.css"); //$NON-NLS-1$ } String css = fgStyleSheet; if (css != null) { FontData fontData = JFaceResources.getFontRegistry().getFontData(JFaceResources.DIALOG_FONT)[0]; css = HTMLPrinter.convertTopLevelFont(css, fontData); } return css; }
Example #11
Source File: JavaDoc2HTMLTextReader.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private String printLiteral(String tagContent) { int contentStart= 0; for (int i= 0; i < tagContent.length(); i++) { if (! Character.isWhitespace(tagContent.charAt(i))) { contentStart= i; break; } } return HTMLPrinter.convertToHTMLContent(tagContent.substring(contentStart)); }
Example #12
Source File: AbstractDocumentationHover.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
/** * Returns the PHP hover style sheet */ private String getStyleSheet() { if (styleSheet == null) { styleSheet = loadStyleSheet(getCSSPath()); } if (styleSheet != null) { FontData fontData = JFaceResources.getFontRegistry().getFontData("Dialog")[0]; //$NON-NLS-1$ return HTMLPrinter.convertTopLevelFont(styleSheet, fontData); } return null; }
Example #13
Source File: CustomCSSHelpHoverProvider.java From solidity-ide with Eclipse Public License 1.0 | 5 votes |
protected String getStyleSheet() { if (fgStyleSheet == null) fgStyleSheet = loadStyleSheet(); String css = fgStyleSheet; if (css != null) { FontData fontData = JFaceResources.getFontRegistry().getFontData( fontSymbolicName)[0]; css = HTMLPrinter.convertTopLevelFont(css, fontData); } return css; }
Example #14
Source File: CommonAnnotationHover.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
/** * Hook method to format the given single message. * <p> * Subclasses can change this to create a different format like HTML. * </p> * * @param message * the message to format * @return the formatted message */ protected String formatSingleMessage(String message) { StringBuffer buffer = new StringBuffer(); HTMLPrinter.addPageProlog(buffer); HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(message)); HTMLPrinter.addPageEpilog(buffer); return buffer.toString(); }
Example #15
Source File: DefaultEObjectHoverProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected String getStyleSheet() { if (fgStyleSheet == null) fgStyleSheet = loadStyleSheet(); String css = fgStyleSheet; if (css != null) { FontData fontData = JFaceResources.getFontRegistry().getFontData(fontSymbolicName)[0]; css = HTMLPrinter.convertTopLevelFont(css, fontData); } return css; }
Example #16
Source File: HTMLAnnotationHover.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override protected String formatSingleMessage(String message) { StringBuffer buffer= new StringBuffer(); HTMLPrinter.addPageProlog(buffer); HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(message)); HTMLPrinter.addPageEpilog(buffer); return buffer.toString(); }
Example #17
Source File: HTMLAnnotationHover.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override protected String formatMultipleMessages(List messages) { StringBuffer buffer= new StringBuffer(); HTMLPrinter.addPageProlog(buffer); HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(JavaUIMessages.JavaAnnotationHover_multipleMarkersAtThisLine)); HTMLPrinter.startBulletList(buffer); Iterator<?> e= messages.iterator(); while (e.hasNext()) HTMLPrinter.addBullet(buffer, HTMLPrinter.convertToHTMLContent((String) e.next())); HTMLPrinter.endBulletList(buffer); HTMLPrinter.addPageEpilog(buffer); return buffer.toString(); }
Example #18
Source File: AbstractJavaCompletionProposal.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
public Object getAdditionalProposalInfo(IProgressMonitor monitor) { if (getProposalInfo() != null) { String info= getProposalInfo().getInfo(monitor); if (info != null && info.length() > 0) { StringBuffer buffer= new StringBuffer(); HTMLPrinter.insertPageProlog(buffer, 0, getCSSStyles()); buffer.append(info); IJavaElement element= null; try { element= getProposalInfo().getJavaElement(); if (element instanceof IMember) { String base= JavaDocLocations.getBaseURL(element, ((IMember) element).isBinary()); if (base != null) { int endHeadIdx= buffer.indexOf("</head>"); //$NON-NLS-1$ buffer.insert(endHeadIdx, "\n<base href='" + base + "'>\n"); //$NON-NLS-1$ //$NON-NLS-2$ } } } catch (JavaModelException e) { JavaPlugin.log(e); } HTMLPrinter.addPageEpilog(buffer); info= buffer.toString(); return new JavadocBrowserInformationControlInput(null, element, info, 0); } } return null; }
Example #19
Source File: DefaultEObjectHoverProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected String getLabel (EObject o) { String text = getLabelProvider().getText(o); if(!isEmpty(text)) return HTMLPrinter.convertToHTMLContent(text); else return null; }
Example #20
Source File: JavadocHover.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
/** * Returns the Javadoc hover style sheet with the current Javadoc font from the preferences. * @return the updated style sheet * @since 3.4 */ private static String getStyleSheet() { if (fgStyleSheet == null) { fgStyleSheet= loadStyleSheet("/JavadocHoverStyleSheet.css"); //$NON-NLS-1$ } String css= fgStyleSheet; if (css != null) { FontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0]; css= HTMLPrinter.convertTopLevelFont(css, fontData); } return css; }
Example #21
Source File: JavadocContentAccess2.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
private boolean handleConstantValue(IField field, boolean link) throws JavaModelException { String text= null; ISourceRange nameRange= field.getNameRange(); if (SourceRange.isAvailable(nameRange)) { CompilationUnit cuNode= SharedASTProvider.getAST(field.getTypeRoot(), SharedASTProvider.WAIT_ACTIVE_ONLY, null); if (cuNode != null) { ASTNode nameNode= NodeFinder.perform(cuNode, nameRange); if (nameNode instanceof SimpleName) { IBinding binding= ((SimpleName) nameNode).resolveBinding(); if (binding instanceof IVariableBinding) { IVariableBinding variableBinding= (IVariableBinding) binding; Object constantValue= variableBinding.getConstantValue(); if (constantValue != null) { if (constantValue instanceof String) { text= ASTNodes.getEscapedStringLiteral((String) constantValue); } else { text= constantValue.toString(); // Javadoc tool is even worse for chars... } } } } } } if (text == null) { Object constant= field.getConstant(); if (constant != null) { text= constant.toString(); } } if (text != null) { text= HTMLPrinter.convertToHTMLContentWithWhitespace(text); if (link) { String uri; try { uri= JavaElementLinks.createURI(JavaElementLinks.JAVADOC_SCHEME, field); fBuf.append(JavaElementLinks.createLink(uri, text)); } catch (URISyntaxException e) { JavaPlugin.log(e); return false; } } else { handleText(text); } return true; } return false; }
Example #22
Source File: CustomBrowserInformationControl.java From APICloud-Studio with GNU General Public License v3.0 | 4 votes |
/** * {@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); }
Example #23
Source File: AbstractDocumentationHover.java From APICloud-Studio with GNU General Public License v3.0 | 4 votes |
/** * Computes the hover info and returns a {@link DocumentationBrowserInformationControlInput} for it. * * @param element * the resolved element * @param useHTMLTags * @param previousInput * the previous input, or <code>null</code> * @param editorPart * (can be <code>null</code>) * @param hoverRegion * @return the HTML hover info for the given element(s) or <code>null</code> if no information is available */ @SuppressWarnings("unused") protected DocumentationBrowserInformationControlInput getHoverInfo(Object element, boolean useHTMLTags, DocumentationBrowserInformationControlInput previousInput, IEditorPart editorPart, IRegion hoverRegion) { if (element == null) { return null; } StringBuffer buffer = new StringBuffer(); String base = null; int leadingImageWidth = 0; setHeader(getHeader(element, editorPart, hoverRegion), buffer, useHTMLTags); setDocumentation(getDocumentation(element, editorPart, hoverRegion), buffer, useHTMLTags); if (buffer.length() > 0) { if (useHTMLTags) { Color borderColor = getBorderColor(); Color bgColor = getBackgroundColor(); Color fgColor = getForegroundColor(); String borderColorHex = (borderColor != null) ? getHexColor(borderColor.getRGB()) : DEFAULT_BORDER_COLOR; RGB bgRGB = (bgColor != null) ? bgColor.getRGB() : null; RGB fgRGB = (fgColor != null) ? fgColor.getRGB() : null; // We need to set the border color before we call insertPageProlog on the style-sheet String styleSheet = getStyleSheet(); styleSheet = styleSheet.replaceAll(BORDER_COLOR_CSS_TEXT, borderColorHex); HTMLPrinter.insertPageProlog(buffer, 0, fgRGB, bgRGB, styleSheet); if (base != null) { int endHeadIdx = buffer.indexOf("</head>"); //$NON-NLS-1$ buffer.insert(endHeadIdx, "\n<base href='" + base + "'>\n"); //$NON-NLS-1$ //$NON-NLS-2$ } HTMLPrinter.addPageEpilog(buffer); } return new DocumentationBrowserInformationControlInput(previousInput, element, buffer.toString(), leadingImageWidth, hoverRegion); } return null; }
Example #24
Source File: XbaseInformationControl.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
/** * Xbase - modification added detailPane */ @Override public void setInput(Object input) { Assert.isLegal(input == null || input instanceof String || input instanceof XtextBrowserInformationControlInput, String.valueOf(input)); if (input instanceof String) { setInformation((String) input); return; } if (input instanceof XtextBrowserInformationControlInput) fInput = (XtextBrowserInformationControlInput) 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); String unsugaredExpression = ""; if (fInput != null && fInput instanceof XbaseInformationControlInput) { XbaseInformationControlInput castedInput = (XbaseInformationControlInput) fInput; unsugaredExpression = castedInput.getUnsugaredExpression(); if(unsugaredExpression != null && unsugaredExpression.length() > 0){ EObject element = fInput.getElement(); if(element != null && element.eResource() != null && element.eResource().getResourceSet() != null){ // FIXME: No arguments need when https://bugs.eclipse.org/bugs/show_bug.cgi?id=368827 is solved // THEN move to createContent as it was before if(embeddedEditorAccess == null) embeddedEditorAccess = embeddedEditor.createPartialEditor("", "INITIAL CONTENT", "", false); resourceProvider.setContext(((XtextResourceSet) element.eResource().getResourceSet()).getClasspathURIContext()); } else return; embeddedEditorAccess.updateModel(castedInput.getPrefix() , unsugaredExpression ,castedInput.getSuffix()); } } if (unsugaredExpression != null && unsugaredExpression.length() > 0) fSashForm.setWeights(new int[] { 7, 3 }); else fSashForm.setWeights(new int[] { 10, 0 }); Object[] listeners = fInputChangeListeners.getListeners(); for (int i = 0; i < listeners.length; i++) ((IInputChangedListener) listeners[i]).inputChanged(fInput); }