Activates the Component.

        :param engine: Engine to attach the Component to.
        :type engine: QObject
        :return: Method success.
        :rtype: bool
545548
def activate(self, engine):
        

        LOGGER.debug("> Activating '{0}' Component.".format(self.__class__.__name__))

        self.__engine = engine
        self.__settings = self.__engine.settings
        self.__settings_section = self.name

        self.activated = True
        return True
1192693
public Animation start(GVRAnimationEngine engine) {
        ((GVRAnimation) getAnimation()).start(engine);
        mIsRunning = true;
        return this;
    }
130525
def activate(name):
    
    if name in plugins:
        plugins[name].activate()
    else:
        raise Exception("plugin {} not found".format(name))
488178
def start(self):
        
        component = Component(self.config, self.handlers)
        component.run()
196408
public Context setEngine(Engine engine) {
        checkThread();
        if (engine != null) {
            if (template != null && template.getEngine() != engine) {
                throw new IllegalStateException("Failed to set the context engine, because is not the same to template engine. template engine: "
                        + template.getEngine().getName() + ", context engine: " + engine.getName()
                        + ", template: " + template.getName() + ", context: " + thread.getName());
            }
            if (parent != null && parent.getEngine() != engine) {
                parent.setEngine(engine);
            }
            if (this.engine == null) {
                setCurrent(engine.createContext(parent, current));
            }
        }
        this.engine = engine;
        return this;
    }
29261
public function setEngine($engine)
    {
        if ($this->isValidEngine($engine)) {
            $this->engine =& $engine;

            return true;
        }

        return false;
    }
712930
def activate(self, engine):
        

        LOGGER.debug("> Activating '{0}' Component.".format(self.__class__.__name__))

        self.__engine = engine
        self.__settings = self.__engine.settings
        self.__settings_section = self.name

        self.__default_script_editor_directory = os.path.join(self.__engine.user_application_data_directory,
                                                              Constants.io_directory,
                                                              self.__default_script_editor_directory)
        not foundations.common.path_exists(self.__default_script_editor_directory) and \
        os.makedirs(self.__default_script_editor_directory)
        self.__default_session_directory = os.path.join(
            self.__default_script_editor_directory, self.__default_session_directory)
        not foundations.common.path_exists(self.__default_session_directory) and os.makedirs(
            self.__default_session_directory)
        self.__default_script_editor_file = os.path.join(self.__default_script_editor_directory,
                                                         self.__default_script_editor_file)

        self.__console = code.InteractiveConsole(self.__engine.locals)

        self.activated = True
        return True
967440
public void activate() {
        GuiceBridge.getGuiceBridge().initializeGuiceBridge(locator);
        final GuiceIntoHK2Bridge guiceBridge = locator.getService(GuiceIntoHK2Bridge.class);
        guiceBridge.bridgeGuiceInjector(injector);
    }
902262
protected void activate(ComponentContext context) throws Exception {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(this, tc, "Activating");
        }

        processConfig(context.getProperties());

        SystemLogger.setLogService(logService);
    }
684774
public void setEnabled(boolean enabled) {
		if (enabled && engine == null) {
			return;
		}

		if (this.enabled != enabled) {
			this.enabled = enabled;
			this.changed = true;
		}
	}
1225544
def activateAndRaise(self):
        
        logger.debug("Activate and raising window: {}".format(self.windowNumber))
        self.activateWindow()
        self.raise_()
876317
def activate_user(self, user):
        
        if not user.active:
            user.active = True
            return True
        return False
1263403
public void activate(ComponentContext compcontext) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Activating " + this.getClass().getName());
        }
        INSTANCE.set(this);
    }
1146229
def __set_components(self, requisite=True):
        

        components = self.__components_manager.list_components()
        candidate_components = \
            getattr(set(components), "intersection" if requisite else "difference")(self.__requisite_components)
        deactivated_components = self.__settings.get_key("Settings", "deactivated_components").toString().split(",")
        candidate_components = \
            sorted(filter(lambda x: x not in deactivated_components, candidate_components), key=(components).index)

        for component in candidate_components:
            try:
                profile = self.__components_manager.components[component]
                interface = self.__components_manager.get_interface(component)

                setattr(self,
                        "_{0}__{1}".format(self.__class__.__name__, foundations.namespace.get_leaf(component, ".")),
                        interface)

                self.__splashscreen and self.__splashscreen.show_message(
                    "{0} - {1} | Activating {2}.".format(self.__class__.__name__, Constants.version, component))
                interface.activate(self)
                if profile.category in ("Default", "QObject"):
                    interface.initialize()
                elif profile.category == "QWidget":
                    interface.add_widget()
                    interface.initialize_ui()
            except Exception as error:
                if requisite:
                    message = "'{0}' Component failed to activate!\nException raised: {1}"
                    handler = umbra.reporter.system_exit_exception_handler
                else:
                    message = "'{0}' Component failed to activate, unexpected behavior may occur!\nException raised: {1}"
                    handler = umbra.reporter.base_exception_handler

                exception = manager.exceptions.ComponentActivationError(message.format(component, error))
                handler(exception)
1031875
def activate(self, key):
        
        url = self._base + 'user/activate'
        r = requests.get(url, params={
            'activation_key': key
        })
        r.raise_for_status()
901930
def _activate(self):
        """"""
        if six.callable(self.streamer):
            # If it's a function, create the stream.
            self.stream_ = self.streamer(*(self.args), **(self.kwargs))

        else:
            # If it's iterable, use it directly.
            self.stream_ = iter(self.streamer)
930141
def add_widget(self):
        

        LOGGER.debug("> Adding '{0}' Component Widget.".format(self.__class__.__name__))

        self.__engine.addDockWidget(Qt.DockWidgetArea(self.__dock_area), self)

        return True