Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EVL] "No fixes available on quick fix" - Multi-page Editor [SOLVED]
[EVL] "No fixes available on quick fix" - Multi-page Editor [SOLVED] [message #1691274] Sat, 04 April 2015 11:58 Go to next message
Nikos Margaritis is currently offline Nikos MargaritisFriend
Messages: 65
Registered: September 2014
Member

Hello there, I have integrated an EMF editor with the GMF editor in order to provide different views of the same file. Everything works fine concerning the editor. However, I am experiencing a problem with the validation (EVL).

The editor consists of 3 different tabs, one including the resource selection, thr tree of the Model Editor and the other includes the diagram. I am using a single file to store the diagram and the model data.

Now if I validate when I am on the diagram by using the Edit -> Validate I get the correct messages but the quick fix says "no fixes available". Note that, the path, location tabs of the problems view seem correct. On the contrary while I validate on the other two tabs, I get the messages again (with a different location and type) and the quick fix works.

Summary:

Update: The error ("Problems encountered during validation / Diagnosis of 2 objects") was removed from the title, as it seems that it was not the cause of the problems. I wasn't able to reproduce it after restarting eclipse completely and not only the runtime environment.

Any clues how can I solve the "no fixes available"? While the validation option is used on the diagram tab?

Best, Nikos

[Updated on: Thu, 07 May 2015 19:05]

Report message to a moderator

Re: [EVL] "No fixes available on quick fix" [UPDATED] [message #1691318 is a reply to message #1691274] Sun, 05 April 2015 18:31 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Niko,

Could you please double-check that the markerType in Step 4 of [1] corresponds to a valid marker type for *your* editor (org.eclipse.epsilon.eugenia.examples.filesystem.diagram.diagnostic only works for the particular "filesystem" example)? If the markerType appears to be OK, please send me a minimal example [2] and I'll investigate further.

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/evl-gmf-integration/
[2] https://www.eclipse.org/epsilon/doc/articles/minimal-examples/
Re: [EVL] "No fixes available on quick fix" [UPDATED] [message #1691324 is a reply to message #1691318] Mon, 06 April 2015 02:24 Go to previous messageGo to next message
Nikos Margaritis is currently offline Nikos MargaritisFriend
Messages: 65
Registered: September 2014
Member

Hello Dimitris,

I am aware of the markerTypes, everything appears OK.

It took me some time to put together a minimal example using the filesystem model and I can reproduce the problem. Note that, I've used a single file to store the filesystem diagram/model. Also I have modified the model editor of the diagram (which is now the default as the other editor has been removed).

The model editor includes 3 tabs, namely, Resource Selection, Tree, Diagram + an outline with shared editingDomain. Most of the changes have been applied in the org.eclipse.epsilon.eugenia.filesystem.editor > filesystem.presentation package so take a look there. FilesystemEditor.java is the model editor that has been modified.

Note that, after validating the diagram although the messages declared in the EVL are shown correctly; the quick fix feature reports back "No fixes available ..". If you then move to the resource selection tab or tree, select the filesystem element and you validate from the menu "FileSystem Editor" > validate the messages are reported again from the EMF handler and the quick fix works.

Steps to reproduce:

  1. create diagram/elements or use the sample I attached.
  2. save the file (while on the diagram tab to invoke the validator)
  3. Validator is called, the messages appear in the problems view - quick fix says that no fixes are available


Attachments:

  • org.eclipse.epsilon.example.filesystem.minimal.zip (the minimal example)
  • default.fl (a sample model/diagram file)



Best, Nikos

[Updated on: Mon, 06 April 2015 02:30]

Report message to a moderator

Re: [EVL] "No fixes available on quick fix" [UPDATED] [message #1691432 is a reply to message #1691324] Tue, 07 April 2015 09:07 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Niko,

Thanks for taking the time to put together this example. I'm afraid that this is a bug in the EVL/GMF integration, which I've now partially fixed this in the Git repo. By "partially", I mean that fixes are now displayed as expected but for some reason (at least in my setup) one needs to invoke a fix twice before it actually modifies anything in the model. I'll investigate a bit more over the next couple of days and let you know how it goes.

Cheers,
Dimitris
Re: [EVL] "No fixes available on quick fix" [UPDATED] [message #1691447 is a reply to message #1691432] Tue, 07 April 2015 10:30 Go to previous messageGo to next message
Nikos Margaritis is currently offline Nikos MargaritisFriend
Messages: 65
Registered: September 2014
Member

Thank you for the quick response; Dimitris.

I am looking forward to an update.

Best, Nikos.
Re: [EVL] "No fixes available on quick fix" [UPDATED] [message #1692447 is a reply to message #1691447] Wed, 15 April 2015 17:46 Go to previous messageGo to next message
Nikos Margaritis is currently offline Nikos MargaritisFriend
Messages: 65
Registered: September 2014
Member

Hello Dimitris,

Any headings on that?

Best, Nikos
Re: [EVL] "No fixes available on quick fix" [UPDATED] [message #1692848 is a reply to message #1692447] Mon, 20 April 2015 08:54 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Not yet I'm afraid.

Cheers,
Dimitris
Re: [EVL] "No fixes available on quick fix" [UPDATED] [message #1692890 is a reply to message #1692848] Mon, 20 April 2015 13:06 Go to previous messageGo to next message
Nikos Margaritis is currently offline Nikos MargaritisFriend
Messages: 65
Registered: September 2014
Member

Dimitri,

I will present my dissertation on 8th of May so if you
could have it ready by then, or at least have the version (that works after you invoke the quick fix twice),
I will really appreciate it.


Best, Nikos.
Re: [EVL] "No fixes available on quick fix" [UPDATED] [message #1693011 is a reply to message #1692890] Tue, 21 April 2015 08:56 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Niko,

I've given this a go but I haven't been able to figure out whether this is a bug in the GMF/EVL integration or whether this is only a problem with this specific editor. In case you can investigate any more on the editor side, what I did was to extend the "do" part of the NameStartsWithCapital constraint fix as follows:

do {
  self.toString().println();
  self.name := self.name.firstToUpperCase();
}


Invoking the fix a few times produces the following interesting output in the console (every time self is a proxy, the change done by the fix seems to be ignored)

filesystem.impl.FolderImpl@56e2fbd3 (eProxyURI: platform:/resource/fl/default.fl#_tAFC8Nz0EeSC77GECooLzA)
filesystem.impl.FolderImpl@78453f07 (name: foo)
filesystem.impl.FolderImpl@78453f07 (name: foo)
filesystem.impl.FolderImpl@475b45b3 (eProxyURI: platform:/resource/fl/default.fl#_tAFC8Nz0EeSC77GECooLzA)


In any event, a new interim version will be available by the end of the week.

Cheers,
Dimitris
Re: [EVL] "No fixes available on quick fix" [UPDATED] [message #1693103 is a reply to message #1693011] Tue, 21 April 2015 18:04 Go to previous messageGo to next message
Nikos Margaritis is currently offline Nikos MargaritisFriend
Messages: 65
Registered: September 2014
Member

Dimitri I will look into it as soon as the interim is available.

While testing now, I experienced another strange output.

If you invoke the validation in the EMF part(e.g the tree editor), the fixes seem to appear twice, and both of them produce the same output-are working.

Steps to reproduce:


  • open the filesystem example
  • move to the "Tree" tab
  • Select the Filesystem element from the tree editor
  • In the top menu Select FileSystem Editor > Validate
  • Quick fix a problem
  • The quick fix pop up include all the solutions that were specified for that element x2



index.php/fa/21594/0/

Note that, while saving the diagram the default validation mechanism (GMF) of the diagram is called like this.

if(getActiveEditor() instanceof FilesystemDiagramEditor){			    
     filesystem.diagram.part.ValidateAction.runValidation(getDiagram());
}


Additionally, when you validate in the EMF tabs, again the default mechanism of validation (EMF) is called by the EMF handlers.

Best Regards,
  • Attachment: evl.png
    (Size: 93.13KB, Downloaded 666 times)

[Updated on: Tue, 21 April 2015 18:19]

Report message to a moderator

Re: [EVL] "No fixes available on quick fix" [UPDATED] [message #1693330 is a reply to message #1693103] Thu, 23 April 2015 09:21 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Niko,

A new interim version is now available under http://download.eclipse.org/epsilon/interim/.

Cheers,
Dimitris
Re: [EVL] "No fixes available on quick fix" [UPDATED] [message #1694089 is a reply to message #1693330] Thu, 30 April 2015 13:07 Go to previous messageGo to next message
Nikos Margaritis is currently offline Nikos MargaritisFriend
Messages: 65
Registered: September 2014
Member

Hi Dimitri,
I am not sure if you take a look in my previous message.

I have made some tests in order to determine where the problem originates from.

Now while the editor is being saved (so that the validation runs) I have replaced the previous code in SxmDiagramEditor.java with this.

(In the minimal example I have provided, there is a FilesystemEditor.java and the code below is not applicable because the Filesystem element does not have any attributes. My root element has a name attribute, which I am trying to quick fix later on. If you wish to have the same concept applicable to the FilesystemEditor let me know and I will provide an example.)

if(getActiveEditor() instanceof SxmDiagramEditor){
	//check if the element is the one we expected
        System.out.println(diagramEditor.getDiagram().getElement());
       
       //if it is a eProxy print the URI
	if (diagramEditor.getDiagram().getElement().eIsProxy()) {
		URI proxyURI = ((BasicEObjectImpl)diagramEditor.getDiagram().getElement()).eProxyURI();
		System.out.println(proxyURI);
	}
	sxm.diagram.part.ValidateAction.runValidation(getDiagram());
}


So after this is executed, the SXM (my root) element is not reported as an eProxy at any point. While I try to give a name via the quick fix for this element the EVL console print reports it as a proxy and it fails to change the name.

Apart from that, I tried to run the validation twice (programmatically) to see if this will resolve the problem but it did not work either.

It seems like the first time you quick fix something, it simply fails but if you revalidate and try with the same element again it works.(with exactly the same code being invoked in the editor's end) So the first time the element is reported as an eProxy while in the second it doesn't.

Another interesting example is the following, while you invoke a similar fix and it is the first problem you try to fix, the input is created and the self.input fails.
constraint HasInput {
      check : self.input.isDefined()
      message : 'The function "' + self.name + '" should define an input!'
      fix {
          title : 'Add a new input'
          do {
          	 var inp = new Input;
          	 var inputString := UserInput.prompt("Give a name for the element input");
          	inp.name = inputString.replace(" ", "");
             FolderInputs.all().first().input.add(inp);
             self.input := inp;
          }
      }
  }


Note that, Quote:
A proxy is an object that is defined in a Resource that has not been loaded. An object may be a proxy either because proxy resolution was disabled when the object was accessed (see eGet(EStructuralFeature,boolean)) or because proxy resolution failed.


Is there any chance, that EVL does something that turns the element into a proxy?

Best Regards,

[Updated on: Thu, 07 May 2015 19:03]

Report message to a moderator

Re: [EVL] "No fixes available on quick fix" [UPDATED] [message #1694149 is a reply to message #1694089] Thu, 30 April 2015 22:41 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Niko,

> Is there any chance, that EVL does something that turns the element into a proxy?

This is unlikely, as EOL/EVL operate directly on the EObjects of the underlying Resource (i.e. they don't wrap/pre-process them in any way that could turn them into proxies). Could you please double-check that both sub-editors (tree and diagram) share the same Resource object - as opposed to loading one copy each? (this would explain the duplicate error messages you're observing).

Cheers,
Dimitris
Re: [EVL] "No fixes available on quick fix" [SOLVED] [message #1694775 is a reply to message #1694149] Thu, 07 May 2015 18:50 Go to previous messageGo to next message
Nikos Margaritis is currently offline Nikos MargaritisFriend
Messages: 65
Registered: September 2014
Member

Hi Dimitri,

Indeed the validation problem is on the editor's side.

It seems that GMF unloads the resources during the save procedure.
So performing the validation right before saving resulted in having the issues with the eProxy etc.

All is needed is to make the following call at the bottom of the save method instead of having it in the beginning.
....
....
//append this
if(getActiveEditor() instanceof FilesystemDiagramEditor){			    
     filesystem.diagram.part.ValidateAction.runValidation(getDiagram());
}


Thank you for the continuous support!

I have some enhancement ideas that I would be really happy to discuss with you guys concerning Epsilon (EuGenia/emfatic/evl).
I will fire an enhancement ticket shortly, when I have the chance to put them together as I am writing my Dissertation currently.

Best, Nikos

[Updated on: Thu, 07 May 2015 19:04]

Report message to a moderator

Re: [EVL] "No fixes available on quick fix" [SOLVED] [message #1694781 is a reply to message #1694775] Thu, 07 May 2015 20:43 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Niko,

Many thanks for sharing this. Drop me an email [1] you're done with your project and we can arrange a Skype call to discuss your ideas.

Best of luck with your dissertation!

Cheers,
Dimitris

[1] http://dimitris.io/contact
Re: [EVL] "No fixes available on quick fix" [SOLVED] [message #1696974 is a reply to message #1694781] Fri, 29 May 2015 21:44 Go to previous messageGo to next message
Nikos Margaritis is currently offline Nikos MargaritisFriend
Messages: 65
Registered: September 2014
Member

Quote:
> Could you please double-check that both sub-editors (tree and diagram) share the same Resource object - as opposed to loading one copy each? (this would explain the duplicate error messages you're observing).


Hello Dimitris,

I have solved this problem but totally forgot to report it back.

It seems that removing the MarkerResolution extension associated with org.eclipse.emf.ecore.diagnostic from the validator plug-in solves the problem. After this change, validating in any emf tab, makes the fixes appear only once.

Best Regards,

[Updated on: Fri, 29 May 2015 21:48]

Report message to a moderator

Re: [EVL] "No fixes available on quick fix" [SOLVED] [message #1696981 is a reply to message #1696974] Sat, 30 May 2015 01:10 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Niko,

Many thanks for sharing this.

Cheers,
Dimitris
Previous Topic:elementary question - what type of project?
Next Topic:etl fails - UML!Class not found
Goto Forum:
  


Current Time: Fri Apr 26 22:28:13 GMT 2024

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

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

Back to the top