Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » problem with notifications
problem with notifications [message #172027] Mon, 11 February 2008 08:10 Go to next message
Eclipse UserFriend
Originally posted by: Sid.v.v

Hello,

i have a problem with notifications. in one of my node-parts i do some
graphical changes in the method notifyChanged().
if i get a notification from the node-parts ecore-implementation (for
example i change a value of the node) the graphical changes are not
correct, they arent just done. i have to move the node afterwards, so it
will get a bounds-notification and then the graphical changes will work.

could someone give me a hint how to solve this?

Greetings Sid
Re: problem with notifications [message #172035 is a reply to message #172027] Mon, 11 February 2008 09:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tobk42.gmx.de

A simple refreshVisuals() should do, like this:

public void notifyChanged(Notification notification) {
super.notifyChanged(notification);
int feature = notification.getFeatureID(VsdtPackage.class);
switch (feature) {
case VsdtPackage.ACTIVITY__LOOP_TYPE:
getPrimaryShape().setLoopType(getCastedModel().getLoopType() );;
refreshVisuals();
break;
...more cases

Tobias

Sid schrieb:
> Hello,
>
> i have a problem with notifications. in one of my node-parts i do some
> graphical changes in the method notifyChanged().
> if i get a notification from the node-parts ecore-implementation (for
> example i change a value of the node) the graphical changes are not
> correct, they arent just done. i have to move the node afterwards, so it
> will get a bounds-notification and then the graphical changes will work.
>
> could someone give me a hint how to solve this?
>
> Greetings Sid
>
Re: problem with notifications [message #172049 is a reply to message #172035] Mon, 11 February 2008 13:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Sid.v.v

Hi Tobias!

thanks for your answer. ive already tried this. But refreshVisuals seems
not to be working. I spend a lot of time debugging this ... the behaviour
is like this:
if i changed a node property then nodeimpl-notification is called ->no
refresh

if i move the node after i changed a node property then
BoundImpl-Notification is called AND immediately afterwards
nodeimpl-notification is called ->refresh

my source code:

public void notifyChanged(Notification notification) {
super.notifyChanged(notification);

int feature = notification.getFeatureID(PetriPackage.class);
switch (feature) {
case PetriPackage.STELLE__MARKEN:

getPrimaryShape().updateGraphics(getCastedModel().getMarken( ));
refreshVisuals();
break;

}

}

public void updateGraphics(int tokens) {


Point p = this.getLocation();

this.fFigureDOT1.setLocation(new Point(p.x + 9,
p.y + 7));
this.fFigureDOT1.setSize(5, 5);
this.fFigureDOT2.setLocation(new Point(p.x + 15,
p.y + 7));
this.fFigureDOT2.setSize(5, 5);
this.fFigureDOT3.setLocation(new Point(p.x + 21,
p.y + 7));
this.fFigureDOT3.setSize(5, 5);
this.fFigureDOT4.setLocation(new Point(p.x + 6,
p.y + 15));
this.fFigureDOT4.setSize(5, 5);
this.fFigureDOT5.setLocation(new Point(p.x + 12,
p.y + 15));
this.fFigureDOT5.setSize(5, 5);
this.fFigureDOT6.setLocation(new Point(p.x + 18,
p.y + 15));
this.fFigureDOT6.setSize(5, 5);
this.fFigureDOT7.setLocation(new Point(p.x + 24,
p.y + 15));
this.fFigureDOT7.setSize(5, 5);
this.fFigureDOT8.setLocation(new Point(p.x + 9,
p.y + 24));
this.fFigureDOT8.setSize(5, 5);
this.fFigureDOT9.setLocation(new Point(p.x + 15,
p.y + 24));
this.fFigureDOT9.setSize(5, 5);
this.fFigureDOT10.setLocation(new Point(p.x + 21,
p.y + 24));
this.fFigureDOT10.setSize(5, 5);
boolean b[] = new boolean[10];
for(int i=0;i<b.length;i++)b[i]=false;



if(tokens>0&tokens<11)
{
b[0]=true;
if(tokens>1)b[1]=true;
if(tokens>2)b[2]=true;
if(tokens>3)b[3]=true;
if(tokens>4)b[4]=true;
if(tokens>5)b[5]=true;
if(tokens>6)b[6]=true;
if(tokens>7)b[7]=true;
if(tokens>8)b[8]=true;
if(tokens>9)b[9]=true;
}

this.fFigureDOT1.setVisible(b[0]);
this.fFigureDOT2.setVisible(b[1]);
this.fFigureDOT3.setVisible(b[2]);
this.fFigureDOT4.setVisible(b[3]);
this.fFigureDOT5.setVisible(b[4]);
this.fFigureDOT6.setVisible(b[5]);
this.fFigureDOT7.setVisible(b[6]);
this.fFigureDOT8.setVisible(b[7]);
this.fFigureDOT9.setVisible(b[8]);
this.fFigureDOT10.setVisible(b[9]);


}


Tobias wrote:

> A simple refreshVisuals() should do, like this:

> public void notifyChanged(Notification notification) {
> super.notifyChanged(notification);
> int feature = notification.getFeatureID(VsdtPackage.class);
> switch (feature) {
> case VsdtPackage.ACTIVITY__LOOP_TYPE:
> getPrimaryShape().setLoopType(getCastedModel().getLoopType() );;
> refreshVisuals();
> break;
> ...more cases

> Tobias
Re: problem with notifications [message #172276 is a reply to message #172049] Tue, 12 February 2008 10:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jan.herriger.gmx.de

AFAIK, always the parent editparts have to refresh their children, if
children visuals changed. A convenient method is to call
#handleMajorSemanticChange, which will invote the parent editpart's
refresh mechanism.

Sid schrieb:
> Hi Tobias!
>
> thanks for your answer. ive already tried this. But refreshVisuals seems
> not to be working. I spend a lot of time debugging this ... the
> behaviour is like this:
> if i changed a node property then nodeimpl-notification is called ->no
> refresh
>
> if i move the node after i changed a node property then
> BoundImpl-Notification is called AND immediately afterwards
> nodeimpl-notification is called ->refresh
>
> my source code:
>
> public void notifyChanged(Notification notification) {
> super.notifyChanged(notification);
>
> int feature = notification.getFeatureID(PetriPackage.class);
> switch (feature) {
> case PetriPackage.STELLE__MARKEN:
>
>
> getPrimaryShape().updateGraphics(getCastedModel().getMarken( ));
> refreshVisuals();
> break;
>
> }
>
> }
>
> public void updateGraphics(int tokens) {
>
>
> Point p = this.getLocation();
>
> this.fFigureDOT1.setLocation(new Point(p.x + 9,
> p.y + 7));
> this.fFigureDOT1.setSize(5, 5);
> this.fFigureDOT2.setLocation(new Point(p.x + 15,
> p.y + 7));
> this.fFigureDOT2.setSize(5, 5);
> this.fFigureDOT3.setLocation(new Point(p.x + 21,
> p.y + 7));
> this.fFigureDOT3.setSize(5, 5);
> this.fFigureDOT4.setLocation(new Point(p.x + 6,
> p.y + 15));
> this.fFigureDOT4.setSize(5, 5);
> this.fFigureDOT5.setLocation(new Point(p.x + 12,
> p.y + 15));
> this.fFigureDOT5.setSize(5, 5);
> this.fFigureDOT6.setLocation(new Point(p.x + 18,
> p.y + 15));
> this.fFigureDOT6.setSize(5, 5);
> this.fFigureDOT7.setLocation(new Point(p.x + 24,
> p.y + 15));
> this.fFigureDOT7.setSize(5, 5);
> this.fFigureDOT8.setLocation(new Point(p.x + 9,
> p.y + 24));
> this.fFigureDOT8.setSize(5, 5);
> this.fFigureDOT9.setLocation(new Point(p.x + 15,
> p.y + 24));
> this.fFigureDOT9.setSize(5, 5);
> this.fFigureDOT10.setLocation(new Point(p.x + 21,
> p.y + 24));
> this.fFigureDOT10.setSize(5, 5);
> boolean b[] = new boolean[10];
> for(int i=0;i<b.length;i++)b[i]=false;
>
>
>
> if(tokens>0&tokens<11)
> {
> b[0]=true;
> if(tokens>1)b[1]=true;
> if(tokens>2)b[2]=true;
> if(tokens>3)b[3]=true;
> if(tokens>4)b[4]=true;
> if(tokens>5)b[5]=true;
> if(tokens>6)b[6]=true;
> if(tokens>7)b[7]=true;
> if(tokens>8)b[8]=true;
> if(tokens>9)b[9]=true;
> }
>
> this.fFigureDOT1.setVisible(b[0]);
> this.fFigureDOT2.setVisible(b[1]);
> this.fFigureDOT3.setVisible(b[2]);
> this.fFigureDOT4.setVisible(b[3]);
> this.fFigureDOT5.setVisible(b[4]);
> this.fFigureDOT6.setVisible(b[5]);
> this.fFigureDOT7.setVisible(b[6]);
> this.fFigureDOT8.setVisible(b[7]);
> this.fFigureDOT9.setVisible(b[8]);
> this.fFigureDOT10.setVisible(b[9]);
>
>
> }
>
>
> Tobias wrote:
>
>> A simple refreshVisuals() should do, like this:
>
>> public void notifyChanged(Notification notification) {
>> super.notifyChanged(notification);
>> int feature = notification.getFeatureID(VsdtPackage.class);
>> switch (feature) {
>> case VsdtPackage.ACTIVITY__LOOP_TYPE:
>> getPrimaryShape().setLoopType(getCastedModel().getLoopType() );;
>> refreshVisuals();
>> break;
>> ...more cases
>
>> Tobias
>
>
Re: problem with notifications [message #172447 is a reply to message #172276] Wed, 13 February 2008 15:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Sid.v.v

Hi Jan,

ive tried the method handleMajorSemanticChange, but without success.
i experimented a little and found:
if i change the layout from FlowLayout to BorderLayout then the
notifications working exactly as they should (all changes to ecore are
updated as graphic)
the only thing thats annoying now: because of the BorderLayout a label
inside the node is not displayed anymore.

how can i achieve that i can output a simple string inside the node?

Regards
Sid
Re: problem with notifications [message #172461 is a reply to message #172447] Wed, 13 February 2008 16:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jan.herriger.gmx.de

Ok, forget about handleMajorSemanticChange...

I'm not experienced with BorderLayout. But it seems strange to me, that
is effects the notification handling.

Did you try to follow the wiki example?
http://wiki.eclipse.org/GMF_Tips#Making_figures_sensitive_to _attributes_of_semantic_elements

Sid schrieb:
> Hi Jan,
>
> ive tried the method handleMajorSemanticChange, but without success. i
> experimented a little and found: if i change the layout from FlowLayout
> to BorderLayout then the notifications working exactly as they should
> (all changes to ecore are updated as graphic)
> the only thing thats annoying now: because of the BorderLayout a label
> inside the node is not displayed anymore.
> how can i achieve that i can output a simple string inside the node?
>
> Regards
> Sid
Re: problem with notifications [message #172470 is a reply to message #172461] Wed, 13 February 2008 19:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Sid.v.v

Thanks for that link. I've tried that too, but it failed also. I think i
will give it a second try, just to prove it.
By the way: whats the difference between notifyChanged() and
handleNotificationEvent()?

i dont know if setting the visibility of edit-parts is the best solution.
so any suggestion are welcome.

and more question about notifications: how can a editpart notify all other
editparts?

Regards
Sid
Re: problem with notifications [message #172535 is a reply to message #172470] Thu, 14 February 2008 11:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jan.herriger.gmx.de

This is a multi-part message in MIME format.
--------------080009070709010304040700
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit


> Thanks for that link. I've tried that too, but it failed also. I think i
> will give it a second try, just to prove it.

> By the way: whats the difference between notifyChanged() and
> handleNotificationEvent()?

handleNotificationEvent() is called by notifyChanged() inside
GraphicalEditPart iff the edit part is active.

> i dont know if setting the visibility of edit-parts is the best
> solution. so any suggestion are welcome.

You mean setting visibility of figures, don't you? I don't know if this
is the best solution. But I had a similar problem and it's working fine
for me (a diamond, which displays either an 'and' or an 'or' symbol).

I attached my edit part. May be, you'll find something helpful in it.

> and more question about notifications: how can a editpart notify all
> other editparts?

IMHO notifications should only be send from models (notation
model/semantic model) to controllers (edit parts).

You can enable an edit part to listen to more notifiers, by overriding
GraphicalEditPart#addNotationalListeners()/addSemanticListen ers(). But
this should not be necessary in this case.


--------------080009070709010304040700
Content-Type: text/java;
name="SynchronizerEditPart.java"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="SynchronizerEditPart.java"

package org.memo.orgml.process.controlflow.diagram.edit.parts;

import org.eclipse.draw2d.ConnectionAnchor;
import org.eclipse.draw2d.FlowLayout;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Polygon;
import org.eclipse.draw2d.Polyline;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.RectangleFigure;
import org.eclipse.draw2d.StackLayout;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.gef.ConnectionEditPart;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
import org.eclipse.gef.editpolicies.ResizableEditPolicy;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPa rt;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRo les;
import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure ;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.memo.orgml.process.ProcessPackage;
import org.memo.orgml.process.Synchronizer;
import org.memo.orgml.process.controlflow.diagram.edit.policies.Syn chronizerItemSemanticEditPolicy;

/**
* @generated
*/
public class SynchronizerEditPart extends ShapeNodeEditPart {

/**
* @generated
*/
public static final int VISUAL_ID = 2107;

/**
* @generated
*/
protected IFigure contentPane;

/**
* @generated
*/
protected IFigure primaryShape;

/**
* @generated
*/
public SynchronizerEditPart(View view) {
super(view);
}

/**
* @generated NOT
*/
@Override
public ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart arg0) {
FixedConnectionAnchor fixedAnchor = new FixedConnectionAnchor(
getFigure(), FixedConnectionAnchor.Side.EAST);

return fixedAnchor;
}

/**
* @generated NOT
*/
@Override
public ConnectionAnchor getSourceConnectionAnchor(Request request) {

FixedConnectionAnchor fixedAnchor = new FixedConnectionAnchor(
getFigure(), FixedConnectionAnchor.Side.EAST);

return fixedAnchor;

}

/**
* @generated NOT
*/
@Override
public ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart arg0) {
return new FixedCenteredConnectionAnchor(getFigure());
}

/**
* @generated NOT
*/
@Override
public ConnectionAnchor getTargetConnectionAnchor(Request request) {
return new FixedCenteredConnectionAnchor(getFigure());
}

/**
* @generated
*/
protected void createDefaultEditPolicies() {

super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
new SynchronizerItemSemanticEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpoli cies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
}

/**
* @generated
*/
protected LayoutEditPolicy createLayoutEditPolicy() {
LayoutEditPolicy lep = new LayoutEditPolicy() {

protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child
.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
}
return result;
}

protected Command getMoveChildrenCommand(Request request) {
return null;
}

protected Command getCreateCommand(CreateRequest request) {
return null;
}
};
return lep;
}

/**
* @generated
*/
protected IFigure createNodeShape() {
SynchronizerFigure figure = new SynchronizerFigure();
return primaryShape = figure;
}

/**
* @generated
*/
public SynchronizerFigure getPrimaryShape() {
return (SynchronizerFigure) primaryShape;
}

/**
* @generated
*/
protected NodeFigure createNodePlate() {
DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(getMapMode()
.DPtoLP(40), getMapMode().DPtoLP(40));
return result;
}

/**
* @generated
*/
public EditPolicy getPrimaryDragEditPolicy() {
EditPolicy result = super.getPrimaryDragEditPolicy();
if (result instanceof ResizableEditPolicy) {
ResizableEditPolicy ep = (ResizableEditPolicy) result;
ep.setResizeDirections(PositionConstants.NONE);
}
return result;
}

/**
* Creates figure for this edit part.
*
* Body of this method does not depend on settings in generation model
* so you may safely remove <i>generated</i> tag and modify it.
*
* @generated
*/
protected NodeFigure createNodeFigure() {
NodeFigure figure = createNodePlate();
figure.setLayoutManager(new StackLayout());
IFigure shape = createNodeShape();
figure.add(shape);
contentPane = setupContentPane(shape);
return figure;
}

/**
* Default implementation treats passed figure as content pane.
* Respects layout one may have set for generated figure.
* @param nodeShape instance of generated figure class
* @generated
*/
protected IFigure setupContentPane(IFigure nodeShape) {
return nodeShape; // use nodeShape itself as contentPane
}

/**
* @generated
*/
public IFigure getContentPane() {
if (contentPane != null) {
return contentPane;
}
return super.getContentPane();
}

/**
* @generated NOT
*/
protected void handleNotificationEvent(Notification event) {
//generated statement
if (event.getNotifier() == getModel()
&& EcorePackage.eINSTANCE.getEModelElement_EAnnotations()
.equals(event.getFeature())) {
handleMajorSemanticChange();
}
//Synchronizer type changed
if (ProcessPackage.eINSTANCE.getSynchronizer_Conjunctive()
.equals(event.getFeature())) {
getPrimaryShape().switchType();
}
super.handleNotificationEvent(event);

}

/**
* @generated
*/
public class SynchronizerFigure extends RectangleFigure {

/**
* @generated
*/
private Polyline fFigureOrFigure;
/**
* @generated
*/
private Polyline fFigureAndFigure;

/**
* @generated
*/
public SynchronizerFigure() {
this.setOutline(false);
createContents();
switchType();
}

/**
* Switch between 'conjunctive' figure and 'disjunctive' figure
* depending on underlying element
*/
private void switchType()
{
Synchronizer element = (Synchronizer)resolveSemanticElement();
if (element!=null)
{
if (element.isConjunctive())
{
this.getFigureOrFigure().setVisible(true);
this.getFigureAndFigure().setVisible(false);
}
else
{
this.getFigureOrFigure().setVisible(false);
this.getFigureAndFigure().setVisible(true);
}
}
}

/**
* @generated
*/
private void createContents() {

Polygon synchronizerFigure0 = new Polygon();
synchronizerFigure0.addPoint(new Point(getMapMode().DPtoLP(20),
getMapMode().DPtoLP(0)));
synchronizerFigure0.addPoint(new Point(getMapMode().DPtoLP(40),
getMapMode().DPtoLP(20)));
synchronizerFigure0.addPoint(new Point(getMapMode().DPtoLP(20),
getMapMode().DPtoLP(40)));
synchronizerFigure0.addPoint(new Point(getMapMode().DPtoLP(0),
getMapMode().DPtoLP(20)));
synchronizerFigure0.addPoint(new Point(getMapMode().DPtoLP(20),
getMapMode().DPtoLP(0)));

this.add(synchronizerFigure0);

synchronizerFigure0.setLayoutManager(new FlowLayout());

fFigureAndFigure = new Polyline();
fFigureAndFigure.addPoint(new Point(getMapMode().DPtoLP(10),
getMapMode().DPtoLP(25)));
fFigureAndFigure.addPoint(new Point(getMapMode().DPtoLP(20),
getMapMode().DPtoLP(10)));
fFigureAndFigure.addPoint(new Point(getMapMode().DPtoLP(30),
getMapMode().DPtoLP(25)));

synchronizerFigure0.add(fFigureAndFigure);

fFigureOrFigure = new Polyline();
fFigureOrFigure.addPoint(new Point(getMapMode().DPtoLP(10),
getMapMode().DPtoLP(15)));
fFigureOrFigure.addPoint(new Point(getMapMode().DPtoLP(20),
getMapMode().DPtoLP(30)));
fFigureOrFigure.addPoint(new Point(getMapMode().DPtoLP(30),
getMapMode().DPtoLP(15)));

synchronizerFigure0.add(fFigureOrFigure);

Polygon synchronizerPolygonFigure1 = new Polygon();

synchronizerFigure0.add(synchronizerPolygonFigure1);

}

/**
* @generated
*/
private boolean myUseLocalCoordinates = true;

/**
* @generated
*/
protected boolean useLocalCoordinates() {
return myUseLocalCoordinates;
}

/**
* @generated
*/
protected void setUseLocalCoordinates(boolean useLocalCoordinates) {
myUseLocalCoordinates = useLocalCoordinates;
}

/**
* @generated
*/
public Polyline getFigureOrFigure() {
return fFigureOrFigure;
}

/**
* @generated
*/
public Polyline getFigureAndFigure() {
return fFigureAndFigure;
}

}

}

--------------080009070709010304040700--
Re: problem with notifications [message #172645 is a reply to message #172535] Fri, 15 February 2008 14:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Sid.v.v

Thanks for your source-code. Im setting the visibilty exactly as you do in
switchtype().
this is working now, but a label inside the node disappeared. well maybe i
will find another way to put a string out.

my second question about notifications was more related with my future
work.
i work on a petri-net-editor, so it is important that some nodes updating
automatically if there are changes on connected nodes.
do you have a example how to add a semantic listener to the edit part?
Re: problem with notifications [message #172652 is a reply to message #172645] Fri, 15 February 2008 15:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jan.herriger.gmx.de

Sid schrieb:
> Thanks for your source-code. Im setting the visibilty exactly as you do
> in switchtype().
> this is working now, but a label inside the node disappeared. well maybe
> i will find another way to put a string out.

I remember... you have to set a layout constraint for child figures
managed by BorderLayouts (that's true for some other layout managers,
too). Somethin like this should work:

Label l = new Label("labeltext");
parentFigure.add(l);
parentFigure.setConstraint(l, PositionConstants.CENTER);

> my second question about notifications was more related with my future
> work.
> i work on a petri-net-editor, so it is important that some nodes
> updating automatically if there are changes on connected nodes.
> do you have a example how to add a semantic listener to the edit part?

Quite simple.

call

addListenerFilter("id", this, myConnectedNode);

when a new node is connected inside the edit part. And

removeListenerFilter("id");

when it is removed. Maybe myConnectedNode.hashCode() would be a good
"id". If your connections are bidirectional, it should be easy to detect
a new connected node via notification handler and add/remove listeners
accordingly.
Re: problem with notifications [message #172721 is a reply to message #172652] Sun, 17 February 2008 16:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Sid.v.v

thanks for your help with the label, but i had no success to add it.

if i add the label without to set up a constraint, the figure is drawn as
usually, except the label.

if i add the label with the constraint, the node is not drawn correct
anymore (the node seems to be created invisible in the upper left corner,
cant even move or resize it)

i dont know what i should try next. i tried all kind of layouts, i tried
to add a feature label in gmfgraph and generate some new code .. but even
that label isnt displayed ...

its really kind of weird.
Re: problem with notifications [message #172729 is a reply to message #172721] Sun, 17 February 2008 17:40 Go to previous message
Eclipse UserFriend
Originally posted by: Sid.v.v

UPDATE: it works now .. finally :D

ive cleaned up the gmfgraph/gmfmap and created a new generation model ..
works just fine now.
i will now try out the addListenerFilter() method, to keep the nodes
updating

thanks a lot for your help!

best regards
Sid
Previous Topic:Taipan Example ... Some Doubts
Next Topic:Create multiple editors on one model (another one)
Goto Forum:
  


Current Time: Thu Apr 25 10:24:03 GMT 2024

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

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

Back to the top