Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
closes #150 - Team Provider update fails for modify
  • Loading branch information
jutzig committed Dec 19, 2013
1 parent cdc0c39 commit 41b51f3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Expand Up @@ -110,7 +110,7 @@ public void fullScan(ScanConfiguration configuration, IProgressMonitor monitor)
getChildren().clear();
setTemplate(null);
WorkspaceScanner scanner = new WorkspaceScanner();
File baseDir = new File(absolutPath().toFileString()).getAbsoluteFile();
File baseDir = new File(absolutPath().path()).getAbsoluteFile();
SubMonitor subMonitor = SubMonitor.convert(monitor, "Scanning", 100);
PropertyScanner propertyScanner = PropertyResourceUtil.createScanner(this);
scanner.fullScan(new FullScanFileAcceptor(this, propertyScanner, configuration), baseDir, propertyScanner, configuration,
Expand Down Expand Up @@ -145,7 +145,7 @@ public void partialScan(ScanConfiguration configuration, PropertyFileDiff fileDi
// translated files won't make it through the scanner
PropertyScanner propertyScanner = PropertyResourceUtil.createScanner(this);
WorkspaceScanner scanner = new WorkspaceScanner();
File baseDir = new File(absolutPath().toFileString()).getAbsoluteFile();
File baseDir = new File(absolutPath().path()).getAbsoluteFile();
// in case of a remove, the new path doesn't exist anymore
String filePath = fileDiff.getKind() == DiffKind.REMOVE ? fileDiff.getOldPath() : fileDiff.getNewPath();
File singleFile = new File(baseDir, filePath);
Expand Down Expand Up @@ -286,7 +286,7 @@ public Resolvable resolveChild(URI path) {

protected PropertyFileDescriptor findDescriptor(URI path) {
PropertyScanner scanner = PropertyResourceUtil.createScanner(this);
Locale variant = scanner.getLocale(new File(path.toFileString()));
Locale variant = scanner.getLocale(new File(path.path()));

ProjectLocale locale = variant == null ? getTemplate() : getProjectLocale(variant);
if (locale == null)
Expand Down
Expand Up @@ -193,7 +193,7 @@ public PropertyFile loadProperties() {
} catch (FileNotFoundException e)
{
//The file does not exist, create a new one.
logger.debug("Tried to load non-existing property file. Path: {}", path.toFileString());
logger.debug("Tried to load non-existing property file. Path: {}", path.path());
return PropertiesFactory.eINSTANCE.createPropertyFile();
}
catch (IOException e) {
Expand Down
Expand Up @@ -107,7 +107,7 @@ public static void addNewTemplateDescriptor(PropertyFileDescriptor descriptor, P
translatedDescriptor.setLocation(derivedLocation);
translatedDescriptor.setName(derivedLocation.lastSegment());
translatedDescriptor.setMaster(descriptor);
if(new File(translatedDescriptor.absoluteFilePath().toFileString()).isFile())
if(new File(translatedDescriptor.absoluteFilePath().path()).isFile())
{
// load file to initialize statistics;
PropertyFile translatedFile = translatedDescriptor.loadProperties();
Expand Down Expand Up @@ -256,7 +256,7 @@ public static URI computeLocaleResourceLocation(Locale locale, ProjectVersion ve

PropertyScanner scanner = createScanner(version);
URI parentPath = version.absoluteFilePath();
File path = scanner.computeTranslationPath(new File(parentPath.toFileString()+templateLocation.toString()), version.getTemplate().getLocale(), locale);
File path = scanner.computeTranslationPath(new File(parentPath.path()+templateLocation.toString()), version.getTemplate().getLocale(), locale);

URI location = URI.createFileURI(path.getAbsolutePath());
URI trimmedLocation = URI.createURI(location.segment(parentPath.segmentCount()));
Expand Down
Expand Up @@ -73,7 +73,7 @@ public class GitTeamProvider implements TeamProvider {

private Repository createRepository(ProjectVersion project) throws IOException {
FileRepositoryBuilder builder = new FileRepositoryBuilder();
File gitDir = new File(project.absolutPath().toFileString());
File gitDir = new File(project.absoluteFilePath().path());
Repository repository = builder.setGitDir(new File(gitDir,".git")).build();
return repository;
}
Expand Down Expand Up @@ -168,7 +168,7 @@ private PropertyFileDiff convertDiffEntry(DiffEntry diffEntry) {
break;
case RENAME:
kind = DiffKind.MOVE;
break;
break;
}
diff.setKind(kind);
return diff;
Expand All @@ -188,7 +188,7 @@ public void checkout(ProjectVersion project, IProgressMonitor monitor) throws Te
SubMonitor subMon = SubMonitor.convert(monitor, 100);
subMon.setTaskName("Checking out");
subMon.worked(20);
File repoDir = new File(project.absolutPath().toFileString());
File repoDir = new File(project.absoluteFilePath().path());
CloneCommand clone = Git.cloneRepository();
clone.setBare(false);
clone.setNoCheckout(false);
Expand Down

0 comments on commit 41b51f3

Please sign in to comment.