Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 248335 - [ds tooling] Enable/Disable "This component is immediately activated" checkbox
Summary: [ds tooling] Enable/Disable "This component is immediately activated" checkbox
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M3   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-23 15:42 EDT by Simon Archer CLA
Modified: 2008-10-09 17:26 EDT (History)
1 user (show)

See Also:


Attachments
Error Reporter update (4.68 KB, text/plain)
2008-09-30 20:12 EDT, Rafael Oliveira Nóbrega CLA
caniszczyk: iplog+
Details
DSOptionsSection updates (2.03 KB, text/plain)
2008-10-09 16:13 EDT, Rafael Oliveira Nóbrega CLA
caniszczyk: iplog+
Details
mylyn/context/zip (1.44 KB, application/octet-stream)
2008-10-09 17:25 EDT, Chris Aniszczyk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Archer CLA 2008-09-23 15:42:47 EDT
Using Eclipse 3.5M2.

The "This component is immediately activated" should not always be enabled and available for the user to check/uncheck.  

From 112.2.2 of the spec...

"A component is an immediate component if it is not a factory component
and either does not specify a service or specifies a service and the
immediate attribute of the component element set to true."

So, let me try and list the cases:

- Check and disable the checkbox when the component does not provide any services and is not a factory component.

- Uncheck and disable the checkbox when the component is a factory component.


Since the <component> element's factory attribute can only be set from the source page, we're going to have to perform some validation to prevent people from doing this:

  <component name="foo" factory="bar" immediate="true">
     ...
  </component>

Since a factory component is never immediate. Likewise, this should be marked as invalid, since a component that does not provide services is always immediate.

<component name="foo" immediate="false">
   <implementation class="x.Component"/>
</component>

I believe that DS just ignores the immediate attribute when it does not apply, but it still would be nice to point out to people that their setting of the immediate attribute is sometimes worthless.
Comment 1 Chris Aniszczyk CLA 2008-09-23 17:57:13 EDT
I agree!

Can you also think of a better name for this message?

"This component is immediately activated" is kind of vague to me.
Comment 2 Simon Archer CLA 2008-09-23 19:05:41 EDT
Yes, Chris, the wording is vague I agree.  The trouble is, if you don't know what an "immediate" or "enabled" component is these labels are not going to help you much.  I really would like them to be clear to the user, but I fear that that's going to be hard.  I'm wondering whether we should swing back the other way and simply name them:

[x] Enabled
[x] Immediate

Let me ponder it a little and I'll report back.
Comment 3 Chris Aniszczyk CLA 2008-09-30 16:45:56 EDT
Rafael, want to tackle this one?

It's important we get this one right.
Comment 4 Rafael Oliveira Nóbrega CLA 2008-09-30 20:12:42 EDT
Created attachment 113940 [details]
Error Reporter update

Implementation:
+	if (!isService && !isFactory && !isImmediate) {
+			reportInvalidImmediate(element);
+ 		}
+		
+		if (isFactory && isImmediate) {
+			reportInvalidImmediateFactory(element);
+		}

I also modified the DSComponent to set the immediate to true, to avoid warnings while creating a new one. :)
Comment 5 Chris Aniszczyk CLA 2008-09-30 21:53:11 EDT
Thanks Rafael.

I made some wording improvements.
Comment 6 Rafael Oliveira Nóbrega CLA 2008-10-09 16:13:15 EDT
Created attachment 114716 [details]
DSOptionsSection updates

Done!

if (!isService && !isFactory) {
		if (!isImmediate) {	
			fComponent.setImmediate(true);
		}
		enabled = false;
}

if (isFactory) {
	if (isImmediate) {
		fComponent.setImmediate(false);
	}
	enabled = false;
}
Comment 7 Chris Aniszczyk CLA 2008-10-09 17:25:44 EDT
done.

> 20091009

Thanks Rafael.

If you want to do testing that would be appreciated Simon to make sure we haven't broken workflows.
Comment 8 Chris Aniszczyk CLA 2008-10-09 17:25:48 EDT
Created attachment 114720 [details]
mylyn/context/zip