- This topic has 3 replies, 2 voices, and was last updated 18 years ago by Riyad Kalla.
-
AuthorPosts
-
RealOps DevelopmentMemberI recently upgraded from Eclipse 3.1 with MyEclipse 4.1.1 GA to Eclipse 3.2.1 with MyEclipse 5.0 GA. Installation details are at the bottom of this post.
When I right-click web.xml and look at “Open With…” I see that it appears that the “MyEclipse Struts Config Editor” is selected.
I can change this to open with a “MyEclipse XML Editor” and this is successful.
Attempting to open by double-clicking on an XML file fails with the error:
“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”
Right clicking on an XML file, I see that the MyEclipse Struts Config Editor is considered the default editor.
I’ve tried a some recommendations I found in http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-13309.html (incidentally, I posted a reply on that topic that went unanswered for a week, that’s why I re-posting here):
1) Starting eclipse with the “-clean” option. This didn’t fix the problem.
2) Tried to associate “.xml” files with the MyEclipse XML Editor. Here’s what happened:
a) In Preferences, General > Editors > File Associations, it indicates that the first editor associated with *.xml files is: “MyEclipse Struts Config Editor (default) (locked by ‘MyEclipse Struts Config File content type’)”
b) I tried selecting the “.xml” File type, then selecting the MyEclipse XML Editor in the Associated Editor list, then clicking the “Default” button. This moves the MyEclipse XML Editor to the top of the Associated Editor list, and shows “(default)” next to it. This had no effect on opening XML files (Eclipse still attempted to open them in the MyEclipse Struts Editor, got xmen XMLTextEditor exception). I also see that reopening Preferences, going to “General > Editors > File Associations” does _not_ show the MyEclipse XML Editor as the default. It shows “XML Editor” as the default. Very odd that my preference for MyEclipse XML Editor as the default seemed to save with no problems, then this was implicitly updated to be “XML Editor”.
c) In Preferences, General > Content Types, in the Content Types tree, selecting Text > XML > MyEclipse Struts Config Editor shows this in the “File Associations” list:
struts-config.xml (locked)
*.xml (locked)
I thought that the thing to do here would be to select the “*.xml” entry and click the “Remove” button, but the “Remove” button is disabled when I select “*.xml”3) Right-clicking on an XML file, then selecting “Open With > MyEclipse XML Editor.” This worked. When I close the file, it still shows the blue gear icon next to the file name, but at least if I try and open it again, it comes up in the MyEclipse XML Editor.
However, I have many XML files in my workspace, and don’t want to have to do this the first time I open each one. It would be nice if the blue gear Struts Config icon would at least go away after I open the file in the MyEclipse XML Editor, so then I at least know whether I can open it with a double-click or via the “Open Resource” feature, rather than having to do the right-click, “Open With > MyEclipse XML Editor” way.
Another thing I tried was to remove my project, then do a fresh checkout from CVS, using the New Project wizard to set it up as a MyEclipse > J2EE Projects > Web Project. It still associates the MyEclipse Struts Editor with all *.xml projects.
Please help. This is very frustrating. I have a lot of XML files across my projects, and don’t want to have to deal with the workaround noted in item (3) above.
Thanks,
Scott MooreInstallation Summary:
*** Date: Thu Nov 09 11:19:00 EST 2006
*** System properties:
OS=mac os x
OS version=10.4.8
Java version=1.5.0_06*** MyEclipse details:
MyEclipse Enterprise WorkbenchVersion: 5.0 GA
Build id: 20060805-5.0-GA*** Eclipse details:
MyEclipse Enterprise WorkbenchVersion: 5.0.1 GA
Build id: 20060810-5.0.1-GAEclipse Platform
Version: 3.2.1.r321_v20060921-b_XVA-INSQSyMtx
Build id: M20060921-0945Eclipse RCP
Version: 3.2.1.r321_v20060801-2ekW2BxmcpPUOoq
Build id: M20060921-0945Eclipse Java Development Tools
Version: 3.2.1.r321_v20060905-R4CM1Znkvre9wC-
Build id: M20060921-0945Eclipse Plug-in Development Environment
Version: 3.2.1.r321_v20060823-6vYLLdQ3Nk8DrFG
Build id: M20060921-0945Eclipse Project SDK
Version: 3.2.1.r321_v20060801-tQ1w49KnTArT0FZ
Build id: M20060921-0945Eclipse Graphical Editing Framework
Version: 3.2.0.v20060626
Build id: 20060627-0816Eclipse startup command=-os
macosx
-ws
carbon
-launcher
/Applications/eclipse/Eclipse.app/Contents/Resources/Splash.app/Contents/MacOS/eclipse
-name
Eclipse
-showsplash
600
-exitdata
50000
-keyring
/Users/scott/.eclipse_keyring
-consoleLog
-showlocation
-product
com.genuitec.myeclipse.product.ide
-vm
/usr/bin/java
[/quote]
Riyad KallaMemberWe had 2 other users report this, it had something to do with a stray setting somewhere in their workspace. To test this, go to File > Switch Workspace, then give a temp location of a dir that doesn’t exist, and hit OK to restart. Now create a new web project, and open the web.xml file, did it work? (open with the XML editor)
The users that ran into this ended up creating new workspaces and then selectively exporting certain preferences and reimporting them in the new workspace. We never got ot the bottom of which preference was breaking it.
RealOps DevelopmentMemberRiyad,
I tried the test you described, and yes, the web.xml file opens in the XML editor.
I guess I’ll eventually go through the process of building a new workspace. What a pain, though.
Thanks,
Scott
Riyad KallaMemberScott,
I’m glad to hear it’s working but realize building a new workspace sounds like a pain. You can walk through these steps;
http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-14682.htmlto make the process a bit easier, but keep in mind when you reimport your settings, if your XML associations go squirrely again, that you may need to export portions of your preferences at a time and reimport to the new workspace so as to avoid the weird mapping somewhere that is causing the screwup.
-
AuthorPosts