Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » property set twice in property view
property set twice in property view [message #460688] Thu, 28 December 2006 11:04 Go to next message
Eclipse UserFriend
Originally posted by: peter_ossipov.mail.ru

Hi everybody!
I have come across a strange behavior.
I try to set some value in a property view. In my model (where the value
finally goes) I check whether the value is appropriate, if not I throw
IllegalArgumentException. It turns out that, when the value is not
appropriate the exception is thrown twice. Why? Because the value is set
twice by UI. Once - when the value is set and then when text editor
looses focus. Why is that?
How can I overcome this difficulty? :-/
Thanks very much in advance, guys.
Re: property set twice in property view [message #460689 is a reply to message #460688] Thu, 28 December 2006 11:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: peter_ossipov.mail.ru

Peter Osipov wrote:
> Hi everybody!
> I have come across a strange behavior.
> I try to set some value in a property view. In my model (where the value
> finally goes) I check whether the value is appropriate, if not I throw
> IllegalArgumentException. It turns out that, when the value is not
> appropriate the exception is thrown twice. Why? Because the value is set
> twice by UI. Once - when the value is set and then when text editor
> looses focus. Why is that?
> How can I overcome this difficulty? :-/
> Thanks very much in advance, guys.
Here are the two stacks that I end up with.

ERROR - Connection with server name 'Server1' already exists.
java.lang.IllegalArgumentException: Connection with server name
'Server1' already exists.
at
com.astrac.as.client.ide.core.util.connections.Connection.ch eckProperty(Connection.java:214)
at
com.astrac.as.client.ide.core.util.connections.Connection.se tProperty(Connection.java:110)
at
com.astrac.as.client.ide.core.model.adapters.connection.Conn ectionAdapaterFactory$1.setPropertyValue(ConnectionAdapaterF actory.java:137)
at
org.eclipse.ui.views.properties.PropertySheetEntry.valueChan ged(PropertySheetEntry.java:789)
at
org.eclipse.ui.views.properties.PropertySheetEntry.setValue( PropertySheetEntry.java:730)
at
org.eclipse.ui.views.properties.PropertySheetEntry.applyEdit orValue(PropertySheetEntry.java:147)
at
org.eclipse.ui.views.properties.PropertySheetEntry$1.applyEd itorValue(PropertySheetEntry.java:104)
at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:3 05)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:843)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:14 9)
at
org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(Ce llEditor.java:303)
at

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!

org.eclipse.jface.viewers.TextCellEditor.handleDefaultSelect ion(TextCellEditor.java:294)
at
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!


org.eclipse.jface.viewers.TextCellEditor$1.widgetDefaultSele cted(TextCellEditor.java:147)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:97)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
com.astrac.as.client.ide.core.application.ApplicationAsClien t.run(ApplicationAsClient.java:25)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)

ERROR - Connection with server name 'Server1' already exists.
java.lang.IllegalArgumentException: Connection with server name
'Server1' already exists.
at
com.astrac.as.client.ide.core.util.connections.Connection.ch eckProperty(Connection.java:214)
at
com.astrac.as.client.ide.core.util.connections.Connection.se tProperty(Connection.java:110)
at
com.astrac.as.client.ide.core.model.adapters.connection.Conn ectionAdapaterFactory$1.setPropertyValue(ConnectionAdapaterF actory.java:137)
at
org.eclipse.ui.views.properties.PropertySheetEntry.valueChan ged(PropertySheetEntry.java:789)
at
org.eclipse.ui.views.properties.PropertySheetEntry.setValue( PropertySheetEntry.java:730)
at
org.eclipse.ui.views.properties.PropertySheetEntry.applyEdit orValue(PropertySheetEntry.java:147)
at
org.eclipse.ui.views.properties.PropertySheetEntry$1.applyEd itorValue(PropertySheetEntry.java:104)
at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:3 05)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:843)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:14 9)
at
org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(Ce llEditor.java:303)
at

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!
org.eclipse.jface.viewers.CellEditor.focusLost(CellEditor.ja va:682)
at
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!

