Examples of OptionsPreferences


Examples of com.eclipsesource.jshint.ui.internal.preferences.OptionsPreferences

    assertTrue( getConfigText().widget.getEditable() );
  }

  @Test
  public void configText_disabledAfterUncheckingProjectSpecific() {
    new OptionsPreferences( getPreferences() ).setProjectSpecific( true );
    page.createContents( shell );

    getProjectSpecificCheckbox().click();

    assertFalse( getConfigText().widget.getEditable() );
View Full Code Here

Examples of com.eclipsesource.jshint.ui.internal.preferences.OptionsPreferences

    page.createContents( shell );
    getProjectSpecificCheckbox().select();

    page.performOk();

    assertTrue( new OptionsPreferences( getPreferences() ).getProjectSpecific() );
    assertTrue( getSettingsFile().exists() );
  }
View Full Code Here

Examples of com.eclipsesource.jshint.ui.internal.preferences.OptionsPreferences

    assertFalse( getSettingsFile().exists() );
  }

  @Test
  public void performOk_savesConfigFile() {
    new OptionsPreferences( getPreferences() ).setProjectSpecific( true );
    page.createContents( shell );

    page.performOk();

    assertTrue( getConfigFile().exists() );
View Full Code Here

Examples of com.eclipsesource.jshint.ui.internal.preferences.OptionsPreferences

    assertTrue( getConfigFile().exists() );
  }

  @Test
  public void performOk_doesNotSaveConfigFileIfNotProjectSpecific() {
    new OptionsPreferences( getPreferences() ).setProjectSpecific( true );
    page.createContents( shell );

    page.performOk();

    assertTrue( getConfigFile().exists() );
View Full Code Here

Examples of com.eclipsesource.jshint.ui.internal.preferences.OptionsPreferences

    verify( project, never() ).build( CLEAN_BUILD, JSHintBuilder.ID, null, null );
  }

  @Test
  public void performOk_triggersRebuildIfConfigChanged() throws CoreException {
    new OptionsPreferences( getPreferences() ).setProjectSpecific( true );
    page.createContents( shell );
    getConfigText().setText( "{ \"changed\": true }" );

    page.performOk();
View Full Code Here

Examples of com.eclipsesource.jshint.ui.internal.preferences.OptionsPreferences

  }

  @Ignore( "does not work on Eclipse 3.6" )
  @Test
  public void performOk_failsIfWritingFails() throws CoreException {
    new OptionsPreferences( getPreferences() ).setProjectSpecific( true );
    page.createContents( shell );
    createConfigFile( "" ).setResourceAttributes( readOnly() );

    boolean result = page.performOk();
View Full Code Here

Examples of com.eclipsesource.jshint.ui.internal.preferences.OptionsPreferences

    assertFalse( result );
  }

  @Test
  public void performOk_doesNotFailWhenInitialConfigWasInvalid() {
    new OptionsPreferences( getPreferences() ).setProjectSpecific( true );
    new OptionsPreferences( getPreferences() ).setConfig( "-invalid-" );
    page.createContents( shell );
    getConfigText().setText( "{ \"changed\" : true }" );

    boolean result = page.performOk();
View Full Code Here

Examples of com.eclipsesource.jshint.ui.internal.preferences.OptionsPreferences

  }

  @Test
  public void validationError_onStartup() {
    createConfigFile( "-invalid-" );
    new OptionsPreferences( getPreferences() ).setProjectSpecific( true );

    page.createContents( shell );

    assertTrue( page.getErrorMessage().startsWith( "Syntax error" ) );
    assertFalse( page.isValid() );
View Full Code Here

Examples of com.eclipsesource.jshint.ui.internal.preferences.OptionsPreferences

    assertFalse( page.isValid() );
  }

  @Test
  public void validationError_onConfigTextChange() {
    new OptionsPreferences( getPreferences() ).setProjectSpecific( true );
    page.createContents( shell );

    getConfigText().setText( "-invalid-" );

    assertTrue( page.getErrorMessage().startsWith( "Syntax error" ) );
View Full Code Here

Examples of com.eclipsesource.jshint.ui.internal.preferences.OptionsPreferences

    assertFalse( page.isValid() );
  }

  @Test
  public void validationError_clearedOnConfigTextChange() {
    new OptionsPreferences( getPreferences() ).setProjectSpecific( true );
    page.createContents( shell );
    getConfigText().setText( "-invalid-" );

    getConfigText().setText( "{}" );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.