Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Conversation

@mkrueger
Copy link
Contributor

@mkrueger mkrueger commented Sep 3, 2018

vb.net by Visual Studio Community 2017 for Mac

https://devdiv.visualstudio.com/DevDiv/_workitems/edit/668301

Basically using the former roslyn classification highlighting (latest
version). However the vb.net loading gets implemented in our workspace
system so the old hack could go away.
Switching to tag based highlighting should work when the
editorfeatures.vbnet dll can be added to our mef composition. But for
now that re-enables vb.net coloring.

@mkrueger mkrueger requested review from a team and DavidKarlas September 3, 2018 13:38

public static bool IsCompileableFile (MonoDevelop.Projects.Project p, ProjectFile file, out Microsoft.CodeAnalysis.SourceCodeKind sck)
{
var ext = file.FilePath.Extension;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this into the if below?

base.Dispose ();
workspace.CloseDocument (documentId);
DocumentContext.AnalysisDocumentChanged += delegate {
Editor.SyntaxHighlighting = new RoslynClassificationHighlighting (
Copy link
Contributor

@Therzok Therzok Sep 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we recreate the highlighting every time we parse a document?

@Therzok
Copy link
Contributor

Therzok commented Sep 3, 2018

Also fixes #4036

@DavidKarlas
Copy link
Contributor

Alternative fix: #5840

@mkrueger
Copy link
Contributor Author

mkrueger commented Sep 4, 2018

Merged #5840 - I assumed that VisualBasic.EditorFeatures isn't working - didn't the c# variant needed some patches. Anyways both PRs fit together - I removed the hacky work around with the custom workspaces here and we get tag based highlighting from #5840.

public static bool IsCompileableFile (ProjectFile file, out Microsoft.CodeAnalysis.SourceCodeKind sck)
=> IsCompileableFile (null, file, out sck);

public static bool IsCompileableFile (MonoDevelop.Projects.Project p, ProjectFile file, out Microsoft.CodeAnalysis.SourceCodeKind sck)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already an IsCompileable method in the Project class. SourceCodeKind could just be a property of ProjectFile.

mkrueger and others added 3 commits September 12, 2018 12:25
vb.net by Visual Studio Community 2017 for Mac

https://devdiv.visualstudio.com/DevDiv/_workitems/edit/668301

Basically using the former roslyn classification highlighting (latest
version). However the vb.net loading gets implemented in our workspace
system so the old hack could go away.
Switching to tag based highlighting should work when the
editorfeatures.vbnet dll can be added to our mef composition. But for
now that re-enables vb.net coloring.
=> IsCompileableFile (null, file, out sck);

[Obsolete ("Use p.IsCompileable")]
public static bool IsCompileableFile (MonoDevelop.Projects.Project p, ProjectFile file, out Microsoft.CodeAnalysis.SourceCodeKind sck)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't add a new obsolete method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ? it is obsolete now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no point in adding a new obsolete method because nobody is going to use it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sry misread - the 'add obsolete' method :) - y there is no point in it - true.

@mkrueger mkrueger merged commit 040f3b2 into master Sep 12, 2018
@mkrueger mkrueger deleted the master-vsts668301 branch September 12, 2018 11:53
Project.NotifyFilePropertyChangedInProject (this, property);
}

public virtual SourceCodeKind SourceCodeKind {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't make this method virtual.

@slluis
Copy link
Member

slluis commented Sep 18, 2018

@monojenkins backport release-7.6

@monojenkins
Copy link
Contributor

@slluis backporting to release-7.6 failed, the patch results in conflicts:

Applying: Fixes VSTS Bug 668301: [Feedback] Unable to change font colors for vb.net by Visual Studio Community 2017 for Mac
Using index info to reconstruct a base tree...
M	main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CSharpProjectExtension.cs
M	main/src/addins/VBNetBinding/Project/VBProjectExtension.cs
M	main/src/addins/VBNetBinding/VBNetBinding.csproj
M	main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs
A	main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.ProjectSystemHandler.cs
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.ProjectSystemHandler.cs deleted in 235b7c81e577017aa28e8fb3e751557170efea7c and modified in Fixes VSTS Bug 668301: [Feedback] Unable to change font colors for vb.net by Visual Studio Community 2017 for Mac. Version Fixes VSTS Bug 668301: [Feedback] Unable to change font colors for vb.net by Visual Studio Community 2017 for Mac of main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.ProjectSystemHandler.cs left in tree.
Auto-merging main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs
Auto-merging main/src/addins/VBNetBinding/VBNetBinding.csproj
Auto-merging main/src/addins/VBNetBinding/Project/VBProjectExtension.cs
Auto-merging main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CSharpProjectExtension.cs
error: Failed to merge in the changes.
Patch failed at 0001 Fixes VSTS Bug 668301: [Feedback] Unable to change font colors for vb.net by Visual Studio Community 2017 for Mac

Please backport manually!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants