KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > intro > impl > model > IntroURLAction


1 /*******************************************************************************
2  * Copyright (c) 2004, 2006 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
12 package org.eclipse.ui.internal.intro.impl.model;
13
14 import org.eclipse.core.runtime.IConfigurationElement;
15
16 /**
17  * An intro url command registration. This model class does not appear as a
18  * child under any of the other model classes. It is returned by the
19  * SharedConfigExtensionsManager when asked for commands.
20  */

21 public class IntroURLAction extends AbstractIntroElement {
22
23     public static final String JavaDoc TAG_ACTION = "action"; //$NON-NLS-1$
24

25     private static final String JavaDoc ATT_NAME = "name"; //$NON-NLS-1$
26
private static final String JavaDoc ATT_REPLACES = "replaces"; //$NON-NLS-1$
27

28     private String JavaDoc name;
29     private String JavaDoc replaces;
30
31
32     /**
33      * Note: model class with public constructor because it is not instantiated
34      * by the model root.
35      */

36     public IntroURLAction(IConfigurationElement element) {
37         super(element);
38         name = element.getAttribute(ATT_NAME);
39         replaces = element.getAttribute(ATT_REPLACES);
40     }
41
42     /**
43      * @return Returns the className.
44      */

45     public String JavaDoc getName() {
46         return name;
47     }
48
49     /**
50      * @return Returns the pluginId.
51      */

52     public String JavaDoc getReplaceValue() {
53         return replaces;
54     }
55
56     /*
57      * (non-Javadoc)
58      *
59      * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
60      */

61     public int getType() {
62         // this model class does not need a type so far.
63
return 0;
64     }
65 }
66
Popular Tags