Home » Eclipse Projects » Eclipse Platform » lazy bundle activation policy issue
lazy bundle activation policy issue [message #533374] |
Thu, 13 May 2010 15:17 |
|
Hi,
We have our plugin/bundle marked in the Manifest as:
Bundle-ActivationPolicy: lazy
When in the Eclipse SDK and using Debug As | Eclipse Application, the
policy is observed and our plugin is not activated until the user selects
a contributed UI Part like a View.
When we do a PDE build and copy the plugin jar to the plugins directory
of a target stock Eclipse SDK and run that target Eclipse...the plugin's
Activator class is called every time. The Manifest is getting exported
during the build.
Are we overlooking something?
Thanks,
Dilton
|
|
| |
Re: lazy bundle activation policy issue [message #533431 is a reply to message #533379] |
Thu, 13 May 2010 20:58 |
|
On Thu, 13 May 2010 11:28:51 -0400, Ed Merks wrote:
>
> Dilton wrote:
>> Hi,
>>
>> We have our plugin/bundle marked in the Manifest as:
>>
>> Bundle-ActivationPolicy: lazy
>>
>> When in the Eclipse SDK and using Debug As | Eclipse Application, the
>> policy is observed and our plugin is not activated until the user
>> selects a contributed UI Part like a View.
>>
>> When we do a PDE build and copy the plugin jar to the plugins directory
>> of a target stock Eclipse SDK and run that target Eclipse...the
>> plugin's Activator class is called every time. The Manifest is getting
>> exported during the build.
>>
>> Are we overlooking something?
>>
> Dilton,
>
> You've set a breakpoint and looked at the stack to see what's causing
> the activation?
>
Hi Ed,
Let me clarify a bit. I copy the plugin jar to a target eclipse directory
unpacked just for testing, playing the role of the customer.
Fresh eclipse, fresh workspace, freshly built plugin, no source.
Dilton
|
|
|
Re: lazy bundle activation policy issue [message #533435 is a reply to message #533431] |
Thu, 13 May 2010 21:18 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------070306040009050807060601
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Dilton,
In the end, you're going to have to track down why it's being activated,
even if the bug is in Eclipse itself. How do you know it is being
activated?
Dilton wrote:
> On Thu, 13 May 2010 11:28:51 -0400, Ed Merks wrote:
>
>
>> Dilton wrote:
>>
>>> Hi,
>>>
>>> We have our plugin/bundle marked in the Manifest as:
>>>
>>> Bundle-ActivationPolicy: lazy
>>>
>>> When in the Eclipse SDK and using Debug As | Eclipse Application, the
>>> policy is observed and our plugin is not activated until the user
>>> selects a contributed UI Part like a View.
>>>
>>> When we do a PDE build and copy the plugin jar to the plugins directory
>>> of a target stock Eclipse SDK and run that target Eclipse...the
>>> plugin's Activator class is called every time. The Manifest is getting
>>> exported during the build.
>>>
>>> Are we overlooking something?
>>>
>>>
>
>
>> Dilton,
>>
>> You've set a breakpoint and looked at the stack to see what's causing
>> the activation?
>>
>>
>
> Hi Ed,
>
> Let me clarify a bit. I copy the plugin jar to a target eclipse directory
> unpacked just for testing, playing the role of the customer.
>
> Fresh eclipse, fresh workspace, freshly built plugin, no source.
>
> Dilton
>
--------------070306040009050807060601
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Dilton,<br>
<br>
In the end, you're going to have to track down why it's being
activated, even if the bug is in Eclipse itself. How do you know it is
being activated? <br>
<br>
<br>
Dilton wrote:
<blockquote cite="mid:hshp5s$d8m$1@build.eclipse.org" type="cite">
<pre wrap="">On Thu, 13 May 2010 11:28:51 -0400, Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Dilton wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
We have our plugin/bundle marked in the Manifest as:
Bundle-ActivationPolicy: lazy
When in the Eclipse SDK and using Debug As | Eclipse Application, the
policy is observed and our plugin is not activated until the user
selects a contributed UI Part like a View.
When we do a PDE build and copy the plugin jar to the plugins directory
of a target stock Eclipse SDK and run that target Eclipse...the
plugin's Activator class is called every time. The Manifest is getting
exported during the build.
Are we overlooking something?
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
</pre>
<blockquote type="cite">
<pre wrap="">Dilton,
You've set a breakpoint and looked at the stack to see what's causing
the activation?
</pre>
</blockquote>
<pre wrap=""><!---->
Hi Ed,
Let me clarify a bit. I copy the plugin jar to a target eclipse directory
unpacked just for testing, playing the role of the customer.
Fresh eclipse, fresh workspace, freshly built plugin, no source.
Dilton
</pre>
</blockquote>
</body>
</html>
--------------070306040009050807060601--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: lazy bundle activation policy issue [message #533448 is a reply to message #533435] |
Thu, 13 May 2010 22:41 |
|
On Thu, 13 May 2010 17:18:04 -0400, Ed Merks wrote:
> Dilton,
>
> In the end, you're going to have to track down why it's being activated,
> even if the bug is in Eclipse itself. How do you know it is being
> activated?
>
Thanks for the feedback Ed. I'm going to work up a sample that
demonstrates the problem (if it shows itself to be reproducible)
then file a bug report with the sample.
|
|
|
Re: lazy bundle activation policy issue [message #533502 is a reply to message #533448] |
Fri, 14 May 2010 09:49 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------030305060704010905070708
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Dilton,
Yes, a test case is the only way. But take note that if something like
this were generally and fundamentally broken, someone would have noticed
years ago. Note that even without source, you can still set
breakpoints in the outline view when you open the .class file directly.
So personally I'd set a breakpoint in the activation code and look down
the stack to see what's causing that.
Dilton wrote:
> On Thu, 13 May 2010 17:18:04 -0400, Ed Merks wrote:
>
>
>> Dilton,
>>
>> In the end, you're going to have to track down why it's being activated,
>> even if the bug is in Eclipse itself. How do you know it is being
>> activated?
>>
>>
>
> Thanks for the feedback Ed. I'm going to work up a sample that
> demonstrates the problem (if it shows itself to be reproducible)
> then file a bug report with the sample.
>
--------------030305060704010905070708
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Dilton,<br>
<br>
Yes, a test case is the only way. But take note that if something like
this were generally and fundamentally broken, someone would have
noticed years ago. Note that even without source, you can still set
breakpoints in the outline view when you open the .class file
directly. So personally I'd set a breakpoint in the activation code
and look down the stack to see what's causing that. <br>
<br>
<br>
Dilton wrote:
<blockquote cite="mid:hshv6o$cgt$1@build.eclipse.org" type="cite">
<pre wrap="">On Thu, 13 May 2010 17:18:04 -0400, Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Dilton,
In the end, you're going to have to track down why it's being activated,
even if the bug is in Eclipse itself. How do you know it is being
activated?
</pre>
</blockquote>
<pre wrap=""><!---->
Thanks for the feedback Ed. I'm going to work up a sample that
demonstrates the problem (if it shows itself to be reproducible)
then file a bug report with the sample.
</pre>
</blockquote>
</body>
</html>
--------------030305060704010905070708--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: lazy bundle activation policy issue [message #534054 is a reply to message #533502] |
Mon, 17 May 2010 19:49 |
|
On Fri, 14 May 2010 05:49:17 -0400, Ed Merks wrote:
> years ago. Note that even without source, you can still set
> breakpoints in the outline view when you open the .class file directly.
> So personally I'd set a breakpoint in the activation code and look down
> the stack to see what's causing that.
I ended up creating a stack trace in the test system in the
Bundle Activator class in the start() method which showed me
that an exported service was the trigger. I added an exclusion to
the manifest:
Bundle-ActivationPolicy: lazy; exclude:="com.xyz.MyService"
This did not appear to work at first, so I then ran eclipse with
-clean and -refresh (probably the clean was enough) and things
worked fine. Testing both with the above line change and without it
provided consistent indications.
Thanks for the responses Ed.
|
|
|
Goto Forum:
Current Time: Tue Apr 23 08:25:01 GMT 2024
Powered by FUDForum. Page generated in 0.03055 seconds
|