Package com.eclipsesource.jshint.ui.internal.preferences

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


  private final boolean enableErrorMarkers;

  MarkerHandler( MarkerAdapter markerAdapter, Text code ) {
    this.markerAdapter = markerAdapter;
    this.code = code;
    enableErrorMarkers = new JSHintPreferences().getEnableErrorMarkers();
  }
View Full Code Here


  private static void clean( IResource resource ) throws CoreException {
    new MarkerAdapter( resource ).removeMarkers();
  }

  private static InputStream getCustomLib() throws FileNotFoundException {
    JSHintPreferences globalPrefs = new JSHintPreferences();
    if( globalPrefs.getUseCustomLib() ) {
      File file = new File( globalPrefs.getCustomLibPath() );
      return new FileInputStream( file );
    }
    return null;
  }
View Full Code Here

  private Button enableErrorsCheckbox;

  public JSHintPreferencePage() {
    setPreferenceStore( Activator.getDefault().getPreferenceStore() );
    setDescription( "General settings for JSHint" );
    preferences = new JSHintPreferences();
  }
View Full Code Here

    adapter = mock( MarkerAdapter.class );
  }

  @After
  public void tearDown() throws CoreException {
    JSHintPreferences prefs = new JSHintPreferences();
    prefs.resetToDefaults();
    prefs.save();
  }
View Full Code Here

    verify( adapter ).createWarning( 1, 2, 2, "foo" );
  }

  @Test
  public void handleProblem_createsError_ifEnabled() throws CoreException {
    JSHintPreferences prefs = new JSHintPreferences();
    prefs.setEnableErrorMarkers( true );
    prefs.save();
    MarkerHandler handler = new MarkerHandler( adapter, new Text( "test" ) );

    handler.handleProblem( mockError( 1, 2, "foo" ) );

    verify( adapter ).createError( 1, 2, 2, "foo" );
View Full Code Here

TOP

Related Classes of com.eclipsesource.jshint.ui.internal.preferences.JSHintPreferences

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.