eric6/E5XML/SessionWriter.py

Wed, 30 Dec 2020 11:00:05 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 30 Dec 2020 11:00:05 +0100
changeset 7923
91e843545d9a
parent 7780
41420f82c0ac
child 7960
e8fc383322f7
permissions
-rw-r--r--

Updated copyright for 2021.

0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7923
91e843545d9a Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7780
diff changeset
3 # Copyright (c) 2004 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
7 Module implementing the writer class for writing an XML session file.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 import time
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
12 from E5Gui.E5Application import e5App
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
14 from .XMLStreamWriterBase import XMLStreamWriterBase
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6
diff changeset
15 from .Config import sessionFileFormatVersion
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 import Preferences
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 938
diff changeset
19
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
20 class SessionWriter(XMLStreamWriterBase):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 """
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
22 Class implementing the writer class for writing an XML session file.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 """
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
24 def __init__(self, device, projectName):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27
6052
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
28 @param device reference to the I/O device to write to
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
29 @type QIODevice
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
30 @param projectName name of the project or None for the
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 global session
6052
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
32 @type str or None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 """
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
34 XMLStreamWriterBase.__init__(self, device)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 self.name = projectName
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
37 self.project = e5App().getObject("Project")
3600
7d17c492ab95 Started implementing functionality to save expanded file and directory entries of the project browsers to the session.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
38 self.projectBrowser = e5App().getObject("ProjectBrowser")
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
39 self.multiProject = e5App().getObject("MultiProject")
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
40 self.vm = e5App().getObject("ViewManager")
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
41 self.dbg = e5App().getObject("DebugUI")
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
42 self.dbs = e5App().getObject("DebugServer")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 def writeXML(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 Public method to write the XML to the file.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 isGlobal = self.name is None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
50 XMLStreamWriterBase.writeXML(self)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
52 self.writeDTD('<!DOCTYPE Session SYSTEM "Session-{0}.dtd">'.format(
411
99409cddaaa9 Did some more string format conversions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 229
diff changeset
53 sessionFileFormatVersion))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 # add some generation comments
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 if not isGlobal:
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
57 self.writeComment(
3670
f0cb7579c0b4 Finished renaming eric5 for PyQt5 to eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3600
diff changeset
58 " eric6 session file for project {0} ".format(self.name))
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
59 self.writeComment(
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
60 " This file was generated automatically, do not edit. ")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 if Preferences.getProject("XMLTimestamp") or isGlobal:
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
62 self.writeComment(
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
63 " Saved: {0} ".format(time.strftime('%Y-%m-%d, %H:%M:%S')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 # add the main tag
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
66 self.writeStartElement("Session")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
67 self.writeAttribute("version", sessionFileFormatVersion)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 # step 0: save open multi project and project for the global session
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 if isGlobal:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 if self.multiProject.isOpen():
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2992
diff changeset
72 self.writeTextElement(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2992
diff changeset
73 "MultiProject", self.multiProject.getMultiProjectFile())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74 if self.project.isOpen():
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
75 self.writeTextElement("Project", self.project.getProjectFile())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 # step 1: save all open (project) filenames and the active window
6052
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
78 if self.vm.canSplit():
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
79 self.writeEmptyElement("ViewManagerSplits")
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
80 self.writeAttribute("count", str(self.vm.splitCount()))
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
81 self.writeAttribute("orientation",
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
82 str(self.vm.getSplitOrientation()))
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
83
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
84 allOpenEditorLists = self.vm.getOpenEditorsForSession()
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
85 editorDict = {} # remember editors by file name to detect clones
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
86 self.writeStartElement("Filenames")
6052
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
87 for splitIndex, openEditorList in enumerate(allOpenEditorLists):
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
88 for editorIndex, editor in enumerate(openEditorList):
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
89 fileName = editor.getFileName()
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
90 if isGlobal or self.project.isProjectFile(fileName):
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
91 line, index = editor.getCursorPosition()
938
f421f2138c0f Adjusted code to use the QScintilla contractedFolds() and setContractedFolds() methods (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
92 folds = ','.join(
6052
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
93 [str(i + 1) for i in editor.contractedFolds()])
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
94 zoom = editor.getZoom()
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
95 if fileName in editorDict:
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
96 isClone = int(editorDict[fileName].isClone(editor))
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
97 else:
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
98 isClone = 0
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
99 editorDict[fileName] = editor
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
100 self.writeStartElement("Filename")
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
101 self.writeAttribute("cline", str(line))
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
102 self.writeAttribute("cindex", str(index))
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
103 self.writeAttribute("folds", folds)
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
104 self.writeAttribute("zoom", str(zoom))
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
105 self.writeAttribute("cloned", str(isClone))
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
106 self.writeAttribute("splitindex", str(splitIndex))
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
107 self.writeAttribute("editorindex", str(editorIndex))
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
108 self.writeCharacters(fileName)
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
109 self.writeEndElement()
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
110 self.writeEndElement()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 aw = self.vm.getActiveName()
6052
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
113 if aw and self.project.isProjectFile(aw):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 ed = self.vm.getOpenEditor(aw)
6052
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
115 line, index = ed.getCursorPosition()
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
116 self.writeStartElement("ActiveWindow")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
117 self.writeAttribute("cline", str(line))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
118 self.writeAttribute("cindex", str(index))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
119 self.writeCharacters(aw)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
120 self.writeEndElement()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 # step 2a: save all breakpoints
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 allBreaks = Preferences.getProject("SessionAllBreakpoints")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 projectFiles = self.project.getSources(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 bpModel = self.dbs.getBreakPointModel()
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
126 self.writeStartElement("Breakpoints")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 for row in range(bpModel.rowCount()):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 index = bpModel.index(row, 0)
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
129 fname, lineno, cond, temp, enabled, count = (
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 bpModel.getBreakPointByIndex(index)[:6]
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
131 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 if isGlobal or allBreaks or fname in projectFiles:
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
133 self.writeStartElement("Breakpoint")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
134 self.writeTextElement("BpFilename", fname)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
135 self.writeEmptyElement("Linenumber")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
136 self.writeAttribute("value", str(lineno))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
137 self.writeTextElement("Condition", str(cond))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
138 self.writeEmptyElement("Temporary")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
139 self.writeAttribute("value", str(temp))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
140 self.writeEmptyElement("Enabled")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
141 self.writeAttribute("value", str(enabled))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
142 self.writeEmptyElement("Count")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
143 self.writeAttribute("value", str(count))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
144 self.writeEndElement()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
145 self.writeEndElement()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
147 # step 2b: save all watch expressions
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
148 self.writeStartElement("Watchexpressions")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
149 wpModel = self.dbs.getWatchPointModel()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
150 for row in range(wpModel.rowCount()):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151 index = wpModel.index(row, 0)
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
152 cond, special, temp, enabled, count = (
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
153 wpModel.getWatchPointByIndex(index)[:5]
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
154 )
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
155 self.writeStartElement("Watchexpression")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
156 self.writeTextElement("Condition", str(cond))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
157 self.writeEmptyElement("Temporary")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
158 self.writeAttribute("value", str(temp))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
159 self.writeEmptyElement("Enabled")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
160 self.writeAttribute("value", str(enabled))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
161 self.writeEmptyElement("Count")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
162 self.writeAttribute("value", str(count))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
163 self.writeTextElement("Special", special)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
164 self.writeEndElement()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
165 self.writeEndElement()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
166
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
167 # step 3: save the debug info
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
168 self.writeStartElement("DebugInfo")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
169 if isGlobal:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
170 if len(self.dbg.argvHistory):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
171 dbgCmdline = str(self.dbg.argvHistory[0])
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
172 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
173 dbgCmdline = ""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
174 if len(self.dbg.wdHistory):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
175 dbgWd = self.dbg.wdHistory[0]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
176 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
177 dbgWd = ""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
178 if len(self.dbg.envHistory):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
179 dbgEnv = self.dbg.envHistory[0]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
180 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
181 dbgEnv = ""
6352
4bdc6503df81 Continued to remove all explicit references to Python interpreters and replace them by references to virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6052
diff changeset
182 self.writeTextElement("VirtualEnv", self.dbg.lastUsedVenvName)
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
183 self.writeTextElement("CommandLine", dbgCmdline)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
184 self.writeTextElement("WorkingDirectory", dbgWd)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
185 self.writeTextElement("Environment", dbgEnv)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
186 self.writeEmptyElement("ReportExceptions")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
187 self.writeAttribute("value", str(self.dbg.exceptions))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
188 self.writeStartElement("Exceptions")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
189 for exc in self.dbg.excList:
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
190 self.writeTextElement("Exception", exc)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
191 self.writeEndElement()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
192 self.writeStartElement("IgnoredExceptions")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
193 for iexc in self.dbg.excIgnoreList:
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
194 self.writeTextElement("IgnoredException", iexc)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
195 self.writeEndElement()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
196 self.writeEmptyElement("AutoClearShell")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
197 self.writeAttribute("value", str(self.dbg.autoClearShell))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
198 self.writeEmptyElement("TracePython")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
199 self.writeAttribute("value", str(self.dbg.tracePython))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
200 self.writeEmptyElement("AutoContinue")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
201 self.writeAttribute("value", str(self.dbg.autoContinue))
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
202 self.writeEmptyElement("CovexcPattern") # kept for compatibility
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
203 else:
6352
4bdc6503df81 Continued to remove all explicit references to Python interpreters and replace them by references to virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6052
diff changeset
204 self.writeTextElement("VirtualEnv", self.project.dbgVirtualEnv)
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
205 self.writeTextElement("CommandLine", self.project.dbgCmdline)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
206 self.writeTextElement("WorkingDirectory", self.project.dbgWd)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
207 self.writeTextElement("Environment", self.project.dbgEnv)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
208 self.writeEmptyElement("ReportExceptions")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
209 self.writeAttribute("value", str(self.project.dbgReportExceptions))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
210 self.writeStartElement("Exceptions")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
211 for exc in self.project.dbgExcList:
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
212 self.writeTextElement("Exception", exc)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
213 self.writeEndElement()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
214 self.writeStartElement("IgnoredExceptions")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
215 for iexc in self.project.dbgExcIgnoreList:
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
216 self.writeTextElement("IgnoredException", iexc)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
217 self.writeEndElement()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
218 self.writeEmptyElement("AutoClearShell")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
219 self.writeAttribute("value", str(self.project.dbgAutoClearShell))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
220 self.writeEmptyElement("TracePython")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
221 self.writeAttribute("value", str(self.project.dbgTracePython))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
222 self.writeEmptyElement("AutoContinue")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
223 self.writeAttribute("value", str(self.project.dbgAutoContinue))
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
224 self.writeEmptyElement("CovexcPattern") # kept for compatibility
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
225 self.writeEndElement()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
226
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
227 # step 4: save bookmarks of all open (project) files
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
228 self.writeStartElement("Bookmarks")
6052
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
229 for fileName in editorDict:
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
230 if isGlobal or self.project.isProjectFile(fileName):
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
231 editor = editorDict[fileName]
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
232 for bookmark in editor.getBookmarks():
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
233 self.writeStartElement("Bookmark")
6052
8b49d3e0b4c8 Extended the session to store/retrieve the split views and the order of the editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
234 self.writeTextElement("BmFilename", fileName)
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
235 self.writeEmptyElement("Linenumber")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
236 self.writeAttribute("value", str(bookmark))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
237 self.writeEndElement()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
238 self.writeEndElement()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
239
3600
7d17c492ab95 Started implementing functionality to save expanded file and directory entries of the project browsers to the session.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
240 # step 5: save state of the various project browsers
7d17c492ab95 Started implementing functionality to save expanded file and directory entries of the project browsers to the session.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
241 if not isGlobal:
7d17c492ab95 Started implementing functionality to save expanded file and directory entries of the project browsers to the session.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
242 self.writeStartElement("ProjectBrowserStates")
7d17c492ab95 Started implementing functionality to save expanded file and directory entries of the project browsers to the session.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
243 for browserName in self.projectBrowser.getProjectBrowserNames():
7d17c492ab95 Started implementing functionality to save expanded file and directory entries of the project browsers to the session.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
244 self.writeStartElement("ProjectBrowserState")
7d17c492ab95 Started implementing functionality to save expanded file and directory entries of the project browsers to the session.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
245 self.writeAttribute("name", browserName)
7d17c492ab95 Started implementing functionality to save expanded file and directory entries of the project browsers to the session.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
246 # get the names of expanded files and directories
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
247 names = self.projectBrowser.getProjectBrowser(
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
248 browserName).getExpandedItemNames()
3600
7d17c492ab95 Started implementing functionality to save expanded file and directory entries of the project browsers to the session.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
249 for name in names:
7d17c492ab95 Started implementing functionality to save expanded file and directory entries of the project browsers to the session.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
250 self.writeTextElement("ExpandedItemName", name)
7d17c492ab95 Started implementing functionality to save expanded file and directory entries of the project browsers to the session.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
251 self.writeEndElement()
7d17c492ab95 Started implementing functionality to save expanded file and directory entries of the project browsers to the session.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
252 self.writeEndElement()
7d17c492ab95 Started implementing functionality to save expanded file and directory entries of the project browsers to the session.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
253
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
254 # add the main end tag
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
255 self.writeEndElement()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 411
diff changeset
256 self.writeEndDocument()

eric ide

mercurial