当前位置 : 主页 > 网络编程 > 其它编程 >

org.eclipse.core.resources.IFile.getProjectRelativePath()方法的使用及代码示例

来源:互联网 收集:自由互联 发布时间:2023-07-02
本文整理了Java中org.eclipse.core.resources.IFile.getProjectRelativePath()方法的一些代码示例,展示了 本文整理了Java中org.eclipse.core.resources.IFile.getProjectRelativePath()方法的一些代码示例,展示了IFil
本文整理了Java中org.eclipse.core.resources.IFile.getProjectRelativePath()方法的一些代码示例,展示了

本文整理了Java中org.eclipse.core.resources.IFile.getProjectRelativePath()方法的一些代码示例,展示了IFile.getProjectRelativePath()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IFile.getProjectRelativePath()方法的具体详情如下:包路径:org.eclipse.core.resources.IFile类名称:IFile方法名:getProjectRelativePath

IFile.getProjectRelativePath介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

@Overridepublic IPath getProjectRelativePath() { if (this.resource == null) return null; returnthis.resource.getProjectRelativePath();}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

public IPath getProjectRelativePath() { if (this.resource == null) return null; returnthis.resource.getProjectRelativePath();}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

public IPath getProjectRelativePath() { if (this.resource == null) return null; returnthis.resource.getProjectRelativePath();}

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.ejb

