KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > internal > ui > wizards > NewWebSiteDialog


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.update.internal.ui.wizards;
12
13 import java.net.*;
14
15 import org.eclipse.swt.widgets.*;
16 import org.eclipse.update.internal.ui.*;
17 import org.eclipse.update.internal.ui.model.*;
18
19
20 public class NewWebSiteDialog extends NewUpdateSiteDialog {
21
22     public NewWebSiteDialog(Shell parentShell) {
23         super(parentShell);
24     }
25     
26     protected void update() {
27         try {
28             UpdateModel model = UpdateUI.getDefault().getUpdateModel();
29             SiteBookmark bookmark = new SiteBookmark(name.getText(), new URL(url.getText()), true);
30             model.addBookmark(bookmark);
31         } catch (MalformedURLException e) {
32         }
33     }
34
35 }
36
Popular Tags