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

Change files, source files, delete files and item names #96

Closed aplteam closed 6 years ago

aplteam commented 6 years ago

Since I have recently released the ]CodeBrowser I'd come to realize how valuable such a tool is when it comes to code reviewing.

I want something similar for reviewing changes that are due to be committed. There is a problem however.

Where do I start from: obviously with the change files and the delete files, because anything that was deleted since I've started working is not available in APLSource\.

In order to create a source filename via the designated acre method I need the fully qualified name of the object in the APL workspace. But the itemname method requires a source filename as input, not a change filename or a delete filename.

I am stuck.

PaulMansour commented 6 years ago

Maybe not obviously from the change files if you are using git

Sent from my iPhone

On May 8, 2018, at 6:55 AM, APL Team Ltd notifications@github.com<mailto:notifications@github.com> wrote:

Since I have recently released the ]CodeBrowser I'd come to realize how valuable such a tool is when it comes to code reviewing.

I want something similar for reviewing changes that are due to be committed. There is a problem however.

Where do I start from: obviously with the change files and the delete files, because anything that was deleted since I've started working is not available in APLSource.

In order to create a source filename via the designated acre method I need the fully qualified name of the object in the APL workspace. But the itemname method requires a source filename as input, not a change filename or a delete filename.

I am stuck.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/the-carlisle-group/Acre-Desktop/issues/96, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AR3p_TZG7-ffwRAmIKECns7I5RfLc1ABks5twXmvgaJpZM4T2bsl.

aplteam commented 6 years ago

I've looked into it. I expected git to save the versions somewhere obvious. After that starting from the change files seemed to be very obvious ;)

I propose a method filename which takes the name of an APL object (which may or may not exist) and returns just the filename part (= no folder) without the type and without requiring any project to be open.

PhilLast commented 6 years ago

I'm not sure I understand what you want. Do you mean just the encoding from [say] alpha.Bravo.charley to alpha-0/Bravo-1/charley-0 as in a sourcefile or alpha-0.Bravo-1.charley-0 as in a changefile? Or their reverse? Or what?

aplteam commented 6 years ago

I want the name without the need for it to be part of an open APL project. "." or "/" I don't mind because they can converted with ease.

PhilLast commented 6 years ago

So do you mean just the name with the case codes added as quoted above?

PhilLast commented 6 years ago

Assuming that that is what you want how about a hook 'casecode' [say] that encodes and adds the case codes for an argument that doesn't contain any hyphens and decodes and removes them for one that does. So that extending the above example either would lead to other:

'alpha.Bravo.CHarley'       → 'alpha-0.Bravo-1.CHarley-3'
'alpha-0.bravo-1.charley-3' → 'alpha.Bravo.CHarley'
aplteam commented 6 years ago

That would do, yes.

PhilLast commented 6 years ago

Implemented