<NME> run-actions.cocoascript
<BEF> @import 'actions/action-inventory.cocoascript'
@import 'actions/view-inventory.cocoascript'
@import 'actions/utils/abstract-selection-inventory.cocoascript'
@import 'actions/utils/utils-inventory.cocoascript'
@import 'actions/statistics-inventory.cocoascript'
@import 'actions/demo-inventory.cocoascript'

@import 'RegisterInventory.framework/HelloSketch.js'

var methodStartTime = nil
var debugFromCustomPluginPanel = false

var pluginPath = ""
var pluginVersion = ""
var currentDocument = nil
var currentSelection = nil
var runSimulateKeynoteIdentifier = 2
var runSettingsIdentifier = 3
var runRemoveExportPageIdentifier = 4
// no 5
var runSelectProjectFolderIdentifier = 6
var runRemoveProjectFolderIdentifier = 7
var runShowBarIdentifier = 8
	myDetailedNotation: 1,
	exportFramerFolder: "",
	myDevice: 0,
	myCodeStyle: 0,

	myRetinaValue: 1,
	myMobile: 1,
	myAutoplay: 0,

	myEmail: "",
	myLicense: "",
	myRegisterDate: "",

	myUserID:  [[NSUUID UUID] UUIDString] + ""
}



var statisticsPresets = {
    currentStatus: 0,
}

var onReplicateLayersRun = function(context) {
	if (showLog) { log("Running Replace Layers") }
	decomposeContext(context)
	chooseAction(currentDocument, currentSelection, runReplicateLayersIdentifier)
}

var onGenerateStatesRun = function(context) {
	if (showLog) { log("Running Replicate States") }
	decomposeContext(context)
	chooseAction(currentDocument, currentSelection, runGenerateStatesIdentifier)
}
Status.replicateID = function() { return 0 }
Status.generateID = function() { return 1 }
Status.simulateID = function() { return 2 }
Status.settingsID = function() { return 3 }
Status.removePageID = function() { return 4 }
Status.showFolderID = function() { return 5 }
Status.selectFolderID = function() { return 6 }
Status.removeFolderID = function() { return 7 }
Status.toolbarID = function() { return 8 }
Status.updateID = function() { return 9 }


Status.userDomain = function() { return "com.addleimb.framer-inventory.user-production" }
Status.statsDomain = function() { return "com.addleimb.framer-inventory.statistics-production" }
Status.datesDomain = function() { return "com.addleimb.framer-inventory.dates-production" }

var preTestingDefaults = {}
var userDefaults = initDefaults(Status.userDomain(), userPresets)
var statsDefauls = initDefaults(Status.statsDomain(), statisticsPresets)


Status.toolbarModeEmpty = function() { return 0 }
Status.toolbarModeImport = function() { return 1 }
Status.toolbarModeScene = function() { return 2 }



var showLog = true
var showTestLog = true
var sendLog = true

var isSmartAction = false

var decomposeContext = function(context) {
	chooseAction(currentDocument, currentSelection, runRemoveProjectFolderIdentifier)
}

var onCheckUpdatesRun = function(context) {
		if (showLog) { log("Running Updates Checker") }
		decomposeContext(context)
		chooseAction(currentDocument, currentSelection, runCheckUpdatesIdentifier)
}

