Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sapphire-dev] Code for editor

Hey Konstantin...

It's ok. I've been having fun putting the pieces together and trying it out. So don't feel too sorry for me. :)

Plus, it seems my twists and turns pointed out a few bugs, which is always good. :)

So now that I've uninstalled and reinstalled Sapphire, and pulled in your updated project things seem to be much happier. I need to dive in to see what changed so I understand it going forward.

That said, when I tried it out I noticed that it didn't generate the xmlns on the composite tag (first child of switchyard), so I tried to figure out why that is... Turns out that the @XmlNamespace annotation has to precede the @GenerateImpl or it won't pick it up. That's a good thing to know. :)

Back down the rabbit hole to see what other damage I can do. :) And thanks for your patience and all the help!

--Fitz

_______________________________
Brian Fitzpatrick (aka "Fitz")
Senior Software Engineer, SOA-P
JBoss by Red Hat

----- Original Message -----
From: "Konstantin Komissarchik" <konstantin.komissarchik@xxxxxxxxxx>
To: "Sapphire project" <sapphire-dev@xxxxxxxxxxx>
Sent: Thursday, March 31, 2011 6:37:25 PM
Subject: Re: [sapphire-dev] Code for editor

Hi Brian,

I am sorry to see you all twisted up by this. 

> Currently it doesn't generate the SOAPBinding class in the 
> generated code of .apt_generated, which is perplexing.

This is caused by mismatch of naming of property field, property name, getter and setter in ISOAPBinding. The annotation processor doesn't yet intelligently report the problem as source markers. It simply fails and the impl class doesn't get generated. I opened a bug to track improving this scenario. There are more details on the specific problems in the bug.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=341564

> And the third issue is the bizarre namespace problem.

You are generally off by a level in your specification of namespace, so you aren't seeing the effect. Instead of specifying namespace in list property binding where list entry element's name is defined, you were specifying namespace inside the list entry on value properties. 

Once I fixed namespace declarations, I noticed that we have a framework bug in usage of namespace prefix in the list property binding. I fixed this issue.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=341560

You will need to grab build 208 or newer from Hudson.

https://hudson.eclipse.org/hudson/job/sapphire-0.3.x/

> And I'm running into a bizarre DOM Error [snip]

Not sure how this came about. By the time I straightened out the issue in ISOAPBinding and the issue with namespace, I was able to add dot to the element name without any problems. Now that I think about this, it may have been related to the missing ISOAPBinding impl.

Attached is your project with fixes applied. You will need to move to build 208 or newer. Don't try to update your existing install. Uninstall Sapphire first or start fresh. In addition to the namespace bug fix, we are going through some modularity work in this release, so I had to update some bundle and package imports.

With the attached source, I was able to created the XML structure that I believe you are after. I also able to paste your sample contents into the editor and have all the parts recognized.

Diff the model interfaces between your version and mine to get a better sense of the changes I had to make. Let me know if something is still unclear.

> I suspect that there must be some way of creating sub-components so 
> not everything is nested in the switchyard sdef file to the Nth degree, 
> which would probably make this easier to comprehend as well.

Yes, there is. You can define a node at the top level, give it an id and then reference it by that id inside another node. You can define a form with various parts, then use the include directive to inline it into a section. You can even split definitions between several files by using the import directive. The sdef editor in the SDK should help you discover the various definition types and directives.

> Sorry this is in an e-mail and not in the forum. I couldn't figure 
> out how to attach the file in the forum and didn't want to include 
> absolutely everything code-wise in [CODE][/CODE] tags. I figured the 
> sapphire mailing list was the next best thing.

No problem. I pretty sure there is no way to attach stuff in the forum. A pretty big limitation, if you ask me. Basic things (like showing a screen capture) are very awkward.

I hope your further exploration goes a bit smoother. :)

- Konstantin


-----Original Message-----
From: sapphire-dev-bounces@xxxxxxxxxxx [mailto:sapphire-dev-bounces@xxxxxxxxxxx] On Behalf Of Brian Fitzpatrick
Sent: Thursday, March 31, 2011 12:52 PM
To: sapphire-dev@xxxxxxxxxxx
Subject: [sapphire-dev] Code for editor

Hey Konstantin (and the rest of the Sapphire dev team)...

I'm tired and at my wit's end with this for now. I'm hoping it's something stupid I'm doing. 

Currently it doesn't generate the SOAPBinding class in the generated code of .apt_generated, which is perplexing. And I'm running into a bizarre DOM Error where I think it's telling me that my service/bindingsoap element path is invalid in this exception [1].

The second issue is that if I try to create a tag with a period in it (i.e. bindingsoap should be binding.soap), it throws a different error.

And the third issue is the bizarre namespace problem. I'm shooting for creating something like the switchyard.xml file in the sample directory in the attached project. So far I'm just to the switchyard -> composite -> service -> binding.soap level in the XML as far as generating it.

I suspect that there must be some way of creating sub-components so not everything is nested in the switchyard sdef file to the Nth degree, which would probably make this easier to comprehend as well. 

Sorry this is in an e-mail and not in the forum. I couldn't figure out how to attach the file in the forum and didn't want to include absolutely everything code-wise in [CODE][/CODE] tags. I figured the sapphire mailing list was the next best thing.

Thanks in advance for any and all help here. I suspect it's user error, but have exhausted my options for now.

--Fitz

[1] !ENTRY org.eclipse.sapphire.ui 4 0 2011-03-31 13:42:40.442 !MESSAGE Invalid Characer Error !STACK 0
org.w3c.dom.DOMException: Invalid Characer Error
	at org.eclipse.wst.xml.core.internal.document.DocumentImpl.createElementNS(DocumentImpl.java:400)
	at org.eclipse.sapphire.modeling.xml.XmlElement.addChildElement(XmlElement.java:531)
	at org.eclipse.sapphire.modeling.xml.XmlElement.addChildElement(XmlElement.java:559)
	at org.eclipse.sapphire.modeling.xml.StandardXmlListBindingImpl.addUnderlyingObject(StandardXmlListBindingImpl.java:140)
	at org.eclipse.sapphire.modeling.LayeredListBindingImpl.add(LayeredListBindingImpl.java:58)
	at org.eclipse.sapphire.modeling.ModelElementList.addNewElement(ModelElementList.java:243)
	at org.eclipse.sapphire.ui.swt.renderer.actions.internal.OutlineNodeAddActionHandlerFactory$AddActionHandler.run(OutlineNodeAddActionHandlerFactory.java:125)
	at org.eclipse.sapphire.ui.SapphireActionHandler.execute(SapphireActionHandler.java:89)
	at org.eclipse.sapphire.ui.SapphireActionLink$1.linkActivated(SapphireActionLink.java:125)
	at org.eclipse.sapphire.ui.swt.renderer.internal.formtext.SapphireFormText.activateLink(SapphireFormText.java:1547)
	at org.eclipse.sapphire.ui.swt.renderer.internal.formtext.SapphireFormText.handleMouseClick(SapphireFormText.java:1349)
	at org.eclipse.sapphire.ui.swt.renderer.internal.formtext.SapphireFormText.access$16(SapphireFormText.java:1320)
	at org.eclipse.sapphire.ui.swt.renderer.internal.formtext.SapphireFormText$6.mouseUp(SapphireFormText.java:440)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:219)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4150)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3739)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

_______________________________
Brian Fitzpatrick (aka "Fitz")
Senior Software Engineer, SOA-P
JBoss by Red Hat


_______________________________________________
sapphire-dev mailing list
sapphire-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/sapphire-dev


Back to the top