nkb03 / hextant Goto Github PK
View Code? Open in Web Editor NEWAn AST-Editor
An AST-Editor
Current behavior:
How do I build and run the project?
Hextant should be able to automatically find plugins in the classpath.
An application has dependencies on required plugins.
Additional plugins can be added by the user by putting them into the classpath.
It should be visible for the user when some expander is not expanded.
The core should handle all exceptions occurring in pluggable parts.
Expander.expand
ListEditor
.createEditorTokenEditor.compile
result
)ValidatedTokenEditor
instead of FilteredTokenEditor
ExpanderControl
instead of FXExpanderView
TokenEditorControl
instead of FXTokenEditorView
and merge abstract classHextant design is currently pretty dark and ugly ):
To make it better follow these steps:
hextant-core\src\main\resources\hextant\core\style.css
If any questions or errors occur during your work contact me ([email protected]).
EditorControl
CompileResult
API may be used without Hextant it should probably be put in its own moduleResult
CompileResult
with the Reactive
-APICurrently moving forward is working seamlessly on list editors but moving back is sometimes not possible.
config
Bundle, which is written to files when saved@ViewConfig
) and all properties with this annotation are written to files when saved.jar
-files to a certain directory which is recursively included in the classpathMANIFEST.MF
WebView
SettingsEditor
or in a separate PluginsEditor
-> Probably we need a separate editor
Files and directory can be copied and pasted since #13, but it would be more intuitive to move project items with a drag and drop gesture.
When the user presses ESC
the focused dialog should be closed and the parent scene must be focused.
Any
as default permissionsReactiveProperty
class for reactive propertiesHextantPlatform
For example:
rename <project> <new_name>
: renames a projectdelete <project>
: deletes a project from the diskquit
: quits the launcherCurrently, copy/paste is only supported on expanders.
There are scenarios, where no expanders are involved but the user still wants copy/paste functionality available. For example in the project explorer the user may want to paste a project item, but he might not have an expander available. Therefore the following changes are proposed:
Editor
gets a new method paste(editor: Editor<*>)
, which can be overridden by implementing classesTokenEditor
, CompoundEditor
and ListEditor
Ctrl + V
on an editor view, the clipboard is looked up, and the paste
method of the target editor is invokedListEditor
gets a method paste(index: Int)
, which looks up the clipboard, copies it and then puts the new editor into the specified indexListEditorControl
gets two new shortcuts for pasting before/after the selected item (Ctrl + V
and Ctrl + Shift + V
)copyForImpl()/supportsCopy()
are removed and implemented as extensions, that create a new instance of the editor with the specified context and then call paste
Completions should be able to communicate with TokenEditors and Expanders in a non-textual way.
completion: Any?
to method expand(text: String)
and compile(text: String)
null
is suppliedcomplete(completion: Completion<*>)
that delegates to expand
and compile
completion
-argument into consideration when overriding expand
or compile
ExpanderConfig
s could have a typesafe interceptor registerInterceptor<reified T: Any>(factory: (T) -> E)
See #45
constructor(Context, Result)
is available, use constructor(Context) and setResult
setResult
in generated editorsProblem 1: Too many threads needed with the current solution
Problem 2: Sometimes it doesn't even work
Some editors always produce a valid result. It should, therefore, be possible to implement editors whose result
property is of type T
and not of type Validated<T>
. There are two possible solutions:
Create function defaultResult(): Validated<R>
in Expander
that can be overridden by subclasses to achieve that the result
is always Valid
. Plugins can then call force()
on results when they know that the result is always Valid
.
force()
calls.Change the type of result
to R
instead of Validated<R>
. Editors that may have an invalid result can just pass Validated<R>
as the type parameter.
There are however some problems with this solution.
Validated<T>
.
KType
instead of KClass
for registering editor factoriestypeOf
function that can be used to get the KType
instead of the KClass
from a reified genericEditorView
factories?CommandLine
, the SettingsEditor
and the argumentPrompt
know if the result of an editor is valid?
isValid: ReactiveBoolean
to interface Editor
P
and then for an editor of type Validated<P>
ListEditor
doesn't know if its child results can be invalid.
accumulateResults
that is implemented by subclasses ValidatedListEditor
and SimpleListEditor
SyntaxErrorInspection
only works for Editors with validated results
KType
instead of KClass
for registering inspections and commandsOn top of the current Kotlin DSL based shortcut API, there should be string based DSL for shortcuts, which should support the following features:
shortcut
extension function for String
, which parses a shortcut description string
"A"
.shortcut => shortcut(KeyCode.A)
"Ctrl+A".shortcut
=> shortcut(KeyCode.A) { control(DOWN) }
"Ctrl?+A".shortcut
=> shortcut(KeyCode.A) { control(MAYBE) }
ShortcutRegistrar.on
should also be able to take a shortcut description string as parameter.
on("Ctrl+B") { doSomething() }
repeat
Until now, the @Compound
annotation from the hextant-codegen
module only works on data classes, implicitly using the primary constructor.
In principle, there would be nothing preventing it from being used on general top-level functions.
The behavior on data classes should stay the same meanwhile.
When executing commands, it is typically expected that undoing will undo the whole command. This is currently not the case. Instead the user has to undo all the steps done by the command. To solve this, the methods UndoManager.startCompoundEdit()
and UndoManager.finishCompoundEdit()
are needed. Every Edit
s recorded between those two method calls are merged into a single CompoundEdit
which is registered after calling finishCompoundEdit()
.
Editor.createSnapshot(): Any
creates a new snapshotTokenEditor
, Expander
and CompoundEditor
A
has an errorB
has a warningA
is a (possibly indirect) parent of B
A
should be marked in redB
inside of A
is marked in yellowAt the moment the plugin server has to be available when creating or opening projects.
This should not be required.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.