Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ve-dev] Constraint Property Editor not working.




"H Ramachandra, Rashmi" <rashmi.h.ramachandra@xxxxxxx>
Sent by: ve-dev-bounces@xxxxxxxxxxx

12/01/2005 06:28 AM

Please respond to
Discussions people developing code for the Visual Editor project

To
<ve-dev@xxxxxxxxxxx>
cc
Subject
[ve-dev] Constraint Property Editor not working.





Hi All,
  I am trying to implement a LayoutConstraintPropertyEditor for my Layout. I have extended
DefaultJavaClassCellEditor. And implemented required methods. The Editor seems to be working fine.It shows the correct values and allows me to edit too. But the changes made in the cell editor are not reflected in the code. And as I press enter on the  edited text in editor it get backs it previous  text value.  I used the debug mode to flow the path of execution. There seems to be no exception or errors.  

I have a doubt. For a object of constraint type Rectangle
i.e..,
container.add(object,new Rectangle(10,20,20,20));

What should be the javaInitialization string. My constraintLabelProvider represent the object constraint as

 x,y,width,height

---- RLK-- The initialization string has to be a complete fully-qualified _expression_. I..e "new java.awt.Rectangle(10,20,20,20)"

And my java initialization string also returns a String in the form of

 x,y,width,height

Considering  a line of code in class DefaultJavaClassCellEditor in method doGetObject

'BeanUtilities.createJavaObject(fJavaType, JavaEditDomainHelper.getResourceSet(fEditDomain), getJavaInitializationString(value)) : null;'

Is my constraintLabelProvider and my javaInitialization string correct. And Where do I convert or save the edited property editor value back to the code.

--- RLK -- You don't do the save back to code. The property editor returns the proper value upon you hitting the enter key on the property sheet. The property sheet will then apply the value to the model, and the code generator will change the code.

I have attached the property palette for a sample component.

Please help me solve this problem.

Thanks in Advance,

Rashmi H.Ramachandra

<<ConstraintCell.JPG>> _______________________________________________
ve-dev mailing list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev


Back to the top