Bug 11357 - ProjectSolutionPad not accessible anymore.
Summary: ProjectSolutionPad not accessible anymore.
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 4.0.3
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2013-03-22 15:14 UTC by Alexander Jochum
Modified: 2013-03-23 11:24 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Alexander Jochum 2013-03-22 15:14:48 UTC
I used ProjectSolutionPad in my addin to get informations about the current selected projects/files and in MonoDevelop 3.x this wasn't a problem, even if I build my addin with references to an old MonoDevelop.Ide.dll file of MD 3.x I can access the ProjectSolutionPad without a problem.

My problem now is that if I set the references of my addin to a MonoDevelop.Ide.dll file of MD 4.x I can't compile my project as ProjectSolutionPad is missing at least it isn't public anymore (in MD 4.x source code it's still available).
Was it accidently made private?

At the moment I can use the following lines to get the TreeViewPad instead of ProjectSolutionPad which seems to work for my right now:

Pad temporaryPad = IdeApp.Workbench.GetPad<TreeViewPad>();

instead of

Pad temporaryPad = IdeApp.Workbench.GetPad<ProjectSolutionPad>();
Comment 1 Mikayla Hutchinson [MSFT] 2013-03-23 01:40:04 UTC
It seems it was made internal, I'm not sure why.
https://github.com/mono/monodevelop/commit/06c63532a764259c32f710b33f92353b3d06f64a

That said, you probably should use IdeApp.ProjectOperations.CurrentSelectedProject instead of accessing the pad directly.
Comment 2 Lluis Sanchez 2013-03-23 08:11:51 UTC
GetPad will be made private as it is too. As Michael said, you should use IdeApp.ProjectOperations.CurrentSelectedProject to get the current project. If you want to directly access the tree elements, use a NodeExtension.
Comment 3 Alexander Jochum 2013-03-23 11:24:32 UTC
I see, then I'll change my code as you suggested.