eric6/E5XML/SessionReader.py

Sun, 02 Feb 2020 11:04:32 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 02 Feb 2020 11:04:32 +0100
changeset 7380
c99320e859ca
parent 7360
9190402e4505
child 7780
41420f82c0ac
permissions
-rw-r--r--

Fixed an issue related to showing the application name in the menu bar of Gnome desktop under Wayland.

599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7360
9190402e4505 Updated copyright for 2020.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7253
diff changeset
3 # Copyright (c) 2010 - 2020 Detlev Offenbach <detlev@die-offenbachs.de>
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a class for reading an XML session file.
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
10
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11 from E5Gui.E5Application import e5App
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 from .Config import sessionFileFormatVersion
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 from .XMLStreamReaderBase import XMLStreamReaderBase
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 938
diff changeset
16
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 class SessionReader(XMLStreamReaderBase):
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 Class for reading an XML session file.
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 """
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
21 supportedVersions = ["4.3", "4.4", "5.0", "6.0", "6.1", "6.2"]
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 def __init__(self, device, isGlobal):
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 Constructor
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26
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
27 @param device reference to the I/O device to read from
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 @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
29 @param isGlobal flag indicating to read the global session
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 @type bool
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 XMLStreamReaderBase.__init__(self, device)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 self.version = ""
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 self.isGlobal = isGlobal
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
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")
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 self.multiProject = e5App().getObject("MultiProject")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 self.vm = e5App().getObject("ViewManager")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 self.dbg = e5App().getObject("DebugUI")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 self.dbs = e5App().getObject("DebugServer")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 if not self.isGlobal:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 # clear all breakpoints and bookmarks first
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 # (in case we are rereading a session file)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 files = self.project.getSources(True)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 for file in files:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 editor = self.vm.getOpenEditor(file)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 if editor is not None:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 editor.clearBookmarks()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 self.dbs.getBreakPointModel().deleteAll()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 self.dbs.getWatchPointModel().deleteAll()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 938
diff changeset
55 def readXML(self, quiet=False):
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 Public method to read and parse the XML document.
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 @param quiet flag indicating quiet operations.
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
60 If this flag is true, no errors are reported.
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
61 @type bool
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 while not self.atEnd():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 self.readNext()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 if self.isStartElement():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 if self.name() == "Session":
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
67 self.version = self.attribute(
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
68 "version", sessionFileFormatVersion)
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 if self.version not in self.supportedVersions:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 self.raiseUnsupportedFormatVersion(self.version)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 elif self.name() == "MultiProject":
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
72 self.multiProject.openMultiProject(
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
73 self.readElementText(), False)
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74 elif self.name() == "Project":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 self.project.openProject(self.readElementText(), False)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 elif self.name() == "Filenames":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 self.__readFilenames()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 elif self.name() == "ActiveWindow":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 cline = int(self.attribute("cline", "0"))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 cindex = int(self.attribute("cindex", "0"))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81 filename = self.readElementText()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 self.vm.openFiles(filename)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 ed = self.vm.getOpenEditor(filename)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 if ed is not None:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 ed.setCursorPosition(cline, cindex)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 ed.ensureCursorVisible()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 elif self.name() == "Breakpoints":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 self.__readBreakpoints()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 elif self.name() == "Watchexpressions":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 self.__readWatchexpressions()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 elif self.name() == "DebugInfo":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 self.__readDebugInfo()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 elif self.name() == "Bookmarks":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 self.__readBookmarks()
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
95 elif self.name() == "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
96 self.__readProjectBrowserStates()
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
97 elif self.name() == "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
98 splitCount = int(self.attribute("count", "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 orientation = int(self.attribute("orientation", "1"))
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.vm.setSplitOrientation(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
101 self.vm.setSplitCount(splitCount)
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 else:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 self.raiseUnexpectedStartTag(self.name())
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 if not quiet:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 self.showErrorMessage()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 def __readFilenames(self):
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 Private method to read the file name infos.
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 """
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
112 editorDict = {}
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 while not self.atEnd():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 self.readNext()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 if self.isEndElement() and self.name() == "Filenames":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 break
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118 if self.isStartElement():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 if self.name() == "Filename":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 cline = int(self.attribute("cline", "0"))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 cindex = int(self.attribute("cindex", "0"))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 folds = self.attribute("folds")
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 if folds:
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
124 folds = [int(f) - 1 for f in folds.split(',')]
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 else:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 folds = []
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 zoom = int(self.attribute("zoom", "-9999"))
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
128 cloned = bool(int(self.attribute("cloned", "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
129 splitIndex = int(self.attribute("splitindex", "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
130 editorIndex = int(self.attribute("editorindex", "-1"))
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 filename = self.readElementText()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132
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
133 if cloned and 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
134 editor = editorDict[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
135 ed = self.vm.newEditorView(
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
136 filename, editor, editor.getFileType(),
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
137 indexes=(splitIndex, 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
138 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
139 ed = self.vm.openSourceFile(
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
140 filename, indexes=(splitIndex, 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
141 editorDict[filename] = ed
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142 if ed is not None:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
143 if zoom > -9999:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
144 ed.zoomTo(zoom)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
145 if folds:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146 ed.recolor()
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
147 ed.setContractedFolds(folds)
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
148 ed.setCursorPosition(cline, cindex)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
149 ed.ensureCursorVisible()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
150 else:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151 self.raiseUnexpectedStartTag(self.name())
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
152
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
153 def __readBreakpoints(self):
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
154 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
155 Private method to read the break point infos.
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
156 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
157 while not self.atEnd():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
158 self.readNext()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
159 if self.isEndElement() and self.name() == "Breakpoints":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
160 break
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
161
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
162 if self.isStartElement():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
163 if self.name() == "Breakpoint":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
164 self.__readBreakpoint()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
165 else:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
166 self.raiseUnexpectedStartTag(self.name())
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
167
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
168 def __readBreakpoint(self):
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
169 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
170 Private method to read the break point info.
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
171 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
172 filename = ""
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
173 lineno = 0
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
174 bpCond = ""
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
175 bpTemp = False
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
176 bpEnabled = True
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
177 bpCount = 0
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
178
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
179 while not self.atEnd():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
180 self.readNext()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
181 if self.isEndElement() and self.name() == "Breakpoint":
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2992
diff changeset
182 self.dbs.getBreakPointModel().addBreakPoint(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2992
diff changeset
183 filename, lineno, (bpCond, bpTemp, bpEnabled, bpCount))
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
184 break
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
185
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
186 if self.isStartElement():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
187 if self.name() == "BpFilename":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
188 filename = self.readElementText()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
189 elif self.name() == "Linenumber":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
190 lineno = int(self.attribute("value", "0"))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
191 elif self.name() == "Condition":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
192 bpCond = self.readElementText()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
193 if bpCond == 'None':
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
194 bpCond = ''
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
195 elif self.name() == "Temporary":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
196 bpTemp = self.toBool(self.attribute("value", "False"))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
197 elif self.name() == "Enabled":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
198 bpEnabled = self.toBool(self.attribute("value", "True"))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
199 elif self.name() == "Count":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
200 bpCount = int(self.attribute("value", "0"))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
201 else:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
202 self.raiseUnexpectedStartTag(self.name())
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
203
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
204 def __readWatchexpressions(self):
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
205 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
206 Private method to read watch expression infos.
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
207 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
208 while not self.atEnd():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
209 self.readNext()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
210 if self.isEndElement() and self.name() == "Watchexpressions":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
211 break
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
212
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
213 if self.isStartElement():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
214 if self.name() == "Watchexpression":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
215 self.__readWatchexpression()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
216 else:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
217 self.raiseUnexpectedStartTag(self.name())
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
218
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
219 def __readWatchexpression(self):
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
220 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
221 Private method to read the watch expression info.
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
222 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
223 weCond = ""
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
224 weTemp = False
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
225 weEnabled = True
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
226 weCount = 0
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
227 weSpecialCond = ""
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
228
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
229 while not self.atEnd():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
230 self.readNext()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
231 if self.isEndElement() and self.name() == "Watchexpression":
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2992
diff changeset
232 self.dbs.getWatchPointModel().addWatchPoint(
4463
87cd9719dc23 Fixed an issue writing and reading watch expressions to/from the session file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
233 weCond, weSpecialCond, (weTemp, weEnabled, weCount))
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
234 break
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
235
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
236 if self.isStartElement():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
237 if self.name() == "Condition":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
238 weCond = self.readElementText()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
239 if weCond == 'None':
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
240 weCond = ''
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
241 elif self.name() == "Temporary":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
242 weTemp = self.toBool(self.attribute("value", "False"))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
243 elif self.name() == "Enabled":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
244 weEnabled = self.toBool(self.attribute("value", "True"))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
245 elif self.name() == "Count":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
246 weCount = int(self.attribute("value", "0"))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
247 elif self.name() == "Special":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
248 weSpecialCond = self.readElementText()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
249 else:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
250 self.raiseUnexpectedStartTag(self.name())
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
251
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
252 def __readDebugInfo(self):
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
253 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
254 Private method to read the debug infos.
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
255 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
256 dbgExcList = []
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
257 dbgExcIgnoreList = []
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
258
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
259 while not self.atEnd():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
260 self.readNext()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
261 if self.isEndElement():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
262 if self.name() == "DebugInfo":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
263 break
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
264 elif self.name() == "Exceptions":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
265 self.dbg.setExcList(dbgExcList)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
266 if not self.isGlobal:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
267 self.project.dbgExcList = dbgExcList[:]
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
268 elif self.name() == "IgnoredExceptions":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
269 self.dbg.setExcIgnoreList(dbgExcIgnoreList)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
270 if not self.isGlobal:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
271 self.project.dbgExcIgnoreList = dbgExcIgnoreList[:]
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
272
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
273 if self.isStartElement():
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
274 if self.name() == "VirtualEnv":
5899
0516f6548ca6 Added the capability to enter an interpreter in the Start... dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
275 txt = self.readElementText()
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
276 self.dbg.lastUsedVenvName = txt
5899
0516f6548ca6 Added the capability to enter an interpreter in the Start... dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
277 if not self.isGlobal:
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
278 self.project.dbgVirtualEnv = txt
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
279 elif self.name() == "Interpreter":
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
280 # just read this obsolete entry and ignore it
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
281 self.readElementText()
5899
0516f6548ca6 Added the capability to enter an interpreter in the Start... dialogs of the debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
282 elif self.name() == "CommandLine":
599
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
283 txt = self.readElementText()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
284 self.dbg.setArgvHistory(txt)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
285 if not self.isGlobal:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
286 self.project.dbgCmdline = txt
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
287 elif self.name() == "WorkingDirectory":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
288 txt = self.readElementText()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
289 self.dbg.setWdHistory(txt)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
290 if not self.isGlobal:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
291 self.project.dbgWd = txt
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
292 elif self.name() == "Environment":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
293 txt = self.readElementText()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
294 self.dbg.setEnvHistory(txt)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
295 if not self.isGlobal:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
296 self.project.dbgEnv = txt
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
297 elif self.name() == "ReportExceptions":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
298 exc = self.toBool(self.attribute("value", "True"))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
299 self.dbg.setExceptionReporting(exc)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
300 if not self.isGlobal:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
301 self.project.dbgReportExceptions = exc
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
302 elif self.name() == "Exceptions":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
303 pass # ignore this start tag
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
304 elif self.name() == "Exception":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
305 dbgExcList.append(self.readElementText())
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
306 elif self.name() == "IgnoredExceptions":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
307 pass # ignore this start tag
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
308 elif self.name() == "IgnoredException":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
309 dbgExcIgnoreList.append(self.readElementText())
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
310 elif self.name() == "AutoClearShell":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
311 val = self.toBool(self.attribute("value"))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
312 self.dbg.setAutoClearShell(val)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
313 if not self.isGlobal:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
314 self.project.dbgAutoClearShell = val
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
315 elif self.name() == "TracePython":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
316 val = self.toBool(self.attribute("value"))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
317 self.dbg.setTracePython(val)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
318 if not self.isGlobal:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
319 self.project.dbgTracePython = val
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
320 elif self.name() == "AutoContinue":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
321 val = self.toBool(self.attribute("value"))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
322 self.dbg.setAutoContinue(val)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
323 if not self.isGlobal:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
324 self.project.dbgAutoContinue = val
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
325 elif self.name() == "CovexcPattern":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
326 pass # ignore this start tag
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
327 else:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
328 self.raiseUnexpectedStartTag(self.name())
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
329
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
330 def __readBookmarks(self):
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
331 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
332 Private method to read the bookmark infos.
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
333 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
334 while not self.atEnd():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
335 self.readNext()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
336 if self.isEndElement() and self.name() == "Bookmarks":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
337 break
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
338
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
339 if self.isStartElement():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
340 if self.name() == "Bookmark":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
341 self.__readBookmark()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
342 else:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
343 self.raiseUnexpectedStartTag(self.name())
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
344
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
345 def __readBookmark(self):
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
346 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
347 Private method to read the bookmark info.
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
348 """
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
349 filename = ""
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
350 lineno = 0
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
351
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
352 while not self.atEnd():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
353 self.readNext()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
354 if self.isEndElement() and self.name() == "Bookmark":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
355 editor = self.vm.getOpenEditor(filename)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
356 if editor is not None:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
357 editor.toggleBookmark(lineno)
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
358 break
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
359
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
360 if self.isStartElement():
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
361 if self.name() == "BmFilename":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
362 filename = self.readElementText()
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
363 elif self.name() == "Linenumber":
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
364 lineno = int(self.attribute("value", "0"))
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
365 else:
ee87fe94bf96 Migrated the session handler to session reader.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
366 self.raiseUnexpectedStartTag(self.name())
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
367
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
368 def __readProjectBrowserStates(self):
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
369 """
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
370 Private method to read the project browser state infos.
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
371 """
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
372 while not self.atEnd():
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
373 self.readNext()
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
374 if self.isEndElement() and self.name() == "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
375 break
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
376
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
377 if self.isStartElement():
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
378 if self.name() == "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
379 browserName = self.attribute("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
380 if not 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
381 self.raiseBadValue("ProjectBrowserState.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
382 self.__readProjectBrowserState(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
383 else:
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
384 self.raiseUnexpectedStartTag(self.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
385
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
386 def __readProjectBrowserState(self, 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
387 """
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
388 Private method to read the project browser state info.
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
389
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
390 @param browserName name of the project browser
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
391 @type str
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
392 """
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
393 expandedNames = []
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
394
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
395 while not self.atEnd():
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
396 self.readNext()
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
397 if self.isEndElement() and self.name() == "ProjectBrowserState":
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
398 projectBrowser = self.projectBrowser.getProjectBrowser(
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
399 browserName)
3601
236578b22511 Continued implementing functionality to save expanded file and directory entries of the project browsers to the session.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3600
diff changeset
400 if projectBrowser is not None:
236578b22511 Continued implementing functionality to save expanded file and directory entries of the project browsers to the session.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3600
diff changeset
401 projectBrowser.expandItemsByName(expandedNames)
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
402 break
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
403
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
404 if self.isStartElement():
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
405 if self.name() == "ExpandedItemName":
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
406 itemName = self.readElementText()
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
407 if itemName:
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
408 expandedNames.append(itemName)
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
409 else:
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
410 self.raiseUnexpectedStartTag(self.name())

eric ide

mercurial