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


Java XDebuggerEditorsProvider.getFileType方法代码示例

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


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

示例1: MyTableEditor

import com.intellij.xdebugger.evaluation.XDebuggerEditorsProvider; //导入方法依赖的package包/类
public MyTableEditor(Project project,
                     XDebuggerEditorsProvider debuggerEditorsProvider,
                     @Nullable @NonNls String historyId,
                     @Nullable XSourcePosition sourcePosition, @NotNull XExpression text, @NotNull final KeyAdapter actionAdapter) {
  super(project, debuggerEditorsProvider, EvaluationMode.CODE_FRAGMENT, historyId, sourcePosition);
  myExpression = XExpressionImpl.changeMode(text, getMode());
  myEditorTextField = new EditorTextField(createDocument(myExpression), project, debuggerEditorsProvider.getFileType()) {
    @Override
    protected EditorEx createEditor() {
      final EditorEx editor = super.createEditor();
      editor.setVerticalScrollbarVisible(false);
      editor.setOneLineMode(true);
      editor.getContentComponent().addKeyListener(actionAdapter);
      return editor;
    }

    @Override
    protected boolean isOneLineMode() {
      return true;
    }
  };
  myEditorTextField.setFontInheritedFromLAF(false);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:ArrayTableCellEditor.java

示例2: XDebuggerMultilineEditor

import com.intellij.xdebugger.evaluation.XDebuggerEditorsProvider; //导入方法依赖的package包/类
public XDebuggerMultilineEditor(Project project,
                                 XDebuggerEditorsProvider debuggerEditorsProvider,
                                 @Nullable @NonNls String historyId,
                                 @Nullable XSourcePosition sourcePosition, @NotNull String text) {
  super(project, debuggerEditorsProvider, EvaluationMode.CODE_FRAGMENT, historyId, sourcePosition);
  myEditorTextField = new EditorTextField(createDocument(text), project, debuggerEditorsProvider.getFileType()) {
    @Override
    protected EditorEx createEditor() {
      final EditorEx editor = super.createEditor();
      editor.setVerticalScrollbarVisible(true);
      return editor;
    }

    @Override
    protected boolean isOneLineMode() {
      return false;
    }
  };
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:XDebuggerMultilineEditor.java

示例3: XDebuggerExpressionEditor

import com.intellij.xdebugger.evaluation.XDebuggerEditorsProvider; //导入方法依赖的package包/类
public XDebuggerExpressionEditor(Project project,
                                 XDebuggerEditorsProvider debuggerEditorsProvider,
                                 @Nullable @NonNls String historyId,
                                 @Nullable XSourcePosition sourcePosition,
                                 @NotNull XExpression text,
                                 final boolean multiline) {
  super(project, debuggerEditorsProvider, multiline ? EvaluationMode.CODE_FRAGMENT : EvaluationMode.EXPRESSION, historyId, sourcePosition);
  myExpression = XExpressionImpl.changeMode(text, getMode());
  myEditorTextField =
    new EditorTextField(createDocument(myExpression), project, debuggerEditorsProvider.getFileType(), false, !multiline) {
    @Override
    protected EditorEx createEditor() {
      final EditorEx editor = super.createEditor();
      editor.setVerticalScrollbarVisible(multiline);
      editor.getColorsScheme().setEditorFontName(getFont().getFontName());
      editor.getColorsScheme().setEditorFontSize(getFont().getSize());
      return editor;
    }

    @Override
    public Object getData(String dataId) {
      if (LangDataKeys.CONTEXT_LANGUAGES.is(dataId)) {
        return new Language[]{myExpression.getLanguage()};
      } else if (CommonDataKeys.PSI_FILE.is(dataId)) {
        return PsiDocumentManager.getInstance(getProject()).getPsiFile(getDocument());
      }
      return super.getData(dataId);
    }
  };
  myEditorTextField.setFontInheritedFromLAF(false);
  myEditorTextField.setFont(EditorUtil.getEditorFont());
  myComponent = addChooseFactoryLabel(myEditorTextField, multiline);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:XDebuggerExpressionEditor.java

示例4: XDebuggerExpressionEditor

import com.intellij.xdebugger.evaluation.XDebuggerEditorsProvider; //导入方法依赖的package包/类
public XDebuggerExpressionEditor(Project project,
                                 @Nonnull XDebuggerEditorsProvider debuggerEditorsProvider,
                                 @Nullable @NonNls String historyId,
                                 @Nullable XSourcePosition sourcePosition,
                                 @Nonnull XExpression text,
                                 final boolean multiline,
                                 boolean editorFont,
                                 boolean showEditor) {
  super(project, debuggerEditorsProvider, multiline ? EvaluationMode.CODE_FRAGMENT : EvaluationMode.EXPRESSION, historyId, sourcePosition);
  myExpression = XExpressionImpl.changeMode(text, getMode());
  myEditorTextField =
          new EditorTextField(createDocument(myExpression), project, debuggerEditorsProvider.getFileType(), false, !multiline) {
            @Override
            protected EditorEx createEditor() {
              final EditorEx editor = super.createEditor();
              editor.setVerticalScrollbarVisible(multiline);
              editor.getColorsScheme().setEditorFontName(getFont().getFontName());
              editor.getColorsScheme().setEditorFontSize(getFont().getSize());
              return editor;
            }

            @Override
            public Object getData(@Nonnull Key dataId) {
              if (LangDataKeys.CONTEXT_LANGUAGES == dataId) {
                return new Language[]{myExpression.getLanguage()};
              } else if (CommonDataKeys.PSI_FILE == dataId) {
                return PsiDocumentManager.getInstance(getProject()).getPsiFile(getDocument());
              }
              return super.getData(dataId);
            }
          };
  if (editorFont) {
    myEditorTextField.setFontInheritedFromLAF(false);
    myEditorTextField.setFont(EditorUtil.getEditorFont());
  }
  myComponent = decorate(myEditorTextField, multiline, showEditor);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:38,代码来源:XDebuggerExpressionEditor.java


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