Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Extending an existing plug-in through a fragment
Extending an existing plug-in through a fragment [message #115698] Wed, 06 August 2008 08:41 Go to next message
David  Pérez is currently offline David PérezFriend
Messages: 228
Registered: July 2009
Senior Member
Hi,

I want to add functionality to SWT, by adding new classes in the
org.eclipse.swt.widgets package.
One solution would be to create my custom version of SWT.
Another one, the preferred, is to create a fragment project.
The problem is that my new class:

package org.eclipse.swt.widgets

class TableEx extends Table {
....
}

cannot import anything from SWT (the host plugin).
The org.eclipse.swt.widgets.Table isn't recognized.

I need to also import stuff from the org.eclipse.swt.win32.win32.x86
fragment.
I also fails.


Any help will be greatly appreciated
Re: Extending an existing plug-in through a fragment [message #115723 is a reply to message #115698] Wed, 06 August 2008 11:49 Go to previous messageGo to next message
David  Pérez is currently offline David PérezFriend
Messages: 228
Registered: July 2009
Senior Member
Maybe my problem is due to the fact I'm trying to use code in another
fragment from the same host.

I have tried to remove all signing info from org.eclipse.swt*.jar, in case
this is a problem, but it doesn't resolve anything.

David Perez wrote:

> Hi,

> I want to add functionality to SWT, by adding new classes in the
> org.eclipse.swt.widgets package.
> One solution would be to create my custom version of SWT.
> Another one, the preferred, is to create a fragment project.
> The problem is that my new class:

> package org.eclipse.swt.widgets

> class TableEx extends Table {
> ....
> }

> cannot import anything from SWT (the host plugin).
> The org.eclipse.swt.widgets.Table isn't recognized.

> I need to also import stuff from the org.eclipse.swt.win32.win32.x86
> fragment.
> I also fails.


> Any help will be greatly appreciated
Re: Extending an existing plug-in through a fragment [message #115869 is a reply to message #115723] Mon, 11 August 2008 16:17 Go to previous messageGo to next message
David  Pérez is currently offline David PérezFriend
Messages: 228
Registered: July 2009
Senior Member
Please, any hint from an Eclipse guru?

I've tried other alternatives to create a fragment:

1) to create a custom version of
org.eclipse.swt.win32.win32.x86_3.4.0.v3448f.jar and it works, but the
automated build fails.

2) Another one is to place my custom class in a bundle that isn't a
fragment, but with this code:

@SuppressWarnings("restriction")
public class TableEx extends Table {

@Override int /*long*/ windowProc (int /*long*/ hwnd, int msg, int
/*long*/ wParam, int /*long*/ lParam) {
....
return super.windowProc(hwnd, msg, wParam, lParam);
}
}

My custom windowProc() is never called by Windows.
TableEx and Table are in the same package but different bundles.


David Perez wrote:

> Maybe my problem is due to the fact I'm trying to use code in another
> fragment from the same host.

> I have tried to remove all signing info from org.eclipse.swt*.jar, in case
> this is a problem, but it doesn't resolve anything.

> David Perez wrote:

>> Hi,

>> I want to add functionality to SWT, by adding new classes in the
>> org.eclipse.swt.widgets package.
>> One solution would be to create my custom version of SWT.
>> Another one, the preferred, is to create a fragment project.
>> The problem is that my new class:

>> package org.eclipse.swt.widgets

>> class TableEx extends Table {
>> ....
>> }

>> cannot import anything from SWT (the host plugin).
>> The org.eclipse.swt.widgets.Table isn't recognized.

>> I need to also import stuff from the org.eclipse.swt.win32.win32.x86
>> fragment.
>> I also fails.


>> Any help will be greatly appreciated
Re: Extending an existing plug-in through a fragment [message #115968 is a reply to message #115723] Wed, 13 August 2008 12:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Jens.Borrmann.gillardon.de

David Perez schrieb:
> Maybe my problem is due to the fact I'm trying to use code in another
> fragment from the same host.
>
> I have tried to remove all signing info from org.eclipse.swt*.jar, in
> case this is a problem, but it doesn't resolve anything.
>
> David Perez wrote:
>
>> Hi,
>
>> I want to add functionality to SWT, by adding new classes in the
>> org.eclipse.swt.widgets package.
>> One solution would be to create my custom version of SWT.
>> Another one, the preferred, is to create a fragment project.
>> The problem is that my new class:
>
>> package org.eclipse.swt.widgets
>
>> class TableEx extends Table {
>> ....
>> }
>
>> cannot import anything from SWT (the host plugin).
>> The org.eclipse.swt.widgets.Table isn't recognized.
>
>> I need to also import stuff from the org.eclipse.swt.win32.win32.x86
>> fragment.
>> I also fails.
>
>
>> Any help will be greatly appreciated
>
>
Hi,

unfortunately, I cannot answer your question, but have a similar problem
:-) I just opened a thread
(news://news.eclipse.org:119/g7uicj$cqn$1@build.eclipse.org) in which I
ask the general version of your question. Hopefully we will receive an
answer soon.

--Jens
Re: Extending an existing plug-in through a fragment [message #684448 is a reply to message #115698] Wed, 15 June 2011 15:28 Go to previous message
Mario Marinato is currently offline Mario MarinatoFriend
Messages: 29
Registered: March 2011
Location: Brazil
Junior Member
Hi, David,

I'm facing the same problem. Did you find a solution?

Regards,

Mario Marinato
~ from Brazil


Mário Marinato
From Brazil
Previous Topic:How can I customize the uninstallation process of Eclipse features?
Next Topic:How can I safely use an Eclipse p2 profile?
Goto Forum:
  


Current Time: Sun Nov 23 03:39:29 GMT 2014

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

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