Hi Marcos,
The ProjectImpl class, line 897 show an example:
ExplorerEventAdaptor.getInstance().modelElementRemoved(obj);
The ExplorerEventAdaptor has a few functions you may use.
This is the way diagram additions/removals are handled currently in ArgoUML.
But the better way of course would be when the ExplorerEventAdaptor is
listening to events, and updates the Explorer on reception of such event.
This is set up in the constructor:
private ExplorerEventAdaptor() {
Configuration.addListener(Notation.KEY_USE_GUILLEMOTS, this);
Configuration.addListener(Notation.KEY_SHOW_STEREOTYPES, this);
ProjectManager.getManager().addPropertyChangeListener(this);
Model.getPump().addClassModelEventListener(this,
Model.getMetaTypes().getModelElement(), (String[]) null);
}
The method with events currently works for UML modelelements, project changes,
and Notation changes.
PS: I do not know how diagram name changes work - but they do...
Regards,
Michiel
----- Original Message -----
From: Marcos Aurélio
To: [email protected]
Sent: Wednesday, July 18, 2007 1:46 PM
Subject: [argouml-dev] Refreshing the explorer
Hi,
How do I refresh the explorer tree after changing something on the project?
I want to update the explorer tree when something changes in the profile
configuration... but it doesn't
work, I need to change the current view to something else and then back again
to see the updated tree
Thanks in advance,
maas
--
-
http://www.marcosaurelio.com
*1984 +2057
"Standard Portuguese is mostly a jewel for powerless middle-class careers
(journalists, teachers, writers, actors, etc.)" - wikipedia
------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.10.8/904 - Release Date: 16/07/2007
17:42