5

How can I change the current namespace focus to an entity in the Spring Roo console?

So, how can I move from

roo>

to

~.domain.Price roo>

and back?

Thanks for the answers in advance.

Cs.

bhagyas
  • 3,050
  • 1
  • 23
  • 21
cscsaba
  • 1,279
  • 3
  • 20
  • 31

1 Answers1

7

You can use the Roo Console command Focus

focus --class ~.domain.Price

and it would set the focus to the entity specified.

bhagyas
  • 3,050
  • 1
  • 23
  • 21
jbbarquero
  • 2,842
  • 2
  • 19
  • 17
  • 5
    and how do we change back to the root of the project? – chrismarx Sep 25 '12 at 14:48
  • if you have a look at [roo implementation](https://github.com/spring-projects/spring-roo/tree/dabf5e5c7cba05c79e3aeedb3ac48ae93800715f/addon-tailor/src/main/java/org/springframework/roo/addon/tailor/actions) around focus, you'll realize that there isn't any work around that concept. The reason is that you actually don't have to focus back on the root. Let say you're focused in class ClassA. Next you'll need to work on that class: already focused, work on another class: just focus in the other class, you want to do general stuff like json all: just do it, no matter if you're not focused on root – Chris Oct 29 '14 at 13:15
  • And if you finally insist on focusing back in the root, the fastest way I can think is `/q` for quit and `roo` for re-entering roo :) – Chris Oct 29 '14 at 13:16