Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [iam-dev] [refactor] create - IPath IMavenProject.toRelativePath(IPath)

Gut reaction is for a ...

MavenProjectUtils singleton for these kind of utility methods.

public static IPath MavenProjectUtils.toRelativePath(IMavenProject
project, IPath path)

- Joakim

On Wed, Nov 26, 2008 at 12:07 PM, Abel Muiño Vizcaino <amuino@xxxxxxxxx> wrote:
> I have saw two different implementations of that in the past, one substring
> based and another workspace based.
>
> This certainly needs a cleanup, but I'm not sure that IMavenProject is the
> right place. This is an utility method and having all the IMavenProject
> implementations copy the method is almost as bad as the current situation.
>
>
> Another other candidate?
>
>
>
> El 26/11/2008, a las 19:43, Joakim Erdfelt escribió:
>
>> I've noticed a common method in the codebase for taking an IPath (or
>> just plain String) and returning a relative path if that path happens
>> to coincide with the path for the maven project.
>>
>> Can we create a IMavenProject method to handle this and isolate this
>> common (copy/pasted) method in one place?
>>
>> - Joakim
>> _______________________________________________
>> iam-dev mailing list
>> iam-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/iam-dev
>
> _______________________________________________
> iam-dev mailing list
> iam-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/iam-dev
>


Back to the top