顯示具有 Eclipse-教學 標籤的文章。 顯示所有文章
顯示具有 Eclipse-教學 標籤的文章。 顯示所有文章

2015年4月23日 星期四

Setting UnitTest & XDebug Debbugger in Intellij IDEA in MAC OSX

1. Install phpunit.phar (link)
2. Install XDebug
3. Intellij IDEA > Preference > PHP > Interpreter > /usr/bin/php
4. Intellij IDEA > Preference > PHPUnit

  • Choose Path to phpunit.phar > /usr/local/bin/phpunit.phar

2013年11月11日 星期一

Changing delimiters from DOS to Unix to MacOS in Eclipse

Sometimes there are cases where the development, version control and deployment are done on different operating system.When this is the case you will need the file that is being written in the format of the version control and hence you will need to change the line delimiters from DOS<->Unix<->MacOS. I have used eclipse for a couple of years and I did not know how to do this. So I thought I would blog about the same.

Goto: "File -> Convert Line Delimiters To"
Thats it. Its right there. This is in the latest version of Eclipse at the time of writing this post which is Eclipse 3.7.2.
Hope someone finds it helpful.

reference : http://franticmantra.blogspot.tw/2012/06/changing-delimiters-from-dos-to-unix-to.html

2013年5月2日 星期四

StartExplorer Eclipse Plug-in


Download and Installation

Requirements

  • Eclipse 3.3 (may work with earlier versions, I have not tested these)
  • JRE 1.5 or better (you'll have that covered if you're running Eclipse 3.3 or above)

Via Eclipse Update Manager

From within Eclipse:
  • Help
  • Install New Software
  • Add...
  • Name: StartExplorer
  • Location: http://basti1302.github.com/startexplorer/update/
  • OK
  • Tick the StartExplorer Feature checkbox
  • Click Next and follow the instructions...


reference : http://basti1302.github.io/startexplorer/#install

2012年12月20日 星期四

Mac OSX eclipse git Permission denied issue

Solution :
$ sudo chown -R [userid]:staff [git_folder_project]

2012年12月13日 星期四

Mac OSX Zend Studio delimiter / newline setting

General > workspace > New text file line delimiter
-- Unix
General > Editors > Text Editors
-- Insert spaces for tabs
-- Show whitespace characters

Aptana > Editor > CSS > Formatting
Aptana > Editor > HTML > Formatting
Aptana > Editor > Javascript > Formatting
Aptana > Editor > XML > Formatting

Javascript > Code Style > Formatter
PHP > Code Style > Formatter
Web > CSS Files > Code Style > Formatter
Web > HTML Files > Code Style > Formatter
Web > XML Files > Code Style > Formatter


2012年3月18日 星期日

MacBook Air ZendStudio9 PHPUnit setup

Step 1 : install XDebug
[xdebug]
zend_extension = /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/xdebug.so
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = /tmp/xdebug
xdebug.profiler_enable_trigger =1
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000

Step 2 : Setup PHPUnit in /path/to/htdocs/PHPUnit

Step 3 : Setup ZendStudio
Run as icon -> Run configuration -> add [PHP CLI Application]






add [PHPUnit]








2011年9月18日 星期日

Eclipse 下右鍵打開文件所在文件夾(Explorer Files) Plugin

如果你經常需要在Eclipse裡打開相關資源文件所在的文件夾,比較麻煩,要右鍵,屬性,在Location一欄中把所在的文件夾Copy一下,然後再去資源管理器裡輸入這個路徑,Enter,打開它。

解決方法: 用EasyExplorer插件,有了這個插件就可以很方便地打開資源文件所在的文件夾了.

安裝: EasyExplorer 從http://sourceforge.net/projects/easystruts

2011年9月9日 星期五

Zend Studio 8.0 PHPUnit Debugger setting[use XDebug in Max OSX 10.6]

Predefined:
XAMPP version 1.7.3
PHP 5.3.1

Step1 : Install XDebug
Download [xdebug.so] from http://code.activestate.com/komodo/remotedebugging/
Click [PHP Remote Debugging Client] > [Mac OS X (universal)]
$ copy xdebug.so /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/xdebug.so

Step2 : Edit php.ini
$ vi /Applications/XAMPP/etc/php.ini

[XDebug]
zend_extension = /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/xdebug.so


Zend Studio 8 setting as below:





Zend Studio 8.0.1 PHPUnit Debugger setting[use XDebug in Windows Server2008]

Predefined:


php.ini as below:

[XDebug]
zend_extension = C:\AppServ\php5\ext\php_xdebug-2.1.0-5.3-vc9-nts.dll

[PHPUnit]
include_path = ".;C:\CruiseControl\projects\Widget_Framework\Int\build\phpunit\PHPUnit"

[Zend]
;zend_extension="C:\Program Files (x86)\Zend\Zend Studio - 8.0.1\plugins\org.zend.php.debug.debugger.win32.x86_5.3.18.v20110322\resources\php53\ZendDebugger.dll"
zend_debugger.allow_hosts=127.0.0.1
zend_debugger.expose_remotely=always
zend_debugger.connector_port = 10013


