Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Telling My view to refresh after a build and get also the markers
Telling My view to refresh after a build and get also the markers [message #661207] Wed, 23 March 2011 15:17 Go to next message
Giulio is currently offline GiulioFriend
Messages: 11
Registered: February 2011
Junior Member

Hi All,

I have created a plugin with my view and my builder.

My builder correctly kicks in when a resource changes in the workspace, generating markers and all that stuff, the "project explorer" view correctly refreshes showing the files and the markers.

I would like to get my view to do the same.

Would you know what do I need to do to obtain that?

Thanks in advance for your help,

Giulio
Re: Telling My view to refresh after a build and get also the markers [message #661333 is a reply to message #661207] Thu, 24 March 2011 10:03 Go to previous message
Giulio is currently offline GiulioFriend
Messages: 11
Registered: February 2011
Junior Member

Hi Again,

I think the way to go will be to just notify my view when the build completes.

the problem now becomes obtaining the view object. Out of my book I found this snippet:
Quote:
testView = (FavoritesView)
PlatformUI
.getWorkbench()
.getActiveWorkbenchWindow()
.getActivePage()
.showView(VIEW_ID);



which I exploded to (for simplicity of debugging) :

Quote:
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow activeWorkbenchWindow = workbench
.getActiveWorkbenchWindow();

if (activeWorkbenchWindow == null) {
String cause = Display.getCurrent() == null ? "could not retrieve the display"
: "Don't know";
throw new NullPointerException(
"Could not retrieve the workbench, Cause was: " + cause);
}
IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
TestCasesView result = (TestCasesView) activePage
.showView(TestCasesView.ID);


the result is that I always get the nullPointerException, saying that the workbench could not be retrieved because the display could not be retrieved. (that's a reason why the active workbenchpage may be returned null by the getActiveWorkbenchWindow method.

Any clue on how that works?

Wandering around for solutions I found the Common Navigator Framework (CNF) but I couldn't understand if that would solve my problem of refreshing after the build. Could someone shed some light please?


thanks,
Giulio
Previous Topic:change/add item images for exclusive menu item from editor
Next Topic:StyledText contents
Goto Forum:
  


Current Time: Sun Dec 21 10:07:17 GMT 2014

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

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