Error when saving in design mode (sometimes)

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Error when saving in design mode (sometimes)

Postby byronpdx » Tue Sep 16, 2008 8:33 am

I get an error, and sometimes have to kill Eclipse, when saving in Design mode. Saving in Source mode does not seem to cause a problem. I don't know if I am doing something wrong or need to change Eclipse configuration, but it is a bother sometimes. I think it is related to databinding as it seemed to have started when I began doing more databinding, especially in complex forms.

Thanks.

Here is the error message:

Plug-in Provider: Instantiations
Plug-in Name: WindowBuilder Professional
Plug-in ID: com.swtdesigner
Plug-in Version: 6.7.1.200809100305

java.lang.NullPointerException
at com.swtdesigner.model.util.ast.DecoratedASTNodeUtilities.setASTEditor(DecoratedASTNodeUtilities.java:102)
at com.swtdesigner.model.parser.JavaInfoParser.parse(JavaInfoParser.java:308)
at com.swtdesigner.gef.DesignerEditor.parseCompilationUnit(DesignerEditor.java:1188)
at com.swtdesigner.gef.DesignerEditor.bufferChanged(DesignerEditor.java:2154)
at org.eclipse.jdt.internal.ui.javaeditor.DocumentAdapter.fireBufferChanged(DocumentAdapter.java:562)
at org.eclipse.jdt.internal.ui.javaeditor.DocumentAdapter.documentChanged(DocumentAdapter.java:555)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged2(AbstractDocument.java:735)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:712)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:697)
at org.eclipse.jface.text.AbstractDocument.fireDocumentChanged(AbstractDocument.java:762)
at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1157)
at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:151)
at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1176)
at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:137)
at org.eclipse.text.edits.ReplaceEdit.performDocumentUpdating(ReplaceEdit.java:82)
at org.eclipse.text.edits.TextEdit.traverseDocumentUpdating(TextEdit.java:898)
at org.eclipse.text.edits.TextEdit.traverseDocumentUpdating(TextEdit.java:891)
at org.eclipse.text.edits.TextEditProcessor.executeDo(TextEditProcessor.java:188)
at org.eclipse.text.edits.TextEdit.dispatchPerformEdits(TextEdit.java:738)
at org.eclipse.text.edits.TextEditProcessor.performEdits(TextEditProcessor.java:156)
at org.eclipse.ltk.core.refactoring.TextChange.perform(TextChange.java:247)
at org.eclipse.jdt.internal.corext.fix.CleanUpRefactoring$CleanUpChange.perform(CleanUpRefactoring.java:158)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation$1.run(PerformChangeOperation.java:260)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:308)
at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(UIPerformChangeOperation.java:109)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:225)
at org.eclipse.jdt.internal.corext.fix.CleanUpPostSaveListener.saved(CleanUpPostSaveListener.java:286)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider$5.run(CompilationUnitDocumentProvider.java:1539)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.notifyPostSaveListeners(CompilationUnitDocumentProvider.java:1534)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.commitWorkingCopy(CompilationUnitDocumentProvider.java:1331)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider$4.execute(CompilationUnitDocumentProvider.java:1400)
at org.eclipse.ui.editors.text.TextFileDocumentProvider$DocumentProviderOperation.run(TextFileDocumentProvider.java:130)
at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:69)
at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:104)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:116)
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:73)
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:63)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:454)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:770)
at org.eclipse.ui.texteditor.AbstractTextEditor.performSave(AbstractTextEditor.java:4790)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.performSave(CompilationUnitEditor.java:1228)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSave(CompilationUnitEditor.java:1281)
at com.swtdesigner.editors.MultiPageEditor.doSave(MultiPageEditor.java:525)
at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.doSave(SaveScopeResourcesHandler.java:246)
at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.handleStatus(SaveScopeResourcesHandler.java:200)
at org.eclipse.debug.internal.ui.sourcelookup.Prompter$1.run(Prompter.java:70)
at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:155)
at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:158)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3800)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
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:382)
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:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)

Designer Configuration Details:

Product: WindowBuilder Professional
Version: 6.7.1.200809100305
Expected: Eclipse 3.4
Actual: Eclipse 3.4.0.v20080512
Actual Eclipse Build Name:
Actual Eclipse Build ID: I20080617-2000
IDE Actual Name: Eclipse
IDE Actual Version: 3.3.100.v200806172000
IDE Actual NL: en_US
Serial Number: WindowBuilderPro-07028-5229B
Activation Key: WindowBuilderPro-GK0TH-HM15H-73B4B
Physical Address: 00-19-D1-E6-96-EE
Code Gen: Flat Mode, Use Existing, First Assignment, Make Final
Events: Anonymous Class, Create Stubs
Platform Product: Eclipse
Platform Version: 3.3.100.v200806172000
OS Name: Windows XP
OS Architecture: x86
OS Version: 5.1
Byron Palmer
TriMet MTP Programmer/Analyst
byronpdx
 
Posts: 3
Joined: Mon Aug 18, 2008 1:55 pm

Re: Error when saving in design mode (sometimes)

Postby Eric Clayberg » Wed Sep 17, 2008 5:42 am

We need to see your complete Eclipse ".log" file.

The snippet you posted is just a side effect of something that happened earlier.

A test case that will reproduce this would also be helpful, since it looks like a parsing issue of some sort.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Error when saving in design mode (sometimes)

Postby ksklein » Mon Sep 22, 2008 7:26 am

I have had similar problems, although I am currently unable to reproduce -- I recently moved up to eclipse 3.4 and the latest release which might have help resolve the issue.

However, saving while in design mode is *very* time consuming with what appear to be "pop up" windows opening and closing very quickly, redraws of the design screen going on during the save process, etc. This happens in almost all of my forms -- or at least those with more than several controls.

For example, I just accidentally hit save on a form with 239 lines of code -- it took 45 seconds for me to be able to edit again.
ksklein
 
Posts: 4
Joined: Mon Sep 22, 2008 7:19 am

Re: Error when saving in design mode (sometimes)

Postby Eric Clayberg » Mon Sep 22, 2008 10:37 am

That sounds very bizarre. Nothing like that should happen when simply saving a file as that is a pure Eclipse operation.

What OS are you using? What exact build of SWT Designer are you using?

Do you have any Java > Editor < Save Action options turned on?

Can you send a sample class where this happens?
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests