Changes

Jump to: navigation, search

Teams Winter 2011/team2/lab3

340 bytes added, 04:42, 12 March 2011
no edit summary
[[File:ExtT2.png]]
*You should notice the plug-in was added to your extension.
*From your current display, right-click the recently added extension->New->menuContribution. After the item has been added, change the "locationUri" to "menu:org.eclipse.ui.main.menu" (this informs the application to attach it the main ui window that Eclipse makes. Afterwords, right-click that item and perform the following actions New->menu.
*Fill in the necessary based on the picture below
[[File:MenuT2.png]]
*Before we progress any further with menu, we must create a "Command". We'll first develop the "exit" command. Perform the exact same series of steps done earlier to add a new extension, except this time search for "org.eclipse.ui.commands". Add an item, "Commands", and add the following information based on the picture below.
[[File:ExtT2.png]]
*As you may recall, I made mention that commands are akin to basically doing an action, which is based on an occurrence of an event. Well, just like an event, you must programatically develop a class that extends a type of handler to inform the application of what actions to take place. That is why you must now create package called "ecl.team2.lab3.commands" and a java file named "ExitHandler".
*Copy and paste this code into the ExitHandler
<source lang=java>
*Enter what is shown in the picture below.
[[File:Ext3T2.png]]
*Save the MANIFEST file and run the application as we've done previously (Overview tab)
*You should see this window pop-up
[[File:FWindowpop3T2.png]]
*
1
edit

Navigation menu