本文整理汇总了Java中com.intellij.execution.configurations.ConfigurationTypeUtil.equals方法的典型用法代码示例。如果您正苦于以下问题:Java ConfigurationTypeUtil.equals方法的具体用法?Java ConfigurationTypeUtil.equals怎么用?Java ConfigurationTypeUtil.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.execution.configurations.ConfigurationTypeUtil
的用法示例。
在下文中一共展示了ConfigurationTypeUtil.equals方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupConfigurationFromContext
import com.intellij.execution.configurations.ConfigurationTypeUtil; //导入方法依赖的package包/类
@Override
protected boolean setupConfigurationFromContext(BeakerRunConfiguration configuration, ConfigurationContext context, Ref<PsiElement> element) {
RunConfiguration original = context.getOriginalConfiguration(null);
if (original != null && !ConfigurationTypeUtil.equals(original.getType(),
ConfigurationTypeUtil.findConfigurationType(BeakerConfigurationType.class))) {
return false;
}
BeakerRunSettings settings = getBeakerRunSettings(configuration.getRunSettings(), context);
configuration.setRunSettings(settings);
configuration.setName(configuration.suggestedName());
return true;
}
示例2: getOriginalConfiguration
import com.intellij.execution.configurations.ConfigurationTypeUtil; //导入方法依赖的package包/类
/**
* Returns original {@link RunConfiguration} from this context.
* For example, it could be some test framework runtime configuration that had been launched
* and that had brought a result test tree on which a right-click action was performed.
*
* @param type {@link ConfigurationType} instance to filter original runtime configuration by its type
* @return {@link RunConfiguration} instance, it could be null
*/
@Nullable
public RunConfiguration getOriginalConfiguration(@Nullable ConfigurationType type) {
if (type == null) {
return myRuntimeConfiguration;
}
if (myRuntimeConfiguration != null
&& ConfigurationTypeUtil.equals(myRuntimeConfiguration.getType(), type)) {
return myRuntimeConfiguration;
}
return null;
}
示例3: getOriginalConfiguration
import com.intellij.execution.configurations.ConfigurationTypeUtil; //导入方法依赖的package包/类
/**
* Returns original {@link RunConfiguration} from this context.
* For example, it could be some test framework runtime configuration that had been launched
* and that had brought a result test tree on which a right-click action was performed.
*
* @param type {@link ConfigurationType} instance to filter original runtime configuration by its type
* @return {@link RunConfiguration} instance, it could be null
*/
@Nullable
public RunConfiguration getOriginalConfiguration(@Nullable ConfigurationType type) {
if (type == null) {
return myRuntimeConfiguration;
}
if (myRuntimeConfiguration != null && ConfigurationTypeUtil.equals(myRuntimeConfiguration.getType(), type)) {
return myRuntimeConfiguration;
}
return null;
}
示例4: isCompatibleWithOriginalRunConfiguration
import com.intellij.execution.configurations.ConfigurationTypeUtil; //导入方法依赖的package包/类
/**
* Checks if the original run configuration matches the passed type.
* If the original run configuration is undefined, the check is passed too.
* An original run configuration is a run configuration associated with given context.
* For example, it could be a test framework run configuration that had been launched
* and that had brought a result test tree on which a right-click action was performed (and this context was created). In this case, other run configuration producers might want to not work on such elements.
*
* @param type {@link ConfigurationType} instance to match the original run configuration
* @return true if the original run configuration is of the same type or it's undefined; false otherwise
*/
public boolean isCompatibleWithOriginalRunConfiguration(@Nonnull ConfigurationType type) {
return myRuntimeConfiguration == null || ConfigurationTypeUtil.equals(myRuntimeConfiguration.getType(), type);
}