Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-core-dev] Derived resources

Hi Szymon

2008/9/8 Szymon Brandys <Szymon.Brandys@xxxxxxxxxx>:
> Hi Giorgio,
>
> This is an issue worth investigating and fixing.

Nice thing to hear - I'm volunteering :)
I'll post a patch or (more probably) a plugin in a week or two (that
is - assuming I don't get struck) - please then someone could review
it?

> Maybe it could be stored
> as a builder preference,
> so each builder could have its own list of derived resources?

I think builders (well, the javabuilder at least) actually disregard
the "derived" flag:
* if I mark a .java file as "derived" it will nonetheless be compiled
(that is, assuming it is in a source folder)
* if I unmark a generated .class file and then modify the
corresponding source, the .class file "derived" flag will be reset to
true after regenerating the file

I don't know if this is the intended behavior or builders should treat
derived resources specially (plus I really only tested javabuilder)...
but actually it makes sense to me – "derived" sounds like information
intended more for the user (and, consequently, the UI) that for
builders - plus I want javabuilder to build the sources I generate
through some plugin

> Another proposal how to fix it is
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=154089

This is what should essentially be done IMHO:

REQ1. remember which resources were derived (and, of course, forget
them when they are marked as non-derived)

I'd like to add two more requirements, though:

REQ2. store the information in a file of its own inside .settings, so
that it can be selectively versioned with an SCM and/or mangled with
in an ant task or maven plugin

REQ3. only store the topmost directory of an all-derived hierarchy
(only /bin and not /bin/my/company/MyClass.class)

Does any additional requirement come to your mind?

> See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=30440
>
> Another idea is:
> We could show a dialog after a build with "incoming" files and let user
> choose which should be marked as derived.
> The dialog could allow the user to choose whether the settings should be
> used by default in the project.

Actually there is already a place where the user can say a resource is
derived (which is the property sheet of files/folders) and it _could_
suffice... probably experimenting with a prototype will clarify and
help us find the most usable option though (after all the property
sheet is not really that visible)

BTW - as said before - I'm not really into eclipse (or GUI programming
in general: I work on webapps mostly) and, even if I think I can end
up with something (probably a builder or ) working for the actual
"remember derived resources" thing - I doubt I could be of much use on
the UI part... :(


Thanks
  Giorgio


> Regards
> --
> Szymon Brandys
>
>
>
>
>             "Giorgio Gallo"
>             <giorgiga@gmail.c
>             om>                                                        To
>             Sent by:                  platform-core-dev@xxxxxxxxxxx
>             platform-core-dev                                          cc
>             -bounces@eclipse.
>             org                                                   Subject
>                                       [platform-core-dev] Derived
>                                       resources
>             2008-09-04 21:19
>
>
>             Please respond to
>             "Eclipse Platform
>              Core component
>             developers list."
>             <platform-core-de
>              v@xxxxxxxxxxx>
>
>
>
>
>
>
> Hi guys
>
> I just subscribed to the ML so I beg your pardon if this ends up being
> a FAQ... i searched a bit through the archives and found a few
> messages on the topic, but none seems to get to my point...
>
> Which is - do you think it would be possible in some future release to
> include in the project descriptor or somewhere inside the ".settings"
> directory a list of resources to always consider as derived?
>
> The rationale for this is that if you are building the project with
> some external tool (i use maven as a habit) you have to keep on
> re-marking the "target" directory as derived to avoid multiple matches
> in searches and to keep the xml validator out of there...
>
> What do you think? May I help somehow (ie: if I start working on a
> patch for this, will you reject it a priori)?
>
> Cheers,
>  Giorgio Gallo
>
> PS: I know i should have posted this as an enhancement request
> somewhere... sorry I really don't know anything about your
> infrastructure, and http://www.eclipse.org/eclipse/platform-core/ does
> not have a "report a bug" link...
> _______________________________________________
> platform-core-dev mailing list
> platform-core-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-core-dev
>
>
> _______________________________________________
> platform-core-dev mailing list
> platform-core-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-core-dev
>


Back to the top