E5XML/UserProjectHandler.py

changeset 606
cc26d1c27da5
parent 605
9c7527ecbf6e
child 607
d95d60ba16aa
diff -r 9c7527ecbf6e -r cc26d1c27da5 E5XML/UserProjectHandler.py
--- a/E5XML/UserProjectHandler.py	Mon Sep 13 08:32:36 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (c) 2006 - 2010 Detlev Offenbach <detlev@die-offenbachs.de>
-#
-
-"""
-Module implementing the handler class for reading an XML user project properties file.
-"""
-
-from .Config import userProjectFileFormatVersion
-from .XMLHandlerBase import XMLHandlerBase
-
-import Preferences
-
-class UserProjectHandler(XMLHandlerBase):
-    """
-    Class implementing a sax handler to read an XML user project properties file.
-    """
-    def __init__(self, project):
-        """
-        Constructor
-        
-        @param project Reference to the project object to store the
-                information into.
-        """
-        XMLHandlerBase.__init__(self)
-        
-        self.startDocumentSpecific = self.startDocumentProject
-        
-        self.elements.update({
-            'UserProject' : (self.startUserProject, self.defaultEndElement),
-            'VcsType' : (self.defaultStartElement, self.endVcsType),
-            'VcsStatusMonitorInterval' : (self.startVcsStatusMonitorInterval, 
-                                          self.defaultEndElement),
-        })
-    
-        self.project = project
-        
-    def startDocumentProject(self):
-        """
-        Handler called, when the document parsing is started.
-        """
-        self.version = ''
-        
-    ###################################################
-    ## below follow the individual handler functions
-    ###################################################
-    
-    def endVcsType(self):
-        """
-        Handler method for the "VcsType" end tag.
-        """
-        self.project.pudata["VCSOVERRIDE"] = [self.buffer]
-        
-    def startVcsStatusMonitorInterval(self, attrs):
-        """
-        Handler method for the "VcsStatusMonitorInterval" start tag.
-        
-        @param attrs list of tag attributes
-        """
-        interval = int(attrs.get("value", Preferences.getVCS("StatusMonitorInterval")))
-        self.project.pudata["VCSSTATUSMONITORINTERVAL"] = [interval]
-        
-    def startUserProject(self, attrs):
-        """
-        Handler method for the "UserProject" start tag.
-        
-        @param attrs list of tag attributes
-        """
-        self.version = attrs.get('version', userProjectFileFormatVersion)
-        
-    def getVersion(self):
-        """
-        Public method to retrieve the version of the user project file.
-        
-        @return String containing the version number.
-        """
-        return self.version

eric ide

mercurial