org.eclipse.jface.viewers.TextCellEditor$5.focusLost(TextCel lEditor.java:185)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:109)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:933)
at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java: 1970)
at org.eclipse.swt.widgets.Widget.wmKillFocus(Widget.java:1671)
at org.eclipse.swt.widgets.Control.WM_KILLFOCUS(Control.java:35 75)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3277 )
at org.eclipse.swt.widgets.Text.windowProc(Text.java:1841)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.BringWindowToTop(Native Method)
at org.eclipse.swt.widgets.Decorations.bringToTop(Decorations.j ava:183)
at org.eclipse.swt.widgets.Shell.open(Shell.java:997)
at org.eclipse.jface.window.Window.open(Window.java:792)
at
com.astrac.as.client.ide.core.ui.dialogs.common.MessageDialo gEx.openError(MessageDialogEx.java:332)
at
com.astrac.as.client.ide.core.util.exceptions.ExceptionHandl er.displayDialog(ExceptionHandler.java:156)
at
com.astrac.as.client.ide.core.util.exceptions.ExceptionHandl er.displayErrorDialog(ExceptionHandler.java:146)
at
com.astrac.as.client.ide.core.util.exceptions.ExceptionHandl er.handle(ExceptionHandler.java:58)
at
com.astrac.as.client.ide.core.util.exceptions.ExceptionHandl er.handle(ExceptionHandler.java:47)
at
com.astrac.as.client.ide.core.model.adapters.connection.Conn ectionAdapaterFactory$1.setPropertyValue(ConnectionAdapaterF actory.java:141)
at
org.eclipse.ui.views.properties.PropertySheetEntry.valueChan ged(PropertySheetEntry.java:789)
at
org.eclipse.ui.views.properties.PropertySheetEntry.setValue( PropertySheetEntry.java:730)
at
org.eclipse.ui.views.properties.PropertySheetEntry.applyEdit orValue(PropertySheetEntry.java:147)
at
org.eclipse.ui.views.properties.PropertySheetEntry$1.applyEd itorValue(PropertySheetEntry.java:104)
at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:3 05)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:843)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:14 9)
at
org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(Ce llEditor.java:303)
at
org.eclipse.jface.viewers.TextCellEditor.handleDefaultSelect ion(TextCellEditor.java:294)
at
org.eclipse.jface.viewers.TextCellEditor$1.widgetDefaultSele cted(TextCellEditor.java:147)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:97)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
com.astrac.as.client.ide.core.application.ApplicationAsClien t.run(ApplicationAsClient.java:25)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Re: property set twice in property view [message #460774 is a reply to message #460689] Fri, 29 December 2006 07:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: peter_ossipov.mail.ru

Hi again.
I found out what the problem was.
When exception is thrown while trying to set the value, it causes my
dialog to appear with exception description. This causes cell editor to
prematurely loose focus and it tries setting a value again. This results
in having two exactly the same exceptions and thus two dialogs showing
them.
A ridiculous situation to be honest.
I just created this variable
private volatile boolean isSetting = false;
and consult it whether the setting is being in progress and if so, I
just give up the second time. It works, but do not know whether it is
ok, to to this way.

Peter Osipov wrote:
> Peter Osipov wrote:
>> Hi everybody!
>> I have come across a strange behavior.
>> I try to set some value in a property view. In my model (where the
>> value finally goes) I check whether the value is appropriate, if not I
>> throw IllegalArgumentException. It turns out that, when the value is
>> not appropriate the exception is thrown twice. Why? Because the value
>> is set twice by UI. Once - when the value is set and then when text
>> editor looses focus. Why is that?
>> How can I overcome this difficulty? :-/
>> Thanks very much in advance, guys.
> Here are the two stacks that I end up with.
>
> ERROR - Connection with server name 'Server1' already exists.
> java.lang.IllegalArgumentException: Connection with server name
> 'Server1' already exists.
> at
> com.astrac.as.client.ide.core.util.connections.Connection.ch eckProperty(Connection.java:214)
>
> at
> com.astrac.as.client.ide.core.util.connections.Connection.se tProperty(Connection.java:110)
>
> at
> com.astrac.as.client.ide.core.model.adapters.connection.Conn ectionAdapaterFactory$1.setPropertyValue(ConnectionAdapaterF actory.java:137)
>
> at
> org.eclipse.ui.views.properties.PropertySheetEntry.valueChan ged(PropertySheetEntry.java:789)
>
> at
> org.eclipse.ui.views.properties.PropertySheetEntry.setValue( PropertySheetEntry.java:730)
>
> at
> org.eclipse.ui.views.properties.PropertySheetEntry.applyEdit orValue(PropertySheetEntry.java:147)
>
> at
> org.eclipse.ui.views.properties.PropertySheetEntry$1.applyEd itorValue(PropertySheetEntry.java:104)
>
> at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:3 05)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:843)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:14 9)
> at
> org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(Ce llEditor.java:303)
>
> at
>
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!
>
> org.eclipse.jface.viewers.TextCellEditor.handleDefaultSelect ion(TextCellEditor.java:294)
>
> at
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!
>
>
> org.eclipse.jface.viewers.TextCellEditor$1.widgetDefaultSele cted(TextCellEditor.java:147)
>
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:97)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> com.astrac.as.client.ide.core.application.ApplicationAsClien t.run(ApplicationAsClient.java:25)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
> at org.eclipse.core.launcher.Main.run(Main.java:977)
> at org.eclipse.core.launcher.Main.main(Main.java:952)
>
> ERROR - Connection with server name 'Server1' already exists.
> java.lang.IllegalArgumentException: Connection with server name
> 'Server1' already exists.
> at
> com.astrac.as.client.ide.core.util.connections.Connection.ch eckProperty(Connection.java:214)
>
> at
> com.astrac.as.client.ide.core.util.connections.Connection.se tProperty(Connection.java:110)
>
> at
> com.astrac.as.client.ide.core.model.adapters.connection.Conn ectionAdapaterFactory$1.setPropertyValue(ConnectionAdapaterF actory.java:137)
>
> at
> org.eclipse.ui.views.properties.PropertySheetEntry.valueChan ged(PropertySheetEntry.java:789)
>
> at
> org.eclipse.ui.views.properties.PropertySheetEntry.setValue( PropertySheetEntry.java:730)
>
> at
> org.eclipse.ui.views.properties.PropertySheetEntry.applyEdit orValue(PropertySheetEntry.java:147)
>
> at
> org.eclipse.ui.views.properties.PropertySheetEntry$1.applyEd itorValue(PropertySheetEntry.java:104)
>
> at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:3 05)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:843)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:14 9)
> at
> org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(Ce llEditor.java:303)
>
> at
>
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!
> org.eclipse.jface.viewers.CellEditor.focusLost(CellEditor.ja va:682)
> at
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!
>
> org.eclipse.jface.viewers.TextCellEditor$5.focusLost(TextCel lEditor.java:185)
>
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:109)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:933)
> at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java: 1970)
> at org.eclipse.swt.widgets.Widget.wmKillFocus(Widget.java:1671)
> at org.eclipse.swt.widgets.Control.WM_KILLFOCUS(Control.java:35 75)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3277 )
> at org.eclipse.swt.widgets.Text.windowProc(Text.java:1841)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.BringWindowToTop(Native Method)
> at org.eclipse.swt.widgets.Decorations.bringToTop(Decorations.j ava:183)
> at org.eclipse.swt.widgets.Shell.open(Shell.java:997)
> at org.eclipse.jface.window.Window.open(Window.java:792)
> at
> com.astrac.as.client.ide.core.ui.dialogs.common.MessageDialo gEx.openError(MessageDialogEx.java:332)
>
> at
> com.astrac.as.client.ide.core.util.exceptions.ExceptionHandl er.displayDialog(ExceptionHandler.java:156)
>
> at
> com.astrac.as.client.ide.core.util.exceptions.ExceptionHandl er.displayErrorDialog(ExceptionHandler.java:146)
>
> at
> com.astrac.as.client.ide.core.util.exceptions.ExceptionHandl er.handle(ExceptionHandler.java:58)
>
> at
> com.astrac.as.client.ide.core.util.exceptions.ExceptionHandl er.handle(ExceptionHandler.java:47)
>
> at
> com.astrac.as.client.ide.core.model.adapters.connection.Conn ectionAdapaterFactory$1.setPropertyValue(ConnectionAdapaterF actory.java:141)
>
> at
> org.eclipse.ui.views.properties.PropertySheetEntry.valueChan ged(PropertySheetEntry.java:789)
>
> at
> org.eclipse.ui.views.properties.PropertySheetEntry.setValue( PropertySheetEntry.java:730)
>
> at
> org.eclipse.ui.views.properties.PropertySheetEntry.applyEdit orValue(PropertySheetEntry.java:147)
>
> at
> org.eclipse.ui.views.properties.PropertySheetEntry$1.applyEd itorValue(PropertySheetEntry.java:104)
>
> at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:3 05)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:843)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:14 9)
> at
> org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(Ce llEditor.java:303)
>
> at
> org.eclipse.jface.viewers.TextCellEditor.handleDefaultSelect ion(TextCellEditor.java:294)
>
> at
> org.eclipse.jface.viewers.TextCellEditor$1.widgetDefaultSele cted(TextCellEditor.java:147)
>
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:97)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> com.astrac.as.client.ide.core.application.ApplicationAsClien t.run(ApplicationAsClient.java:25)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
> at org.eclipse.core.launcher.Main.run(Main.java:977)
> at org.eclipse.core.launcher.Main.main(Main.java:952)
Re: property set twice in property view [message #460900 is a reply to message #460774] Tue, 02 January 2007 11:28 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
Glad to hear you got it sorted. If you have any kind of window that is being shown, you'll get the behaviour you see (and not just in error dialogs; if e.g. a new background task needed attention you could see that).

Having a flag for the property is a good way of stopping this problem; note that it's fairly common pattern in any case (e.g. a.setA() calls b.setB() which calls a.setA() again). If you didn't have a flag to say 'inside the setA method' then this would loop infinitely, though there's also an easier way to see if the value is the same as last time (e.g. inside a.setA have 'if a.getA == newA return') which also achieves the same effect.

BTW if you can truncate some of your replies each time that would be helpful, especially when stacktraces are involved.

Alex.
Re: property set twice in property view [message #460901 is a reply to message #460900] Tue, 02 January 2007 12:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: peter_ossipov.mail.ru

Alex Blewitt wrote:
> Glad to hear you got it sorted. If you have any kind of window that is being shown, you'll get the behaviour you see (and not just in error dialogs; if e.g. a new background task needed attention you could see that).
>
> Having a flag for the property is a good way of stopping this problem; note that it's fairly common pattern in any case (e.g. a.setA() calls b.setB() which calls a.setA() again). If you didn't have a flag to say 'inside the setA method' then this would loop infinitely, though there's also an easier way to see if the value is the same as last time (e.g. inside a.setA have 'if a.getA == newA return') which also achieves the same effect.
>
> BTW if you can truncate some of your replies each time that would be helpful, especially when stacktraces are involved.
>
> Alex.
Hi, Alex!
Thanks for your explanation!
Do you mean me to truncate the messages only when there are stack traces
or every one? In that case my messages without stack traces are the same
length as your's actually.
Well, about stacks. Should I be attaching them - is that a better idea?
Re: property set twice in property view [message #460907 is a reply to message #460901] Tue, 02 January 2007 16:37 Go to previous message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
It's just that in the 3rd message of this post ( http://www.eclipsezone.com/eclipse/forums/m92122629.html#921 22356) you seemed to be replying to yourself, and including the full body of the message each time, that's all :-)

As opposed to the stack traces, there's really not a lot of information in them generally. For example, the following would probably be enough to diagnose some part of the information:

ERROR - Connection with server name 'Server1' already exists.
java.lang.IllegalArgumentException: Connection with server name
'Server1' already exists.
at
com.astrac.as.client.ide.core.util.connections.Connection.ch eckProperty(Connection.java:214)
at
com.astrac.as.client.ide.core.util.connections.Connection.se tProperty(Connection.java:110)
at
com.astrac.as.client.ide.core.model.adapters.connection.Conn ectionAdapaterFactory$1.setPropertyValue(ConnectionAdapaterF actory.java:137)
at
org.eclipse.ui.views.properties.PropertySheetEntry.valueChan ged(PropertySheetEntry.java:789)
at
org.eclipse.ui.views.properties.PropertySheetEntry.setValue( PropertySheetEntry.java:730)
at
org.eclipse.ui.views.properties.PropertySheetEntry.applyEdit orValue(PropertySheetEntry.java:147)

But yes, if you want to attach the full stacktrace/log, (i.e. more than 5-10 lines) an attachment might be a better way. At least, this is all IMHO you understand :-)

Alex.
Previous Topic:isFilterProperty never fires for a ViewerFilter
Next Topic:RCP application as daemon
Goto Forum:
  


Current Time: Fri Apr 19 00:09:15 GMT 2024

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

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

Back to the top