the-carlisle-group / Acre-Desktop

A simple Dyalog APL IDE plugin that introduces "projects" and allows you to keep your source code in Unicode text files.
MIT License
11 stars 1 forks source link

Best way to translate file system path to workspace path without an open project #170

Closed norberturkiewicz closed 5 years ago

norberturkiewicz commented 5 years ago

Phil,

API itemname translates with an open project. What is the best way to translate filepaths to case converted paths or ws path?

TestLibrary-11/Activation-1/CreateHashStoreFunction-8441.aplf
TestLibrary-11/Activation-1/IsAuthorized-5.aplf              
TestLibrary-11/Activation-1/RunLicensing-9.aplf              
TestLibrary-11/Activation-1/RunWizard-9.aplf                 
TestLibrary-11/Activation-1/StartLibrary-21.aplf 

I need to query function names from other projects to remotely launch tests via command line parameter. Tests are individual functions in a know parent folder.

PhilLast commented 5 years ago

Below is as far as we could take it with the above argument.

TestLibrary.Activation.CreateHashStoreFunction 
TestLibrary.Activation.IsAuthorized 
TestLibrary.Activation.RunLicensing 
TestLibrary.Activation.RunWizard 
TestLibrary.Activation.StartLibrary 

If the path begins with aplsource/ or contains /aplsource/ (case-agnostic and with either "/\")` we can truncate after that but of course we can't prefix it with the project space as we can't know it without the project's being open.

I'll implement that anyway for any path not recognised as being in a tracked project. It'll be easy to distinguish the result because it won't begin with #..

PhilLast commented 5 years ago

I didn't mention it but I mean as an enhancement to ⎕SE.acreAPI.itemname.

norberturkiewicz commented 5 years ago

Below is as far as we could take it with the above argument.

TestLibrary.Activation.CreateHashStoreFunction 
TestLibrary.Activation.IsAuthorized 
TestLibrary.Activation.RunLicensing 
TestLibrary.Activation.RunWizard 
TestLibrary.Activation.StartLibrary 

If the path begins with aplsource/ or contains /aplsource/ (case-agnostic and with either "/\")` we can truncate after that but of course we can't prefix it with the project space as we can't know it without the project's being open.

I'll implement that anyway for any path not recognised as being in a tracked project. It'll be easy to distinguish the result because it won't begin with #..

This works.

PhilLast commented 5 years ago

Implemented by commit 5.0.14+179