Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-core-dev] org.eclipse.core.runtime.Path issue with colons

So I presume your use of IPath relies on either the use of the
'device' element or on having it reject ':', '\\' and leading and
trailing whitespace?

Please note that the origin of this problem was the
injection into IPath of a platform specific feature ( drive
letters) that then broke all other platforms.

I would be hugely interested in an elaboration of how you
see my issue here being more with IResource than IPath.
I'm sort of new to the code base so a patient explanation
would be hugely helpful to me.

Writing cross platform code is all about generalization
and localization.  You pull back your code so that it is
mostly written in a generalizable way that applies to
all platforms and then you write localizations to deal with
specific platform oddities.  SWT is a great example of this.
What appears to have happened here is that some localization
(drive letters etc) from Windows got pulled back into the
resource generalization via the IPath code.  This broke every
other platform.
What's really sad is that I've seen generalizations that handle
both drive letters and POSIX paths correctly...

Either way I would say that not supporting filenames on
Sun, Linux, Mac OS X, etc is not really a viable option.
If Eclipse would actually like to be a viable cross platform
cross language IDE this needs to be solved.

Ed
Gunnar Wagenknecht wrote:

Could you elaborate on which issues?

Well, it's not resource centric and that's the difference. The main
reason is because IPath provides a really easy-to-use interface for
abstract unique path names. We've integrated IPath into our model to use
it address a specific model type and element. If you start implementing
platform dependend behavior into IPath (eg. path seperators) a lot of
things will break (persistend strings) and we will lose the platform
independence.
I think you're problem is more specific to the Eclipse resource model
(IResource) than to IPath. IMHO it's a general issue in Java if you're
developing a platform independend applications. Sometimes you have to
drop support for platform specific features to achieve platform
independence.

Cu, Gunnar
_______________________________________________
platform-core-dev mailing list
platform-core-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-core-dev



Back to the top