Skip to content

Commit

Permalink
Merge pull request #105 from rainers/master
Browse files Browse the repository at this point in the history
changes for Visual D 0.48.0
  • Loading branch information
rainers committed Dec 2, 2018
2 parents a744cc6 + 72662f1 commit 8ef5dd8
Show file tree
Hide file tree
Showing 8 changed files with 133 additions and 30 deletions.
8 changes: 6 additions & 2 deletions CHANGES
Expand Up @@ -1015,7 +1015,7 @@ unreleased Version 0.48.0
- removed option "additional linker options", it was invisible anyway
- rearrange settings to better show their scope
* build system
- fixed linking link privatephobos.lib if intermediate dir different from output dir
- fixed linking privatephobos.lib if intermediate dir different from output dir
* dparser
- semantic analysis did not work if "parse source for syntax errors" was disabled
- no semantic info for a package if any file in the package has fatal parser error
Expand All @@ -1025,6 +1025,10 @@ unreleased Version 0.48.0
- the last user specified version was prepended to "Windows"
- predefined versions now evaluated by compiler invocation
- experimental: option to enable semantic identifier highlighting
- 'virtual' no longer considered a keyword
- updated list of traits for completion
- fix crash with dub generated project
- add 'typeof' to completion where 'typeid' is valid, too
* mago
- added option to show base class fields as direct fields
- allow suffix 'h' for hex numbers for better interoperablility with VS disassembly
Expand All @@ -1045,7 +1049,7 @@ unreleased Version 0.48.0
* editor
- when pasting code to D source file newlines are adapted to surrounding code
- added outlining for case statements
- implemented commands View.PopBrowsContext and View.ForwardBrowseContext
- implemented commands View.PopBrowseContext and View.ForwardBrowseContext
- reindent if multiple lines added by completion
- tweaked formatting for enumerators, struct and array initializers
- added option to not indent case statements
Expand Down
4 changes: 2 additions & 2 deletions VERSION
@@ -1,5 +1,5 @@
#define VERSION_MAJOR 0
#define VERSION_MINOR 48
#define VERSION_REVISION 0
#define VERSION_BETA -rc
#define VERSION_BUILD 1
#define VERSION_BETA
#define VERSION_BUILD 0
16 changes: 8 additions & 8 deletions doc/StartPage.dd
Expand Up @@ -54,6 +54,14 @@ $(H2 News)
$(P $(LINK2 VersionHistory.html, Full version history and complete details...)
)

2018-12-02 Version 0.48.0
$(UL
$(LI installer and binaries now digitally signed by the "D Language Foundation")
$(LI dparser now has semantic support for static foreach (thanks to Alexander Bothe))
$(LI experimental: option to enable semantic identifier highlighting)
$(LI mago debugger: show return value, showing closure and capture variables as locals for dmd 2.084)
)

