3m9 compatible;
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / IOpenable.java
index e0e17e3..b0cd469 100644 (file)
@@ -1,16 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
- * are made available under the terms of the Common Public License v0.5 
+ * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
+ * http://www.eclipse.org/legal/cpl-v10.html
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
- ******************************************************************************/
+ *******************************************************************************/
 package net.sourceforge.phpdt.core;
 
 import org.eclipse.core.runtime.IProgressMonitor;
+import net.sourceforge.phpdt.core.JavaModelException;
+
 
 /**
  * Common protocol for Java elements that must be opened before they can be 
@@ -106,6 +108,22 @@ boolean isConsistent() throws JavaModelException;
  */
 boolean isOpen();
 /**
+ * Opens this element and all parent elements that are not already open.
+ * For compilation units, a buffer is opened on the contents of the underlying resource.
+ *
+ * <p>Note: although <code>open</code> is exposed in the API, clients are
+ * not expected to open and close elements - the Java model does this automatically
+ * as elements are accessed.
+ *
+ * @param progress the given progress monitor
+ * @exception JavaModelException if an error occurs accessing the contents
+ *             of its underlying resource. Reasons include:
+ * <ul>
+ *  <li>This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
+ * </ul>
+ */
+public void open(IProgressMonitor progress) throws JavaModelException;
+/**
  * Makes this element consistent with its underlying resource or buffer 
  * by updating the element's structure and properties as necessary.
  *
@@ -133,7 +151,7 @@ void makeConsistent(IProgressMonitor progress) throws JavaModelException;
  *  <li>This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
  * </ul>
  */
-public void open(IProgressMonitor progress) throws JavaModelException;
+//public void open(IProgressMonitor progress) throws JavaModelException;
 /**
  * Saves any changes in this element's buffer to its underlying resource
  * via a workspace resource operation. This has no effect if the element has no underlying
@@ -165,4 +183,5 @@ public void open(IProgressMonitor progress) throws JavaModelException;
  * </ul>
  */
 public void save(IProgressMonitor progress, boolean force) throws JavaModelException;
+
 }