Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » When is a plugin Editable?
When is a plugin Editable? [message #47101] Mon, 16 February 2009 17:30 Go to next message
Richard Craddock is currently offline Richard CraddockFriend
Messages: 31
Registered: July 2009
Member
I am using the PDE API, and want to add Extensions to a plugin, but all my
plugins return false to isEditable().

The basic code I am using is:

IPluginModelBase[] allModels = PluginRegistry.getActiveModels();

allContributers = Arrays.asList(allModels);
writeableContributers = new ArrayList<IPluginModelBase>();
for (IPluginModelBase model : getAllContributers()){
if (model.isEditable()){
writeableContributers.add(model);
}
}

In this case my "writeable" collection is always empty.

I have the source of (some of) the plugins in my workspace, and I can edit
them using the PDE itself, so I'm a bit unlcear as to what I need to do to
make them editable.


Thanks in advance,

Richard
Re: When is a plugin Editable? [message #47131 is a reply to message #47101] Mon, 16 February 2009 17:51 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Richard Craddock wrote:
> I am using the PDE API, and want to add Extensions to a plugin, but all
> my plugins return false to isEditable().
>
> In this case my "writeable" collection is always empty.
>
> I have the source of (some of) the plugins in my workspace, and I can
> edit them using the PDE itself, so I'm a bit unlcear as to what I need
> to do to make them editable.

It's currently not possible, read the Javadoc of IPluginModelBase.

There's plenty of bugs open around this API issue:

190324: [API] Open API for programmatically adding extensions
https://bugs.eclipse.org/bugs/show_bug.cgi?id=190324
216037: [API] Way to modify MANIFEST files
https://bugs.eclipse.org/bugs/show_bug.cgi?id=216037
190324: [API] Open API for programmatically adding extensions
https://bugs.eclipse.org/bugs/show_bug.cgi?id=190324

There are ways to do this using not API, but before I say anything, what
are you trying to do :)?

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/caniszczyk | http://twitter.com/eclipsesource
Re: When is a plugin Editable? [message #47269 is a reply to message #47131] Tue, 17 February 2009 10:01 Go to previous message
Richard Craddock is currently offline Richard CraddockFriend
Messages: 31
Registered: July 2009
Member
Hi Chris,

So the context is:

What we have at the moment are a number of different Extension Points that
often impact on each other. Also our users have built a hierarchy of
contributions to these extension points, so we are writing a little "SDK"
to present them in a way that makes sense to users of the tool.

In this specific example (I'm starting simple), users can add menu/toolbar
actions to do slightly different things to the built in tools. When they
do this, they will probably want to disable the builtins (or even
contributions that some one else made further down their plugin hierarchy).

The way to disable is through a different extension point.


So... the "SDK" shows the all things they have contributed from any of
their plugin along side the built-ins, and I want to be able to
right-click and create a "disable" contribution based on the selection in
that table.

The intent is NOT that the contribution is made immediately to the current
workspace, I just want to add it to a plugin that is being "edited"
locally for subsequent deployment.

Hope that makes sense.


Richard

PS I don't think the JavaDoc I read really suggests this is not possible..


Chris Aniszczyk wrote:

> Richard Craddock wrote:
>> I am using the PDE API, and want to add Extensions to a plugin, but all
>> my plugins return false to isEditable().
>>
>> In this case my "writeable" collection is always empty.
>>
>> I have the source of (some of) the plugins in my workspace, and I can
>> edit them using the PDE itself, so I'm a bit unlcear as to what I need
>> to do to make them editable.

> It's currently not possible, read the Javadoc of IPluginModelBase.

> There's plenty of bugs open around this API issue:

> 190324: [API] Open API for programmatically adding extensions
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=190324
> 216037: [API] Way to modify MANIFEST files
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=216037
> 190324: [API] Open API for programmatically adding extensions
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=190324

> There are ways to do this using not API, but before I say anything, what
> are you trying to do :)?

> Cheers,

> Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
> http://twitter.com/caniszczyk | http://twitter.com/eclipsesource
Re: When is a plugin Editable? [message #592033 is a reply to message #47101] Mon, 16 February 2009 17:51 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Richard Craddock wrote:
> I am using the PDE API, and want to add Extensions to a plugin, but all
> my plugins return false to isEditable().
>
> In this case my "writeable" collection is always empty.
>
> I have the source of (some of) the plugins in my workspace, and I can
> edit them using the PDE itself, so I'm a bit unlcear as to what I need
> to do to make them editable.

It's currently not possible, read the Javadoc of IPluginModelBase.

There's plenty of bugs open around this API issue:

190324: [API] Open API for programmatically adding extensions
https://bugs.eclipse.org/bugs/show_bug.cgi?id=190324
216037: [API] Way to modify MANIFEST files
https://bugs.eclipse.org/bugs/show_bug.cgi?id=216037
190324: [API] Open API for programmatically adding extensions
https://bugs.eclipse.org/bugs/show_bug.cgi?id=190324

There are ways to do this using not API, but before I say anything, what
are you trying to do :)?

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/caniszczyk | http://twitter.com/eclipsesource
Re: When is a plugin Editable? [message #592075 is a reply to message #47131] Tue, 17 February 2009 10:01 Go to previous message
Richard Craddock is currently offline Richard CraddockFriend
Messages: 31
Registered: July 2009
Member
Hi Chris,

So the context is:

What we have at the moment are a number of different Extension Points that
often impact on each other. Also our users have built a hierarchy of
contributions to these extension points, so we are writing a little "SDK"
to present them in a way that makes sense to users of the tool.

In this specific example (I'm starting simple), users can add menu/toolbar
actions to do slightly different things to the built in tools. When they
do this, they will probably want to disable the builtins (or even
contributions that some one else made further down their plugin hierarchy).

The way to disable is through a different extension point.


So... the "SDK" shows the all things they have contributed from any of
their plugin along side the built-ins, and I want to be able to
right-click and create a "disable" contribution based on the selection in
that table.

The intent is NOT that the contribution is made immediately to the current
workspace, I just want to add it to a plugin that is being "edited"
locally for subsequent deployment.

Hope that makes sense.


Richard

PS I don't think the JavaDoc I read really suggests this is not possible..


Chris Aniszczyk wrote:

> Richard Craddock wrote:
>> I am using the PDE API, and want to add Extensions to a plugin, but all
>> my plugins return false to isEditable().
>>
>> In this case my "writeable" collection is always empty.
>>
>> I have the source of (some of) the plugins in my workspace, and I can
>> edit them using the PDE itself, so I'm a bit unlcear as to what I need
>> to do to make them editable.

> It's currently not possible, read the Javadoc of IPluginModelBase.

> There's plenty of bugs open around this API issue:

> 190324: [API] Open API for programmatically adding extensions
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=190324
> 216037: [API] Way to modify MANIFEST files
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=216037
> 190324: [API] Open API for programmatically adding extensions
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=190324

> There are ways to do this using not API, but before I say anything, what
> are you trying to do :)?

> Cheers,

> Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
> http://twitter.com/caniszczyk | http://twitter.com/eclipsesource
Previous Topic:How to use API tools in headless mode?
Next Topic:cyclic dependecy error while exporting as features
Goto Forum:
  


Current Time: Tue Jun 15 18:57:58 GMT 2021

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

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

Back to the top