01: /*******************************************************************************
02: * Copyright (c) 2004, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.intro.impl.model;
11:
12: import org.eclipse.core.runtime.IConfigurationElement;
13:
14: /**
15: * An intro url command registration. This model class does not appear as a
16: * child under any of the other model classes. It is returned by the
17: * SharedConfigExtensionsManager when asked for commands.
18: */
19: public class IntroURLAction extends AbstractIntroElement {
20:
21: public static final String TAG_ACTION = "action"; //$NON-NLS-1$
22:
23: private static final String ATT_NAME = "name"; //$NON-NLS-1$
24: private static final String ATT_REPLACES = "replaces"; //$NON-NLS-1$
25:
26: private String name;
27: private String replaces;
28:
29: /**
30: * Note: model class with public constructor because it is not instantiated
31: * by the model root.
32: */
33: public IntroURLAction(IConfigurationElement element) {
34: super (element);
35: name = element.getAttribute(ATT_NAME);
36: replaces = element.getAttribute(ATT_REPLACES);
37: }
38:
39: /**
40: * @return Returns the className.
41: */
42: public String getName() {
43: return name;
44: }
45:
46: /**
47: * @return Returns the pluginId.
48: */
49: public String getReplaceValue() {
50: return replaces;
51: }
52:
53: /*
54: * (non-Javadoc)
55: *
56: * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
57: */
58: public int getType() {
59: // this model class does not need a type so far.
60: return 0;
61: }
62: }
|