KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > schema > SchemaRootElement


1 /*******************************************************************************
2  * Copyright (c) 2005, 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 package org.eclipse.pde.internal.core.schema;
12
13 import org.eclipse.pde.internal.core.ischema.ISchemaObject;
14 import org.eclipse.pde.internal.core.ischema.ISchemaRootElement;
15
16 public class SchemaRootElement extends SchemaElement implements
17         ISchemaRootElement {
18
19     private static final long serialVersionUID = 1L;
20     public static final String JavaDoc P_DEP_REPLACEMENT = "replacement"; //$NON-NLS-1$
21
private String JavaDoc fDeperecatedReplacement;
22     
23     public SchemaRootElement(ISchemaObject parent, String JavaDoc name) {
24         super(parent, name);
25     }
26
27     public void setDeprecatedSuggestion(String JavaDoc value) {
28         Object JavaDoc oldValue = fDeperecatedReplacement;
29         fDeperecatedReplacement = value;
30         getSchema().fireModelObjectChanged(this, P_DEP_REPLACEMENT, oldValue, fDeperecatedReplacement);
31     }
32
33     public String JavaDoc getDeprecatedSuggestion() {
34         return fDeperecatedReplacement;
35     }
36
37     public String JavaDoc getExtendedAttributes() {
38         if (fDeperecatedReplacement == null)
39             return null;
40         return " " + P_DEP_REPLACEMENT + "=\"" + fDeperecatedReplacement + "\" "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
41
}
42 }
43
Popular Tags