| Summary: | ASTInstructionCompiler should be pluggable to handle bytecode rewriting | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Rajeev Dayal <rdayal> | ||||
| Component: | Debug | Assignee: | JDT-Debug-Inbox <jdt-debug-inbox> | ||||
| Status: | NEW --- | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | Michael_Rennie, rdayal, tparker | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Rajeev Dayal
Created attachment 200028 [details]
Adds an extension point to contribute a factory that can generate ASTInstructionCompilers. It is queried in the ASTEvaluationEngine class.
(In reply to comment #0) > a first cut; I wanted to get opinions on it before delving too deeply into the > perfect implementation. > I like the direction. It would allow for some interesting extensions to our evaluation system. > One issue is that the implementers of > ASTInstructionCompilers are going to be using internal API. Not such a big issue, we can investigate introducing new APIs as needed. One thought I had when looking at your patch was how we would resolve / handle compiler conflicts - i.e. how do we determine who wins if a contributed compiler and the default one would both apply to a given context? > (In reply to comment #0)
>
> > a first cut; I wanted to get opinions on it before delving too deeply into the
> > perfect implementation.
> >
>
> I like the direction. It would allow for some interesting extensions to our
> evaluation system.
>
> > One issue is that the implementers of
> > ASTInstructionCompilers are going to be using internal API.
>
> Not such a big issue, we can investigate introducing new APIs as needed.
>
> One thought I had when looking at your patch was how we would resolve / handle
> compiler conflicts - i.e. how do we determine who wins if a contributed
> compiler and the default one would both apply to a given context?
Thanks for the comments! You've got a good point there - maybe we can pass in the IJavaProject into the ASTInstructionCompilerFactory's creation method, and the implementers could determine whether or not they're applicable to the environment? I think we'd also have to introduce a priority attribute as well, to have some sort of tiebreaker.
It would be nice if we could sort of have two ASTInstructionCompilers sort of work in tandem, but I can't see how that would be possible.
(In reply to comment #3) > You've got a good point there - maybe we can pass in > the IJavaProject into the ASTInstructionCompilerFactory's creation method, and > the implementers could determine whether or not they're applicable to the > environment? I think we'd also have to introduce a priority attribute as well, > to have some sort of tiebreaker. > Worst-case scenario I think we would end up having user interaction to pick the compiler. > It would be nice if we could sort of have two ASTInstructionCompilers sort of > work in tandem, but I can't see how that would be possible. I agree, I don't see how (or why) we would want that, especially if there was no way to validate the shared / combined instruction sequence. (In reply to comment #4) > (In reply to comment #3) > > You've got a good point there - maybe we can pass in > > the IJavaProject into the ASTInstructionCompilerFactory's creation method, and > > the implementers could determine whether or not they're applicable to the > > environment? I think we'd also have to introduce a priority attribute as well, > > to have some sort of tiebreaker. > > > > Worst-case scenario I think we would end up having user interaction to pick the > compiler. That sounds good. I could add this functionality to the existing patch - or do you think it would be better to introduce this in a separate patch? I was thinking of adding a project-level setting under Java->Debug that allows the user to choose a particular evaluation engine. > > > It would be nice if we could sort of have two ASTInstructionCompilers sort of > > work in tandem, but I can't see how that would be possible. > > I agree, I don't see how (or why) we would want that, especially if there was > no way to validate the shared / combined instruction sequence. Ping - any additional thoughts? I'm going to be out of town for a couple of weeks, but once I"m back, I'd love to get started on the second iteration of the patch. (In reply to comment #5) >I was thinking of adding a project-level setting under Java- >Debug that allows the user to choose a particular evaluation engine. That would be one way to do it. Perhaps to start with we could could work out a way to pass the context to the contributors and have them answer yes / no to if they apply. I think in most cases there will be no conflicts, but in the event there is we could investigate prompting the user somehow or providing a preference as you mentioned. |