Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » why not check project references when importing an existing project ?
why not check project references when importing an existing project ? [message #520365] Fri, 12 March 2010 06:21 Go to next message
Kristof Szabados is currently offline Kristof SzabadosFriend
Messages: 82
Registered: July 2009
Member
Hi,

In our system we have created a large selection of projects, with proper
project reference settings between them.
Now when we import an existing project, eclipse correctly discovers all
of the projects we have in our folder structure, and displayes them in a
list...

but right now this means that we have to select each project we wish to
import, and if we leave out one, the problem will only be reported at
build time.
It would be nice if this feature would work somewhat more like the
installation of new features does:
- if a dependency /*referenced project*/ is not already in the workbench
or select to be imported an error is displayed to let the user know.
- Or better a "select all needed projects too" button

Is there any option in eclipse, that we forgot to turn on to enable this
feature of would this be a new feature ?

Best Regards
Kristof
Re: why not check project references when importing an existing project ? [message #520366 is a reply to message #520365] Fri, 12 March 2010 06:32 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
On 12/03/10 11:51 AM, Kristof Szabados wrote:
> but right now this means that we have to select each project we wish to
> import, and if we leave out one, the problem will only be reported at
> build time.
> It would be nice if this feature would work somewhat more like the
> installation of new features does:
> - if a dependency /*referenced project*/ is not already in the workbench
> or select to be imported an error is displayed to let the user know.
> - Or better a "select all needed projects too" button

There is no feature right now to import a project along with its
dependencies.

This is mainly because, the dependencies of the project is not read
when importing the project. Even if we are to do that, there is no
assurance that the dependent projects are in the same archive/folder
from where the project is imported.

- Prakash
Platform UI Team, IBM

www.eclipse-tips.com
Re: why not check project references when importing an existing project ? [message #520469 is a reply to message #520366] Fri, 12 March 2010 14:09 Go to previous messageGo to next message
Kristof Szabados is currently offline Kristof SzabadosFriend
Messages: 82
Registered: July 2009
Member
I understand that in general the required plug-ins might not be there.

But if they are not there I believe it would be better to get a warning
telling that something is missing ... instead of getting that warning at
build time /* or in case of general plug-ins */ believing that
everything is OK.
If the user gets this warning while importing the project, he can start
looking for the missing ones, and decide to import them before the
actual one.

Also just in case the projects would be there, automatically selecting
the needed ones would be quite some help.

Best Regards
Kristof


On 2010.03.12. 7:32, Prakash G.R. wrote:
> On 12/03/10 11:51 AM, Kristof Szabados wrote:
>> but right now this means that we have to select each project we wish to
>> import, and if we leave out one, the problem will only be reported at
>> build time.
>> It would be nice if this feature would work somewhat more like the
>> installation of new features does:
>> - if a dependency /*referenced project*/ is not already in the workbench
>> or select to be imported an error is displayed to let the user know.
>> - Or better a "select all needed projects too" button
>
> There is no feature right now to import a project along with its
> dependencies.
>
> This is mainly because, the dependencies of the project is not read when
> importing the project. Even if we are to do that, there is no assurance
> that the dependent projects are in the same archive/folder from where
> the project is imported.
>
> - Prakash
> Platform UI Team, IBM
>
> www.eclipse-tips.com
Re: why not check project references when importing an existing project ? [message #524067 is a reply to message #520365] Tue, 30 March 2010 09:26 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3071
Registered: July 2009
Senior Member
On 3/12/10 1:21 AM, Kristof Szabados wrote:
> Hi,
>
> In our system we have created a large selection of projects, with proper
> project reference settings between them.
> Now when we import an existing project, eclipse correctly discovers all
> of the projects we have in our folder structure, and displayes them in a
> list...
>
> but right now this means that we have to select each project we wish to
> import, and if we leave out one, the problem will only be reported at
> build time.
> It would be nice if this feature would work somewhat more like the
> installation of new features does:
> - if a dependency /*referenced project*/ is not already in the workbench
> or select to be imported an error is displayed to let the user know.
> - Or better a "select all needed projects too" button
>
> Is there any option in eclipse, that we forgot to turn on to enable this
> feature of would this be a new feature ?

Have you looked into using a Team Project Set? If the projects are in
CVS/svn, a project set file defines all of the projects that belong
together as well as their locations in the repository; makes it very
easy to import them all in one step.

Hope this helps,
Eric
Re: why not check project references when importing an existing project ? [message #524182 is a reply to message #524067] Wed, 31 March 2010 01:20 Go to previous messageGo to next message
Kristof Szabados is currently offline Kristof SzabadosFriend
Messages: 82
Registered: July 2009
Member
Hi,

Thank you for the information, this is definitely getting me closer to
my aim.

Though if I understand correctly we would have to create a team set for
every project, that refers to other projects and can be used as a "top
level project".
I believe it would be somewhat better if this could be done dynamically
at import time.

Let me show an example:
Lets have project A refering to B, refering to C

With team project set I would have to create such a set for both project
A and B.
In case we add some more dependency to the system and Project B should
also refer to D /* so now it refers to both C and D */, we have to
refresh the project set description of both project A and B.

It would be somewhat easier if when I import project A, it would be
detected that project B is needed ... and in a recursive manner the need
for project C and D would also automatically show.

As far as I understand this logic /* or something very similar */ is
already used when new plug-ins are installed.

Best Regards
Kristof


On 2010.03.30. 16:10, Eric Rizzo wrote:
> On 3/12/10 1:21 AM, Kristof Szabados wrote:
>> Hi,
>>
>> In our system we have created a large selection of projects, with proper
>> project reference settings between them.
>> Now when we import an existing project, eclipse correctly discovers all
>> of the projects we have in our folder structure, and displayes them in a
>> list...
>>
>> but right now this means that we have to select each project we wish to
>> import, and if we leave out one, the problem will only be reported at
>> build time.
>> It would be nice if this feature would work somewhat more like the
>> installation of new features does:
>> - if a dependency /*referenced project*/ is not already in the workbench
>> or select to be imported an error is displayed to let the user know.
>> - Or better a "select all needed projects too" button
>>
>> Is there any option in eclipse, that we forgot to turn on to enable this
>> feature of would this be a new feature ?
>
> Have you looked into using a Team Project Set? If the projects are in
> CVS/svn, a project set file defines all of the projects that belong
> together as well as their locations in the repository; makes it very
> easy to import them all in one step.
>
> Hope this helps,
> Eric
Re: why not check project references when importing an existing project ? [message #524314 is a reply to message #524182] Wed, 31 March 2010 13:56 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3071
Registered: July 2009
Senior Member
On 3/31/10 1:38 AM, Kristof Szabados wrote:
> Hi,
>
> Thank you for the information, this is definitely getting me closer to
> my aim.
>
> Though if I understand correctly we would have to create a team set for
> every project, that refers to other projects and can be used as a "top
> level project".
>
> I believe it would be somewhat better if this could be done dynamically
> at import time.
>
> Let me show an example:
> Lets have project A refering to B, refering to C
>
> With team project set I would have to create such a set for both project
> A and B.
> In case we add some more dependency to the system and Project B should
> also refer to D /* so now it refers to both C and D */, we have to
> refresh the project set description of both project A and B.

No. A project set is just a file (that you create via the Export...
wizard) that defines a set of projects and where to get them from
CVS/svn). You can include as many projects as you want, and they don't
necessarily have to be related through references. It's just a
convenient way to define a group of projects that should be checked out
together. You would not need multiple project sets for the scenario you
describe.
Keep in mind that the projects have to come from a Team provider
(typically, CVS or subversion); it doesn't apply to projects that are
imported from files.

<more below>

>
> It would be somewhat easier if when I import project A, it would be
> detected that project B is needed ... and in a recursive manner the need
> for project C and D would also automatically show.
>
> As far as I understand this logic /* or something very similar */ is
> already used when new plug-ins are installed.

The logic for resolving plug-in dependencies is extremely complex and a
difficult problem to solve (it's quite open-ended), as opposed to what
you're talking about which is a relatively closed problem and thus
"easier." However, the difficulty with what you're requesting is that
the feature would have to assume locations for the referenced projects.
While that may be a reasonable assumption for your specific use case, I
don't think it is in the general case. In other words, that kind of
assumption is only valid in a narrow set of circumstances.
You are free to enter a feature request about it; just keep in mind that
there are literally thousands of feature requests for the platform
already, so ones that include code patches are much more likely to get
attention.

Eric
Re: why not check project references when importing an existing project ? [message #524331 is a reply to message #524182] Wed, 31 March 2010 14:24 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

This presumes you when you say "import" you mean checkout from CVS. If
you mean "File>Import...>Plug-ins and Fragments" then PSFs won't help
you, and that's a completely different scenario.

Team Project Sets are probably as good as it gets. When you add a new
dependency D on your project (adding new project dependencies are not to
be done lightly, obviously), you have to update the PSF. I think it
would be hard to write something that works for the general case.


New Plug-ins are a little different. There's an entire subsystem (p2)
that specializes in 1) picking the correct version and 2) find its
location from a set of URIs, parsing metadata, etc.


You might be able to write it yourself ... a special plugin that listens
for project dependency changes (which must be Java projects only,
because PDE/plugins don't use the project dependencies). Then search
your workspace for any PSFs that have that project (making sure to match
the streams), look at the new project to find out its CVS information,
and then update the existing PSF. Then you would have to make sure that
project D is in the correct state before added to your existing project.

In the eclipse setup I work in, I have plugins from 4 different
repositories to make one set of 5 features. I can think of one trivial
case in which this PSF update would have worked correctly and 2 that
have occurred in the last 3 months in which it would not. So for me,
with a success rate of 33% I'll pass :-)

Later,
PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: why not check project references when importing an existing project ? [message #524506 is a reply to message #524314] Thu, 01 April 2010 03:18 Go to previous messageGo to next message
Kristof Szabados is currently offline Kristof SzabadosFriend
Messages: 82
Registered: July 2009
Member
Hi,

Well the main point is that these projects are not plug-ins, or even
Java code, but project using our in-house eclipse extension IDE.

As far as I could understand the eclipse platform offers this
"referenced projects" feature where the users can create dependencies
between projects they are working with.
Processing it by looking at the .project files did not seem to be that
complicated for me, as the references are stored only by names ... if
there is a project with the given name its fine, otherwise there is a
problem.

Definitely team sets help a lot in handling large number of such
projects, however if some base project changes /* like a new dependency
is introduced */ all team set files have to be updated. This works fine
as long as we have access to all projects.
However we have some customers who have access to our "sources", but we
can not see their projects. As such if we update local "refers"
dependency we would have to send out notices to them to update their own
team set files as well.
It would be somewhat better if the next time they import a set of
projects from our place /* maybe a new version of a product handled by
our IDE extension */ the new dependency could be selected for import
automatically.

I guess I will try to create a code patch on my own and see if it can be
accepted into the platform. /* Or our own import wizard .. but it
sounds awkward to re-create the whole import functionality just so that
at import time we can check if all referenced projects are selected too,
or present in the workspace */

Can anyone give me some pointers on where to search for the code of the
import General / "Existing Projects into Workspace" wizard?
The source is rather large, and google in this case always finds regular
tutorials on importing java projects.

BR
Kristof


On 2010.03.31. 15:56, Eric Rizzo wrote:
> On 3/31/10 1:38 AM, Kristof Szabados wrote:
>> Hi,
>>
>> Thank you for the information, this is definitely getting me closer to
>> my aim.
>>
>> Though if I understand correctly we would have to create a team set for
>> every project, that refers to other projects and can be used as a "top
>> level project".
> >
>> I believe it would be somewhat better if this could be done dynamically
>> at import time.
>>
>> Let me show an example:
>> Lets have project A refering to B, refering to C
>>
>> With team project set I would have to create such a set for both project
>> A and B.
>> In case we add some more dependency to the system and Project B should
>> also refer to D /* so now it refers to both C and D */, we have to
>> refresh the project set description of both project A and B.
>
> No. A project set is just a file (that you create via the Export...
> wizard) that defines a set of projects and where to get them from
> CVS/svn). You can include as many projects as you want, and they don't
> necessarily have to be related through references. It's just a
> convenient way to define a group of projects that should be checked out
> together. You would not need multiple project sets for the scenario you
> describe.
> Keep in mind that the projects have to come from a Team provider
> (typically, CVS or subversion); it doesn't apply to projects that are
> imported from files.
>
> <more below>
>
>>
>> It would be somewhat easier if when I import project A, it would be
>> detected that project B is needed ... and in a recursive manner the need
>> for project C and D would also automatically show.
>>
>> As far as I understand this logic /* or something very similar */ is
>> already used when new plug-ins are installed.
>
> The logic for resolving plug-in dependencies is extremely complex and a
> difficult problem to solve (it's quite open-ended), as opposed to what
> you're talking about which is a relatively closed problem and thus
> "easier." However, the difficulty with what you're requesting is that
> the feature would have to assume locations for the referenced projects.
> While that may be a reasonable assumption for your specific use case, I
> don't think it is in the general case. In other words, that kind of
> assumption is only valid in a narrow set of circumstances.
> You are free to enter a feature request about it; just keep in mind that
> there are literally thousands of feature requests for the platform
> already, so ones that include code patches are much more likely to get
> attention.
>
> Eric
Re: why not check project references when importing an existing project ? [message #524600 is a reply to message #524506] Thu, 01 April 2010 14:35 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Kristof Szabados wrote:

>
> Can anyone give me some pointers on where to search for the code of the
> import General / "Existing Projects into Workspace" wizard?
> The source is rather large, and google in this case always finds regular
> tutorials on importing java projects.
>

Just in general, if you open the wizard to the first page and use
ALT+SHIFT+F1 it will give you the classes used as the Wizard and the
Page itself.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:How to get eclipse version
Next Topic:What is the best approach to extending Platform/JDT?
Goto Forum:
  


Current Time: Mon Aug 15 19:27:48 GMT 2022

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

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

Back to the top