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
Show hidden characters
{ | |
//////////////////////////////////////////////////////////////// | |
// See reg_replace_rules.sublime-settings for regex rules. | |
//////////////////////////////////////////////////////////////// | |
// Use sub notify if available | |
"use_sub_notify": true, | |
// If on_save is true, RegReplace will search through the file patterns listed below right before a file is saved, | |
// if the file name matches a file pattern, the sequence will be applied before the file is saved. |
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
[ | |
{ | |
"caption": "Reg Replace: Apex Format All", | |
"command": "reg_replace", | |
"args": { | |
"replacements": [ | |
"remove_empty_lines", | |
"add_empty_line_after_open_curly_bracket", | |
"add_empty_line_before_elseif", | |
"replace_system_debug", |
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
{ | |
"replacements": { | |
"remove_empty_lines": { | |
"find": "^\\s*\n", | |
"replace": "", | |
"greedy": true, | |
"case": false | |
}, | |
"add_empty_line_after_open_curly_bracket": { | |
"find": "\\{\n", |
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
/** | |
* Class description | |
* | |
* @author Tommaso Bolis | |
* @version 1.0 | |
* @description Class description | |
* @testedIn ClassNameTest | |
* @uses Class1, Class2 | |
* @code | |
* @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
({ | |
fireEvent: function(component, event, helper) { | |
var object = component.get("v.object"); | |
var event = component.getEvent("eventName"); | |
event.setParams({ "object": object }); | |
event.fire(); | |
} | |
}) |
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
createObject: function(component, object) { | |
var action = component.get("c.saveObject"); | |
action.setParams({ | |
"object": object | |
}); | |
action.setCallback(this, function(response){ |
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
// Load objects from Salesforce | |
getObjects: function(component, event, helper) { | |
// Create the action | |
var action = component.get("c.getObjects"); | |
// Add callback behavior for when response is received | |
action.setCallback(this, function(response) { | |
var state = response.getState(); |
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
public with sharing class LightningComponentController { | |
@AuraEnabled | |
public static List<Object__c> getObjects() { | |
// Check to make sure all fields are accessible to this user | |
String[] fieldsToCheck = new String[] { | |
'Id', 'Name', 'Custom_Field1__c', 'Custom_Field2__c', 'Custom_Field3__c' | |
}; | |
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
/** | |
* Handler for Object Trigger | |
* | |
* @author Tommaso Bolis | |
* @version 1.0 | |
* @code 001 | |
*/ | |
public with sharing class ObjectTriggerHandler { | |
private boolean m_isExecuting = false; |
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
/** | |
* Trigger on Object | |
* | |
* @author Tommaso Bolis | |
* @version 1.0 | |
* @code 001 | |
*/ | |
trigger ObjectTrigger on Object (after delete, after insert, after undelete, after update, before delete, before insert, before update) { | |
objectTriggerHandler handler = new objectHandler(); |
NewerOlder