Esempio n. 1
0
  @Override
  protected void setUp() throws Exception {
    Hashtable<String, String> options = TestOptions.getDefaultOptions();
    options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.SPACE);
    options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "4");
    JavaCore.setOptions(options);

    IPreferenceStore store = JavaPlugin.getDefault().getPreferenceStore();
    store.setValue(PreferenceConstants.CODEGEN_ADD_COMMENTS, false);

    fJProject1 = ProjectTestSetup.getProject();

    fSourceFolder = JavaProjectHelper.addSourceContainer(fJProject1, "src");
  }
Esempio n. 2
0
  @Override
  protected void setUp() throws Exception {
    Hashtable<String, String> options = TestOptions.getDefaultOptions();
    options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.SPACE);
    options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "4");
    options.put(
        DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_LOCAL_VARIABLE,
        JavaCore.DO_NOT_INSERT);

    JavaCore.setOptions(options);

    IPreferenceStore store = JavaPlugin.getDefault().getPreferenceStore();
    store.setValue(PreferenceConstants.CODEGEN_ADD_COMMENTS, false);

    fJProject1 = Java18ProjectTestSetup.getProject();

    StubUtility.setCodeTemplate(CodeTemplateContextType.METHODSTUB_ID, "", null);
    StubUtility.setCodeTemplate(CodeTemplateContextType.CONSTRUCTORSTUB_ID, "", null);

    fSourceFolder = JavaProjectHelper.addSourceContainer(fJProject1, "src");
  }