Esempio n. 1
0
	def get_project(window):
		project_settings = Settings.project(window)
		if project_settings is False:
			return False

		project_folder = get_project_folder(window)
		project = ProjectCache.get(project_folder)
		if project is None:
			project = ProjectManager.ProjectConstructor(window, project_folder, project_settings, ProjectManager.ffp_settings)
			ProjectCache[project_folder] = project

		return project
Esempio n. 2
0
	def activate_project(window):
		if ProjectManager.active:
			# fetch project
			ProjectManager.current_project = ProjectManager.get_project(window)
			CurrentFile.evaluate_current(window.active_view(), ProjectManager.get_current_project())

			if ProjectManager.has_current_project():
				# update project settings
				project_settings = Settings.project(window)
				ProjectManager.get_current_project().update_settings(ProjectManager.ffp_settings, project_settings)
				verbose(ID, "activate project", ProjectManager.get_current_project().get_directory())
		else:
			verbose(ID, "this is not a project")