Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329794 - [All diagrams] The size of links cannot be modified
Summary: [All diagrams] The size of links cannot be modified
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Diagram (show other bugs)
Version: 0.10.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.0.0   Edit
Assignee: Patrick Tessier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-09 09:36 EST by Yann Tanguy CLA
Modified: 2014-07-22 10:29 EDT (History)
3 users (show)

See Also:
cletavernier: documentation-


Attachments
width of Links Illustration (9.48 KB, image/jpeg)
2010-11-19 05:37 EST, Vincent Lorenzo CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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