Problems with M7 [message #128007] |
Tue, 22 May 2007 04:49  |
Eclipse User |
|
|
|
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 #128516 is a reply to message #128007] |
Wed, 23 May 2007 07:08   |
Eclipse User |
|
|
|
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 #128934 is a reply to message #128853] |
Wed, 23 May 2007 12:04   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04353 seconds