1.2.3GA: CTRL-C and CTRL-V stop working

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

1.2.3GA: CTRL-C and CTRL-V stop working

Postby cebarne2 » Tue Feb 10, 2004 9:34 am

At some point during my work today, the copy and paste shortcut keys stopped responding to the "Source" page on my SWT Editor. Right-click then Copy and Paste still worked. Closing the SWT Editor and reopening it made the copy & paste shortcut keys function again.

Here is one of several identical exceptions I believe resulted from trying the ctrl-c and ctrl-v:

Code: Select all
!ENTRY com.swtdesigner 4 4 Feb 10, 2004 11:02:16.591
!MESSAGE Designer internal error: null
!STACK 0
java.lang.NullPointerException
   at com.swtdesigner.model.swt.widgets.composite.c.visit(SourceFile:384)
   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:71)
   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:52)
   at com.swtdesigner.model.swt.widgets.composite.FrameInfo.handleResourceChanged(SourceFile:375)
   at com.swtdesigner.model.swt.widgets.composite.b.resourceChanged(SourceFile:368)
   at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:137)
   at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1006)
   at org.eclipse.core.runtime.Platform.run(Platform.java:413)
   at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:152)
   at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:67)
   at org.eclipse.core.internal.resources.Workspace.broadcastChanges(Workspace.java:161)
   at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:891)
   at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1600)
   at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:2711)
   at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:42)
   at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:302)
   at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:252)
   at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:758)
   at org.eclipse.jdt.internal.ui.wizards.NewElementWizard.performFinish(NewElementWizard.java:96)
   at com.swtdesigner.wizards.NewDesignContainerWizard.performFinish(SourceFile:34)
   at com.swtdesigner.wizards.NewSWTCompositeWizard.performFinish(SourceFile:21)
   at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:608)
   at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:321)
   at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:423)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
   at org.eclipse.jface.window.Window.runEventLoop(Window.java:583)
   at org.eclipse.jface.window.Window.open(Window.java:563)
   at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:136)
   at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
   at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:456)
   at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403)
   at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397)
   at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
   at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
   at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
   at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
   at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:324)
   at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
   at org.eclipse.core.launcher.Main.run(Main.java:747)
   at org.eclipse.core.launcher.Main.main(Main.java:583)
cebarne2
 
Posts: 67
Joined: Tue Sep 23, 2003 10:11 am
Location: Cedar Rapids, IA

Postby raphael » Tue Feb 10, 2004 12:02 pm

I have had the same thing happen to me. In my case even right-clicking to use copy and paste did not work. I also fixed the problem by closing and reopening the Editor.
raphael
 
Posts: 22
Joined: Thu Jan 29, 2004 3:41 pm

Postby Hansz » Tue Feb 10, 2004 11:44 pm

raphael wrote:I have had the same thing happen to me. In my case even right-clicking to use copy and paste did not work. I also fixed the problem by closing and reopening the Editor.


Yepz ... same for me ... same solution also ... :D
Even the smallest person can change the course of the future - Galadriel
Hansz
 
Posts: 18
Joined: Thu Jan 15, 2004 12:45 am
Location: Hoofddorp, Netherlands

Postby cebarne2 » Tue Mar 09, 2004 10:20 am

Just popping my head back in to see if any progress. This still happens to me regularly. It's a bit annoying when you are on a coding-spree to have to recycle the editor.

I am using a post 1.2.3GA beta and Eclipse 2.1.2.
cebarne2
 
Posts: 67
Joined: Tue Sep 23, 2003 10:11 am
Location: Cedar Rapids, IA

Postby Eric Clayberg » Thu Mar 11, 2004 7:49 am

cebarne2 wrote:Just popping my head back in to see if any progress. This still happens to me regularly. It's a bit annoying when you are on a coding-spree to have to recycle the editor. I am using a post 1.2.3GA beta and Eclipse 2.1.2.

Try using the latest v1.2.4 beta and see if that makes any difference.
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

Postby cebarne2 » Tue Mar 16, 2004 7:58 am

Eclipse: 2.1.2
Designer: 1.2.4 (downloaded March 16th)

I was just working in the SWT-Designer editor. I switched to source edit and did a CTRL-C and CTRL-V and it worked fine. I tried it again, and it didn't respond. Nor, is it responding now. The context-menu copy/paste works, but not the key combos. So, with no switching between views, or apps, the CTRL-C/V just decided to stop working.

It appears this has not been fixed since 1.2.3GA.

No errors appear in the logs when this happens.

Thanks
cebarne2
 
Posts: 67
Joined: Tue Sep 23, 2003 10:11 am
Location: Cedar Rapids, IA

Postby cebarne2 » Tue Mar 16, 2004 8:08 am

I just switched from Source, to Design, and back to Source.

CTRL+C/V is back. And now I can't break it again.

This is very unpredictable.
cebarne2
 
