Bug 4339 - Getting the line number in xml-added Ruler actions (1GHFI37)
Summary: Getting the line number in xml-added Ruler actions (1GHFI37)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 2.0 M5   Edit
Assignee: Kai-Uwe Maetzel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 23:10 EDT by Kai-Uwe Maetzel CLA
Modified: 2002-05-02 09:51 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai-Uwe Maetzel CLA 2001-10-10 23:10:03 EDT
An EC issue:

I am having a problem with adding an editor action to the Ruler popup menu.

Once my action is called I want call
  textEditor.getVerticalRuler().getLineOfLastMouseButtonActivity(); 

but getVerticalRuler() is a protected method of AbstractTextEditor.

Is there some other way to get the line in the ruler area that the popup
originated from?

-----------------------------------------------------------

> Is this for an editor of your own devising, or for an arbitrary editor?

The action is being added to an arbitrary editor.  (Any editor that
supports the targetID=\"#TextRulerContext\")


> A better solution would be to pass the ruler to the actions which need it.
> AbstractTextEditor, and certain subclasses like the Java editor do this.
> They pass the ruler to the relevant actions when creating them.

The action is an extension of org.eclipse.ui.popupMenus.  I add the action
to the Ruler popup menu. I don\'t think I have any way of changing how my
action is called. 

NOTES:
Comment 1 DJ Houghton CLA 2001-10-23 23:37:03 EDT
PRODUCT VERSION:
	127

Comment 2 Kai-Uwe Maetzel CLA 2002-05-02 09:51:45 EDT
Build 20020416.