OSDN Git Service
ADT/GLE: Cleaned up the open/replace file process in the GLE and the config composite
The GLE and the config composite must handle 3 cases:
- new file opened following the creation of the editor
- replacement file when the user opens a different version of a layout
that's already opened. The editor stays and switch to the new file.
- replacement file whne the user change the configuration and a new
file that better matches the config is automicatlly opened.
Additionally, the editor/config composite must handle files being
opened while the SDK or the file's project's target are not yet
loaded.
File change or change in the SDK/Target must attempts to keep the
config/theme selection as close as possible as the previous state
while still remaining compatible with the new file/sdk/target.
Also removed the duplicate ITargetChangeListener, by making the
one in AndroidEditor optional (constructor flag), so that the
one in GraphicalLayoutEditor/Part is the only one used in the GLE
(it gives us more control on the order in which the code previously
executed by both listeners is now executed).
Also split the themes and locales updates as they happen on
different triggers.
Change-Id: If6d73bbe8af11cd221fb7830a37ffcc163135fc4