Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [imp-dev] createPartControl() needs refactoring and IMP services need to be added to ServiceFactory.

done.

On Thu, Jun 5, 2008 at 7:15 PM, Stan Sutton <suttons@xxxxxxxxxx> wrote:
>
> This refactoring suggestion and response would probably be good items to
> enter into bugzilla.  The suggestion about moving the editor services into
> ServiceFactory would also (but I think a separate one).
>
> Regards,
>
> Stan
>
>
> Stan Sutton, Ph. D.
> IBM T. J. Watson Research Center
> 19 Skyline Drive, Hawthorne, NY 10532 USA
> telephone:  1-914-784-7316, FAX:  1-914-784-7455, T/L 863
> e-mail:  suttons@xxxxxxxxxx, Stan Sutton/Watson/IBM@IBMUS
>
>
>
> "Jurgen Vinju" <Jurgen.Vinju@xxxxxx>
> Sent by: imp-dev-bounces@xxxxxxxxxxx
>
> 06/05/2008 11:12 AM
>
> Please respond to
> IMP Developers List <imp-dev@xxxxxxxxxxx>
> To
> "IMP Developers List" <imp-dev@xxxxxxxxxxx>
> cc
> Subject
> Re: [imp-dev] createPartControl() needs refactoring and IMP services
>  need to be added to ServiceFactory.
>
>
>
>
> Aha! That's all very nice!
>
> On Thu, Jun 5, 2008 at 4:05 PM, Robert M. Fuhrer <rfuhrer@xxxxxxxxxxxxxx>
> wrote:
>> Jurgen Vinju wrote:
>>>
>>> Hi guys,
>>>
>>> We need to split up createPartControl() in UniversalEditor into
>>> smaller methods, and remove all superfluous comments.
>>> It's very hard to understand what's going on in this method, it only
>>> works by assuming that groups of
>>> statements marked by // comments or grouped in a { } block have no
>>> effect on other parts of the method.
>>> [this goes for more methods in the UE, but this one is very big].
>>>
>>
>> We're actually actively working on this very thing right now, in order to
>> allow
>> IMP to be used with editors other than the UniversalEditor. So far, I've
>> done
>> the following (not yet checked in):
>>
>> - Pulled the ParserScheduler out of the UniversalEditor, and removed the
>>  dependency on it.
>> - Created a class to manage the references to all the language service
>>  implementations, and have the UniversalEditor's createPartControl()
>>  use that.
>> - Made it so that some of the annotation-related logic is performed by
>>  an ordinary IModelListener, rather than unsightly appendages within
>>  the ParserScheduler.
>> - Enhanced IMessageHandler with a new method clearMessages(),
>>  which is called before any messages get issued in a given "parsing
>>  session".
>> - Encapsulate the instantiation of the various "service controllers"
>>  (the things that sit between Eclipse and the language-specific
>>  service implementations), so that the corresponding logic can
>>  be substituted (again, for interoperability with other editors).
>>
>>> Anyway, I propose to extractMethod in the following way:
>>>  - find groups of statements marked by { } or //
>>>  - use 'extract method' on these groups.
>>>  - until the whole method contains only method calls.
>>>
>>> I could do it in some spare time if you like.
>>>
>>> Another thing I noticed is that the new editor services are not using
>>> the ServiceFactory. All IMP services should
>>> be retrieved using the ServiceFactory interface, such that their
>>> implementation does not necessarily have to come
>>> from extension points in the future). Can you adapt this Stan?
>>>
>>
>> Good point. Stan, can you take care of this?
>>
>> --
>> Cheers,
>>  -- Bob
>>
>> --------------------------------
>> Robert M. Fuhrer
>> Research Staff Member
>> Programming Technologies Dept.
>> IBM T.J. Watson Research Center
>>
>> IMP Team Lead (http://eclipse-imp.sourceforge.net)
>> X10: Productivity for High-Performance Parallel Programming
>> (http://x10.sf.net)
>>
>>
>> _______________________________________________
>> imp-dev mailing list
>> imp-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/imp-dev
>>
> _______________________________________________
> imp-dev mailing list
> imp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/imp-dev
>
>
> _______________________________________________
> imp-dev mailing list
> imp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/imp-dev
>
>


Back to the top