Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » Custom Task (icon not being replaced)
Custom Task (icon not being replaced) [message #1420178] Tue, 09 September 2014 16:20 Go to next message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member

I've developed a Custom Task and the icon was not being placed on ServiceTask(which is the type that I'm extending).

I looked into the source:

and I noticed that the addImage flag is always false, because an Image Graphiti element is always found. Is this a bug, or am I doing something wrong?

Thanks a lot.


if (icon!=null && pe instanceof ContainerShape) {
				boolean addImage = true;
				ContainerShape containerShape = (ContainerShape)pe;
				GraphicsAlgorithm ga = (GraphicsAlgorithm)AbstractBpmn2AddFeature.getGraphicsAlgorithm(containerShape);
				for (PictogramElement child : containerShape.getChildren()) {
					if (child.getGraphicsAlgorithm() instanceof Image) {
						addImage = false;
				if (ga!=null) {
					for (GraphicsAlgorithm g : ga.getGraphicsAlgorithmChildren()) {
						if (g instanceof Image) {
							addImage = false;
					addImage = false;
                                 if (addImage) {
					Image img = CustomTaskImageProvider.createImage(customTaskDescriptor, ga, icon, 24, 24);
					Graphiti.getGaService().setLocationAndSize(img, 2, 2, 24, 24);

[Updated on: Tue, 09 September 2014 16:20]

Report message to a moderator

Re: Custom Task (icon not being replaced) [message #1427023 is a reply to message #1420178] Fri, 19 September 2014 15:26 Go to previous message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 811
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Yep, looks like a bug because there doesn't seem to be any way to provide your own image if the task type being extended already has one.
Please open a bugzilla report for this.
Previous Topic:Deletion of namespaces with getXMLNSPrefixMap()
Next Topic:Custom Task (change name on creation)
Goto Forum:

Current Time: Fri May 29 08:23:30 GMT 2020

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

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

Back to the top