Plug-in or rcp - Using ViewPart

I'm programming a eclipse plug-in and I need to do a particular thing.
I have a action toolbar controlled by the class that implement IWorkbenchWindowActionDelegate; this toolbar have 1 button.
Also I have one view that implement ViewPart; this view have one text field and one button.
The problems is:
When I do a click the button in the toolbar I must show the view and wait until I do a click to button in the view and acquire the value of the textfild.
In other words, The View must work like modal dialog.
I am able to show the view but I'm not able to wait and retrieve the value of the textfild in the view.
How can i do this? It's very important to me to do this.
Help me please!!!!!
Code of class that manage the action toolbar:
public class Bottoni implements IWorkbenchWindowActionDelegate {
     public boolean aggc=false;
     public void dispose() {
          // TODO Auto-generated method stub
     public void init(IWorkbenchWindow window) {
     public void run(IAction action) {
          if (action.getId().equals("bott_agg")){
               try {
              IViewPart p;
                    p = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("traduttorealan.views.AggiornamentoKeyword");
               AggiornamentoKeyword a=(AggiornamentoKeyword) p.getAdapter(AggiornamentoKeyword.class);
               //AggiornamentoKeyword a=(AggiornamentoKeyword)p.getView(true);
               Problem
               -I have showed the view
               but now How can I wait that the user do a click to a buttun in the View and retrieve the value of textfild?
               String str=a.getpr();  //this is only an experiment
               } catch (PartInitException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
     public void selectionChanged(IAction action, ISelection selection) {
          // TODO Auto-generated method stub
Code of class that manage the view:
public class AggiornamentoKeyword extends ViewPart {
     String pr;
      * The constructor.
     public AggiornamentoKeyword() {
// the following method is only an experiment
     public synchronized String getpr(){
          return pr;
      * This is a callback that will allow us
      * to create the viewer and initialize it.
     public void createPartControl(Composite parent) {
          GridLayout layout=new GridLayout();
          layout.numColumns=8;
          parent.setLayout(layout);
          insKeyLab = new Label(parent, SWT.NULL);
          insKeyLab.setText("Nuova Keyword:");
          insKey = new Text(parent, SWT.BORDER);
          insKey.setEditable(true);
          GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
          gridData.horizontalSpan = 5;
          insKey.setLayoutData(gridData);
          aggkey=new Button(parent, SWT.PUSH);
          aggkey.setText("aggiorna");
          aggkey.addSelectionListener(new SelectionAdapter() {
               public void widgetSelected(SelectionEvent event) {
                         pr=insKey.getText();
          annullaagg=new Button(parent, SWT.PUSH);
          annullaagg.setText("annulla");
          keyListLab = new Label(parent, SWT.NULL);
          keyListLab.setText("Lista Keyword presenti:");
          gridData = new GridData(GridData.FILL_HORIZONTAL);
          gridData.horizontalSpan = 10;
          keyListLab.setLayoutData(gridData);
          keyList = new Text(parent, SWT.MULTI | SWT.V_SCROLL);
          keyList.setEditable(true);
          GridData gridDatal = new GridData(GridData.FILL_BOTH);
          gridDatal.verticalSpan=4;
          gridDatal.horizontalSpan = 10;
          keyList.setLayoutData(gridDatal);
     private void showMessage(String message) {
//          MessageDialog.openInformation(
//               viewer.getControl().getShell(),
//               "AggiornamentoKeyword",
//               message);
      * Passing the focus request to the viewer's control.
     public void setFocus() {
//          viewer.getControl().setFocus();
}

You'll be very lucky to get an answer here, hardly anyone uses Eclipse RCP. Far and away the best place for RCP help are the Eclipse.org newsgroups

Similar Messages

  • HT1665 I have a World Travel Adapter Kit for use with my iPad. can the plug adapters also be used on the Mac Pro charger to charge up my laptop when travelling or is a special converter needed.M

    I have a World Travel Adapter Kit for use with my iPad when traveling abroad. I know this charger can be used on an iPhone, can the plug adapters also be used with the charger of a Mac Book Pro or is a special converter required?

    Is there any concern about the type of travel adapter kit? For instance, some instructions indicate they are for heat creating appliances (hairdryers, curling irons, etc.). I bought such a set, but do they present any issues if used with more delicate electronic circuitry (for iPads, iPods, or with camera battery chargers). I am leaving for the UK on Monday and need to get it right - are they too strong for the Apple products if they are not to be used with computers? What other options are out there?

  • What plug adapter do I use to connect the new Macbook USB-C port to a cinema display?

    What plug adapter do I use to connect the new Macbook USB-C port to a cinema display?

    If you intend to connect your 2008 display to the new macbook then you will need a USB-C VGA Multiport Adapter ($79) as well as a mini display port to VGA port adapter ($29) and also a VGA-VGA Standard 15-Pin VGA Male to VGA Male Cable ($5).
    http://store.apple.com/us/product/MJ1L2AM/A/usb-c-vga-multiport-adapter
    http://store.apple.com/us/product/MB572Z/B/mini-displayport-to-vga-adapter
    http://www.amazon.com/VGA-VGA-Standard-15-Pin-Male-Cable/dp/B0002AHT0M
    The 2008 old cinema analogue Apple Cinema Displays were mostly pre-quipped with a mini display port rather than a  VGA or HDMI port. So you will have to connect the mini display port to VGA port adapter to your 2008 ACD and the USB-C VGA Multiport Adapter to your new macbook and connect the two female VGA ports with a VGA-VGA Standard 15-Pin VGA Male to VGA Male Cable.
    But I can't guarantee though that the above setup will work for your new macbook and your 2008 Apple Cinema Display. You should double check with Apple support regarding my suggestion. Just let me know.......

  • HT5655 I have downloaded the latest flash for my mac (running mountain lion 10.8.2) multiple times and have uninstalled it multiple times, but it still says blocked plug in. Im using firefox but i need safari back. any help?

    I have downloaded the latest flash for my mac (running mountain lion 10.8.2) multiple times and have uninstalled it multiple times, but it still says blocked plug in. Im using firefox for now. any help? Firefox and safari are like night and day. i just want safari back.
    Thanks.

    Adobe support article.
    Adobe Flash Player Troubleshooting
    Adobe Flash Uninstaller

  • I have downloaded/paid fora plug in from adobe site  (cracked backgrounds) it told me ti install creative Cloud which i have done but i cannot install the plug in into lightroom5  via plug in manger to use the backgrounds...please help as this is the firs

    Ihave downloaded/paid for a plug in from adobe site (cracked backgrounds) it told me ti install Creative Cloud which i have done it shows the plug in on there as downloaded but i cannot install it into lightroom 5 to use? i have tried the plug in manger but it says cannot install plug in..also downloaded the Adobe extension manager cc but that does not add either....Please help first time i ave tried to install a plug in !!!!!! Lucy

    Dear Lucy
    Please remember to unzip the file from your Downloads folder in order to load them into Lightroom.
    What is the error in Lightroom?
    Did you read the 'Where to Find it' section?
    Thanks,
    Krystal - Add-ons team

  • I restored my iPhone, then I set it up and used it without syncing it to my computer. When I plugged it in, it used back-up and now everything I did before I did the back-up is gone. Can I get those pictures back somehow?

    My iPhone was restored. I set it up without syncing it to the computer. I used it. I then plugged it into the computer. It used back-up and made it just like it was before I restored it. Everything I did before I plugged it in is now gone. Is there any way to undo that to get those pictures back?

    when you open the app store scroll down to the bottom it will display the apple id currently in use, change it to your normal apple id email

  • The plug in container module uses over 80%, when the browser is loaded, even if I'm not using it, Can I reduce the cpu request or is there another flash i can use?

    I am running a Dell Optiplex GX 110 with a Intel 111 processor 500 MHz and 256 MB of ram. I know its old and outdated but so am I. And up until the new upgrades we were both working just fine. I have the latest software updates and my system is clean as a whistle and totally optimized and was fast as ever until i installed the plug in container. I even disabled all the plug ins but java and flash but it made no difference.

    I'm going to guess that your battery life is also not so hot.  What I suspect is happening is thatbthe pad is locked into an update loop with I cloud.  As an example, if you have addresses that do not agree, the cloud back up will continue to try and correct itself, using both battery and wifi ( or cell).   It may also be an app trying to uzpdate itself.
    To troubleshot, try turning thigs off.  If you are using the cloud, turn off all syncing and see it the problem stops.  Then turn them back on, one by one, until you find the culprit.  If it is an app, it may be harder to find, but the steps are the same.  Turn off all notifications, and uninstall anything you added around the time the problem started.  
    A frequent culprit is magazine, comic, and newspaper subscriptions, that are constantly trying to update themselves.
    Keep looking, you will find it.

  • Recommended Plug-Ins for general use

    I am not a professional photographer. I use Aperture to create nice looking photos of family vacations and gatherings. I am not looking to spend a lot of money on plug ins simply because the program does so much already. I wouldn't mind having a few more options of fun little things that I can do to my pictures (either to make them fun and creative or to make them better looking pictures.) Is there any inexpensive or possibly free plug ins that anyone can suggest? Thanks!

    I am not a professional photographer. I use Aperture to create nice looking photos of family vacations and gatherings. I am not looking to spend a lot of money on plug ins simply because the program does so much already. I wouldn't mind having a few more options of fun little things that I can do to my pictures (either to make them fun and creative or to make them better looking pictures.) Is there any inexpensive or possibly free plug ins that anyone can suggest? Thanks!

  • Videos have "blocked Plug Ins". I use 7yr. old MacBook

    using MacBook(old) /"Blocked-Plug ins" on all videos/ down loaded Adobe Flash Player & installed...
    still not working. Please HELP

    When you have installed the latest version of Flash, relaunch Safari and test.
    If you're getting a "blocked plug-in" error, then in System Preferences… ▹ Flash Player ▹ Advanced
    click Check Now. Quit and relaunch your browser, but check this also:
    http://support.apple.com/kb/HT5655?viewlocale=en_US&locale=en_US  which also covers ‘blocked plug-in’.

  • Is there a plug in yet to use photoshop elements 12 with nikon d750

    I want to use Photoshop Elements 12 with my Nikon D750. Is there a raw plug in yet ?

    No, and it is expected that PSE 12 will not get any further updates.
    If you don't want to upgrade to PSE 13, you can download the free Adobe DNG converter. Use that to convert your NEF files to DNG files which can then be used by PSE 12.
    Windows: Adobe - Adobe Camera Raw and DNG Converter : For Windows : Adobe DNG Converter 8.7
    MAC: Adobe - Adobe Camera Raw and DNG Converter : For Macintosh : Adobe DNG Converter 8.7
    Brian

  • Ebay "plug-in failure" when using the standard pic uploader - HELP

    Hi.  I sell on Ebay frequently and have not been able to use their "standard picture" uploader.  This feature allows you to upload multiple pictures at once, which saves time.  However, whenever I try to use this feature, I get the attached error.  I have uninstalled and reinstalled Adobe Flash, enabled plug ins under security preferences.  I have also ran and completed a software update on my mac (safari was out of date).  I have cleared cache, shut down and rebooted.   I'm still getting the "failed plug-in" message.  I am on Safari version Version 6.1.1 (7537.73.11) and have a MAC OS X 10.7.5.  Thooughts?

    I am having the exact issues:
    Same day problem started, using newest flash version, also on iMac OS X 10.9.4 browser is safari. I've also uninstalled & reinstalled flash without resolve. Cannot have multiple tabs open when on broadcasting sites & youtube, as using the up/down volume both on keyboard & wireless headset produces "Plug-in Failure" message on all sites. Refreshing the page works, but cannot touch my volume without error message reappearing.
    Would appreciate a solution promptly.
    Nicole

  • Can't get Mac plug-in's bundle using bundle identifier

    Hello,
    I am storing my plug-in's online help documentation within my plug-in's bundle on the Mac. I try to use the bundle's identifier to find it, but CFBundleGetBundleWithIdentifier fails when the plug-in is inside InDesign's Plug-Ins folder. However, if the plug-in is outside of this folder and an alias to the plug-in is placed inside InDesign's Plug-Ins folder, CFBundleGetBundleWithIdentifier works fine. This seems very strange.
    Does anyone know how to get this to work right? Where do others put their online help documentation usually?
    John Hopkins

    Hello,
    I am storing my plug-in's online help documentation within my plug-in's bundle on the Mac. I try to use the bundle's identifier to find it, but CFBundleGetBundleWithIdentifier fails when the plug-in is inside InDesign's Plug-Ins folder. However, if the plug-in is outside of this folder and an alias to the plug-in is placed inside InDesign's Plug-Ins folder, CFBundleGetBundleWithIdentifier works fine. This seems very strange.
    Does anyone know how to get this to work right? Where do others put their online help documentation usually?
    John Hopkins

  • Can I plug in my Amplifier using the 3.5mm jack without using a a preamp

    Hello Everyone
    OK so I am using a PC at the moment. but I am thinking of transitioning to Mac.
    I been looking around the Internet and have seen people commenting on the fact that you may need a pre-amp to connect certain appliances (more than just headphones) I am looking at the Mac Book Pro 15" but without the Retina display. I have an amp, it's not new, a little out dated but works like a charm and I got some decent speaker to go with it. I listen to a lot of music, the way I got it plugged in is through a RCA cable to a 3.5mm jack which goes into my laptop and it works fine.
    I was wondering if I can literally do the same on a Mac Book Pro 15" just plug it in and no problem without the need for a pre-amp because the connection is too weak to pick up the amp.
    This may sound silly but that's about the only thing that is stopping me going into a store and getting one, I looked around the Internet and it's just loads of sites about ladies and gents trying to plug their guitars in.
    If anyone can help I would be grateful and thank you in advance.
    if you need any more information then please let me know I would be happy to give as much as I can.

    I would like to add that I have tried it my self and it does work no problem. Hope this helps anyone who has had the same issue.

  • (iPad 3rd Gen. Wi-Fi) Lack of charging capability while plugged in and in use

    Hey all.
       For some reason, it has come to my attention that while my iPad (3rd Gen. Wi-Fi) is plugged in (to a standard outlet from the stock charger out of the box) and in use (no battery saving settings; ie. dimming the brighness), it will charge the battery any significant amount. For instance, when I am using it to watch YouTube videos over Wi-Fi while charging it as well, it was at 10% charge, but after...maybe an hour or so, it was at 11% charge. Curious, no?
       Is this a problem that should be of any concern? Or should I simply turn it off while charging it? Thanks for any help.
    ...Why isn't the New iPad listed in "products?" Meh...
    Cheers!

    http://www.macworld.com/article/1150356/ipadcharging.html

  • Can i charge my iPod shuffle whilst listening to Music? (plugged into wall and using twin audio jack?

    I want to connect my iPod shuffle to a telephone line so when people are put on hold they can listen to music, however the battery will die after some time.
    Can i charge the iPod whilst listening to music simultaneously?  (Plugged into wall not computer)

    Thank you for using the Apple Support Communities
    The iPod will support playback and charging only if you have a wire that supports it. Since both audio out and electricity flow through the 1 headphone port you would need a cord of some sorts that will allow the iPod to charge and include audio out. As far as using it on a telephone. If the telephone you are using supports and audio input using the headphone jack then you could use the iPod shuffle as telephone music. If not than the iPod Shuffle may not be the best tool for you.

Maybe you are looking for