For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 11 replies, 3 voices, and was last updated 18 years, 9 months ago by
Riyad Kalla.
-
AuthorPosts
-
parisilaMemberSince upgrading to eclipse 3.2 and MyEclipse 5.0.1 all of my file associations for plain xml default to MyEclipse Struts Config Editor. I have set the default in the preferences window for *.xml to MyEclipse XML Editor but it still shows the Stuts Config Editor as the icon and by default when I right click the menu shows the checked default editor is the Struts Config. If I manually select the XML file editor to open a file then it is checked with the XML File Editor the next time I open this file but the icon is still the Struts Config Editor. Also after applying and restarting eclipse all xml files are still defaulting to the the Stuts Config Editor until I manually change it using the right click open with option.
Any ideas how to change this behavior so the icon shows the correct editor and the preference set in eclipse is used?
November 1, 2006 at 10:23 am #261196
Riyad KallaMemberVery strange. Can you go to the Window > Prefs > General > Content Types > Text > XML > MyEclipse Struts Config, and see what types are listed? There should be 2, struts-config.xml and *.xml.
November 1, 2006 at 10:30 am #261198
parisilaMemberI see:
struts-config.xml (locked)
*.xml (locked)November 1, 2006 at 11:07 am #261209
Riyad KallaMemberOk then to reconfirm what you said earlier, when you earlier, when you go to File Associations, you have struts-config.xml mapped to default editor of MyEclipse Struts Config Editor… and for *.xml you have the default set to MyEclipse XML Editor right? (this is all right)
If that is the case, can you try creating a new xml file with some silly name like “blarg.xml” and see which editor it opens in?
November 1, 2006 at 11:20 am #261210
parisilaMemberIf I go to Window -> Preferences … then select General -> Editors -> File Asociations -> *.xml the XML Editor is first in the list and has (default) after it. The MyEclipse Struts Config Editor is shown second in the list.
I right click in project folder and select New -> File and type blarg.xml OK
blarg.xml tab opens and gives error Unable to create this part due to an internal error. Reason for failure: Unable to open editor, unknown editor ID: org.xmen.ui.text.XMLTextEditor
Details:
org.eclipse.ui.PartInitException: Unable to open editor, unknown editor ID: org.xmen.ui.text.XMLTextEditor
at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:675)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2593)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2528)
at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPage.java:2520)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2505)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2500)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2477)
at com.genuitec.eclipse.struts.editor.multipage.StrutsConfigEditor.init(StrutsConfigEditor.java:469)
at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:840)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:583)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:372)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:290)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:140)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:394)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1144)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1097)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1311)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:455)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:102)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:441)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:111)
at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:60)
at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:217)
at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:207)
at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:820)
at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:719)
at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:680)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2593)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2528)
at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPage.java:2520)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2505)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2500)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2485)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:388)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:350)
at org.eclipse.ui.wizards.newresource.BasicNewFileResourceWizard.performFinish(BasicNewFileResourceWizard.java:101)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:680)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:355)
at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
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.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.eclipse.ui.internal.actions.NewWizardShortcutAction.run(NewWizardShortcutAction.java:110)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
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.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.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(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
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.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)The file is shown in the project package explorer with the Struts Config icon as the default editor. If I close the blarg.xml window and double click to open blarg.xml I get the same error again.
If I right click blarg.xml the the struts config editor is checked as the default. If I right click and select open with MyEclipse XML Editor it opens the empty file without error.
November 1, 2006 at 12:18 pm #261213
Riyad KallaMemberIf you try a new workspace (File > Switch Workspace > C:\tempworkspace, hit OK to restart, then create a new Project), and then create blarg.xml there… does it work?
November 1, 2006 at 3:00 pm #261220
parisilaMemberFurther investigation seems to indicate this has something to do with the workspace being converted from the old version. If I create a new workspace and then create a new xml file I see the correct behavior and associations.
November 1, 2006 at 3:03 pm #261221
Riyad KallaMemberThat is very odd. If you need to move your work to the new workspace, the fastest way to do tha tshould only take a few minutes. Essentially:
1) File > Export > Preferences from old workspace.
2) File > Import > Preferences from new workspace
3) File > Import > Existing Projects from new workspaceand you should be all set. From time to time workspaces do go sour because of all the information they store. The handful of times I’ve really tried ot troubleshoot what went wrong was usually much much longer than the few minutes it took to just create a new one.
November 3, 2006 at 11:15 am #261316
Spencer W ThomasMemberI, too, have this problem. I followed your suggestion of creating a new workspace and importing the old projects.
Here is my result:
I set “MyEclipse XML editor” to be the default for .xml file type.
All my XML files are still attached to the “Struts config file” type.
If I right-click and open the file using “XML Editor”, that preference becomes sticky — this is an improvement over the previous behavior. But, the Icon is still the struts “gear” icon
If I create a new XML file (New->File, type in “foo.xml”) it attempts to open the file with the Struts editor and I get the error message ‘Unable to create this part due to an internal error. Reason for the failure: Unable to open editor, unknown editor ID: org.xmen.ui.text.XMLTextEditor’HOWEVER: If I create a tgtally new workspace and do not import my preferences, then I get the XML editor by default instead of the Struts config editor.
In this new workspace, if I create a file named “struts-config.xml”, it attempts to open the struts config editor and I get the same error message.It seems to me that there are two problems here:
1. That XML files are defaulting to the Struts config editor,
2. The Struts config editor is broken.Another oddity: when I open the “File Associations” preferences panel, It shows “XML Editor (default)” at the top of the list for *.xml. It now shows it 3 times, because I’ve tried to set “MyEclipse XML Editor” as the default 3 times.
November 3, 2006 at 11:50 am #261318
Riyad KallaMember1) You are right, there is some stale config somewhere that is causing this conflict.
2) This is actually the result of trying to open a struts-config.xml file in a non-Struts project. It looks broken, but if you read the message it tells why it’s not working. We hate this behavior,it’s too “not user friendly” and are hoping to improve it soon.January 2, 2007 at 3:20 pm #264036
parisilaMemberAs swthomas55 found if I imported my preferences I still had the same problem even in a new workspace. I went to uninstall MyEclipse and found there were dependencies between MyEclipse and the eclipse Visual Editor. I uninstalled both and then xml files were associated with the default editor by default. I reinstalled MyEclipse 5.1.0 using the archive site to install (I previously used the exe installer). After this so far I don’t seem to have any problems. xml files are correctly associated with the MyEclipse xml editor by default.
January 2, 2007 at 3:27 pm #264040
Riyad KallaMemberVery strange… but thank you for posting your findings incase others are running into a similar problem parisila.
-
AuthorPosts