If <location> is not set, sets it based on the project data.
432381
def update_location(self, ps):
        """"""

        loc = ps.get('location')
        if not loc:
            loc = os.path.join(self.project().get('location'), self.name())
            ps = ps.add_raw(["<location>" + loc])

        return ps
687335
public void setLocation(float x, float y) {
		if (area != null) {
			area.setX(x);
			area.setY(y);
		}
	}
879047
def set_data_location(apps, schema_editor):
    """"""
    Data = apps.get_model('flow', 'Data')
    DataLocation = apps.get_model('flow', 'DataLocation')

    for data in Data.objects.all():
        if os.path.isdir(os.path.join(settings.FLOW_EXECUTOR['DATA_DIR'], str(data.id))):
            with transaction.atomic():
                # Manually set DataLocation id to preserve data directory.
                data_location = DataLocation.objects.create(id=data.id, subpath=str(data.id))
                data_location.data.add(data)

    # Increment DataLocation id's sequence
    if DataLocation.objects.exists():
        max_id = DataLocation.objects.order_by('id').last().id
        with connection.cursor() as cursor:
            cursor.execute(
                "ALTER SEQUENCE flow_datalocation_id_seq RESTART WITH {};".format(max_id + 1)
            )
260785
function (project) {
			if (project) {
				this._projectClient.getProjectLaunchConfigurations(project).then(function(launchConfigurations){
					if (project !== this._project) return;
					this._setLaunchConfigurations(launchConfigurations);
				}.bind(this));
			} else {
				this._setLaunchConfigurations(null);
			}
		}
606144
function (data, id) {
            if (!data || !this.projectPath) {
                return;
            }

            if (data[this.projectPath] && (data[this.projectPath][id] !== undefined)) {
                return data[this.projectPath][id];
            }
            return;
        }
947220
public void setLocal()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "setLocal", Boolean.valueOf(_hasLocal));

    _hasLocal = true;

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "setLocal");
  }
629878
private void iniProject(CmsUserSettings settings) {

        try {
            List<CmsProject> projects = OpenCms.getOrgUnitManager().getAllAccessibleProjects(
                m_cms,
                m_ou.getValue(),
                false);
            for (CmsProject project : projects) {
                m_project.addItem(project.getSimpleName());
            }
            m_project.setNewItemsAllowed(false);
            m_project.setNullSelectionAllowed(false);
            if (settings != null) {
                String projString = settings.getStartProject();
                if (projString.contains("/")) {
                    projString = projString.split("/")[projString.split("/").length - 1];
                }
                m_project.select(projString);
            } else {

                Iterator<?> it = m_project.getItemIds().iterator();
                if (m_project.containsId("Offline")) {
                    m_project.select("Offline");
                } else {
                    String p = (String)it.next();
                    while (p.equals(CmsProject.ONLINE_PROJECT_NAME) & it.hasNext()) {
                        p = (String)it.next();
                    }
                    m_project.select(p);
                }
            }
        } catch (CmsException e) {
            LOG.error("Unable to read projects", e);
        }
    }
474202
protected void setDefaultInfoWindowLocation(){
        int s = mOriginalPoints.size();
        if (s > 0)
            mInfoWindowLocation = mOriginalPoints.get(s/2);
        else
            mInfoWindowLocation = new GeoPoint(0.0, 0.0);
    }
318055
def set_properties_from_api_repr(self, resource):
        """"""
        self.name = resource.get("name")
        self.number = resource["projectNumber"]
        self.labels = resource.get("labels", {})
        self.status = resource["lifecycleState"]
        if "parent" in resource:
            self.parent = resource["parent"]
1016193
def _set_locations(self, element, indices, mode, complete=False):
        

        """
        boss = self.project.find_full_domain(self)
        element = self._parse_element(element=element, single=True)

        # Make sure label array exists in boss
        if (element+'.'+self.name) not in boss.keys():
            boss[element+'.'+self.name] = False

        # Check to ensure indices aren't already assigned
        if mode == 'add':
            if self._isa('geometry'):
                objs = self.project.geometries().keys()
            else:
                objs = self.project.physics().keys()
            for name in objs:
                if element+'.'+name in boss.keys():
                    if np.any(boss[element+'.'+name][indices]):
                        raise Exception('Given indices are already assigned ' +
                                        'to ' + name)

        # Find mask of existing locations (network indexing)
        mask = boss[element+'.'+self.name]
        # Update mask with new locations (either add or remove)
        if mode == 'add':
            mask = mask + boss._tomask(indices=indices, element=element)
        elif mode == 'drop':
            mask = mask * (~boss._tomask(indices=indices, element=element))
        # Change size of all arrays on self
        for item in self.keys(element=element, mode='all'):
            self.update({item: boss[item][mask]})
        # Update label array in network
        boss[element+'.'+self.name] = mask
        # Remove label from boss if ALL locations are removed
        if mode == 'drop':
            if ~np.any(boss[element+'.'+self.name]):
                if complete:
                    del boss[element+'.'+self.name]
                else:
                    boss[element+'.'+self.name] = False
386695
public void setProjectLocationURI(URI uri) {
		final IPath path = uri != null ? URIUtil.toPath(uri) : null;
		this.locationGroup.setLocation(path);
	}
340140
def set_data_location(self, current_extent, tag_location):  # pylint: disable=unused-argument
        # type: (int, int) -> None
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('Directory Record not yet initialized')

        self.new_extent_loc = current_extent
        if self.ptr is not None:
            self.ptr.update_extent_location(current_extent)
70904
public void setProjectsNotFound(java.util.Collection<String> projectsNotFound) {
        if (projectsNotFound == null) {
            this.projectsNotFound = null;
            return;
        }

        this.projectsNotFound = new java.util.ArrayList<String>(projectsNotFound);
    }
599041
protected void setDataSource(Session session, String dataSourceNew,
                                 boolean isReversedNew, boolean createFile) {

        if (getTableType() == Table.TEMP_TEXT_TABLE) {
            ;
        } else {
            session.getGrantee().checkSchemaUpdateOrGrantRights(
                getSchemaName().name);
        }

        dataSourceNew = dataSourceNew.trim();

        if (createFile
                && FileUtil.getDefaultInstance().exists(dataSourceNew)) {
            throw Error.error(ErrorCode.TEXT_SOURCE_EXISTS, dataSourceNew);
        }

        //-- Open if descending, direction changed, file changed, or not connected currently
        if (isReversedNew || (isReversedNew != isReversed)
                || !dataSource.equals(dataSourceNew) || !isConnected) {
            openCache(session, dataSourceNew, isReversedNew, isReadOnly);
        }

        if (isReversed) {
            isReadOnly = true;
        }
    }
900925
def set_project_filenames(self, recent_files):
        """"""
        if (self.current_active_project
                and self.is_valid_project(
                        self.current_active_project.root_path)):
            self.current_active_project.set_recent_files(recent_files)
1078464
public void setProjects(java.util.Collection<String> projects) {
        if (projects == null) {
            this.projects = null;
            return;
        }

        this.projects = new java.util.ArrayList<String>(projects);
    }
1252246
public void setProjects(java.util.Collection<Project> projects) {
        if (projects == null) {
            this.projects = null;
            return;
        }

        this.projects = new java.util.ArrayList<Project>(projects);
    }