Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329794

Summary: [All diagrams] The size of links cannot be modified
Product: [Modeling] Papyrus Reporter: Yann Tanguy <yann.tanguy>
Component: DiagramAssignee: Patrick Tessier <Patrick.Tessier>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cletavernier, papyrus-bugs, yann.tanguy
Version: 0.10.0Flags: cletavernier: documentation-
Target Milestone: 1.0.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
width of Links Illustration none

Description Yann Tanguy CLA 2010-11-09 09:36:04 EST
Papyrus should allow users to modify link style especially the link width.
This should be modifiable in preferences or directly in the Appearance tab.
Comment 1 Vincent Lorenzo CLA 2010-11-19 05:31:55 EST
To provide this action, we need to modify the template.
Change in YourLinkEditPart : 
	@Override
	protected void handleNotificationEvent(Notification notification) {
		Object feature = notification.getFeature();
		if(NotationPackage.Literals.LINE_STYLE__LINE_WIDTH.equals(feature)) {
			refreshLineWidth();
		} else {
			super.handleNotificationEvent(notification);
		}
	}
/**
* to set the width defined in the notation file after opening the diagram
*/
	@Override
	public void refresh() {
		super.refresh();
		refreshLineWidth();
	}

	@Override
	protected void setLineWidth(int width) {
		((GeneralizationFigure)figure).setLineWidth(width);
		figure.repaint();
	}
	
	
In your UMLViewProvider.createYourLink_ID, adds the line : edge.setLineWidth(1);  //this action specifies the line width in the notation. It's needed!!!

In your Figure (like GeneralizationFigure), it seems me that you can delete the line setLineWidth(1); which is not useful;
Comment 2 Vincent Lorenzo CLA 2010-11-19 05:37:16 EST
Created attachment 183459 [details]
width of Links Illustration

This is the widths provided by GMF, It's possible to have other widths easily.
The width is represented by an Integer.
Comment 3 Toni Siljamäki CLA 2013-10-08 09:39:39 EDT
For certain DSL's a line style would also be needed,
such as dashed line or not.
Comment 4 Camille Letavernier CLA 2014-07-22 10:29:32 EDT
This feature is now supported. If some specific links don't support it, specific bugs should be reported against each

I close the task