Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » IllegalStateException recovery
IllegalStateException recovery [message #127275] Fri, 30 June 2006 19:54 Go to next message
Ernest Pasour is currently offline Ernest PasourFriend
Messages: 65
Registered: July 2009
Member
I'm using Callisto.
I've got a Swing JTable, and I've set a model on it that will provide
data. I had not configured the data source, so I got an
IllegalStateException. However, the exception screws up the visual
editor view so that none of the visuals draw. I can see the frame
outline, and I can hover over components and see the hover text, but
none of them draw correctly. If I have configured my data source
correctly for the JTable, all of the widgets draw correctly.

1. Maybe exceptions are bubbling out too far? Trace below.
2. If I correct the source code (by commenting out the setModel() call)
and close/reopen the VisualEditor instance, the visuals in the view are
still broken. I seem to have to restart my Eclipse session to fix it.

Any ideas?

Thanks,
Ernest

+++ Warning +++: Fri Jun 30 15:26:33 EDT 2006 Project (sdf)-VM for
sdf:err>
Exception in thread "AWT-EventQueue-0"
java.lang.IllegalStateException: The statement could not execute.
at com.sas.storage.jdbc.JDBCAdapter.init(JDBCAdapter.java:405)
at
com.sas.storage.jdbc.JDBCRowCountAdapter.calculateCurrentMax RowCount(JDBCRowCountAdapter.java:146)
at
com.sas.storage.jdbc.JDBCToTableModelAdapter.getRowCount(JDB CToTableModelAdapter.java:354)
at javax.swing.JTable.getRowCount(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.createTableSize(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.getPreferredSize(Unknown
Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at javax.swing.JTable.setWidthsFromPreferredWidths(Unknown Source)
at javax.swing.JTable.doLayout(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validate(Unknown Source)
at
org.eclipse.ve.internal.jfc.vm.ImageDataCollector$1.run(Imag eDataCollector.java:119)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknow n
Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Re: IllegalStateException recovery [message #127289 is a reply to message #127275] Fri, 30 June 2006 20:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jefmyers.us.ibm.com

Ernest,

If you're using a model that requires real work to be done, like
establishing a jdbc connection, the best practice is to detect the
difference between design time and run time behavior and provide mock
data in design time. VE supports doing this by adding the following
check to your code:

if (java.beans.Beans.isDesignTime()) {
// provide mock data
} else {
// provide real data
}

Hope this helps,
- Jeff
Re: IllegalStateException recovery [message #127584 is a reply to message #127289] Wed, 05 July 2006 12:11 Go to previous message
Ernest Pasour is currently offline Ernest PasourFriend
Messages: 65
Registered: July 2009
Member
Jeff,

Yes, using the design-time flag seemed to be working for me, so I'm glad
to get your confirmation that this is the supported way of doing things.

However, my concern about badly-behaved models still stands.

Thanks,
Ernest

Jeff Myers wrote:
> Ernest,
>
> If you're using a model that requires real work to be done, like
> establishing a jdbc connection, the best practice is to detect the
> difference between design time and run time behavior and provide mock
> data in design time. VE supports doing this by adding the following
> check to your code:
>
> if (java.beans.Beans.isDesignTime()) {
> // provide mock data
> } else {
> // provide real data
> }
>
> Hope this helps,
> - Jeff
Re: IllegalStateException recovery [message #613431 is a reply to message #127275] Fri, 30 June 2006 20:09 Go to previous message
Jeff Myers is currently offline Jeff MyersFriend
Messages: 396
Registered: July 2009
Senior Member
Ernest,

If you're using a model that requires real work to be done, like
establishing a jdbc connection, the best practice is to detect the
difference between design time and run time behavior and provide mock
data in design time. VE supports doing this by adding the following
check to your code:

if (java.beans.Beans.isDesignTime()) {
// provide mock data
} else {
// provide real data
}

Hope this helps,
- Jeff
Re: IllegalStateException recovery [message #613449 is a reply to message #127289] Wed, 05 July 2006 12:11 Go to previous message
Ernest Pasour is currently offline Ernest PasourFriend
Messages: 65
Registered: July 2009
Member
Jeff,

Yes, using the design-time flag seemed to be working for me, so I'm glad
to get your confirmation that this is the supported way of doing things.

However, my concern about badly-behaved models still stands.

Thanks,
Ernest

Jeff Myers wrote:
> Ernest,
>
> If you're using a model that requires real work to be done, like
> establishing a jdbc connection, the best practice is to detect the
> difference between design time and run time behavior and provide mock
> data in design time. VE supports doing this by adding the following
> check to your code:
>
> if (java.beans.Beans.isDesignTime()) {
> // provide mock data
> } else {
> // provide real data
> }
>
> Hope this helps,
> - Jeff
Previous Topic:Discouraged access: The method getViewPartInput()
Next Topic:Migrated from JBuilder to Eclipse, how to transform jbinit() -> VE style?
Goto Forum:
  


Current Time: Fri Apr 26 15:28:37 GMT 2024

Powered by FUDForum. Page generated in 0.02897 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top