Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » about the editor view
about the editor view [message #149368] Mon, 27 October 2003 00:24 Go to next message
Eclipse UserFriend
Originally posted by: rc316.shaw.ca

Hello all,

I have a couple of questions regarding the editor view. First, I've added
an item to a context menu and the context menu is when you higlight text in
the editor and right-click it. The thing is that my item shows up only when
I highlight text from a .txt file but it doesn't work for a .java file.
Does anyone have any suggestions why this occurs?

My second question is regarding the fact that I want to mimic the action of
when a file opens, it opens up in the editor view and every file you open
tabs the previous one. However, I want to invoke this action when I click
something in a view I've created. What I've done so far is when i
double-click, the information i want displayed is written to a file using
the FileWriter class. Then, I create a class that implements the IFile
interface. Once that's done, I'm calling the openEditor(IFile) function
from the workbenchpage class.
I was wondering if there is any other way of doing it?

Thanks in advance.
Cheers,

Raj
Re: about the editor view [message #149390 is a reply to message #149368] Mon, 27 October 2003 02:44 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.tkilla.ch

Raj Chari wrote:
> I have a couple of questions regarding the editor view. First, I've added
> an item to a context menu and the context menu is when you higlight text in
> the editor and right-click it. The thing is that my item shows up only when
> I highlight text from a .txt file but it doesn't work for a .java file.
> Does anyone have any suggestions why this occurs?

Every editor has its own context menu id - you have to add your action
to each editor you want it to show up. Examples are:

- #TextEditorContext - Text editor
- #CompilationUnitEditorContext - Compilation Unit (Java) editor

etc. To find them, search in the newsgroup or look at the respective
editor implementations.

-tom
Previous Topic:Javadoc help inside the IDE
Next Topic:Exporting Project as Deployable Plugin
Goto Forum:
  


Current Time: Tue Oct 28 06:45:02 EDT 2025

Powered by FUDForum. Page generated in 0.03550 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top