Home » Archived » Visual Editor (VE) » Inner classes
Inner classes [message #45438] |
Thu, 01 July 2004 21:51  |
Eclipse User |
|
|
|
I apologize if this has been asked in the newsgroup before, but there's no
search utility to verify that :(.
I am trying to modify a large dialog created with the visual editor so
that the panels that it contains are inner classes rather than simply
private variables. This is just for organization and clarity, so it's not
strictly necessary, but for some reason, the editor cannot seem to handle
inner classes. I either get errors such as:
java.lang.InstantionException (<classname>$<innerclassname>)
or errors related to jem.somethingsomething.parser not being able to
access the inner class (this even after I made everything public in the
inner class). Sorry I don't have the more exact error messsage, but I
can't seem to reproduce that original error.
Is this a known bug, and if so, is there a workaround? I'd check bugzilla,
but it seems to be down.
|
|
|
Re: Inner classes [message #45469 is a reply to message #45438] |
Thu, 01 July 2004 22:06   |
Eclipse User |
|
|
|
Originally posted by: myersj.nospam.us.ibm.com
Hi Eric,
Nope, we don't support inner classes, but the issue has been raised
before. You could open a bugzilla enhancement request for the that feature.
However, when working with large classes such as this, it is a much
better idea to extract your main component panels, etc into separate
classes entirely. You can drop these individual classes into your main
design using the choose bean dialog and they will show up properly.
This will dramatically improve the speed of the editor by reducing the
size of the source code and the internal model necessary represent your
application.
- Jeff
Eric Camden wrote:
> I apologize if this has been asked in the newsgroup before, but there's no
> search utility to verify that :(.
>
> I am trying to modify a large dialog created with the visual editor so
> that the panels that it contains are inner classes rather than simply
> private variables. This is just for organization and clarity, so it's not
> strictly necessary, but for some reason, the editor cannot seem to handle
> inner classes. I either get errors such as:
>
> java.lang.InstantionException (<classname>$<innerclassname>)
>
> or errors related to jem.somethingsomething.parser not being able to
> access the inner class (this even after I made everything public in the
> inner class). Sorry I don't have the more exact error messsage, but I
> can't seem to reproduce that original error.
>
> Is this a known bug, and if so, is there a workaround? I'd check bugzilla,
> but it seems to be down.
>
|
|
|
Re: Inner classes [message #45499 is a reply to message #45469] |
Thu, 01 July 2004 22:13   |
Eclipse User |
|
|
|
Thank you for the quick reply. And yes, I realize that separating out the
panels entirely is the proper solution, but one that that takes an
annoying amount of hand coding. Now, if there were a VE refactoring method
that extracted an object into a separate visual class for me, then I would
be quite impressed. Perhaps I shall submit that as a feature enhancement
;).
Jeff Myers wrote:
> Hi Eric,
> Nope, we don't support inner classes, but the issue has been raised
> before. You could open a bugzilla enhancement request for the that feature.
> However, when working with large classes such as this, it is a much
> better idea to extract your main component panels, etc into separate
> classes entirely. You can drop these individual classes into your main
> design using the choose bean dialog and they will show up properly.
> This will dramatically improve the speed of the editor by reducing the
> size of the source code and the internal model necessary represent your
> application.
> - Jeff
> Eric Camden wrote:
> > I apologize if this has been asked in the newsgroup before, but there's no
> > search utility to verify that :(.
> >
> > I am trying to modify a large dialog created with the visual editor so
> > that the panels that it contains are inner classes rather than simply
> > private variables. This is just for organization and clarity, so it's not
> > strictly necessary, but for some reason, the editor cannot seem to handle
> > inner classes. I either get errors such as:
> >
> > java.lang.InstantionException (<classname>$<innerclassname>)
> >
> > or errors related to jem.somethingsomething.parser not being able to
> > access the inner class (this even after I made everything public in the
> > inner class). Sorry I don't have the more exact error messsage, but I
> > can't seem to reproduce that original error.
> >
> > Is this a known bug, and if so, is there a workaround? I'd check bugzilla,
> > but it seems to be down.
> >
|
|
| |
Re: Inner classes [message #45947 is a reply to message #45499] |
Fri, 02 July 2004 10:41  |
Eclipse User |
|
|
|
Originally posted by: richkulp.NO.SPAM.us.ibm.com
There is a refactor available. Select the inner class in the "Members"
view (if in java browsing perspective) or "Outline" view (if in java
perspective) and select the Refactor->Move type to new file... entry.
This refactors the inner class into a separate class.
Note: if the inner class is non-static, turn on the checkbox on the
first page of the refactor dialog. This is necessary because non-static
inner classes need to have the outer class passed to the constructor. If
you don't turn this on you can't go any further with the refactor.
--
Thanks, Rich Kulp
|
|
|
Re: Inner classes [message #593421 is a reply to message #45438] |
Thu, 01 July 2004 22:06  |
Eclipse User |
|
|
|
Hi Eric,
Nope, we don't support inner classes, but the issue has been raised
before. You could open a bugzilla enhancement request for the that feature.
However, when working with large classes such as this, it is a much
better idea to extract your main component panels, etc into separate
classes entirely. You can drop these individual classes into your main
design using the choose bean dialog and they will show up properly.
This will dramatically improve the speed of the editor by reducing the
size of the source code and the internal model necessary represent your
application.
- Jeff
Eric Camden wrote:
> I apologize if this has been asked in the newsgroup before, but there's no
> search utility to verify that :(.
>
> I am trying to modify a large dialog created with the visual editor so
> that the panels that it contains are inner classes rather than simply
> private variables. This is just for organization and clarity, so it's not
> strictly necessary, but for some reason, the editor cannot seem to handle
> inner classes. I either get errors such as:
>
> java.lang.InstantionException (<classname>$<innerclassname>)
>
> or errors related to jem.somethingsomething.parser not being able to
> access the inner class (this even after I made everything public in the
> inner class). Sorry I don't have the more exact error messsage, but I
> can't seem to reproduce that original error.
>
> Is this a known bug, and if so, is there a workaround? I'd check bugzilla,
> but it seems to be down.
>
|
|
|
Re: Inner classes [message #593437 is a reply to message #45469] |
Thu, 01 July 2004 22:13  |
Eclipse User |
|
|
|
Thank you for the quick reply. And yes, I realize that separating out the
panels entirely is the proper solution, but one that that takes an
annoying amount of hand coding. Now, if there were a VE refactoring method
that extracted an object into a separate visual class for me, then I would
be quite impressed. Perhaps I shall submit that as a feature enhancement
;).
Jeff Myers wrote:
> Hi Eric,
> Nope, we don't support inner classes, but the issue has been raised
> before. You could open a bugzilla enhancement request for the that feature.
> However, when working with large classes such as this, it is a much
> better idea to extract your main component panels, etc into separate
> classes entirely. You can drop these individual classes into your main
> design using the choose bean dialog and they will show up properly.
> This will dramatically improve the speed of the editor by reducing the
> size of the source code and the internal model necessary represent your
> application.
> - Jeff
> Eric Camden wrote:
> > I apologize if this has been asked in the newsgroup before, but there's no
> > search utility to verify that :(.
> >
> > I am trying to modify a large dialog created with the visual editor so
> > that the panels that it contains are inner classes rather than simply
> > private variables. This is just for organization and clarity, so it's not
> > strictly necessary, but for some reason, the editor cannot seem to handle
> > inner classes. I either get errors such as:
> >
> > java.lang.InstantionException (<classname>$<innerclassname>)
> >
> > or errors related to jem.somethingsomething.parser not being able to
> > access the inner class (this even after I made everything public in the
> > inner class). Sorry I don't have the more exact error messsage, but I
> > can't seem to reproduce that original error.
> >
> > Is this a known bug, and if so, is there a workaround? I'd check bugzilla,
> > but it seems to be down.
> >
|
|
|
Re: Inner classes [message #593642 is a reply to message #45438] |
Fri, 02 July 2004 09:48  |
Eclipse User |
|
|
|
Eric Camden wrote:
> I apologize if this has been asked in the newsgroup before, but there's no
> search utility to verify that :(.
>
> I am trying to modify a large dialog created with the visual editor so
> that the panels that it contains are inner classes rather than simply
> private variables. This is just for organization and clarity, so it's not
> strictly necessary, but for some reason, the editor cannot seem to handle
> inner classes. I either get errors such as:
>
> java.lang.InstantionException (<classname>$<innerclassname>)
>
> or errors related to jem.somethingsomething.parser not being able to
> access the inner class (this even after I made everything public in the
> inner class). Sorry I don't have the more exact error messsage, but I
> can't seem to reproduce that original error.
>
> Is this a known bug, and if so, is there a workaround? I'd check bugzilla,
> but it seems to be down.
>
VE will try to instantiate instances on a target VM. The problem you
have above is that one can not instantiate an inner class by itself...
unless it is a static class.
|
|
|
Re: Inner classes [message #593676 is a reply to message #45499] |
Fri, 02 July 2004 10:41  |
Eclipse User |
|
|
|
Originally posted by: richkulp.NO.SPAM.us.ibm.com
There is a refactor available. Select the inner class in the "Members"
view (if in java browsing perspective) or "Outline" view (if in java
perspective) and select the Refactor->Move type to new file... entry.
This refactors the inner class into a separate class.
Note: if the inner class is non-static, turn on the checkbox on the
first page of the refactor dialog. This is necessary because non-static
inner classes need to have the outer class passed to the constructor. If
you don't turn this on you can't go any further with the refactor.
--
Thanks, Rich Kulp
|
|
|
Goto Forum:
Current Time: Sat Jul 19 13:06:11 EDT 2025
Powered by FUDForum. Page generated in 0.05786 seconds
|