Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] Target as Api Baseline

A little later than initially desired; but I've created an initial implementation which can be found here :
https://github.com/jd-carroll/target-baselines

There are still a number of issues to be worked out, but for the most part it "should" work.

The biggest issue I see is creating a reliable way to link/associate an API Baseline from the baseline manager to a target from the TargetPlatformService.  The implementation does not address the notion of reloading an API Baseline, but I think that's something that can be sorted out later.

If there are any questions please let me know.  All of the code is released under EPL, and I foresee this eventually being fully adopted into PDE (possibly sooner rather than later).  Where or how might be a separate issue.  But I intend on keeping the update-site updated for those using 4.2, and if there is enough interest I might even create a 3.7 update-site.

JD



On Wed, Jul 31, 2013 at 1:06 PM, Curtis Windatt <Curtis_Windatt@xxxxxxxxxx> wrote:

I definitely think there is enough interest in this to add it to PDE API Tools.

Having the baseline recognize that its components have changed is already a problem for us.  This will be more problematic for target based baselines.  That being said, a solution to bug 405494 could apply directly to this.  Target platforms have to make everything available locally, so if the files the components are based on are changed on disk, we could try to recreate the baseline from the target file.  Editing a target definition would probably change the on disk content (though not guaranteed as p2 doesn't GC downloaded bundles immediately).
https://bugs.eclipse.org/bugs/show_bug.cgi?id=405494

I would suggest that hitting the edit button on the pref page with a target baseline uses the same code as the Target definition preference page (EditTargetDefinitionWizard with a working copy).  That preference page already handles editing workspace files.

Perhaps the edit button on the preference page should have an extra dialog allowing the user to choose a different target definition (with a link to edit it or go to the target pref page to create a new one).  It would allow the user to specify a baseline name (vs using the target definition name).  It would probably make it more clear that you are actually modifying the target file and it could be very convenient for users to bump up their baseline.  For example, I have 4.4, 4.3, 4.2 targets defined, after a release I could just edit my baseline to point to a different target.  There was a bug in PDE UI related to this that I can't find at the moment.  The idea was to have a baseline be associated with a target so as you changed targets your baseline would be automatically corrected.

Curtis


Inactive hide details for Joseph D Carroll Jr ---07/31/2013 12:45:14 PM---Curtis- Thanks for the reply, and yes this will be avJoseph D Carroll Jr ---07/31/2013 12:45:14 PM---Curtis- Thanks for the reply, and yes this will be available for the UI  (and of



From: Joseph D Carroll Jr <jdsalingerjr@xxxxxxxxx>
To: "Eclipse PDE general developers list." <pde-dev@xxxxxxxxxxx>,
Date: 07/31/2013 12:45 PM
Subject: Re: [pde-dev] Target as Api Baseline

Sent by: pde-dev-bounces@xxxxxxxxxxx




Curtis-

Thanks for the reply, and yes this will be available for the UI  (and of course all release under EPL).  Actually, I was planning on listing this as a completely separate preference page.  Originally I wasn't too sure about how much enthusiasm there would be about this feature with-in PDE, so I was going to try and keep this as a separate installable feature. (Would also enable using it in Indigo)  But having done a little more research it seems as though there would be real interest in this feature, and creating it as an enhancement within PDE may be the way to go.  

I really like the idea of expanding the ApiModelFactory, I did not think of that and will likely be much easier.  The only other thing I want to ensure is that if you "Edit" an API Baseline that is also a target stored as a workspace resource (not a local_target), the workspace resource is updated as well.  I don't think that will be too difficult.

I'll take a look at the ApiModelFactory this afternoon and I should have a demoable feature by tomorrow.

Thanks again,

JD


On Wed, Jul 31, 2013 at 11:35 AM, Curtis Windatt <Curtis_Windatt@xxxxxxxxxx> wrote:
    Hi JD,

    Off the top of my head, I think that you should expand ApiModelFactory to have a new addComponents() method that takes a ITargetDefinition.  Alternatively you could pass in a File or URI to the .target file and handle the interaction with the ITargetPlatformService API inside the model factory.  This is similar to what the current addComponents method does.  However, be aware that API tools can be run without OSGi, meaning the ITargetPlatformService would be unavailable.  If you can't handle that case the javadoc should say so and log some sort of warning.


    I don't think you would need to extend ApiBaseline to do this.  Certainly you don't want to extend WorkspaceBaseline as it builds a baseline from the current contents of the PDE model (combined workspace and target platform).


    Are you planning to make this available in the UI?  You could have a new button on the pref page to add from target.  Then use the ITargetPlatformService to get a list of all targets (even those in the workspace) and allow the user to select one.


    Curtis


    Inactive hide details for Joseph D Carroll Jr ---07/31/2013 11:12:49 AM---I am working on implementing a new feature that allowJoseph D Carroll Jr ---07/31/2013 11:12:49 AM---I am working on implementing a new feature that allows a developer to specify/use an existing target

    From:
    Joseph D Carroll Jr <jdsalingerjr@xxxxxxxxx>
    To:
    pde-dev@xxxxxxxxxxx,
    Date:
    07/31/2013 11:12 AM
    Subject:
    [pde-dev] Target as Api Baseline
    Sent by:
    pde-dev-bounces@xxxxxxxxxxx





    I am working on implementing a new feature that allows a developer to specify/use an existing target definition as an Api Baseline.

    http://www.eclipse.org/forums/index.php/t/244906/
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=324310

    The feature is almost complete, but the deeper I go the more I am running into problems.  Right now I am stuck on the difference between the classes o.e.pde.api.tools.internal.model.ApiBaseline and WorkspaceBaseline.

    The implementation creates a new ITargetBasline which will allow for local targets and targets specified in the workspace through *.target files.  But from a model implementation standpoint, I'm not sure which I should extend from (ApiBaseline or WorkspaceBaseline) or both (and when)... ?

    Any clarification would be much appreciated.

    Thanks,

    JD_______________________________________________
    pde-dev mailing list

    pde-dev@xxxxxxxxxxx
    https://dev.eclipse.org/mailman/listinfo/pde-dev


    _______________________________________________
    pde-dev mailing list

    pde-dev@xxxxxxxxxxx
    https://dev.eclipse.org/mailman/listinfo/pde-dev
_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pde-dev


_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pde-dev


GIF image


Back to the top