Package org.eclipse.core.internal.properties.PropertyBucket

Examples of org.eclipse.core.internal.properties.PropertyBucket.PropertyEntry


  public synchronized Map getProperties(IResource target) throws CoreException {
    final Map result = new HashMap();
    tree.accept(new PropertyBucket.Visitor() {
      public int visit(Entry entry) {
        PropertyEntry propertyEntry = (PropertyEntry) entry;
        int propertyCount = propertyEntry.getOccurrences();
        for (int i = 0; i < propertyCount; i++)
          result.put(propertyEntry.getPropertyName(i), propertyEntry.getPropertyValue(i));
        return CONTINUE;
      }
    }, target.getFullPath(), BucketTree.DEPTH_ZERO);
    return result;
  }
View Full Code Here


    private void saveChanges(PropertyBucket bucket) throws CoreException {
      if (changes.isEmpty())
        return;
      // make effective all changes collected
      Iterator i = changes.iterator();
      PropertyEntry entry = (PropertyEntry) i.next();
      tree.loadBucketFor(entry.getPath());
      bucket.setProperties(entry);
      while (i.hasNext())
        bucket.setProperties((PropertyEntry) i.next());
      bucket.save();
    }
View Full Code Here

        bucket.setProperties((PropertyEntry) i.next());
      bucket.save();
    }

    public int visit(Entry entry) {
      PropertyEntry sourceEntry = (PropertyEntry) entry;
      IPath destinationPath = destination.append(sourceEntry.getPath().removeFirstSegments(source.segmentCount()));
      PropertyEntry destinationEntry = new PropertyEntry(destinationPath, sourceEntry);
      changes.add(destinationEntry);
      return CONTINUE;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.core.internal.properties.PropertyBucket.PropertyEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.