Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How to correctly set up environment for SWT plugin development
How to correctly set up environment for SWT plugin development [message #1060697] Tue, 28 May 2013 01:37 Go to next message
Jeff Friedrichs is currently offline Jeff FriedrichsFriend
Messages: 1
Registered: May 2013
Junior Member
I have been asked to write a plugin for an existing SWT Eclipse project. I have the SDK that is released by the project.

Following Lars Vogel's excellent tutorials, I created a new project and exported it as a plugin. I am able to run the original project and activate my plugin.

Now as I try to utilize the SDK, Eclipse is failing to validate/find classes in the SDK that I want to import into the code for the new plug in. I have included the SDK in the project dependency of the build path and I have tried various ways to do it with the plugin.xml

My first question is, should my new plugin be a separate project or should I import the SDK as a project and create my plugin as a package within the SDK?

It feels like I should do it that way, but when I import the SDK, it is not getting imported as a JAVA buildable package. (Maybe this is also why I can't import into a different package?)


I am also having problems using external jar files. Here, I am able to import them and get the code to build, but when I export the plugin, I get a class not found error when I invoke the class.

Any suggestions on good tutorials for setting up the environment correctly when using an SDK to develop a plugin?

Thanks!
Re: How to correctly set up environment for SWT plugin development [message #1060905 is a reply to message #1060697] Wed, 29 May 2013 06:07 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Jeff,

Comments below.

On 28/05/2013 2:41 PM, Jeff Friedrichs wrote:
> I have been asked to write a plugin for an existing SWT Eclipse
> project. I have the SDK that is released by the project.
>
> Following Lars Vogel's excellent tutorials, I created a new project
> and exported it as a plugin. I am able to run the original project
> and activate my plugin.
>
> Now as I try to utilize the SDK, Eclipse is failing to validate/find
> classes in the SDK that I want to import into the code for the new
> plug in. I have included the SDK in the project dependency of the
> build path and I have tried various ways to do it with the plugin.xml
Assuming you're trying to develop plugins, i.e., that your Java projects
are plugin projects, you'd not modify the build path directly but rather
modify the MANIFEST.MF using the Dependencies tab.
>
> My first question is, should my new plugin be a separate project or
> should I import the SDK as a project and create my plugin as a package
> within the SDK?
No, you don't need to import the SDK, just make your plugin depend on
the specific plugins you need.
>
> It feels like I should do it that way, but when I import the SDK, it
> is not getting imported as a JAVA buildable package. (Maybe this is
> also why I can't import into a different package?)
>
>
> I am also having problems using external jar files. Here, I am able
> to import them and get the code to build, but when I export the
> plugin, I get a class not found error when I invoke the class.
Such jars need to be bundled into a plugin as well. I.e., put them in a
plugin project and via the Runtime tab, specify the locations of those
jars within the project.
>
> Any suggestions on good tutorials for setting up the environment
> correctly when using an SDK to develop a plugin?
Read a little bit about the PDE (Plugin Development Environment).
>
> Thanks!


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Animation start has encountered a problem
Next Topic:Eclipse Plugin Development
Goto Forum:
  


Current Time: Wed Apr 24 17:43:58 GMT 2024

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

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

Back to the top