Two GEF views [message #164946] |
Fri, 21 January 2005 07:53  |
Eclipse User |
|
|
|
Originally posted by: wjancz.\/\/asko.pl(change \/\/ with w)
Hi!
Is it possible to put GEF editor into CompareEditor?
I want to compare two diagrams drawed in GEF.
I am able now to compare models of diagrams - i have found all differences,
now i want to show
those differences on diagrams.
It would be cool if it can be shown as CVS differences.
One editor splitted into two editors - each contains one GEF diagram.
I am not sure if it is clear.
So my question is.
1) Should I try to do it in CompareEditor (how)?
2) Should I try to do it in one GEFEditor splitting my editor and drawing
diagrams with differences (but disabling any edit policies) ?
3) If should I choose option 2 - how to make scrollbars which can scroll
both diagrams identically (like CVS Comparator).
Sorry for my english :)
--
========================
Wojciech Jancz
Programista
Zak
|
|
|
Re: Two GEF views [message #165136 is a reply to message #164946] |
Fri, 21 January 2005 17:12   |
Eclipse User |
|
|
|
Sounds like an interesting undertaking.
"WojT" <wjancz@\/\/asko.pl(change \/\/ with w)> wrote in message
news:csqu08$mls$1@www.eclipse.org...
> Hi!
> Is it possible to put GEF editor into CompareEditor?
> I want to compare two diagrams drawed in GEF.
> I am able now to compare models of diagrams - i have found all
differences,
> now i want to show
> those differences on diagrams.
> It would be cool if it can be shown as CVS differences.
> One editor splitted into two editors - each contains one GEF diagram.
>
> I am not sure if it is clear.
>
> So my question is.
> 1) Should I try to do it in CompareEditor (how)?
Don't know anything about CompareEditor, but I would guess it's text-based
and hence you'd have to write your own editor. How is your model persisted?
XML? If it is text-based, you might be able to re-use some features from
(or delegate that functionality to) the CompareEditor: parsing, identifying
differences, etc.
> 2) Should I try to do it in one GEFEditor splitting my editor and drawing
> diagrams with differences (but disabling any edit policies) ?
Yes. You'd have two graphical viewers in this one editor. You might even
want to throw in the difference tree at the top ... which could esentially
be the difference in the outline page of the two file versions. Perhaps the
editor on the left (the workspace version) could have its edit policies
enabled so that the user can "merge" any changes manually.
> 3) If should I choose option 2 - how to make scrollbars which can scroll
> both diagrams identically (like CVS Comparator).
That should be the least of your worries at the moment. Suffice it to say
it's possible. (In the logic example, the rulers are in different graphical
viewers with their scroll bars always hidden. Scrolling the main graphical
viewer then forwards those events to the respective ruler viewer. You can
look at it if you want more info.) Perhaps you might decide, in time, that
it's best to just show the two as individually-scrolling viewers and let the
user handle the merging.
Other interesting questions would be is this semantically possible (I guess
the answer to that depends on your model). How, if at all, would you
highlight the differences? Maybe modified figures would be highlighted or
have a different color. What about differences in the file that are not
graphical (for instance, version of xml or something)? Maybe they can be
grouped under a separate category in the difference tree.
Just my two cents. Obviously, we've never tried anything like this before,
so it's going to be a trial and error procedure.
>
> Sorry for my english :)
> --
>
> ========================
> Wojciech Jancz
> Programista
>
> Zak
|
|
|
Re: Two GEF views [message #165310 is a reply to message #165136] |
Mon, 24 January 2005 02:33   |
Eclipse User |
|
|
|
Originally posted by: wjancz.\/\/asko.pl(change \/\/ with w)
> Don't know anything about CompareEditor, but I would guess it's text-based
> and hence you'd have to write your own editor. How is your model
persisted?
> XML? If it is text-based, you might be able to re-use some features from
> (or delegate that functionality to) the CompareEditor: parsing,
identifying
> differences, etc.
No. It's not a XML. It's not text based. It's my complicated model.
So I can't use a text comparing. It's not hard to me to find differences -
because I have done this.
I have model of my differnces so now only what I need to do is to show
differences on my diagrams.
> Yes. You'd have two graphical viewers in this one editor. You might even
> want to throw in the difference tree at the top ... which could esentially
> be the difference in the outline page of the two file versions. Perhaps
the
> editor on the left (the workspace version) could have its edit policies
> enabled so that the user can "merge" any changes manually.
File version is not so important. There will be no possibility to merging
changes.
I wish only to _show_ differences.
> Perhaps you might decide, in time, that
> it's best to just show the two as individually-scrolling viewers and let
the
> user handle the merging.
For now I decided to do it in this way. Two scrolling viewers.
> Other interesting questions would be is this semantically possible (I
guess
> the answer to that depends on your model). How, if at all, would you
> highlight the differences? Maybe modified figures would be highlighted or
> have a different color. What about differences in the file that are not
> graphical (for instance, version of xml or something)? Maybe they can be
> grouped under a separate category in the difference tree.
Yes. There are few levels of differences. Each of will be displayed by
different colors.
So - changing size or locations is not so important as changing outputs of
elements, or adding new elements to diagram, or changing attributes in
elements.
Differences which are not graphical - version of file will be displayed
earlier - because two models for comparing will be taken from CVS-like
database.
So version like (1.1, 1.2 etc..) could be displayed as title of viewer :)
> Just my two cents. Obviously, we've never tried anything like this
before,
> so it's going to be a trial and error procedure.
Like whole my project :)))
Sorry for my english :)
--
========================
Wojciech Jancz
Programista
Zak
|
|
|
|
Re: Two GEF views [message #165357 is a reply to message #165325] |
Mon, 24 January 2005 11:50  |
Eclipse User |
|
|
|
The topic of cropping connections has come up quite often in the newsgroup.
We'll add it to the FAQs or something. Meanwhile, please search this
newsgroup.
"WojT" <wjancz@\/\/asko.pl(change \/\/ with w)> wrote in message
news:ct2ll0$23l$1@www.eclipse.org...
> So. I think I found a solution. But I have another problem.
> The Logic example helped me.
> What have I done? I puted my diagram into a Circuit element. And it's good
> :)
> Diagram is cropped only to this figure, there are scrollbars but.... but
> connections are going out of figure.
> How to crop ConnectionLayer. or which policy set to dissalow making
> connection between editParts belonging to different parents.
>
> I will explain it to You on little example:
> Open logic editor
> 1) put circuit (C) element
> 2) put two AND elements into C and make connection betwen them,
> 3) resize C to fit only one AND element,
> 4) there will be a connection which is painted out of C,
>
> There is need to paint connection only to bounds of C !
> But! I cannot crop ConnectionLayer to Circuit Bounds. Why ? Because I need
> two Circuit elements which both draws diagrams with connections.
> If I will crop ConnectionLayer to one of Circuit element, on the second
one
> connections will not be visible.
>
> So. To make it works there is a test:
> Make steps 1 - 3 one more time (now You should have two Circuit elements
> with two connected AND elements inside).
> Try to achiewe behawior like this:
> - connections in every Circuit are cropped to theri bounds,
> - connections are invisible outside Circuit elements
>
> If You are able to explain me how to do this, or You know any hints,
please
> answe my question.
> Thanks
>
> Sory for my english :)
>
> --
>
> ========================
> Wojciech Jancz
> Programista
>
> Zak
|
|
|
Powered by
FUDForum. Page generated in 0.03782 seconds