本文整理汇总了Java中consulo.dotnet.compiler.DotNetMacroUtil类的典型用法代码示例。如果您正苦于以下问题:Java DotNetMacroUtil类的具体用法?Java DotNetMacroUtil怎么用?Java DotNetMacroUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DotNetMacroUtil类属于consulo.dotnet.compiler包,在下文中一共展示了DotNetMacroUtil类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getModulePath
import consulo.dotnet.compiler.DotNetMacroUtil; //导入依赖的package包/类
@Nullable
@RequiredReadAction
public static String getModulePath(@NotNull Project project, @NotNull XLineBreakpoint<?> breakpoint)
{
VirtualFile breakpointFile = VirtualFileManager.getInstance().findFileByUrl(breakpoint.getFileUrl());
if(breakpointFile == null)
{
return null;
}
DotNetModuleExtension extension = ModuleUtilCore.getExtension(project, breakpointFile, DotNetModuleExtension.class);
if(extension != null)
{
return DotNetMacroUtil.expandOutputFile(extension);
}
return null;
}
示例2: createDefaultCommandLine
import consulo.dotnet.compiler.DotNetMacroUtil; //导入依赖的package包/类
@NotNull
@Override
public GeneralCommandLine createDefaultCommandLine(@NotNull Sdk sdk, @Nullable DebugConnectionInfo debugConnectionInfo) throws ExecutionException
{
String fileName = DotNetMacroUtil.expandOutputFile(this);
return createRunCommandLineImpl(fileName, debugConnectionInfo, sdk);
}
示例3: createDefaultCommandLine
import consulo.dotnet.compiler.DotNetMacroUtil; //导入依赖的package包/类
@NotNull
@Override
public GeneralCommandLine createDefaultCommandLine(@NotNull Sdk sdk, @Nullable DebugConnectionInfo debugConnectionInfo) throws ExecutionException
{
String fileName = DotNetMacroUtil.expandOutputFile(this);
return createDefaultCommandLineImpl(sdk, debugConnectionInfo, fileName);
}
示例4: getState
import consulo.dotnet.compiler.DotNetMacroUtil; //导入依赖的package包/类
@Nullable
@Override
public RunProfileState getState(@NotNull Executor executor, @NotNull final ExecutionEnvironment executionEnvironment) throws ExecutionException
{
Module module = getConfigurationModule().getModule();
if(module == null)
{
throw new ExecutionException("Module is null");
}
DotNetModuleExtension<?> extension = ModuleUtilCore.getExtension(module, DotNetModuleExtension.class);
if(extension == null)
{
throw new ExecutionException("Module don't have .NET extension");
}
Sdk sdk = extension.getSdk();
if(sdk == null)
{
throw new ExecutionException("SDK for module is not defined");
}
DebugConnectionInfo debugConnectionInfo = null;
if(executor instanceof DefaultDebugExecutor)
{
debugConnectionInfo = new DebugConnectionInfo("127.0.0.1", -1, true);
}
DotNetConfiguration runProfile = (DotNetConfiguration) executionEnvironment.getRunProfile();
GeneralCommandLine runCommandLine = extension.createDefaultCommandLine(sdk, debugConnectionInfo);
String programParameters = runProfile.getProgramParameters();
if(!StringUtil.isEmpty(programParameters))
{
runCommandLine.addParameters(StringUtil.split(programParameters, " "));
}
runCommandLine.setPassParentEnvironment(runProfile.isPassParentEnvs());
runCommandLine.getEnvironment().putAll(runProfile.getEnvs());
runCommandLine.setWorkDirectory(DotNetMacroUtil.expand(module, runProfile.getWorkingDirectory(), false));
DotNetRunProfileState state = new DotNetRunProfileState(executionEnvironment, runCommandLine);
if(debugConnectionInfo != null)
{
state.putUserData(DotNetRunKeys.DEBUG_CONNECTION_INFO_KEY, debugConnectionInfo);
}
return state;
}