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


Java FormattingModelProvider类代码示例

本文整理汇总了Java中com.intellij.formatting.FormattingModelProvider的典型用法代码示例。如果您正苦于以下问题:Java FormattingModelProvider类的具体用法?Java FormattingModelProvider怎么用?Java FormattingModelProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: createModel

import com.intellij.formatting.FormattingModelProvider; //导入依赖的package包/类
@NotNull
@Override
public FormattingModel createModel(final PsiElement element, final CodeStyleSettings settings) {

    final Block impexBlock = new ImpexBlock(
        element.getNode(),
        null,
        Alignment.createAlignment(),
        createSpaceBuilder(settings)
    );

    return FormattingModelProvider.createFormattingModelForPsiFile(
        element.getContainingFile(),
        impexBlock,
        settings
    );
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:18,代码来源:ImpexFormattingModelBuilder.java

示例2: createModel

import com.intellij.formatting.FormattingModelProvider; //导入依赖的package包/类
@NotNull
@Override
public FormattingModel createModel(PsiElement element, CodeStyleSettings settings) {
    ASTNode root = CsvFormatHelper.getRoot(element.getNode());
    CsvFormattingInfo formattingInfo = new CsvFormattingInfo(
            settings,
            CsvFormatHelper.createSpaceBuilder(settings),
            CsvFormatHelper.createColumnInfoMap(root, settings)
    );

    return FormattingModelProvider.createFormattingModelForPsiFile(
            element.getContainingFile(),
            new CsvBlock(root, formattingInfo),
            settings
    );
}
 
开发者ID:SeeSharpSoft,项目名称:intellij-csv-validator,代码行数:17,代码来源:CsvFormattingModelBuilder.java

示例3: createModel

import com.intellij.formatting.FormattingModelProvider; //导入依赖的package包/类
@NotNull
@Override
public FormattingModel createModel(
    final PsiElement element, final CodeStyleSettings settings
) {
    final Block block = new FlexibleSearchBlock(
        element.getNode(),
        null,
        Alignment.createAlignment(),
        createSpaceBuilder(settings)
    );

    return FormattingModelProvider.createFormattingModelForPsiFile(element.getContainingFile(), block, settings);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:15,代码来源:FlexibleSearchFormattingModelBuilder.java

示例4: createModel

import com.intellij.formatting.FormattingModelProvider; //导入依赖的package包/类
@NotNull
@Override
public FormattingModel createModel(PsiElement element, CodeStyleSettings settings) {
    PsiFile containingFile = element.getContainingFile().getViewProvider().getPsi(ProtoLanguage.INSTANCE);
    ASTNode fileNode = containingFile.getNode();
    Wrap wrap = Wrap.createWrap(WrapType.NONE, false);
    Alignment alignment = Alignment.createAlignment();
    ProtoFileBlock block = new ProtoFileBlock(fileNode, wrap, alignment, settings);
    return FormattingModelProvider.createFormattingModelForPsiFile(containingFile, block, settings);
}
 
开发者ID:protostuff,项目名称:protobuf-jetbrains-plugin,代码行数:11,代码来源:FormattingModelBuilder.java

示例5: createModel

import com.intellij.formatting.FormattingModelProvider; //导入依赖的package包/类
@NotNull
@Override
public FormattingModel createModel(PsiElement element, CodeStyleSettings settings) {

    final com.amazon.ion.plugin.intellij.formatting.IonBlock rootBlock = new com.amazon.ion.plugin.intellij.formatting.IonBlock(element.getNode(),
            Wrap.createWrap(WrapType.NONE, false),
            Alignment.createAlignment(true),
            createSpaceBuilder(settings), settings);

    return FormattingModelProvider.createFormattingModelForPsiFile(
            element.getContainingFile(),
            rootBlock, settings);
}
 
开发者ID:amzn,项目名称:ion-intellij-plugin,代码行数:14,代码来源:IonFormattingModelBuilder.java

示例6: createModel

import com.intellij.formatting.FormattingModelProvider; //导入依赖的package包/类
@NotNull
@Override
public FormattingModel createModel(PsiElement element, CodeStyleSettings settings) {
    return FormattingModelProvider.createFormattingModelForPsiFile(element.getContainingFile(),
            new CndBlock(element.getNode(), Wrap.createWrap(WrapType.ALWAYS, false),
                    Alignment.createAlignment(), createSpaceBuilder(settings)), settings);
}
 
开发者ID:Tolc,项目名称:IntelliJ_Jahia_plugin,代码行数:8,代码来源:CndFormattingModelBuilder.java

示例7: createModel

import com.intellij.formatting.FormattingModelProvider; //导入依赖的package包/类
@NotNull
@Override
public FormattingModel createModel(PsiElement element, CodeStyleSettings settings) {
    return FormattingModelProvider.createFormattingModelForPsiFile(
            element.getContainingFile(),
            new JSGraphQLBlock(null, element.getNode(), null, null, createSpaceBuilder(settings)),
            settings);
}
 
开发者ID:jimkyndemeyer,项目名称:js-graphql-intellij-plugin,代码行数:9,代码来源:JSGraphQLFormattingModelBuilder.java

示例8: createModel

import com.intellij.formatting.FormattingModelProvider; //导入依赖的package包/类
@NotNull
@Override
public FormattingModel createModel(PsiElement element, CodeStyleSettings settings) {
    return FormattingModelProvider.createFormattingModelForPsiFile(
            element.getContainingFile(),
            new JSGraphQLEndpointBlock(null, element.getNode(), null, null, createSpaceBuilder(settings)),
            settings);
}
 
开发者ID:jimkyndemeyer,项目名称:js-graphql-intellij-plugin,代码行数:9,代码来源:JSGraphQLEndpointFormattingModelBuilder.java

示例9: createModel

import com.intellij.formatting.FormattingModelProvider; //导入依赖的package包/类
@NotNull
@Override
public FormattingModel createModel(@NotNull PsiElement element,
                                   @NotNull CodeStyleSettings settings,
                                   @NotNull FormattingMode mode) {
  final BuckBlock block =
      new BuckBlock(null, element.getNode(), settings, null, Indent.getNoneIndent(), null);
  return FormattingModelProvider.createFormattingModelForPsiFile(
      element.getContainingFile(),
      block,
      settings);
}
 
开发者ID:wangyanxing,项目名称:Buck-IntelliJ-Plugin,代码行数:13,代码来源:BuckFormattingModelBuilder.java

示例10: createModel

import com.intellij.formatting.FormattingModelProvider; //导入依赖的package包/类
@Override
public FormattingModel createModel(
    PsiElement element, CodeStyleSettings settings, FormattingMode mode) {
  final BuckBlock block =
      new BuckBlock(element.getNode(), settings, null, Indent.getNoneIndent(), null);
  return FormattingModelProvider.createFormattingModelForPsiFile(
      element.getContainingFile(), block, settings);
}
 
开发者ID:facebook,项目名称:buck,代码行数:9,代码来源:BuckFormattingModelBuilder.java

示例11: createModel

import com.intellij.formatting.FormattingModelProvider; //导入依赖的package包/类
@Override
@NotNull
public FormattingModel createModel(PsiElement element, CodeStyleSettings settings) {
  return FormattingModelProvider.createFormattingModelForPsiFile(element.getContainingFile(), new RncBlock(element.getNode()), settings);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:RncFormattingModelBuilder.java

示例12: createModel

import com.intellij.formatting.FormattingModelProvider; //导入依赖的package包/类
@NotNull
public FormattingModel createModel(PsiElement element, CodeStyleSettings settings) {
  return FormattingModelProvider.createFormattingModelForPsiFile(element.getContainingFile(), new RncBlock(element.getNode()), settings);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:5,代码来源:RncFormattingModelBuilder.java

示例13: HaxeFormattingModel

import com.intellij.formatting.FormattingModelProvider; //导入依赖的package包/类
public HaxeFormattingModel(final PsiFile file,
                           CodeStyleSettings settings,
                           final Block rootBlock) {
  myModel = FormattingModelProvider.createFormattingModelForPsiFile(file, rootBlock, settings);
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:6,代码来源:HaxeFormattingModel.java

示例14: JSFormattingModel

import com.intellij.formatting.FormattingModelProvider; //导入依赖的package包/类
public JSFormattingModel(final PsiFile file, CodeStyleSettings settings, final Block rootBlock)
{
	myModel = FormattingModelProvider.createFormattingModelForPsiFile(file, rootBlock, settings);
}
 
开发者ID:consulo,项目名称:consulo-javascript,代码行数:5,代码来源:JSFormattingModel.java


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