[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [handly-dev] A milestone build of Handly 0.5
|
Hi Vlad,
I'll try to update "gethandly" in time for the release or shortly aftewards; there are still some more pressing tasks for Handly 0.5. I'm planning that the updated tutorial will implement the first strategy to stay consistent with the basic example it was forked from, but the text will, of course, include a discussion of the other available strategies.
Regarding the examples themselves, the basic example could actually use any strategy (it is really orthogonal to the AST classes that Xtext generates), but I think the first strategy is somewhat better suited for the "basic". With regard to demonstrating the other strategies, we probably have the following options to consider:
1. As proposed, fork a considerable part of the JDT Java model API and try to implement it with Handly using the second or third strategy. I think that it would be a nice experiment and as you said the result could give some confidence and be useful for potential adopters with preexisting models. This work is probably going to replace the existing Java model example.
2. As a less ambitious goal, move the existing Java model example to use the second or third strategy. Perhaps not as useful as the previous one, it will nevertheless demonstrate the necessary mechanics. This would remain fully backward compatible with the existing API (basically, we just need to "copy/paste" some methods from IElementExtension etc. to the IJavaElement interface hierarchy of the example), so no change in the UI part will be required. Actually, while I was writing this, I thought that it could and probably should be done for 0.5, even though this interim result would probably get replaced in 0.6 as stated above.
3. Introduce a separate smaller example to demonstrate the second or third strategy. Probably doesn't make too much sense, given the previous options, and it would be an extra thing to maintain.
Best regards,
Vladimir
Hi!
I understand better now how this works, thanks for explaining.
Regarding the examples, I believe that the basic example can only use the first strategy, because Xtext creates its own model classes and I think you can't add to their hierarchy. The java example feels a bit heavy, but after some thinking I think that it should be almost enough to reimplement just the model -- the ui can remain mostly the same (possibly use IElement instead of IJavaElement is places). This is just after a quick browsing, so I may be wrong. If there is significantly more work with the Java model than I think, maybe it would work to create a new example, with just a few elements and not much ui, so that the details of the implementations of the different strategies aren't hidden behind irrelevant changes.
Regarding the forked JDT API, if you mean what I think you mean, it would be a cool and useful example too -- it is almost certain that adopters might already have a model and would like to see which parts should be removed and implemented by handly. Actually, maybe that could be even more useful not as a full-grown example, but as a steb-by-step guide, just like "gethandly"? In that case, it would make sense to copy and modify the "gethandly" example instead. BTW, will you update "gethandly" for 0.5 or is it something for later too?
I would have liked to learn the new API while implementing my own model, but unfortunately (as I mentioned before) I am still stuck on Java 6/7 for a while.
best regards,
Vlad