本文整理汇总了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);
}
}
示例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;
}
}
示例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();
}
示例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;
}
}
示例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();
}