waldo1001 / crs-al-language-extension

Make working with the (Dynamics NAV / 365) AL Language easier and more efficient.
MIT License
34 stars 43 forks source link

Question/Suggestion: Rename/Reorganize #193

Open lvanvugt opened 3 years ago

lvanvugt commented 3 years ago

The CRS: Rename - Current/All Files (and Reorganize) command can be configured in the settings.json like

    "CRS.ObjectNamePrefix": "PRE",
    "CRS.FileNamePattern": "<ObjectNameShort>.<ObjectTypeShortPascalCase>.al",
    "CRS.FileNamePatternExtensions": "<ObjectNameShort>.<ObjectTypeShortPascalCase>.al",
    "CRS.ExtensionObjectNamePattern": "",
    "CRS.RemovePrefixFromFilename": true

This allows me to configure the rules for the naming of the file(s), but can we also configure the folder structure applied (structure and naming)? If not possible, I would like to suggest this to be added. A couple of examples of folder structures I would like the Rename/Reorganize be able to configure

Example 1

<src folder>
    |_ <feature 1 folder>
        |_ <codeunit folder>
        |_ <page folder>
    |_ <feature 2 folder>
        |_ <codeunit folder>
        |_ <page folder>

Example 2

<feature 1 folder>
    |_ <src folder>
        |_ <codeunit folder>
        |_ <page folder>
<feature 2 folder>
    |_ <src folder>
        |_ <codeunit folder>
        |_ <page folder>

Advantages

waldo1001 commented 3 years ago

Hi Luc,

It's how we structure our code a well - but - how do you know which are the features .. and how to put one file in a certain feature folder?

lvanvugt commented 3 years ago

Logical question.

A couple of thoughts (not logically ordered):

I think we can come up with a usable/robust scenario.

waldo1001 commented 3 years ago

Hm 🤔.

So .. in stead of dragging/dropping one-by-one in the right folder .. i'd have to add a feature tag into the file .. one-by-one. I don't see the gain, really.

We could take it offline and talk about this ;-)