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


Java RequiredDispatchThread类代码示例

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


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

示例1: actionPerformed

import consulo.annotations.RequiredDispatchThread; //导入依赖的package包/类
@Override
@RequiredDispatchThread
public void actionPerformed(@NotNull AnActionEvent anActionEvent)
{
	final Project project = anActionEvent.getProject();
	if(project == null)
	{
		return;
	}
	final Unity3dRootModuleExtension rootModuleExtension = Unity3dModuleExtensionUtil.getRootModuleExtension(project);
	if(rootModuleExtension == null)
	{
		return;
	}

	Unity3dProjectImportUtil.syncProjectStep1(project, rootModuleExtension.getSdk(), null, true);
}
 
开发者ID:consulo,项目名称:consulo-unity3d,代码行数:18,代码来源:SyncUnity3dProjectAction.java

示例2: update

import consulo.annotations.RequiredDispatchThread; //导入依赖的package包/类
@RequiredDispatchThread
@Override
public void update(@NotNull AnActionEvent e)
{
	Presentation presentation = e.getPresentation();
	Project project = e.getProject();
	if(project == null || Unity3dModuleExtensionUtil.getRootModuleExtension(project) == null)
	{
		presentation.setEnabledAndVisible(false);
		return;
	}

	VirtualFile virtualFile = e.getData(CommonDataKeys.VIRTUAL_FILE);
	if(virtualFile == null || !virtualFile.equals(project.getBaseDir()))
	{
		presentation.setEnabledAndVisible(false);
	}

	if(project.getUserData(Unity3dProjectImportUtil.ourInProgressFlag) == Boolean.TRUE)
	{
		presentation.setEnabled(false);
		presentation.setVisible(true);
	}
}
 
开发者ID:consulo,项目名称:consulo-unity3d,代码行数:25,代码来源:SyncUnity3dProjectAction.java

示例3: doExecute

import consulo.annotations.RequiredDispatchThread; //导入依赖的package包/类
@Override
@RequiredDispatchThread
protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment env) throws ExecutionException
{
	UnityProcess editorProcess = UnityEditorCommunication.findEditorProcess();
	if(editorProcess == null)
	{
		throw new ExecutionException("Editor is not responding");
	}
	FileDocumentManager.getInstance().saveAllDocuments();

	ExecutionResult executionResult = state.execute(env.getExecutor(), this);
	if(executionResult == null)
	{
		return null;
	}
	return Unity3dAttachRunner.runContentDescriptor(executionResult, env, editorProcess, (ConsoleView) executionResult.getExecutionConsole(), true);
}
 
开发者ID:consulo,项目名称:consulo-unity3d,代码行数:19,代码来源:Unity3dTestDebuggerRunner.java

示例4: reset

import consulo.annotations.RequiredDispatchThread; //导入依赖的package包/类
@RequiredDispatchThread
@Override
public void reset(CommonProgramRunConfigurationParameters configuration)
{
	super.reset(configuration);

	MochaConfiguration mochaConfiguration = (MochaConfiguration) configuration;

	switch(mochaConfiguration.getTargetType())
	{
		case DIRECTORY:
			myDirectoryButton.setSelected(true);
			break;
		case FILE:
			myFileButton.setSelected(true);
			break;
	}

	myDirectoryField.setText(mochaConfiguration.getDirectoryPath());
	myFileField.setText(mochaConfiguration.getFilePath());
}
 
开发者ID:consulo,项目名称:consulo-nodejs,代码行数:22,代码来源:MochaConfigurationPanel.java

示例5: applyTo

import consulo.annotations.RequiredDispatchThread; //导入依赖的package包/类
@RequiredDispatchThread
@Override
public void applyTo(CommonProgramRunConfigurationParameters configuration)
{
	super.applyTo(configuration);

	MochaConfiguration mochaConfiguration = (MochaConfiguration) configuration;

	if(myDirectoryButton.isSelected())
	{
		mochaConfiguration.setTargetType(MochaConfiguration.TargetType.DIRECTORY);
		mochaConfiguration.setFilePath(null);
		mochaConfiguration.setDirectoryPath(myDirectoryField.getText());
	}
	else
	{
		mochaConfiguration.setTargetType(MochaConfiguration.TargetType.FILE);
		mochaConfiguration.setFilePath(myFileField.getText());
		mochaConfiguration.setDirectoryPath(null);
	}
}
 