Posts: 67
Joined: Tue Sep 23, 2003 10:11 am
Location: Cedar Rapids, IA

Postby allawy » Wed Mar 17, 2004 10:42 am

Hi;

This is a serious problem, I hope it will be fixed soon, I lost hours re-lunching eclipse to get copy/paste (it's a tool that you can avoid while coding, nor SWT-designer :)).
allawy
 
Posts: 43
Joined: Wed Mar 10, 2004 7:28 pm

Postby Eric Clayberg » Wed Mar 17, 2004 10:55 am

allawy wrote:This is a serious problem, I hope it will be fixed soon, I lost hours re-lunching eclipse to get copy/paste (it's a tool that you can avoid while coding, nor SWT-designer :)).

In order to fix the problem, we need a scenario that we can use to recreate it. We need to know the exact version of Eclipse, the version of Designer and what you were doing that precipitated the problem. I just spent the last half an hour trying to reproduce the problem under different Eclipse versions, and was unable to.
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

Postby cebarne2 » Thu Mar 18, 2004 5:40 am

Eclipse 2.1.2
Designer 1.2.4 (downloaded 3/15)
Windows XP Pro SP 1
1 GB RAM
Launch string: "C:\Program Files\eclipse\eclipse.exe" -vmargs -Xms128M -Xmx512M

Now, I do not have a sequence of events that will make the problem occur. All I can say is that it happens when I am "in the zone". About the worst time it should happen. :wink:

More specifically, I will be coding like crazy, and CTRL-C/V will have been working just fine, then suddenly, without warning or reason, it stops working.

The context-menu copy/paste has always worked, no matter the status of the CTRL-C/V function.

I have been checking the logs lately, and haven't noticed a cause. After it occurs, I delete the logs, and start pressing CTRL-C/V, looking for some exception... but none occur (at least, none that cause the log to be recreated).

Thanks

FYI: I remember this occuring with 1.2.3GA, too.
cebarne2
 
Posts: 67
Joined: Tue Sep 23, 2003 10:11 am
Location: Cedar Rapids, IA

Postby raphael » Thu Mar 18, 2004 9:18 am

Maybe I can shed a bit of light on this matter. This just happened to me too. Nothing in the .log file was found. I played around a bit to see what I could discover. This is what I found.

In the source, ctrl-c and ctrl-v don't work. The context menu copy and paste work.
I press ctrl-c and then ctrl-v to copy and paste in the source. I switch back to design view and I see the cursor with a '+' symbol saying that it wants to place a widget. I try placing it and I see that it has pasted a copy of the widget that was selected.

This is what I think is happening. Sometimes (I don't know when or why it starts doing this) even though you are in source mode, the cut, copy and paste keys are still bound to the design view. When you press ctrl-c, the widget that is selected in the design view, regardless of where you are in the source, is copied. When ctrl-v is pressed, it tries to paste.

I will try to find out a bit more on why this occurs.

Here are my specs:
Designer Version: 1.2.4 compiled on 2004.03.13 for Eclipse 2.1 or WSAD 5.1
Platform Product: Eclipse 2.1.0
OS Name: Windows XP
RAM: 1 GB
Launch String "C:\Program Files\eclipse\eclipse.exe" -vmargs -Xms128M -Xmx512M
raphael
 
Posts: 22
Joined: Thu Jan 29, 2004 3:41 pm

Postby raphael » Thu Mar 18, 2004 10:04 am

I had found a bug with grid data so I sent an email to support. I gave an example with the block of code for a text field before and after. The first block copied, then I went into design view, changed a couple of settings and then tried copying the block again. I couldn't. The app just had a text field that did nothing. No other widgets or code.

I tried to reproduce it but I couldn't. On my previous post ctrl-c and ctrl-v stopped working on a gui that was quite large. Therefore, complexity doesn't seem to be an issue here.

That is all I can say for now. It always works when you want it to break, and occasionally breaks when you want it to work. Pretty crazy.
raphael
 
Posts: 22
Joined: Thu Jan 29, 2004 3:41 pm

Postby Eric Clayberg » Thu Mar 18, 2004 7:23 pm

raphael wrote:I had found a bug with grid data so I sent an email to support.

The bug you reported in fixed in the new v1.2.4 release.

Your copy/paste theory sounds interesting. I will investigate further.
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

Postby Eric Clayberg » Fri Mar 19, 2004 1:58 pm

We think that we indentified and fixed the problem with the v1.2.4 release we put out early this morning.

We were able to reproduce it by clicking on a different view or editor and invoking copy/paste there and then switching back to Designer. That would certainly account for the seemingly random nature of the problem. When your testing for the problem and beating on Designer by itself, it worked fine :-). You would then start using it for awhile and in the normal flow of development access another view to copy/paste and then later notice that ctrl+c/v no longer works in Designer.

In any case, we think it is fixed. Chad, let me know how it goes. I will keep my fingers crossed. ;-)
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 1 guest