Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Basic Editor Question
Basic Editor Question [message #604974] Wed, 10 March 2010 15:14 Go to next message
Darin is currently offline DarinFriend
Messages: 12
Registered: March 2010
Junior Member
Hello,

OK, first off here's my specs.

Java Version : j2sdk1.4.2_05
Eclipse Version : 3.3.2 (Europa)

I just had a basic question in regard to creating an editor that supports syntax highlighting (eventually I plan to expand on it, but I want to get this basic part working first). Basically I want to be able to start my project and be able to select File.. Open, select a file and it automatically starts the Editor for that file extension.

I've created the default Plug-in project, based off the "Plug-in with an editor" template, and my one question is this:

How do I go about setting up the project so that when I launch it (F11), I can just select File.. Open, select the .xml file, and it will automatically launch the XML Editor. As it stands now, I have to create a new Java project, add-in the .xml file, and the right click on the .xml file and tell it to "open with..." XML Editor.

For instance, I can start Eclipse (where I have the CDT installed), select File.. Open, select a .c or .cpp file, and the C/C++ Editor is automatically loaded with the .c/.cpp (syntax highlighting and all). Can you please help me and guide me as to what I need to do to get this functionality implemented?

Thanks for your help.


- Darin
Re: Basic Editor Question [message #604982 is a reply to message #604974] Wed, 10 March 2010 18:29 Go to previous messageGo to next message
Stan is currently offline StanFriend
Messages: 20
Registered: July 2009
Junior Member
Open up your editor extension in plugin.xml and add the file extensions you want to handle into the "extensions" field.
Re: Basic Editor Question [message #604985 is a reply to message #604982] Wed, 10 March 2010 18:50 Go to previous message
Darin is currently offline DarinFriend
Messages: 12
Registered: March 2010
Junior Member
I have xml listed in the extensions, but still a no go. I still have to create a project before it will let me open the file in an XML Editor.

I tried setting default to true in the Extensions tab of plugin.xml, but now when I try to open an xml document, when there is no open project, the Editor just opens and displays "ERROR" on the page with a blue line above it. If I have a project open, then I can just open any xml file and it will display fine without me having to select the "Open with...", "XML Editor" option.


- Darin
Previous Topic:update site pde build
Next Topic:Headless build problems
Goto Forum:
  


Current Time: Thu Apr 25 16:18:55 GMT 2024

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

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

Back to the top