Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/plugin/nature
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8061/src/org/python/pydev/plugin/nature
Modified Files:
PythonNatureStore.java
Added Files:
IPythonPathHelper.java
Log Message:
Synching from mercurial:
- Pydev debugger watch working in eclipse 3.4
- Pydev debugger breakpoint properties accept new lines and tabs
- Incremental find backspace works correctly
- Interactive console Fixed problem when more attempts to connect were needed
- Launch icons: Transparent background (thanks to Radim Kubacki)
- Creating workbench test for debugger
--- NEW FILE: IPythonPathHelper.java ---
package org.python.pydev.plugin.nature;
import org.eclipse.core.runtime.IProgressMonitor;
import org.python.pydev.editor.codecompletion.revisited.ModulesFoundStructure;
import java.io.Serializable;
import java.util.List;
/**
* @author ra...@ku... (Radim Kubacki)
*/
public interface IPythonPathHelper extends Serializable {
/**
*
* @param fullPath this is the full path of the module. Only for directories or py,pyd,dll,pyo files.
* @return a String with the module that the file or folder should represent. E.g.: compiler.ast
*/
public String resolveModule(String fullPath);
/**
* Sets the python path to operate on.
*
* @param string with paths separated by {@code |}
*/
public void setPythonPath(String string);
/**
* Getter for Python path.
* @return list of Python path entries.
*/
public List<String> getPythonpath();
/**
* This method should traverse the pythonpath passed and return a structure with the info that could be collected
* about the files that are related to python modules.
*/
public ModulesFoundStructure getModulesFoundStructure(IProgressMonitor monitor);
}
Index: PythonNatureStore.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/plugin/nature/PythonNatureStore.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** PythonNatureStore.java 31 Jul 2008 01:47:36 -0000 1.21
--- PythonNatureStore.java 13 Aug 2008 21:12:15 -0000 1.22
***************
*** 97,100 ****
--- 97,104 ----
private volatile boolean inInit;
+ public String getLastLoadedContents(){
+ return lastLoadedContents;
+ }
+
private void traceFunc(String func, Object ... args){
if(TRACE_PYTHON_NATURE_STORE){
***************
*** 742,756 ****
File file = getRawXmlFileLocation();
! if(file == null){
! //that's ok... in tests
! return Status.OK_STATUS;
! }
try {
//Ok, we may receive multiple requests at once (e.g.: when updating the version and the pythonpath together), but
//as the file is pretty small, there should be no problems in writing it directly (if that proves a problem later on, we
//could have a *very* simple mechanism for saving it after some millis)
-
String str = new String(serializeDocument(document));
lastLoadedContents = str;
if(TRACE_PYTHON_NATURE_STORE){
System.out.println("Writing to file: "+file+" "+str);
--- 746,765 ----
File file = getRawXmlFileLocation();
!
try {
//Ok, we may receive multiple requests at once (e.g.: when updating the version and the pythonpath together), but
//as the file is pretty small, there should be no problems in writing it directly (if that proves a problem later on, we
//could have a *very* simple mechanism for saving it after some millis)
String str = new String(serializeDocument(document));
lastLoadedContents = str;
+
+ if(file == null){
+ if (!ProjectModulesManager.IN_TESTS) {
+ //if we're not in tests, let's log this, as it'd be an error.
+ PydevPlugin.log("Error: xml file should only be null in tests (when no workspace is available)");
+ }
+ return Status.OK_STATUS;
+ }
+
if(TRACE_PYTHON_NATURE_STORE){
System.out.println("Writing to file: "+file+" "+str);
|