Example #1
0
#  This program is distributed in the hope that it will be useful,       #
#  but WITHOUT ANY WARRANTY; without even the implied warranty of        #
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the          #
#  GNU General Public License for more details.                          #
#                                                                        #
#  You should have received a copy of the GNU General Public License     #
#  along with this program. If not, see <http://www.gnu.org/licenses/>.  #
#                                                                        #
##########################################################################

import os

from eddy import VERSION, APPNAME
from eddy.core.application import main
from eddy.core.output import getLogger
from eddy.core.plugin import PluginManager

LOGGER = getLogger()

if __name__ == '__main__':
    try:
        # SCAN FOR PLUGIN
        PluginManager.scan(
            os.path.abspath(
                os.path.normpath(os.path.join(os.curdir, os.pardir))))
        # START EDDY
        LOGGER.info('Starting {} {}'.format(APPNAME, VERSION))
        main()
    except Exception as e:
        LOGGER.exception(e)
Example #2
0
 def __exit__(self, exc_type, exc_val, exc_tb):
     if not self.nested:
         Logger = getLogger()
         Logger.disabled = False
         LoggingDisabled.DISABLED = False
Example #3
0
from eddy.core.datatypes.owl import OWLProfile
from eddy.core.exporters.common import AbstractDiagramExporter
from eddy.core.exporters.common import AbstractProjectExporter
from eddy.core.loaders.common import AbstractDiagramLoader
from eddy.core.loaders.common import AbstractProjectLoader
from eddy.core.functions.misc import isEmpty
from eddy.core.functions.signals import connect
from eddy.core.output import getLogger
from eddy.core.profiles.common import AbstractProfile
from eddy.core.worker import AbstractWorker

from eddy.ui.notification import Notification


LOGGER = getLogger(__name__)


class HasActionSystem(object):
    """
    Mixin which adds the ability to store and retrieve actions.
    """
    def __init__(self, **kwargs):
        """
        Initialize the object with default parameters.
        :type kwargs: dict
        """
        super().__init__(**kwargs)
        self._actionDict = {}
        self._actionList = []
Example #4
0
 def __enter__(self):
     if not self.nested:
         Logger = getLogger()
         Logger.disabled = True
         LoggingDisabled.DISABLED = True