Search in sources :

Example 76 with IPreferenceStore

use of org.eclipse.jface.preference.IPreferenceStore in project che by eclipse.

the class ReorgQuickFixTest method setUp.

//	public static Test suite() {
//		return setUpTest(new TestSuite(THIS));
//	}
//
//	public static Test setUpTest(Test test) {
//		return new ProjectTestSetup(test);
//	}
@Before
public void setUp() throws Exception {
    super.setUp();
    Hashtable options = TestOptions.getDefaultOptions();
    options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.SPACE);
    options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "4");
    options.put(JavaCore.COMPILER_PB_UNUSED_IMPORT, JavaCore.ERROR);
    JavaCore.setOptions(options);
    IPreferenceStore store = JavaPlugin.getDefault().getPreferenceStore();
    store.setValue(PreferenceConstants.CODEGEN_ADD_COMMENTS, false);
    fJProject1 = ProjectTestSetup.getProject();
    fSourceFolder = JavaProjectHelper.addSourceContainer(fJProject1, "src");
}
Also used : Hashtable(java.util.Hashtable) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) Before(org.junit.Before)

Example 77 with IPreferenceStore

use of org.eclipse.jface.preference.IPreferenceStore in project che by eclipse.

the class TestFormatterOptions method initializeCodeGenerationOptions.

public static void initializeCodeGenerationOptions() {
    IPreferenceStore store = JavaPlugin.getDefault().getPreferenceStore();
    store.setValue(PreferenceConstants.CODEGEN_KEYWORD_THIS, false);
    store.setValue(PreferenceConstants.CODEGEN_IS_FOR_GETTERS, true);
    //$NON-NLS-1$
    store.setValue(PreferenceConstants.CODEGEN_EXCEPTION_VAR_NAME, "e");
    store.setValue(PreferenceConstants.CODEGEN_ADD_COMMENTS, true);
    //$NON-NLS-1$
    store.setValue(PreferenceConstants.ORGIMPORTS_IMPORTORDER, "java;javax;org;com");
    store.setValue(PreferenceConstants.ORGIMPORTS_ONDEMANDTHRESHOLD, 99);
    store.setValue(PreferenceConstants.ORGIMPORTS_IGNORELOWERCASE, true);
}
Also used : IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore)

Example 78 with IPreferenceStore

use of org.eclipse.jface.preference.IPreferenceStore in project che by eclipse.

the class AdvancedQuickAssistTest18 method setUp.

@Before
public void setUp() throws Exception {
    super.setUp();
    Hashtable 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);
    store.setValue(PreferenceConstants.CODEGEN_KEYWORD_THIS, false);
    StubUtility.setCodeTemplate(CodeTemplateContextType.METHODSTUB_ID, "//TODO\n${body_statement}", null);
    fJProject1 = Java18ProjectTestSetup.getProject();
    fSourceFolder = JavaProjectHelper.addSourceContainer(fJProject1, "src");
}
Also used : Hashtable(java.util.Hashtable) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) Before(org.junit.Before)

Example 79 with IPreferenceStore

use of org.eclipse.jface.preference.IPreferenceStore in project che by eclipse.

the class LocalCorrectionsQuickFixTest17 method setUp.

//
//	public static Test suite() {
//		return setUpTest(new TestSuite(THIS));
//	}
//
//	public static Test setUpTest(Test test) {
//		return new Java17ProjectTestSetup(test);
//	}
@Before
@Override
public void setUp() throws Exception {
    super.setUp();
    Hashtable options = TestOptions.getDefaultOptions();
    options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.SPACE);
    options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "4");
    options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, String.valueOf(99));
    options.put(JavaCore.COMPILER_PB_STATIC_ACCESS_RECEIVER, JavaCore.ERROR);
    options.put(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION, JavaCore.IGNORE);
    options.put(JavaCore.COMPILER_PB_MISSING_HASHCODE_METHOD, JavaCore.WARNING);
    options.put(JavaCore.COMPILER_PB_REDUNDANT_TYPE_ARGUMENTS, JavaCore.WARNING);
    JavaCore.setOptions(options);
    IPreferenceStore store = JavaPlugin.getDefault().getPreferenceStore();
    store.setValue(PreferenceConstants.CODEGEN_ADD_COMMENTS, false);
    StubUtility.setCodeTemplate(CodeTemplateContextType.CATCHBLOCK_ID, "", null);
    StubUtility.setCodeTemplate(CodeTemplateContextType.CONSTRUCTORSTUB_ID, "", null);
    StubUtility.setCodeTemplate(CodeTemplateContextType.METHODSTUB_ID, "", null);
    fJProject1 = Java17ProjectTestSetup.getProject();
    fSourceFolder = JavaProjectHelper.addSourceContainer(fJProject1, "src");
}
Also used : Hashtable(java.util.Hashtable) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) Before(org.junit.Before)

Example 80 with IPreferenceStore

use of org.eclipse.jface.preference.IPreferenceStore in project che by eclipse.

the class LocalCorrectionsQuickFixTest method setUp.

//
//	public static Test suite() {
//		return setUpTest(new TestSuite(THIS));
//	}
//
//	public static Test setUpTest(Test test) {
//		return new ProjectTestSetup(test);
//	}
@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    Hashtable options = TestOptions.getDefaultOptions();
    options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.SPACE);
    options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "4");
    options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, String.valueOf(99));
    options.put(JavaCore.COMPILER_PB_STATIC_ACCESS_RECEIVER, JavaCore.ERROR);
    options.put(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION, JavaCore.IGNORE);
    options.put(JavaCore.COMPILER_PB_MISSING_HASHCODE_METHOD, JavaCore.WARNING);
    JavaCore.setOptions(options);
    IPreferenceStore store = JavaPlugin.getDefault().getPreferenceStore();
    store.setValue(PreferenceConstants.CODEGEN_ADD_COMMENTS, false);
    StubUtility.setCodeTemplate(CodeTemplateContextType.CATCHBLOCK_ID, "", null);
    StubUtility.setCodeTemplate(CodeTemplateContextType.CONSTRUCTORSTUB_ID, "", null);
    StubUtility.setCodeTemplate(CodeTemplateContextType.METHODSTUB_ID, "", null);
    fJProject1 = ProjectTestSetup.getProject();
    fSourceFolder = JavaProjectHelper.addSourceContainer(fJProject1, "src");
}
Also used : Hashtable(java.util.Hashtable) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) Before(org.junit.Before)

Aggregations

IPreferenceStore (org.eclipse.jface.preference.IPreferenceStore)161 ArrayList (java.util.ArrayList)31 Hashtable (java.util.Hashtable)19 Before (org.junit.Before)17 List (java.util.List)14 IElementParameter (org.talend.core.model.process.IElementParameter)12 FontData (org.eclipse.swt.graphics.FontData)11 ElementParameter (org.talend.designer.core.model.components.ElementParameter)11 InvocationTargetException (java.lang.reflect.InvocationTargetException)10 Font (org.eclipse.swt.graphics.Font)10 Composite (org.eclipse.swt.widgets.Composite)9 File (java.io.File)7 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)7 StyledText (org.eclipse.swt.custom.StyledText)7 SelectionEvent (org.eclipse.swt.events.SelectionEvent)7 Point (org.eclipse.swt.graphics.Point)7 GridLayout (org.eclipse.swt.layout.GridLayout)7 Node (org.talend.designer.core.ui.editor.nodes.Node)7 GridData (org.eclipse.swt.layout.GridData)6 IOException (java.io.IOException)5