Archive

文章標籤 ‘Eclipse’

Eclipse RAP execute javascript

2011年7月21日 Austin 尚無評論

方法一把輸出字串當javascript執行,方法二只是把方法一包到PhaseListener,為什麼要這樣包還不太清楚,所以先用方法一

try {
	RWT.getResponse().getWriter().println("alert('123');");
} catch (IOException ex) {
	ex.printStackTrace();
}
RWT.getLifeCycle().addPhaseListener(new PhaseListener() {
	private static final long serialVersionUID = 1995219943700635190L;

	@Override
	public PhaseId getPhaseId() {
		return PhaseId.RENDER;
	}

	@Override
	public void beforePhase(PhaseEvent event) {
		try {
			RWT.getResponse().getWriter().println("alert('1');");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	@Override
	public void afterPhase(PhaseEvent event) {
		try {
			RWT.getResponse().getWriter().println("alert('2');");
		} catch (IOException e) {
			e.printStackTrace();
		}
		RWT.getLifeCycle().removePhaseListener(this);
	}
});

Develop Google App Engine by Eclipse

2011年4月18日 Austin 尚無評論

Step 1. Install plugin from update site
Eclipse => Help => Install New Software => Add
Name: Google app Engine
Location: http://dl.google.com/eclipse/plugin/3.6

Step 2. Create GAE project
File => New => Project
type filter text: Web Application Project
type project name, package and uncheck "Use Google Toolkit"

Step 3. Specified applications for this project
Package Explorer => this project => war => WEB-INF => appengine-web.xml
<application>name of your application</application>

Step 4. Test and Deploy
Just click the button "Run" or "Deploy App engine project" on toolbar
Test URL: http://localhost:8888/ (Default)
GAE URL: http://name of your application.appspot.com

Categories: Eclipse, Google Tags: , , ,

RAP Login Dialog

2011年4月18日 Austin 尚無評論
public class MyEntryPoint implements IEntryPoint {
    public int createUI() {
        Display display = PlatformUI.createDisplay();
        LoginInfo info = null;
        while (info == null) {
            LogonDialog dialog = new LogonDialog(display.getActiveShell());
            try {
                info = checkLogin(dialog.getUsername(), dialog.getPassword());
            } catch (Exception e) {
                MessageDialog.openError(display.getActiveShell(), "Error", "Logon Fail:\n" + e.getMessage());
            }
        }
        return PlatformUI.createAndRunWorkbench( display, new ApplicationWorkbenchAdvisor());
    }
}
Categories: Eclipse, Java, RAP Tags: , , , , ,

Eclipse for RCP and RAP + GWT + WindowBuilder

2011年2月17日 Austin 尚無評論
Categories: Eclipse, Google, Java, RAP Tags: , , , , , ,

6個Aptana PHP教學影片

2009年3月18日 Austin 尚無評論

1. Introduction to PHP 1.0
Take a look at all the new features in Aptana’s PHP support version 1.0. We’ll cover the basics of creating and working with PHP projects, as well as some configuration options you have available


閱讀全文…

Categories: Eclipse, PHP, 未分類 Tags: , ,

安裝Eclipse+Aptana+Babel

2008年10月26日 Austin 尚無評論

相關下載及安裝說明:
Eclipse:http://www.eclipse.org/downloads/
Aptana:http://update.aptana.com/update/studio/3.2/
Babel:http://www.eclipse.org/babel/downloads.php

Step 1:取得新版Eclipse
到Eclipse的網站下載Eclipse Classic
抓完之後解開並執行Eclipse

閱讀全文…

在Eclipse上安裝Subclipse(SVN)

2008年10月20日 Austin 尚無評論

Eclipse選單 => Help => Software Updates => Find and Install…

點選Search for new features to install => Next >

按下New Remote Site,並在下列兩個項目擇一新增,然後Next >

Name: Subclipse 1.2.x (Eclipse 3.2+)
URL:  http://subclipse.tigris.org/update_1.2.x

Name: Subclipse 1.0.x (Eclipse 3.0/3.1)
URL:  http://subclipse.tigris.org/update_1.0.x

勾選Subclipse Plugin,然後Next => Next => Finish

Categories: Eclipse, 未分類 Tags: , ,