You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add table/field schema editor with DataGrid (#146)
## Summary
- Add FmTable/FmField model with full XML round-trip for schema editing
- Add DataGrid-based table editor with add/remove fields, type/kind
selection, and calculation editor modal
- Add typed New menu with Script (Ctrl+N) and Table (Ctrl+Shift+N)
creation
- Fix missing DataGrid theme StyleInclude and command CanExecute refresh
on selection change
Copy file name to clipboardExpand all lines: README.md
+54-19Lines changed: 54 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,42 +8,77 @@ Note: SharpFM and FileMaker must be running on the same computer. In order to sh
8
8
9
9
- Head over to [Releases](https://github.com/fuzzzerd/SharpFM/releases), grab the latest version (binaries for Windows, Mac, Linux are all available there).
10
10
11
-
### Clipping from FileMaker
11
+
### Importing Clips from FileMaker
12
12
13
13
- Open SharpFM.
14
14
- Switch over to FileMaker.
15
-
- Copy something to the clipboard.
15
+
- Copy something to the clipboard (scripts, tables, layouts, etc).
16
16
- Switch back to SharpFM.
17
-
- Use the Edit menu to "Paste from FileMaker Blob".
18
-
-See your object(s) in the clips list with the Xml editor on the side.
17
+
- Use **File > New > From Clipboard** (`Ctrl+V`) to import the clip.
18
+
-The clip appears in the left panel with the appropriate editor on the right.
19
19
20
-
### Clipping from SharpFM to FileMaker
20
+
### Exporting Clips to FileMaker
21
21
22
-
- Ensure you have a clip in SharpFM
23
-
- Select the clip in the list
24
-
- Use the Edit menu to "Copy As FileMaker Blob"
25
-
- Switch to FileMaker: based on the clip type, open Database manger, Script manager, layout mode, etc.
26
-
- Paste into FileMaker as you normally would.
22
+
- Select a clip in the left panel.
23
+
- Use **File > Save > Selected clip to Clipboard** (`Ctrl+Shift+C`).
24
+
- Switch to FileMaker and open the appropriate destination (Database Manager, Script Workspace, Layout mode, etc).
25
+
- Paste as you normally would.
27
26
28
-
### Saving / Sharing XML Clips
27
+
### Editing Scripts
29
28
30
-
This is an area we can improve, with interoperability with some other similar tools. More to come? Contributions welcome.
29
+
- Select a script clip or create one with **File > New > Script** (`Ctrl+N`).
30
+
- The script editor shows a plain-text representation of the script steps with FmScript syntax highlighting.
31
+
- Edit the script text directly; changes are synced back to the underlying XML.
31
32
32
-
SharpFM has the option to persist clips between sessions by using the File menu to "Save to Db".
33
+
### Editing Tables
33
34
34
-
- Save the XML for a given clip as a separate file (copy/paste to Notepad, Nano, email body, etc)
35
-
- Share the resulting XML file.
36
-
- Use the File menu to create a New clip.
37
-
- Select the appropriate clip type (Table, Script, Layout, etc)
38
-
- Paste the raw XML into the code editor.
35
+
- Select a table clip or create one with **File > New > Table** (`Ctrl+Shift+N`).
36
+
- The table editor shows a DataGrid with columns for Field Name, Type, Kind, Required, Unique, and Comment.
37
+
- Click **+ Add Field** to add a new field, then edit its properties inline.
38
+
- Select a field and click **Remove** or press `Delete` to remove it.
39
+
- Change a field's Kind to Calculated or Summary, then click **Edit Calculation...** to open the calculation editor.
40
+
41
+
### Viewing Raw XML
42
+
43
+
- Select any clip and use **View > Show XML** (`Ctrl+Shift+X`) to open the raw XML in a separate window.
44
+
- Edits made in the XML window are synced back to the clip when the window is closed.
45
+
46
+
### Saving and Sharing Clips
47
+
48
+
SharpFM persists clips between sessions as XML files in a local folder.
49
+
50
+
- Use **File > Save > Save All To Folder** (`Ctrl+S`) to save all clips.
51
+
- Use **File > Open Folder** to load clips from a different folder.
52
+
- The clip files are plain XML and can be shared via git, email, or any text-based tool.
39
53
40
54
## Features
41
55
42
56
-[x] Copy FileMaker Scripts, Tables, or Layouts From FileMaker Pro to their XML representation and back into FileMaker.
43
57
-[x] Store FileMaker Scripts, Tables, and Layouts to xml files that can be shared via git, email or other text based tools.
44
58
-[x] Edit raw FileMaker XML code (scripts, layouts, tables) with ability to paste changes back into FileMaker.
45
59
-[x] Use AvaloniaEdit for XML editing with XML syntax highlighting.
46
-
-[ ] Better UI tools to mutate the Raw XML.
60
+
-[x] Plain-text script editor with FmScript syntax highlighting.
61
+
-[x] DataGrid table/field editor with inline editing, calculation editor, and type/kind selection.
62
+
-[x] View and edit raw XML alongside structured editors.
63
+
64
+
## Plugins
65
+
66
+
SharpFM supports plugins via the `SharpFM.Plugin` contract library. Plugins implement `IPanelPlugin` and are loaded from the `plugins/` directory at startup. You can also install and manage plugins from the **View > Manage Plugins...** menu.
67
+
68
+
A sample "Clip Inspector" plugin is included to demonstrate the plugin API.
69
+
70
+
### Writing a Plugin
71
+
72
+
1. Create a new .NET 8 class library referencing `SharpFM.Plugin`.
73
+
2. Implement `IPanelPlugin` — provide an `Id`, `DisplayName`, and `CreatePanel()` returning an Avalonia `Control`.
74
+
3. Use `IPluginHost` in `Initialize()` to observe clip selection and push XML updates.
75
+
4. Build your DLL and drop it in the `plugins/` directory.
76
+
77
+
See `src/SharpFM.Plugin.Sample/` for a complete working example.
78
+
79
+
### License
80
+
81
+
While SharpFM is licensed under GPL v3, plugins that communicate solely through the interfaces in `SharpFM.Plugin` are not required to be GPL-licensed. See the plugin interface source files for the full exception clause.
0 commit comments