Eclipse Plugin Central

Plugin Design - Howto acces plugin data from different plugin

forest - Apr 10, 2008 - 07:27 AM
Post subject: Howto acces plugin data from different plugin
H guys, I could really use some help.

Imagine this situation. I have my plugin (plugin A) with a widget and plugin B with label. B is standalone RCP application and A is connected to B.

In plugin A,
I cotributed new popup-menu using org.eclipse.ui.popupMenus extension point and created action File. This actions show new dialog window with label.
what must I do, if I want to set text, what is stored at label in plugin B (the other plugin) to label in dialog window

In a speech of Java
Code:

// some imports

public class MyDialog extends Dialog {

        private Shell shell;
        private Label lblMyLabel;

   public MyDialog (Shell parent) {
      super(parent);
      shell = parent.getShell();
        }

        Label lblDescription = new Label(shell, SWT.NONE);
        String s = getStringFromLabelInDifferentPlugin();
        lblDescrition.setText(s);

        private String getStringFromLabelInDifferentPlugin() {
             Label label;
             
             label = ?????
           
             return label.getText();
        }

// some code
}



I need to finish the getStringFromLabelInDifferentPlugin() method.
I have my ideas, it probly use the Activator class, but I dont know how.

thanks for all help and hints.
All times are GMT - 6 Hours
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits