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


Java ThreeState.NO属性代码示例

本文整理汇总了Java中com.intellij.util.ThreeState.NO属性的典型用法代码示例。如果您正苦于以下问题:Java ThreeState.NO属性的具体用法?Java ThreeState.NO怎么用?Java ThreeState.NO使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.intellij.util.ThreeState的用法示例。


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

示例1: customizeCellRenderer

@Override
protected void customizeCellRenderer(JTable table, Object value, boolean selected, boolean hasFocus, int row, int column) {
  if (!(value instanceof LaunchCompatibility)) {
    return;
  }

  LaunchCompatibility compatibility = (LaunchCompatibility)value;
  ThreeState compatible = compatibility.isCompatible();
  if (compatible == ThreeState.YES) {
    append("Yes");
  } else {
    if (compatible == ThreeState.NO) {
      append("No", SimpleTextAttributes.ERROR_ATTRIBUTES);
    } else {
      append("Maybe");
    }
    String reason = compatibility.getReason();
    if (reason != null) {
      append(", ");
      append(reason);
    }
  }
}
 
开发者ID:zzz40500,项目名称:ADB-Duang,代码行数:23,代码来源:MyDeviceChooser.java

示例2: fun

@Override
public ThreeState fun(ASTNode oldNode,
                      LighterASTNode newNode,
                      FlyweightCapableTreeStructure<LighterASTNode> structure) {
  if (oldNode.getElementType() == PropertiesElementTypes.PROPERTY) {
    ASTNode oldName = oldNode.findChildByType(PropertiesTokenTypes.KEY_CHARACTERS);
    if (oldName != null) {
      CharSequence oldNameStr = oldName.getChars();
      CharSequence newNameStr = findKeyCharacters(newNode, structure);

      if (oldNameStr != null && !Comparing.equal(oldNameStr, newNameStr)) {
        return ThreeState.NO;
      }
    }
  }

  return ThreeState.UNSURE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:PropertiesParser.java

示例3: addCompatibleAvds

@NotNull
private AvdInfo[] addCompatibleAvds(@NotNull List<AvdInfo> to, @NotNull AvdInfo[] from) {
  AndroidVersion minSdk = AndroidModuleInfo.get(this).getRuntimeMinSdkVersion();
  AndroidPlatform platform = getConfiguration().getAndroidPlatform();
  if (platform == null) {
    LOG.error("Android Platform not set for module: " + getModule().getName());
    return new AvdInfo[0];
  }

  for (AvdInfo avd : from) {
    IAndroidTarget avdTarget = avd.getTarget();
    if (avdTarget == null || LaunchCompatibility.canRunOnAvd(minSdk, platform.getTarget(), avdTarget).isCompatible() != ThreeState.NO) {
      to.add(avd);
    }
  }
  return to.toArray(new AvdInfo[to.size()]);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:AndroidFacet.java

示例4: createNotificationPanel

@Nullable
@Override
public EditorNotificationPanel createNotificationPanel(@NotNull VirtualFile file, @NotNull FileEditor fileEditor) {
  if (!Projects.isGradleProject(myProject) || myIsImporting.get()) {
    return null;
  }
  GradleSyncState syncState = GradleSyncState.getInstance(myProject);
  if (Projects.lastGradleSyncFailed(myProject) ||
      syncState.isSyncInProgress() ||
      syncState.isSyncNeeded() != ThreeState.NO) {
    return null;
  }
  if (!isGradleBuildFile(file) || isImportedGradleProjectRoot(file, myProject)) {
    return null;
  }
  return new UnimportedModuleNotificationPanel(myProject, file.getParent());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:UnimportedModuleNotificationProvider.java

示例5: fun

@Override
public ThreeState fun(ASTNode oldNode,
                      LighterASTNode newNode,
                      FlyweightCapableTreeStructure<LighterASTNode> structure) {
  if (oldNode instanceof XmlTag && newNode.getTokenType() == XmlElementType.XML_TAG) {
    String oldName = ((XmlTag)oldNode).getName();
    Ref<LighterASTNode[]> childrenRef = Ref.create(null);
    int count = structure.getChildren(newNode, childrenRef);
    if (count < 3) return ThreeState.UNSURE;
    LighterASTNode[] children = childrenRef.get();
    if (children[0].getTokenType() != XmlTokenType.XML_START_TAG_START) return ThreeState.UNSURE;
    if (children[1].getTokenType() != XmlTokenType.XML_NAME) return ThreeState.UNSURE;
    if (children[2].getTokenType() != XmlTokenType.XML_TAG_END) return ThreeState.UNSURE;
    LighterASTTokenNode name = (LighterASTTokenNode)children[1];
    CharSequence newName = name.getText();
    if (!Comparing.equal(oldName, newName)) return ThreeState.NO;
  }

  return ThreeState.UNSURE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:XmlParser.java

示例6: shouldFocusLookup

@NotNull
@Override
public ThreeState shouldFocusLookup(@NotNull CompletionParameters parameters) {
  final PsiElement position = parameters.getPosition();
  final PsiElement parent = position.getParent();
  if (parent instanceof PsiNameIdentifierOwner) {
    final PsiElement nameIdentifier = ((PsiNameIdentifierOwner)parent).getNameIdentifier();
    if (nameIdentifier == position) {
      return ThreeState.NO;
    }

    if (nameIdentifier != null && position.getTextRange().equals(nameIdentifier.getTextRange())) {
      //sometimes name identifiers are non-physical (e.g. Groovy)
      return ThreeState.NO;
    }
  }
  return ThreeState.UNSURE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:UnfocusedNameIdentifier.java

示例7: canRunOnAvd

/** Returns whether a project with given minSdkVersion and target platform can be run on an AVD with given target platform. */
@NotNull
public static LaunchCompatibility canRunOnAvd(@NotNull AndroidVersion minSdkVersion,
                                              @NotNull IAndroidTarget projectTarget,
                                              @NotNull IAndroidTarget avdTarget) {
  AndroidVersion avdVersion = avdTarget.getVersion();
  if (!avdVersion.canRun(minSdkVersion)) {
    String reason = String.format("minSdk(%1$s) %3$s deviceSdk(%2$s)",
                                  minSdkVersion,
                                  avdVersion,
                                  minSdkVersion.getCodename() == null ? ">" : "!=");
    return new LaunchCompatibility(ThreeState.NO, reason);
  }

  return projectTarget.isPlatform() ? YES : isCompatibleAddonAvd(projectTarget, avdTarget);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:LaunchCompatibility.java

示例8: getLoginWorker

@Override
public CvsLoginWorker getLoginWorker(final Project project) {
  return new CvsLoginWorker() {
    @Override
    public boolean promptForPassword() {
      return true;
    }

    @Override
    public ThreeState silentLogin(boolean forceCheck) {
      VcsBalloonProblemNotifier.showOverChangesView(
        project, CvsBundle.message("message.error.invalid.cvs.root", getCvsRootAsString()), MessageType.ERROR);
      return ThreeState.NO;
    }

    @Override
    public void goOffline() {
      setOffline(true);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:CvsInfo.java

示例9: shouldSkipAutopopup

@NotNull
@Override
public ThreeState shouldSkipAutopopup(@NotNull PsiElement contextElement, @NotNull PsiFile psiFile, int offset)
{
    // Wrong file.
    if (!CompletionPreloader.isRocConfigFile(psiFile))
    {
        return ThreeState.UNSURE;
    }

    JSProperty property = PsiTreeUtil.getParentOfType(contextElement, JSProperty.class);
    // Wrong place in file.
    if (property == null)
    {
        return ThreeState.UNSURE;
    }

    Setting setting = CompletionPreloader
        .getCompletions()
        .getSetting(property.getQualifiedName());

    // Not a roc-setting.
    if (setting == null)
    {
        return ThreeState.UNSURE;
    }

    return setting.getSubCompletionVariants().size() > 1 ? ThreeState.NO : ThreeState.UNSURE;
}
 
开发者ID:whitefire,项目名称:roc-completion,代码行数:29,代码来源:SubCompletionConfidence.java

示例10: shouldSkipAutopopup

@NotNull
@Override
public ThreeState shouldSkipAutopopup(@NotNull PsiElement contextElement, @NotNull PsiFile psiFile, int offset) {
    if (contextElement.getParent() instanceof JSLiteralExpression) {
        final PsiElement cssClassNamesImportOrRequire = CssModulesUtil.getCssClassNamesImportOrRequireDeclaration((JSLiteralExpression) contextElement.getParent());
        if (cssClassNamesImportOrRequire != null) {
            final StylesheetFile stylesheetFile = CssModulesUtil.resolveStyleSheetFile(cssClassNamesImportOrRequire);
            if (stylesheetFile != null) {
                return ThreeState.NO;
            }
        }
    }
    return ThreeState.UNSURE;
}
 
开发者ID:jimkyndemeyer,项目名称:react-css-modules-intellij-plugin,代码行数:14,代码来源:CssModulesClassNameCompletionConfidence.java

示例11: isAvailable

public final boolean isAvailable() {
  if (myValue == ThreeState.UNSURE) {
    try {
      myValue = ThreeState.fromBoolean(calcValue());
    }
    catch (VMDisconnectedException e) {
      LOG.info(e);
      myValue = ThreeState.NO;
    }
  }
  return myValue.toBoolean();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:VirtualMachineProxyImpl.java

示例12: clearCaches

/**
 * The advice to the proxy to clear cached data.
 */
@Override
protected void clearCaches() {
  if (myIsCollected == ThreeState.NO) {
    // clearing cache makes sense only if the object has not been collected yet
    myIsCollected = ThreeState.UNSURE;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ObjectReferenceProxyImpl.java

示例13: isReferenceToAnnotation

private static ThreeState isReferenceToAnnotation(final PsiElement psiElement) {
  if (!PsiUtil.isLanguageLevel5OrHigher(psiElement)) {
    return ThreeState.NO;
  }
  if (PsiTreeUtil.getParentOfType(psiElement, PsiAnnotation.class) != null) {
    return ThreeState.YES;
  }
  if (PsiTreeUtil.getParentOfType(psiElement, PsiImportStatement.class) != null) {
    return ThreeState.UNSURE;
  }
  return ThreeState.NO;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:OrderEntryFix.java

示例14: checkLoginWorker

public static ThreeState checkLoginWorker(final CvsLoginWorker worker, final boolean forceCheckParam)
  throws AuthenticationException {
  boolean forceCheck = forceCheckParam;
  final Ref<Boolean> promptResult = new Ref<Boolean>();
  final Runnable prompt = new Runnable() {
    @Override
    public void run() {
      promptResult.set(worker.promptForPassword());
    }
  };
  while (true) {
    final ThreeState state = worker.silentLogin(forceCheck);
    if (ThreeState.YES.equals(state)) return ThreeState.YES;
    if (ThreeState.NO.equals(state)) return state;
    try {
      // hack: allow indeterminate progress bar time to appear before displaying login dialog.
      // otherwise progress bar without cancel button appears on top of login dialog, blocking input and hanging IDEA.
      Thread.sleep(1000L);
    }
    catch (InterruptedException ignore) {
      return ThreeState.NO;
    }
    UIUtil.invokeAndWaitIfNeeded(prompt);
    if (! Boolean.TRUE.equals(promptResult.get())) {
      return ThreeState.UNSURE; // canceled
    }
    forceCheck = true;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:LoginPerformer.java

示例15: stop

public void stop(final List<ThrowableRunnable<VcsException>> callList) {
  if (myDependent != null) {
    myDependent.stop(callList);
  }
  if (ThreeState.YES.equals(myState)) {
    myState = ThreeState.NO;
    callList.add(myStop);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:StartedActivated.java


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