├── java └── compressorhelper │ ├── nbproject │ ├── private │ │ ├── config.properties │ │ ├── private.properties │ │ └── private.xml │ ├── genfiles.properties │ ├── project.xml │ ├── project.properties │ └── build-impl.xml │ ├── manifest.mf │ ├── build.xml │ └── src │ └── com │ └── tinyms │ └── Compressorhelper.java ├── product ├── etc │ ├── gtk-2.0 │ │ ├── gtkrc │ │ ├── gtk.immodules │ │ └── im-multipress.conf │ └── pango │ │ └── pango.modules ├── bin │ ├── intl.dll │ ├── zlib1.dll │ ├── libmpc-2.dll │ ├── libssp-0.dll │ ├── mingwm10.dll │ ├── freetype6.dll │ ├── libcairo-2.dll │ ├── libexpat-1.dll │ ├── libgmp-10.dll │ ├── libgomp-1.dll │ ├── libiconv-2.dll │ ├── libintl-8.dll │ ├── libmpfr-1.dll │ ├── libxml2-2.dll │ ├── libatk-1.0-0.dll │ ├── libgio-2.0-0.dll │ ├── libglib-2.0-0.dll │ ├── libpng14-14.dll │ ├── libpthread-2.dll │ ├── libsigc-2.0-0.dll │ ├── libstdc++-6.dll │ ├── libatkmm-1.6-1.dll │ ├── libfontconfig-1.dll │ ├── libgailutil-18.dll │ ├── libgcc_s_dw2-1.dll │ ├── libgcc_s_sjlj-1.dll │ ├── libgdkmm-2.4-1.dll │ ├── libgiomm-2.4-1.dll │ ├── libglade-2.0-0.dll │ ├── libglibmm-2.4-1.dll │ ├── libgtkmm-2.4-1.dll │ ├── libpango-1.0-0.dll │ ├── libxml++-2.6-2.dll │ ├── libcairomm-1.0-1.dll │ ├── libgdk-win32-2.0-0.dll │ ├── libglademm-2.4-1.dll │ ├── libgmodule-2.0-0.dll │ ├── libgobject-2.0-0.dll │ ├── libgthread-2.0-0.dll │ ├── libgtk-win32-2.0-0.dll │ ├── libpangoft2-1.0-0.dll │ ├── libpangomm-1.4-1.dll │ ├── gspawn-win32-helper.exe │ ├── libgdk_pixbuf-2.0-0.dll │ ├── libpangocairo-1.0-0.dll │ ├── libpangowin32-1.0-0.dll │ └── gspawn-win32-helper-console.exe ├── share │ ├── themes │ │ ├── Raleigh │ │ │ └── gtk-2.0 │ │ │ │ └── gtkrc │ │ ├── Default │ │ │ └── gtk-2.0-key │ │ │ │ └── gtkrc │ │ ├── MS-Windows │ │ │ └── gtk-2.0 │ │ │ │ └── gtkrc │ │ └── Emacs │ │ │ └── gtk-2.0-key │ │ │ └── gtkrc │ ├── locale │ │ ├── zh_CN │ │ │ └── LC_MESSAGES │ │ │ │ ├── glib20.mo │ │ │ │ ├── gtk20.mo │ │ │ │ └── gtk20-properties.mo │ │ ├── zh_HK │ │ │ └── LC_MESSAGES │ │ │ │ ├── glib20.mo │ │ │ │ ├── gtk20.mo │ │ │ │ └── gtk20-properties.mo │ │ └── zh_TW │ │ │ └── LC_MESSAGES │ │ │ ├── glib20.mo │ │ │ ├── gtk20.mo │ │ │ └── gtk20-properties.mo │ └── xml │ │ └── libglade │ │ └── glade-2.0.dtd └── lib │ └── gtk-2.0 │ └── 2.10.0 │ └── engines │ ├── libwimp.dll │ └── libpixmap.dll ├── lib ├── go-up.png ├── compress.png ├── go-down.png ├── folder-open.png ├── package_green.png ├── view-refresh.png ├── window-close.png ├── yuicompressor.jar ├── commons-io-2.0.1.jar ├── commons-lang-2.6.jar └── compressorhelper.jar ├── .gitignore ├── .settings ├── org.eclipse.core.runtime.prefs ├── org.eclipse.core.resources.prefs └── org.eclipse.cdt.managedbuilder.core.prefs ├── install.nsh ├── src ├── FilePreviewColumnDefinition.cpp ├── FilePreviewColumnDefinition.h ├── JsCompressor.cpp ├── FilePreviewStore.h ├── ui │ ├── NewProjectDialog.h │ └── NewProjectDialog.cpp ├── FilePreviewStore.cpp ├── FileUtils.h ├── Makefile ├── JsCompressorFrame.h ├── FileUtils.cpp ├── cJSON │ ├── cJSON.h │ ├── README │ └── cJSON.c └── JsCompressorFrame.cpp ├── README ├── .project └── license.txt /java/compressorhelper/nbproject/private/config.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /product/etc/gtk-2.0/gtkrc: -------------------------------------------------------------------------------- 1 | gtk-theme-name = "MS-Windows" 2 | -------------------------------------------------------------------------------- /lib/go-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/lib/go-up.png -------------------------------------------------------------------------------- /lib/compress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/lib/compress.png -------------------------------------------------------------------------------- /lib/go-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/lib/go-down.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Debug 2 | Release 3 | java/compressorhelper/build 4 | java/compressorhelper/dist -------------------------------------------------------------------------------- /lib/folder-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/lib/folder-open.png -------------------------------------------------------------------------------- /lib/package_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/lib/package_green.png -------------------------------------------------------------------------------- /lib/view-refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/lib/view-refresh.png -------------------------------------------------------------------------------- /lib/window-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/lib/window-close.png -------------------------------------------------------------------------------- /lib/yuicompressor.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/lib/yuicompressor.jar -------------------------------------------------------------------------------- /product/bin/intl.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/intl.dll -------------------------------------------------------------------------------- /product/bin/zlib1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/zlib1.dll -------------------------------------------------------------------------------- /lib/commons-io-2.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/lib/commons-io-2.0.1.jar -------------------------------------------------------------------------------- /lib/commons-lang-2.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/lib/commons-lang-2.6.jar -------------------------------------------------------------------------------- /lib/compressorhelper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/lib/compressorhelper.jar -------------------------------------------------------------------------------- /product/bin/libmpc-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libmpc-2.dll -------------------------------------------------------------------------------- /product/bin/libssp-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libssp-0.dll -------------------------------------------------------------------------------- /product/bin/mingwm10.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/mingwm10.dll -------------------------------------------------------------------------------- /product/bin/freetype6.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/freetype6.dll -------------------------------------------------------------------------------- /product/bin/libcairo-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libcairo-2.dll -------------------------------------------------------------------------------- /product/bin/libexpat-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libexpat-1.dll -------------------------------------------------------------------------------- /product/bin/libgmp-10.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libgmp-10.dll -------------------------------------------------------------------------------- /product/bin/libgomp-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libgomp-1.dll -------------------------------------------------------------------------------- /product/bin/libiconv-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libiconv-2.dll -------------------------------------------------------------------------------- /product/bin/libintl-8.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libintl-8.dll -------------------------------------------------------------------------------- /product/bin/libmpfr-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libmpfr-1.dll -------------------------------------------------------------------------------- /product/bin/libxml2-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libxml2-2.dll -------------------------------------------------------------------------------- /product/bin/libatk-1.0-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libatk-1.0-0.dll -------------------------------------------------------------------------------- /product/bin/libgio-2.0-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libgio-2.0-0.dll -------------------------------------------------------------------------------- /product/bin/libglib-2.0-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libglib-2.0-0.dll -------------------------------------------------------------------------------- /product/bin/libpng14-14.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libpng14-14.dll -------------------------------------------------------------------------------- /product/bin/libpthread-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libpthread-2.dll -------------------------------------------------------------------------------- /product/bin/libsigc-2.0-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libsigc-2.0-0.dll -------------------------------------------------------------------------------- /product/bin/libstdc++-6.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libstdc++-6.dll -------------------------------------------------------------------------------- /product/bin/libatkmm-1.6-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libatkmm-1.6-1.dll -------------------------------------------------------------------------------- /product/bin/libfontconfig-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libfontconfig-1.dll -------------------------------------------------------------------------------- /product/bin/libgailutil-18.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libgailutil-18.dll -------------------------------------------------------------------------------- /product/bin/libgcc_s_dw2-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libgcc_s_dw2-1.dll -------------------------------------------------------------------------------- /product/bin/libgcc_s_sjlj-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libgcc_s_sjlj-1.dll -------------------------------------------------------------------------------- /product/bin/libgdkmm-2.4-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libgdkmm-2.4-1.dll -------------------------------------------------------------------------------- /product/bin/libgiomm-2.4-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libgiomm-2.4-1.dll -------------------------------------------------------------------------------- /product/bin/libglade-2.0-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libglade-2.0-0.dll -------------------------------------------------------------------------------- /product/bin/libglibmm-2.4-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libglibmm-2.4-1.dll -------------------------------------------------------------------------------- /product/bin/libgtkmm-2.4-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libgtkmm-2.4-1.dll -------------------------------------------------------------------------------- /product/bin/libpango-1.0-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libpango-1.0-0.dll -------------------------------------------------------------------------------- /product/bin/libxml++-2.6-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libxml++-2.6-2.dll -------------------------------------------------------------------------------- /product/bin/libcairomm-1.0-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libcairomm-1.0-1.dll -------------------------------------------------------------------------------- /product/bin/libgdk-win32-2.0-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libgdk-win32-2.0-0.dll -------------------------------------------------------------------------------- /product/bin/libglademm-2.4-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libglademm-2.4-1.dll -------------------------------------------------------------------------------- /product/bin/libgmodule-2.0-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libgmodule-2.0-0.dll -------------------------------------------------------------------------------- /product/bin/libgobject-2.0-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libgobject-2.0-0.dll -------------------------------------------------------------------------------- /product/bin/libgthread-2.0-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libgthread-2.0-0.dll -------------------------------------------------------------------------------- /product/bin/libgtk-win32-2.0-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libgtk-win32-2.0-0.dll -------------------------------------------------------------------------------- /product/bin/libpangoft2-1.0-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libpangoft2-1.0-0.dll -------------------------------------------------------------------------------- /product/bin/libpangomm-1.4-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libpangomm-1.4-1.dll -------------------------------------------------------------------------------- /product/share/themes/Raleigh/gtk-2.0/gtkrc: -------------------------------------------------------------------------------- 1 | # 2 | # This theme is the default theme if no other theme is selected. 3 | # 4 | -------------------------------------------------------------------------------- /java/compressorhelper/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /product/bin/gspawn-win32-helper.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/gspawn-win32-helper.exe -------------------------------------------------------------------------------- /product/bin/libgdk_pixbuf-2.0-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libgdk_pixbuf-2.0-0.dll -------------------------------------------------------------------------------- /product/bin/libpangocairo-1.0-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libpangocairo-1.0-0.dll -------------------------------------------------------------------------------- /product/bin/libpangowin32-1.0-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/libpangowin32-1.0-0.dll -------------------------------------------------------------------------------- /.settings/org.eclipse.core.runtime.prefs: -------------------------------------------------------------------------------- 1 | #Fri May 20 10:00:50 CST 2011 2 | eclipse.preferences.version=1 3 | line.separator=\n 4 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | #Fri May 20 10:00:50 CST 2011 2 | eclipse.preferences.version=1 3 | encoding/=UTF-8 4 | -------------------------------------------------------------------------------- /product/bin/gspawn-win32-helper-console.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/bin/gspawn-win32-helper-console.exe -------------------------------------------------------------------------------- /product/share/themes/Default/gtk-2.0-key/gtkrc: -------------------------------------------------------------------------------- 1 | # 2 | # Default keybinding set. Empty because it is implemented inline in the code. 3 | # 4 | -------------------------------------------------------------------------------- /product/lib/gtk-2.0/2.10.0/engines/libwimp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/lib/gtk-2.0/2.10.0/engines/libwimp.dll -------------------------------------------------------------------------------- /product/lib/gtk-2.0/2.10.0/engines/libpixmap.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/lib/gtk-2.0/2.10.0/engines/libpixmap.dll -------------------------------------------------------------------------------- /product/share/locale/zh_CN/LC_MESSAGES/glib20.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/share/locale/zh_CN/LC_MESSAGES/glib20.mo -------------------------------------------------------------------------------- /product/share/locale/zh_CN/LC_MESSAGES/gtk20.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/share/locale/zh_CN/LC_MESSAGES/gtk20.mo -------------------------------------------------------------------------------- /product/share/locale/zh_HK/LC_MESSAGES/glib20.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/share/locale/zh_HK/LC_MESSAGES/glib20.mo -------------------------------------------------------------------------------- /product/share/locale/zh_HK/LC_MESSAGES/gtk20.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/share/locale/zh_HK/LC_MESSAGES/gtk20.mo -------------------------------------------------------------------------------- /product/share/locale/zh_TW/LC_MESSAGES/glib20.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/share/locale/zh_TW/LC_MESSAGES/glib20.mo -------------------------------------------------------------------------------- /product/share/locale/zh_TW/LC_MESSAGES/gtk20.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/share/locale/zh_TW/LC_MESSAGES/gtk20.mo -------------------------------------------------------------------------------- /product/share/locale/zh_CN/LC_MESSAGES/gtk20-properties.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/share/locale/zh_CN/LC_MESSAGES/gtk20-properties.mo -------------------------------------------------------------------------------- /product/share/locale/zh_HK/LC_MESSAGES/gtk20-properties.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/share/locale/zh_HK/LC_MESSAGES/gtk20-properties.mo -------------------------------------------------------------------------------- /product/share/locale/zh_TW/LC_MESSAGES/gtk20-properties.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyms/jscompressor/HEAD/product/share/locale/zh_TW/LC_MESSAGES/gtk20-properties.mo -------------------------------------------------------------------------------- /product/etc/pango/pango.modules: -------------------------------------------------------------------------------- 1 | # Pango Modules file 2 | # Automatically generated file, do not edit 3 | # 4 | # ModulesPath = c:/devel/target/18e9007417f775a5bc83c60917e98632/lib/pango\1.6.0\modules 5 | # 6 | -------------------------------------------------------------------------------- /java/compressorhelper/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | do.depend=false 3 | do.jar=true 4 | javac.debug=true 5 | javadoc.preview=true 6 | user.properties.file=C:\\Users\\suntren-java\\.netbeans\\7.0\\build.properties 7 | -------------------------------------------------------------------------------- /java/compressorhelper/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /install.nsh: -------------------------------------------------------------------------------- 1 | ;Author: tinyms 2 | ;Date: 2011-06-22 3 | 4 | !include "MUI.nsh" 5 | 6 | !insertmacro MUI_PAGE_DIRECTORY 7 | 8 | !insertmacro MUI_PAGE_INSTFILES 9 | 10 | !insertmacro MUI_LANGUAGE "SimpChinese" 11 | 12 | Section 13 | SetOutPath $INSTDIR\JsCompressor\bin 14 | CreateShortCut $DESKTOP\JsCompressor.lnk $INSTDIR\JsCompressor\bin\JsCompressor.exe 15 | SectionEnd -------------------------------------------------------------------------------- /src/FilePreviewColumnDefinition.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * FilePreviewColumnDefinition.cpp 3 | * 4 | * Created on: 2011-6-5 5 | * Author: tinyms 6 | */ 7 | 8 | #include "FilePreviewColumnDefinition.h" 9 | 10 | FilePreviewColumnDefinition::FilePreviewColumnDefinition() { 11 | // TODO Auto-generated constructor stub 12 | add(m_file_full_path); 13 | } 14 | 15 | FilePreviewColumnDefinition::~FilePreviewColumnDefinition() { 16 | // TODO Auto-generated destructor stub 17 | } 18 | -------------------------------------------------------------------------------- /java/compressorhelper/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=4c1f696e 2 | build.xml.script.CRC32=17f150ef 3 | build.xml.stylesheet.CRC32=28e38971@1.43.1.45 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=4c1f696e 7 | nbproject/build-impl.xml.script.CRC32=b5b3da94 8 | nbproject/build-impl.xml.stylesheet.CRC32=0c01fd8e@1.43.1.45 9 | -------------------------------------------------------------------------------- /src/FilePreviewColumnDefinition.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FilePreviewColumnDefinition.h 3 | * 4 | * Created on: 2011-6-5 5 | * Author: tinyms 6 | */ 7 | 8 | #ifndef FILEPREVIEWCOLUMNDEFINITION_H_ 9 | #define FILEPREVIEWCOLUMNDEFINITION_H_ 10 | #include 11 | class FilePreviewColumnDefinition : public Gtk::TreeModel::ColumnRecord{ 12 | public: 13 | Gtk::TreeModelColumn m_file_full_path; 14 | public: 15 | FilePreviewColumnDefinition(); 16 | virtual ~FilePreviewColumnDefinition(); 17 | }; 18 | 19 | #endif /* FILEPREVIEWCOLUMNDEFINITION_H_ */ 20 | -------------------------------------------------------------------------------- /product/etc/gtk-2.0/gtk.immodules: -------------------------------------------------------------------------------- 1 | # GTK+ Input Method Modules file 2 | # 3 | # ModulesPath = c:\Users\tml\.gtk-2.0\2.10.0\i686-pc-mingw32\immodules;c:\Users\tml\.gtk-2.0\2.10.0\immodules;c:\Users\tml\.gtk-2.0\i686-pc-mingw32\immodules;c:\Users\tml\.gtk-2.0\immodules;c:\devel\target\0b150273e7a8329c3935ca90f169d52d\lib\gtk-2.0\2.10.0\i686-pc-mingw32\immodules;c:\devel\target\0b150273e7a8329c3935ca90f169d52d\lib\gtk-2.0\2.10.0\immodules;c:\devel\target\0b150273e7a8329c3935ca90f169d52d\lib\gtk-2.0\i686-pc-mingw32\immodules;c:\devel\target\0b150273e7a8329c3935ca90f169d52d\lib\gtk-2.0\immodules 4 | # 5 | -------------------------------------------------------------------------------- /java/compressorhelper/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | compressorhelper 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/JsCompressor.cpp: -------------------------------------------------------------------------------- 1 | //============================================================================ 2 | // Name : JsCompressor 3 | // Author : tinyms 4 | // Version : 5 | // Copyright : @tinyms.com 2011 6 | // Description : copress js or css 7 | //============================================================================ 8 | #include 9 | #include "FileUtils.h" 10 | #include "JsCompressorFrame.h" 11 | using namespace tinyms; 12 | int main(int argc, char *argv[]) { 13 | 14 | Gtk::Main main(argc, argv); 15 | tinyms::FileUtils::__APSPATH__=tinyms::FileUtils::parent(argv[0])->get_path(); 16 | 17 | JsCompressorFrame mainFrame(Gtk::WINDOW_TOPLEVEL); 18 | Gtk::Main::run(mainFrame); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /src/FilePreviewStore.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FilePreviewStore.h 3 | * 4 | * Created on: 2011-6-17 5 | * Author: tinyms 6 | */ 7 | 8 | #ifndef FILEPREVIEWSTORE_H_ 9 | #define FILEPREVIEWSTORE_H_ 10 | #include 11 | #include 12 | #include "FilePreviewColumnDefinition.h" 13 | using namespace std; 14 | namespace tinyms { 15 | class FilePreviewStore: public Gtk::ListStore { 16 | 17 | public: 18 | static Glib::RefPtr create(); 19 | FilePreviewColumnDefinition m_colsDef; 20 | virtual ~FilePreviewStore(); 21 | protected: 22 | FilePreviewStore(); 23 | virtual void evt_reordered(const TreeModel::Path& path, const TreeModel::iterator& iter, int* new_order); 24 | }; 25 | } 26 | #endif /* FILEPREVIEWSTORE_H_ */ 27 | -------------------------------------------------------------------------------- /src/ui/NewProjectDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NewProjectDialog.h 3 | * 4 | * Created on: 2011-7-8 5 | * Author: tinyms 6 | */ 7 | 8 | #ifndef NEWPROJECTDIALOG_H_ 9 | #define NEWPROJECTDIALOG_H_ 10 | #include 11 | namespace tinyms { 12 | class NewProjectDialog: public Gtk::Dialog { 13 | public: 14 | NewProjectDialog(); 15 | void createUI(); 16 | void create_option_panel_expander(); 17 | virtual ~NewProjectDialog(); 18 | public: 19 | Gtk::Label m_label1,m_label2; 20 | Gtk::FileChooserButton m_folder_chooserbtn; 21 | Gtk::Entry m_project_name_entry; 22 | Gtk::Frame m_option_panel_frame; 23 | Gtk::HBox m_option_panel_hbox; 24 | Gtk::CheckButton m_option_is_allinone,m_option_is_compress; 25 | }; 26 | } 27 | #endif /* NEWPROJECTDIALOG_H_ */ 28 | -------------------------------------------------------------------------------- /src/FilePreviewStore.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * FilePreviewStore.cpp 3 | * 4 | * Created on: 2011-6-17 5 | * Author: tinyms 6 | */ 7 | 8 | #include "FilePreviewStore.h" 9 | 10 | namespace tinyms { 11 | FilePreviewStore::FilePreviewStore() { 12 | // TODO Auto-generated constructor stub 13 | set_column_types(m_colsDef); 14 | this->signal_rows_reordered().connect(sigc::mem_fun(*this, &FilePreviewStore::evt_reordered)); 15 | } 16 | Glib::RefPtr FilePreviewStore::create() { 17 | return Glib::RefPtr(new FilePreviewStore()); 18 | } 19 | void FilePreviewStore::evt_reordered(const TreeModel::Path& path, const TreeModel::iterator& iter, int* new_order){ 20 | return; 21 | } 22 | FilePreviewStore::~FilePreviewStore() { 23 | // TODO Auto-generated destructor stub 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /product/etc/gtk-2.0/im-multipress.conf: -------------------------------------------------------------------------------- 1 | # Example configuration file for the GTK+ Multipress Input Method 2 | # Authored by Openismus GmbH, 2009. 3 | # 4 | # This file follows the GKeyFile format. On the left of the equal sign goes 5 | # the key that you press repeatedly to iterate through the text items listed 6 | # on the right-hand side. The list items are separated by semicolons ";" and 7 | # consist of one or more characters each. The backslash "\" is used to escape 8 | # characters; for instance "\;" for a literal semicolon. 9 | # 10 | # The example configuration below imitates the behavior of a standard mobile 11 | # phone by a major manufacturer, with German language setting. 12 | [keys] 13 | KP_1 = .;,;?;!;';";1;-;(;);@;/;:;_ 14 | KP_2 = a;b;c;2;ä;à;á;ã;â;å;æ;ç 15 | KP_3 = d;e;f;3;è;é;ë;ê;ð 16 | KP_4 = g;h;i;4;ì;í;î;ï 17 | KP_5 = j;k;l;5;£ 18 | KP_6 = m;n;o;6;ö;ò;ó;ô;õ;ø;ñ 19 | KP_7 = p;q;r;s;7;ß;$ 20 | KP_8 = t;u;v;8;ü;ù;ú;û 21 | KP_9 = w;x;y;z;9;ý;þ 22 | KP_0 = \s;0 23 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | JsCompressor,主要用来压缩、混淆JS(Javascript)与CSS,基于YUI Compressor,目的是方便不熟悉Java或者不喜欢命令行方式进行压缩的Web开发者使用。 2 | 3 | 功能: 4 | 1,可压缩、混淆整个目录(包括子目录)下的JS或者CSS文件,在同一个文件夹内生成*.min.js或者*.min.css。 5 | 2,压缩、混淆、合并所有js或者css到一个文件,在当前选择的文件夹下自动生成allinone.min.js或者allinone.min.css。 6 | 3,能上下调整顺序、移除后再进行压缩 7 | 4,能自动记住上一次压缩的文件夹及启动时打开待压缩文件列表 8 | 9 | 当前版本3.0,已经可以支持Windows和linux两个平台。 10 | 11 | 12 | http://www.tinyms.com/wp-content/uploads/2011/06/20110623000921.jpg 13 | 14 | http://www.tinyms.com/wp-content/uploads/2011/06/Screenshot-JsCompressor-v3.0.png 15 | 16 | 下载windows版: 17 | https://github.com/downloads/tinyms/jscompressor/JsCompressor.exe 18 | 19 | 下载ubuntu(11.04)版: 20 | https://github.com/downloads/tinyms/jscompressor/JsCompressor3.bin.ubuntu11.04.tar.gz 21 | 22 | 其它Linux平台: 23 | https://github.com/downloads/tinyms/jscompressor/JsCompressor3.src.tar.gz 24 | 解压后make,需要libgtkmm-dev支持,如果没有安装此包,make前先下载安装。 25 | 26 | 最后的建议是,js或者css文件尽量用utf-8编码,还有此软件不支持压缩如ExtJS一样大的框架,主要是文件太多了。 -------------------------------------------------------------------------------- /src/FileUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FileUtils.h 3 | * 4 | * Created on: 2011-6-14 5 | * Author: tinyms 6 | */ 7 | 8 | #ifndef FILEUTILS_H_ 9 | #define FILEUTILS_H_ 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include "cJSON/cJSON.h" 15 | using namespace std; 16 | namespace tinyms { 17 | 18 | class FileUtils { 19 | public: 20 | FileUtils(); 21 | virtual ~FileUtils(); 22 | public: 23 | static std::string __APSPATH__; 24 | public: 25 | static Glib::ustring escapeBlank(Glib::ustring path); 26 | static Glib::ustring read(Glib::ustring fileFullPath); 27 | static void write(const char* fileFullPath,const char* content); 28 | static void config_read(std::map& config); 29 | static void config_write(std::map& config); 30 | 31 | static Glib::RefPtr parent(const char* fileFullPath); 32 | static Glib::RefPtr touch(const char* fileFullPath); 33 | static void walkFiles(std::string currentDir,std::string include,std::string exclude,std::vector& files); 34 | }; 35 | 36 | } 37 | 38 | #endif /* FILEUTILS_H_ */ 39 | -------------------------------------------------------------------------------- /src/Makefile: -------------------------------------------------------------------------------- 1 | #Create by Tom(Tom@awaysoft.com) 2 | #2011-06-21 22:22:22 3 | #Copyright 2011(c) awaysoft.com 4 | 5 | JsCompressor : cJSON.o FilePreviewColumnDefinition.o FilePreviewStore.o FileUtils.o JsCompressorFrame.o JsCompressor.o 6 | g++ -o JsCompressor cJSON.o FilePreviewColumnDefinition.o FilePreviewStore.o FileUtils.o JsCompressorFrame.o JsCompressor.o `pkg-config --libs --cflags gtkmm-2.4` 7 | cJSON.o : cJSON/cJSON.c cJSON/cJSON.h 8 | g++ -c cJSON/cJSON.c -lm 9 | FilePreviewColumnDefinition.o : FilePreviewColumnDefinition.cpp FilePreviewColumnDefinition.h 10 | g++ -c FilePreviewColumnDefinition.cpp `pkg-config --libs --cflags gtkmm-2.4` 11 | FilePreviewStore.o : FilePreviewStore.cpp FilePreviewStore.h 12 | g++ -c FilePreviewStore.cpp `pkg-config --libs --cflags gtkmm-2.4` 13 | FileUtils.o : FileUtils.cpp FileUtils.h 14 | g++ -c FileUtils.cpp `pkg-config --libs --cflags gtkmm-2.4` 15 | JsCompressorFrame.o : JsCompressorFrame.cpp JsCompressorFrame.h 16 | g++ -c JsCompressorFrame.cpp `pkg-config --libs --cflags gtkmm-2.4` 17 | JsCompressor.o : JsCompressor.cpp 18 | g++ -c JsCompressor.cpp `pkg-config --libs --cflags gtkmm-2.4` 19 | clean: 20 | rm JsCompressor cJSON.o FilePreviewColumnDefinition.o FilePreviewStore.o FileUtils.o JsCompressorFrame.o JsCompressor.o 21 | -------------------------------------------------------------------------------- /src/ui/NewProjectDialog.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * NewProjectDialog.cpp 3 | * 4 | * Created on: 2011-7-8 5 | * Author: tinyms 6 | */ 7 | 8 | #include "NewProjectDialog.h" 9 | namespace tinyms { 10 | NewProjectDialog::NewProjectDialog() : 11 | m_label1("选择文件夹:"), m_label2("项目名称:"), m_folder_chooserbtn( 12 | "选择一个文件夹", Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER), m_option_panel_frame( 13 | "参数设置:") { 14 | // TODO Auto-generated constructor stub 15 | this->set_title("新建项目"); 16 | this->set_modal(true); 17 | this->set_opacity(0.97); 18 | this->set_position(Gtk::WIN_POS_CENTER); 19 | this->set_size_request(280, 220); 20 | this->set_border_width(10); 21 | this->createUI(); 22 | /// 23 | this->add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); 24 | this->add_button("创建", Gtk::RESPONSE_OK); 25 | } 26 | void NewProjectDialog::createUI() { 27 | Gtk::VBox* main = this->get_vbox(); 28 | this->m_label1.set_alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER); 29 | main->pack_start(this->m_label1, false, false, 0); 30 | main->pack_start(this->m_folder_chooserbtn, false, false, 5); 31 | this->create_option_panel_expander(); 32 | main->pack_start(this->m_option_panel_frame, true, true, 5); 33 | this->m_label2.set_alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER); 34 | main->pack_start(this->m_label2, false, false, 0); 35 | main->pack_start(this->m_project_name_entry, false, false, 5); 36 | this->show_all(); 37 | } 38 | void NewProjectDialog::create_option_panel_expander() { 39 | this->m_option_is_allinone.set_label("是否合并"); 40 | this->m_option_is_compress.set_label("是否混淆"); 41 | this->m_option_is_compress.set_active(true); 42 | this->m_option_panel_hbox.pack_start(this->m_option_is_compress, false, 43 | false, 5); 44 | this->m_option_panel_hbox.pack_start(this->m_option_is_allinone, false, 45 | false, 0); 46 | this->m_option_panel_frame.add(this->m_option_panel_hbox); 47 | } 48 | NewProjectDialog::~NewProjectDialog() { 49 | // TODO Auto-generated destructor stub 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /product/share/themes/MS-Windows/gtk-2.0/gtkrc: -------------------------------------------------------------------------------- 1 | gtk-icon-sizes = "gtk-menu=13,13:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24:gtk-dnd=32,32" 2 | gtk-toolbar-icon-size = small-toolbar 3 | 4 | # disable images in buttons. i've only seen ugly delphi apps use this feature. 5 | gtk-button-images = 0 6 | 7 | # enable/disable images in menus. most "stock" microsoft apps don't use these, except sparingly. 8 | # the office apps use them heavily, though. 9 | gtk-menu-images = 1 10 | 11 | # use the win32 button ordering instead of the GNOME HIG one, where applicable 12 | gtk-alternative-button-order = 1 13 | 14 | # use the win32 sort indicators direction, as in Explorer 15 | gtk-alternative-sort-arrows = 1 16 | 17 | # Windows users don't expect the PC Speaker beeping at them when they backspace in an empty textview and stuff like that 18 | gtk-error-bell = 0 19 | 20 | style "msw-default" 21 | { 22 | GtkWidget::interior-focus = 1 23 | GtkOptionMenu::indicator-size = { 9, 5 } 24 | GtkOptionMenu::indicator-spacing = { 7, 5, 2, 2 } 25 | GtkSpinButton::shadow-type = in 26 | 27 | # Owen and I disagree that these should be themable 28 | #GtkUIManager::add-tearoffs = 0 29 | #GtkComboBox::add-tearoffs = 0 30 | 31 | GtkComboBox::appears-as-list = 1 32 | GtkComboBox::focus-on-click = 0 33 | 34 | GOComboBox::add_tearoffs = 0 35 | 36 | GtkTreeView::allow-rules = 0 37 | GtkTreeView::expander-size = 12 38 | 39 | GtkExpander::expander-size = 12 40 | 41 | GtkScrolledWindow::scrollbar_spacing = 1 42 | 43 | GtkSeparatorMenuItem::horizontal-padding = 2 44 | 45 | engine "wimp" 46 | { 47 | } 48 | } 49 | class "*" style "msw-default" 50 | 51 | binding "ms-windows-tree-view" 52 | { 53 | bind "Right" { "expand-collapse-cursor-row" (1,1,0) } 54 | bind "Left" { "expand-collapse-cursor-row" (1,0,0) } 55 | } 56 | 57 | class "GtkTreeView" binding "ms-windows-tree-view" 58 | 59 | style "msw-combobox-thickness" = "msw-default" 60 | { 61 | xthickness = 0 62 | ythickness = 0 63 | } 64 | 65 | widget_class "*TreeView*ComboBox*" style "msw-combobox-thickness" 66 | widget_class "*ComboBox*GtkFrame*" style "msw-combobox-thickness" 67 | -------------------------------------------------------------------------------- /product/share/xml/libglade/glade-2.0.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 10 | 11 | 12 | 15 | 16 | 17 | 19 | 21 | 24 | 31 | 32 | 33 | 39 | 40 | 41 | 44 | 45 | 46 | 47 | 50 | 51 | 52 | 53 | 54 | 60 | 61 | 62 | 66 | 67 | 68 | 71 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | JsCompressor 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | ?children? 14 | ?name?=outputEntries\|?children?=?name?=entry\\\\\\\|\\\|?name?=entry\\\\\\\|\\\|\|| 15 | 16 | 17 | ?name? 18 | 19 | 20 | 21 | org.eclipse.cdt.make.core.append_environment 22 | true 23 | 24 | 25 | org.eclipse.cdt.make.core.buildArguments 26 | 27 | 28 | 29 | org.eclipse.cdt.make.core.buildCommand 30 | make 31 | 32 | 33 | org.eclipse.cdt.make.core.buildLocation 34 | ${workspace_loc:/JsCompressor/Debug} 35 | 36 | 37 | org.eclipse.cdt.make.core.contents 38 | org.eclipse.cdt.make.core.activeConfigSettings 39 | 40 | 41 | org.eclipse.cdt.make.core.enableAutoBuild 42 | false 43 | 44 | 45 | org.eclipse.cdt.make.core.enableCleanBuild 46 | true 47 | 48 | 49 | org.eclipse.cdt.make.core.enableFullBuild 50 | true 51 | 52 | 53 | org.eclipse.cdt.make.core.stopOnError 54 | true 55 | 56 | 57 | org.eclipse.cdt.make.core.useDefaultBuildCmd 58 | true 59 | 60 | 61 | 62 | 63 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 64 | full,incremental, 65 | 66 | 67 | 68 | 69 | 70 | org.eclipse.cdt.core.cnature 71 | org.eclipse.cdt.core.ccnature 72 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 73 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 74 | 75 | 76 | -------------------------------------------------------------------------------- /.settings/org.eclipse.cdt.managedbuilder.core.prefs: -------------------------------------------------------------------------------- 1 | #Sun May 22 00:14:52 CST 2011 2 | eclipse.preferences.version=1 3 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1023501516/CPATH/delimiter=; 4 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1023501516/CPATH/operation=remove 5 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1023501516/CPLUS_INCLUDE_PATH/delimiter=; 6 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1023501516/CPLUS_INCLUDE_PATH/operation=remove 7 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1023501516/C_INCLUDE_PATH/delimiter=; 8 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1023501516/C_INCLUDE_PATH/operation=remove 9 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1023501516/append=true 10 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1023501516/appendContributed=true 11 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1934006951/CPATH/delimiter=; 12 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1934006951/CPATH/operation=remove 13 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1934006951/CPLUS_INCLUDE_PATH/delimiter=; 14 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1934006951/CPLUS_INCLUDE_PATH/operation=remove 15 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1934006951/C_INCLUDE_PATH/delimiter=; 16 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1934006951/C_INCLUDE_PATH/operation=remove 17 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1934006951/append=true 18 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1934006951/appendContributed=true 19 | environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1023501516/LIBRARY_PATH/delimiter=; 20 | environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1023501516/LIBRARY_PATH/operation=remove 21 | environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1023501516/append=true 22 | environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1023501516/appendContributed=true 23 | environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.1934006951/LIBRARY_PATH/delimiter=; 24 | environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.1934006951/LIBRARY_PATH/operation=remove 25 | environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.1934006951/append=true 26 | environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.1934006951/appendContributed=true 27 | -------------------------------------------------------------------------------- /java/compressorhelper/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.run.all.processors=true 4 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 5 | application.title=compressorhelper 6 | application.vendor=tinyms 7 | build.classes.dir=${build.dir}/classes 8 | build.classes.excludes=**/*.java,**/*.form 9 | # This directory is removed when the project is cleaned: 10 | build.dir=build 11 | build.generated.dir=${build.dir}/generated 12 | build.generated.sources.dir=${build.dir}/generated-sources 13 | # Only compile against the classpath explicitly listed here: 14 | build.sysclasspath=ignore 15 | build.test.classes.dir=${build.dir}/test/classes 16 | build.test.results.dir=${build.dir}/test/results 17 | # Uncomment to specify the preferred debugger connection transport: 18 | #debug.transport=dt_socket 19 | debug.classpath=\ 20 | ${run.classpath} 21 | debug.test.classpath=\ 22 | ${run.test.classpath} 23 | # This directory is removed when the project is cleaned: 24 | dist.dir=dist 25 | dist.jar=${dist.dir}/compressorhelper.jar 26 | dist.javadoc.dir=${dist.dir}/javadoc 27 | endorsed.classpath= 28 | excludes= 29 | file.reference.commons-io-2.0.1.jar=../../lib/commons-io-2.0.1.jar 30 | file.reference.commons-lang-2.6.jar=../../lib/commons-lang-2.6.jar 31 | file.reference.yuicompressor.jar=../../lib/yuicompressor.jar 32 | includes=** 33 | jar.compress=false 34 | javac.classpath=\ 35 | ${file.reference.yuicompressor.jar}:\ 36 | ${file.reference.commons-io-2.0.1.jar}:\ 37 | ${file.reference.commons-lang-2.6.jar} 38 | # Space-separated list of extra javac options 39 | javac.compilerargs= 40 | javac.deprecation=false 41 | javac.processorpath=\ 42 | ${javac.classpath} 43 | javac.source=1.5 44 | javac.target=1.5 45 | javac.test.classpath=\ 46 | ${javac.classpath}:\ 47 | ${build.classes.dir} 48 | javac.test.processorpath=\ 49 | ${javac.test.classpath} 50 | javadoc.additionalparam= 51 | javadoc.author=false 52 | javadoc.encoding=${source.encoding} 53 | javadoc.noindex=false 54 | javadoc.nonavbar=false 55 | javadoc.notree=false 56 | javadoc.private=false 57 | javadoc.splitindex=true 58 | javadoc.use=true 59 | javadoc.version=false 60 | javadoc.windowtitle= 61 | main.class=com.tinyms.Compressorhelper 62 | manifest.file=manifest.mf 63 | meta.inf.dir=${src.dir}/META-INF 64 | mkdist.disabled=false 65 | platform.active=default_platform 66 | run.classpath=\ 67 | ${javac.classpath}:\ 68 | ${build.classes.dir} 69 | # Space-separated list of JVM arguments used when running the project 70 | # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value 71 | # or test-sys-prop.name=value to set system properties for unit tests): 72 | run.jvmargs= 73 | run.test.classpath=\ 74 | ${javac.test.classpath}:\ 75 | ${build.test.classes.dir} 76 | source.encoding=UTF-8 77 | src.dir=src 78 | test.src.dir=test 79 | -------------------------------------------------------------------------------- /src/JsCompressorFrame.h: -------------------------------------------------------------------------------- 1 | /* 2 | * JsCompressorFrame.h 3 | * gdk_keyval_name(event->keyval)<-keyboard mapping 4 | * Created on: 2011-5-20 5 | * Author: tinyms 6 | */ 7 | 8 | #ifndef JSCOMPRESSORFRAME_H_ 9 | #define JSCOMPRESSORFRAME_H_ 10 | 11 | #ifndef JSCOMPRESSOR_VERSION 12 | #define JSCOMPRESSOR_VERSION "5.0" 13 | #endif 14 | 15 | #ifndef OS_IS_WINDOWS 16 | #define OS_IS_WINDOWS true 17 | #endif 18 | 19 | #include 20 | #include 21 | #include 22 | using namespace std; 23 | #include 24 | #include 25 | 26 | #include "FileUtils.h" 27 | #include "FilePreviewColumnDefinition.h" 28 | #include "FilePreviewStore.h" 29 | #include "ui/NewProjectDialog.h" 30 | 31 | using namespace tinyms; 32 | 33 | class JsCompressorFrame: public Gtk::Window { 34 | public: 35 | JsCompressorFrame(Gtk::WindowType type); 36 | virtual ~JsCompressorFrame(); 37 | protected: 38 | /** 39 | * layouts 40 | */ 41 | Gtk::VBox m_main_vbox; 42 | Gtk::HBox m_toolbar_hbox, m_top_hbox, m_center_head_hbox, 43 | m_center_foot_hbox, m_bottom_hbox; 44 | /** 45 | * text view 46 | */ 47 | Gtk::Entry m_root_path_entry; 48 | Gtk::ScrolledWindow m_scrolledWindow4ConsoleWin; 49 | Gtk::TextView m_consoleWin; 50 | Gtk::Label m_selected_path_label; 51 | Gtk::Label m_tipConsoleWin; 52 | Gtk::CheckButton m_jsOrCssChkbox; 53 | Gtk::Button m_select_folder_btn, m_compress_btn; 54 | Gtk::Label m_home_label; 55 | Gtk::EventBox m_home_eventbox; 56 | // toolbuttons 57 | Gtk::ToolButton m_folder_open_toolbtn, m_up_toolbtn, m_down_toolbtn, 58 | m_remove_toolbtn, m_refresh_toolbtn,m_package_toolbtn; 59 | Gtk::Image m_folder_open_image, m_up_image, m_down_image, m_remove_image, 60 | m_refresh_image,m_package_image; 61 | /** 62 | * toolbar 63 | */ 64 | Gtk::ToolPalette m_filepreview_toolpalette; 65 | /** 66 | * grid 67 | */ 68 | Glib::RefPtr m_filePreviewStore; 69 | Gtk::TreeView m_filePreviewGrid; 70 | Gtk::ScrolledWindow m_ScrolledWindow4FilePreview; 71 | 72 | // 73 | std::vector files; 74 | Glib::RefPtr m_logBuffer; 75 | std::string seletedPath; 76 | Gtk::TreeModel::iterator current; 77 | protected: 78 | virtual bool evt_gohome_enter(GdkEventCrossing* eb); 79 | virtual bool evt_gohome_clicked(GdkEventButton* eb); 80 | virtual void evt_jsOrCssChkbox_clicked(); 81 | virtual void evt_selectFolderBtn_clicked(); 82 | virtual void evt_executeBtn_clicked(); 83 | // 84 | void init(); 85 | void scan_files(std::string path); 86 | void init_logfile(); 87 | void read_logfile(); 88 | void clear_log(); 89 | void iter_filelist(); 90 | //toolbutton bind events 91 | virtual void evt_buildbtn_clicked(); 92 | virtual void evt_uptoolbtn_clicked(); 93 | virtual void evt_downtoolbtn_clicked(); 94 | virtual void evt_removetoolbtn_clicked(); 95 | virtual void evt_refreshtoolbtn_clicked(); 96 | // 97 | void bind_toolbutton4treeview_events(); 98 | //create option panel 99 | void create_option_panel_expander(); 100 | }; 101 | 102 | #endif /* JSCOMPRESSORFRAME_H_ */ 103 | -------------------------------------------------------------------------------- /src/FileUtils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * FileUtils.cpp 3 | * 4 | * Created on: 2011-6-14 5 | * Author: tinyms 6 | */ 7 | #include 8 | #include 9 | #include "FileUtils.h" 10 | using namespace std; 11 | namespace tinyms { 12 | 13 | FileUtils::FileUtils() { 14 | // TODO Auto-generated constructor stub 15 | 16 | } 17 | Glib::ustring FileUtils::escapeBlank(Glib::ustring path) { 18 | Glib::ustring winPath(""); 19 | Glib::RefPtr rpl = Glib::Regex::create(" "); 20 | std::vector arr = rpl->split(path); 21 | for (size_t k = 0; k < arr.size(); k++) { 22 | if (k != 0) { 23 | winPath.append("\\ "); 24 | } 25 | winPath.append(arr[k]); 26 | } 27 | return winPath; 28 | //Glib::ustring result = rpl->replace(path.c_str(),path.size(),0,rplStr); 29 | //std::cout< txtfile = Gio::File::create_for_path(fileFullPath); 33 | char* content; 34 | gsize length; 35 | txtfile->load_contents(content, length); 36 | Glib::ustring txtcontent(content); 37 | return txtcontent; 38 | } 39 | void FileUtils::write(const char* fileFullPath, const char* content) { 40 | Glib::RefPtr txtfile = Gio::File::create_for_path(fileFullPath); 41 | if (!txtfile->query_exists()) { 42 | txtfile->create_file()->write(content); 43 | } else { 44 | txtfile->remove(); 45 | txtfile->create_file()->write(content); 46 | } 47 | } 48 | void FileUtils::config_read(std::map& config) { 49 | std::string config_path = __APSPATH__ + "/_config_"; 50 | if(!tinyms::FileUtils::touch(config_path.c_str())->query_exists()){ 51 | return; 52 | } 53 | cJSON *json = cJSON_Parse(read(config_path).c_str()); 54 | if(!json)return; 55 | if (json->type == cJSON_Object) { 56 | cJSON* selectedPath = cJSON_GetObjectItem(json,"preSelectedPath"); 57 | config["preSelectedPath"] = selectedPath->valuestring; 58 | //std::cout<& config) { 62 | cJSON *root; 63 | char* json; 64 | root = cJSON_CreateObject(); 65 | std::map::iterator it; 66 | for (it = config.begin(); it != config.end(); it++) { 67 | std::string key = (*it).first; 68 | std::string value = (*it).second; 69 | cJSON_AddStringToObject(root,key.c_str(),value.c_str()); 70 | } 71 | json = cJSON_Print(root); 72 | std::string config_path = __APSPATH__ + "/_config_"; 73 | write(config_path.c_str(), json); 74 | free(json); 75 | } 76 | std::string FileUtils::__APSPATH__ = ""; 77 | 78 | Glib::RefPtr FileUtils::parent(const char* fileFullPath) { 79 | return Gio::File::create_for_path(fileFullPath)->get_parent(); 80 | } 81 | 82 | Glib::RefPtr FileUtils::touch(const char* fileFullPath) { 83 | return Gio::File::create_for_path(fileFullPath); 84 | } 85 | void FileUtils::walkFiles(std::string currentDir, std::string include, 86 | std::string exclude, std::vector& files) { 87 | Glib::Dir dir(currentDir); 88 | Glib::PatternSpec regx(include); 89 | Glib::PatternSpec regx1(exclude); 90 | for (Glib::DirIterator it = dir.begin(); it != dir.end(); ++it) { 91 | std::string file = *it; 92 | std::string fullPath = currentDir + "/" + file; 93 | if (regx.match(file) && !regx1.match(file)) { 94 | files.push_back(fullPath); 95 | } 96 | Glib::RefPtr dirOrFile = 97 | Gio::File::create_for_path(fullPath); 98 | if (dirOrFile->query_file_type() == Gio::FILE_TYPE_DIRECTORY) { 99 | walkFiles(fullPath, include, exclude, files); 100 | } 101 | } 102 | dir.close(); 103 | } 104 | FileUtils::~FileUtils() { 105 | // TODO Auto-generated destructor stub 106 | } 107 | 108 | } 109 | -------------------------------------------------------------------------------- /java/compressorhelper/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project compressorhelper. 12 | 13 | 74 | 75 | -------------------------------------------------------------------------------- /product/share/themes/Emacs/gtk-2.0-key/gtkrc: -------------------------------------------------------------------------------- 1 | # GTK - The GIMP Toolkit 2 | # Copyright (C) 2002 Owen Taylor 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation; either 7 | # version 2 of the License, or (at your option) any later version. 8 | # 9 | # This library is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # Lesser General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Lesser General Public 15 | # License along with this library; if not, write to the 16 | # Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | # Boston, MA 02111-1307, USA. 18 | 19 | 20 | # Modified by the GTK+ Team and others 1997-2000. See the AUTHORS 21 | # file for a list of people on the GTK+ Team. See the ChangeLog 22 | # files for a list of changes. These files are distributed with 23 | # GTK+ at ftp://ftp.gtk.org/pub/gtk/. 24 | 25 | 26 | # 27 | # A keybinding set implementing emacs-like keybindings 28 | # 29 | 30 | # 31 | # Bindings for GtkTextView and GtkEntry 32 | # 33 | binding "gtk-emacs-text-entry" 34 | { 35 | bind "b" { "move-cursor" (logical-positions, -1, 0) } 36 | bind "b" { "move-cursor" (logical-positions, -1, 1) } 37 | bind "f" { "move-cursor" (logical-positions, 1, 0) } 38 | bind "f" { "move-cursor" (logical-positions, 1, 1) } 39 | 40 | bind "b" { "move-cursor" (words, -1, 0) } 41 | bind "b" { "move-cursor" (words, -1, 1) } 42 | bind "f" { "move-cursor" (words, 1, 0) } 43 | bind "f" { "move-cursor" (words, 1, 1) } 44 | 45 | bind "a" { "move-cursor" (paragraph-ends, -1, 0) } 46 | bind "a" { "move-cursor" (paragraph-ends, -1, 1) } 47 | bind "e" { "move-cursor" (paragraph-ends, 1, 0) } 48 | bind "e" { "move-cursor" (paragraph-ends, 1, 1) } 49 | 50 | bind "w" { "cut-clipboard" () } 51 | bind "y" { "paste-clipboard" () } 52 | 53 | bind "d" { "delete-from-cursor" (chars, 1) } 54 | bind "d" { "delete-from-cursor" (word-ends, 1) } 55 | bind "k" { "delete-from-cursor" (paragraph-ends, 1) } 56 | bind "backslash" { "delete-from-cursor" (whitespace, 1) } 57 | 58 | bind "space" { "delete-from-cursor" (whitespace, 1) 59 | "insert-at-cursor" (" ") } 60 | bind "KP_Space" { "delete-from-cursor" (whitespace, 1) 61 | "insert-at-cursor" (" ") } 62 | 63 | # 64 | # Some non-Emacs keybindings people are attached to 65 | # 66 | bind "u" { 67 | "move-cursor" (paragraph-ends, -1, 0) 68 | "delete-from-cursor" (paragraph-ends, 1) 69 | } 70 | bind "h" { "delete-from-cursor" (chars, -1) } 71 | bind "w" { "delete-from-cursor" (word-ends, -1) } 72 | } 73 | 74 | # 75 | # Bindings for GtkTextView 76 | # 77 | binding "gtk-emacs-text-view" 78 | { 79 | bind "p" { "move-cursor" (display-lines, -1, 0) } 80 | bind "p" { "move-cursor" (display-lines, -1, 1) } 81 | bind "n" { "move-cursor" (display-lines, 1, 0) } 82 | bind "n" { "move-cursor" (display-lines, 1, 1) } 83 | 84 | bind "space" { "set-anchor" () } 85 | bind "KP_Space" { "set-anchor" () } 86 | } 87 | 88 | # 89 | # Bindings for GtkTreeView 90 | # 91 | binding "gtk-emacs-tree-view" 92 | { 93 | bind "s" { "start-interactive-search" () } 94 | bind "f" { "move-cursor" (logical-positions, 1) } 95 | bind "b" { "move-cursor" (logical-positions, -1) } 96 | } 97 | 98 | # 99 | # Bindings for menus 100 | # 101 | binding "gtk-emacs-menu" 102 | { 103 | bind "n" { "move-current" (next) } 104 | bind "p" { "move-current" (prev) } 105 | bind "f" { "move-current" (child) } 106 | bind "b" { "move-current" (parent) } 107 | } 108 | 109 | class "GtkEntry" binding "gtk-emacs-text-entry" 110 | class "GtkTextView" binding "gtk-emacs-text-entry" 111 | class "GtkTextView" binding "gtk-emacs-text-view" 112 | class "GtkTreeView" binding "gtk-emacs-tree-view" 113 | class "GtkMenuShell" binding "gtk-emacs-menu" 114 | -------------------------------------------------------------------------------- /src/cJSON/cJSON.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009 Dave Gamble 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | */ 22 | 23 | #ifndef cJSON__h 24 | #define cJSON__h 25 | 26 | #ifdef __cplusplus 27 | extern "C" 28 | { 29 | #endif 30 | 31 | /* cJSON Types: */ 32 | #define cJSON_False 0 33 | #define cJSON_True 1 34 | #define cJSON_NULL 2 35 | #define cJSON_Number 3 36 | #define cJSON_String 4 37 | #define cJSON_Array 5 38 | #define cJSON_Object 6 39 | 40 | #define cJSON_IsReference 256 41 | 42 | /* The cJSON structure: */ 43 | typedef struct cJSON { 44 | struct cJSON *next,*prev; /* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */ 45 | struct cJSON *child; /* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */ 46 | 47 | int type; /* The type of the item, as above. */ 48 | 49 | char *valuestring; /* The item's string, if type==cJSON_String */ 50 | int valueint; /* The item's number, if type==cJSON_Number */ 51 | double valuedouble; /* The item's number, if type==cJSON_Number */ 52 | 53 | char *string; /* The item's name string, if this item is the child of, or is in the list of subitems of an object. */ 54 | } cJSON; 55 | 56 | typedef struct cJSON_Hooks { 57 | void *(*malloc_fn)(size_t sz); 58 | void (*free_fn)(void *ptr); 59 | } cJSON_Hooks; 60 | 61 | /* Supply malloc, realloc and free functions to cJSON */ 62 | extern void cJSON_InitHooks(cJSON_Hooks* hooks); 63 | 64 | 65 | /* Supply a block of JSON, and this returns a cJSON object you can interrogate. Call cJSON_Delete when finished. */ 66 | extern cJSON *cJSON_Parse(const char *value); 67 | /* Render a cJSON entity to text for transfer/storage. Free the char* when finished. */ 68 | extern char *cJSON_Print(cJSON *item); 69 | /* Render a cJSON entity to text for transfer/storage without any formatting. Free the char* when finished. */ 70 | extern char *cJSON_PrintUnformatted(cJSON *item); 71 | /* Delete a cJSON entity and all subentities. */ 72 | extern void cJSON_Delete(cJSON *c); 73 | 74 | /* Returns the number of items in an array (or object). */ 75 | extern int cJSON_GetArraySize(cJSON *array); 76 | /* Retrieve item number "item" from array "array". Returns NULL if unsuccessful. */ 77 | extern cJSON *cJSON_GetArrayItem(cJSON *array,int item); 78 | /* Get item "string" from object. Case insensitive. */ 79 | extern cJSON *cJSON_GetObjectItem(cJSON *object,const char *string); 80 | 81 | /* For analysing failed parses. This returns a pointer to the parse error. You'll probably need to look a few chars back to make sense of it. Defined when cJSON_Parse() returns 0. 0 when cJSON_Parse() succeeds. */ 82 | extern const char *cJSON_GetErrorPtr(); 83 | 84 | /* These calls create a cJSON item of the appropriate type. */ 85 | extern cJSON *cJSON_CreateNull(); 86 | extern cJSON *cJSON_CreateTrue(); 87 | extern cJSON *cJSON_CreateFalse(); 88 | extern cJSON *cJSON_CreateBool(int b); 89 | extern cJSON *cJSON_CreateNumber(double num); 90 | extern cJSON *cJSON_CreateString(const char *string); 91 | extern cJSON *cJSON_CreateArray(); 92 | extern cJSON *cJSON_CreateObject(); 93 | 94 | /* These utilities create an Array of count items. */ 95 | extern cJSON *cJSON_CreateIntArray(int *numbers,int count); 96 | extern cJSON *cJSON_CreateFloatArray(float *numbers,int count); 97 | extern cJSON *cJSON_CreateDoubleArray(double *numbers,int count); 98 | extern cJSON *cJSON_CreateStringArray(const char **strings,int count); 99 | 100 | /* Append item to the specified array/object. */ 101 | extern void cJSON_AddItemToArray(cJSON *array, cJSON *item); 102 | extern void cJSON_AddItemToObject(cJSON *object,const char *string,cJSON *item); 103 | /* Append reference to item to the specified array/object. Use this when you want to add an existing cJSON to a new cJSON, but don't want to corrupt your existing cJSON. */ 104 | extern void cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item); 105 | extern void cJSON_AddItemReferenceToObject(cJSON *object,const char *string,cJSON *item); 106 | 107 | /* Remove/Detatch items from Arrays/Objects. */ 108 | extern cJSON *cJSON_DetachItemFromArray(cJSON *array,int which); 109 | extern void cJSON_DeleteItemFromArray(cJSON *array,int which); 110 | extern cJSON *cJSON_DetachItemFromObject(cJSON *object,const char *string); 111 | extern void cJSON_DeleteItemFromObject(cJSON *object,const char *string); 112 | 113 | /* Update array items. */ 114 | extern void cJSON_ReplaceItemInArray(cJSON *array,int which,cJSON *newitem); 115 | extern void cJSON_ReplaceItemInObject(cJSON *object,const char *string,cJSON *newitem); 116 | 117 | #define cJSON_AddNullToObject(object,name) cJSON_AddItemToObject(object, name, cJSON_CreateNull()) 118 | #define cJSON_AddTrueToObject(object,name) cJSON_AddItemToObject(object, name, cJSON_CreateTrue()) 119 | #define cJSON_AddFalseToObject(object,name) cJSON_AddItemToObject(object, name, cJSON_CreateFalse()) 120 | #define cJSON_AddNumberToObject(object,name,n) cJSON_AddItemToObject(object, name, cJSON_CreateNumber(n)) 121 | #define cJSON_AddStringToObject(object,name,s) cJSON_AddItemToObject(object, name, cJSON_CreateString(s)) 122 | 123 | #ifdef __cplusplus 124 | } 125 | #endif 126 | 127 | #endif 128 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | 9 | This version of the GNU Lesser General Public License incorporates 10 | the terms and conditions of version 3 of the GNU General Public 11 | License, supplemented by the additional permissions listed below. 12 | 13 | 0. Additional Definitions. 14 | 15 | As used herein, "this License" refers to version 3 of the GNU Lesser 16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 17 | General Public License. 18 | 19 | "The Library" refers to a covered work governed by this License, 20 | other than an Application or a Combined Work as defined below. 21 | 22 | An "Application" is any work that makes use of an interface provided 23 | by the Library, but which is not otherwise based on the Library. 24 | Defining a subclass of a class defined by the Library is deemed a mode 25 | of using an interface provided by the Library. 26 | 27 | A "Combined Work" is a work produced by combining or linking an 28 | Application with the Library. The particular version of the Library 29 | with which the Combined Work was made is also called the "Linked 30 | Version". 31 | 32 | The "Minimal Corresponding Source" for a Combined Work means the 33 | Corresponding Source for the Combined Work, excluding any source code 34 | for portions of the Combined Work that, considered in isolation, are 35 | based on the Application, and not on the Linked Version. 36 | 37 | The "Corresponding Application Code" for a Combined Work means the 38 | object code and/or source code for the Application, including any data 39 | and utility programs needed for reproducing the Combined Work from the 40 | Application, but excluding the System Libraries of the Combined Work. 41 | 42 | 1. Exception to Section 3 of the GNU GPL. 43 | 44 | You may convey a covered work under sections 3 and 4 of this License 45 | without being bound by section 3 of the GNU GPL. 46 | 47 | 2. Conveying Modified Versions. 48 | 49 | If you modify a copy of the Library, and, in your modifications, a 50 | facility refers to a function or data to be supplied by an Application 51 | that uses the facility (other than as an argument passed when the 52 | facility is invoked), then you may convey a copy of the modified 53 | version: 54 | 55 | a) under this License, provided that you make a good faith effort to 56 | ensure that, in the event an Application does not supply the 57 | function or data, the facility still operates, and performs 58 | whatever part of its purpose remains meaningful, or 59 | 60 | b) under the GNU GPL, with none of the additional permissions of 61 | this License applicable to that copy. 62 | 63 | 3. Object Code Incorporating Material from Library Header Files. 64 | 65 | The object code form of an Application may incorporate material from 66 | a header file that is part of the Library. You may convey such object 67 | code under terms of your choice, provided that, if the incorporated 68 | material is not limited to numerical parameters, data structure 69 | layouts and accessors, or small macros, inline functions and templates 70 | (ten or fewer lines in length), you do both of the following: 71 | 72 | a) Give prominent notice with each copy of the object code that the 73 | Library is used in it and that the Library and its use are 74 | covered by this License. 75 | 76 | b) Accompany the object code with a copy of the GNU GPL and this license 77 | document. 78 | 79 | 4. Combined Works. 80 | 81 | You may convey a Combined Work under terms of your choice that, 82 | taken together, effectively do not restrict modification of the 83 | portions of the Library contained in the Combined Work and reverse 84 | engineering for debugging such modifications, if you also do each of 85 | the following: 86 | 87 | a) Give prominent notice with each copy of the Combined Work that 88 | the Library is used in it and that the Library and its use are 89 | covered by this License. 90 | 91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 92 | document. 93 | 94 | c) For a Combined Work that displays copyright notices during 95 | execution, include the copyright notice for the Library among 96 | these notices, as well as a reference directing the user to the 97 | copies of the GNU GPL and this license document. 98 | 99 | d) Do one of the following: 100 | 101 | 0) Convey the Minimal Corresponding Source under the terms of this 102 | License, and the Corresponding Application Code in a form 103 | suitable for, and under terms that permit, the user to 104 | recombine or relink the Application with a modified version of 105 | the Linked Version to produce a modified Combined Work, in the 106 | manner specified by section 6 of the GNU GPL for conveying 107 | Corresponding Source. 108 | 109 | 1) Use a suitable shared library mechanism for linking with the 110 | Library. A suitable mechanism is one that (a) uses at run time 111 | a copy of the Library already present on the user's computer 112 | system, and (b) will operate properly with a modified version 113 | of the Library that is interface-compatible with the Linked 114 | Version. 115 | 116 | e) Provide Installation Information, but only if you would otherwise 117 | be required to provide such information under section 6 of the 118 | GNU GPL, and only to the extent that such information is 119 | necessary to install and execute a modified version of the 120 | Combined Work produced by recombining or relinking the 121 | Application with a modified version of the Linked Version. (If 122 | you use option 4d0, the Installation Information must accompany 123 | the Minimal Corresponding Source and Corresponding Application 124 | Code. If you use option 4d1, you must provide the Installation 125 | Information in the manner specified by section 6 of the GNU GPL 126 | for conveying Corresponding Source.) 127 | 128 | 5. Combined Libraries. 129 | 130 | You may place library facilities that are a work based on the 131 | Library side by side in a single library together with other library 132 | facilities that are not Applications and are not covered by this 133 | License, and convey such a combined library under terms of your 134 | choice, if you do both of the following: 135 | 136 | a) Accompany the combined library with a copy of the same work based 137 | on the Library, uncombined with any other library facilities, 138 | conveyed under the terms of this License. 139 | 140 | b) Give prominent notice with the combined library that part of it 141 | is a work based on the Library, and explaining where to find the 142 | accompanying uncombined form of the same work. 143 | 144 | 6. Revised Versions of the GNU Lesser General Public License. 145 | 146 | The Free Software Foundation may publish revised and/or new versions 147 | of the GNU Lesser General Public License from time to time. Such new 148 | versions will be similar in spirit to the present version, but may 149 | differ in detail to address new problems or concerns. 150 | 151 | Each version is given a distinguishing version number. If the 152 | Library as you received it specifies that a certain numbered version 153 | of the GNU Lesser General Public License "or any later version" 154 | applies to it, you have the option of following the terms and 155 | conditions either of that published version or of any later version 156 | published by the Free Software Foundation. If the Library as you 157 | received it does not specify a version number of the GNU Lesser 158 | General Public License, you may choose any version of the GNU Lesser 159 | General Public License ever published by the Free Software Foundation. 160 | 161 | If the Library as you received it specifies that a proxy can decide 162 | whether future versions of the GNU Lesser General Public License shall 163 | apply, that proxy's public statement of acceptance of any version is 164 | permanent authorization for you to choose that version for the 165 | Library. -------------------------------------------------------------------------------- /java/compressorhelper/src/com/tinyms/Compressorhelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * for batch js or css compress. 3 | * author: tinyms. 4 | */ 5 | package com.tinyms; 6 | 7 | import com.yahoo.platform.yui.compressor.CssCompressor; 8 | import com.yahoo.platform.yui.compressor.JavaScriptCompressor; 9 | import java.io.File; 10 | import java.io.FileInputStream; 11 | import java.io.FileNotFoundException; 12 | import java.io.FileOutputStream; 13 | import java.io.IOException; 14 | import java.io.InputStreamReader; 15 | import java.io.OutputStreamWriter; 16 | import java.io.Reader; 17 | import java.io.UnsupportedEncodingException; 18 | import java.io.Writer; 19 | import java.util.ArrayList; 20 | import java.util.HashMap; 21 | import java.util.List; 22 | import java.util.Map; 23 | import java.util.logging.Level; 24 | import java.util.logging.Logger; 25 | import org.apache.commons.io.FileUtils; 26 | import org.apache.commons.io.FilenameUtils; 27 | import org.apache.commons.lang.ArrayUtils; 28 | import org.apache.commons.lang.StringUtils; 29 | import org.mozilla.javascript.ErrorReporter; 30 | import org.mozilla.javascript.EvaluatorException; 31 | 32 | /** 33 | * 34 | * @author tinyms 35 | */ 36 | public class Compressorhelper { 37 | 38 | private static final Logger log = Logger.getAnonymousLogger(); 39 | 40 | /** 41 | * @param args the command line arguments 42 | */ 43 | public static void main(String[] args) { 44 | // TODO code application logic here 45 | Map argMap = new HashMap(); 46 | for (int k = 0; k < args.length; k = k + 2) { 47 | argMap.put(args[k], args[k + 1]); 48 | System.out.print(" " + args[k] + " " + args[k + 1] + "\r\n"); 49 | } 50 | String _folder = argMap.get("-selected-folder"); 51 | String _files = argMap.get("-files"); 52 | String _allInOne = argMap.get("-aio"); 53 | String _type = argMap.get("-type"); 54 | if (StringUtils.isNotBlank(_files)) { 55 | List minFiles = new ArrayList(); 56 | String[] files = StringUtils.split(_files, ";"); 57 | if (ArrayUtils.isNotEmpty(files)) { 58 | final StringBuffer sb1 = new StringBuffer(); 59 | for (String fileFullPath : files) { 60 | String baseName = FilenameUtils.getBaseName(fileFullPath); 61 | String outputFileName = FilenameUtils.getFullPath(fileFullPath) + baseName + ".min." + FilenameUtils.getExtension(fileFullPath); 62 | minFiles.add(outputFileName); 63 | File output = new File(outputFileName); 64 | if (output.exists()) { 65 | output.delete(); 66 | } 67 | compress(new File(fileFullPath), output, _type, _folder, sb1); 68 | } 69 | if (StringUtils.isNotBlank(_allInOne)) { 70 | StringBuilder sb = new StringBuilder(); 71 | for (String minFilePath : minFiles) { 72 | File minFile = new File(minFilePath); 73 | if (minFile.exists()) { 74 | try { 75 | sb.append(FileUtils.readFileToString(minFile, "UTF-8")); 76 | } catch (IOException ex) { 77 | Logger.getLogger(Compressorhelper.class.getName()).log(Level.SEVERE, null, ex); 78 | } 79 | } 80 | } 81 | try { 82 | File output4aio = new File(_folder + "/allinone.min." + _type); 83 | if (output4aio.exists()) { 84 | output4aio.delete(); 85 | } 86 | FileUtils.writeStringToFile(output4aio, sb.toString(), "UTF-8"); 87 | } catch (IOException ex) { 88 | Logger.getLogger(Compressorhelper.class.getName()).log(Level.SEVERE, null, ex); 89 | } 90 | } 91 | } 92 | } 93 | } 94 | 95 | public static String compress(final File f, File output, String _type, String _folder, final StringBuffer sb) { 96 | try { 97 | try { 98 | Reader in = new InputStreamReader(new FileInputStream(f), "UTF-8"); 99 | if ("js".equals(_type)) { 100 | try { 101 | JavaScriptCompressor compressor = new JavaScriptCompressor(in, new ErrorReporter() { 102 | 103 | @Override 104 | public void warning(String message, String sourceName, 105 | int line, String lineSource, int lineOffset) { 106 | if (line < 0) { 107 | //System.err.println("[WARNING] " + message+"\n"); 108 | sb.append("[FILE] ").append(f.getAbsolutePath()).append("\n"); 109 | sb.append("[WARNING] ").append(message).append("\n\n"); 110 | } else { 111 | //System.err.println("[WARNING] " + line + ':' + lineOffset + ':' + message+"\n"); 112 | sb.append("[FILE] ").append(f.getAbsolutePath()).append("\n"); 113 | sb.append("[WARNING] ").append(line).append(':').append(lineOffset).append(':').append(message).append("\n\n"); 114 | } 115 | } 116 | 117 | @Override 118 | public void error(String message, String sourceName, 119 | int line, String lineSource, int lineOffset) { 120 | if (line < 0) { 121 | //System.err.println("[ERROR] " + message+"\n"); 122 | sb.append("[FILE] ").append(f.getAbsolutePath()).append("\n"); 123 | sb.append("[ERROR] ").append(message).append("\n\n"); 124 | } else { 125 | //System.err.println("[ERROR] " + line + ':' + lineOffset + ':' + message+"\n"); 126 | sb.append("[FILE] ").append(f.getAbsolutePath()).append("\n"); 127 | sb.append("[ERROR] ").append(line).append(':').append(lineOffset).append(':').append(message).append("\n\n"); 128 | } 129 | } 130 | 131 | @Override 132 | public EvaluatorException runtimeError(String message, String sourceName, 133 | int line, String lineSource, int lineOffset) { 134 | error(message, sourceName, line, lineSource, lineOffset); 135 | return new EvaluatorException(message); 136 | } 137 | }); 138 | in.close(); 139 | in = null; 140 | Writer out = new OutputStreamWriter(new FileOutputStream(output), "UTF-8"); 141 | compressor.compress(out, -1, true, true, true, true); 142 | out.close(); 143 | } catch (IOException ex) { 144 | log.info(ex.getLocalizedMessage()); 145 | } catch (org.mozilla.javascript.EvaluatorException ex) { 146 | log.info(ex.getLocalizedMessage()); 147 | } 148 | } else if ("css".equals(_type)) { 149 | try { 150 | CssCompressor compressor = new CssCompressor(in); 151 | in.close(); 152 | in = null; 153 | Writer out = new OutputStreamWriter(new FileOutputStream(output), "UTF-8"); 154 | compressor.compress(out, -1); 155 | out.close(); 156 | } catch (IOException ex) { 157 | log.info(ex.getLocalizedMessage()); 158 | } 159 | } 160 | } catch (FileNotFoundException ex) { 161 | log.info(ex.getLocalizedMessage()); 162 | } 163 | } catch (UnsupportedEncodingException ex) { 164 | log.info(ex.getLocalizedMessage()); 165 | } 166 | try { 167 | FileUtils.writeStringToFile(new File(_folder + "/console.log"), sb.toString(),"UTF-8"); 168 | } catch (IOException ex) { 169 | Logger.getLogger(Compressorhelper.class.getName()).log(Level.SEVERE, null, ex); 170 | } 171 | return ""; 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /src/cJSON/README: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009 Dave Gamble 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | */ 22 | 23 | Welcome to cJSON. 24 | 25 | cJSON aims to be the dumbest possible parser that you can get your job done with. 26 | It's a single file of C, and a single header file. 27 | 28 | JSON is described best here: http://www.json.org/ 29 | It's like XML, but fat-free. You use it to move data around, store things, or just 30 | generally represent your program's state. 31 | 32 | 33 | First up, how do I build? 34 | Add cJSON.c to your project, and put cJSON.h somewhere in the header search path. 35 | For example, to build the test app: 36 | 37 | gcc cJSON.c test.c -o test -lm 38 | ./test 39 | 40 | 41 | As a library, cJSON exists to take away as much legwork as it can, but not get in your way. 42 | As a point of pragmatism (i.e. ignoring the truth), I'm going to say that you can use it 43 | in one of two modes: Auto and Manual. Let's have a quick run-through. 44 | 45 | 46 | I lifted some JSON from this page: http://www.json.org/fatfree.html 47 | That page inspired me to write cJSON, which is a parser that tries to share the same 48 | philosophy as JSON itself. Simple, dumb, out of the way. 49 | 50 | Some JSON: 51 | { 52 | "name": "Jack (\"Bee\") Nimble", 53 | "format": { 54 | "type": "rect", 55 | "width": 1920, 56 | "height": 1080, 57 | "interlace": false, 58 | "frame rate": 24 59 | } 60 | } 61 | 62 | Assume that you got this from a file, a webserver, or magic JSON elves, whatever, 63 | you have a char * to it. Everything is a cJSON struct. 64 | Get it parsed: 65 | cJSON *root = cJSON_Parse(my_json_string); 66 | 67 | This is an object. We're in C. We don't have objects. But we do have structs. 68 | What's the framerate? 69 | 70 | cJSON *format = cJSON_GetObjectItem(root,"format"); 71 | int framerate = cJSON_GetObjectItem(format,"frame rate")->valueint; 72 | 73 | 74 | Want to change the framerate? 75 | cJSON_GetObjectItem(format,"frame rate")->valueint=25; 76 | 77 | Back to disk? 78 | char *rendered=cJSON_Print(root); 79 | 80 | Finished? Delete the root (this takes care of everything else). 81 | cJSON_Delete(root); 82 | 83 | That's AUTO mode. If you're going to use Auto mode, you really ought to check pointers 84 | before you dereference them. If you want to see how you'd build this struct in code? 85 | cJSON *root,*fmt; 86 | root=cJSON_CreateObject(); 87 | cJSON_AddItemToObject(root, "name", cJSON_CreateString("Jack (\"Bee\") Nimble")); 88 | cJSON_AddItemToObject(root, "format", fmt=cJSON_CreateObject()); 89 | cJSON_AddStringToObject(fmt,"type", "rect"); 90 | cJSON_AddNumberToObject(fmt,"width", 1920); 91 | cJSON_AddNumberToObject(fmt,"height", 1080); 92 | cJSON_AddFalseToObject (fmt,"interlace"); 93 | cJSON_AddNumberToObject(fmt,"frame rate", 24); 94 | 95 | Hopefully we can agree that's not a lot of code? There's no overhead, no unnecessary setup. 96 | Look at test.c for a bunch of nice examples, mostly all ripped off the json.org site, and 97 | a few from elsewhere. 98 | 99 | What about manual mode? First up you need some detail. 100 | Let's cover how the cJSON objects represent the JSON data. 101 | cJSON doesn't distinguish arrays from objects in handling; just type. 102 | Each cJSON has, potentially, a child, siblings, value, a name. 103 | 104 | The root object has: Object Type and a Child 105 | The Child has name "name", with value "Jack ("Bee") Nimble", and a sibling: 106 | Sibling has type Object, name "format", and a child. 107 | That child has type String, name "type", value "rect", and a sibling: 108 | Sibling has type Number, name "width", value 1920, and a sibling: 109 | Sibling has type Number, name "height", value 1080, and a sibling: 110 | Sibling hs type False, name "interlace", and a sibling: 111 | Sibling has type Number, name "frame rate", value 24 112 | 113 | Here's the structure: 114 | typedef struct cJSON { 115 | struct cJSON *next,*prev; 116 | struct cJSON *child; 117 | 118 | int type; 119 | 120 | char *valuestring; 121 | int valueint; 122 | double valuedouble; 123 | 124 | char *string; 125 | } cJSON; 126 | 127 | By default all values are 0 unless set by virtue of being meaningful. 128 | 129 | next/prev is a doubly linked list of siblings. next takes you to your sibling, 130 | prev takes you back from your sibling to you. 131 | Only objects and arrays have a "child", and it's the head of the doubly linked list. 132 | A "child" entry will have prev==0, but next potentially points on. The last sibling has next=0. 133 | The type expresses Null/True/False/Number/String/Array/Object, all of which are #defined in 134 | cJSON.h 135 | 136 | A Number has valueint and valuedouble. If you're expecting an int, read valueint, if not read 137 | valuedouble. 138 | 139 | Any entry which is in the linked list which is the child of an object will have a "string" 140 | which is the "name" of the entry. When I said "name" in the above example, that's "string". 141 | "string" is the JSON name for the 'variable name' if you will. 142 | 143 | Now you can trivially walk the lists, recursively, and parse as you please. 144 | You can invoke cJSON_Parse to get cJSON to parse for you, and then you can take 145 | the root object, and traverse the structure (which is, formally, an N-tree), 146 | and tokenise as you please. If you wanted to build a callback style parser, this is how 147 | you'd do it (just an example, since these things are very specific): 148 | 149 | void parse_and_callback(cJSON *item,const char *prefix) 150 | { 151 | while (item) 152 | { 153 | char *newprefix=malloc(strlen(prefix)+strlen(item->name)+2); 154 | sprintf(newprefix,"%s/%s",prefix,item->name); 155 | int dorecurse=callback(newprefix, item->type, item); 156 | if (item->child && dorecurse) parse_and_callback(item->child,newprefix); 157 | item=item->next; 158 | free(newprefix); 159 | } 160 | } 161 | 162 | The prefix process will build you a separated list, to simplify your callback handling. 163 | The 'dorecurse' flag would let the callback decide to handle sub-arrays on it's own, or 164 | let you invoke it per-item. For the item above, your callback might look like this: 165 | 166 | int callback(const char *name,int type,cJSON *item) 167 | { 168 | if (!strcmp(name,"name")) { /* populate name */ } 169 | else if (!strcmp(name,"format/type") { /* handle "rect" */ } 170 | else if (!strcmp(name,"format/width") { /* 800 */ } 171 | else if (!strcmp(name,"format/height") { /* 600 */ } 172 | else if (!strcmp(name,"format/interlace") { /* false */ } 173 | else if (!strcmp(name,"format/frame rate") { /* 24 */ } 174 | return 1; 175 | } 176 | 177 | Alternatively, you might like to parse iteratively. 178 | You'd use: 179 | 180 | void parse_object(cJSON *item) 181 | { 182 | int i; for (i=0;ichild; 194 | while (subitem) 195 | { 196 | // handle subitem 197 | if (subitem->child) parse_object(subitem->child); 198 | 199 | subitem=subitem->next; 200 | } 201 | } 202 | 203 | Of course, this should look familiar, since this is just a stripped-down version 204 | of the callback-parser. 205 | 206 | This should cover most uses you'll find for parsing. The rest should be possible 207 | to infer.. and if in doubt, read the source! There's not a lot of it! ;) 208 | 209 | 210 | In terms of constructing JSON data, the example code above is the right way to do it. 211 | You can, of course, hand your sub-objects to other functions to populate. 212 | Also, if you find a use for it, you can manually build the objects. 213 | For instance, suppose you wanted to build an array of objects? 214 | 215 | cJSON *objects[24]; 216 | 217 | cJSON *Create_array_of_anything(cJSON **items,int num) 218 | { 219 | int i;cJSON *prev, *root=cJSON_CreateArray(); 220 | for (i=0;i<24;i++) 221 | { 222 | if (!i) root->child=objects[i]; 223 | else prev->next=objects[i], objects[i]->prev=prev; 224 | prev=objects[i]; 225 | } 226 | return root; 227 | } 228 | 229 | and simply: Create_array_of_anything(objects,24); 230 | 231 | cJSON doesn't make any assumptions about what order you create things in. 232 | You can attach the objects, as above, and later add children to each 233 | of those objects. 234 | 235 | As soon as you call cJSON_Print, it renders the structure to text. 236 | 237 | 238 | 239 | The test.c code shows how to handle a bunch of typical cases. If you uncomment 240 | the code, it'll load, parse and print a bunch of test files, also from json.org, 241 | which are more complex than I'd care to try and stash into a const char array[]. 242 | 243 | 244 | Enjoy cJSON! 245 | 246 | 247 | - Dave Gamble, Aug 2009 248 | -------------------------------------------------------------------------------- /src/JsCompressorFrame.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * JsCompressorFrame.cpp 3 | * 4 | * Created on: 2011-5-20 5 | * Author: tinyms 6 | */ 7 | 8 | #include "JsCompressorFrame.h" 9 | 10 | JsCompressorFrame::JsCompressorFrame(Gtk::WindowType type) : 11 | m_main_vbox(false, 0), m_toolbar_hbox(false, 0), m_center_head_hbox( 12 | false, 0), m_center_foot_hbox(false, 0), m_bottom_hbox(false, 13 | 0), m_tipConsoleWin( 14 | "控制台 (如果有`WARNING`,可以忽略,但建议排除再压缩,直到控制台无任何提示)"), m_compress_btn( 15 | " 压缩&混淆 ") { 16 | 17 | //for main window 18 | this->set_opacity(0.97); 19 | Glib::ustring m_appTitle("JsCompressor v"); 20 | m_appTitle.append(JSCOMPRESSOR_VERSION); 21 | this->set_title(m_appTitle); 22 | Gtk::Image m_appIcon(tinyms::FileUtils::__APSPATH__ + "/compress.png"); 23 | this->set_icon(m_appIcon.get_pixbuf()); 24 | this->set_position(Gtk::WIN_POS_CENTER); 25 | 26 | //build toolbar 27 | 28 | //begin top panel 29 | this->m_select_folder_btn.signal_clicked().connect( 30 | sigc::mem_fun(*this, 31 | &JsCompressorFrame::evt_selectFolderBtn_clicked)); 32 | 33 | //end 34 | //this->create_option_panel_expander(); 35 | //begin center panel 36 | this->m_filePreviewStore = tinyms::FilePreviewStore::create(); 37 | this->m_filePreviewGrid.set_model(this->m_filePreviewStore); 38 | this->m_filePreviewGrid.set_rules_hint(); 39 | this->m_filePreviewGrid.append_column("文件名", 40 | this->m_filePreviewStore->m_colsDef.m_file_full_path); 41 | 42 | //evt for grid 43 | this->m_ScrolledWindow4FilePreview.set_shadow_type(Gtk::SHADOW_ETCHED_IN); 44 | this->m_ScrolledWindow4FilePreview.set_policy(Gtk::POLICY_AUTOMATIC, 45 | Gtk::POLICY_AUTOMATIC); 46 | this->m_ScrolledWindow4FilePreview.add(this->m_filePreviewGrid); 47 | 48 | this->m_center_head_hbox.pack_start(this->m_ScrolledWindow4FilePreview, 49 | true, true, 0); 50 | 51 | this->bind_toolbutton4treeview_events(); 52 | 53 | this->m_toolbar_hbox.set_size_request(-1, 30); 54 | this->m_main_vbox.pack_start(this->m_toolbar_hbox, false, false, 2); 55 | //console window 56 | this->m_center_foot_hbox.pack_start(this->m_tipConsoleWin, false, false, 0); 57 | this->m_consoleWin.set_size_request(-1, 150); 58 | this->m_consoleWin.set_editable(false); 59 | this->m_scrolledWindow4ConsoleWin.set_shadow_type(Gtk::SHADOW_ETCHED_IN); 60 | this->m_scrolledWindow4ConsoleWin.set_policy(Gtk::POLICY_AUTOMATIC, 61 | Gtk::POLICY_AUTOMATIC); 62 | this->m_scrolledWindow4ConsoleWin.add(this->m_consoleWin); 63 | //end 64 | 65 | //begin bottom panel 66 | this->m_home_label.set_label("©tinyms.com 2011"); 67 | this->m_home_eventbox.signal_button_press_event().connect( 68 | sigc::mem_fun(*this, &JsCompressorFrame::evt_gohome_clicked)); 69 | this->m_home_eventbox.signal_enter_notify_event().connect( 70 | sigc::mem_fun(*this, &JsCompressorFrame::evt_gohome_enter)); 71 | this->m_home_eventbox.add(this->m_home_label); 72 | this->m_bottom_hbox.pack_start(this->m_home_eventbox, false, false, 0); 73 | //this->m_compress_btn.signal_clicked().connect( 74 | //sigc::mem_fun(*this, &JsCompressorFrame::evt_executeBtn_clicked)); 75 | //this->m_bottom_hbox.pack_end(this->m_compress_btn, false, false, 0); 76 | //end 77 | m_main_vbox.pack_start(this->m_center_head_hbox, true, true, 5); 78 | this->m_main_vbox.pack_start(this->m_center_foot_hbox, false, false, 0); 79 | this->m_main_vbox.pack_start(this->m_scrolledWindow4ConsoleWin, false, 80 | false, 5); 81 | m_main_vbox.pack_start(this->m_bottom_hbox, false, false, 0); 82 | this->add(m_main_vbox); 83 | this->set_default_size(600, 480); 84 | this->set_border_width(10); 85 | this->show_all(); 86 | this->init(); 87 | } 88 | void JsCompressorFrame::init() { 89 | //open prev path 90 | std::map config; 91 | tinyms::FileUtils::config_read(config); 92 | if (config["preSelectedPath"].size() > 0) { 93 | this->seletedPath = config["preSelectedPath"]; 94 | this->m_root_path_entry.set_text(config["preSelectedPath"]); 95 | this->scan_files(config["preSelectedPath"]); 96 | } 97 | } 98 | void JsCompressorFrame::evt_executeBtn_clicked() { 99 | if (this->m_root_path_entry.get_text_length() <= 0) { 100 | return; 101 | } 102 | this->init_logfile(); 103 | this->iter_filelist(); 104 | Glib::ustring targetFiles; 105 | size_t length = files.size(); 106 | for (size_t k = 0; k < length; k++) { 107 | targetFiles.append(";"); 108 | targetFiles.append(files[k]); 109 | } 110 | 111 | Glib::ustring cmd; 112 | if (OS_IS_WINDOWS) { 113 | cmd.append("\""); 114 | cmd.append(tinyms::FileUtils::__APSPATH__); 115 | cmd.append("/jre6/bin/javaw.exe\" -jar compressorhelper.jar"); 116 | } else { 117 | cmd.append("java -jar compressorhelper.jar"); 118 | } 119 | cmd.append(" -selected-folder "); 120 | cmd.append(this->m_root_path_entry.get_text()); 121 | cmd.append(" -files "); 122 | cmd.append(targetFiles.substr(1, targetFiles.size())); 123 | cmd.append(" -type "); 124 | if (this->m_jsOrCssChkbox.get_active()) { 125 | cmd.append("css"); 126 | } else { 127 | cmd.append("js"); 128 | } 129 | cmd.append(" -aio "); 130 | cmd.append("true"); 131 | system(cmd.c_str()); 132 | std::cout << cmd << std::endl; 133 | 134 | this->read_logfile(); 135 | 136 | } 137 | bool JsCompressorFrame::evt_gohome_clicked(GdkEventButton* eb) { 138 | if (OS_IS_WINDOWS) { 139 | ShellExecute(NULL, "open", "http://www.tinyms.com", NULL, NULL, 140 | SW_HIDE); 141 | } 142 | return true; 143 | } 144 | bool JsCompressorFrame::evt_gohome_enter(GdkEventCrossing* eb) { 145 | Gdk::Cursor c(Gdk::HAND1); 146 | this->m_home_label.get_window()->set_cursor(c); 147 | return true; 148 | } 149 | void JsCompressorFrame::evt_jsOrCssChkbox_clicked() { 150 | this->scan_files(this->m_root_path_entry.get_text()); 151 | } 152 | void JsCompressorFrame::evt_selectFolderBtn_clicked() { 153 | std::map config; 154 | tinyms::FileUtils::config_read(config); 155 | Gtk::FileChooserDialog fcdlg("选择文件夹", 156 | Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER); 157 | if (config["preSelectedPath"].size() > 0) { 158 | fcdlg.set_current_folder(config["preSelectedPath"]); 159 | } 160 | fcdlg.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); 161 | fcdlg.add_button("选择", Gtk::RESPONSE_OK); 162 | gint flag; 163 | flag = fcdlg.run(); 164 | if (flag == Gtk::RESPONSE_OK) { 165 | this->m_root_path_entry.set_text(fcdlg.get_current_folder()); 166 | this->seletedPath = fcdlg.get_current_folder(); 167 | config["preSelectedPath"] = this->seletedPath; 168 | tinyms::FileUtils::config_write(config); 169 | this->scan_files(this->m_root_path_entry.get_text()); 170 | this->clear_log(); 171 | } 172 | } 173 | void JsCompressorFrame::scan_files(std::string path) { 174 | files.clear(); 175 | this->m_filePreviewStore->clear(); 176 | if (path.size() <= 0) { 177 | return; 178 | } 179 | if (this->m_jsOrCssChkbox.get_active() == true) { 180 | tinyms::FileUtils::walkFiles(path, "*.css", "*.min.css", files); 181 | } else { 182 | tinyms::FileUtils::walkFiles(path, "*.js", "*.min.js", files); 183 | } 184 | size_t length = files.size(); 185 | for (size_t k = 0; k < length; k++) { 186 | Gtk::TreeModel::Row row = *(this->m_filePreviewStore->append()); 187 | row[this->m_filePreviewStore->m_colsDef.m_file_full_path] = files[k]; 188 | } 189 | } 190 | void JsCompressorFrame::init_logfile() { 191 | std::string logfilePath = seletedPath + "/console.log"; 192 | Glib::RefPtr logfile = Gio::File::create_for_path(logfilePath); 193 | if (!logfile->query_exists()) { 194 | logfile->create_file(); 195 | } else { 196 | logfile->remove(); 197 | logfile->create_file(); 198 | } 199 | } 200 | void JsCompressorFrame::iter_filelist() { 201 | this->files.clear(); 202 | Gtk::TreeNodeChildren child = this->m_filePreviewStore->children(); 203 | Gtk::TreeModel::iterator it; 204 | for (it = child.begin(); it != child.end(); it++) { 205 | Gtk::TreeRow row = *it; 206 | this->files.push_back( 207 | row[this->m_filePreviewStore->m_colsDef.m_file_full_path]); 208 | } 209 | } 210 | void JsCompressorFrame::read_logfile() { 211 | Glib::ustring logfilePath = this->seletedPath + "/console.log"; 212 | Glib::ustring info = tinyms::FileUtils::read(logfilePath); 213 | this->m_logBuffer = Gtk::TextBuffer::create(); 214 | this->m_logBuffer->set_text(info); 215 | this->m_consoleWin.set_buffer(this->m_logBuffer); 216 | } 217 | void JsCompressorFrame::clear_log() { 218 | this->m_logBuffer = Gtk::TextBuffer::create(); 219 | this->m_logBuffer->set_text(""); 220 | this->m_consoleWin.set_buffer(this->m_logBuffer); 221 | } 222 | void JsCompressorFrame::evt_buildbtn_clicked(){ 223 | tinyms::NewProjectDialog projectDlg; 224 | int flag = projectDlg.run(); 225 | g_print("%d",flag); 226 | } 227 | void JsCompressorFrame::evt_uptoolbtn_clicked() { 228 | current = this->m_filePreviewGrid.get_selection()->get_selected(); 229 | if (!current) 230 | return; 231 | if (current == this->m_filePreviewStore->children().begin()) { 232 | return; 233 | } 234 | Gtk::TreeModel::iterator up = current--; 235 | if (up) { 236 | this->m_filePreviewStore->iter_swap(current, up); 237 | } 238 | } 239 | void JsCompressorFrame::evt_downtoolbtn_clicked() { 240 | current = this->m_filePreviewGrid.get_selection()->get_selected(); 241 | if (!current) 242 | return; 243 | Gtk::TreeModel::iterator down = current; 244 | ++down; 245 | if (down == this->m_filePreviewStore->children().end()) { 246 | return; 247 | } 248 | if (down) { 249 | this->m_filePreviewStore->iter_swap(current, down); 250 | } 251 | } 252 | void JsCompressorFrame::evt_removetoolbtn_clicked() { 253 | Gtk::TreeModel::iterator current = 254 | this->m_filePreviewGrid.get_selection()->get_selected(); 255 | if (!current) 256 | return; 257 | this->m_filePreviewStore->erase(current); 258 | } 259 | void JsCompressorFrame::evt_refreshtoolbtn_clicked() { 260 | this->scan_files(this->m_root_path_entry.get_text()); 261 | } 262 | 263 | void JsCompressorFrame::bind_toolbutton4treeview_events() { 264 | this->m_folder_open_image.set( 265 | tinyms::FileUtils::__APSPATH__ + "/folder-open.png"); 266 | this->m_up_image.set(tinyms::FileUtils::__APSPATH__ + "/go-up.png"); 267 | this->m_down_image.set(tinyms::FileUtils::__APSPATH__ + "/go-down.png"); 268 | this->m_remove_image.set( 269 | tinyms::FileUtils::__APSPATH__ + "/window-close.png"); 270 | this->m_refresh_image.set( 271 | tinyms::FileUtils::__APSPATH__ + "/view-refresh.png"); 272 | this->m_package_image.set( 273 | tinyms::FileUtils::__APSPATH__ + "/package_green.png"); 274 | this->m_folder_open_toolbtn.set_icon_widget(this->m_folder_open_image); 275 | this->m_folder_open_toolbtn.set_tooltip_text("打开"); 276 | this->m_folder_open_toolbtn.set_label("打开"); 277 | this->m_up_toolbtn.set_icon_widget(this->m_up_image); 278 | this->m_up_toolbtn.set_tooltip_text("上移"); 279 | this->m_up_toolbtn.set_label("上移"); 280 | this->m_down_toolbtn.set_icon_widget(this->m_down_image); 281 | this->m_down_toolbtn.set_tooltip_text("下移"); 282 | this->m_down_toolbtn.set_label("下移"); 283 | this->m_remove_toolbtn.set_icon_widget(this->m_remove_image); 284 | this->m_remove_toolbtn.set_tooltip_text("移除(不会真正删除文件)"); 285 | this->m_remove_toolbtn.set_label("移除"); 286 | this->m_refresh_toolbtn.set_icon_widget(this->m_refresh_image); 287 | this->m_refresh_toolbtn.set_tooltip_text("刷新(重新加载文件)"); 288 | this->m_refresh_toolbtn.set_label("刷新"); 289 | this->m_package_toolbtn.set_icon_widget(this->m_package_image); 290 | this->m_package_toolbtn.set_tooltip_text("构建"); 291 | this->m_package_toolbtn.set_label("构建"); 292 | 293 | this->m_folder_open_toolbtn.signal_clicked().connect( 294 | sigc::mem_fun(*this, &JsCompressorFrame::evt_buildbtn_clicked)); 295 | this->m_up_toolbtn.signal_clicked().connect( 296 | sigc::mem_fun(*this, &JsCompressorFrame::evt_uptoolbtn_clicked)); 297 | this->m_down_toolbtn.signal_clicked().connect( 298 | sigc::mem_fun(*this, &JsCompressorFrame::evt_downtoolbtn_clicked)); 299 | this->m_remove_toolbtn.signal_clicked().connect( 300 | sigc::mem_fun(*this, 301 | &JsCompressorFrame::evt_removetoolbtn_clicked)); 302 | this->m_refresh_toolbtn.signal_clicked().connect( 303 | sigc::mem_fun(*this, 304 | &JsCompressorFrame::evt_refreshtoolbtn_clicked)); 305 | 306 | // 307 | this->m_toolbar_hbox.pack_start(this->m_folder_open_toolbtn, false, false, 308 | 0); 309 | this->m_toolbar_hbox.pack_start(this->m_up_toolbtn, false, false, 0); 310 | this->m_toolbar_hbox.pack_start(this->m_down_toolbtn, false, false, 0); 311 | this->m_toolbar_hbox.pack_start(this->m_remove_toolbtn, false, false, 0); 312 | this->m_toolbar_hbox.pack_start(this->m_refresh_toolbtn, false, false, 0); 313 | this->m_toolbar_hbox.pack_start(this->m_package_toolbtn, false, false, 15); 314 | } 315 | JsCompressorFrame::~JsCompressorFrame() { 316 | // TODO Auto-generated destructor stub 317 | } 318 | -------------------------------------------------------------------------------- /src/cJSON/cJSON.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009 Dave Gamble 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | */ 22 | 23 | /* cJSON */ 24 | /* JSON parser in C. */ 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include "cJSON.h" 34 | 35 | static const char *ep; 36 | 37 | const char *cJSON_GetErrorPtr() {return ep;} 38 | 39 | static int cJSON_strcasecmp(const char *s1,const char *s2) 40 | { 41 | if (!s1) return (s1==s2)?0:1;if (!s2) return 1; 42 | for(; tolower(*s1) == tolower(*s2); ++s1, ++s2) if(*s1 == 0) return 0; 43 | return tolower(*(const unsigned char *)s1) - tolower(*(const unsigned char *)s2); 44 | } 45 | 46 | static void *(*cJSON_malloc)(size_t sz) = malloc; 47 | static void (*cJSON_free)(void *ptr) = free; 48 | 49 | static char* cJSON_strdup(const char* str) 50 | { 51 | size_t len; 52 | char* copy; 53 | 54 | len = strlen(str) + 1; 55 | if (!(copy = (char*)cJSON_malloc(len))) return 0; 56 | memcpy(copy,str,len); 57 | return copy; 58 | } 59 | 60 | void cJSON_InitHooks(cJSON_Hooks* hooks) 61 | { 62 | if (!hooks) { /* Reset hooks */ 63 | cJSON_malloc = malloc; 64 | cJSON_free = free; 65 | return; 66 | } 67 | 68 | cJSON_malloc = (hooks->malloc_fn)?hooks->malloc_fn:malloc; 69 | cJSON_free = (hooks->free_fn)?hooks->free_fn:free; 70 | } 71 | 72 | /* Internal constructor. */ 73 | static cJSON *cJSON_New_Item() 74 | { 75 | cJSON* node = (cJSON*)cJSON_malloc(sizeof(cJSON)); 76 | if (node) memset(node,0,sizeof(cJSON)); 77 | return node; 78 | } 79 | 80 | /* Delete a cJSON structure. */ 81 | void cJSON_Delete(cJSON *c) 82 | { 83 | cJSON *next; 84 | while (c) 85 | { 86 | next=c->next; 87 | if (!(c->type&cJSON_IsReference) && c->child) cJSON_Delete(c->child); 88 | if (!(c->type&cJSON_IsReference) && c->valuestring) cJSON_free(c->valuestring); 89 | if (c->string) cJSON_free(c->string); 90 | cJSON_free(c); 91 | c=next; 92 | } 93 | } 94 | 95 | /* Parse the input text to generate a number, and populate the result into item. */ 96 | static const char *parse_number(cJSON *item,const char *num) 97 | { 98 | double n=0,sign=1,scale=0;int subscale=0,signsubscale=1; 99 | 100 | /* Could use sscanf for this? */ 101 | if (*num=='-') sign=-1,num++; /* Has sign? */ 102 | if (*num=='0') num++; /* is zero */ 103 | if (*num>='1' && *num<='9') do n=(n*10.0)+(*num++ -'0'); while (*num>='0' && *num<='9'); /* Number? */ 104 | if (*num=='.') {num++; do n=(n*10.0)+(*num++ -'0'),scale--; while (*num>='0' && *num<='9');} /* Fractional part? */ 105 | if (*num=='e' || *num=='E') /* Exponent? */ 106 | { num++;if (*num=='+') num++; else if (*num=='-') signsubscale=-1,num++; /* With sign? */ 107 | while (*num>='0' && *num<='9') subscale=(subscale*10)+(*num++ - '0'); /* Number? */ 108 | } 109 | 110 | n=sign*n*pow(10.0,(scale+subscale*signsubscale)); /* number = +/- number.fraction * 10^+/- exponent */ 111 | 112 | item->valuedouble=n; 113 | item->valueint=(int)n; 114 | item->type=cJSON_Number; 115 | return num; 116 | } 117 | 118 | /* Render the number nicely from the given item into a string. */ 119 | static char *print_number(cJSON *item) 120 | { 121 | char *str; 122 | double d=item->valuedouble; 123 | if (fabs(((double)item->valueint)-d)<=DBL_EPSILON && d<=INT_MAX && d>=INT_MIN) 124 | { 125 | str=(char*)cJSON_malloc(21); /* 2^64+1 can be represented in 21 chars. */ 126 | if (str) sprintf(str,"%d",item->valueint); 127 | } 128 | else 129 | { 130 | str=(char*)cJSON_malloc(64); /* This is a nice tradeoff. */ 131 | if (str) 132 | { 133 | if (fabs(floor(d)-d)<=DBL_EPSILON) sprintf(str,"%.0f",d); 134 | else if (fabs(d)<1.0e-6 || fabs(d)>1.0e9) sprintf(str,"%e",d); 135 | else sprintf(str,"%f",d); 136 | } 137 | } 138 | return str; 139 | } 140 | 141 | /* Parse the input text into an unescaped cstring, and populate item. */ 142 | static const unsigned char firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; 143 | static const char *parse_string(cJSON *item,const char *str) 144 | { 145 | const char *ptr=str+1;char *ptr2;char *out;int len=0;unsigned uc; 146 | if (*str!='\"') {ep=str;return 0;} /* not a string! */ 147 | 148 | while (*ptr!='\"' && *ptr && ++len) if (*ptr++ == '\\') ptr++; /* Skip escaped quotes. */ 149 | 150 | out=(char*)cJSON_malloc(len+1); /* This is how long we need for the string, roughly. */ 151 | if (!out) return 0; 152 | 153 | ptr=str+1;ptr2=out; 154 | while (*ptr!='\"' && *ptr) 155 | { 156 | if (*ptr!='\\') *ptr2++=*ptr++; 157 | else 158 | { 159 | ptr++; 160 | switch (*ptr) 161 | { 162 | case 'b': *ptr2++='\b'; break; 163 | case 'f': *ptr2++='\f'; break; 164 | case 'n': *ptr2++='\n'; break; 165 | case 'r': *ptr2++='\r'; break; 166 | case 't': *ptr2++='\t'; break; 167 | case 'u': /* transcode utf16 to utf8. DOES NOT SUPPORT SURROGATE PAIRS CORRECTLY. */ 168 | sscanf(ptr+1,"%4x",&uc); /* get the unicode char. */ 169 | len=3;if (uc<0x80) len=1;else if (uc<0x800) len=2;ptr2+=len; 170 | 171 | switch (len) { 172 | case 3: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6; 173 | case 2: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6; 174 | case 1: *--ptr2 =(uc | firstByteMark[len]); 175 | } 176 | ptr2+=len;ptr+=4; 177 | break; 178 | default: *ptr2++=*ptr; break; 179 | } 180 | ptr++; 181 | } 182 | } 183 | *ptr2=0; 184 | if (*ptr=='\"') ptr++; 185 | item->valuestring=out; 186 | item->type=cJSON_String; 187 | return ptr; 188 | } 189 | 190 | /* Render the cstring provided to an escaped version that can be printed. */ 191 | static char *print_string_ptr(const char *str) 192 | { 193 | const char *ptr;char *ptr2,*out;int len=0;unsigned char token; 194 | 195 | if (!str) return cJSON_strdup(""); 196 | ptr=str;while ((token=*ptr) && ++len) {if (strchr("\"\\\b\f\n\r\t",token)) len++; else if (token<32) len+=5;ptr++;} 197 | 198 | out=(char*)cJSON_malloc(len+3); 199 | if (!out) return 0; 200 | 201 | ptr2=out;ptr=str; 202 | *ptr2++='\"'; 203 | while (*ptr) 204 | { 205 | if ((unsigned char)*ptr>31 && *ptr!='\"' && *ptr!='\\') *ptr2++=*ptr++; 206 | else 207 | { 208 | *ptr2++='\\'; 209 | switch (token=*ptr++) 210 | { 211 | case '\\': *ptr2++='\\'; break; 212 | case '\"': *ptr2++='\"'; break; 213 | case '\b': *ptr2++='b'; break; 214 | case '\f': *ptr2++='f'; break; 215 | case '\n': *ptr2++='n'; break; 216 | case '\r': *ptr2++='r'; break; 217 | case '\t': *ptr2++='t'; break; 218 | default: sprintf(ptr2,"u%04x",token);ptr2+=5; break; /* escape and print */ 219 | } 220 | } 221 | } 222 | *ptr2++='\"';*ptr2++=0; 223 | return out; 224 | } 225 | /* Invote print_string_ptr (which is useful) on an item. */ 226 | static char *print_string(cJSON *item) {return print_string_ptr(item->valuestring);} 227 | 228 | /* Predeclare these prototypes. */ 229 | static const char *parse_value(cJSON *item,const char *value); 230 | static char *print_value(cJSON *item,int depth,int fmt); 231 | static const char *parse_array(cJSON *item,const char *value); 232 | static char *print_array(cJSON *item,int depth,int fmt); 233 | static const char *parse_object(cJSON *item,const char *value); 234 | static char *print_object(cJSON *item,int depth,int fmt); 235 | 236 | /* Utility to jump whitespace and cr/lf */ 237 | static const char *skip(const char *in) {while (in && *in && (unsigned char)*in<=32) in++; return in;} 238 | 239 | /* Parse an object - create a new root, and populate. */ 240 | cJSON *cJSON_Parse(const char *value) 241 | { 242 | cJSON *c=cJSON_New_Item(); 243 | ep=0; 244 | if (!c) return 0; /* memory fail */ 245 | 246 | if (!parse_value(c,skip(value))) {cJSON_Delete(c);return 0;} 247 | return c; 248 | } 249 | 250 | /* Render a cJSON item/entity/structure to text. */ 251 | char *cJSON_Print(cJSON *item) {return print_value(item,0,1);} 252 | char *cJSON_PrintUnformatted(cJSON *item) {return print_value(item,0,0);} 253 | 254 | /* Parser core - when encountering text, process appropriately. */ 255 | static const char *parse_value(cJSON *item,const char *value) 256 | { 257 | if (!value) return 0; /* Fail on null. */ 258 | if (!strncmp(value,"null",4)) { item->type=cJSON_NULL; return value+4; } 259 | if (!strncmp(value,"false",5)) { item->type=cJSON_False; return value+5; } 260 | if (!strncmp(value,"true",4)) { item->type=cJSON_True; item->valueint=1; return value+4; } 261 | if (*value=='\"') { return parse_string(item,value); } 262 | if (*value=='-' || (*value>='0' && *value<='9')) { return parse_number(item,value); } 263 | if (*value=='[') { return parse_array(item,value); } 264 | if (*value=='{') { return parse_object(item,value); } 265 | 266 | ep=value;return 0; /* failure. */ 267 | } 268 | 269 | /* Render a value to text. */ 270 | static char *print_value(cJSON *item,int depth,int fmt) 271 | { 272 | char *out=0; 273 | if (!item) return 0; 274 | switch ((item->type)&255) 275 | { 276 | case cJSON_NULL: out=cJSON_strdup("null"); break; 277 | case cJSON_False: out=cJSON_strdup("false");break; 278 | case cJSON_True: out=cJSON_strdup("true"); break; 279 | case cJSON_Number: out=print_number(item);break; 280 | case cJSON_String: out=print_string(item);break; 281 | case cJSON_Array: out=print_array(item,depth,fmt);break; 282 | case cJSON_Object: out=print_object(item,depth,fmt);break; 283 | } 284 | return out; 285 | } 286 | 287 | /* Build an array from input text. */ 288 | static const char *parse_array(cJSON *item,const char *value) 289 | { 290 | cJSON *child; 291 | if (*value!='[') {ep=value;return 0;} /* not an array! */ 292 | 293 | item->type=cJSON_Array; 294 | value=skip(value+1); 295 | if (*value==']') return value+1; /* empty array. */ 296 | 297 | item->child=child=cJSON_New_Item(); 298 | if (!item->child) return 0; /* memory fail */ 299 | value=skip(parse_value(child,skip(value))); /* skip any spacing, get the value. */ 300 | if (!value) return 0; 301 | 302 | while (*value==',') 303 | { 304 | cJSON *new_item; 305 | if (!(new_item=cJSON_New_Item())) return 0; /* memory fail */ 306 | child->next=new_item;new_item->prev=child;child=new_item; 307 | value=skip(parse_value(child,skip(value+1))); 308 | if (!value) return 0; /* memory fail */ 309 | } 310 | 311 | if (*value==']') return value+1; /* end of array */ 312 | ep=value;return 0; /* malformed. */ 313 | } 314 | 315 | /* Render an array to text */ 316 | static char *print_array(cJSON *item,int depth,int fmt) 317 | { 318 | char **entries; 319 | char *out=0,*ptr,*ret;int len=5; 320 | cJSON *child=item->child; 321 | int numentries=0,i=0,fail=0; 322 | 323 | /* How many entries in the array? */ 324 | while (child) numentries++,child=child->next; 325 | /* Allocate an array to hold the values for each */ 326 | entries=(char**)cJSON_malloc(numentries*sizeof(char*)); 327 | if (!entries) return 0; 328 | memset(entries,0,numentries*sizeof(char*)); 329 | /* Retrieve all the results: */ 330 | child=item->child; 331 | while (child && !fail) 332 | { 333 | ret=print_value(child,depth+1,fmt); 334 | entries[i++]=ret; 335 | if (ret) len+=strlen(ret)+2+(fmt?1:0); else fail=1; 336 | child=child->next; 337 | } 338 | 339 | /* If we didn't fail, try to malloc the output string */ 340 | if (!fail) out=(char*)cJSON_malloc(len); 341 | /* If that fails, we fail. */ 342 | if (!out) fail=1; 343 | 344 | /* Handle failure. */ 345 | if (fail) 346 | { 347 | for (i=0;itype=cJSON_Object; 373 | value=skip(value+1); 374 | if (*value=='}') return value+1; /* empty array. */ 375 | 376 | item->child=child=cJSON_New_Item(); 377 | if (!item->child) return 0; 378 | value=skip(parse_string(child,skip(value))); 379 | if (!value) return 0; 380 | child->string=child->valuestring;child->valuestring=0; 381 | if (*value!=':') {ep=value;return 0;} /* fail! */ 382 | value=skip(parse_value(child,skip(value+1))); /* skip any spacing, get the value. */ 383 | if (!value) return 0; 384 | 385 | while (*value==',') 386 | { 387 | cJSON *new_item; 388 | if (!(new_item=cJSON_New_Item())) return 0; /* memory fail */ 389 | child->next=new_item;new_item->prev=child;child=new_item; 390 | value=skip(parse_string(child,skip(value+1))); 391 | if (!value) return 0; 392 | child->string=child->valuestring;child->valuestring=0; 393 | if (*value!=':') {ep=value;return 0;} /* fail! */ 394 | value=skip(parse_value(child,skip(value+1))); /* skip any spacing, get the value. */ 395 | if (!value) return 0; 396 | } 397 | 398 | if (*value=='}') return value+1; /* end of array */ 399 | ep=value;return 0; /* malformed. */ 400 | } 401 | 402 | /* Render an object to text. */ 403 | static char *print_object(cJSON *item,int depth,int fmt) 404 | { 405 | char **entries=0,**names=0; 406 | char *out=0,*ptr,*ret,*str;int len=7,i=0,j; 407 | cJSON *child=item->child; 408 | int numentries=0,fail=0; 409 | /* Count the number of entries. */ 410 | while (child) numentries++,child=child->next; 411 | /* Allocate space for the names and the objects */ 412 | entries=(char**)cJSON_malloc(numentries*sizeof(char*)); 413 | if (!entries) return 0; 414 | names=(char**)cJSON_malloc(numentries*sizeof(char*)); 415 | if (!names) {cJSON_free(entries);return 0;} 416 | memset(entries,0,sizeof(char*)*numentries); 417 | memset(names,0,sizeof(char*)*numentries); 418 | 419 | /* Collect all the results into our arrays: */ 420 | child=item->child;depth++;if (fmt) len+=depth; 421 | while (child) 422 | { 423 | names[i]=str=print_string_ptr(child->string); 424 | entries[i++]=ret=print_value(child,depth,fmt); 425 | if (str && ret) len+=strlen(ret)+strlen(str)+2+(fmt?2+depth:0); else fail=1; 426 | child=child->next; 427 | } 428 | 429 | /* Try to allocate the output string */ 430 | if (!fail) out=(char*)cJSON_malloc(len); 431 | if (!out) fail=1; 432 | 433 | /* Handle failure */ 434 | if (fail) 435 | { 436 | for (i=0;ichild;int i=0;while(c)i++,c=c->next;return i;} 462 | cJSON *cJSON_GetArrayItem(cJSON *array,int item) {cJSON *c=array->child; while (c && item>0) item--,c=c->next; return c;} 463 | cJSON *cJSON_GetObjectItem(cJSON *object,const char *string) {cJSON *c=object->child; while (c && cJSON_strcasecmp(c->string,string)) c=c->next; return c;} 464 | 465 | /* Utility for array list handling. */ 466 | static void suffix_object(cJSON *prev,cJSON *item) {prev->next=item;item->prev=prev;} 467 | /* Utility for handling references. */ 468 | static cJSON *create_reference(cJSON *item) {cJSON *ref=cJSON_New_Item();if (!ref) return 0;memcpy(ref,item,sizeof(cJSON));ref->string=0;ref->type|=cJSON_IsReference;ref->next=ref->prev=0;return ref;} 469 | 470 | /* Add item to array/object. */ 471 | void cJSON_AddItemToArray(cJSON *array, cJSON *item) {cJSON *c=array->child;if (!item) return; if (!c) {array->child=item;} else {while (c && c->next) c=c->next; suffix_object(c,item);}} 472 | void cJSON_AddItemToObject(cJSON *object,const char *string,cJSON *item) {if (!item) return; if (item->string) cJSON_free(item->string);item->string=cJSON_strdup(string);cJSON_AddItemToArray(object,item);} 473 | void cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item) {cJSON_AddItemToArray(array,create_reference(item));} 474 | void cJSON_AddItemReferenceToObject(cJSON *object,const char *string,cJSON *item) {cJSON_AddItemToObject(object,string,create_reference(item));} 475 | 476 | cJSON *cJSON_DetachItemFromArray(cJSON *array,int which) {cJSON *c=array->child;while (c && which>0) c=c->next,which--;if (!c) return 0; 477 | if (c->prev) c->prev->next=c->next;if (c->next) c->next->prev=c->prev;if (c==array->child) array->child=c->next;c->prev=c->next=0;return c;} 478 | void cJSON_DeleteItemFromArray(cJSON *array,int which) {cJSON_Delete(cJSON_DetachItemFromArray(array,which));} 479 | cJSON *cJSON_DetachItemFromObject(cJSON *object,const char *string) {int i=0;cJSON *c=object->child;while (c && cJSON_strcasecmp(c->string,string)) i++,c=c->next;if (c) return cJSON_DetachItemFromArray(object,i);return 0;} 480 | void cJSON_DeleteItemFromObject(cJSON *object,const char *string) {cJSON_Delete(cJSON_DetachItemFromObject(object,string));} 481 | 482 | /* Replace array/object items with new ones. */ 483 | void cJSON_ReplaceItemInArray(cJSON *array,int which,cJSON *newitem) {cJSON *c=array->child;while (c && which>0) c=c->next,which--;if (!c) return; 484 | newitem->next=c->next;newitem->prev=c->prev;if (newitem->next) newitem->next->prev=newitem; 485 | if (c==array->child) array->child=newitem; else newitem->prev->next=newitem;c->next=c->prev=0;cJSON_Delete(c);} 486 | void cJSON_ReplaceItemInObject(cJSON *object,const char *string,cJSON *newitem){int i=0;cJSON *c=object->child;while(c && cJSON_strcasecmp(c->string,string))i++,c=c->next;if(c){newitem->string=cJSON_strdup(string);cJSON_ReplaceItemInArray(object,i,newitem);}} 487 | 488 | /* Create basic types: */ 489 | cJSON *cJSON_CreateNull() {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_NULL;return item;} 490 | cJSON *cJSON_CreateTrue() {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_True;return item;} 491 | cJSON *cJSON_CreateFalse() {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_False;return item;} 492 | cJSON *cJSON_CreateBool(int b) {cJSON *item=cJSON_New_Item();if(item)item->type=b?cJSON_True:cJSON_False;return item;} 493 | cJSON *cJSON_CreateNumber(double num) {cJSON *item=cJSON_New_Item();if(item){item->type=cJSON_Number;item->valuedouble=num;item->valueint=(int)num;}return item;} 494 | cJSON *cJSON_CreateString(const char *string) {cJSON *item=cJSON_New_Item();if(item){item->type=cJSON_String;item->valuestring=cJSON_strdup(string);}return item;} 495 | cJSON *cJSON_CreateArray() {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_Array;return item;} 496 | cJSON *cJSON_CreateObject() {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_Object;return item;} 497 | 498 | /* Create Arrays: */ 499 | cJSON *cJSON_CreateIntArray(int *numbers,int count) {int i;cJSON *n=0,*p=0,*a=cJSON_CreateArray();for(i=0;a && ichild=n;else suffix_object(p,n);p=n;}return a;} 500 | cJSON *cJSON_CreateFloatArray(float *numbers,int count) {int i;cJSON *n=0,*p=0,*a=cJSON_CreateArray();for(i=0;a && ichild=n;else suffix_object(p,n);p=n;}return a;} 501 | cJSON *cJSON_CreateDoubleArray(double *numbers,int count) {int i;cJSON *n=0,*p=0,*a=cJSON_CreateArray();for(i=0;a && ichild=n;else suffix_object(p,n);p=n;}return a;} 502 | cJSON *cJSON_CreateStringArray(const char **strings,int count) {int i;cJSON *n=0,*p=0,*a=cJSON_CreateArray();for(i=0;a && ichild=n;else suffix_object(p,n);p=n;}return a;} 503 | -------------------------------------------------------------------------------- /java/compressorhelper/nbproject/build-impl.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | Must set src.dir 209 | Must set test.src.dir 210 | Must set build.dir 211 | Must set dist.dir 212 | Must set build.classes.dir 213 | Must set dist.javadoc.dir 214 | Must set build.test.classes.dir 215 | Must set build.test.results.dir 216 | Must set build.classes.excludes 217 | Must set dist.jar 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | Must set javac.includes 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | Must set JVM to use for profiling in profiler.info.jvm 405 | Must set profiler agent JVM arguments in profiler.info.jvmargs.agent 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | Must select some files in the IDE or set javac.includes 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | To run this application from the command line without Ant, try: 659 | 660 | 661 | 662 | 663 | 664 | 665 | java -cp "${run.classpath.with.dist.jar}" ${main.class} 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | To run this application from the command line without Ant, try: 691 | 692 | java -jar "${dist.jar.resolved}" 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | Must select one file in the IDE or set run.class 722 | 723 | 724 | 725 | Must select one file in the IDE or set run.class 726 | 727 | 728 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | Must select one file in the IDE or set debug.class 753 | 754 | 755 | 756 | 757 | Must select one file in the IDE or set debug.class 758 | 759 | 760 | 761 | 762 | Must set fix.includes 763 | 764 | 765 | 766 | 767 | 768 | 769 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | Must select one file in the IDE or set profile.class 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | Must select some files in the IDE or set javac.includes 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | Some tests failed; see details above. 922 | 923 | 924 | 925 | 926 | 927 | 928 | 929 | 930 | Must select some files in the IDE or set test.includes 931 | 932 | 933 | 934 | Some tests failed; see details above. 935 | 936 | 937 | 942 | 943 | Must select one file in the IDE or set test.class 944 | 945 | 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | 968 | 973 | 974 | Must select one file in the IDE or set applet.url 975 | 976 | 977 | 978 | 979 | 980 | 981 | 986 | 987 | Must select one file in the IDE or set applet.url 988 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 1000 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | 1008 | 1009 | 1010 | 1011 | 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | 1039 | 1040 | 1041 | 1042 | --------------------------------------------------------------------------------