facebook

Run As…->Ant disappeared

  1. MyEclipse Archived
  2.  > 
  3. UML Development
Viewing 15 posts - 1 through 15 (of 32 total)
  • Author
    Posts
  • #233015 Reply

    miljour
    Member

    I 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?

    #233021 Reply

    Scott Anderson
    Participant

    This 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.

    #233027 Reply

    P.G.Taboada
    Member

    I would love to – but it the ant editor is locked. Whatever that means… 🙁

    #233052 Reply

    miljour
    Member

    I 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.

    #233067 Reply

    Riyad Kalla
    Member

    Guys 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.

    #233187 Reply

    miljour
    Member

    Actually, 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.

    #233188 Reply

    Riyad Kalla
    Member

    We 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.

    #233190 Reply

    Riyad Kalla
    Member

    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.

    #235060 Reply

    anderssv
    Member

    That 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?

    #237077 Reply

    Kapeller
    Member

    @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

    #237085 Reply

    Riyad Kalla
    Member

    should 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.

    #237100 Reply

    Riyad Kalla
    Member

    After 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.xml

    All 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.

    #237178 Reply

    Kapeller
    Member

    @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?

    #237201 Reply

    Riyad Kalla
    Member

    Kapeller,
    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?

    #238181 Reply

    Kapeller
    Member

    This message has not been recovered.

Viewing 15 posts - 1 through 15 (of 32 total)
Reply To: Run As…->Ant disappeared

You must be logged in to post in the forum log in