129
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2000, 2005 IBM Corporation and others.
|
|
3 * All rights reserved. This program and the accompanying materials
|
|
4 * are made available under the terms of the Eclipse Public License v1.0
|
|
5 * which accompanies this distribution, and is available at
|
|
6 * http://www.eclipse.org/legal/epl-v10.html
|
|
7 *
|
|
8 * Contributors:
|
|
9 * IBM Corporation - initial API and implementation
|
|
10 * Port to the D programming language:
|
|
11 * Frank Benoit <benoit@tionex.de>
|
|
12 *******************************************************************************/
|
|
13 module dwtx.jface.text.IDocumentInformationMappingExtension2;
|
|
14
|
|
15 import dwt.dwthelper.utils;
|
|
16
|
|
17 /**
|
|
18 * Extension to {@link dwtx.jface.text.IDocumentInformationMapping}.
|
|
19 * <p>
|
|
20 * Extends the information available in the mapping by providing access
|
|
21 * to the closest image region of an origin region.
|
|
22 * </p>
|
|
23 *
|
|
24 * @see dwtx.jface.text.IDocumentInformationMapping
|
|
25 * @since 3.1
|
|
26 */
|
|
27 public interface IDocumentInformationMappingExtension2 {
|
|
28
|
|
29 /**
|
|
30 * Returns the minimal region of the image document that completely
|
|
31 * comprises the given region of the original document. The difference to
|
|
32 * {@link IDocumentInformationMapping#toImageRegion(IRegion)} is that this
|
|
33 * method will always return an image region for a valid origin region. If
|
|
34 * <code>originRegion</code> has no corresponding image region, the
|
|
35 * zero-length region at the offset between its surrounding fragments is
|
|
36 * returned.
|
|
37 *
|
|
38 * @param originRegion the region of the original document
|
|
39 * @return the minimal region of the image document comprising the given
|
|
40 * region of the original document
|
|
41 * @throws BadLocationException if <code>originRegion</code> is not a
|
|
42 * valid region of the original document
|
|
43 */
|
|
44 IRegion toClosestImageRegion(IRegion originRegion) throws BadLocationException;
|
|
45 }
|