use of com.intellij.codeInsight.template.Result in project intellij-plugins by JetBrains.
the class DartClassNameMethodNameMacro method calculateResult.
@Override
public Result calculateResult(@NotNull Expression[] params, final ExpressionContext context) {
final Result classNameResult = (new DartClassNameMacro()).calculateResult(params, context);
final Result methodNameResult = (new DartMethodNameMacro()).calculateResult(params, context);
if (classNameResult != null && methodNameResult != null) {
return new TextResult(classNameResult.toString() + "." + methodNameResult.toString());
} else if (classNameResult == null && methodNameResult != null) {
return new TextResult(methodNameResult.toString());
} else if (classNameResult != null) {
return new TextResult(classNameResult.toString());
} else {
return null;
}
}
Aggregations