Examples of GitModelObject


Examples of org.eclipse.egit.ui.internal.synchronize.model.GitModelObject

      GitSubscriberResourceMappingContext gitContext = (GitSubscriberResourceMappingContext) context;
      GitSynchronizeDataSet gsds = gitContext.getSyncData();
      GitSynchronizeData data = gsds.getData(resource.getProject());

      if (data != null) {
        GitModelObject object = null;
        try {
          object = GitModelObject.createRoot(data);
        } catch (IOException e) {
          Activator.logError(e.getMessage(), e);
        }

        if (object != null) {
          ResourceMapping rm = (ResourceMapping) object
              .getAdapter(ResourceMapping.class);
          return new ResourceMapping[] { rm };
        }
      }
    }
View Full Code Here

Examples of org.eclipse.egit.ui.internal.synchronize.model.GitModelObject

  }

  @Override
  public boolean contains(ResourceMapping mapping) {
    if (mapping.getModelProviderId().equals(getModelProviderId())) {
      GitModelObject obj = (GitModelObject) mapping.getModelObject();
      return obj.repositoryHashCode() == object.repositoryHashCode();
    }

    return false;
  }
View Full Code Here

Examples of org.eclipse.egit.ui.internal.synchronize.model.GitModelObject

        && adapterType == ResourceMapping.class)
      return GitObjectMapping.create((GitModelObject) adaptableObject);

    if (adaptableObject instanceof GitModelObject
        && adapterType == IResource.class) {
      GitModelObject obj = (GitModelObject) adaptableObject;

      if (obj instanceof GitModelBlob) {
        IResource res = ResourceUtil.getFileForLocation(obj
            .getLocation());
        if (res == null)
          res = root.getFile(obj.getLocation());

        return res;
      }

      if (obj instanceof GitModelTree) {
        IResource res = root.getContainerForLocation(obj.getLocation());
        if (res == null)
          res = root.getFolder(obj.getLocation());

        return res;
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.