Hi Kaspar,
Good to know that the problem was solved.
>- I still get the attached error, when opening InnerPanel. From
>the editor, nothing seems to be a problem anymore (bean tree is
>ok, visual editor is ok, and the OuterPanel shows the embedded
>Inner without any trouble just as it should). Yet still, I HAVE NO
>IDEA how to interpret an error like this.
The error you are getting:
java.lang.ArrayIndexOutOfBoundsException: -1
at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:514)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObjectForURIFragmentRoo
tSegment(ResourceImpl.java:642)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject(ResourceImpl.jav
a:692)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject(ResourceImpl.jav
a:671)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setValueFromId(XMLHandler.java:251
1)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XMLHandler.java:243
9)
is most probably due to the corrupted model cache.
VE stores models of Visual Classes in a cache so that next time round the
Visual editor opens quickly.
To clean up the cache do the following:
1. Do a clean build of your project
2. Close the project
3. Open the project
If this does not help then delete the cache manually from the workspace of
the workbench on which the VE plugin is running:
.metadata\.plugins\org.eclipse.core.resources\.projects\VETest\org.eclipse.v
e.java.core\.cache
.metadata\.plugins\org.eclipse.core.resources\.projects\VETest\org.eclipse.j
em.beaninfo\.cache
.metadata\.plugins\org.eclipse.jem.beaninfo\.cache
>- How do I debug from code inside the remote VE (i.e. own widgets,
>or panel code)? If I write to System.err or use Log4j, where does
>that end up?
Oh you mean that you want to debug the code of beans that are instantiated
within the target vm?
This can be done but it is a tedious process for which:
1. you should know how to debug VE plugin.
2. you should know how to enable remote VM debugging
3. you should have the sources linked to the bean lib that is on the path of
the target vm
4. Then you can set break point in the source of your bean, e.g. in a setter
method of a property.
Then when you set that property in VE property sheet, VE will invoke the
setter in the target VM and that will hit your break point.
I hope this helps. Please come back to me if you need more info.
Thanks and regards,
Janak
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] Behalf Of Kaspar von
>Gunten
>Sent: Thursday, February 01, 2007 6:33 PM
>To: [email protected]
>Subject: AW: [ULC-developer] Java Beans in Visual Editor, follow up and
>pictures
>
>
>Hi Janak + Marco
>
>Thank you very much for your answers. They inspired me to go a bit
>further. I studied the archive of the developer list a bit more
>and I think I identified and solved the problem. It was caused by
>the following:
>
>I have two visual classes: OuterPanel and InnerPanel, where
>InnerPanel is embedded on OuterPanel and responsible for the
>error. InnerPanel contains some radio buttons that are connected
>by a ButtonGroup. The radio buttons we add are already subclasses
>of the ULCRadioButton that register a listener fetched from a
>static method:
>
> IEventDispatchAction eventHandler;
> eventHandler = ActionFactory.getEventDispatchAction();
> addActionListener(eventHandler);
>
>Although we made RichDialogActionFactory class available to the
>remote VM classpath, it was not initialized properly. As a result
>the EventDispatchAction was null.
>
>If I set the SELECTED-property of a RadioButton this seemed to
>trigger the registered Action, resulting in a warning on the
>selected RadioButton. The warning seemed to be the reason, that
>OuterPanel could not instantiate InnerPanel. If I did not set the
>SELECTED-property on Inner, then it worked. This must have been
>caused by the null EventDispatchAction. I fixed this now,
>everything is fine.
>
>---> Questions that remain:
>
>- I still get the attached error, when opening InnerPanel. From
>the editor, nothing seems to be a problem anymore (bean tree is
>ok, visual editor is ok, and the OuterPanel shows the embedded
>Inner without any trouble just as it should). Yet still, I HAVE NO
>IDEA how to interpret an error like this.
>
>- How do I debug from code inside the remote VE (i.e. own widgets,
>or panel code)? If I write to System.err or use Log4j, where does
>that end up?
>
>PS: We are using ULC 6.1.1 and ULC-VE 6.0.
>
>Cheers,
>Kaspar
>
>-----Ursprüngliche Nachricht-----
>Von: Janak Mulani [mailto:[EMAIL PROTECTED]
>Gesendet: Donnerstag, 1. Februar 2007 13:55
>An: Kaspar von Gunten
>Cc: [email protected]
>Betreff: RE: [ULC-developer] Java Beans in Visual Editor, follow
>up and pictures
>
>Hi Kaspar,
>
>Which version of ULC and ULC VE are you using?
>
>I tried your scenario without any problem. I created two visusal classes.
>MyFrame extends ULCFrame and MyBorderLayout extends ULCBorderLayoutPane.
>MyBorderLayoutPane has components like buttons, table ect. Then in
>MyFrame I
>add an instance of MyBorderLayoutPane using Choose Beans. I can see
>MyBorderlayoutPane in MyFrame without any problems.
>
>Having said this, I do not rule out a possibility of errors. Please see
>Known Issues in the release note:
>
>"Editing a contained bean (e.g. MyPanel extends ULCBoxPane) while its
>container bean (e.g. MyFrame extends ULCFrame) is open in a visual editor
>could cause problems. You must close the container bean's editor while
>editing contained bean."
>
>Is something like that happeneing in your case?
>
>Also, you can open the view Windows > Show View > Erro Log - this will show
>you the errors that are logged in the .log file in
>workspace/.metadata/.log.
>
>Before reproducing the error, you should clean up the .log file so that we
>only have the log from latest run and not clutter from previous runs.
>
>Can you send me the .log file and your visual classes for the
>outer bean and
>the inner bean?
>
>Thanks and regards,
>
>Janak
>
>
>
>>-----Original Message-----
>>From: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED] Behalf Of Kaspar von
>>Gunten
>>Sent: Thursday, February 01, 2007 11:20 AM
>>To: [email protected]
>>Subject: [ULC-developer] Java Beans in Visual Editor, follow up and
>>pictures
>>
>>
>>Hi this is a follow up on my previous message.
>>
>>@Alberto: Thanks for your answer, but using empty panels is not an
>>option for us, as our clients, who are not programmers, are using the VE
>>to create application screens, partially reusing other masks that they
>>created before.
>>So I still need to resolve this.
>>
>>@Janak:
>>I discovered that an error message is displayed, if I click on the
>>erroneous panel in the Beans view, it shows in the status bar.
>>
>>Problem is: The error message is way too long to fit in there. The mouse
>>pointer shows a tool tip, but the text is still to long. How do I get
>>the full text of this error and how do I interpret it correctly?
>>
>>Maybe I should add, that we use an own base template for the creation of
>>the panels, which is also attached. It has a few own methods, but none
>>of them should be a problem - or is there one?
>>
>>Earlier I forgot to attach a picture of the encountered error, it is
>>attached now. I also attach a picture of the error in the status bar, as
>>I cannot get a text output somewhere.
>>
>>Thanks again for help,
>>Kaspar
>>
>
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer