Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Orion (Archived) » working around lack of project-wide validation
working around lack of project-wide validation [message #870075] Sun, 06 May 2012 07:48 Go to next message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 23
Registered: April 2012
Junior Member
I am looking into having some sort of project-wide validation with a Orion plugin.

I understand validation is currently an editor-oriented feature. So this is my intended workaround:

1) declare a file system plugin so I can post all file changes in Orion to my own server (either wrapping or replacing the regular file service implementation). This way the contents are available to the "compilation server", which will also compile the latest files and eventually generate compilation results (which will not appear in Orion right away).

2) declare a validator service that will just fetch the latest build results for the current file from the "compilation server" and produce them as if they were just encountered.

Does that make sense? Any better approaches?
Re: working around lack of project-wide validation [message #870262 is a reply to message #870075] Mon, 07 May 2012 13:55 Go to previous messageGo to next message
John Arthorne is currently offline John ArthorneFriend
Messages: 176
Registered: July 2009
Senior Member
The file service wrapper is an interesting idea, but I don't think it will be sufficient. There are other ways the files in your workspace can change, such as git operations. I think as a starting point I would make it a manual "build" that the user has to start. The validation server would then fetch the latest files (presumably syncing its own cache), and then run the validation. You would need some page to display the results, like a "problems" page. You could also hook into the Orion validation service to display the results within the editor page (maybe that hook could also be used as a simple incremental update, which may or may not be possible depending on the kind of validation you are doing.

The other option would be a client side project-wide validation, perhaps running in a web worker. Architecturally that would be much simpler, but it depends on the kind of validation you are doing (presumably if you have a large body of Java code doing the validation this isn't an option).
Re: working around lack of project-wide validation [message #870284 is a reply to message #870262] Mon, 07 May 2012 15:00 Go to previous message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 23
Registered: April 2012
Junior Member
Thanks, John.

Quote:
I think as a starting point I would make it a manual "build" that the user has to start.


It is a fair suggestion but breaks the user experience I intend. I want to have both source validation and automated tests running (asynchronously) for every save. What you suggest is a good starting point, but I am not sure I would ever be able to do better in the future. Need to think about that.

Quote:
The validation server would then fetch the latest files (presumably syncing its own cache), and then run the validation.


Do you mean, syncing its cache with the git server? Or with the Orion server? I assume the latter isn't possible (Orion project contents are not available).

Quote:
You could also hook into the Orion validation service to display the results within the editor page


Yeah, I was intending to use the validation service that way, based on the results from the remote compilation service.

Quote:
The other option would be a client side project-wide validation, perhaps running in a web worker. Architecturally that would be much simpler, but it depends on the kind of validation you are doing (presumably if you have a large body of Java code doing the validation this isn't an option).


Yup. Compiler is behind a REST API and is implemented in Java. It is the same scenario we discussed on this forum earlier this year ("project validation in Orion").

Cheers,

Rafael
Previous Topic:getting hold of Orion services from a plugin
Next Topic:Invisible selected text for not focused editor
Goto Forum:
  


Current Time: Fri Apr 26 01:32:13 GMT 2024

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

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

Back to the top