Persistent Properties map empty [message #802101] |
Sun, 19 February 2012 11:59 |
Kristof Ujfalussy Messages: 1 Registered: February 2012 |
Junior Member |
|
|
Hi,
I am trying to develop a plugin that generates various documents based on the SVN properties of selected files. It's quite simple, what I'm looking for is stuff you can find under in the files' properties window in the Subversion section. I'm guessing these would be in the PersistentProperties map of the resource. I am trying to get this by having a menu item when you right click the resource and assigning a handler to it. I have the menu and the Handler class, I get the resources fine. In the handler I use the following code:
public Object execute(ExecutionEvent event) throws ExecutionException {
IStructuredSelection selection = (IStructuredSelection) HandlerUtil
.getActiveMenuSelection(event);
if (selection != null) {
IStructuredSelection strucSelection = (IStructuredSelection) selection;
for (Iterator<Object> iterator = strucSelection.iterator(); iterator
.hasNext();) {
Object element = iterator.next();
// if (element instanceof IResource) {
IResource resource = (IResource)element;
try {
Map props = resource.getPersistentProperties();
//...
My problem is that this props map containing the persistent properties is empty. Why could this be? Also, if that's supposed to be, how can I access the subversion properties of a resource? I am using Eclipse Helios.
|
|
|
Powered by
FUDForum. Page generated in 0.03029 seconds