monodevelop icon indicating copy to clipboard operation
monodevelop copied to clipboard

[Addin] To allow CBinding to use "Project" property

Open gitexperience opened this issue 7 years ago • 16 comments

CMakeProject being derived from SolutionItem is unable to access the "Project" property. The PR is intended to test the changes needed to make the "Project" property available to the CBinding's CMakeProject.

gitexperience avatar Aug 05 '17 21:08 gitexperience

Hello! I'm the build bot for the Mono project.

I need approval from a Mono team member to build this pull request. A team member should reply with "approve" to approve a build of this pull request, "whitelist" to whitelist this and all future pull requests from this contributor, or "build" to explicitly request a build, even if one has already been done. Additional trigger words are available here.

Contributors can ignore this message.

monojenkins avatar Aug 05 '17 21:08 monojenkins

It looks good overall!

slluis avatar Aug 08 '17 08:08 slluis

build

mhutch avatar Aug 21 '17 21:08 mhutch

@slluis - do you think it would make sense to use WorkspaceObject instead of SolutionItem for the type of Owner?

mhutch avatar Aug 21 '17 22:08 mhutch

@mhutch I think SolutionItem is ok.

slluis avatar Aug 22 '17 09:08 slluis

@slluis I was just wondering about things like items in solution folders. It would be painful to have to change the type of "Owner" later.

mhutch avatar Aug 22 '17 14:08 mhutch

@mhutch there isn't much functionality we can use at this abstraction level, it could as well be an Object. In any case solution folder items is a real use case, so I'm ok with using WorkspaceObject.

slluis avatar Aug 23 '17 07:08 slluis

@gitexperience could you change SolutionItem to WorkspaceObject per above comment?

There may be some things that will not work because they access members that are not present on WorkspaceObject, but those can conditionally cast to the derived types that do have this functionality.

var policies = Owner?.Policies;

could become

var policies = (Owner as IPolicyProvider)?.Policies;

and

if (window.ViewContent.Owner != null)
    window.ViewContent.Owner.Modified += HandleProjectModified;

could become

if (window.ViewContent.Owner is SolutionFolderItem solutionItem)
    solutionItem.Modified += HandleProjectModified;
else if (window.ViewContent.Owner is WorkspaceItem workspaceItem)
    workspaceItem.Modified += HandleWorkspaceItemModified;

mhutch avatar Aug 23 '17 21:08 mhutch

@gitexperience also, please rebase onto master

mhutch avatar Aug 23 '17 21:08 mhutch

Can you please rebase this onto master? The changes tab shows a lot of changes from master that appear to have been somehow cherry-picked.

mhutch avatar Sep 05 '17 03:09 mhutch

@mhutch, rebasing done! Can you please review the changes ?

gitexperience avatar Sep 12 '17 20:09 gitexperience

@mhutch , Done!

gitexperience avatar Sep 15 '17 21:09 gitexperience

Looks good! @slluis?

mhutch avatar Sep 18 '17 21:09 mhutch

@slluis @mhutch do we need more changes in this PR ? I just rebased it again because of some merge conflicts.

gitexperience avatar Sep 28 '17 07:09 gitexperience

It looks good to me but I'd like @slluis to take a look too

mhutch avatar Sep 28 '17 21:09 mhutch

@slluis do we need more changes in this PR ?

gitexperience avatar Dec 29 '17 19:12 gitexperience