开发者ID:consulo,项目名称:consulo-nodejs,代码行数:22,代码来源:MochaConfigurationPanel.java

示例6: isAvailable

import consulo.annotations.RequiredDispatchThread; //导入依赖的package包/类
@Override
@RequiredDispatchThread
public boolean isAvailable(@NotNull Project project, Editor editor, @NotNull PsiElement psi)
{
	CSharpExpressionStatementImpl exprStmt = PsiTreeUtil.getParentOfType(psi, CSharpExpressionStatementImpl.class);
	if(psi instanceof SyntheticElement || exprStmt == null)
	{
		return false;
	}

	DotNetExpression expression = exprStmt.getExpression();
	if(expression instanceof CSharpAssignmentExpressionImpl)
	{
		return false;
	}

	DotNetTypeRef ref = expression.toTypeRef(true);
	return !(ref == DotNetTypeRef.ERROR_TYPE || DotNetTypeRefUtil.isVmQNameEqual(ref, expression, DotNetTypes.System.Void));
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:20,代码来源:IntroduceLocalVariableIntention.java

示例7: invoke

import consulo.annotations.RequiredDispatchThread; //导入依赖的package包/类
@Override
@RequiredDispatchThread
public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException
{
	PsiDocumentManager.getInstance(project).commitAllDocuments();

	DotNetVariable element = myVariablePointer.getElement();
	if(element == null)
	{
		return;
	}

	DotNetType typeOfVariable = element.getType();
	if(typeOfVariable == null)
	{
		return;
	}
	String typeText = CSharpTypeRefPresentationUtil.buildShortText(myToTypeRef, element);

	DotNetType type = CSharpFileFactory.createMaybeStubType(project, typeText, typeOfVariable);

	typeOfVariable.replace(type);
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:24,代码来源:ChangeVariableToTypeRefFix.java

示例8: isAvailable

import consulo.annotations.RequiredDispatchThread; //导入依赖的package包/类
@Override
@RequiredDispatchThread
public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file)
{
	if(myExpectedTypeRef == DotNetTypeRef.UNKNOWN_TYPE)
	{
		return false;
	}
	DotNetExpression element = myExpressionPointer.getElement();
	if(element == null)
	{
		return false;
	}

	if(DotNetTypeRefUtil.isVmQNameEqual(myExpectedTypeRef, element, DotNetTypes.System.Void))
	{
		return false;
	}
	return true;
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:21,代码来源:CastExpressionToTypeRef.java

示例9: invoke

import consulo.annotations.RequiredDispatchThread; //导入依赖的package包/类
@Override
@RequiredDispatchThread
public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException
{
	DotNetExpression element = myExpressionPointer.getElement();
	if(element == null)
	{
		return;
	}

	String typeText = CSharpTypeRefPresentationUtil.buildShortText(myExpectedTypeRef, element);

	DotNetExpression expression = CSharpFileFactory.createExpression(project, "(" + typeText + ") " + element.getText());

	element.replace(expression);
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:17,代码来源:CastExpressionToTypeRef.java

示例10: updateUI

import consulo.annotations.RequiredDispatchThread; //导入依赖的package包/类
@Override
@RequiredDispatchThread
public void updateUI(ItemToShow p, ParameterInfoUIContext context)
{
	if(p == null)
	{
		context.setUIComponentEnabled(false);
		return;
	}
	CSharpParametersInfo build = CSharpParametersInfo.build(p.myLikeMethod, p.myScope);

	String text = build.getText();

	TextRange parameterRange = build.getParameterRange(context.getCurrentParameterIndex());

	context.setupUIComponentPresentation(text, parameterRange.getStartOffset(), parameterRange.getEndOffset(), !context.isUIComponentEnabled(), p.isObsolete(), false, context
			.getDefaultParameterColor());
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:19,代码来源:CSharpParameterInfoHandler.java

示例11: findNextToken

import consulo.annotations.RequiredDispatchThread; //导入依赖的package包/类
@Nullable
@RequiredDispatchThread
protected PsiElement findNextToken(final InsertionContext context)
{
	final PsiFile file = context.getFile();
	PsiElement element = file.findElementAt(context.getTailOffset());
	if(element instanceof PsiWhiteSpace)
	{
		boolean allowParametersOnNextLine = false;
		if(!allowParametersOnNextLine && element.getText().contains("\n"))
		{
			return null;
		}
		element = file.findElementAt(element.getTextRange().getEndOffset());
	}
	return element;
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:18,代码来源:CSharpParenthesesInsertHandler.java

示例12: getPresentationText

import consulo.annotations.RequiredDispatchThread; //导入依赖的package包/类
@RequiredReadAction
@NotNull
@Override
@RequiredDispatchThread
public String getPresentationText()
{
	if(myDeclaration instanceof CSharpPropertyDeclaration)
	{
		return CSharpElementPresentationUtil.formatProperty((DotNetPropertyDeclaration) myDeclaration, 0);
	}
	else if(myDeclaration instanceof CSharpIndexMethodDeclaration)
	{
		return CSharpElementPresentationUtil.formatMethod((CSharpIndexMethodDeclaration) myDeclaration, CSharpElementPresentationUtil.METHOD_WITH_RETURN_TYPE | CSharpElementPresentationUtil
				.METHOD_PARAMETER_NAME);
	}
	throw new UnsupportedOperationException(myDeclaration.getClass().getSimpleName() + " is not supported");
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:18,代码来源:XXXAccessorOwnerChooseMember.java

示例13: getChildrenImpl

import consulo.annotations.RequiredDispatchThread; //导入依赖的package包/类
@Nullable
@Override
@RequiredDispatchThread
protected Collection<AbstractTreeNode> getChildrenImpl()
{
	final ViewSettings settings = getSettings();
	if(!settings.isShowMembers() && !BitUtil.isSet(myFlags, FORCE_EXPAND))
	{
		return Collections.emptyList();
	}

	DotNetNamedElement[] members = filterNamespaces(getValue());
	if(members.length == 0)
	{
		return Collections.emptyList();
	}

	List<AbstractTreeNode> list = new ArrayList<>(members.length);
	for(DotNetNamedElement dotNetElement : members)
	{
		list.add(new CSharpElementTreeNode(dotNetElement, settings, 0));
	}
	return list;
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:25,代码来源:CSharpElementTreeNode.java

示例14: updateImpl

import consulo.annotations.RequiredDispatchThread; //导入依赖的package包/类
@Override
@RequiredDispatchThread
protected void updateImpl(PresentationData presentationData)
{
	DotNetNamedElement value = getValue();

	presentationData.setPresentableText(getPresentableText(value));

	if(BitUtil.isSet(myFlags, ALLOW_GRAY_FILE_NAME))
	{
		PsiFile containingFile = value.getContainingFile();
		if(containingFile != null)
		{
			if(!Comparing.equal(FileUtil.getNameWithoutExtension(containingFile.getName()), value.getName()))
			{
				presentationData.setLocationString(containingFile.getName());
			}
		}
	}
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:21,代码来源:CSharpElementTreeNode.java

示例15: apply

import consulo.annotations.RequiredDispatchThread; //导入依赖的package包/类
@RequiredDispatchThread
@Override
public void apply() throws ConfigurationException
{
	mySettings.FIELD_PREFIX = myFieldPrefixField.getText().trim();
	mySettings.STATIC_FIELD_PREFIX = myStaticFieldPrefixField.getText().trim();
	mySettings.PROPERTY_PREFIX = myPropertyPrefixField.getText().trim();
	mySettings.STATIC_PROPERTY_PREFIX = myStaticPropertyPrefixField.getText().trim();

	mySettings.FIELD_SUFFIX = myFieldSuffixField.getText().trim();
	mySettings.STATIC_FIELD_SUFFIX = myStaticFieldSuffixField.getText().trim();
	mySettings.PROPERTY_SUFFIX = myPropertySuffixField.getText().trim();
	mySettings.STATIC_PROPERTY_SUFFIX = myStaticPropertySuffixField.getText().trim();
	mySettings.USE_LANGUAGE_DATA_TYPES = myUseLanguageKeywordsCheckBox.isSelected();
	myCommenterForm.apply(mySettings.getContainer());
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:17,代码来源:CSharpCodeGenerationSettingsConfigurable.java


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