entry.getValue ().setCodeFoldingEnabled ( allowCodeFolding.isSelected () );
}
}
}
} );
final WebLabel allowCodeFoldingLabel = new WebLabel ( "Allow code folding" );
allowCodeFoldingLabel.setDrawShade ( true );
allowCodeFoldingLabel.addMouseListener ( new MouseAdapter ()
{
@Override
public void mousePressed ( final MouseEvent e )
{
if ( SwingUtils.isLeftMouseButton ( e ) )
{
allowCodeFolding.requestFocusInWindow ();
allowCodeFolding.doClick ();
}
}
} );
popupContent.add ( new GroupPanel ( 5, allowCodeFolding, allowCodeFoldingLabel ) );
paintTabLines = new WebToggleButton ( loadEditorIcon ( "paintTabLines" ) );
paintTabLines.registerSettings ( SETTINGS_PREFIX + "paintTabLines", false );
paintTabLines.addItemListener ( new ItemListener ()
{
@Override
public void itemStateChanged ( final ItemEvent e )
{
synchronized ( activeEditorsLock )
{
for ( final Map.Entry<JarEntry, RSyntaxTextArea> entry : activeEditors.entrySet () )
{
entry.getValue ().setPaintTabLines ( paintTabLines.isSelected () );
}
}
}
} );
final WebLabel paintTabLinesLabel = new WebLabel ( "Paint tab lines" );
paintTabLinesLabel.setDrawShade ( true );
paintTabLinesLabel.addMouseListener ( new MouseAdapter ()
{
@Override
public void mousePressed ( final MouseEvent e )
{
if ( SwingUtils.isLeftMouseButton ( e ) )
{
paintTabLines.requestFocusInWindow ();
paintTabLines.doClick ();
}
}
} );
popupContent.add ( new GroupPanel ( 5, paintTabLines, paintTabLinesLabel ) );
showWhitespaces = new WebToggleButton ( loadEditorIcon ( "showWhitespaces" ) );
showWhitespaces.registerSettings ( SETTINGS_PREFIX + "showWhitespaces", false );
showWhitespaces.addItemListener ( new ItemListener ()
{
@Override
public void itemStateChanged ( final ItemEvent e )
{
synchronized ( activeEditorsLock )
{
for ( final Map.Entry<JarEntry, RSyntaxTextArea> entry : activeEditors.entrySet () )
{
entry.getValue ().setWhitespaceVisible ( showWhitespaces.isSelected () );
}
}
}
} );
final WebLabel showWhitespacesLabel = new WebLabel ( "Show whitespaces" );
showWhitespacesLabel.setDrawShade ( true );
showWhitespacesLabel.addMouseListener ( new MouseAdapter ()
{
@Override
public void mousePressed ( final MouseEvent e )
{
if ( SwingUtils.isLeftMouseButton ( e ) )
{
showWhitespaces.requestFocusInWindow ();
showWhitespaces.doClick ();
}
}
} );
popupContent.add ( new GroupPanel ( 5, showWhitespaces, showWhitespacesLabel ) );
showEol = new WebToggleButton ( loadEditorIcon ( "showEol" ) );
showEol.registerSettings ( SETTINGS_PREFIX + "showEol", false );
showEol.addItemListener ( new ItemListener ()
{
@Override
public void itemStateChanged ( final ItemEvent e )
{
synchronized ( activeEditorsLock )
{
for ( final Map.Entry<JarEntry, RSyntaxTextArea> entry : activeEditors.entrySet () )
{
entry.getValue ().setEOLMarkersVisible ( showEol.isSelected () );
}
}
}
} );
final WebLabel showEolLabel = new WebLabel ( "Show end of line" );
showEolLabel.setDrawShade ( true );
showEolLabel.addMouseListener ( new MouseAdapter ()
{
@Override
public void mousePressed ( final MouseEvent e )
{
if ( SwingUtils.isLeftMouseButton ( e ) )