Zend Debugger setting as below:








2011年8月16日 星期二

A project with that name already exists in the wor

Keyword : Eclipse The project could not be created. This may occur if a project in by that name already exists
Solution : You need to open up the Project Explorer view (it may already be open) and delete the project from within there.

2011年4月12日 星期二

See the invisible whitespace characters in Eclipse

It is now possible to see the invisible whitespace characters in textual editors:

This feature can either be controlled via "General > Editors > Text Editors > Show whitespace characters" preference, or via the tool bar button when the Editor Presentation action set is enabled.

reference : http://stackoverflow.com/questions/971283/view-tabs-in-eclipse

2011年1月5日 星期三

How to set ZendDebugger PHPUnit in Zend studio 8.0

Predefined:
Apperv2.5.10
PHP5.2
Zend Studio 8.0

(按bug icon in menu右邊的三角形icon) -> 「Debug Configurations」



「PHP Script」->「New launch configuration(左上角的icon)」



Name:「PHPUnitMyDebugger」
Execution environment:「php5」
PHP File:「/path/to/PHPUnit/phpunit.php」


Click Apply!

In Tab PHP Script Arguments
Script Arguments:「${resource_loc}」


In Tab Common(As below)


Click Apply! You have complete first part setting~~

Next part is setting you php.ini
Add below config to bottom of php.ini

[Zend]
zend_extension="C:\Program Files (x86)\Zend\Zend Studio - 8.0.0\plugins\org.zend.php.debug.debugger.win32.x86_5.3.18.v20100905\resources\php53\ZendDebugger.dll"
zend_debugger.allow_hosts=127.0.0.1
zend_debugger.expose_remotely=always
zend_debugger.connector_port = 10013

save php.ini and restart Apache.

我設成功時,是有連同PHPUnit也一起設定好。所以如果您做了以上的設定後,還是無法成功跟ZendDebugger時,
你也設一下PHPUnit吧



在Program上「New launch configuration」
Name:「PHPUnit」
Location:「/path/to/phpunit/phpunit_ori.bat」
Working Directory:「${workspace_loc}」
Arguments:「${workspace_loc}」


In common tab


click Apply. OK~ That is all my setting process~

2010年11月14日 星期日

zend studio install aptana plugins

Plugin URL : http://download.aptana.com/tools/studio/plugin/install/studio

From the Help menu, select Install New Software... to open the Install New Software dialog.
Paste the URL for the update site into the Work With text box, and hit the Enter (or Return) key.
In the populated table below, check the box next to the name of the plug-in, and then click the Next button.
Click the Next button to go to the license page.
Choose the option to accept the terms of the license agreement, and click the Finish button.
You may need to restart Eclipse to continue.

2010年11月1日 星期一

Aptana Setting PHPUnit & PHP Debugger

1.Install with PEAR
sudo pear upgrade PEAR
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover pear.symfony-project.com
sudo pear channel-discover components.ez.no
sudo pear install phpunit/PHPUnit

Try running:
phpunit –version
You should see the following response:

PHPUnit 3.5.0 by Sebastian Bergmann.


2.Install Manual (I used this way ^__^)
Download PHPUnit-3.5.3.tgz from http://pear.phpunit.de/get/ and extract to folder PHPUnit
Download File_Iterator-1.2.3.tgz and extract to folder PHPUnit
Download PHP_CodeCoverage-1.0.2.tgz and extract to folder PHPUnit
Download PHP_Timer-1.0.0.tgz and extract to folder PHPUnit
Download PHP_TokenStream-1.0.1.tgz and extract to folder PHPUnit
Download Text_Template-1.0.0.tgz and extract to folder PHPUnit

Setting PHPUnit as External Tools
Aptana >> External Tools Configurations
Main Tabs as below:
Location:/Applications/XAMPP/xamppfiles/bin/php
Working Directory:${workspace_loc}
Arguments:/Users/jersus/htdocs/PHPUnit/phpunit.php --verbose --stop-on-failure ${resource_loc}

Common Tabs as below:
checked Display in favorites menu > External Tools


Setting Debugger PHPUnit
Run >> Debug Configuration
PHP Script Tabs as below:
PHP Debugger : Zend Debugger
PHP Executable : PHP(/Application/XAMPP/xamppfiles/bin/php-5.3.1)
PHP File : /Applications/XAMPP/xamppfiles/bin/phpunit

PHP Script Arguments Tabs as below:
--verbose ${resource_loc}

Common Tabs as below:
checked Display in favorites menu > Debug
checked Display in favorites menu > Run

2010年7月3日 星期六

Aptana / Eclipse Font Size Setting

Open: Window->Preferences->General->Appearance->Color and Fonts->Basic->Text Font and change the font size

2010年6月22日 星期二

Aptana安裝 & Checkout SOP

