Basic Editor Question [message #604974] |
Wed, 10 March 2010 10:14  |
Eclipse User |
|
|
|
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 #604985 is a reply to message #604982] |
Wed, 10 March 2010 13:50  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.06471 seconds