protected void updateTimeStamp() { // If we have no underlying resource, it probably got deleted from right // underneath us; thus, there is nothing to update the time stamp for if (fUnderlyingResource == null) { return; } else if (fUnderlyingResource.getLocation() == null) { return; } updateTimeStamp(fUnderlyingResource.getLocation().toFile()); }
public boolean isInSync() { // If we have no underlying resource, it probably got deleted from right // underneath us; thus, the model is not in sync if (fUnderlyingResource == null) { return false; } else if (fUnderlyingResource.getLocation() == null) { return false; } return isInSync(fUnderlyingResource.getLocation().toFile()); }
public boolean isInSync() { IPath path = fFile.getLocation(); if (path == null) { return false; } return isInSync(path.toFile()); }
public boolean isInSync() { IPath path = fFile.getLocation(); if (path == null) { return false; } return isInSync(path.toFile()); }
@Override public boolean isInSync() { IPath path = fFile.getLocation(); return path == null ? false : isInSync(path.toFile()); }
private String computeTitlePath(IFileEditorInput editorInput) { IFile file = editorInput.getFile(); IPath location = file.getLocation(); if (location != null) { return location.toFile().toString(); } return null; }
public static String getLocationOSString(IFile file) { if (file != null) { IPath location = file.getLocation(); return location.toOSString(); } return null; }
public boolean isInSync() { if (fUnderlyingResource == null) return true; IPath path = fUnderlyingResource.getLocation(); if (path == null) return false; return super.isInSync(path.toFile()); }
public static String getLocationPortableString(IFile file) { if (file == null) { return ""; } return toPortableString(file.getLocation()); }
/** * @return */ public String getInstallLocation() { return fFile.getLocation().toOSString(); }
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { Iterator iterator= fSelection.iterator(); while (iterator.hasNext()) { IFile file= (IFile) iterator.next(); ProjectSetImporter.importProjectSet(file.getLocation().toString(), shell, monitor); } } });
public static IPath getBinaryProjectJARLocation(IProject aProject) { List sources = JemProjectUtilities.getLocalJARPathsFromClasspath(aProject); if (!sources.isEmpty()) { IPath path = (IPath) sources.get(0); return aProject.getFile(path).getLocation(); } return null; }
public boolean isDeleted(Object element) { if (element instanceof IFileEditorInput) { IFileEditorInput input= (IFileEditorInput) element; IPath path= input.getFile().getLocation(); if (path == null) return true; return !path.toFile().exists(); } return super.isDeleted(element); }
protected URI getTargetWsdlFileUri(String baseName) { IFolder wsdlFolder = getWsdlFolder(baseName); IFile wsdlFile = wsdlFolder.getFile(getWsdlFileName()); return wsdlFile.getLocation().toFile().toURI(); }
public String getInstallLocation() { // Ensure we have an underlying resource if (fUnderlyingResource == null) { return null; } IPath path = fUnderlyingResource.getLocation(); if(path == null) return null; return path.removeLastSegments(2).addTrailingSeparator().toOSString(); }
public IPath getLocation() { if (fEditorInput instanceof IFileEditorInput) { return ((IFileEditorInput) fEditorInput).getFile().getLocation(); } ILocationProvider locationProvider = fEditorInput.getAdapter(ILocationProvider.class); if (locationProvider != null) { return locationProvider.getPath(fEditorInput); } return null; }
static File getProgram(IContainer project) { IPath projectFile = ProjectFileAccessor.getProjectFile(project); String projectConfiguration = "Debug"; //$NON-NLS-1$ String[] frameworks = ProjectFileAccessor.getTargetFrameworks(project.getWorkspace().getRoot().getFile(projectFile).getLocation()); if (frameworks.length > 0) { return new File(project.getLocation().toFile().getAbsolutePath() + "/bin/" + projectConfiguration + "/" + frameworks[0] + "/" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + projectFile.removeFileExtension().addFileExtension("dll").lastSegment()); //$NON-NLS-1$ } return null; }
private AJProjectModel getModelFromName(IProject project, String name) { if (name.equals(CURRENT_BUILD)) { return AJModel.getInstance().getModelForProject(project); } IPath mapFile = project.getFile(name).getLocation(); AJProjectModel model = new AJProjectModel(project); boolean success = model.loadModel(mapFile); if (!success) { return null; } return model; }
@Override public boolean canConfigure(IProject project, Set<IPath> ignoredDirectories, IProgressMonitor monitor) { IFile manifestFile = PDEProject.getManifest(project); if (manifestFile != null && manifestFile.exists()) { for (IPath ignoredDirectory : ignoredDirectories) { if (ignoredDirectory.isPrefixOf(manifestFile.getLocation())) { return false; } } } return hasOSGiManifest(project); }
private IRegion getTarget() throws CoreException { JsonDocument doc = null; try { String content = DocumentUtils.getDocumentContent(file.getLocation()); doc = createDocument(); doc.set(content); } catch (IOException e) { return null; } return doc.getRegion(pointer); }