This PR is getting hot :). I suggest to discuss this (and other specific
design issues) in the next weekly meeting, because I also have some
concerns about the code and I agree with @jtorrente about addressing this
situation.


On Thu, Mar 13, 2014 at 10:31 AM, Javier Torrente
<notifications@github.com>wrote:

> In
> editor/core/src/main/java/es/eucm/ead/editor/control/actions/AddScene.java:
>
> > @@ -58,9 +59,14 @@ public void perform(Object... args) {
> >  			sceneId = "scene" + counter;
> >  		}
> >
> > -		EditorScene scene = new EditorScene();
> > -		scene.setName(sceneId);
> > -		scene.setNotes(new Note());
> > +		EditorScene scene;
>
> The underlying problem here is that we are not using the appropriate
> action. Actions are supposed to encapsulate functionality from the user
> perspective. There are differences between adding a scene and duplicating
> or pasting one, because from the user's point of view these are two
> separate things. So we'd want to have them separated or after a while we'll
> end up having a good mess.
>
> Consider for example that right now we are not doing any processing of the
> elements that are pasted, something we'll eventually have to do because
> otherwise the usability of the editor will not be very good. Examples:
> changing the name of the new scene when it is pasted. That's something
> editors typically do (newScene.name=oldScene.name+ " Copy"). Or changing a
> little the transformation of a scene element when it is pasted twice so you
> can actually see both of them (otherwise you may think that the element was
> pasted once only because you have no feedback). In short: to actually make
> a good paste you need more context. AddXXX actions will not have that
> context because they don't need it. Without having separate actions, AddXXX
> actions will need to be too complex.
>
> Gonna have a coffee - keep discussing later so we don't get cold : )
>
> In this case what we'd probably need is to have AddXXX actions and also
> DuplicateXXX actions that extend a common parent.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/e-ucm/ead/pull/122/files#r10557468>
> .
>