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


Java DotNetModuleFileType类代码示例

本文整理汇总了Java中consulo.dotnet.dll.DotNetModuleFileType的典型用法代码示例。如果您正苦于以下问题:Java DotNetModuleFileType类的具体用法?Java DotNetModuleFileType怎么用?Java DotNetModuleFileType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: resolve

import consulo.dotnet.dll.DotNetModuleFileType; //导入依赖的package包/类
@NotNull
@RequiredReadAction
static AssemblyModule resolve(@NotNull PsiElement element)
{
	Module module = ModuleUtilCore.findModuleForPsiElement(element);
	if(module != null)
	{
		return new ConsuloModuleAsAssemblyModule(module);
	}

	VirtualFile virtualFile = PsiUtilCore.getVirtualFile(element);
	if(virtualFile != null)
	{
		VirtualFile rootFile = ArchiveVfsUtil.getVirtualFileForArchive(virtualFile);
		if(rootFile != null && rootFile.getFileType() == DotNetModuleFileType.INSTANCE)
		{
			return new DotNetModuleAsAssemblyModule(element.getProject(), rootFile);
		}
	}
	return UnknownAssemblyModule.INSTANCE;
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:22,代码来源:AssemblyModule.java

示例2: detectRoots

import consulo.dotnet.dll.DotNetModuleFileType; //导入依赖的package包/类
@NotNull
@Override
public Collection<VirtualFile> detectRoots(@NotNull VirtualFile rootCandidate, @NotNull ProgressIndicator progressIndicator)
{
	if(rootCandidate.getFileSystem() instanceof ArchiveFileSystem)
	{
		VirtualFile localFile = ArchiveVfsUtil.getVirtualFileForArchive(rootCandidate);
		if(localFile == null || localFile.getFileType() != DotNetModuleFileType.INSTANCE)
		{
			return Collections.emptyList();
		}
		String docFilePath = localFile.getParent().getPath() + "/" + localFile.getNameWithoutExtension() + XmlFileType.DOT_DEFAULT_EXTENSION;
		VirtualFile docFile = LocalFileSystem.getInstance().findFileByIoFile(new File(docFilePath));
		if(docFile != null)
		{
			return Collections.singletonList(docFile);
		}
	}
	else if(rootCandidate.getFileType() == XmlFileType.INSTANCE)
	{
		return Collections.singletonList(rootCandidate);
	}
	return Collections.emptyList();
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:25,代码来源:DotNetXmlDocumentationRootDetector.java

示例3: registerFileTypes

import consulo.dotnet.dll.DotNetModuleFileType; //导入依赖的package包/类
@Override
public void registerFileTypes(Consumer<FileType> consumer)
{
	consumer.accept(DotNetModuleFileType.INSTANCE);
	consumer.accept(CSharpFileType.INSTANCE);
	consumer.accept(JavaScriptFileType.INSTANCE);
}
 
开发者ID:consulo,项目名称:consulo-unity3d,代码行数:8,代码来源:DefaultUnity3dProjectSourceFileTypeFactory.java

示例4: notifyAboutPluginFile

import consulo.dotnet.dll.DotNetModuleFileType; //导入依赖的package包/类
@RequiredReadAction
private static void notifyAboutPluginFile(@NotNull final Project project)
{
	Unity3dRootModuleExtension moduleExtension = Unity3dModuleExtensionUtil.getRootModuleExtension(project);
	if(moduleExtension == null)
	{
		return;
	}

	Unity3dDefineByVersion unity3dDefineByVersion = Unity3dProjectImportUtil.getUnity3dDefineByVersion(moduleExtension.getSdk());
	final String pluginFileName = unity3dDefineByVersion.getPluginFileName();
	if(pluginFileName == null)
	{
		return;
	}

	File pluginPath = PluginManager.getPluginPath(UnityPluginFileValidator.class);

	final File unityPluginFile = new File(pluginPath, "UnityEditorConsuloPlugin/" + pluginFileName);
	if(!unityPluginFile.exists())
	{
		return;
	}

	VirtualFile baseDir = project.getBaseDir();
	if(baseDir == null)
	{
		return;
	}

	List<VirtualFile> targetFiles = new SmartList<>();

	VirtualFile fileByRelativePath = baseDir.findFileByRelativePath(ourPath);
	if(fileByRelativePath != null)
	{
		VirtualFile[] children = fileByRelativePath.getChildren();
		for(VirtualFile child : children)
		{
			CharSequence nameSequence = child.getNameSequence();
			if(StringUtil.startsWith(nameSequence, "UnityEditorConsuloPlugin") && child.getFileType() == DotNetModuleFileType.INSTANCE)
			{
				targetFiles.add(child);
			}
		}
	}

	if(targetFiles.isEmpty())
	{
		showNotify(project, pluginFileName, unityPluginFile, "Consulo plugin for UnityEditor is missing<br><a href=\"update\">Install</a>", Collections.emptyList());
	}
	else
	{
		VirtualFile firstItem = targetFiles.size() == 1 ? targetFiles.get(0) : null;
		if(firstItem != null && VfsUtilCore.virtualToIoFile(firstItem).lastModified() == unityPluginFile.lastModified())
		{
			return;
		}

		String title = "Outdated Consulo plugin(s) for UnityEditor can create <a href=\"info\">issues</a>. <a href=\"update\">Update</a> are recommended";

		showNotify(project, pluginFileName, unityPluginFile, title, targetFiles);
	}
}
 
开发者ID:consulo,项目名称:consulo-unity3d,代码行数:64,代码来源:UnityPluginFileValidator.java

示例5: getInstance

import consulo.dotnet.dll.DotNetModuleFileType; //导入依赖的package包/类
@NotNull
public static DotNetArchiveFileSystem getInstance()
{
	return (DotNetArchiveFileSystem) VirtualFileManager.getInstance().getFileSystem(DotNetModuleFileType.PROTOCOL);
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:6,代码来源:DotNetArchiveFileSystem.java

示例6: DotNetArchiveFileSystem

import consulo.dotnet.dll.DotNetModuleFileType; //导入依赖的package包/类
public DotNetArchiveFileSystem()
{
	super(DotNetModuleFileType.PROTOCOL);
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:5,代码来源:DotNetArchiveFileSystem.java


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