var onTestingRun = function(context) {
	if (showLog) { log("Running Testing Environment") }
	isTestingEnvironment = true
var onSimulateKeynoteRun = function(context) {
	if (showLog) { log("Running Simulate Keynote") }
	decomposeContext(context)
	runSimulateKeynote()
}

var onSettingRun = function(context) {
	if (showLog) { log("Running Settings") }
	decomposeContext(context)
	runSettings()
}

var onRemoveExportPageRun = function(context) {
	if (showLog) { log("Running Remove Export Page...") }
	decomposeContext(context)
	FramerInventory.showDoneMessage()
}

var onShowBarRun = function(context) {
	if (showLog) { log("Showing Bar") }
	decomposeContext(context)
	ToolbarInventory.createUIBar()
}


var onSelectOpenedProjectRun = function(context) {
	if (showLog) { log("Running Select Opened Project...") }
	decomposeContext(context)
	PathInventory.createPathModal()
}

var onSelectProjectFolderRun = function(context) {
	if (showLog) { log("Running Select Project Manually...") }
	decomposeContext(context)
	FramerInventory.runSelectProjectFolder()
}

var onRemoveProjectFolderRun = function(context) {
	if (showLog) { log("Running Remove Project Folder...") }
	decomposeContext(context)
	FramerInventory.runRemoveProjectFolder()
}

var onShowProjectFolderRun = function(context) {
	if (showLog) { log("Running Show Project Folder...") }
	decomposeContext(context)
	FramerInventory.runShowProjectFolder()
}

var onCheckUpdatesRun = function(context) {
	if (showLog) { log("Running Updates Checker") }
	decomposeContext(context)
	runCheckUpdates()
}

var onSaveSelectionRun = function(context) {
	if (showLog) { log("Running Save Selection") }
	decomposeContext(context)
	AbstractSelectionInventory.saveSelection(currentSelection)
}

var onAddToSelectionRun = function(context) {
	if (showLog) { log("Running Add to Selection") }
	decomposeContext(context)
	AbstractSelectionInventory.addToSelection(currentSelection)
}

var onClearSelectionRun = function(context) {
	if (showLog) { log("Running Clear Selection") }
	decomposeContext(context)
	AbstractSelectionInventory.clearSelection()
}

var onRestoreSelectionRun = function(context) {
	if (showLog) { log("Running Save Selection") }
	decomposeContext(context)
	AbstractSelectionInventory.restoreSelection()
}




var onDisconnectSymbols = function(context) {
	if (showLog) { log("Disconnect Symbols") }
	decomposeContext(context)
	UtilsInventory.disconnectSymbols()
}

var onAddLayersAsArray = function(context) {
	if (showLog) { log("Add Layer as Array") }
	decomposeContext(context)
	UtilsInventory.addSelectionArray()
}

var onCleanAndCopyLayersAsArray = function(context) {
	if (showLog) { log("Clean and Copy Layers as Array") }
	decomposeContext(context)
	UtilsInventory.cleanAndCopySelection()
}

var onCreateShownHiddenStates = function(context) {
	if (showLog) { log("Create shown/hidden states") }
	decomposeContext(context)
	UtilsInventory.createShownHiddenStates()
}



var onSetRulers = function(context) {
	if (showLog) { log("Set Rulers") }
	decomposeContext(context)
	UtilsInventory.setRulers()
}

var onResetRulers = function(context) {
	if (showLog) { log("Reset Rulers") }
	decomposeContext(context)
	UtilsInventory.resetRulers()
}



var onTestingRun = function(context) {
	if (showLog) { log("Running Testing Environment") }
	// isTestingEnvironment = true
	// sendLog = false
	decomposeContext(context)
	runTestingEnvironment()
	// chooseAction(currentDocument, currentSelection, runTestingEnvironmentIdentifier)
}

<MSG> Added action to show Framer project folder

– Added action to understand if the folder is selected
– Updated manifest

TODO:
– Add integration with Sketch Runner

<DFF> @@ -17,7 +17,7 @@ var runGenerateStatesIdentifier = 1
 var runSimulateKeynoteIdentifier = 2
 var runSettingsIdentifier = 3
 var runRemoveExportPageIdentifier = 4
-// no 5
+var runShowProjectFolderIdentifier = 5
 var runSelectProjectFolderIdentifier = 6
 var runRemoveProjectFolderIdentifier = 7
 var runShowBarIdentifier = 8
@@ -44,13 +44,13 @@ var decomposeContext = function(context) {
 }
 
 var onReplicateLayersRun = function(context) {
-	if (showLog) { log("Running Replace Layers") }
+	if (showLog) { log("Running Replicate Layers") }
 	decomposeContext(context)
 	chooseAction(currentDocument, currentSelection, runReplicateLayersIdentifier)
 }
 
 var onGenerateStatesRun = function(context) {
-	if (showLog) { log("Running Replicate States") }
+	if (showLog) { log("Running Generate States") }
 	decomposeContext(context)
 	chooseAction(currentDocument, currentSelection, runGenerateStatesIdentifier)
 }
@@ -91,12 +91,20 @@ var onRemoveProjectFolderRun = function(context) {
 	chooseAction(currentDocument, currentSelection, runRemoveProjectFolderIdentifier)
 }
 
+var onShowProjectFolderRun = function(context) {
+	if (showLog) { log("Running Show Project Folder...") }
+	decomposeContext(context)
+	chooseAction(currentDocument, currentSelection, runShowProjectFolderIdentifier)
+}
+
 var onCheckUpdatesRun = function(context) {
 		if (showLog) { log("Running Updates Checker") }
 		decomposeContext(context)
 		chooseAction(currentDocument, currentSelection, runCheckUpdatesIdentifier)
 }
 
+
+
 var onTestingRun = function(context) {
 	if (showLog) { log("Running Testing Environment") }
 	isTestingEnvironment = true

Added action to show Framer project folder