@@ -196,12 +196,13 @@ def __init__(self, *args, **kwargs):
196
196
super (DestructLightningFromServer , self ).__init__ (* args , ** kwargs )
197
197
198
198
def run (self , dirs ):
199
- if sublime . ok_cancel_dialog ( "This will Delete the whole folder both from the server and local!" +
200
- " Confirm to continue?" ):
199
+ _ , bundle_name = os . path . split ( dirs [ 0 ])
200
+ if sublime . ok_cancel_dialog ( "This will Delete %s !" % bundle_name + " Confirm to continue?" ):
201
201
processor .handle_destructive_files (dirs , ignore_folder = False )
202
202
203
203
def is_visible (self , dirs ):
204
- if len (dirs ) == 0 : return False
204
+ if len (dirs ) == 0 :
205
+ return False
205
206
self .settings = context .get_settings ()
206
207
for _dir in dirs :
207
208
attributes = util .get_file_attributes (_dir )
@@ -226,7 +227,7 @@ def run(self, dirs, element=""):
226
227
template = templates .get ("AuraElement" ).get (element )
227
228
settings = context .get_settings ()
228
229
templates_path = os .path .join (settings ["workspace" ],
229
- ".templates" , template ["directory" ])
230
+ ".templates" , template ["directory" ])
230
231
with open (templates_path ) as fp :
231
232
body = fp .read ()
232
233
@@ -297,15 +298,15 @@ def __init__(self, *args, **kwargs):
297
298
def run (self , _type = "" ):
298
299
self ._type = _type
299
300
self .window .show_input_panel ("Please Input %s Name: " % _type ,
300
- "" , self .on_input , None , None )
301
+ "" , self .on_input , None , None )
301
302
302
303
def on_input (self , lightning_name ):
303
304
# Create component to local according to user input
304
305
if not re .match ('^[a-zA-Z]+\\ w+$' , lightning_name ):
305
306
message = 'Invalid format, do you want to try again?'
306
307
if not sublime .ok_cancel_dialog (message ): return
307
308
self .window .show_input_panel ("Please Input %s Name: " % self ._type ,
308
- "" , self .on_input , None , None )
309
+ "" , self .on_input , None , None )
309
310
return
310
311
311
312
# Get settings
@@ -326,10 +327,10 @@ def on_input(self, lightning_name):
326
327
message = "%s is already exist, do you want to try again?" % lightning_name
327
328
if not sublime .ok_cancel_dialog (message , "Try Again?" ): return
328
329
self .window .show_input_panel ("Please Input Lightning Name: " ,
329
- "" , self .on_input , None , None )
330
+ "" , self .on_input , None , None )
330
331
return
331
332
332
- lightning_file = os .path .join (component_dir , lightning_name + template ["extension" ])
333
+ lightning_file = os .path .join (component_dir , lightning_name + template ["extension" ])
333
334
334
335
# Create Aura lightning file
335
336
with open (lightning_file , "w" ) as fp :
0 commit comments