Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Create marker and use problem view
Create marker and use problem view [message #1239099] Mon, 03 February 2014 11:09 Go to next message
excellion fdfds is currently offline excellion fdfdsFriend
Messages: 14
Registered: July 2012
Junior Member
Hello!
How i can create markers on my pictograms element? And see it in problems view?

Currently, i launch a feature validation in PenelopToolBehaviorProvider.postExecute.
@Override
	public void postExecute(IExecutionInfo executionInfo) {
		super.postExecute(executionInfo);
		ValidateDiagramFeature validateDiagramFeature = new       ValidateDiagramFeature(this.getDiagramTypeProvider());
			this.getDiagramTypeProvider()
					.getDiagramBehavior()
					.executeFeature(validateDiagramFeature, new CustomContext());
	}

But i don't know how to report issues in problems view...
Thanks!
Re: Create marker and use problem view [message #1239108 is a reply to message #1239099] Mon, 03 February 2014 11:28 Go to previous messageGo to next message
Marek Jagielski is currently offline Marek JagielskiFriend
Messages: 97
Registered: April 2012
Member
Hi,

There was one similar topic:
http://www.eclipse.org/forums/index.php/m/1057753/
For validation, I gave as an example bpmn2-modeler project.

Marek
Re: Create marker and use problem view [message #1239997 is a reply to message #1239108] Wed, 05 February 2014 13:41 Go to previous messageGo to next message
excellion fdfds is currently offline excellion fdfdsFriend
Messages: 14
Registered: July 2012
Junior Member
Finally, to add marker:

I extend DefaultMarkerBehavior.
In my class, i modify notifyChanged to react of modify event:
public void notifyChanged(Notification notification) {
			if (notification.getNotifier() instanceof Resource) {
				switch (notification.getFeatureID(Resource.class)) {
				case Resource.RESOURCE__IS_LOADED:
				case Resource.RESOURCE__IS_MODIFIED: {

and after in notifyChanged, i build the error diagnostics.

To finish, i create my instance of DefaultMarkerBehavior in DiagramBehavior :
@Override
	protected DefaultMarkerBehavior createMarkerBehavior() {
		return new MyDefaultMarkerBehavior(this);
	}


BUT if these markers are added in problem view, the icon of marker (error or warning icon) are bugged. A red rectangle is displayed instead.
Any ideas?
Re: Create marker and use problem view [message #1287380 is a reply to message #1239997] Mon, 07 April 2014 18:33 Go to previous messageGo to next message
Simone Di Cola is currently offline Simone Di ColaFriend
Messages: 60
Registered: February 2014
Member
I am facing the same problem,
but it is not clear to me how to use DefaultmarkerBehavior. Reading the javadoc, it seems to me that it only provides the diagnostic for the provided resource. Am I wrong?

Thanks for your attention
Simone
Re: Create marker and use problem view [message #1288166 is a reply to message #1239997] Tue, 08 April 2014 10:33 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
This sounds as if the icon cannot be loaded from the problems view. Have you
checked that the icon is correctly packaged into the plugin (e.g.
build.properties entry)?

Michael
Previous Topic:Saving graphiti diagram as xpdl from command line.
Next Topic:Graphiti . EMF Validation
Goto Forum:
  


Current Time: Fri Apr 19 13:01:16 GMT 2024

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

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

Back to the top