Search in sources :

Example 1 with Content

use of org.eclipse.mylyn.docs.epub.ncx.Content in project mylyn.docs by eclipse.

the class TOCGenerator method createNavPoint.

private NavPoint createNavPoint(String title) {
    NavPoint np = NCXFactory.eINSTANCE.createNavPoint();
    NavLabel nl = NCXFactory.eINSTANCE.createNavLabel();
    Content c = NCXFactory.eINSTANCE.createContent();
    // $NON-NLS-1$
    c.setSrc(currentId == null ? currentHref : currentHref + "#" + currentId);
    Text text = NCXFactory.eINSTANCE.createText();
    FeatureMapUtil.addText(text.getMixed(), title);
    nl.setText(text);
    np.getNavLabels().add(nl);
    np.setPlayOrder(++playOrder);
    // $NON-NLS-1$
    np.setId("navpoint" + playOrder);
    np.setContent(c);
    return np;
}
Also used : NavLabel(org.eclipse.mylyn.docs.epub.ncx.NavLabel) NavPoint(org.eclipse.mylyn.docs.epub.ncx.NavPoint) Content(org.eclipse.mylyn.docs.epub.ncx.Content) Text(org.eclipse.mylyn.docs.epub.ncx.Text)

Example 2 with Content

use of org.eclipse.mylyn.docs.epub.ncx.Content in project mylyn.docs by eclipse.

the class NavPointImpl method basicSetContent.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetContent(Content newContent, NotificationChain msgs) {
    Content oldContent = content;
    content = newContent;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NCXPackage.NAV_POINT__CONTENT, oldContent, newContent);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : Content(org.eclipse.mylyn.docs.epub.ncx.Content) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 3 with Content

use of org.eclipse.mylyn.docs.epub.ncx.Content in project mylyn.docs by eclipse.

the class NavTargetImpl method basicSetContent.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetContent(Content newContent, NotificationChain msgs) {
    Content oldContent = content;
    content = newContent;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NCXPackage.NAV_TARGET__CONTENT, oldContent, newContent);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : Content(org.eclipse.mylyn.docs.epub.ncx.Content) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 4 with Content

use of org.eclipse.mylyn.docs.epub.ncx.Content in project mylyn.docs by eclipse.

the class PageTargetImpl method basicSetContent.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetContent(Content newContent, NotificationChain msgs) {
    Content oldContent = content;
    content = newContent;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NCXPackage.PAGE_TARGET__CONTENT, oldContent, newContent);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : Content(org.eclipse.mylyn.docs.epub.ncx.Content) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Aggregations

Content (org.eclipse.mylyn.docs.epub.ncx.Content)4 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)3 NavLabel (org.eclipse.mylyn.docs.epub.ncx.NavLabel)1 NavPoint (org.eclipse.mylyn.docs.epub.ncx.NavPoint)1 Text (org.eclipse.mylyn.docs.epub.ncx.Text)1