Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Problems with M7
Problems with M7 [message #128007] Tue, 22 May 2007 04:49 Go to next message
Eclipse UserFriend
Hi there,

I have two problems with the new stable release M7.

First one is with Feature Label Mapping. In M6 and before I was able to
select features, which I could use for view and edit. I used only a part
of them for editing, but all of them for viewing. Now in M7 this is not
possible anymore, in my oppinion I have to use all of the features in
edit pattern. Why it was changed?

My example:
features: name, parameters: EString
In M6 I used for view pattern: {0}({1})
and for edit pattern: {1}

Second problem is with connections:
I have built an editor with the double-click-open-a-new-diagram feature.
This works fine. But if I connect two nodes with a connection, save
this, close the diagram and reopen it, the connection is lost. The
object of this connection is in the containment feature but I cannot see
it in the diagram.
If I stay in diagram with connection and go to Properties View with a
click and after that I click the diagram there is always the question
about: "File was changed on file system. Do you want to load the
changes?". (I have done nothing only clicked) If I accept with yes, the
connection is also lost.

Can someone help me?
It works so nice with M6 and I was waiting for the validation decoration
of M7, which works fine, but new problems are there.

Regards,
Jens
Re: Problems with M7 [message #128056 is a reply to message #128007] Tue, 22 May 2007 06:53 Go to previous messageGo to next message
Eclipse UserFriend
> Second problem is with connections:
If I deactivate the canonical edit policy for the edit part, the
connection will be shown, but it will not be deleted in containment
feature but in view. What has been changed between M6 and M7?

Regards,
Jens
Re: Problems with M7 [message #128068 is a reply to message #128007] Tue, 22 May 2007 07:09 Go to previous messageGo to next message
Eclipse UserFriend
Jens Bachmann wrote:

> Second problem is with connections:
> I have built an editor with the double-click-open-a-new-diagram feature.
> This works fine. But if I connect two nodes with a connection, save
> this, close the diagram and reopen it, the connection is lost. The
> object of this connection is in the containment feature but I cannot see
> it in the diagram.

Hi. :)

I have the same problem. I thought I had made some mistake in the
mapping step, but since I'm not alone, maybe not...
Re: Problems with M7 [message #128183 is a reply to message #128056] Tue, 22 May 2007 09:59 Go to previous messageGo to next message
Eclipse UserFriend
>> Second problem is with connections:
> If I deactivate the canonical edit policy for the edit part, the
> connection will be shown, but it will not be deleted in containment
> feature but in view. What has been changed between M6 and M7?
Now I copied the ...CanonicalEditPolicy.java from my M6 build to the M7
package. And it works. I think in the new generation of this policy
class there are some mistakes. A hint for the developers ;)
>
> Regards,
> Jens
Re: Problems with M7 [message #128195 is a reply to message #128183] Tue, 22 May 2007 10:38 Go to previous messageGo to next message
Eclipse UserFriend
Jens Bachmann wrote:
> Now I copied the ...CanonicalEditPolicy.java from my M6 build to the M7
> package. And it works. I think in the new generation of this policy
> class there are some mistakes. A hint for the developers ;)


Could you post the code of this class please ?
I removed the previous build from my machine.

Regards,

Vincent.
Re: Problems with M7 [message #128516 is a reply to message #128007] Wed, 23 May 2007 07:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

The first problem: you should specify 'editor' pattern now; it's the
text for inplace editor.

Jens Bachmann wrote:
> Hi there,
>
> I have two problems with the new stable release M7.
>
> First one is with Feature Label Mapping. In M6 and before I was able to
> select features, which I could use for view and edit. I used only a part
> of them for editing, but all of them for viewing. Now in M7 this is not
> possible anymore, in my oppinion I have to use all of the features in
> edit pattern. Why it was changed?
>
> My example:
> features: name, parameters: EString
> In M6 I used for view pattern: {0}({1})
> and for edit pattern: {1}
>
> Second problem is with connections:
> I have built an editor with the double-click-open-a-new-diagram feature.
> This works fine. But if I connect two nodes with a connection, save
> this, close the diagram and reopen it, the connection is lost. The
> object of this connection is in the containment feature but I cannot see
> it in the diagram.
> If I stay in diagram with connection and go to Properties View with a
> click and after that I click the diagram there is always the question
> about: "File was changed on file system. Do you want to load the
> changes?". (I have done nothing only clicked) If I accept with yes, the
> connection is also lost.
>
> Can someone help me?
> It works so nice with M6 and I was waiting for the validation decoration
> of M7, which works fine, but new problems are there.
>
> Regards,
> Jens
Re: Problems with M7 [message #128543 is a reply to message #128516] Wed, 23 May 2007 07:24 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I also tried to set the editor pattern. But the problem is still there.
I have two features. I want to edit the first one and after parsing
this, I set the second feature and want only to show this.
The background is: the label could be very long and I add a linebreak
after 20 characters or so to get more lines with all informations of
label text. So wraplabel is not the thing I'm searching for in my oppinion.
I have features: actions, actionsOutput:EString
editor pattern: {0}
view pattern: {1}

If I edit the node's label, the text will not be parsed. If I edit it in
properties view, it works.

Could you or another one help me?

Thanks,
Jens
Re: Problems with M7 [message #128625 is a reply to message #128183] Wed, 23 May 2007 08:37 Go to previous messageGo to next message
Eclipse UserFriend
Hello Jens,

> class there are some mistakes. A hint for the developers ;)
The real hint will be if you will investigate this problem a little bit further
and create a bugzilla entry for it together with the description of your
diagram structure (Ecore diagram works well)..

-----------------
Alex Shatalin
Re: Problems with M7 [message #128853 is a reply to message #128543] Wed, 23 May 2007 11:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

With setup:

features: actions, actionsOutput
editor pattern: {0}
view pattern: {1}

you will see 'actionsOutput' on diagram and 'actions' in inplace editor
text box. But when new text is modified and you press enter

1. Entered text will be parsed using 'editPattern' in array of values
2. This array of values should have length 2
3. The first value will be set as 'actions' feature value
4. The second value will be set as 'actionsOutput' feature value

I'm not sure that I fully understand all your tricks with 20 characters
but it's essential to provide correct 'editPattern' string to parse user
input. I would also recommend you to read MessageFormat javadoc to
understand it's patterns.

Jens Bachmann wrote:
> Hi,
>
> I also tried to set the editor pattern. But the problem is still there.
> I have two features. I want to edit the first one and after parsing
> this, I set the second feature and want only to show this.
> The background is: the label could be very long and I add a linebreak
> after 20 characters or so to get more lines with all informations of
> label text. So wraplabel is not the thing I'm searching for in my oppinion.
> I have features: actions, actionsOutput:EString
> editor pattern: {0}
> view pattern: {1}
>
> If I edit the node's label, the text will not be parsed. If I edit it in
> properties view, it works.
>
> Could you or another one help me?
>
> Thanks,
> Jens
>
Re: Problems with M7 [message #128892 is a reply to message #128625] Wed, 23 May 2007 11:19 Go to previous messageGo to next message
Eclipse UserFriend
Hi Alex,

I've submitted a bugzilla for it,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=188662

Regards,
Jens

Alex Shatalin wrote:
> Hello Jens,
>
>> class there are some mistakes. A hint for the developers ;)
> The real hint will be if you will investigate this problem a little bit
> further and create a bugzilla entry for it together with the description
> of your diagram structure (Ecore diagram works well)..
>
> -----------------
> Alex Shatalin
>
>
Re: Problems with M7 [message #128934 is a reply to message #128853] Wed, 23 May 2007 12:04 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I think I understand the messageformat javadoc correct, so I have to
give the edit pattern {0}{1} to read both features.
What I want is, to read only the actions by edit pattern and to show
only the actionsOutput to view, because I want to format the output with
linebreaks. I format it in setActions() method and there I set
actionsOutput. But if I give the edit pattern only {0}, this method is
never called in my implemented class of belonging object.
In 2.0M6 and before I was able to read only the first feature and to
show only the second feature. I tried all edit methods of M7 and
couldn't find an answer to my problem.
Who can give me a hint?

Greetings,
Jens

Dmitry Stadnik wrote:
> With setup:
>
> features: actions, actionsOutput
> editor pattern: {0}
> view pattern: {1}
>
> you will see 'actionsOutput' on diagram and 'actions' in inplace editor
> text box. But when new text is modified and you press enter
>
> 1. Entered text will be parsed using 'editPattern' in array of values
> 2. This array of values should have length 2
> 3. The first value will be set as 'actions' feature value
> 4. The second value will be set as 'actionsOutput' feature value
>
> I'm not sure that I fully understand all your tricks with 20 characters
> but it's essential to provide correct 'editPattern' string to parse user
> input. I would also recommend you to read MessageFormat javadoc to
> understand it's patterns.
>
> Jens Bachmann wrote:
>> Hi,
>>
>> I also tried to set the editor pattern. But the problem is still there.
>> I have two features. I want to edit the first one and after parsing
>> this, I set the second feature and want only to show this.
>> The background is: the label could be very long and I add a linebreak
>> after 20 characters or so to get more lines with all informations of
>> label text. So wraplabel is not the thing I'm searching for in my
>> oppinion.
>> I have features: actions, actionsOutput:EString
>> editor pattern: {0}
>> view pattern: {1}
>>
>> If I edit the node's label, the text will not be parsed. If I edit it
>> in properties view, it works.
>>
>> Could you or another one help me?
>>
>> Thanks,
>> Jens
>>
Re: Problems with M7 [message #128960 is a reply to message #128934] Wed, 23 May 2007 13:01 Go to previous message
Eclipse UserFriend
Hi,

it was a little bit tricky, but I found a way to get what I want. Here
is my solution for the ???ParserProvider class:

protected IParser create???ActionsActionsOutput_####Parser() {
EAttribute[] features = new EAttribute[] {
???Package.eINSTANCE.get???_Actions(),
???Package.eINSTANCE.get???_ActionsOutput(),
};
EAttribute[] features1 = new EAttribute[] {
???Package.eINSTANCE.get???_Actions()
};
MessageFormatParser reader = new MessageFormatParser(features);
reader.setViewPattern("{1}");
reader.setEditorPattern("{0}");
MessageFormatParser writer = new
MessageFormatParser(features1);
writer.setEditPattern("{0}");
return new CompositeParser(reader, writer);
}

Thanks for hints!!

Regards,
Jens
Previous Topic:Shapes example
Next Topic:Move figures with cursors
Goto Forum:
  


Current Time: Thu May 08 20:56:37 EDT 2025

Powered by FUDForum. Page generated in 0.04353 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top