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


Java CodeInsightSettings.FIRST_LETTER属性代码示例

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


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

示例1: createMatcher

private MinusculeMatcher createMatcher(final boolean caseSensitive) {
  String prefix = applyMiddleMatching(myPrefix);

  if (!caseSensitive) {
    return NameUtil.buildMatcher(prefix, NameUtil.MatchingCaseSensitivity.NONE);
  }

  switch (CodeInsightSettings.getInstance().COMPLETION_CASE_SENSITIVE) {
    case CodeInsightSettings.NONE:
      return NameUtil.buildMatcher(prefix, NameUtil.MatchingCaseSensitivity.NONE);
    case CodeInsightSettings.FIRST_LETTER:
      return NameUtil.buildMatcher(prefix, NameUtil.MatchingCaseSensitivity.FIRST_LETTER);
    default:
      return NameUtil.buildMatcher(prefix, NameUtil.MatchingCaseSensitivity.ALL);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:CamelHumpMatcher.java

示例2: toLowerCase

private static String toLowerCase(String text) {
  CodeInsightSettings settings = CodeInsightSettings.getInstance();
  switch (settings.COMPLETION_CASE_SENSITIVE) {
    case CodeInsightSettings.NONE:
      return text.toLowerCase();

    case CodeInsightSettings.FIRST_LETTER: {
      StringBuffer buffer = new StringBuffer();
      buffer.append(text.toLowerCase());
      if (buffer.length() > 0) {
        buffer.setCharAt(0, text.charAt(0));
      }
      return buffer.toString();
    }

    default:
      return text;
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:CompletionUtil.java

示例3: tearDown

@Override
protected void tearDown() throws Exception {
  LookupManager.getInstance(getProject()).hideActiveLookup();
  UISettings.getInstance().SORT_LOOKUP_ELEMENTS_LEXICOGRAPHICALLY = false;
  CodeInsightSettings.getInstance().COMPLETION_CASE_SENSITIVE = CodeInsightSettings.FIRST_LETTER;
  super.tearDown();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:CompletionSortingTestCase.java

示例4: getCaseSensitiveValue

@MagicConstant(intValues = {CodeInsightSettings.ALL, CodeInsightSettings.NONE, CodeInsightSettings.FIRST_LETTER})
private int getCaseSensitiveValue() {
  Object value = myCaseSensitiveCombo.getSelectedItem();
  if (CASE_SENSITIVE_ALL.equals(value)){
    return CodeInsightSettings.ALL;
  }
  else if (CASE_SENSITIVE_NONE.equals(value)){
    return CodeInsightSettings.NONE;
  }
  else {
    return CodeInsightSettings.FIRST_LETTER;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:CodeCompletionPanel.java

示例5: tearDown

@Override
protected void tearDown() throws Exception
{
	LookupManager.getInstance(getProject()).hideActiveLookup();
	UISettings.getInstance().SORT_LOOKUP_ELEMENTS_LEXICOGRAPHICALLY = false;
	CodeInsightSettings.getInstance().COMPLETION_CASE_SENSITIVE = CodeInsightSettings.FIRST_LETTER;
	super.tearDown();
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:8,代码来源:CompletionSortingTestCase.java


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