Platform extensibility [message #334152] |
Thu, 22 January 2009 08:57 |
David Pérez Messages: 228 Registered: July 2009 |
Senior Member |
|
|
Hi,
I understand that such a big project as Eclipse, used in so many ways by
so many people, has to be accessed by a well defined public API.
Sometimes, I need to use the Platform in ways not initially thought by the
Eclipse designers. So I need to use private API on my own risk. I assume
the risk that internal API's can change in the future at any time.
For example. I need to derive org.eclipse.swt.widget.Table, to tweak a
little its behaviour.
Problem:
This class has many members I need that can only be accessed from classes
in the same package.
Solutions I have tried:
1) Extend in a 3rd party plugin and use the same package. Problem:
different class loaders. I have problems even when using reflection.
2) Place my custom classes in a fragment extending org.eclipse.swt plugin.
Problem: my classes have full access to SWT internals, but cannot be seen
from the outside.
3) Import the plugin as a project. This solution works, but I have to
import hundreds of classes, just for adding one own class. In addition
the org.eclipse.swt.win32.win32.x86 plugin cannot be built by the product
export tool, it crashed. So in my humble opinion, this solution is not
optimal.
So, what is the recommended way to extend the Platform in special cases
where internal API use is needed?
|
|
|
Re: Platform extensibility [message #334207 is a reply to message #334152] |
Mon, 26 January 2009 17:36 |
David Pérez Messages: 228 Registered: July 2009 |
Senior Member |
|
|
Maybe this could be useful:
http://www.eclipse.org/equinox/incubator/aspects/index.php
Some experience somebody would like to share?
David Pérez wrote:
> Hi,
> I understand that such a big project as Eclipse, used in so many ways by
> so many people, has to be accessed by a well defined public API.
> Sometimes, I need to use the Platform in ways not initially thought by the
> Eclipse designers. So I need to use private API on my own risk. I assume
> the risk that internal API's can change in the future at any time.
> For example. I need to derive org.eclipse.swt.widget.Table, to tweak a
> little its behaviour.
> Problem:
> This class has many members I need that can only be accessed from classes
> in the same package.
> Solutions I have tried:
> 1) Extend in a 3rd party plugin and use the same package. Problem:
> different class loaders. I have problems even when using reflection.
> 2) Place my custom classes in a fragment extending org.eclipse.swt plugin.
> Problem: my classes have full access to SWT internals, but cannot be seen
> from the outside.
> 3) Import the plugin as a project. This solution works, but I have to
> import hundreds of classes, just for adding one own class. In addition
> the org.eclipse.swt.win32.win32.x86 plugin cannot be built by the product
> export tool, it crashed. So in my humble opinion, this solution is not
> optimal.
> So, what is the recommended way to extend the Platform in special cases
> where internal API use is needed?
|
|
|
|
Powered by
FUDForum. Page generated in 0.02950 seconds