eljoujat / eclipseimpexeditor

Unofficial Eclipse plugin for SAP CX
Apache License 2.0
15 stars 3 forks source link

Formatting by HeaderColumns #14

Open denislutz opened 8 years ago

denislutz commented 8 years ago

Hi,

thanks for your great work.

I think what would tremendously simplify impex work is proper formatting by columns, I usually do it with sublime text but it would be great to have it as standart part of your editor.

So here is how it would work: you just align all by the header column. But this happens for EACH TYPE. If a type is having a specifically long header it does not affect the other types inside impex. This is what you can see in the example below.

#INSERT PRODUCTS
INSERT_UPDATE Product ; code[unique=true]  ; name[lang=en] ; description[lang=en] ; manufacturerName  ; ean   ; catalogVersion(catalog(id), version) ; unit(code)[default=pieces] ;
                      ; product_identifier ; Product Name  ; Description          ; Manufacturer Name ; 12345 ; sampleProductCatalog:Staged          ; pieces                     ; approved ; us-vat-full

#PRICE
INSERT_UPDATE PriceRow ; product(code,catalogversion(catalog(id),version))[unique=true] ; currency(isocode)[unique=true] ; unit(code)
                       ; product_identifier:sampleProductCatalog:Staged                 ; US                             ; pieces     ;

Finally if you have this feature, I would like to be able to select all impex files in a project and realign them that way in one bunch. But this is nice to have.

eljoujat commented 8 years ago

:+1:

eljoujat commented 8 years ago

Hi,

YES !! it's with no doubt a very useful feature, and a must have , i will work on it ASAP, and try to make it on the next release .

Thanks

denislutz commented 8 years ago

Excellent, thank you!

denislutz commented 8 years ago

Further more, you could split up the macros area by the '=' sign like this


$catalogVersion     = catalogVersion(catalog(id[default = $productCatalog]),version[default = 'Staged'])[unique = true,default = $productCatalog:Staged]
$supercategories    = supercategories(code, $catalogVersion)
$baseProduct        = baseProduct(code,$catalogVersion)
$approved           = approvalstatus(code)[default = 'approved']
denislutz commented 8 years ago

Just FYI: I took a look at this plugin https://code.google.com/archive/p/csvedit/downloads which provide decent csv features, may be you can find something useful there.

What I definitely like here is how the csv noise is reduced by creating a pure columns view without modifications on the text level and only a value change in some cell will insert a version change in impex.

eljoujat commented 8 years ago

Great ! I downloaded the code source i found some interesting features that could help. Thanks

eljoujat commented 8 years ago

A new version with formatting feature is released