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
// | |
// Attribute - replace string | |
// | |
// (c) 2019 David GERARD | |
// | |
// Search and replace a string for one or many concepts attributes (name, documentation) | |
// | |
// Roadmap: | |
// - when using Regex, implement global replacement if multiple occurences | |
// - when the replacementString is a Regex, some corrections and improvment still needed |
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
//* | |
* Export Selected Folder in Source Model to New Target Model | |
* | |
* https://gist.github.com/fanievh/4ec7d14247616846f3d16b5e22dc80a9 | |
* | |
* This script copies a selected subset of a source model to a target model. The folder selected | |
* in the source model, will become the top level folder in the Views folder in the target model. Only | |
* elements, relationships, diagram objects, connections and images on any of the views in the selected | |
* folder in the source model, will be created in the target model. | |
* |
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: Ed Tobin | |
// Purpose: Create Visual Group with Selection | |
// Requires: jArchi - https://www.archimatetool.com/blog/2018/07/02/jarchi/ | |
// Date: 14 April 2023 | |
// | |
// WARNING: drops visual relationships between selected objects | |
// configure defaults: | |
// the size of padding around the selected elements |
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
/* | |
* AutoDescribe a view and add to view documentation | |
*/ | |
function CallApi(url,api_key, query) { | |
var imports = new JavaImporter(java.net, java.util, java.lang, java.io, java.nio.charset) | |
var result="" |
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
/* | |
+++++++++++++++ +++++ | |
+++++++++++++++++ +++++ | |
+++++ +++++ +++++ | |
+++++ +++++ +++++ | |
++++++++++++++++ ++++++++++++++++++ | |
++++++++++++++++++ +++++++++++++++++ | |
+++++ +++++ ++++++ | |
+++++ +++++ ++++++ | |
+++++ ++++++++++++++++++ |
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
/* | |
* New Archi Script | |
*/ | |
// Places string on clipboard | |
function SetClipboardString(string) { | |
var Toolkit = Java.type("java.awt.Toolkit"); | |
var Transferable = Java.type("java.awt.datatransfer.StringSelection"); |
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
/* | |
* Example message dialogs via jface | |
* | |
*/ | |
var MessageDialog= Java.type('org.eclipse.jface.dialogs.MessageDialog'); | |
// Standard Error Message, with "ok" button and error icon | |
MessageDialog.openError(shell,"Error","your errortext"); |
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: Pedro Duque | |
* Version: 0.2 | |
* Date: 2022-12-19 | |
* | |
* PURPOSE: | |
* This script exports an Archimate view to imported into draw.io (aka diagrams.net). | |
* | |
* USAGE: | |
* - Select a view in Archi |
NewerOlder