tag:blogger.com,1999:blog-59465307047421309702024-03-06T16:20:07.273+08:00Jax 的工作紀錄除了在整理學習上的經驗,同時也能幫助其他需要的人Jax Huhttp://www.blogger.com/profile/01953021685585893658noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-5946530704742130970.post-49791537589096600142012-03-08T19:38:00.000+08:002012-03-08T19:38:52.560+08:00Aptana Unified Builder 卡住Aptana 2 的建置器(Aptana Unified Builder)時不時就會卡住,通常會發生這種狀況的原因,就是專案中有某個檔案無法正常解析,或路徑不對造成的。<br />
<br />
解決的辦法是先關閉『<strong>專案->自動建置</strong>』,然後將<strong>有問題的專案</strong>複製一份到<strong>新的工作區</strong>,然後用<strong>過濾法</strong>找出無效的檔案,然後先刪除再重新建立。Jax Huhttp://www.blogger.com/profile/01953021685585893658noreply@blogger.com0tag:blogger.com,1999:blog-5946530704742130970.post-70888430190755736732011-12-21T19:03:00.000+08:002013-06-10T22:43:35.566+08:00[轉載] Aptana Scripting 一個背景處理的範例轉載自:<a target="_blank" href="http://blogs.infosupport.com/monkeying-with-eclipse/">Monkeying with Eclipse | Info Support</a><br />
<br />
<pre class="js" name="code">/*
* Menu: Info Support > Find commented code
* Kudos: Peter Hendriks
* License: EPL 1.0
* DOM: http://download.eclipse.org/technology/dash/update/org.eclipse.eclipsemonkey.lang.javascript
*/
function main() {
loadBundle("org.eclipse.core.jobs");
var ProgressMonitorDialog = Packages.org.eclipse.jface.dialogs.ProgressMonitorDialog;
var IRunnableWithProgress = Packages.org.eclipse.jface.operation.IRunnableWithProgress;
var runnableWithProgress = new IRunnableWithProgress({ run: runCommentSearch });
new ProgressMonitorDialog(window.getShell()).run(true, true, runnableWithProgress);
window.getActivePage().showView("org.eclipse.ui.views.TaskList");
}
function runCommentSearch(monitor) {
var files = resources.filesMatching(".*\\.java");
monitor.beginTask("Searching for commented code...", files.length);
try {
var match;
for each( file in files ) {
monitor.subTask(file.getEclipseObject().getName());
file.removeMyTasks();
var previousLineCodeComment = false;
for each( line in file.lines ) {
if (monitor.isCanceled()) {
return;
}
if (match = line.string.match(/^.*\/\/.*[;{}]\s*$/)) {
if (!previousLineCodeComment) {
line.addMyTask("Commented code: " + match[0]);
}
previousLineCodeComment = true;
} else {
previousLineCodeComment = false;
}
}
monitor.worked(1);
}
} finally {
monitor.done();
}
}
</pre>Jax Huhttp://www.blogger.com/profile/01953021685585893658noreply@blogger.com0tag:blogger.com,1999:blog-5946530704742130970.post-30922857090704912682011-12-21T18:58:00.002+08:002011-12-21T19:11:53.662+08:00Aptana Scripting - Find TODOs 範例中的參數<pre class="js" name="code">/*
* Menu: Editors > Find TODOs
* Kudos: Ingo Muschenetz
* License: EPL 1.0
* DOM: http://download.eclipse.org/technology/dash/update/org.eclipse.eclipsemonkey.lang.javascript
*/
function main() {
var files = resources.filesMatching(".*\\.js");
var match;
for each( file in files ) {
file.removeMyTasks( );
for each( line in file.lines ) {
if (match = line.string.match(/\/\/TODO: (.*)/)) {
line.addMyTask( match[1] );
}
}
}
window.getActivePage().showView("org.eclipse.ui.views.TaskList");
}
</pre><br />
<strong>只列出當前文件的方法</strong><br />
<pre class="js:nogutter:nocontrols" name="code">var files = resources.filesMatching('.*/'+editors.activeEditor.textEditor.titleToolTip);
</pre><br />
<strong>resources 部分的方法</strong><br />
<pre class="js:nogutter:nocontrols" name="code">filesMatching(".*\\.js")
filesMatchingForProject("Project Name",".*\\.js")
filesMatchingIgnoreCase(".*\\.js")
filesMatchingForProjectIgnoreCase("Project Name",".*\\.js")
</pre><br />
<strong>file 部分的方法</strong><br />
<pre class="js:nogutter:nocontrols" name="code">size
lines
removeMyTasks()
</pre><br />
<strong>line 部分的方法</strong><br />
<pre class="js:nogutter:nocontrols" name="code">lineNumber
string
addMyTask('Task String')
</pre>Jax Huhttp://www.blogger.com/profile/01953021685585893658noreply@blogger.com0tag:blogger.com,1999:blog-5946530704742130970.post-10881327493269337092011-12-21T18:46:00.000+08:002015-03-13T14:40:27.860+08:00Aptana Scripting 學習筆記<ul><li>在任何一個專案的頂層目錄,建立一個名稱為 scripts 或 monkey 的目錄</li>
<li>在此目錄下建立副檔名為 *.js 或 *.em 的 JavaScript 的文件 </li>
</ul><br />
<strong>一個空白文件的內容如下:</strong><br />
<pre class="js" name="code">/*
* Menu: Samples > Execute Snippet
* Key: M1+M2+M3+F
* Kudos: Jax Hu
* License: EPL 1.0
* DOM: http://download.eclipse.org/technology/dash/update/org.eclipse.eclipsemonkey.lang.javascript
*/
function main(){
}
</pre><br />
<br />
<strong>快捷鍵的代號對應:</strong><br />
<table><tr><td>M1</td><td>Control/Command</td></tr>
<tr><td>M2</td><td>Shift</td></tr>
<tr><td>M3</td><td>Alt/Option</td></tr>
</table><br />
<br />
<strong>一個可以用來顯示物件成員的函數:</strong><br />
<pre class="js" name="code">/**顯示物件的成員
* @param {Object} val 物件
*/
function var_dump(val){
var name, value, temp=[];
for (name in val) {
try {
value = (val[name]+'').
replace("function",'<b style="color:#00f;">$&</b>');
}catch (e) {
value = (e+'').fontcolor('red');
}
temp.push('<b style="color:#707;">'+name+'</b> = '+value);
}
webView = views.getView("var_dump");
webView.showView(true);
webView.setTitle('var_dump');
webView.setHTML(temp.join("<hr/>").fixed());
}
</pre><br />
<br />
<strong>常用方法以及數值:</strong><br />
<pre class="js" name="code">
/*當前文件的位置
* => D:/WorkSpace/my_project/test.js */
location
/*當前文件的名稱
* => test.js */
editors.activeEditor.title
/*當前的文件內容*/
editors.activeEditor.source
/*當前文件的 URI 位址*/
editors.activeEditor.uri
/*儲存當前文件*/
editors.activeEditor.save();
/*對當前文件-開啟另存新檔的對話匡*/
editors.activeEditor.textEditor.doSaveAs()
/*對當前文件的目錄路徑
* => D:/WorkSpace/my_project */
editors.activeEditor.textEditor.editorInput.file.parent.location
/*目前開啟的所有文件*/
editors.all[];
/*儲存全部編輯器,傳入 true 會開啟存檔提示*/
window.workbench.saveAllEditors(false);
/*重新開啟 Eclipse*/
window.workbench.restart();
/*關閉 Eclipse*/
window.workbench.close();
/* 開新的編輯器,可以透過這個開啟空白文件,或是已經存在的檔案,
* 之後 editors.activeEditor 會轉到這個文件上 */
fileUtils.open('textile_to_redmine.txt');
/*取得當前的專案名稱*/
editors.activeEditor.textEditor.editorInput.file.project.name;
/*取得所有的專案*/
Packages.org.eclipse.core.resources.ResourcesPlugin.workspace.root.projects;
editors.activeEditor.textEditor.editorInput.file.workspace.root.projects
</pre><br />
<br />
<strong>建立一個新的視圖,或開啟已存在的視圖:</strong><br />
<pre class="js" name="code">webView = views.getView("my_view_name");
/*顯示視圖*/
webView.showView(true);
/*設定標題*/
webView.setTitle("My View Title");
/*設定內容的HTML*/
webView.setHTML('<h1>OK</h1>');
/*或指定內容的網址*/
webView.url = "http://www.google.com";
webView.addEventListener("LocationChanging", function(event){
var location = event.innerEvent.location;
// Print out the location to the Java console
Packages.java.lang.System.out.println("You clicked on: " + location);
});
</pre><br />
<br />
<strong>替換選擇的文字區段:</strong><br />
<pre class="js" name="code">/*選擇的起始位置*/
var starting = editors.activeEditor.selectionRange.startingOffset;
/*選擇的結束位置*/
var ending = editors.activeEditor.selectionRange.endingOffset;
/*選擇的文字內容*/
var text = editors.activeEditor.source.substring(starting, ending);
/*文字跳脫處理,或其他自訂的處理*/
text = escape(text);
/*替換選擇的文字*/
editors.activeEditor.applyEdit(starting, ending-starting, text);
/*重新選擇文字區段*/
editors.activeEditor.selectAndReveal(starting, text.length);
</pre><br />
<br />
<strong>檔案存取:</strong><br />
<pre class="js" name="code">var file = new File("myFile.txt");
file.createNewFile();
file.write("Date: ");
var text = file.readLines();
</pre><br />
<br />
<strong>Web 資料請求的方式:</strong><br />
<pre class="js" name="code">var req = new WebRequest();
req.open("GET", "http://xml.weather.yahoo.com/forecastrss?p=94103");
var text = req.send();
</pre>Jax Huhttp://www.blogger.com/profile/01953021685585893658noreply@blogger.com2tag:blogger.com,1999:blog-5946530704742130970.post-80939083545241138592011-12-21T15:05:00.006+08:002013-06-10T22:44:32.104+08:00[轉載] Aptana Scripting File.js Class Document轉載自:<a target="_blank" href="http://www.koders.com/javascript/fid71E40E01E381F207FA6EC48D4B0F2343B95ACCEE.aspx">Koders Code Search: File.js - JavaScript</a><br />
<pre class="js" name="code">/**
* File.js
*
* Adding this file to your Active Libraries will give you code assist for the
* Aptana Studio scripting engine.
*
* @author Kevin Lindsey
* @version 1.0
*/
/**
* This object represents a file or a directory in the file system
*
* @constructor
* @param {String} name
* The relative or absolute path to a file or directory
*/
function File(name) {}
/*
* Properties
*
/**
* Get the absolute path for this file or directory
*
* @type {String} Returns the absolute path to this file or directory
*/
File.prototype.absolutePath = "";
/**
* Get the file's base name. This is the filename only without the extension.
* If the file does not have an extension, then this will return the full
* name
*
* @type {String} Returns this file's base name
*/
File.prototype.baseName = "";
/**
* Determine if this file is readable
*
* @type {Boolean} Returns true if this File is readable
*/
File.prototype.canRead = false;
/**
* Determine if ths file is writable
*
* @type {Boolean} Returns true if this File is writable
*/
File.prototype.canWrite = false;
/**
* Determine if this file or directory exists in the file system
*
* @type {Boolean} Returns true if this File exists in the file system
*/
File.prototype.exists = false;
/**
* Returns the file extension of this File
*
* @type {String} Returns the last instance of "." and the text after it.
* An empty string will be returned if no extension if found. The return
* value includes the '.'
*/
File.prototype.extension = "";
/**
* Determines if thie File is a file in the file system
*
* @type {Boolean} Returns true if this File is a file in the file system
*/
File.prototype.isFile = false;
/**
* Determines if this File is a directory in the file system
*
* @type {Boolean} Returns true if this File is a directory in the file
* system
*/
File.prototype.isDirectory = false;
/**
* Returns a list of File objects for all files in the File. This is equivalent
* to listing out all files in a directory
*
* @type {Array} Returns an array of File objects, one for each file and
* directory in this File
*/
File.prototype.list = [];
/**
* Returns the file's name without path information
*
* @type {String} Returns the file's name
*/
File.prototype.name = "";
/**
* Returns a new File object of this object's parent directory
*
* @type {File} Returns this file's parent File
*/
File.prototype.parentFile = {};
/**
* Returns the character used to separate directories on the underlying OS
*
* @type {String} Returns the directory separator
*/
File.prototype.separator = "";
/*
* Methods
*/
/**
* Create a new file in the file system at the location specified by this
* object
*
* @return {Boolean} Returns true if the file was created successfully.
*/
File.prototype.createNewFile = function() {};
/**
* Return all lines from this File's text file
*
* @return {Array} Returns an array of strings, one for each line in the file.
*/
File.prototype.readLines = function() {};
//eof
</pre>Jax Huhttp://www.blogger.com/profile/01953021685585893658noreply@blogger.com0tag:blogger.com,1999:blog-5946530704742130970.post-57126728279777303512011-12-21T15:05:00.005+08:002013-06-10T22:43:41.276+08:00[轉載] Aptana Scripting PrintStream.js Class Document轉載自:<a target="_blank" href="http://www.koders.com/javascript/fidDDD4C3E8D59554164AF058FBA81AB64EF707587E.aspx?s=createNewFile">Koders Code Search: PrintStream.js - JavaScript</a><br />
<pre class="js" name="code">/**
* PrintStream.js
*
* Adding this file to your Active Libraries will give you code assist for the
* Aptana Studio scripting engine.
*
* @author Kevin Lindsey
* @version 1.0
*/
/**
* This object represents an underlying Java PrintStream
*
* @constructor
*
/
function PrintStream() {}
/*
* Methods
*/
/**
* Print the given text to the underlying stream
*
* @param {String} text
* The text to send to the stream
*/
PrintStream.prototype.print = function(text) {};
/**
* Print the given text to the underlying stream followed by end-of-line
*
* @param {String} text
* The text to send to the stream
*/
PrintStream.prototype.println = function(text) {};
//eof
</pre>Jax Huhttp://www.blogger.com/profile/01953021685585893658noreply@blogger.com0tag:blogger.com,1999:blog-5946530704742130970.post-88293258309205276572011-12-21T15:04:00.008+08:002013-06-10T22:45:11.898+08:00[轉載] Aptana Scripting Editor.js Class Document轉載自:<a target="_blank" href="http://www.koders.com/javascript/fid4BA6485B39086F41D93BE5A65764E092C104C043.aspx">Koders Code Search: Editor.js - JavaScript</a><br />
<pre class="js" name="code">/**
* Editor.js
*
* Adding this file to your Active Libraries will give you code assist for the
* Aptana Studio scripting engine.
*
* @author Kevin Lindsey
* @version 1.0
*/
/**
* Editor
*
* @constructor
* @extends {EventTarget}
*/
function Editor() {}
/*
* Properties
*/
/**
* Get/set the position of the cursor in this editor
*
* @type {Number} The current cursor offset position
*/
Editor.prototype.currentOffset = 0;
/**
* Get the File object that this editor is editing
*
* @type {File} Returns a File object or undefined
*/
Editor.prototype.file = {};
/**
* Get the language MIME type for this editor
*
* @type {String} Returns this editors language type
*/
Editor.prototype.language = "";
/**
* Get the lexemes associated with this editor
*
* @type {Array} Returns an array of Lexemes
*/
Editor.prototype.lexemes = [];
/**
* Get the line delimiter for this editor
*
* @type {String} Returns the editor's line terminator
*/
Editor.prototype.lineDelimiter = "";
/**
* Get the source associated with this editor
*
* @type {String} Returns the source text in this editor
*/
Editor.prototype.source = "";
/**
* Get the length of the source in this editor
*
* @type {Number} Returns the number of characters in this editor's document
*/
Editor.prototype.sourceLength = 0;
/**
* Get the number of columns in a tab
*
* @type {Number} Returns the number of spaces that equal one tab
*/
Editor.prototype.tabWidth = 0;
/**
* Get the zero-based line number of the line at the top of the editor
*
* @type {Number} The top-most line's index
*/
Editor.prototype.topIndex = 0;
/**
* Get/set the editor's word wrap setting. Setting this to true turns on word
* wrapping.
*
* @type {Boolean} The word wrap setting.
*/
Editor.prototype.wordWrap = false;
/*
* Methods
*/
/**
* Apply an edit to the current document. This function allows you to delete
* and insert text in one operation, if desired.
*
* @param {Number} offset
* The offset within the source where this edit is to take place
* @param {Number} deleteLength
* The number of characters to remove before inserting the new text
* @param {String} insertText
* The new text to insert at the given offset
*/
Editor.prototype.applyEdit = function(offset, deleteLength, insertText) {};
/**
* Get the zero-based line number at the specified character offset
*
* @param {Number} offset
* The character offset within the editor's document
*/
Editor.prototype.getLineAtOffset = function(offset) {};
/**
* Scroll the editor to bring the current selection or caret position into
* view.
*/
Editor.prototype.showSelection = function() {};
//eof
</pre>Jax Huhttp://www.blogger.com/profile/01953021685585893658noreply@blogger.com0tag:blogger.com,1999:blog-5946530704742130970.post-31970845371497644132011-12-21T15:04:00.007+08:002013-06-10T22:45:15.009+08:00[轉載] Aptana Scripting Global.js Document轉載自:<a target="_blank" href="http://www.koders.com/javascript/fidF76665060DD72CF657CF9367CED59C69F1A8CC79.aspx">Koders Code Search: Global.js - JavaScript</a><br />
<pre class="js" name="code">/**
* Global.js
*
* Adding this file to your Active Libraries will give you code assist for the
* Aptana Studio scripting engine.
*
* @author Kevin Lindsey
* @version 1.0
*/
/*
* Properties
*/
/**
* Retrieve the Editors object to access editors and editor events
*
* @type {Editors} Returns the global Editors object
*/
var editors = {};
/**
* Retrieve the error print stream.
*
* @type {PrintStream} Returns the output stream used to display errors
*/
var err = {};
/**
* This is a reference to the only instance of this object. All scripts run in
* their own protected scope. However, this Global is accessible from all
* scripts. Properties placed on "global" will be accessible to all scripts
*
* @type {Global} Returns a reference to the global scope
*/
var global = {};
/**
* Retrieve the Menus object to access menus and menu events
*
* @type {Menus} Returns the global Menus object
*/
var menus = {};
/**
* Retrieve the standard output print stream.
*
* @type {PrintStream} Returns the standard output stream
*/
var out = {};
/**
* Retrieve the View object to access views and view events
*
* @type {Views} Returns the global Views object
*/
var views = {};
/*
* Methods
*/
/**
* Display an alert dialog with the given message
*
* @param {String} message
* The message to display in the dialog
*/
var alert = function(message) {};
/**
* Execute a string in the current shell. This is experimental and may be
* removed in a future version of the scripting environment
*
* @param {String} command
* The command to execute in the shell
* @return {Object} Returns an object with the following properties: code,
* stdout, stderr. Code is the return code from the command. Stdout
* contains any text that was emitted to standard out while it was
* executing. Likewise, stderr contains any errors that were emitted.
*/
var execute = function(command) {};
/**
* Call Java's System.getProperty.
*
* @param {String} property
* The name of the property to retrieve
* @return {String} Returns the specified property value or the string
* "undefined" if the property does not exist
*/
var getProperty = function(property) {};
/**
* Include a JavaScript file into the current script's scope. this is used to
* load dependent libraries into the script that invokes this function.
*
* @param {String} filename
* The name of the file to include in the script
*/
var include = function(filename) {};
/**
* Load a library into the scripting environment. Each script loaded with this
* function will be assigned a unique ID and, if it exists, the init() function
* will be invoked. This gives each script the ability to initialize itself and
* to setup any event listeners it wishes to subscribe to.
*
* Each script will exist in its own scope; however, this Global is also
* included in the scope chain. All variables and functions defined in the
* script will not collide with any other scripts.
*
* Shared properties can be placed on the "global" property. All scripts loaded
* via this function will then be able to see those properties. This can be
* used to share data between scripts.
*
* @param {String} filename
* The file system path to the script to load
* @return {String} Returns a unique string identifier for the loaded script.
* This identifier can be used later to invoke functions within the
* script; however, this is more for internal use at this point. If the
* script fails to load, this will return undefined.
*/
var loadBundle = function(filename) {};
//eof
</pre>Jax Huhttp://www.blogger.com/profile/01953021685585893658noreply@blogger.com0tag:blogger.com,1999:blog-5946530704742130970.post-70795242711228307862011-12-21T15:04:00.006+08:002013-06-10T22:45:19.318+08:00[轉載] Aptana Scripting Editors.js Class Document轉載自:<a target="_blank" href="http://www.koders.com/javascript/fidF2FD410AF2E06C33A831820FC237085A88BE585A.aspx">Koders Code Search: Editors.js - JavaScript</a><br />
<pre class="js" name="code">/**
* Editors.js
*
* Adding this file to your Active Libraries will give you code assist for the
* Aptana Studio scripting engine.
*
* @author Kevin Lindsey
* @version 1.0
*/
/**
* Editors
*
* @constructor
*/
function Editors(){}
/*
* Properties
*/
/**
* Get all editors currently being displayed
*
* @type {Array} Returns an array of Editor instances, one for each open editor
*/
Editors.prototype.all = [];
/**
* Get the currently active editor
*
* @type {Editor} Returns the currently active editor or undefined if no editor is open
*/
Editors.prototype.activeEditor = {};
/*
* Methods
*/
/**
* Get the object that represents all editors of a given type. This is
* typically used to register event handlers for a given event type for
* all editors of a specified language.
*
* @param {String} type
* The editor type to retrieve. Currently, this is the MIME type for the
* language the editor supports.
* @return {EditorType} Returns the editor type for the given MIME type or
* undefined if no editor type exists for the given MIME type
*/
Editors.prototype.getEditorType = function(type) {};
/**
* Open the specified filename in a new editor
*
* @param {String} filename
* The name of the file to open in the file system
* @return {Editor} Returns a new Editor object for the newly opened editor
*/
Editors.prototype.open = function(filename) {};
//eof
</pre>Jax Huhttp://www.blogger.com/profile/01953021685585893658noreply@blogger.com0tag:blogger.com,1999:blog-5946530704742130970.post-52990096370551263682010-08-28T19:42:00.007+08:002013-06-10T23:23:13.896+08:00Eclipse + PHPEclipse + Aptana 安裝要安裝 Eclipse 說實在的還需要一點經驗<br />
首先 Eclipse 是 Base 在 Java 上的應用程式,所以先到 <a target="_blank" href="http://www.java.com/zh_TW/">Java.com</a> 去下載 Java Runtime Environment。<br />
再來到 <a target="_blank" href="http://www.eclipse.org/downloads/">Eclipse Downloads</a> 去下載 Eclipse 主程式。<br />
<br />
<br />
這裡我還是用我熟悉 3.5 版本 <a target="_blank" href="http://www.eclipse.org/downloads/packages/release/galileo/r">Eclipse Galileo</a> 做範例,既然 Web 開發那就直接下載 <a target="_blank" href="http://www.eclipse.org/downloads/packages/eclipse-php-developers/galileor">Eclipse for PHP Developers</a> 這個有封裝 PDT 的 Package<br />
<span style="color: rgb(255, 0, 0);">Downloda : </span><a target="_blank" href="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/R/eclipse-php-galileo-win32.zip">eclipse-php-galileo-win32.zip</a><br />
<br />
<br />
<br />
再來我們先來去找中文語言包 <a target="_blank" href="http://www.eclipse.org/babel/downloads.php">Eclipse Babel Project Downloads</a><br />
<span style="color: rgb(255, 0, 0);">Downloda : </span><br />
<a target="_blank" href="http://www.eclipse.org/downloads/download.php?file=/technology/babel/babel_language_packs/R0.8.0/BabelLanguagePack-eclipse-zh_TW_3.5.0.v20100814074441.zip&url=http://ftp.cs.pu.edu.tw/pub/eclipse/technology/babel/babel_language_packs/R0.8.0/BabelLanguagePack-eclipse-zh_TW_3.5.0.v20100814074441.zip&mirror_id=554">BabelLanguagePack-eclipse-zh_TW_3.5.0.v20100814074441.zip</a><br />
<a target="_blank" href="http://www.eclipse.org/downloads/download.php?file=/technology/babel/babel_language_packs/R0.8.0/BabelLanguagePack-tools.mylyn-zh_TW_3.5.0.v20100814074441.zip&url=http://ftp.cs.pu.edu.tw/pub/eclipse/technology/babel/babel_language_packs/R0.8.0/BabelLanguagePack-tools.mylyn-zh_TW_3.5.0.v20100814074441.zip&mirror_id=554">BabelLanguagePack-tools.mylyn-zh_TW_3.5.0.v20100814074441.zip</a><br />
<a target="_blank" href="http://www.eclipse.org/downloads/download.php?file=/technology/babel/babel_language_packs/R0.8.0/BabelLanguagePack-tools.pdt-zh_TW_3.5.0.v20100814074441.zip&url=http://ftp.cs.pu.edu.tw/pub/eclipse/technology/babel/babel_language_packs/R0.8.0/BabelLanguagePack-tools.pdt-zh_TW_3.5.0.v20100814074441.zip&mirror_id=554">BabelLanguagePack-tools.pdt-zh_TW_3.5.0.v20100814074441.zip</a><br />
<a target="_blank" href="http://www.eclipse.org/downloads/download.php?file=/technology/babel/babel_language_packs/R0.8.0/BabelLanguagePack-tptp.platform-zh_TW_3.5.0.v20100814074441.zip&url=http://ftp.cs.pu.edu.tw/pub/eclipse/technology/babel/babel_language_packs/R0.8.0/BabelLanguagePack-tptp.platform-zh_TW_3.5.0.v20100814074441.zip&mirror_id=554">BabelLanguagePack-tptp.platform-zh_TW_3.5.0.v20100814074441.zip</a><br />
<a target="_blank" href="http://www.eclipse.org/downloads/download.php?file=/technology/babel/babel_language_packs/R0.8.0/BabelLanguagePack-rt.equinox-zh_TW_3.5.0.v20100814074441.zip&url=http://ftp.cs.pu.edu.tw/pub/eclipse/technology/babel/babel_language_packs/R0.8.0/BabelLanguagePack-rt.equinox-zh_TW_3.5.0.v20100814074441.zip&mirror_id=554">BabelLanguagePack-rt.equinox-zh_TW_3.5.0.v20100814074441.zip</a><br />
<br />
下載好後將全部解壓縮就可以了,然後執行 eclipse.exe<br />
<br />
<br />
<br />
先來安裝 <a target="_blank" href="http://www.phpeclipse.com/">PHPEclipse</a>,進入 -> 說明 -> Install New Software<br />
在 Work with 貼上 PHPEclipse 的線上安裝路徑,然後按下 Enter,選項出現後選擇 PHPEclipse,下一步 下一步 同意 完成<span style="color: rgb(153, 153, 153);font-size:85%;" > <span style="color: rgb(102, 102, 102);">(因為是線上安裝,所以會有點久)</span></span><br />
<strong style="color: rgb(255, 0, 0);">http://phpeclipse.sourceforge.net/update/stable/1.2.x/</strong><br />
<br />
<br />
<br />
再來安裝 <a target="_blank" href="http://www.aptana.com/">Aptana</a>,進入 -> 說明 -> Install New Software<br />
在 Work with 貼上 Aptana 的線上安裝路徑,然後按下 Enter,選項出現後選擇 Aptana Studio,下一步 下一步 同意 完成<br />
<strong style="color: rgb(255, 0, 0);">http://download.aptana.com/tools/studio/plugin/install/studio</strong><br />
<br />
<br />
<br />
最後來安裝我常用的套件<ul><li>Database Developers:可以撰寫 SQL script 跟連接 Database<br />
</li>
<li>Subversive:用來連接 SVN 的 Client 套件<br />
</li>
<li>RSE:可以連接 SSH 跟 SFTP 的遠端連接套件</li>
</ul><br />
進入 -> 說明 -> Install New Software<br />
在 Work with 的選項中選擇 <strong style="color: rgb(255, 0, 0);">Galileo - http://download.eclipse.org/releases/galileo</strong>,然後按下 Enter,然後就會出現一堆官方套件選擇<br />
<ul><li>Data Tools Platform Enablement Extender SDK <br />
</li>
<li>Data Tools Platform Extender SDK<br />
</li>
<li>Subversive SVN Integration for the Mylyn Project<br />
</li>
<li>Subversive SVN Team Provider<br />
</li>
<li>Remote System Explorer End-User Runtime<br />
</li>
<li>Remote System Explorer User Actions</li>
</ul><br />
一樣 下一步 下一步 同意 完成<br />
<br />
重開之後會跳出 Subversive 的選項,OS 是 Windows 的話選擇下面的選項: <br />
<ul><li>JavaHL 1.5.4 Win32 Binaries<br />
</li>
<li>JavaHL 1.6.0 Win32 Binaries<br />
</li>
<li>Native JavaHL 1.5 Implementation<br />
</li>
<li>Native JavaHL 1.6 Implementation<br />
</li>
<li>Subversive SVN Connectors</li>
</ul><br />
<br />
<br />
因為額外多裝了一些官方套件,順便來去下載語言包<br />
<a target="_blank" href="http://www.eclipse.org/downloads/download.php?file=/technology/babel/babel_language_packs/R0.8.0/BabelLanguagePack-datatools-zh_TW_3.5.0.v20100814074441.zip&url=http://ftp.cs.pu.edu.tw/pub/eclipse/technology/babel/babel_language_packs/R0.8.0/BabelLanguagePack-datatools-zh_TW_3.5.0.v20100814074441.zip&mirror_id=554">BabelLanguagePack-datatools-zh_TW_3.5.0.v20100814074441.zip</a><br />
<a target="_blank" href="http://www.eclipse.org/downloads/download.php?file=/technology/babel/babel_language_packs/R0.8.0/BabelLanguagePack-technology.subversive-zh_TW_3.5.0.v20100814074441.zip&url=http://ftp.cs.pu.edu.tw/pub/eclipse/technology/babel/babel_language_packs/R0.8.0/BabelLanguagePack-technology.subversive-zh_TW_3.5.0.v20100814074441.zip&mirror_id=554">BabelLanguagePack-technology.subversive-zh_TW_3.5.0.v20100814074441.zip</a><br />
<br />
<br />
<br />
<strong style="color: rgb(255, 0, 0);">最後最後中肯的建議,別在單一一個 Eclipse 上加太多套件,不然 Eclipse 會變成吃效能的怪物,最好依工作性質分成幾個不同類型的開發環境。</strong>Jax Huhttp://www.blogger.com/profile/01953021685585893658noreply@blogger.com0tag:blogger.com,1999:blog-5946530704742130970.post-92058743828146621952008-06-07T09:13:00.011+08:002011-12-21T15:10:37.250+08:00Aptana 中文亂碼問題(Snippets,Code Assist Profiles)Aptana 中文亂碼雖然這已經不是問題了,而且也有很多網站提出解決方法了:<br /><blockquote><br />Windows選單→ Preferences → General → Content Types,選擇 Text ,在下方指定默認編碼為UTF-8,並添加文件類型,如*.js<br /><br />如果文檔的編碼不是UTF-8就指定成相應的編碼。不過還是建議使用UTF-8編碼<br /></blockquote><br />雖然這個已經解決了,可是 <span style="color: rgb(255, 0, 0); font-weight: bold;">Snippets</span> 與 <span style="color: rgb(255, 0, 0); font-weight: bold;">Code Assist Profiles</span> 這兩個工具欄卻還是有亂碼的問題,所有的註解和說明都變成亂碼,在 Shan 的提點下找到亂碼的根源,發現原來是 Aptana 在讀檔時採用雙位元檢查,造成檔案編碼跑掉,改善的方法就是將這兩個工具欄的<span style="color: rgb(255, 0, 0); font-weight: bold;">檔案改成 Big5 編碼格式(windows)</span>。<br /><br />PS:Linux 則使用 UTF-8Jax Huhttp://www.blogger.com/profile/01953021685585893658noreply@blogger.com2