adobe creative suite extension builder扩展安装地址及调试方法
1、通过zxp安装包安装的目录地址
C:\Program Files\Common Files\Adobe\CS6ServiceManager\extensions
2、在flash builder中运行的临时地址
C:\Users\davidhuang\AppData\Roaming\Adobe\CS6ServiceManager\extensions
临时LOG存放目录(win7)
Application logs
The Adobe Creative Suite extensibility infrastructure creates a log file for each of the applications running extensions. These files provide useful debug information for extension developers. The log files are generated in the platform’s temp folder, and named csxs2-HostID.log; for example, csxs2-ILST.log for an extension running in Illustrator.
These logs are located at these platform-specific locations:
In Windows XP: C:\Documents and Settings\user\Local Settings\Temp
In Windows Vista: C:\Users\user\Locale\Temp
In Mac OS X: /Users/user/Library/Logs/CSXS
win7:
C:\Users\davidhuang\AppData\Local\Temp\csxs3-IDSN.log\(indesign的记录)
File.applicationDirectory.resolvePath("assets/jquery-1.7.2.min.js");:
对应路径:
C:\Program Files\Common Files\Adobe\CS6ServiceManager\StageManager\Debug\assets\jquery-1.7.2.min.js
File.applicationStorageDirectory.resolvePath("assets/jquery-1.7.2.min.js");
对应路径:C:\Users\davidhuang\AppData\Roaming\StageManager.BD092818F67280F4B42B04877600987F0111B594.1\Local Store\assets\jquery-1.7.2.min.js
由于api生成的路径跟实际的目录不一致,因此需要手动修改路径才能获取到真实的路径。
private function copyFile():void{var file:File = File.applicationDirectory;var path:String = file.nativePath;var extendPath:String = path.substring(0,path.indexOf("StageManager"));while(extendPath.indexOf("\") != -1){extendPath = extendPath.replace("\","\/");}var extendFile:File = new File();extendFile.url = "file:///" + extendPath + "/extensions/com.example.HelloWorldZxp/assets/jquery-1.7.2.min.js";Alert.show(extendFile.url);var targetFile:File = File.desktopDirectory.resolvePath("jquery-1.7.2.min.js");extendFile.copyTo(targetFile,true);Alert.show("copy");}
import cim.fx.logging.targets.*;import cim.fx.logging.targets.*;import cim.fx.logging.targets.LocalConnectionTarget;import com.adobe.csawlib.indesign.InDesign;import com.adobe.csxs.core.CSInterface;import flash.filesystem.File;import mx.controls.Alert;import mx.logging.ILogger;import mx.logging.LogEventLevel;import mx.logging.LogLogger;public function testLog():void{var loggingTarget:LocalConnectionTarget = new LocalConnectionTarget("_test");loggingTarget.filters=["*"];loggingTarget.level = LogEventLevel.ALL;//记录的LOG级别。若为error级别则不会记录csxs的debug和info的记录。loggingTarget.includeDate = true;loggingTarget.includeTime = true;loggingTarget.includeCategory = true;loggingTarget.includeLevel = true;var logger:ILogger = new LogLogger("LOGTEST");//参数是类别。自定义字符串。loggingTarget.addLogger(logger);//以下内容会根据loggingTarget.level而过滤。若是error则只显示error及fatal的loglogger.debug("debug");logger.error("error");logger.warn("warn");logger.info("info");logger.log(LogEventLevel.INFO,"loginfo");logger.fatal("fatal");}