The view from noobies-ville:
While setting up a new roo project in STS, using the Roo Shell window (in STS) to enter fields to my UserId entity,
I realized I had mistyped the package name.
No problem, I used refactor->rename to correct that: com.old.pkg->com.new.pkg
and Eclipse appears all happy; but roo complains that it cannot find my code when i try to add the next field.
Its exact words were:
Apparently, for roo "~" still refers to com.old.pkg,
field string --fieldName fullName --class ~.domain.UserId
Java source code unavailable for type SRC_MAIN_JAVA/com.old.pkg.domain.UserId
but I can find no incantation to change this association. (cd com.newpkg)?
I had rather expected that the omniscient roo would figure this out,
or STS would explain it to roo, or I could use help or hint to find how to do this.
I figure if I could stop roo and restart it, that might help,
but I fear to exit roo, or X the Roo Shell window without knowing how to restart/reopen it.
The docs indicate that "~" is set by project creation, but i don't want to create a new project.
After some digging, I managed to put a --class com.newpkg.domain.UserId on my next field definition
[with *no* help from hint or CTRL-SPACE to suggest this argument (your tutorial/blog saved the day)]
Even now, "~" is still com.oldpkg, so my prompt now shows the longer com.newpkg....domain.UserId roo>
Perhaps the "Java source code unavailable" exception could
encourage roo to suggest the --class arg on the next field?
or is there a way for the roo plugin to listen for the refactor-rename?
[Alas, I tried "roo> quit", and indeed the friendly link to "open roo shell for projects..." is gone.]
[ok, finally found Window->show view->Roo Shell; oops must X the existing Roo Shell first...
maybe roo could close that on it way out?]
Even so, "~" is still does not refer to com.new.pkg...
Can someone tell a poor noob how to reset "~"?
Edit: I edited my pom.xml to update the groupId; roo now appears to be using that as "~"
RFE: If roo/STS relies on mvn to keep this state, maybe refactor can push the rename into pom.xml automagically?