[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
] [
Newsgroup Home
]
[news.eclipse.platform.rcp] Re: Launch Command at startup
From
:
roel.denijs@xxxxxx
(Roel De Nijs)
Date
: Wed, 16 Jul 2008 14:39:46 +0000 (UTC)
Newsgroups
:
eclipse.platform.rcp
Organization
: Eclipse
User-agent
: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
In addition to previous post:
i created my perspective listener as follows:
private IPerspectiveListener perspectiveListener = new PerspectiveAdapter() {
@Override
public void perspectiveActivated(IWorkbenchPage page,
IPerspectiveDescriptor perspective) {
if (ApplicationConstants.ID_PERSPECTIVE_DEMO
.equals(perspective.getId())) {
// open navigation view
IHandlerService handlerService = (IHandlerService) window
.getService(IHandlerService.class);
try {
handlerService.executeCommand(
my_command_id, null);
} catch (Exception e) {
ApplicationUtil.handleException(e);
}
}
}
};
in the execute-method of the defaulthandler of the command i have following line of code
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
the first time the perspectiveActivated gets called i get an execution exception "No activeWorkbenchWindow found while executing my_command_id". the second call to perspectiveActivated no exception is thrown and code is executed as expected
Follow-Ups
:
[news.eclipse.platform.rcp] Re: Launch Command at startup
From:
Roel De Nijs
References
:
[news.eclipse.platform.rcp] Launch Command at startup
From:
Roel De Nijs
[news.eclipse.platform.rcp] Re: Launch Command at startup
From:
Bianca
[news.eclipse.platform.rcp] Re: Launch Command at startup
From:
Roel De Nijs
[news.eclipse.platform.rcp] Re: Launch Command at startup
From:
Bianca
[news.eclipse.platform.rcp] Re: Launch Command at startup
From:
Roel De Nijs
Prev by Date:
[news.eclipse.platform.rcp] Re: buddy class Loading
Next by Date:
[news.eclipse.platform.rcp] Re: opening editor from common navigator framework
Previous by thread:
[news.eclipse.platform.rcp] Re: Launch Command at startup
Next by thread:
[news.eclipse.platform.rcp] Re: Launch Command at startup
Index(es):
Date
Thread