本文整理汇总了Java中com.intellij.facet.ui.FacetConfigurationQuickFix类的典型用法代码示例。如果您正苦于以下问题:Java FacetConfigurationQuickFix类的具体用法?Java FacetConfigurationQuickFix怎么用?Java FacetConfigurationQuickFix使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FacetConfigurationQuickFix类属于com.intellij.facet.ui包,在下文中一共展示了FacetConfigurationQuickFix类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createQuickFix
import com.intellij.facet.ui.FacetConfigurationQuickFix; //导入依赖的package包/类
private FacetConfigurationQuickFix createQuickFix(final Sdk sdk, final FacetErrorPanel facetErrorPanel, final String name) {
return new FacetConfigurationQuickFix() {
@Override
public void run(JComponent place) {
final PyPackageManagerUI ui = new PyPackageManagerUI(myProject, sdk, new PyPackageManagerUI.Listener() {
@Override
public void started() {}
@Override
public void finished(List<ExecutionException> exceptions) {
if (exceptions.isEmpty()) {
VFSTestFrameworkListener.getInstance().testInstalled(true, sdk.getHomePath(), name);
facetErrorPanel.getValidatorsManager().validate();
}
}
});
ui.install(Collections.singletonList(new PyRequirement(name)), Collections.<String>emptyList());
}
};
}
示例2: check
import com.intellij.facet.ui.FacetConfigurationQuickFix; //导入依赖的package包/类
@Override
public ValidationResult check() {
String errorMessage = null;
FacetConfigurationQuickFix quickFix = null;
String moduleDir = PathMacroUtil.getModuleDir(module.getModuleFilePath());
String path = field.getText();
if (SwingUtils.isVisible(field) && StringUtils.isNotBlank(path) && !ValidationUtils.isPathExists(path, module)) {
errorMessage = "Directory " + path + " does not exists.";
quickFix = new CreateDirectoryQuickFix(new File(moduleDir, path), manager, quickFixCallback);
}
return new ValidationResult(errorMessage, quickFix);
}