Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Persistent Properties map empty(I get the persistent properties map of a resource, but it is empty)
Persistent Properties map empty [message #802101] Sun, 19 February 2012 06:59
Kristof Ujfalussy is currently offline 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.
Previous Topic:Best option for automated plugin testing?
Next Topic:ContentAssistant and partitioned documents
Goto Forum:
  


Current Time: Tue Jul 22 03:28:39 EDT 2014

Powered by FUDForum. Page generated in 0.01577 seconds