Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 14:10 Go to next message
Eclipse UserFriend
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 21:24 Go to previous messageGo to next message
Eclipse UserFriend
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 #186174 is a reply to message #186158] Sun, 31 December 2006 00:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bernardd173.yahoo.com

Walter Harley wrote:

> 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!


Walter,

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?

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.

Thanks,

Bernard
Re: javaeditor - conversion of plugin.xml to MANIFEST.MF [message #186183 is a reply to message #186174] Sun, 31 December 2006 02:11 Go to previous messageGo to next message
Eclipse UserFriend
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 #186198 is a reply to message #186133] Sun, 31 December 2006 12:07 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Bernard wrote:

>
> 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.

Which tutorial are you talking about? Or do you refer to the Java editor
sample? The sample is part of the examples download and does not have a
manifest.mf but that's not a must have).

Dani

>
> 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 #186214 is a reply to message #186198] Sun, 31 December 2006 15:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bernardd173.yahoo.com

> Which tutorial are you talking about? Or do you refer to the Java editor
> sample? The sample is part of the examples download and does not have a
> manifest.mf but that's not a must have).

Sorry, I was too casual with the description I used. Yes, it's the
"sample". And I understand it's not necessary to have a manifest.mf but I
think it would be easier of newcomers like me to learn Eclipse if the
examples stayed in step.

Moving on, I think some of my earlier diagnosis was wrong. I've
re-installed 3.2.1 and downloaded the "sample" editor again and can "run"
it but cannot "debug" it. I think some of my earlier confusion was
because there must be some other default editor handling the .jav files -
I only spotted that because the icon was different.

Is there some other step I need to take to build the "sample" for debug?
How does the new Eclipse instance know where the classes are located? How
is the location of the source files set up? Could these be reasons why
I'm getting messages that the editor class can't be found?

Thanks,

Bernard
Re: javaeditor - conversion of plugin.xml to MANIFEST.MF [message #186311 is a reply to message #186214] Tue, 02 January 2007 14:59 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Bernard wrote:

>
>> Which tutorial are you talking about? Or do you refer to the Java
>> editor sample? The sample is part of the examples download and does
>> not have a manifest.mf but that's not a must have).
>
>
> Sorry, I was too casual with the description I used. Yes, it's the
> "sample". And I understand it's not necessary to have a manifest.mf
> but I think it would be easier of newcomers like me to learn Eclipse
> if the examples stayed in step.

I suggest to write a bug report
(https://bugs.eclipse.org/bugs/enter_bug.cgi).

>
> Moving on, I think some of my earlier diagnosis was wrong. I've
> re-installed 3.2.1 and downloaded the "sample" editor again and can
> "run" it but cannot "debug" it. I think some of my earlier confusion
> was because there must be some other default editor handling the .jav
> files - I only spotted that because the icon was different.
>
> Is there some other step I need to take to build the "sample" for debug?

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

> How does the new Eclipse instance know where the classes are located?
> How is the location of the source files set up? Could these be
> reasons why I'm getting messages that the editor class can't be found?
>
> Thanks,
>
> Bernard
>
>
Re: javaeditor - conversion of plugin.xml to MANIFEST.MF [message #186336 is a reply to message #186311] Tue, 02 January 2007 15:35 Go to previous message
Eclipse UserFriend
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
Previous Topic:Eclipse 3.2.1, JDK 1.6 : OutOfMemoryError crashes?
Next Topic:Comment tag and jsp code tag issue
Goto Forum:
  


Current Time: Fri Apr 26 03:30:09 GMT 2024

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

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

Back to the top