How to get the "current selected change-list" (not the default one)?
Hi all,
I'm building a plugin that involves analyzing a version control change-list (or rather - a collection of Change events).
Everything works well as long as I'm content in using the default change list, which I can get by
final DataContext dataContext = DataManager.getInstance().getDataContext();
final Project project = DataKeys.PROJECT.getData(dataContext);
final ChangeListManager manager = ChangeListManager.getInstance(project);
final Collection<Change> changes = manager.getDefaultChangeList().getChanges();
How can I get the "current selected" change-list instead?
Note - I'm working inside an "action", so I have access to the action event object.
Thanks,
Ran.
请先登录再写评论。
Hello Ran,
This changelist is in fact the active changelist. The method name is confusing
here.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Dmitry,
I know it's the current change list - I want the "selected" change list (the one I've right-clicked on, not the "active" one).
Thanks,
Ran.
Hello Ran,
e.getData(VcsDataKeys.CHANGE_LISTS)
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Works perfectly.
Thanks.
Ran.