2018-06-24 Version 0.47.0
$(UL
$(LI improved vcxproj integration: better dependencies, automatic libraries, name demangling)
Expand All @@ -68,14 +76,6 @@ $(UL
$(LI support for new symbol mangling and parsing 'static foreach')
)

2017-08-17 Version 0.45.1
$(UL
$(LI now building against the VC runtime to avoid
anti-virus programs blocking the installation or execution)
$(LI improved tooltips)
$(LI mago: fix displaying long strings as empty)
)

$(LINK2 VersionHistory.html, more...)

$(H2 Download)
Expand Down
87 changes: 87 additions & 0 deletions doc/VersionHistory.dd
@@ -1,5 +1,92 @@
Ddoc

$(H2 2018-12-02 Version 0.48.0)
$(UL
$(LI installation
$(UL
$(LI installer and binaries now digitally signed by the "D Language Foundation")
$(LI fixed uninstallation for VS2017)
$(LI installation for VS2013+ now uses PackageManifest format instead of Vsix)
$(LI VS2017: loading the Visual D package could crash with some VS installation "ids"")
$(LI avoid initial error message regarding altered assemblies with same version)
$(LI fix installation of the D icon for the solution explorer in VS2017)
$(LI installer hides options for VS2005-VS2012 if not installed)
$(LI remove old extension folders before installation)
))
$(LI new project wizard
$(UL
$(LI restore project templates for VS2008, new project wizard doesn't work there')
$(LI mixed D/C++ VC project: optionally adding main in C++, setup precompiled headers)
$(LI new VCProject: now uses $(LatestTargetPlatformVersion) as WindowsTargetPlatformVersion to
avoid defaulting to Windows SDK 8.1)
))
$(LI settings
$(UL
$(LI fix default library path if UCRT has different version than SDK)
$(LI VS2017: D compiler installation paths and "demangle link errors" are now saved
to "HKCR\Softwre\Visual D" to be picked up by msbuild)
$(LI show detected compiler version below installation path)
$(LI removed option "parse source for syntax errors", now always on)
$(LI removed option "expansions from text buffer", now always off)
$(LI removed option "use semantic analysis for goto definition", now always on)
$(LI removed option "override linker settings from sc.ini", always on as linker no
longer set in sc.ini since dmd 2.079)
$(LI removed option "additional linker options", it was invisible anyway)
$(LI rearrange settings to better show their scope)
))
$(LI build system
$(UL
$(LI fixed linking privatephobos.lib if intermediate dir different from output dir)
))
$(LI dparser
$(UL
$(LI semantic analysis did not work if "parse source for syntax errors" was disabled)
$(LI no semantic info for a package if any file in the package has fatal parser error)
$(LI now has semantic support for static foreach (thanks to Alexander Bothe))
$(LI fixed "Find references")
$(LI added experimental option to show value of constants in tooltip)
$(LI the last user specified version was prepended to "Windows")
$(LI predefined versions now evaluated by compiler invocation)
$(LI experimental: option to enable semantic identifier highlighting)
$(LI 'virtual' no longer considered a keyword)
$(LI updated list of traits for completion)
$(LI fix crash with dub generated project)
$(LI add 'typeof' to completion where 'typeid' is valid, too)
))
$(LI mago
$(UL
$(LI added option to show base class fields as direct fields)
$(LI allow suffix 'h' for hex numbers for better interoperablility with VS disassembly)
$(LI concord: can now show return values of functions stepped over (not slices or delegates
on x64 or small non-POD-structs))
$(LI concord: fix crash when showing children in data tooltip (mostly occured in VS2017))
$(LI concord: allow dragging addresses to the disassembly window)
$(LI engine: Fix the way the debugger steps over instructions with REP prefix.)
$(LI engine: the disassemble view now supports SSE4 and AVX)
$(LI detect AA if type ends with "]", but not with "[]")
$(LI fix crash in VS if a value is marked expandable, but doesn't yield any children)
$(LI fix .ptr property of static array if it is a struct/class member)
$(LI add option to disable strings to be expandable)
$(LI support showing closure and capture variables as locals for dmd 2.084)
))
$(LI cv2pdb
$(UL
$(LI can now detect VS2017 via Setup-COM-API)
$(LI some DWARF fixes)
))
$(LI editor
$(UL
$(LI when pasting code to D source file newlines are adapted to surrounding code)
$(LI added outlining for case statements)
$(LI implemented commands View.PopBrowseContext and View.ForwardBrowseContext)
$(LI reindent if multiple lines added by completion)
$(LI tweaked formatting for enumerators, struct and array initializers)
$(LI added option to not indent case statements)
))
$(LI fixed "Compile and Run" on selection)
$(LI fix help via F1 for dmd 2.072+)
)

$(H2 2018-06-24 Version 0.47.0)
$(UL
$(LI build system
Expand Down
2 changes: 1 addition & 1 deletion doc/visuald.ddoc
@@ -1,4 +1,4 @@
VERSION = 0.47.0
VERSION = 0.48.0
ROOT_DIR = http://www.dlang.org/
ROOT = http://www.dlang.org
BODYCLASS = visuald
Expand Down
6 changes: 6 additions & 0 deletions visuald/colorizer.d
Expand Up @@ -76,7 +76,9 @@ enum TokenColor

Alias,
Module,
Function,
Method,
BasicType,

Version,

Expand Down Expand Up @@ -835,7 +837,9 @@ class Colorizer : DisposingComObject, IVsColorizer, ConfigModifiedListener
case TokenColor.Variable: return TokenColor.DisabledIdentifier;
case TokenColor.Alias: return TokenColor.DisabledIdentifier;
case TokenColor.Module: return TokenColor.DisabledIdentifier;
case TokenColor.Function: return TokenColor.DisabledIdentifier;
case TokenColor.Method: return TokenColor.DisabledIdentifier;
case TokenColor.BasicType: return TokenColor.DisabledIdentifier;
default: break;
}
return type;
Expand Down Expand Up @@ -874,7 +878,9 @@ class Colorizer : DisposingComObject, IVsColorizer, ConfigModifiedListener
case TokenColor.Variable: return TokenColor.StringIdentifier;
case TokenColor.Alias: return TokenColor.StringIdentifier;
case TokenColor.Module: return TokenColor.StringIdentifier;
case TokenColor.Function: return TokenColor.StringIdentifier;
case TokenColor.Method: return TokenColor.StringIdentifier;
case TokenColor.BasicType: return TokenColor.StringIdentifier;
default: break;
}
return type;
Expand Down
38 changes: 22 additions & 16 deletions visuald/dlangsvc.d
Expand Up @@ -384,7 +384,7 @@ class LanguageService : DisposingComObject,
newCom!ColorableItem("Number", CI_USERTEXT_FG, CI_USERTEXT_BK),
newCom!ColorableItem("Text", CI_USERTEXT_FG, CI_USERTEXT_BK),

// Visual D specific (must match Lexer.TokenColor)
// Visual D specific (must match visuald.colorizer.TokenColor)
newCom!ColorableItem("Visual D Operator", CI_USERTEXT_FG, CI_USERTEXT_BK),
newCom!ColorableItem("Visual D Register", -1, CI_USERTEXT_BK, RGB(128, 0, 128)),
newCom!ColorableItem("Visual D Mnemonic", CI_AQUAMARINE, CI_USERTEXT_BK),
Expand All @@ -396,20 +396,23 @@ class LanguageService : DisposingComObject,
newCom!ColorableItem("Visual D Identifier Class", -1, CI_USERTEXT_BK, RGB(32, 192, 192)),
newCom!ColorableItem("Visual D Identifier Struct", -1, CI_USERTEXT_BK, RGB(0, 192, 128)),
newCom!ColorableItem("Visual D Identifier Union", -1, CI_USERTEXT_BK, RGB(0, 160, 128)),
newCom!ColorableItem("Visual D Identifier Template Type Parameter", -1, CI_USERTEXT_BK, RGB(64, 0, 160)),
newCom!ColorableItem("Visual D Identifier Alias", -1, CI_USERTEXT_BK, RGB(0, 128, 128)),
newCom!ColorableItem("Visual D Identifier Module", -1, CI_USERTEXT_BK, RGB(64, 64, 160)),
newCom!ColorableItem("Visual D Identifier Method", -1, CI_USERTEXT_BK, RGB(96, 64, 160)),
newCom!ColorableItem("Visual D Identifier Template Type Parameter", -1, CI_USERTEXT_BK, RGB(64, 0, 160)),

newCom!ColorableItem("Visual D Identifier Constant", -1, CI_USERTEXT_BK, RGB(128, 0, 128)),
newCom!ColorableItem("Visual D Identifier Local Variable", -1, CI_USERTEXT_BK, RGB(128, 16, 128)),
newCom!ColorableItem("Visual D Identifier Parameter", -1, CI_USERTEXT_BK, RGB(128, 32, 128)),
newCom!ColorableItem("Visual D Identifier Thread Global", -1, CI_USERTEXT_BK, RGB(128, 48, 128)),
newCom!ColorableItem("Visual D Identifier Thread Local", -1, CI_USERTEXT_BK, RGB(128, 48, 128)),
newCom!ColorableItem("Visual D Identifier Shared Global", -1, CI_USERTEXT_BK, RGB(128, 64, 128)),
newCom!ColorableItem("Visual D Identifier __gshared", -1, CI_USERTEXT_BK, RGB(128, 80, 128)),
newCom!ColorableItem("Visual D Identifier Field", -1, CI_USERTEXT_BK, RGB(128, 96, 128)),
newCom!ColorableItem("Visual D Identifier Variable", -1, CI_USERTEXT_BK, RGB(128, 128, 128)),

newCom!ColorableItem("Visual D Identifier Alias", -1, CI_USERTEXT_BK, RGB(0, 128, 128)),
newCom!ColorableItem("Visual D Identifier Module", -1, CI_USERTEXT_BK, RGB(64, 64, 160)),
newCom!ColorableItem("Visual D Identifier Function", -1, CI_USERTEXT_BK, RGB(128, 96, 160)),
newCom!ColorableItem("Visual D Identifier Method", -1, CI_USERTEXT_BK, RGB(128, 96, 160)),
newCom!ColorableItem("Visual D Identifier Basic Type", -1, CI_USERTEXT_BK, RGB(0, 192, 128)),

newCom!ColorableItem("Visual D Predefined Version", -1, CI_USERTEXT_BK, RGB(160, 0, 0)),

newCom!ColorableItem("Visual D Disabled Keyword", -1, CI_USERTEXT_BK, RGB(128, 160, 224)),
Expand Down Expand Up @@ -452,18 +455,20 @@ class LanguageService : DisposingComObject,
bool dark = Package.GetGlobalOptions().isDarkTheme();
foreach(ci; colorableItems)
{
if(ci.GetDisplayName() == "Visual D Type")
if(ci.GetDisplayName() == "Visual D User Defined Type")
ci.SetDefaultForegroundColor(dark ? RGB(128, 128, 160) : RGB(0, 0, 160));
if(ci.GetDisplayName() == "Visual D Register")
ci.SetDefaultForegroundColor(dark ? RGB(128, 64, 128) : RGB(128, 0, 128));
ci.SetDefaultForegroundColor(dark ? RGB(128, 64, 128) : RGB(128, 0, 128));
if(ci.GetDisplayName() == "Visual D Token String Identifier")
ci.SetDefaultForegroundColor(dark ? RGB(128, 64, 64) : RGB(128,32,32));
ci.SetDefaultForegroundColor(dark ? RGB(128, 64, 64) : RGB(128, 32, 32));
if(ci.GetDisplayName() == "Visual D Token String Number")
ci.SetDefaultForegroundColor(dark ? RGB(128, 64, 64) : RGB(128,32,32));
ci.SetDefaultForegroundColor(dark ? RGB(128, 64, 64) : RGB(128, 32, 32));
if(ci.GetDisplayName() == "Visual D Token String Operator")
ci.SetDefaultForegroundColor(dark ? RGB(128, 64, 64) : RGB(128,32,32));
ci.SetDefaultForegroundColor(dark ? RGB(128, 64, 64) : RGB(128, 32, 32));
if(ci.GetDisplayName() == "Visual D Token String Type")
ci.SetDefaultForegroundColor(dark ? RGB(160, 128, 160) : RGB(112, 0, 80));
if(ci.GetDisplayName() == "Visual D Identifier Template Type Parameter")
ci.SetDefaultForegroundColor(dark ? RGB(96, 64, 192) : RGB(64, 0, 160));
}

version(none)
Expand Down Expand Up @@ -3199,7 +3204,7 @@ else
{
string nl = GetLineBreakText(mBuffer, ln);
if (nl != refnl)
{
{
wstring text = GetText(ln, 0, ln + 1, 0);
if (text.endsWith(nl))
{
Expand All @@ -3208,9 +3213,9 @@ else
rc = mBuffer.ReplaceLines(ln, 0, ln + 1, 0, text.ptr, text.length, &changedSpan);
}
}
}
}
return rc;
}
}
return rc;
}

////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -4228,8 +4233,9 @@ else
case TypeReferenceKind.Variable: return TokenColor.Variable;
case TypeReferenceKind.Alias: return TokenColor.Alias;
case TypeReferenceKind.Module: return TokenColor.Module;
case TypeReferenceKind.Function: return TokenColor.Function;
case TypeReferenceKind.Method: return TokenColor.Method;
case TypeReferenceKind.BasicType: return TokenColor.UserType;
case TypeReferenceKind.BasicType: return TokenColor.BasicType;
default: return TokenColor.Identifier;
}
}
Expand Down

0 comments on commit 8ef5dd8

Please sign in to comment.