Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » IMP » editing portions of a file
editing portions of a file [message #7411] Sat, 29 September 2007 21:36 Go to next message
Eclipse UserFriend
Originally posted by: sebastien.kirche.no.spam.free.fr.invalid

Hi,

the IMP project is very interesting to me, but I am not that accustomed
to Eclipse and its SDK.

I am wondering if it could be possible to design for the text editing
component a custom window that could edit only a portion of a file.

I think of IDEs (Visual basic, Powerbuilder, ...) that let the user open
a source file and display just one procedure / function at a time. And
for that function it displays a list of the arguments with listboxes for
possible types, or a popup to jump into another function definition.

If possible, what parts of the eclipse sdk could provide the necessary
elements to build such an editor ? I am missing the right keywords to
complete my search.

Thanks.
--
Sébastien Kirche
Re: editing portions of a file [message #7467 is a reply to message #7411] Tue, 02 October 2007 19:02 Go to previous messageGo to next message
Robert M. Fuhrer is currently offline Robert M. FuhrerFriend
Messages: 294
Registered: July 2009
Senior Member
Sébastien Kirche wrote:
> Hi,
>
> the IMP project is very interesting to me, but I am not that accustomed
> to Eclipse and its SDK.
>
> I am wondering if it could be possible to design for the text editing
> component a custom window that could edit only a portion of a file.

As it turns out, this is strongly related to supporting what we call
"language embedding"; i.e., the embedding of programs (typically program
fragments) written in one language inside a larger program written in
another language. E.g., think of shell programs in a Makefile, Java
classes/methods in an AspectJ aspect, or "actions" associated with a
grammar production.

To provide the various editor services in the embedded program fragment,
one has to be able to parse the program fragment and produce an AST for
it (even though it is not a complete program), analyze it within the
surrounding context provided by the "host" program, and dispatch to IDE
services that are appropriate for the language of that fragment.

We're actually designing enhancements to IMP to provide this support as
we speak.

> I think of IDEs (Visual basic, Powerbuilder, ...) that let the user open
> a source file and display just one procedure / function at a time. And
> for that function it displays a list of the arguments with listboxes for
> possible types, or a popup to jump into another function definition.

Admittedly, what we're designing isn't precisely intended to address your
scenario, and so there would still need to be some additional UI work to
produce the "fragment editor" itself, but I think it will be possible to
build what you want on top of IMP once we've addressed embedding.

--
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)
Re: editing portions of a file [message #7477 is a reply to message #7467] Tue, 02 October 2007 20:41 Go to previous message
Eclipse UserFriend
Originally posted by: sebastien.kirche.no.spam.free.fr.invalid

At 21:02 on oct 2 2007, Robert M. Fuhrer said :

> As it turns out, this is strongly related to supporting what we call
> "language embedding"; i.e., the embedding of programs (typically
> program fragments) written in one language inside a larger program
> written in another language. E.g., think of shell programs in a
> Makefile, Java classes/methods in an AspectJ aspect, or "actions"
> associated with a grammar production.

The language that I expect to build an IDE for is the powerscript (= the
PowerBuilder language) and one of its specialities it to embed nearly
standard SQL syntax into a basic like syntax. It seems that I have a
perfect test case when the language embedding primitives will be
available :)

> To provide the various editor services in the embedded program
> fragment, one has to be able to parse the program fragment and produce
> an AST for it (even though it is not a complete program), analyze it
> within the surrounding context provided by the "host" program, and
> dispatch to IDE services that are appropriate for the language of that
> fragment.
>
> We're actually designing enhancements to IMP to provide this support
> as we speak.

Sooo good to know :D

> > I think of IDEs (Visual basic, Powerbuilder, ...) that let the user
> > open a source file and display just one procedure / function at a
> > time. And for that function it displays a list of the arguments with
> > listboxes for possible types, or a popup to jump into another
> > function definition.
>
> Admittedly, what we're designing isn't precisely intended to address
> your scenario, and so there would still need to be some additional UI
> work to produce the "fragment editor" itself, but I think it will be
> possible to build what you want on top of IMP once we've addressed
> embedding.

That ok for now, before being able to implement such a thing, I have
some work to do on the grammar specification. I am just writing one for
much simpler language do doing some practice.

Many thanks for the support, and for the work already done and made
available.
--
Sébastien Kirche
Re: editing portions of a file [message #566880 is a reply to message #7411] Tue, 02 October 2007 19:02 Go to previous message
Robert M. Fuhrer is currently offline Robert M. FuhrerFriend
Messages: 294
Registered: July 2009
Senior Member
Sébastien Kirche wrote:
> Hi,
>
> the IMP project is very interesting to me, but I am not that accustomed
> to Eclipse and its SDK.
>
> I am wondering if it could be possible to design for the text editing
> component a custom window that could edit only a portion of a file.

As it turns out, this is strongly related to supporting what we call
"language embedding"; i.e., the embedding of programs (typically program
fragments) written in one language inside a larger program written in
another language. E.g., think of shell programs in a Makefile, Java
classes/methods in an AspectJ aspect, or "actions" associated with a
grammar production.

To provide the various editor services in the embedded program fragment,
one has to be able to parse the program fragment and produce an AST for
it (even though it is not a complete program), analyze it within the
surrounding context provided by the "host" program, and dispatch to IDE
services that are appropriate for the language of that fragment.

We're actually designing enhancements to IMP to provide this support as
we speak.

> I think of IDEs (Visual basic, Powerbuilder, ...) that let the user open
> a source file and display just one procedure / function at a time. And
> for that function it displays a list of the arguments with listboxes for
> possible types, or a popup to jump into another function definition.

Admittedly, what we're designing isn't precisely intended to address your
scenario, and so there would still need to be some additional UI work to
produce the "fragment editor" itself, but I think it will be possible to
build what you want on top of IMP once we've addressed embedding.

--
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)
Re: editing portions of a file [message #566917 is a reply to message #7467] Tue, 02 October 2007 20:41 Go to previous message
Eclipse UserFriend
Originally posted by: sebastien.kirche.no.spam.free.fr.invalid

At 21:02 on oct 2 2007, Robert M. Fuhrer said :

> As it turns out, this is strongly related to supporting what we call
> "language embedding"; i.e., the embedding of programs (typically
> program fragments) written in one language inside a larger program
> written in another language. E.g., think of shell programs in a
> Makefile, Java classes/methods in an AspectJ aspect, or "actions"
> associated with a grammar production.

The language that I expect to build an IDE for is the powerscript (= the
PowerBuilder language) and one of its specialities it to embed nearly
standard SQL syntax into a basic like syntax. It seems that I have a
perfect test case when the language embedding primitives will be
available :)

> To provide the various editor services in the embedded program
> fragment, one has to be able to parse the program fragment and produce
> an AST for it (even though it is not a complete program), analyze it
> within the surrounding context provided by the "host" program, and
> dispatch to IDE services that are appropriate for the language of that
> fragment.
>
> We're actually designing enhancements to IMP to provide this support
> as we speak.

Sooo good to know :D

> > I think of IDEs (Visual basic, Powerbuilder, ...) that let the user
> > open a source file and display just one procedure / function at a
> > time. And for that function it displays a list of the arguments with
> > listboxes for possible types, or a popup to jump into another
> > function definition.
>
> Admittedly, what we're designing isn't precisely intended to address
> your scenario, and so there would still need to be some additional UI
> work to produce the "fragment editor" itself, but I think it will be
> possible to build what you want on top of IMP once we've addressed
> embedding.

That ok for now, before being able to implement such a thing, I have
some work to do on the grammar specification. I am just writing one for
much simpler language do doing some practice.

Many thanks for the support, and for the work already done and made
available.
--
Sébastien Kirche
Previous Topic:IMP (with LPG) on OS X
Next Topic:Accommodating established languages (communities, tools)?
Goto Forum:
  


Current Time: Thu Apr 25 00:01:21 GMT 2024

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

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

Back to the top