当前位置: 首页>>代码示例>>Java>>正文


Java URI.equals方法代码示例

本文整理汇总了Java中org.eclipse.emf.common.util.URI.equals方法的典型用法代码示例。如果您正苦于以下问题:Java URI.equals方法的具体用法?Java URI.equals怎么用?Java URI.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.emf.common.util.URI的用法示例。


在下文中一共展示了URI.equals方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getProjects

import org.eclipse.emf.common.util.URI; //导入方法依赖的package包/类
@Override
public Iterable<IProject> getProjects(java.net.URI rootLocation) {
	ensureInitialized();
	final File rootFolder = new File(rootLocation);

	final Map<String, IProject> projectsMapping = newTreeMap();
	final URI rootUri = URI.createFileURI(rootFolder.getAbsolutePath());

	for (Entry<URI, Optional<Pair<ExternalProject, ProjectDescription>>> entry : projectCache.asMap().entrySet()) {
		final URI projectLocation = entry.getKey();
		if (rootUri.equals(projectLocation.trimSegments(1))) {
			final Pair<ExternalProject, ProjectDescription> pair = entry.getValue().orNull();
			if (null != pair && null != pair.getFirst()) {
				final ExternalProject project = pair.getFirst();
				projectsMapping.put(project.getName(), project);
			}
		}
	}

	return unmodifiableCollection(projectsMapping.values());
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:22,代码来源:EclipseExternalLibraryWorkspace.java

示例2: getProjectsDescriptions

import org.eclipse.emf.common.util.URI; //导入方法依赖的package包/类
@Override
public Iterable<ProjectDescription> getProjectsDescriptions(java.net.URI rootLocation) {
	ensureInitialized();
	final File rootFolder = new File(rootLocation);

	final Set<ProjectDescription> projectsMapping = newHashSet();
	final URI rootUri = URI.createFileURI(rootFolder.getAbsolutePath());

	for (Entry<URI, Optional<Pair<ExternalProject, ProjectDescription>>> entry : projectCache.asMap().entrySet()) {
		final URI projectLocation = entry.getKey();
		if (rootUri.equals(projectLocation.trimSegments(1))) {
			final Pair<ExternalProject, ProjectDescription> pair = entry.getValue().orNull();
			if (null != pair && null != pair.getFirst()) {
				final ProjectDescription description = pair.getSecond();
				if (description != null) {
					projectsMapping.add(description);
				}
			}
		}
	}

	return unmodifiableCollection(projectsMapping);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:24,代码来源:EclipseExternalLibraryWorkspace.java

示例3: descriptionsChanged

import org.eclipse.emf.common.util.URI; //导入方法依赖的package包/类
@Override
public void descriptionsChanged(Event event) {
	URI expectedURI = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
	for (IResourceDescription.Delta delta : event.getDeltas()) {
		URI deltaURI = delta.getUri();
		if (expectedURI.equals(deltaURI)) {
			eventFired = true;
		}
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:11,代码来源:TestEventListener.java

示例4: isSameProblem

import org.eclipse.emf.common.util.URI; //导入方法依赖的package包/类
private boolean isSameProblem(IMarker marker) {
	URI myUriToProblem = issue.getUriToProblem();

	String code = issueUtil.getCode(marker);
	if (code != null && code.equals(org.eclipse.n4js.validation.IssueCodes.NON_EXISTING_PROJECT)) {
		myUriToProblem = myUriToProblem.appendFragment(Integer.toString(marker.hashCode()));
	}

	return myUriToProblem != null && myUriToProblem.equals(issueUtil.getUriToProblem(marker));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:11,代码来源:N4JSMarkerResolutionGenerator.java

示例5: getSessions

import org.eclipse.emf.common.util.URI; //导入方法依赖的package包/类
/**
 * Gets the {@link List} of {@link Session} referencing the given semantic {@link URI}.
 * 
 * @param uri
 *            the semantic {@link URI}
 * @return the {@link List} of {@link Session} referencing the given semantic {@link URI}
 */
public static List<Session> getSessions(URI uri) {
	final List<Session> res = new ArrayList<Session>();
	final URI resourceURI = uri.trimFragment();
	for (Session session : SessionManager.INSTANCE.getSessions()) {
		for (Resource resource : session.getSemanticResources()) {
			if (resourceURI.equals(resource.getURI())) {
				res.add(session);
				break;
			}
		}
	}

	return res;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:22,代码来源:SiriusEditorUtils.java

示例6: setUri

import org.eclipse.emf.common.util.URI; //导入方法依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
public void setUri(URI newUri) {
	final URI oldUri = uri;
	uri = newUri;
	if (eNotificationRequired()) {
		eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.RESOURCE_ARTEFACT__URI, oldUri, uri));
	}
	if (newUri != null && !newUri.equals(oldUri)) {
		load();
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:16,代码来源:ResourceArtefactImpl.java

示例7: isPrivateVisible

import org.eclipse.emf.common.util.URI; //导入方法依赖的package包/类
private boolean isPrivateVisible(Resource contextResource, URI elementLocation) {
	URI resURI = getURI(contextResource);
	boolean result = resURI.equals(elementLocation.trimFragment());
	return result;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:6,代码来源:TypeVisibilityChecker.java


注:本文中的org.eclipse.emf.common.util.URI.equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。