devonfw / ide

Tool to automate setup and update of development environment (esp. for Java projects).
Apache License 2.0
33 stars 101 forks source link

#1194 Integrate url-updater and configurator into ide #1280

Closed CREITZ25 closed 1 year ago

CREITZ25 commented 1 year ago

1194 Integrate url-updater and configurator into ide

CREITZ25 commented 1 year ago
  1. move the code from url-updater into ide, delete url-updater folder and module from top-level POM

find ./url-updater/src/ -type d -print | awk '{printf"mkdir %s\n", $0}' | awk 'sub(/url-updater/,"ide",$2) {print}' >./mydir ./mydir find ./url-updater/src/ -type f -print | awk '{printf"git mv %s %s\n", $0, $0}' | awk 'sub(/url-updater/,"ide",$4) {print}' >./myscript ./myscript

Delete from pom.xml: \<module>url-updater\</module>

  1. copy the code from configurator into ide (we do not want to touch/break the existing configurator so at any point in time the current devonfw-ide-scripts release is still fully functional. You can also create a maven dependency to configurator instead of copying the code, if you prefer)

find ./configurator/src/ -type d -print | awk '{printf"mkdir %s\n", $0}' | awk 'sub(/configurator/,"ide",$2) {print}' >./mydir ./mydir find ./configurator/src/ -type f -print | awk '{printf"cp %s %s\n", $0, $0}' | awk 'sub(/configurator/,"ide",$3) {print}' >./myscript ./myscript

Adding from url-updater/pom.xml to ide/pom.xml (configurator/pom.xml already in url-updater/pom.xml)

  1. Integrate the configurator into a Java Eclipse commandlet that allows to trigger the ws-update feature.

Configurator Test:

  1. Edit file "org.eclipse.compare.prefs" in directory "${DEVON_IDE_HOME}/workspaces/main/.metadata/.plugins/org.eclipse.core.runtime/.settings"
  2. Change Value "org.eclipse.compare.IgnoreWhitespace=true" to "org.eclipse.compare.IgnoreWhitespace=false"
  3. cat "${DEVON_IDE_HOME}/settings/eclipse/workspace/update/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.compare.prefs -> org.eclipse.compare.IgnoreWhitespace=true
  4. devon eclipse ws-reverse
  5. cat "${DEVON_IDE_HOME}/settings/eclipse/workspace/update/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.compare.prefs -> org.eclipse.compare.IgnoreWhitespace=false

ws-reverse has worked!

  1. Build a native image of the result and test if this works with GraalVM

  2. Adapt the github action that runs the url-updater accordingly (1. build ide instead of url-updater, 2. explicitly specify the main class as the new default main class will become our new Java CLI).

edit file update-urls.yml change "cd url-updater" to "cd ide"