Example #1
0
import relpath, sourceconst

# try to use new cProfile module
try:
    import cProfile
    prof = 'cProfile'
except ImportError:
    prof = 'profile'

(
    imgPyAppModel,
    imgModuleModel,
    imgPackageModel,
    imgSetupModel,
    imgPythonBinaryFileModel,
) = EditorHelper.imgIdxRange(5)


class SourcePseudoFile(Utils.PseudoFileOutStore):
    def readlines(self):
        return self.output


class ModuleModel(SourceModel):
    modelIdentifier = 'Module'
    defaultName = 'module'
    bitmap = 'Module.png'
    imgIdx = imgModuleModel
    ext = '.py'

    def __init__(self, data, name, editor, saved, app=None):
# Author:      Riaan Booysen
#
# Created:     2002
# RCS-ID:      $Id: XMLSupport.py,v 1.10 2007/07/02 15:01:15 riaan Exp $
# Copyright:   (c) 2002 - 2007
# Licence:     GPL
#-----------------------------------------------------------------------------
print 'importing Models.XMLSupport'

import wx

import Preferences, Utils, Plugins
from Utils import _

import EditorHelper
EditorHelper.imgXMLFileModel = EditorHelper.imgIdxRange()

from Models.EditorModels import PersistentModel


class XMLFileModel(PersistentModel):
    modelIdentifier = 'XML'
    defaultName = 'xml'
    bitmap = 'WebDocXML.png'
    imgIdx = EditorHelper.imgXMLFileModel
    ext = '.xml'


from Views.StyledTextCtrls import LanguageSTCMix, stcConfigPath

import EditorHelper, ErrorStack
from EditorModels import PersistentModel, SourceModel, EditorModel, BitmapFileModel

import relpath, sourceconst

# try to use new cProfile module
try:
    import cProfile
    prof = 'cProfile'
except ImportError:
    prof = 'profile'

(imgPyAppModel, imgModuleModel, imgPackageModel, imgSetupModel,
 imgPythonBinaryFileModel,
) = EditorHelper.imgIdxRange(5)

class SourcePseudoFile(Utils.PseudoFileOutStore):
    def readlines(self):
        return self.output

class ModuleModel(SourceModel):
    modelIdentifier = 'Module'
    defaultName = 'module'
    bitmap = 'Module.png'
    imgIdx = imgModuleModel
    ext = '.py'

    def __init__(self, data, name, editor, saved, app=None):
        self.app = app
        SourceModel.__init__(self, data, name, editor, saved)
Example #4
0
# Author:      Riaan Booysen
#
# Created:     2002/12/03
# RCS-ID:      $Id: ConfigSupport.py,v 1.11 2007/07/02 15:01:11 riaan Exp $
# Copyright:   (c) 2002 - 2007
# Licence:     GPL
#-----------------------------------------------------------------------------
print 'importing Models.ConfigSupport'

import wx

import Preferences, Utils, Plugins
from Utils import _

import EditorHelper
EditorHelper.imgConfigFileModel = EditorHelper.imgIdxRange()

from Models.EditorModels import SourceModel


class ConfigFileModel(SourceModel):
    modelIdentifier = 'Config'
    defaultName = 'config'
    bitmap = 'Config.png'
    imgIdx = EditorHelper.imgConfigFileModel
    ext = '.cfg'


from Views.StyledTextCtrls import LanguageSTCMix, stcConfigPath

Example #5
0
# Created:     2002
# RCS-ID:      $Id: CPPSupport.py,v 1.11 2007/07/02 15:01:11 riaan Exp $
# Copyright:   (c) 2002 - 2007
# Licence:     GPL
#-----------------------------------------------------------------------------
print 'importing Models.CPPSupport'

import os

import wx

import Preferences, Utils, Plugins
from Utils import _

import EditorHelper
EditorHelper.imgCPPModel = EditorHelper.imgIdxRange()

from Models.EditorModels import SourceModel
class CPPModel(SourceModel):
    modelIdentifier = 'CPP'
    defaultName = 'cpp'
    bitmap = 'Cpp.png'
    imgIdx = EditorHelper.imgCPPModel
    ext = '.cxx'

    def __init__(self, data, name, editor, saved):
        SourceModel.__init__(self, data, name, editor, saved)
        self.loadHeader()
        if data: self.update()

    def loadHeader(self):
Example #6
0
# Created:     2002
# RCS-ID:      $Id$
# Copyright:   (c) 2002 - 2007
# Licence:     GPL
#-----------------------------------------------------------------------------
print 'importing Models.CPPSupport'

import os

import wx

import Preferences, Utils, Plugins
from Utils import _

import EditorHelper
EditorHelper.imgCPPModel = EditorHelper.imgIdxRange()

from Models.EditorModels import SourceModel
class CPPModel(SourceModel):
    modelIdentifier = 'CPP'
    defaultName = 'cpp'
    bitmap = 'Cpp.png'
    imgIdx = EditorHelper.imgCPPModel
    ext = '.cxx'

    def __init__(self, data, name, editor, saved):
        SourceModel.__init__(self, data, name, editor, saved)
        self.loadHeader()
        if data: self.update()

    def loadHeader(self):
Example #7
0
#
# Created:     2002
# RCS-ID:      $Id: XMLSupport.py,v 1.10 2007/07/02 15:01:15 riaan Exp $
# Copyright:   (c) 2002 - 2007
# Licence:     GPL
# -----------------------------------------------------------------------------
print "importing Models.XMLSupport"

import wx

import Preferences, Utils, Plugins
from Utils import _

import EditorHelper

EditorHelper.imgXMLFileModel = EditorHelper.imgIdxRange()

from Models.EditorModels import PersistentModel


class XMLFileModel(PersistentModel):
    modelIdentifier = "XML"
    defaultName = "xml"
    bitmap = "WebDocXML.png"
    imgIdx = EditorHelper.imgXMLFileModel
    ext = ".xml"


from Views.StyledTextCtrls import LanguageSTCMix, stcConfigPath

# Author:      Riaan Booysen
#
# Created:     2002/12/03
# RCS-ID:      $Id: ConfigSupport.py,v 1.11 2007/07/02 15:01:11 riaan Exp $
# Copyright:   (c) 2002 - 2007
# Licence:     GPL
#-----------------------------------------------------------------------------
print 'importing Models.ConfigSupport'

import wx

import Preferences, Utils, Plugins
from Utils import _

import EditorHelper
EditorHelper.imgConfigFileModel = EditorHelper.imgIdxRange()

from Models.EditorModels import SourceModel

class ConfigFileModel(SourceModel):
    modelIdentifier = 'Config'
    defaultName = 'config'
    bitmap = 'Config.png'
    imgIdx = EditorHelper.imgConfigFileModel
    ext = '.cfg'


from Views.StyledTextCtrls import LanguageSTCMix, stcConfigPath
class ConfigSTCMix(LanguageSTCMix):
    def __init__(self, wId):
        LanguageSTCMix.__init__(self, wId, (), 'prop', stcConfigPath)