avalonia.ide's People
Forkers
evgenvs danwalmsley denismaster jangocheng vitalelement donandren rogalmic blinds52 grokys elvin-zhang shadowdancer rabidus4k workgroupengineering aboimpinto wieslawsoltes uamhforever waodng lextmavalonia.ide's Issues
End tag is incorrectly changed when adding property
<Grid>
<$
</Grid>
Assume $ is cursor. User types "Grid.ColumnDefinitions".
Expected result:
<Grid>
<Grid.ColumnDefinitions
</Grid>
Actual result:
<Grid>
<Grid.ColumnDefinitions
</Grid.ColumnDefinitions>
This happens because "RenameEndTag" text manipulation matches <Grid.> with end tag, and it does not know, that user is typing Grid property and he will close that tag in future. I see 2 potential ways to solve this:
- When renaming tags, do not add
.
It will work, but may cut some useful features (ie. may rename tag partially, when user wants to add . - renaming Grid.ColumnDefinitions to Grid.RowDefinitions etc.) - Give more context for xml analyzer, so it knows that tags won't match, like this:
<Grid> <!-- depth 0 -->
<$ <!-- depth 1 -->
</Grid> <!-- depth 0 -->
Unify metadata for completion engine and xamlx
Atm XamlX reads metadata from reflection or cecil, and completion engine reads metadata from dnlib.
I think it would be reasonable to create shared metadata model for Xamlx and Completion engine, to reuse metadata for both validating xaml and completing. Also it would add third xaml type system, currently there are 2:
- reading form current appdomain
- reading from source files
and the proposed one:
3. reading from compiled assemblies
pngcs doesn't exist
The dependency pngcs leads to a 404 on github.
Metadata overlapped
Cosidering this wpf code:
we have three assemblies with the same class definition but different behavior
Ass1
namespace MyName
{
public static readonly DependencyProperty IsBubbleSourceProperty = DependencyProperty.RegisterAttached(
"IsBubbleSource",
typeof(Boolean),
typeof(AquariumObject),
new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender)
);
public static void SetIsBubbleSource(UIElement element, Boolean value)
{
element.SetValue(IsBubbleSourceProperty, value);
}
public static Boolean GetIsBubbleSource(UIElement element)
{
return (Boolean)element.GetValue(IsBubbleSourceProperty);
}
}
Ass2
namespace MyName
{
public static readonly DependencyProperty IsBubbleSourceProperty = DependencyProperty.RegisterAttached(
"IsBubbleSource",
typeof(Boolean),
typeof(AquariumObject),
new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender)
);
public static void SetIsBubbleSource(UIElement element, Boolean value)
{
element.SetValue(IsBubbleSourceProperty, value);
}
public static Boolean GetIsBubbleSource(UIElement element)
{
return (Boolean)element.GetValue(IsBubbleSourceProperty);
}
}
Ass3
namespace MyName
{
public static readonly DependencyProperty IsBubbleSourceProperty = DependencyProperty.RegisterAttached(
"IsBubbleSource",
typeof(Boolean),
typeof(AquariumObject),
new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender)
);
public static void SetIsBubbleSource(UIElement element, Boolean value)
{
element.SetValue(IsBubbleSourceProperty, value);
}
public static Boolean GetIsBubbleSource(UIElement element)
{
return (Boolean)element.GetValue(IsBubbleSourceProperty);
}
}
and using like this:
<Usercontrol
....
xmlns:n1="clr-namespace:MyName;assembly=Ass1"
xmlns:n2="clr-namespace:MyName;assembly=Ass2"
xmlns:n3="clr-namespace:MyName;assembly=Ass3">
</Usercontrol>
in Avalonia.Ide it is not valid because the metadata key is FullName, and having three classes with the same FullName they are overlapped.
Support partial metadata updates and invalidation
Currently metadata is singular "package", which is computed for dll and used by text completion engine.
This is not suitable for use in case extension is analysing source files at runtme. There should some notion of metadata "containers", which can be plugged or invalidated, and would provide similar interface to completionEngine as current implementation.
Build AST for XAML documents
Using language server protocol opens room for implementation of additional language features. However to do so probably AST of Xaml docuement is required. Here are few challenges - documents are updated incrementally, and they may not be valid xaml when user is typing.
I wonder if there is room for reusing xaml compiler, or maybe third party library like https://github.com/KirillOsenkov/XmlParser to grasp this requirement.
Especially linked lib looks promising, as it supports incremental updates of buffer, but I do not know how resilient it is to typing in editor.
Compilation error in XmlParser.cs
The new implementation of the Clone() method has a typo of a duplicate equals sign that prevents Avalon Studio from compiling.
var clonedStack = = new Stack<int>(new Stack<int>(_containingTagStart));
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.