Home » Eclipse Projects » Eclipse Platform » Is "Contributing to Eclipse" still valid with M8?
Is "Contributing to Eclipse" still valid with M8? [message #243340] |
Fri, 21 May 2004 17:56  |
Eclipse User |
|
|
|
I was hoping that the book would still be of help for developing plugings
for the Eclipse 3 line but that doesn't seem to be the case. For instance
when going through the Hello World example and performing a Run As ->
Runtime
Workbench, the new instance doesn't show the plug-in. And some classes
are marked as deprecated. And hello.jar is not generated. Etc etc. So I
would like to know if I should just give up or if I am missing something
simple.
If the book is really obsoleted by new developments, where can one find a
guide as to what has changed? I looked around but apart from the list of
new
features included with each milestone build, there doesn't seem to be _any_
documentation.
Thanks =
|
|
|
Re: Is "Contributing to Eclipse" still valid with M8? [message #243675 is a reply to message #243340] |
Sat, 22 May 2004 16:31   |
Eclipse User |
|
|
|
Hallo Hilde,
the book is very helpful and explains the basic concepts and ideas.
This knowledge is not tied to tight to an actual implementation and
therefore is still valid. However some of the underlying mechanics have
changed, but the old methods will help you to find the new methods (see
@deprecated in javadoc).
I can see that you are frustrated, but if you track the current
development builds there will never be exhaustive, up-to-date
documentation, but the code.
Regarding your actual problem. If you're really just starting out and
want to write a Hello-World Plugin, go for Eclipse 2.1.1. It will behave
exactly as advertised ;-) After you surpass the Hello-World-Level, you
can still switch to a more current version of Eclipse. Likely the 3.0
final version will be out by then.
If you want help with the Hello-World Plug-in, please be more
specific. How do you know that your Plug-In is not loaded? Did you check
Help/About Eclipse Platform/Plug-in Details in the runtime-workbench?
Have you got a plugin.xml? Did you change the run-settings for launching
the runtime-workbench? By default your plug-ins should've been loaded.
Viele Grüße,
Mariano
Hilde Roth wrote:
> I was hoping that the book would still be of help for developing plugings
> for the Eclipse 3 line but that doesn't seem to be the case. For instance
> when going through the Hello World example and performing a Run As ->
> Runtime
> Workbench, the new instance doesn't show the plug-in. And some classes
> are marked as deprecated. And hello.jar is not generated. Etc etc. So I
> would like to know if I should just give up or if I am missing something
> simple.
>
> If the book is really obsoleted by new developments, where can one find a
> guide as to what has changed? I looked around but apart from the list of
> new
> features included with each milestone build, there doesn't seem to be _any_
> documentation.
>
> Thanks =
>
|
|
|
Re: Is "Contributing to Eclipse" still valid with M8? [message #246597 is a reply to message #243675] |
Thu, 27 May 2004 18:32   |
Eclipse User |
|
|
|
Thanks a lot for the help Mariano. I switched to 2.1.3 indeed (you sound
liked I should have used 2.1.1 instead and indeed I ran into a few very
minor issues) after seeing all the posts from people much more experienced
than me about their own difficulties (even between M8 and M9).
That got me as far as section 12.3. However here I am stumped inside
ListenerTest: two types used in it (JUnitPlugin and ITestRunListener),
which are supposed to come from org.eclipse.contribution.junit, are not
recognized and give me errors, even though the plugin in question is
duly listed among the dependancies, is of course in the workspace and
was even installed (as per 10.3). So I don't understand what I am
doing wrong: the only thing special about that plugin is that it is
one I just created (i.e., it is not a binary plugin within the workspace)
but since all plugins are equal...
Subsidiary question: how can I see the computed classpath? There does
not seem to be any tab in any form showing it "in clear".
Another issue I have ran into is that sometimes when I install a plugin
manually I still do not see it even after restarting Eclipse. But if a
web-driven installation of the same plugin is available, it works. That
was the case with the PDE JUnit plugin. The difference was that I had
grabbed the 3.0.0 file whereas, after automatic installation, it became
clear I should have grabbed 2.1.5. Other than trying to unzip all files
until one works, is there a better way to diagnose such version
incompatibilities? Can Eclipse be told to put some message when it
"see" a plugin but decides to reject it?
Thanks a lot,
Hilde
|
|
|
Re: Is "Contributing to Eclipse" still valid with M8? [message #246926 is a reply to message #246597] |
Fri, 28 May 2004 13:10   |
Eclipse User |
|
|
|
Hi Hilde,
> Thanks a lot for the help Mariano. I switched to 2.1.3 indeed (you sound
> liked I should have used 2.1.1 instead and indeed I ran into a few very
> minor issues) after seeing all the posts from people much more experienced
> than me about their own difficulties (even between M8 and M9).
Nope, my fault. I meant the latest stable release and assumed 2.1.1 was
the latest, but was wrong. I am usually using milestone builds and don't
track the final releases.
The milestone builds are pretty stable and we (team of around ten
developers) use them "in production".
But as you're beginning with eclipse and Erich/Kent based their book on
this version, it makes sense to do the same.
If you have more experience with eclipse it should be easy to follow the
milestone builds.
The downside of using the stable builds is, that most people on this
group are using the milestone builds and cannot be exact about what was
current in the stable build from a year ago.
> That got me as far as section 12.3. However here I am stumped inside
> ListenerTest: two types used in it (JUnitPlugin and ITestRunListener),
> which are supposed to come from org.eclipse.contribution.junit, are not
> recognized and give me errors, even though the plugin in question is
> duly listed among the dependancies, is of course in the workspace and
> was even installed (as per 10.3). So I don't understand what I am
> doing wrong: the only thing special about that plugin is that it is
> one I just created (i.e., it is not a binary plugin within the workspace)
> but since all plugins are equal...
Sorry, I lent my copy of the book to a friend and don't really know what
the example is about.
Can you see anything in the problems view? Or on the first page of the
multi-part-editor of plugin.xml? Sometimes you see error messages there.
Did you check the classpath? Right click on the project's folder,
right-klick, chose Properties and go for the "Java Build Path". Check
the "Libraries" tab. Under the Plugin-Dependies node you should find the
junit plug-in. It might be that the exact way to display this
information is a bit different in 2.1.3, but you'll get the picture.
If it is not there, right-click on plugin.xml and select "Update
Classpath". If you don't find it there, look for a submenu called "PDE
Tools". That sets the classpath according to the dependencies specified
in plugin.xml. In current versions of eclipse this is not necessary, as
it is automagically done by PDE every time you change the dependencies
in plugin.xml. But I don't for sure that this was already true for 2.1.1.
> Subsidiary question: how can I see the computed classpath? There does
> not seem to be any tab in any form showing it "in clear".
See above.
What exactly do you mean by "in the clear"? The traditional way, like on
the command line? I don't know any way to see that at build-time. But
anyway, you could always use the above mentioned approach.
And it is not that simple at run-time either. Every plug-in has its own
classpath. The classpath of the workbench itself just knows about
bootstrap.jar.
What you can tweak is, what plug-ins are loaded. You do that in the
run-dialog.
> Another issue I have ran into is that sometimes when I install a plugin
> manually I still do not see it even after restarting Eclipse. But if a
> web-driven installation of the same plugin is available, it works. That
> was the case with the PDE JUnit plugin. The difference was that I had
> grabbed the 3.0.0 file whereas, after automatic installation, it became
> clear I should have grabbed 2.1.5. Other than trying to unzip all files
> until one works, is there a better way to diagnose such version
> incompatibilities?
Sorry, no clue. If it is not specified in the documentation that is
around the download, I am not sure if there is a way to find out about
the dependencies. What you can do with features is, to install them with
the update functionality. This also works for downloaded files on your
local disk.
> Can Eclipse be told to put some message when it
> "see" a plugin but decides to reject it?
Not to my knowledge. You might want to have a look at the run-dialog's
"Tracing" tab. You can specify for all plug-in how verbose they should
be. For eclipse 2.1.3 you want to look out for the
org.eclipse.core.runtime plug-in to see what gets loaded. See for
yourself which categories you want to enable. You'll see the output in
the console.
For eclipse 3.0 you want to look out for the org.eclipse.osgi plug-in.
In both cases you may start with enabling all debug-categories and then
turn them off iteratively to narrow down to the categories you need.
Cheers,
Mariano
|
|
| | | |
Re: Is "Contributing to Eclipse" still valid with M8? [message #247324 is a reply to message #247230] |
Sun, 30 May 2004 07:47   |
Eclipse User |
|
|
|
Hi Hilde,
interesting problem.
Hard to tell from remote where the problem is. Thanks for your
explanation what you tried already. That makes it easier. Also thanks
for isolating the problem.
Please press Ctrl+Shift+T (Open Type) and enter ITestRunListener. Do
you see *your* ITestRunListener, i.e. in your package, lower part of the
dialog.
If not, you probably have a spelling error or did put the .java file
someplace where it isn't picked up in the classpath.
If so, you have named it properly and it is available in the
workspace. Please check if you declared the class as public.
I am running out of ideas here. Could you please send me both
plug-ins by mail?
Btw. Do you know about Ctrl+Shift+O in the editor? It will
automagically reorganize the import statements for you.
Cheers,
Mariano
Hilde Roth wrote:
> Duh! For TestCase/Testcase, you were right: it was just a typo. Sorry
> about that. So we are back to the earlier situation, i.e.,
>
> package org.eclipse.contribution.junit.test;
>
> import org.eclipse.contribution.junit.*;
> import junit.framework.TestCase;
>
> public class ListenerTest extends TestCase {
> private ITestRunListener listener;
> }
>
> gives:
>
> Warning: The import org.eclipse.contribution.junit is never used
> Error: ITestRunListener cannot be resolved (or is not a valid type)
> for the field ListenerTest.listener
>
> I am inventing the line "private ITestRunListener listener;" but it
> shows the problem in its simplest form. This time no typo. Removing
> the first import gets rid of the warning but not of the error of course.
> OTOH replacing it with
>
> import org.eclipse.contribution.junit.ITestRunListener;
>
> gives
>
> Error: The import org.eclipse.contribution.junit.ITestRunListener
> cannot be resolved
>
> So here you have it: ITestRunListener is declared in the contributed
> junit plugin, which is listed as a dependancy and whose jar exports
> all classes, as per the manifest (I also checked on the filesystem
> that the jar file in the plugins subdirectory has the right name) yet
> this test plugin cannot find it no matter what.
>
> Note: if I use the search facility to look up the declaration(s) of the
> ITestRunListener type, I get the one from org.eclipse.jdt.junit and only
> that one. Yet org.eclipse.contribution.junit is installed since I can
> see it both under Help -> About Eclipse Platform -> Plug-in Details and
> in the list of importable plugins (File -> Import -> External plugins &
> fragments).
>
> Any idea?
>
> Hilde
>
|
|
|
Re: Is "Contributing to Eclipse" still valid with M8? [message #247723 is a reply to message #247324] |
Mon, 31 May 2004 18:54  |
Eclipse User |
|
|
|
> If not, you probably [...] put the .java file someplace where it
> isn't picked up in the classpath.
Almost. As per my other post on the JDT forum the clue was the outline
J near the file icons. What happened is that something I did to plugin.xml
caused it to "forget" org.eclipse.contribution.junit/src in the buildpath,
causing the entire project to revert to a mere "resource". That explains
why it was not available for other plugins to use.
Hilde
|
|
|
Goto Forum:
Current Time: Sun Jun 08 17:41:36 EDT 2025
Powered by FUDForum. Page generated in 0.24114 seconds
|