Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2004, 2006 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors: IBM Corporation - initial API and implementation /
package org.eclipse.ui.internal.intro.impl.model;
An intro config component that can have a single Text element as a child. In case there is more than one text child, the text is retrieved from the first text child element.
public abstract class AbstractTextElement extends AbstractIntroContainer {
    AbstractTextElement(Element elementBundle bundle) {

Retruns the intro text element embedded in this element.
    public IntroText getIntroText() {
    	AbstractIntroElement[] children = getChildren();
    	for (int i=0;i<children.length;++i) {
    		if (children[iinstanceof IntroText) {
    			return (IntroText)children[i];
    	return null;


Returns the text of the child text of this element.
    public String getText() {
        // intro text may be null if there is no child Text element.
    	IntroText text = getIntroText();
        if (text != null) {
            return text.getText();
        return null;
     * (non-Javadoc)
     * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
    public int getType() {
        return .;
New to GrepCode? Check out our FAQ X