Re: Renaming component breaks editor

From: Ray Kiddy (ra..anymede.org)
Date: Mon Jan 19 2009 - 17:10:13 EST

  • Next message: Mike Schrag: "Re: Renaming component breaks editor"

    I have filed bugs in JIRA about this. See http://issues.objectstyle.org/jira/browse/WOL-927
    . I provide links, in that bug, to the dozen or so other bugs that
    relate to this ball or yarn.

    The only way I have found to do this is:

    1 - In eclipse, make a new component with the new name and then quit
    eclipse.
    2 - Go to Terminal and copy and replace, and rename, the old
    component's api file, java file and the files inside the wo directory
    to the new location, overwriting those files.
    3 - Launch eclipse and delete the WOComponent that you do not want.

    Be sure to make a copy of your entire project before you do this, as
    there are lots of ways to screw this up. And remember to replace the
    class name in your java and others places which you will find out
    about when you launch and get a run-time exception.

    Sucks, doesn't it? But this is literally the only way to do it that I
    have found that does not cause problems. One could theoretically do
    all of these changes in eclipse. It is tempting to try. But when you
    mess up, and you will occasionally mess up, eclipse will never give
    you back what you had. You may end up tearing down and re-building the
    whole project. So, really, I have found it is not worth it to try to
    do this in eclipse.

    cheers - ray

    On Jan 19, 2009, at 8:17 AM, Juergen Lorenz Simon wrote:

    > Hi,
    >
    > i used the refac -> rename WOComponent button and now i'm in
    > trouble. WOLips
    > won't open the file for love nor money. I checked the file content
    > manually from terminal,
    > all seems fine. Here's what I get in Eclipse:
    >
    > java.lang.IllegalArgumentException
    > at org.eclipse.ui.part.FileEditorInput.<init>(FileEditorInput.java:
    > 50)
    > at
    > org
    > .objectstyle
    > .wolips
    > .components
    > .input
    > .ComponentEditorFileEditorInput
    > .<init>(ComponentEditorFileEditorInput.java:13)
    > at
    > org
    > .objectstyle
    > .wolips
    > .components
    > .input.ComponentEditorInput.create(ComponentEditorInput.java:110)
    > at
    > org
    > .objectstyle
    > .wolips
    > .components
    > .input.ComponentEditorInput.create(ComponentEditorInput.java:188)
    > at
    > org
    > .objectstyle
    > .wolips
    > .components
    > .input
    > .ComponentEditorInput.createWithDotHtml(ComponentEditorInput.java:196)
    > at
    > org
    > .objectstyle
    > .wolips
    > .componenteditor.part.ComponentEditor.init(ComponentEditor.java:139)
    > at
    > org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:
    > 794)
    > at
    > org
    > .eclipse
    > .ui.internal.EditorReference.createPartHelper(EditorReference.java:
    > 643)
    > at
    > org
    > .eclipse.ui.internal.EditorReference.createPart(EditorReference.java:
    > 426)
    > at
    > org
    > .eclipse
    > .ui
    > .internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:
    > 592)
    > at
    > org
    > .eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:
    > 263)
    > at
    > org
    > .eclipse
    > .ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:
    > 2739)
    > at
    > org
    > .eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:
    > 2651)
    > at org.eclipse.ui.internal.WorkbenchPage.access
    > $13(WorkbenchPage.java:2643)
    > at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:
    > 2595)
    > at
    > org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
    > at
    > org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:
    > 2590)
    > at
    > org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:
    > 2574)
    > at
    > org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:
    > 2557)
    > at
    > org
    > .objectstyle
    > .wolips
    > .workbenchutilities
    > .WorkbenchUtilitiesPlugin.open(WorkbenchUtilitiesPlugin.java:443)
    > at
    > org
    > .objectstyle
    > .wolips
    > .ui.actions.OpenWOAction.openResourceIfPossible(OpenWOAction.java:95)
    > at
    > org
    > .objectstyle
    > .wolips
    > .eomodeler
    > .eclipse
    > .PackageExplorerDoubleClickHandler
    > .doubleClick(PackageExplorerDoubleClickHandler.java:245)
    > at org.eclipse.jface.viewers.StructuredViewer
    > $1.run(StructuredViewer.java:799)
    > at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
    > at org.eclipse.core.runtime.Platform.run(Platform.java:857)
    > at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
    > at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:199)
    > at
    > org
    > .eclipse
    > .jface
    > .viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:797)
    > at
    > org
    > .eclipse
    > .jface
    > .viewers
    > .AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1387)
    > at org.eclipse.jface.viewers.StructuredViewer
    > $4.widgetDefaultSelected(StructuredViewer.java:1173)
    > at
    > org
    > .eclipse
    > .jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:
    > 237)
    > at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:
    > 234)
    > at org.eclipse.jface.util.OpenStrategy
    > $1.handleEvent(OpenStrategy.java:295)
    > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1495)
    > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1519)
    > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1504)
    > at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1295)
    > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:
    > 3350)
    > at org.eclipse.swt.widgets.Control.sendTrackEvents(Control.java:2758)
    > at org.eclipse.swt.widgets.Control.kEventControlTrack(Control.java:
    > 1961)
    > at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:367)
    > at org.eclipse.swt.widgets.Display.controlProc(Display.java:827)
    > at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Native
    > Method)
    > at org.eclipse.swt.widgets.Tree.kEventMouseDown(Tree.java:2363)
    > at org.eclipse.swt.widgets.Widget.mouseProc(Widget.java:1262)
    > at org.eclipse.swt.widgets.Display.mouseProc(Display.java:2815)
    > at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Native
    > Method)
    > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2934)
    > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:
    > 2389)
    > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
    > at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
    > at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
    > at
    > org
    > .eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
    > 289)
    > at
    > org
    > .eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:
    > 461)
    > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
    > 149)
    > at
    > org
    > .eclipse
    > .ui
    > .internal.ide.application.IDEApplication.start(IDEApplication.java:
    > 106)
    > at
    > org
    > .eclipse
    > .equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
    > at
    > org
    > .eclipse
    > .core
    > .runtime
    > .internal
    > .adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:
    > 106)
    > at
    > org
    > .eclipse
    > .core
    > .runtime
    > .internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
    > at
    > org
    > .eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
    > 363)
    > at
    > org
    > .eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
    > 176)
    > 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:585)
    > at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
    > at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
    > at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
    >
    >
    > Any ideas?
    >
    > Thanks!



    This archive was generated by hypermail 2.0.0 : Mon Jan 19 2009 - 17:11:14 EST