intial source from http://www.sf.net/projects/wdte
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpeclipse / ui / text / rules / IDocumentView.java
diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/text/rules/IDocumentView.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/text/rules/IDocumentView.java
new file mode 100644 (file)
index 0000000..2ec3410
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2002-2004 Widespace, OU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://solareclipse.sourceforge.net/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     Igor Malinin - initial contribution
+ * 
+ * $Id: IDocumentView.java,v 1.1 2004-09-02 18:26:29 jsurfer Exp $
+ */
+
+package net.sourceforge.phpeclipse.ui.text.rules;
+
+import org.eclipse.jface.text.IDocument;
+
+/**
+ * View to part of parent document. Provides methods for translating character
+ * offsets between this view and parent document.
+ * 
+ * @author Igor Malinin
+ */
+public interface IDocumentView extends IDocument {
+
+       IDocument getParentDocument();
+
+       int getParentOffset(int localOffset);
+
+       int getLocalOffset(int parentOffset);
+}