Archive

2011年4月 的Archive

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: , , , , ,