Inspired by @mbien to setup for doing some jackpot (declarative refactoring) across all of NetBeans, I used two scripts to set up a project group with all the projects. Here they are in case someone might find them useful. They don't find gradle or maven projects (AFAIK). Run them like the following, given there's a nb-all group and you're in the directory

   <userdir>/config/Preferences/org/netbeans/modules/projectui/groups/

then do

   bash findproj | bash fixgroup nb-all.properties

When done there'll be a nb-all.properties.bak file. You can run the commands separately, for example to diff the list to a previous list.

-ernie

======= findproj

nb_parent=/ref/nb/src

set -e

Main() {
    cd $nb_parent
    find netbeans -type d -name nbproject \
        | grep -E -v "$(ignore_these)" \
        | sed -e 's/[^/]*$//' \
        | sort
}

ignore_these() {
    local zap="
        /test/
        /iDeviceNativeBinding/
        /libs.nbi.ant/
        /csl.api/anttask/
        /dlight.nativeexecution/tools/
        /javafx2.samples/
        /installer/
        /sample_src/
        /javafx2.samples/
        /java.examples/
        /copylibstask/
        /nbbuild/
        /nbi/engine/
        /nbi/infra/
        /samples_src/
        /languages.antlr/
        /javawebstart/
        /performance/
        /php.samples/
        /CordovaMapsSample/
        /cordovaprojectupdate/
        /ide/bcutil/
        /ide/libs.tomlj
        /ide/libs.truffleapi/
        /ide/libs.xerces/
        /classfile/closure/
        "
    local result=$(printf "|%s" $zap)
    # strip the leading '|'
    echo "${result:1}"
}

Main

======= fixgroup

group=$1
nb_parent=/ref/nb/src

set -e

mv $group $group.bak
grep -v '^path=' $group.bak > $group

{
    echo -n "path="
    while read proj; do echo -n "file:$nb_parent/$proj "; done
    echo
} >> $group


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to