Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Add new file
Add new file [message #757159] Wed, 16 November 2011 20:10 Go to next message
Federico Sellanes is currently offline Federico SellanesFriend
Messages: 71
Registered: November 2011
Member
Hi, i will tell us my problem.

I need add an item in the context menu project -> new

like :

ttp://img196.imageshack.us/img196/3306/mydsl.jpg

And this is the xml code :

    <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            allPopups="false"
            locationURI="popup:common.new.menu?after=additions">
         <command
               commandId="org.eclipse.ui.newWizard"
               icon="icons/mobile_phone.png"
               label="EAL"
               style="push">
         </command>
      </menuContribution>
   </extension>


Ok, i have this menu item, but i need open a 'creation file wizard' throug this menu item but i dont know why.

In fact, i can open a 'creation file wizard' but throug :

ttp://img225.imageshack.us/img225/750/mydsl2.jpg

ttp://img256.imageshack.us/img256/3650/mydsl3.jpg

ttp://img20.imageshack.us/img20/8131/mydsl4.jpg

his is the xml code :

     <extension
         point="org.eclipse.ui.navigator.navigatorContent">
      <commonWizard
            
            type="new"
            wizardId="customplugin.wizard.new">
         <enablement>
         </enablement>
      </commonWizard>
   </extension>
   <extension
         point="org.eclipse.ui.newWizards">
      <category
            id="org.xtext.example.mydsl.product"
            name="DSL">
      </category>
      <wizard
            category="org.xtext.example.mydsl.product"
            class="org.xtext.example.mydsl.product.wizards.MyDSLWizard"
            icon="icons/mobile_phone.png"
            id="org.xtext.example.mydsl.product.wizards.MyDSLWizard"
            name="MyDSL">
      </wizard>
   </extension>


I hope somebody can help me with this problem.

Im ussing The last Eclipse Indigo version and XTEXT 2.1

This are my file projects. Any suggest will help me a lot !!

ttp://hotfile.com/dl/135223529/914442b/DSL.rar.html

Sorry, my english is so bad !!

Add the h to the links.
Re: Add new file [message #757879 is a reply to message #757159] Wed, 16 November 2011 22:02 Go to previous message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Do not really understand your question.

If you are asking how to write and add a "New File Wizard for my DSL"
then you can take a look at an example in the repository
cloudsmith/geppetto at github - there are a couple of wizards in the
....pp.dsl.ui project - one is a simple "create an empty file".

Hope that helps
- henrik

On 11/16/11 9:10 PM, Federico Sellanes wrote:
> Hi, i will tell us my problem.
>
> I need add an item in the context menu project -> new
> like :
>
> ttp://img196.imageshack.us/img196/3306/mydsl.jpg
>
> And this is the xml code :
>
> <extension
> point="org.eclipse.ui.menus">
> <menuContribution
> allPopups="false"
> locationURI="popup:common.new.menu?after=additions">
> <command
> commandId="org.eclipse.ui.newWizard"
> icon="icons/mobile_phone.png"
> label="EAL"
> style="push">
> </command>
> </menuContribution>
> </extension>
>
> Ok, i have this menu item, but i need open a 'creation file wizard'
> throug this menu item but i dont know why.
>
> In fact, i can open a 'creation file wizard' but throug :
>
> ttp://img225.imageshack.us/img225/750/mydsl2.jpg
>
> ttp://img256.imageshack.us/img256/3650/mydsl3.jpg
>
> ttp://img20.imageshack.us/img20/8131/mydsl4.jpg
>
> his is the xml code :
>
> <extension
> point="org.eclipse.ui.navigator.navigatorContent">
> <commonWizard
> type="new"
> wizardId="customplugin.wizard.new">
> <enablement>
> </enablement>
> </commonWizard>
> </extension>
> <extension
> point="org.eclipse.ui.newWizards">
> <category
> id="org.xtext.example.mydsl.product"
> name="DSL">
> </category>
> <wizard
> category="org.xtext.example.mydsl.product"
> class="org.xtext.example.mydsl.product.wizards.MyDSLWizard"
> icon="icons/mobile_phone.png"
> id="org.xtext.example.mydsl.product.wizards.MyDSLWizard"
> name="MyDSL">
> </wizard>
> </extension>
>
> I hope somebody can help me with this problem.
>
> Im ussing The last Eclipse Indigo version and XTEXT 2.1
>
> This are my file projects. Any suggest will help me a lot !!
>
> ttp://hotfile.com/dl/135223529/914442b/DSL.rar.html
>
> Sorry, my english is so bad !!
> Add the h to the links.
Previous Topic:Cyriptic Error when running mwe2 workflow
Next Topic:entity cross references in domainmodel
Goto Forum:
  


Current Time: Thu Apr 25 15:01:02 GMT 2024

Powered by FUDForum. Page generated in 5.24944 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top