Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » eclipse workebench plugin start problem
eclipse workebench plugin start problem [message #559218] Thu, 16 September 2010 04:35 Go to next message
Bhanu  is currently offline Bhanu Friend
Messages: 15
Registered: August 2009
Junior Member


I have created one workbench application plugin not eclipse rcp application. I have not created any plugin template for that workbench application.
Now When I run the workbench application Activator is not calling. I put System.out.println("Insided start()") inside the start method of the
Activator.java. But it is not calling the start method. How I make call the start method? But when I make the option,Autostart=true in the runconfiguration,plug-ins,
It is starting the activator. But the problem is When I call IWorkbenchWindow window = Workbench.getInstance()
.getActiveWorkbenchWindow();

It is giving the error message saying could not create the workbench window. This error message is giving only when I make this plugin as AutoStart=true. What couldbe the problem?
Re: eclipse workebench plugin start problem [message #559325 is a reply to message #559218] Thu, 16 September 2010 11:56 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

What are you trying to do? When you create a plugin and add it to the
IDE. it will not be activated until something is requested from it.

Usually the extensions that plugin contributes (editors, views, wizards,
preferences, builders, commands/handlers/menuContributions, actions)
will determine when that plugin gets activated (since if the user
doesn't need its functionality, there's no point in activating it).

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: eclipse workebench plugin start problem [message #559849 is a reply to message #559325] Mon, 20 September 2010 05:28 Go to previous messageGo to next message
Bhanu  is currently offline Bhanu Friend
Messages: 15
Registered: August 2009
Junior Member
Ok. that I understood when the we require only the plugin will get activate. But What I am trying to do is, I am tryning to remove some default menu which eclipse provide. For that, when eclipse loads,
In the start() method of the activator I am writing the code for menu customization. But the start() method is not calling. So I made
Autostart=true in the runconfiguration,plug-ins,.
Now It is starting the activator, but when I call IWorkbenchWindow window = Workbench.getInstance().getActiveWorkbenchWindow();
it is throwing Workbench not created exception. But when I call
PlatformUI.getWorkbench.getActiveWorkbench(), I get Window is null.. so I assumed this problem because of Autostart=true


Re: eclipse workebench plugin start problem [message #629831 is a reply to message #559849] Wed, 29 September 2010 17:07 Go to previous message
Christophe Fondacci is currently offline Christophe FondacciFriend
Messages: 95
Registered: July 2009
Location: Paris
Member
Hello,

Not sure, but just a guess since the workbench is only accessible from the UI thread, does it change anything to execute your code within a :
Display.getDefault().asyncExec(new Runnable() {
   @Override
   public void run() {
      // Your code here
   }
});


Just in case...hope this could help.
Christophe.
http://www.nextep-softwares.com
Previous Topic:eclipse product export generating invalid eclipse.ini file(?)
Next Topic:Context menu for table viewer
Goto Forum:
  


Current Time: Fri Mar 29 08:45:41 GMT 2024

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

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

Back to the top