Eclipse 4 RCP: passing attributes to dynamically created parts

229 views
Skip to first unread message

Ernesto

unread,
Apr 12, 2012, 12:01:13 PM4/12/12
to vog...@googlegroups.com
Hello. I want to know if there's a way to pass attributes to parts created in execution time. This is because I want the new part to be created according to user's selection in another part. This is something like project explorer, when you double-click a file and a new editor for that file opens.

By now, I've got a provisory solution creating a singleton to get user selections. I catch the selected item (it's on a treeviewer) on a singleton's attribute, and access it in the @PostConstruct for the new part. That works fine, but I'd like to know if there's a "platform correct way" to achieve this.

--
Regards,
            Ernesto

Lars Vogel

unread,
Apr 12, 2012, 3:01:55 PM4/12/12
to vog...@googlegroups.com
Hi,

This might help. The tutorial is still a bit rough, but might be a good starting point.

Best regards, Lars

2012/4/12 Ernesto <ernes...@gmail.com>


--
Regards,
            Ernesto

--
You received this message because you are subscribed to the Google Groups "vogella" group.
To view this discussion on the web visit https://groups.google.com/d/msg/vogella/-/18Peu7kUSUUJ.
To post to this group, send email to vog...@googlegroups.com.
To unsubscribe from this group, send email to vogella+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/vogella?hl=en.



--
Lars
http://www.vogella.de - Eclipse, Android and Java Tutorials
http://www.twitter.com/vogella - Lars on Twitter

Ernesto

unread,
Apr 12, 2012, 6:45:57 PM4/12/12
to vog...@googlegroups.com
What might help?... tutorial doesn't tell or I've skiped that part! I think I don't understand your answer! sorry :S


El jueves, 12 de abril de 2012 16:01:55 UTC-3, vogella escribió:
Hi,

This might help. The tutorial is still a bit rough, but might be a good starting point.

Best regards, Lars

2012/4/12 Ernesto
Hello. I want to know if there's a way to pass attributes to parts created in execution time. This is because I want the new part to be created according to user's selection in another part. This is something like project explorer, when you double-click a file and a new editor for that file opens.


By now, I've got a provisory solution creating a singleton to get user selections. I catch the selected item (it's on a treeviewer) on a singleton's attribute, and access it in the @PostConstruct for the new part. That works fine, but I'd like to know if there's a "platform correct way" to achieve this.

--
Regards,
            Ernesto

--

Lars Vogel

unread,
Apr 18, 2012, 12:29:35 AM4/18/12
to vog...@googlegroups.com
This supports the MInputPart by which an Input can be provided to the InputPart.

2012/4/13 Ernesto <ernes...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "vogella" group.
To view this discussion on the web visit https://groups.google.com/d/msg/vogella/-/ItZwIl0Qq4UJ.

To post to this group, send email to vog...@googlegroups.com.
To unsubscribe from this group, send email to vogella+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/vogella?hl=en.

Ernesto

unread,
Apr 20, 2012, 10:14:20 AM4/20/12
to vog...@googlegroups.com
Thanks! I fainally understand how to get what tou were saying!


El miércoles, 18 de abril de 2012 01:29:35 UTC-3, vogella escribió:
This supports the MInputPart by which an Input can be provided to the InputPart.

2012/4/13 Ernesto <ernes...@gmail.com>
What might help?... tutorial doesn't tell or I've skiped that part! I think I don't understand your answer! sorry :S

El jueves, 12 de abril de 2012 16:01:55 UTC-3, vogella escribió:
Hi,

This might help. The tutorial is still a bit rough, but might be a good starting point.

Best regards, Lars

2012/4/12 Ernesto
Hello. I want to know if there's a way to pass attributes to parts created in execution time. This is because I want the new part to be created according to user's selection in another part. This is something like project explorer, when you double-click a file and a new editor for that file opens.


By now, I've got a provisory solution creating a singleton to get user selections. I catch the selected item (it's on a treeviewer) on a singleton's attribute, and access it in the @PostConstruct for the new part. That works fine, but I'd like to know if there's a "platform correct way" to achieve this.

--
Regards,
            Ernesto

--



--
Lars
http://www.vogella.de - Eclipse, Android and Java Tutorials
http://www.twitter.com/vogella - Lars on Twitter

--
You received this message because you are subscribed to the Google Groups "vogella" group.
To view this discussion on the web visit https://groups.google.com/d/msg/vogella/-/ItZwIl0Qq4UJ.

To post to this group, send email to vog...@googlegroups.com.
To unsubscribe from this group, send email to vogella+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/vogella?hl=en.
Reply all
Reply to author
Forward
0 new messages