- This topic has 31 replies, 10 voices, and was last updated 18 years, 9 months ago by Riyad Kalla.
-
AuthorPosts
-
miljourMemberI am using Eclipse 3.1, MyEclipse 4 M2, JDK 1.5. I just installed MyEclipse today.
I noticed that the pop-up menu for Run As…->Ant build disappeared on my xml files. Note that my files are not all named build.xml. For example, one of my files is buildClient.xml.
Is there a way to get this menu back without disabling MyEclipse?
Scott AndersonParticipantThis isn’t a change caused by MyEclipse; it’s simply a change in Eclipse 3.1 in the way it handles file content types. So that Run As… > Ant shows up on your files, navigate to Window > Preferences > General > Content Types > Text > XML > Ant Buildfile and add you file names to the list that this content type supports using the Add… button.
P.G.TaboadaMemberI would love to – but it the ant editor is locked. Whatever that means… 🙁
miljourMemberI have *.xml listed there and it does not work. If I use Help > Software Updates > Manage Configuration and disable MyEclipse, I have Ant Build… in the Run As… menu. If I enable MyEclipse, it goes away.
I use Ant to generate source files from WSDL files.
Riyad KallaMemberGuys when you post a followup can you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug.
Alot of times people will say “me too!” and then when we dig down it turns out they actually are running incompatible versions or have a version of MyEclipse that didn’t have a certain feature they were looking for. So it’s really important we know the versions.
miljourMemberActually, I am the original poster. My OS is Win XP Pro.
I just want to know if I am going to need to keep enabling and disabling MyEclipse if I want to use Ant.
Riyad KallaMemberWe filed a bug when you originally reported it and it is still on our todo list. Aparently the problem doesn’t exist when the file is named build.xml, but when it is named something else (for example buildCLient.xml) then there is no Run As > Ant target.
We are sorry for the inconvenience.
Riyad KallaMemberOk after looking into this further, it seems you can fixed this by navigating to our Window > Prefs > General > Content Types > Text > XML > Ant Build File and adding new mappings for all your Ant files. This seems to be a change in 3.1 now, no more file mappings, instead we have content type mappings.
anderssvMemberThat solution works, but is not really a long term solution. I see it’s still not fixed in M3, will it be fixed in the final release?
KapellerMember@support-rkalla wrote:
Ok after looking into this further, it seems you can fixed this by navigating to our Window > Prefs > General > Content Types > Text > XML > Ant Build File and adding new mappings for all your Ant files. This seems to be a change in 3.1 now, no more file mappings, instead we have content type mappings.
Hi,
it seems that the issue is not fixed in the final release.
should i really add every single xml filename to the file content type –> file associations Table?!?!?greetings
Riyad KallaMembershould i really add every single xml filename to the file content type
For the time being this it the way to work around this problem. We are looking into it, sorry for the trouble.
Riyad KallaMemberAfter further investigation it seems this is behave by-design from the Eclipse team. Something that was introduced with Eclipse 3.1 was the idea of Content Types, basically a mechanism by which the platform is able to tell more specifically what *kind* of file it is editing.
Take for example the following files:
build.xml
faces-config.xml
struts-config.xml
web.xml
myFile.xmlAll of these files are XML files, so if you check a default install of Eclipse/MyEclipse under Window > Prefs > General > Editors > File Association you’ll see for *.xml every kind of editor for the files above (Faces, Struts, XML, Ant, etc.) is mapped to *.xml. But then you wonder why you can’t open your web.xml file with the Faces editor? Well if you take a look at the Content Type XML tree, you’ll see a type for faces mapped from MyEclipse. These “content types” are implemented behind the scenes as a file contents analyzer used to determine more specificly what kind of file you are opening. In the case of the Ant editor, the File Associtaion AND Content Type association are locked typed provided by Eclipse, when you try and open a non-Ant file with the Ant editor, the content type analyzes the file, sees that it’s not a build script, and then doesn’t even give you the option of opening it with that editor.
So this isn’t a bug, it’s Eclipse behaving as it was designed to behave with the new Content Type feature introduced in 3.1.
KapellerMember@support-rkalla wrote:
In the case of the Ant editor, the File Associtaion AND Content Type association are locked typed provided by Eclipse, when you try and open a non-Ant file with the Ant editor, the content type analyzes the file, sees that it’s not a build script, and then doesn’t even give you the option of opening it with that editor.
So this isn’t a bug, it’s Eclipse behaving as it was designed to behave with the new Content Type feature introduced in 3.1.
Sorry to say this, but this design is quite bad (or the ant-file-analyser is buggy).
I don’t really understand your arguments, why do ME remove the run as ant option. There must be a ME xml content analyzer who thinks that this file is no ant script – or am i wrong?
Riyad KallaMemberKapeller,
My appologize, there is another thread where my post belonged, in reply to your question this should have been fixed in 4.0 GA release with Eclipse 3.1. When you right-click on your build.xml file, you should see Run As > Ant Build, etc. etc… are you not seein gthis? What is the name of your build file?
KapellerMemberThis message has not been recovered.
-
AuthorPosts