Home » Newcomers » Newcomers » javaeditor - conversion of plugin.xml to MANIFEST.MF
javaeditor - conversion of plugin.xml to MANIFEST.MF [message #186133] |
Sat, 30 December 2006 09:10  |
Eclipse User |
|
|
|
Originally posted by: bernardd173.yahoo.com
I've been struggling to create a custom editor based on Eclipse 3.2 -
there's an earlier posting about missing steps in the tutorial.
I've gone back to 3.1.2 which is more consistent and can bring up the
example javaeditor, however when I try to create the editor for my own
language based on this the PDE creates a MANIFEST.MF file instead of a
plugin.xml. The plug-in compiles OK, though I had to create a small
plugin.xml to make Eclipse sensitive to my file name suffix.
Unfortunately when I try to open a file with that suffix Eclipse can't
locate my plug-in classes and exits, even though they look correct to me.
I tried to convert the example javaeditor plugin.xml to a MANIFEST using
the "create OSGI bundle manifest" button on the Overview tab, however that
cause the example editor to stop working with the same missing classes
messages until I manually delete the manifest file. Has anyone else been
able to make this conversion?
I'm at something of a loss here. Does anyone know what the manifest file
for the example javaeditor ought to look like? Or am I better to abandon
this and go back to the plugin.xml approach?
Also, if I get the manifest solution to work, what syntax do I need to
make the plug-in sensitive to a particular file suffix?
Thanks,
Bernard
|
|
|
Re: javaeditor - conversion of plugin.xml to MANIFEST.MF [message #186158 is a reply to message #186133] |
Sat, 30 December 2006 16:24   |
Eclipse User |
|
|
|
Originally posted by: wharley.bea.com
"Bernard" <bernardd173@yahoo.com> wrote in message
news:6193a527f7664f166975c3f9a0c42de9$1@www.eclipse.org...
>
> [...]
>
> I'm at something of a loss here. Does anyone know what the manifest file
> for the example javaeditor ought to look like? Or am I better to abandon
> this and go back to the plugin.xml approach?
I can't help with most of your questions; but perhaps it will help to
understand better the distinction between plugin.xml and manifest.mf.
They both play important, but separate, roles. The main purpose of
plugin.xml is to declare extensions and extension points, such as menu
entries, preference pages, and the like. The main purpose of manifest.mf is
to declare the runtime properties of the plug-in, such as which other
plug-ins it depends on, what classes it exports, whether it is to be
initialized upon first load, and so forth.
So, you almost always need a manifest.mf; generally speaking for a plug-in
that contributes UI (such as an editor), you also need a plugin.xml. But
their entries cover different ground.
Some of the confusion may stem from the fact that prior to Eclipse 3.0, the
situation was different; you could put all the relevant info into
plugin.xml. That's still partly possible for reasons of backward
compatibility, but it is not recommended and doing so will limit the
features you have access to.
One good way of familiarizing yourself with what's where is to look at
working plug-ins. For instance, you could look at the JDT plug-ins, to see
what's in their plugin.xml and manifest.mf files.
Hope that helps!
|
|
| |
Re: javaeditor - conversion of plugin.xml to MANIFEST.MF [message #186183 is a reply to message #186174] |
Sat, 30 December 2006 21:11   |
Eclipse User |
|
|
|
Originally posted by: wharley.bea.com
"Bernard" <bernardd173@yahoo.com> wrote in message
news:a35a260e1a0a725dec0a35b548610739$1@www.eclipse.org...
>
> Thanks for the suggestion, but that's essentially what I'm struggling
> with - the only JDT plug-in on the welcome page is, you quessed it, the
> Java Editor that doesn't have a manifest.mf file! I've re-loaded 3.2.1
> and that's just the same. Do you know if there are any more examples I
> can get?
Are you sure you're looking in the right place? I'm looking at the
org.eclipse.jdt.ui plug-in, and it definitely contains both a plugin.xml (at
the root) and a META-INF/MANIFEST.MF. I'd be very surprised if there were
any plug-ins in Eclipse 3.2+ that didn't have manifests.
You might also look at org.eclipse.ui.editors. (It, too, has both.)
> The amount of time I've burned on this now is crazy - the concept of
> Eclipse is good, but I know from my experiences as a vendor that the rate
> of adoption is going to be hampered if the community can't get the first
> couple of examples to match the releases and work straight out of the box.
Well, keep in mind that the majority of users aren't trying to write new
editors, they're just using Eclipse as a programming environment to edit,
test, debug, etc. their non-Eclipse-based products.
That said, do you have the "Developing Commercial Plug-ins for Eclipse"
book? It's really invaluable.
|
|
| | | |
Re: javaeditor - conversion of plugin.xml to MANIFEST.MF [message #186336 is a reply to message #186311] |
Tue, 02 January 2007 10:35  |
Eclipse User |
|
|
|
Originally posted by: bernardd173.yahoo.com
Daniel Megert wrote:
> Mh. Again a bit too casual ;-). It would help to tell what is not
> working for you. I if it really is not working then this is the wrong
> forum. You should file a bug report () with steps to reproduce.
Dani,
Part of my problem is, as a total newcomer, I don't know what should be
happening, and what's actually required, so I don't know what symptoms to
describe. There is a new thread running in which I've isolated the
problem (I think!) to an issue with breakpoints in the debugger. As a
newcomer to Eclipse I promise you this episode has been PAINFULL and VERY
time consuming.
One of the issues here is the information I've been able to get from
Eclipse is that it can't find the constructor for the
'JavaEditorExamplePlugin' class and it suggests it might be mis-typed in
the plugin.xml file. That, mistakenly led me down the plugin / manifest
path which, as you know, is not the cause, but beyond that I can't seem to
find any more information that's of any value - I only discovered the
breakpoint issue by accident. There doesn't seem to be anything more of
any value in the .log files, in fact when Eclipse dies with the missing
constructor the child instance doesn't seem to write a .log file which
doesn't help either.
Do you have any suggestions for information I can get that will help debug
this stupid but quite fundamental problem?
Thanks,
Bernard
|
|
|
Goto Forum:
Current Time: Thu Jul 17 04:45:55 EDT 2025
Powered by FUDForum. Page generated in 0.11773 seconds
|