Package krasa.formatter.settings

Examples of krasa.formatter.settings.Settings


  public static final String PATH_TO_CONFIG_FILE = "test/resources/org.eclipse.jdt.core.prefs";
  protected JavaCodeFormatterFacade eclipseCodeFormatterFacade;

  @Before
  public void setUp() throws Exception {
    Settings settings = new Settings();
    settings.setPathToConfigFileJava(PATH_TO_CONFIG_FILE);
    eclipseCodeFormatterFacade = new JavaCodeFormatterFacade(settings.getJavaProperties());
  }
View Full Code Here


    return eclipseCodeFormatterFacade.format(input, 0, input.length());
  }

  @Test
  public void testFormatByXML() throws Exception {
    Settings settings = new Settings();
    settings.setPathToConfigFileJava("test/resources/format.xml");
    settings.setSelectedJavaProfile("kuk");
    eclipseCodeFormatterFacade = new JavaCodeFormatterFacade(settings.getJavaProperties());
    String output = format(INPUT);
    Assert.assertEquals(FORMATTED, output);
    output = format(INPUT2);
    Assert.assertEquals(FORMATTED2, output);
  }
View Full Code Here

  public static final String PATH_TO_CONFIG_FILE = "test/resources/org.eclipse.wst.jsdt.core.prefs";

  @Before
  public void setUp() throws Exception {
    Settings settings = new Settings();
    settings.setPathToConfigFileJS(PATH_TO_CONFIG_FILE);
    eclipseCodeFormatterFacade = new JSCodeFormatterFacade(new JSPropertiesProvider(settings));
  }
View Full Code Here

    public void testGenerateName() throws Exception {
        ArrayList<Settings> settingsList = new ArrayList<Settings>();
        Project instance = new MyDummyProject();
        String s = StringUtils.generateName(settingsList, 1, instance.getName());
        Assert.assertEquals("dummy", s);
        settingsList.add(new Settings(1L, "dummy"));

        s = StringUtils.generateName(settingsList, 1, instance.getName());
        Assert.assertEquals("dummy (1)", s);
        settingsList.add(new Settings(1L, "dummy (1)"));

        s = StringUtils.generateName(settingsList, 1, instance.getName());
        Assert.assertEquals("dummy (2)", s);
    }
View Full Code Here

TOP

Related Classes of krasa.formatter.settings.Settings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.