Skip to main content



      Home
Home » Modeling » Graphiti » Create marker and use problem view
Create marker and use problem view [message #1239099] Mon, 03 February 2014 06:09 Go to next message
Eclipse UserFriend
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 06:28 Go to previous messageGo to next message
Eclipse UserFriend
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 08:41 Go to previous messageGo to next message
Eclipse UserFriend
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 14:33 Go to previous messageGo to next message
Eclipse UserFriend
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 06:33 Go to previous message
Eclipse UserFriend
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: Thu Jul 03 11:32:20 EDT 2025

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

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

Back to the top