Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] Write access on applied Profile (ReadOnlyHandler mechanism)

Hi,

If I remember correctly, there are two different cases for Profiles visibility in the ModelExplorer, depending on whether the main model is a Model or a Profile. In the first case, profiles can only be applied. In the latter case, profiles can be either applied or imported (And should thus behave as libraries =>be visible).

I'm not sure the IReadOnlyHandler for applied profiles even implements the makeWritable() method (Well, it does, but probably returns false; at least this has initially been implemented this way).

But in Cédric's case, I think it should be done programmatically: the goal is to define "hidden" profiles, so the user shouldn't have to make the profile writable explicitly. So, the solution is to properly implement makeWritable in the AppliedProfileReadOnlyHandler, and call it when necessary. By default, all imported/referenced/applied resources are read-only.

Camille

-----Message d'origine-----
De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de give.a.damus@xxxxxxxxx
Envoyé : lundi 12 mai 2014 12:32
À : Papyrus Project list
Objet : Re: [mdt-papyrus.dev] Write access on applied Profile (ReadOnlyHandler mechanism)

Hi, Cedric,

I think that applied profiles resident in the workspace (not deployed in plug-ins) ought to be shown in the Model Explorer as referenced libraries are.  Then the "Enable Write" context menu action would be available for this use case.

Camille, what do you think?  Why were workspace profiles excluded from the view in the first place?  Perhaps a common-navigator filter would help that original use case?

Cheers,

Christian



> On May 12, 2014, at 6:20, Cedric Dumoulin <cedric.dumoulin@xxxxxxx> wrote:
> 
> 
> Hi,
> 
>  I would like to be able to modify (write) the model of a Profile applied to a UML model.
>  Actually, if I try do modify the Profile, for example by adding a new Stereotype,, I got a ReadOnly exception saying that it is forbiden to modify an applied Profile.
> 
>  How can I change this behavior and be able to modify a Profile ?
> 
>  This requirement come from enhancement
> 432802: [Profile] Papyrus shall enhance the usability of profile/stereotype creation and application
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=432802
> 
>  In this enhancement, we would like to be able to create Profiles and Stereotypes in the same time as we edit a UML model. So, we need to write in applied Profile models.
> 
> 
>  Thanks for your help,
> 
>  Cedric
> _______________________________________________
> mdt-papyrus.dev mailing list
> mdt-papyrus.dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev
_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev


Back to the top