| 
| Project and JavaProject - Navigator & Pkg Explorer view [message #56134] | Thu, 24 July 2003 17:57  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: amanaval.sybase.com 
 Hi,
 
 I am trying to create a view to respond to a Project selection in the
 Navigator and Pkg explorer view. And have been having trouble in making it
 work for both the views. The selection in the Pkg Explorer is IJavaProject
 and the selection in the Navigator is an IProject and they both have nothing
 in common, meaning no base class to link them.
 
 Why didn't the JavaProject implement the IProject ? was there a good reason
 behind that ?
 
 For the navigator view,  I used   JavaCore.create((IResource) selObject);
 to get the JavaElement and from that got the JavaProject.  But when I needed
 to get the location of the project, I could only find that information in
 the IProjectDescription... As far as I see, JavaProject is project.
 
 It would be nice if some one could shed light on why JavaProject was not
 implementing the IProject. I am sure there is a good reason, and it would be
 nice to see why, since it doesn't make sense for me.
 
 thanks,
 -Anou
 |  |  |  | 
|  | 
| 
| Re: Project and JavaProject - Navigator & Pkg Explorer view [message #56181 is a reply to message #56159] | Fri, 25 July 2003 11:43  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: amanaval.sybase.com 
 Thanks Daniel for the response.
 
 I did workaround getting the project out of the JavaProject and getting the
 description out of it. But it felt wrong, I understand that the IProject is
 an underlying resource and it should be the base class for the different
 kinds of projects. Why is JavaProject not a Project ? It is a project with
 additional features that make it a Java project, so it is a project at its
 low level, I don't think it is wrong to consider it as a project.
 
 I will repost it in the jdt newsgroup.
 
 regards,
 -Anou
 
 "Daniel Megert" <daniel.megert@gmx.net> wrote in message
 news:bfqkea$sso$1@eclipse.org...
 > Anou Manavalan wrote:
 >
 > >Hi,
 > >
 > >I am trying to create a view to respond to a Project selection in the
 > >Navigator and Pkg explorer view. And have been having trouble in making
 it
 > >work for both the views. The selection in the Pkg Explorer is
 IJavaProject
 > >and the selection in the Navigator is an IProject and they both have
 nothing
 > >in common, meaning no base class to link them.
 > >
 > IProject = IJavaProject.getProject()
 >
 > >Why didn't the JavaProject implement the IProject ? was there a good
 reason
 > >behind that ?
 > >
 > An IProject with its included resources can serve as underlying resource
 > for more than one kind of project / nature.
 >
 > >For the navigator view,  I used   JavaCore.create((IResource) selObject);
 > >to get the JavaElement and from that got the JavaProject.  But when I
 needed
 > >to get the location of the project,
 > >
 > In case of
 >     resource: res.getProject().getLocation()
 >     Java element: je.getJavaProject().getProject() [ and then see above
 > line]
 >
 > > I could only find that information in
 > >the IProjectDescription... As far as I see, JavaProject is project.
 > >
 > wrong
 >
 > >
 > >It would be nice if some one could shed light on why JavaProject was not
 > >implementing the IProject. I am sure there is a good reason, and it would
 be
 > >nice to see why, since it doesn't make sense for me.
 > >
 > You'd better ask on eclipse.tools.jdt.
 >
 > HTH
 > Dani
 >
 |  |  |  | 
| 
| Re: Project and JavaProject - Navigator & Pkg Explorer view [message #594618 is a reply to message #56134] | Fri, 25 July 2003 02:58  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: daniel.megert.gmx.net 
 Anou Manavalan wrote:
 
 >Hi,
 >
 >I am trying to create a view to respond to a Project selection in the
 >Navigator and Pkg explorer view. And have been having trouble in making it
 >work for both the views. The selection in the Pkg Explorer is IJavaProject
 >and the selection in the Navigator is an IProject and they both have nothing
 >in common, meaning no base class to link them.
 >
 IProject = IJavaProject.getProject()
 
 >Why didn't the JavaProject implement the IProject ? was there a good reason
 >behind that ?
 >
 An IProject with its included resources can serve as underlying resource
 for more than one kind of project / nature.
 
 >For the navigator view,  I used   JavaCore.create((IResource) selObject);
 >to get the JavaElement and from that got the JavaProject.  But when I needed
 >to get the location of the project,
 >
 In case of
 resource: res.getProject().getLocation()
 Java element: je.getJavaProject().getProject() [ and then see above
 line]
 
 > I could only find that information in
 >the IProjectDescription... As far as I see, JavaProject is project.
 >
 wrong
 
 >
 >It would be nice if some one could shed light on why JavaProject was not
 >implementing the IProject. I am sure there is a good reason, and it would be
 >nice to see why, since it doesn't make sense for me.
 >
 You'd better ask on eclipse.tools.jdt.
 
 HTH
 Dani
 |  |  |  | 
| 
| Re: Project and JavaProject - Navigator & Pkg Explorer view [message #594624 is a reply to message #56159] | Fri, 25 July 2003 11:43  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: amanaval.sybase.com 
 Thanks Daniel for the response.
 
 I did workaround getting the project out of the JavaProject and getting the
 description out of it. But it felt wrong, I understand that the IProject is
 an underlying resource and it should be the base class for the different
 kinds of projects. Why is JavaProject not a Project ? It is a project with
 additional features that make it a Java project, so it is a project at its
 low level, I don't think it is wrong to consider it as a project.
 
 I will repost it in the jdt newsgroup.
 
 regards,
 -Anou
 
 "Daniel Megert" <daniel.megert@gmx.net> wrote in message
 news:bfqkea$sso$1@eclipse.org...
 > Anou Manavalan wrote:
 >
 > >Hi,
 > >
 > >I am trying to create a view to respond to a Project selection in the
 > >Navigator and Pkg explorer view. And have been having trouble in making
 it
 > >work for both the views. The selection in the Pkg Explorer is
 IJavaProject
 > >and the selection in the Navigator is an IProject and they both have
 nothing
 > >in common, meaning no base class to link them.
 > >
 > IProject = IJavaProject.getProject()
 >
 > >Why didn't the JavaProject implement the IProject ? was there a good
 reason
 > >behind that ?
 > >
 > An IProject with its included resources can serve as underlying resource
 > for more than one kind of project / nature.
 >
 > >For the navigator view,  I used   JavaCore.create((IResource) selObject);
 > >to get the JavaElement and from that got the JavaProject.  But when I
 needed
 > >to get the location of the project,
 > >
 > In case of
 >     resource: res.getProject().getLocation()
 >     Java element: je.getJavaProject().getProject() [ and then see above
 > line]
 >
 > > I could only find that information in
 > >the IProjectDescription... As far as I see, JavaProject is project.
 > >
 > wrong
 >
 > >
 > >It would be nice if some one could shed light on why JavaProject was not
 > >implementing the IProject. I am sure there is a good reason, and it would
 be
 > >nice to see why, since it doesn't make sense for me.
 > >
 > You'd better ask on eclipse.tools.jdt.
 >
 > HTH
 > Dani
 >
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.03995 seconds