Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » IPath.isValidPath() does not make sense
IPath.isValidPath() does not make sense [message #287591] Mon, 04 July 2005 10:30 Go to next message
Eclipse UserFriend
Hi,

Why is not IPath.isValidPath() a static method? (or, alternatively why
is not this method reconstructed so that it takes no parameter and
operates on the object where is it was called)? As far as I see
path.isValidPath(pathStr) does not even use the path object? It makes no
sense.

Am I missing something obvious here?


Docs for IPath:
http://help.eclipse.org/help30/index.jsp?topic=/org.eclipse. platform.doc.isv/reference/api/org/eclipse/core/runtime/IPat h.html

CVS source for Path implementation of IPath:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.core.ru ntime/src/org/eclipse/core/runtime/Path.java



regards,
martin
Re: IPath.isValidPath() does not make sense [message #287640 is a reply to message #287591] Tue, 05 July 2005 13:47 Go to previous message
Eclipse UserFriend
Originally posted by: john.eclipsefaq.org

The answer is simply that interfaces cannot define static methods. At
the time this was written, the goal was to define the API purely in
terms of interfaces. It does not operate on the receiver because the
purpose is to determine whether it would be legal to create a path from
the given string. You can use Path.ROOT.isValidPath(String). See also:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=76246
--

Martin Olsson wrote:
> Hi,
>
> Why is not IPath.isValidPath() a static method? (or, alternatively why
> is not this method reconstructed so that it takes no parameter and
> operates on the object where is it was called)? As far as I see
> path.isValidPath(pathStr) does not even use the path object? It makes no
> sense.
>
> Am I missing something obvious here?
>
>
> Docs for IPath:
> http://help.eclipse.org/help30/index.jsp?topic=/org.eclipse. platform.doc.isv/reference/api/org/eclipse/core/runtime/IPat h.html
>
>
> CVS source for Path implementation of IPath:
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.core.ru ntime/src/org/eclipse/core/runtime/Path.java
>
>
>
>
> regards,
> martin
Previous Topic:TableTreeViewer deprecation?
Next Topic:listener when project references has been changed
Goto Forum:
  


Current Time: Wed Nov 05 14:38:33 EST 2025

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

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

Back to the top