private boolean isMetaFile(IFile file) { String segment = file.getProjectRelativePath().toString(); return ProjectUtilities.DOT_CLASSPATH.equals(segment) || ProjectUtilities.DOT_PROJECT.equals(segment) || ".runtime".equals(segment) || segment.endsWith(IModuleConstants.COMPONENT_FILE_NAME) || segment.startsWith(".settings"); //$NON-NLS-1$ }

代码示例来源:origin: org.eclipse.platform/org.eclipse.team.core

private String getMetaFileType(IFile file) { for (Iterator iter = metaFilePaths.keySet().iterator(); iter.hasNext();) { String id = iter.next(); IPath[] paths = metaFilePaths.get(id); for (int i = 0; i

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee

public InputStream getInputStream(IArchiveResource archiveResource) throws IOException, FileNotFoundException { IFile file = pathsToIFiles.get(archiveResource.getPath()); if (file != null) { try { return file.getContents(); } catch (CoreException core) { throw new IOException("Unable to get contents from " + file.getProjectRelativePath() + " message " + core.getLocalizedMessage()); } } throw new FileNotFoundException(archiveResource.getPath().toString());}

代码示例来源:origin: cbeust/testng-eclipse

/** * Suite file launcher. The IFile must exist in the workbench. */public static void launchSuiteConfiguration(IFile suiteFile, String mode, ILaunchConfiguration prevConfig, Set failureDescriptions) { final IProject project= suiteFile.getProject(); final String fileCOnfName= suiteFile.getProjectRelativePath().toString().replace('/', '.'); final String suitePath= suiteFile.getLocation().toOSString(); launchSuiteConfiguration(project, fileConfName, suitePath, mode, prevConfig, failureDescriptions);}

代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui

private String getRelativePath(IClasspathEntry cpe, IProject project) { IPath path = project.getFile(cpe.getPath()).getProjectRelativePath(); return path.removeFirstSegments(1).toString();}

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee

protected IPath getProjectRelativePath(IArchiveResource aFile) { if (null != nonStandardSourceFiles IVirtualFolder rootFolder = vComponent.getRootFolder(); IVirtualFile vFile = rootFolder.getFile(path); IFile iFile = vFile.getUnderlyingFile(); return iFile.getProjectRelativePath(); } return super.getProjectRelativePath(aFile);}

代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui

@Override public boolean select(Viewer viewer, Object parent, Object element) { if (element instanceof IFolder) return isPathValid(((IFolder) element).getProjectRelativePath()); if (element instanceof IFile) return isFileValid(((IFile) element).getProjectRelativePath()); return false; }}

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee

protected final IStatus createVirtualArchiveComponent(IProject targetProject, String uriMapping, IFile utilityJarIFile, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException, ExecutionException { IDataModel addArchiveProjectToEARDataModel = DataModelFactory.createDataModel(new CreateReferenceComponentsDataModelProvider()); IVirtualComponent earcompOnent= ComponentCore.createComponent(targetProject); IVirtualComponent utilcompOnent= ComponentCore.createArchiveComponent(targetProject, VirtualArchiveComponent.LIBARCHIVETYPE + IPath.SEPARATOR + utilityJarIFile.getProjectRelativePath().toString()); addArchiveProjectToEARDataModel.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, earcomponent); addArchiveProjectToEARDataModel.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, Collections.singletonList(utilcomponent)); Map uriMap = new HashMap(); uriMap.put(utilcomponent, uriMapping); addArchiveProjectToEARDataModel.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP, uriMap); return addArchiveProjectToEARDataModel.getDefaultOperation().execute(monitor, null);}

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

public boolean acceptFile(IFile file) throws CoreException { IJavaElement element= JavaCore.create(file); if ((element != null // Only touch text files (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=114153 ): if (! FileBuffers.getTextFileBufferManager().isTextFileLocation(file.getFullPath(), false)) return false; IPath path= file.getProjectRelativePath(); String segment= path.segment(0); if (segment != null return true;}

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee

protected IClasspathEntry newClasspathEntryFromEARProj() { IPath path = earProject.getFullPath().append( getEarContentFolder() + IPath.SEPARATOR + earProject.getFile(getText()).getProjectRelativePath()); return JavaCore.newLibraryEntry(path, path, null, true);}

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee

protected IPath getOutputPathForFile(File aFile) { if(endsWithClassType(aFile.getURI())){ return importedClassesFolder.getFile(getImportedClassesURI(aFile)).getProjectRelativePath(); } return super.getOutputPathForFile(aFile);}

代码示例来源:origin: jbosstools/m2e-wro4j

private boolean isPomModified() { IMavenProjectFacade facade = getMavenProjectFacade(); IResourceDelta delta = getDelta(facade.getProject()); if (delta == null) { return false; } if (delta.findMember(facade.getPom().getProjectRelativePath()) != null) { return true; } return false;}

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee

@Overrideprotected IPath getProjectRelativePath(IArchiveResource aFile) { if (endsWithClassType(aFile.getPath().lastSegment())) { return importedClassesFolder.getFile(getImportedClassesURI(aFile)).getProjectRelativePath(); } return super.getProjectRelativePath(aFile);}

代码示例来源:origin: org.eclipse.egit/ui

private DiffNode getFileParent(IDiffContainer root, IFile file) { String projectName = file.getProject().getName(); DiffNode child = getOrCreateChild(root, projectName, true); IPath path = file.getProjectRelativePath(); for (int i = 0; i

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core

private void adjustBuildPropertiesFile(IFile underlyingResource) throws CoreException { IProject project = underlyingResource.getProject(); IFile buildPropertiesFile = PDEProject.getBuildProperties(project); if (buildPropertiesFile.exists()) { WorkspaceBuildModel model = new WorkspaceBuildModel(buildPropertiesFile); IBuildEntry entry = model.getBuild().getEntry(IBuildEntry.BIN_INCLUDES); String relativePath = underlyingResource.getProjectRelativePath().toString(); if (!entry.contains(relativePath)) { entry.addToken(relativePath); model.save(); } }}

代码示例来源:origin: org.eclipse.platform/org.eclipse.compare

private IPath getDiffPath(IFile file) { DiffProject project = getDiffProject(file.getProject()); if (project != null) { return file.getProjectRelativePath(); } return file.getFullPath().removeFirstSegments(getTarget().getFullPath().segmentCount());}

代码示例来源:origin: org.eclipse/org.eclipse.compare

private IPath getDiffPath(IFile file) { DiffProject project = getDiffProject(file.getProject()); if (project != null) { return file.getProjectRelativePath(); } return file.getFullPath().removeFirstSegments(getTarget().getFullPath().segmentCount());}

上一篇:springbean范围
下一篇:没有了
网友评论