All Downloads are FREE. Search and download functionalities are using the official Maven repository.

editor.MouseInEditorHandler Maven / Gradle / Ivy

There is a newer version: 1.18.1
Show newest version
package editor;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

class MouseInEditorHandler extends MouseAdapter
{
  private final EditorHost _editor;

  public MouseInEditorHandler( EditorHost editor )
  {
    assert editor != null;
    _editor = editor;
  }

  @Override
  public void mouseClicked( MouseEvent e )
  {
    if( e.getButton() == MouseEvent.BUTTON1 && e.isControlDown() )
    {
      // Control-click
      _editor.gotoDeclaration();
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy