@Override public String getValue(String variable, IResource resource) { IContainer parent = resource.getParent(); if (parent != null) { URI locationURI = parent.getLocationURI(); if (locationURI != null) return locationURI.toASCIIString(); } return null; } }
@Override public String getValue(String variable, IResource resource) { IContainer parent = resource.getParent(); if (parent != null) { URI locationURI = parent.getLocationURI(); if (locationURI != null) return locationURI.toASCIIString(); } return null; } }
@Override public String getValue(String variable, IResource resource) { IContainer parent = resource.getParent(); if (parent != null) { URI locationURI = parent.getLocationURI(); if (locationURI != null) return locationURI.toASCIIString(); } return null; } }
/** * Constructs a source container on the given workspace container. * * @param container the container to search for source in * @param subfolders whether nested folders should be searched * for source elements */ public ContainerSourceContainer(IContainer container, boolean subfolders) { fContainer = container; fSubfolders = subfolders; fRootURI = fContainer.getLocationURI(); if (fRootURI != null) { try { fRootFile = EFS.getStore(fRootURI); } catch (CoreException e) { } fRoot = ResourcesPlugin.getWorkspace().getRoot(); } }
public void store () throws IOException, CoreException { logger.debug ( "Store model - documentRoot: {}, uri: {}", this.documentRoot, this.uri ); URI uri = URI.createURI ( this.uri ); if ( this.output != null ) { final URI base = URI.createURI ( this.output.getLocationURI ().toString () + "/" ); uri = uri.resolve ( base ); logger.debug ( "Resolved URI: {} using container ({})", uri, this.output.getLocationURI () ); } else if ( this.documentRoot != null ) { final URI base = URI.createURI ( this.documentRoot ); uri = uri.resolve ( base ); logger.debug ( "Resolved URI: {}", uri ); } final ModelWriter writer = new ModelWriter ( this.model ); writer.store ( uri ); if ( this.output != null ) { this.output.refreshLocal ( 1, this.monitor != null ? this.monitor : new NullProgressMonitor () ); } } }
URI location= parent.getLocationURI(); if (location != null) { IFileInfo info= EFS.getStore(location).fetchInfo();
URI location= parent.getLocationURI(); if (location != null) { IFileInfo info= EFS.getStore(location).fetchInfo();
URI location= parent.getLocationURI(); if (location != null) { IFileInfo info= EFS.getStore(location).fetchInfo();
private IFileInfo fetchInfo(IContainer parent, IFileInfo fileInfo) { IFileStore fileStore; try { fileStore = EFS.getStore(parent.getLocationURI()); } catch (CoreException e) { return fileInfo; } IFileStore store = fileStore.getChild(fileInfo.getName()); return store.fetchInfo(); } }
docroot = containerLocation.toString(); else if (container.getLocationURI() != null) { docroot = container.getLocationURI().toString();
this.name = container.getName(); if (container.isLinked()) { this.location = container.getLocationURI();
IFileStore destinationStore; try { destinationStore = EFS.getStore(destination.getLocationURI()); } catch (CoreException exception) { IDEWorkbenchPlugin.log(exception.getLocalizedMessage(), exception);
URI destinationLocation = destination.getLocationURI(); for (int i = 0; i < sourceResources.length; i++) { IResource sourceResource = sourceResources[i];
/** * Create a ContainerDescription from the specified container handle. Typically used when the * container handle represents a resource that actually exists, although it will not fail if the * resource is non-existent. * * @param container the container to be described */ public ContainerDescription(IContainer container) { super(container); this.name = container.getName(); if (container.isLinked()) { this.location = container.getLocationURI(); } try { if (container.isAccessible()) { defaultCharSet = container.getDefaultCharset(false); IResource[] resourceMembers = container.members(); members = new AbstractResourceDescription[resourceMembers.length]; for (int i = 0; i < resourceMembers.length; i++) { members[i] = (AbstractResourceDescription) ResourceDescription.fromResource(resourceMembers[i]); } } } catch (CoreException e) { // Eat this exception because it only occurs when the resource // does not exist and we have already checked this. // We do not want to throw exceptions on the simple constructor, as // no one has actually tried to do anything yet. } }
this.name = container.getName(); if (container.isLinked()) { this.location = container.getLocationURI();
this.name = container.getName(); if (container.isLinked()) { this.location = container.getLocationURI();
URI parentLocation= parent.getLocationURI(); if (parentLocation != null) { try {
URI parentLocation= parent.getLocationURI(); if (parentLocation != null) { try {
URI parentLocation= parent.getLocationURI(); if (parentLocation != null) { try {
return false; if (container.getLocationURI() == null) { if (container.isLinked()) { setErrorMessage(IDEWorkbenchMessages.WizardImportPage_undefinedPathVariable);