You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by "Nacho G. Mac Dowell" <ig...@informa.es> on 2004/09/13 14:23:11 UTC
SG Threading and eclipse plugin
I am having some trouble with the plugin. The thing is that I want to
show the progress of the source generation in a text field. I created a
TextViewLoggerFactory and a TextViewLogger and it works well. The thing
is that it is blocking the UI while it works. Any ideas on how I could
control the thread SG executes?
Thanks!
PD: Lots of UI operations inside Eclipse are blocking operations. Maybe
we could leave it this way. I was thinking it would be nice to be able
to cancel the operation, though.
---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org
Re: SG Threading and eclipse plugin
Posted by Jochen Wiedmann <jo...@freenet.de>.
Mark R. Diggory wrote:
> public ObjectFactory() throws javax.xml.bind.JAXBException {
> jaxbContext = (org.apache.ws.jaxme.impl.JAXBContextImpl)
> javax.xml.bind.JAXBContext.newInstance("org.worldbank.toolkit.cdrom.config",this.getClass().getClassLoader());
>
> }
>
> My JAXME jars are located in my plugin directory and added to the
> classpath of that plugin. All I can really come to the conclusion of is
> that there possibly are other JAXB api jars somewhere deeper down in
> eclipses classpath which are being loaded first.
I would think, that "this.getClass().getClassLoader()" is the wrong
ClassLoader. If I get it right, that path contains the Eclipse jar files
(via the parent ClassLoader) and the JaxMe jar files (via the plugin),
but nothing else. (It might also be, that the classpath contains the
compiled classes, but that the property file isn't copied from the
directory with the generated sources to the binary directory.)
Jochen
--
http://lilypie.com/baby1/050423/1/5/1/+1
---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org
Re: SG Threading and eclipse plugin
Posted by "Mark R. Diggory" <md...@apache.org>.
Jochen Wiedmann wrote:
> Mark R. Diggory wrote:
>
>> I noticed something similar in regards to ClassLoaders and Eclipse. In
>> working on an Eclipse plugin, I needed to make sure I created the
>> JAXBContext with the plugins classloader and not the default system
>> classloader.
>
>
> This sounds reasonable. However, I would expect that you need not do so,
> because the JaxMe default classpath should be the path used to load the
> JAXBContext class (which is typically not the Eclipse class path).
>
I'm not going to claim that I fully understand it. All I know is that
the jaxb.properties is not detected unless I change the following line
in ObjectFactory and anyother place I instantiate the JAXBContext
public ObjectFactory() throws javax.xml.bind.JAXBException {
jaxbContext = (org.apache.ws.jaxme.impl.JAXBContextImpl)
javax.xml.bind.JAXBContext.newInstance("org.worldbank.toolkit.cdrom.config",this.getClass().getClassLoader());
}
My JAXME jars are located in my plugin directory and added to the
classpath of that plugin. All I can really come to the conclusion of is
that there possibly are other JAXB api jars somewhere deeper down in
eclipses classpath which are being loaded first.
>> The challenge was that the plugin has a classpath isolated
>> from the system classpath and so the JaxME jars and generated
>> classes/properties are not available on the System classpath. I had to
>> also modify the ObjectFactory to use a classloader acquired from the
>> class itself and not the default.
>
>
> Do you have more details on that?
>
See my example above.
--
Mark Diggory
Open Source Software Developer
Apache Jakarta Project
http://jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org
Re: SG Threading and eclipse plugin
Posted by Jochen Wiedmann <jo...@freenet.de>.
Mark R. Diggory wrote:
> I noticed something similar in regards to ClassLoaders and Eclipse. In
> working on an Eclipse plugin, I needed to make sure I created the
> JAXBContext with the plugins classloader and not the default system
> classloader.
This sounds reasonable. However, I would expect that you need not do so,
because the JaxMe default classpath should be the path used to load the
JAXBContext class (which is typically not the Eclipse class path).
> The challenge was that the plugin has a classpath isolated
> from the system classpath and so the JaxME jars and generated
> classes/properties are not available on the System classpath. I had to
> also modify the ObjectFactory to use a classloader acquired from the
> class itself and not the default.
Do you have more details on that?
Regards,
Jochen
--
http://lilypie.com/baby1/050423/1/5/1/+1
---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org
Re: SG Threading and eclipse plugin
Posted by "Mark R. Diggory" <md...@apache.org>.
I noticed something similar in regards to ClassLoaders and Eclipse. In
working on an Eclipse plugin, I needed to make sure I created the
JAXBContext with the plugins classloader and not the default system
classloader. The challenge was that the plugin has a classpath isolated
from the system classpath and so the JaxME jars and generated
classes/properties are not available on the System classpath. I had to
also modify the ObjectFactory to use a classloader acquired from the
class itself and not the default.
-Mark
Jochen Wiedmann wrote:
> Nacho G. Mac Dowell wrote:
>
>> Ok, I was failing to understand the threading model SWT uses
>> (appartment). It's working now! The version I have doesn't use
>> produces, depends or SGFactoryChains. Should I bother submitting it or
>> shall I wait until a more complete version is up.
>
>
> Not using "produces" and/or "depends" is fine. Not using SGFactoryChains
> is broken, because it disables extensions like JaxMePM. However, fixing
> that can well be left for later.
>
> If you've got something working, please post it. :-)
>
>
> Jochen
>
--
Mark Diggory
Open Source Software Developer
Apache Jakarta Project
http://jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org
Re: SG Threading and eclipse plugin
Posted by Jochen Wiedmann <jo...@freenet.de>.
Nacho G. Mac Dowell wrote:
> Ok, I was failing to understand the threading model SWT uses
> (appartment). It's working now! The version I have doesn't use produces,
> depends or SGFactoryChains. Should I bother submitting it or shall I
> wait until a more complete version is up.
Not using "produces" and/or "depends" is fine. Not using SGFactoryChains
is broken, because it disables extensions like JaxMePM. However, fixing
that can well be left for later.
If you've got something working, please post it. :-)
Jochen
--
http://lilypie.com/baby1/050423/1/5/1/+1
---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org
Re: SG Threading and eclipse plugin
Posted by "Nacho G. Mac Dowell" <ig...@informa.es>.
Ok, I was failing to understand the threading model SWT uses
(appartment). It's working now! The version I have doesn't use produces,
depends or SGFactoryChains. Should I bother submitting it or shall I
wait until a more complete version is up.
Nacho G. Mac Dowell wrote:
> I am having some trouble with the plugin. The thing is that I want to
> show the progress of the source generation in a text field. I created
> a TextViewLoggerFactory and a TextViewLogger and it works well. The
> thing is that it is blocking the UI while it works. Any ideas on how I
> could control the thread SG executes?
>
> Thanks!
>
> PD: Lots of UI operations inside Eclipse are blocking operations.
> Maybe we could leave it this way. I was thinking it would be nice to
> be able to cancel the operation, though.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: jaxme-dev-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org