/** * {@inheritDoc} * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent) * */ public void updateSemanticModel(final IPropertiesEditionEvent event) { ArtifactIdentifier artifactIdentifier = (ArtifactIdentifier)semanticObject; if (ScoViewsRepository.ArtifactIdentifier.Properties.resourceName == event.getAffectedEditor()) { artifactIdentifier.setResourceName((java.lang.String)EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String)event.getNewValue())); } if (ScoViewsRepository.ArtifactIdentifier.Properties.baselinedLineCount == event.getAffectedEditor()) { artifactIdentifier.setBaselinedLineCount((EEFConverterUtil.createIntFromString(EcorePackage.Literals.EINT, (String)event.getNewValue()))); } if (ScoViewsRepository.ArtifactIdentifier.Properties.currentLineCount == event.getAffectedEditor()) { artifactIdentifier.setCurrentLineCount((EEFConverterUtil.createIntFromString(EcorePackage.Literals.EINT, (String)event.getNewValue()))); } }
/** * Process file revision * * @param fr file revision * @param ch commit history, already populated with artifact history records * @param monitor progress monitor */ private void processFileRevision(IFileRevision fr, CommitHistory ch, IProgressMonitor monitor) { String commitId = fr.getContentIdentifier(); String name = fr.getName(); int lineCount = getLineCount(fr, monitor); // create artifact identifier and add it to the existing commit ArtifactIdentifier ai = ScoFactory.eINSTANCE.createArtifactIdentifier(); ai.setCurrentLineCount(lineCount); ai.setResourceName(name); // add the resource revision identifier to the corresponding commit record ArtifactCommit ac = findCommit(ch, commitId); if (ac != null) { ac.getArtifactIdentifiers().add(ai); } else { CertWareLog.logWarning( String.format("%s %s", "Could not find commit for file", fr.getName())); } }