1.下載Aptana Studio3 Beta & Install
2.安裝PDT
「Help」->「Install New Software...」->「Work with --All Available Sites--」->「Programming Language」->安裝PDT
3.安裝Subclipse
「Help」->「Install New Software...」->「Add Site」* http://subclipse.tigris.org/update_1.6.x/->安裝所有subclipse套件
3-1.設定SVN
「Preferences」->「Team」->「SVN」->「SVN介面」->「SNVKit」
4.設定Workspace
「File」->「Switch Workspace」->「other」->「C:\Appserv\www」
5.右鍵->「New」->「PHP Project」->「UR資料夾」
6.在「UR資料夾」點右鍵->「New」->「Other」->「SVN」->「自SVN取回專案」->建立新的檔案位置->「UC SVN URL/urstyle/crontab」->「以工作區專案的方式取出」->專案名稱「urstyle_crontab」->「C:/AppServ/www/urstyle」->OK
7.在專案資料夾點右鍵->「Configure」->「Add PHP Support..」

2010年3月25日 星期四

Eclipse 解決 Save problem Save could not be completed問題

MyEclipse中新建一个MessageBundle.properties文件,如果输入中文保存时就会提示错误: Save could not be completed. Reason: some characters cannot be mapped using "ISO-8859-1" character encoding. Either change the encoding or remove the characters which are not supported by the "ISO-8859-1" character encoding.


解决办法一:

打开Eclipse的Preferences,选择General->Content Types,然后修改右面的Text下的Java Properites File的默认编码方式为UTF-8,点击Update就可以了!



解决方法二:

1 应该使用eclipse的jinto插件编辑,会自动调用java的native2ascii把文件转码。

jinto插件下载:http://www.guh-software.de/jinto.html

2 2 Eclipse-->Preferences...-->在“type filter text“栏中输入”Content Types“查找,然后在选择

右边的Text下边相应的文件后缀名,修改其编码就可。
然后手动调用native2ascii编译MessageBUndle_zh_CN.proterites文件



附: Eclipse下安装Properties Editor

在eclipse下"帮助"---"软件更新"--"查找并安装"--"搜索要安装的新功能部件" ---"下一步"---"新建远程站点"---

填写"名称":Properties Editor;

URL为:http://propedit.sourceforge.jp/eclipse/updates/点完成,

让它自己下载插件..

找到合适的Properties Editor安装,这一个插件是减少转化为utf-8格式,在struts自动转换的.

这样,eclipse插件就可以自己安装一些。

摘自:http://space.itpub.net/13956325/viewspace-598306

2009年11月23日 星期一

Small hint for PDT, use autocomplete in /* @var */type hint.

@var variable type hint is very useful, but adding it a little bit complex: usually you need to type the class name or copy/paste it from somewhere:

/* @var $controller Zend_Controller_Front */

But with Eclipse PDT templates you can simplify this and add an autocomplete for variable name and class name:



To add this template open Window menu, select Preferences and then navigate to PHP/Templates section in the tree. Then click "New..." button and fill the fields correspondingly:



After that, in the code view type "var" and press Ctrl+Space. Select "var - Variable type hint" in the list and continue by selecting or typing variable name and class name as shown on the video below:



摘自:http://www.alexatnet.com/node/179

2009年6月9日 星期二

可以改善 eclipse 效能的 plugin

這個 plugin 叫做 KeepResident

增加效能的原理主要是利用兩個 Windows API - SetProcessWorkingSetSize 與 VirtualLock (所以只適用於 Windows 平台),讓 Windows 保留更多的記憶體給
eclipse 的 java process。

自己試用的結果,速度真的有變快,切換頁面 lag 的情形好很多,以往將 eclipse
視窗最小化後記憶體會被釋放,所以還原視窗就會 delay,現在也不會了 (因為記憶體不會釋放,如果你勾選了VirtualLock 的選項的話)。

使用前我的 eclipse 的 java process (javaw.exe) 最多 5MB,但是 VM size 上百 MB;使用後現在 javaw.exe 所使用的記憶體維持在 70~100MB 之間,對我這台電腦的記憶體(768MB)來說還算過得去。官方的文件建議最小值設定在 100 MB,最大值 250 MB 左右。

至於穩定性,目前我是開啟 VirtualLock,最小值 128,最大值 256,寫了大概
五小時的程式,目前沒有遇到什麼問題,但是我的 project 不多,也沒有安裝
其他的 plugin,所以僅供參考。

如果你的電腦記憶體足夠的話,這個 plugin 或許可以在 eclipse 的效能上對你有所幫助。

註:必須要有 administrator 的權限,plugin 才能生效

摘自:http://www.javaworld.com.tw/jute/post/view?bid=10&id=65161&sty=3

2009年5月12日 星期二

[ecplise]java.lang.OutOfMemoryError: Java heap space

with the increased parameters from Ed I did not yet receive a dump.

So currently me eclipse.ini looks like the following:

-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
-vmargs
-Xms40m
-Xmx512m
-XX:+HeapDumpOnOutOfMemoryError

wibiya widget