This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: Thomas Klok Rohde | |
Description: Catch situations where no model is selected, and prompt user to select a model (if more than 1 model is loaded) | |
History: | |
April 9, 2023 : Created | |
*/ | |
window.promptSelection = function (title, choices) { | |
let ElementListSelectionDialog = Java.extend(Java.type('org.eclipse.ui.dialogs.ElementListSelectionDialog')); | |
let LabelProvider = Java.type('org.eclipse.jface.viewers.LabelProvider'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: Thomas Klok Rohde | |
Description: Select all elements in the model browser that includes the search term (case insensitive) | |
History: | |
March 30, 2023 : Created | |
*/ | |
const eclipseShell = Java.type('org.eclipse.swt.widgets.Shell'); | |
const TreeItem = Java.type('org.eclipse.swt.widgets.TreeItem'); | |
const Tree = Java.type('org.eclipse.swt.widgets.Tree'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// *** WARNING *** | |
// On the surface, this seems to work OK, but it does not work with the Archi undo/redo mechanism, | |
// and there is a risk of corrupting the model Also, changes might disappear if you run another script while the browser is open | |
/* | |
Author: Thomas Klok Rohde | |
Description: | |
Proof-of-concept for interacting with a browser. Enter a regular expression in the search bar, | |
and edit any of listed documentation fields. Press 'Refresh' to update the model. | |
History: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: Thomas Klok Rohde | |
Description: | |
Explore the entire model | |
Dependencies: | |
- Vis Network: https://github.com/visjs/vis-network. | |
- Bootstrap CSS | |
- A modern webbrowser with support for the DIALOG element | |
History: | |
November 27, 2022 : Created |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: Thomas Klok Rohde | |
Description: | |
Insert labels on the current view, or delete labels if no property is selected | |
If a view is selected all elements will be labeled, or if an element is selected, | |
all view elements with the same type will be labelled. | |
Dependencies: | |
Thanks to Adam Ernst Bisek: https://github.com/adambisek/string-pixel-width | |
History: | |
November 16, 2022 : Created |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: Thomas Klok Rohde | |
Description: Edit documentation markdown | |
History: | |
November 12, 2022: Created. | |
*/ | |
console.show(); | |
console.clear(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: Thomas Klok Rohde, Danske Bank A/S | |
Description: Example usage of show_form.js - Insert chart JSON into property field. | |
Dependencies: https://github.com/jsonform/jsonform | |
History: | |
October 11, 2022 : Created with base set of scripts | |
*/ | |
console.show(); | |
console.clear(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: Thomas Klok Rohde | |
Description: Selection sensitive menu system for curated scripts | |
History: | |
October 2, 2022 : Created with base set of scripts | |
*/ | |
console.show(); | |
console.clear(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: Thomas Klok Rohde | |
Description: Edit properties of selected elements in a spreadsheet | |
History: | |
October 22, 2022 : Created | |
*/ | |
console.show(); | |
console.clear(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: Thomas Klok Rohde | |
Description: Insert chart to view | |
History: | |
October 11, 2022 : Created with base set of scripts | |
*/ | |
console.show(); | |
console.clear(); |
NewerOlder