Eclipse Platform
Kepler (4.3)

Package org.eclipse.jface.text.link

Application programming interfaces for interaction with the Eclipse text editor's linked position support.

See: Description

Package org.eclipse.jface.text.link Description

Application programming interfaces for interaction with the Eclipse text editor's linked position support.

Linked Position Infrastructure

package org.eclipse.jface.text.link

The Linked Position Infrastructure lets one set up a mode in an editor in which regions in a document (or several documents) are linked, i.e. editions of one linked position will be reflected in the others.

Classes

Example

        IDocument doc1, doc2;
        ITextViewer viewer1, viewer2;

        /* create groups - this step is independent of the linked mode */
        LinkedPositionGroup group1= new LinkedPositionGroup();
        group1.addPosition(new LinkedPosition(doc1, 3, 4));
        group1.addPosition(new LinkedPosition(doc1, 7, 8));

        LinkedPositionGroup group2= new LinkedPositionGroup();
        group2.addPosition(new LinkedPosition(doc1, 15, 25));
        group2.addPosition(new LinkedPosition(doc2, 0, 10));

        /* set up linked mode */
        LinkedModeModel model= new LinkedModeModel();
        model.addGroup(group1);
        model.addGroup(group2);
        model.forceInstall();

        /* create UI */
        LinkedModeUI ui= new LinkedModeUI(model, new ITextViewer[] { viewer1, viewer2 });
        ui.enter();
Eclipse Platform
Kepler (4.3)


Copyright (c) 2000, 2013 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.