[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-dev] Curious about the make target
|
Hello,
Trying to add new make target to the "Make Target" view part, and refresh
the MakeView view, I wrote the following lines:
/*
* Add it
*/
MakeUtil.removePersistentTarget(getCProject().getProject(),"MyNewTarget");
// Remove in case it already exists
MakeUtil.addPersistentTarget(getCProject().getProject(),"MyNewTarget"); //
Add it
/*
* Refresh the MakeView
*/
IWorkbenchPage
page=CUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getAct
ivePage();
IViewPart makeView=page.findView("org.eclipse.cdt.ui.MakeView");
if((makeView!=null)&&(makeView instanceof MakeView))
{
MakeView v=(MakeView)makeView;
v.viewer.refresh(); // Which works only if the tree viewer
of the MakeView is public (which is not).
}
Any better way to do this ?
If not, wouldn't it be an idea to provide a public method in the MakeView
allowing to create/remove target (refreshing the view), or simply to set the
TreeViewer with a public access ?
Thanks in advance
Martin