blob: d9fc87729675c92ac7bc45ed9d4e44b6711d94d6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/*******************************************************************************
* Copyright (c) 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.wst.xsd.ui.internal.adt.editor;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.ui.ide.FileStoreEditorInput;
import org.eclipse.wst.xsd.ui.internal.editor.Messages;
import org.eclipse.xsd.XSDSchema;
public class ADTFileStoreEditorInput extends FileStoreEditorInput implements IADTEditorInput
{
private XSDSchema schema;
private String editorName;
public ADTFileStoreEditorInput(IFileStore fileStore, XSDSchema xsdSchema)
{
super(fileStore);
this.schema = xsdSchema;
}
public XSDSchema getSchema()
{
return schema;
}
public void setEditorName(String name)
{
editorName = name;
}
public String getName()
{
if (editorName != null)
{
return editorName;
}
return super.getName();
}
public String getToolTipText()
{
if (schema != null)
{
String ns = schema.getTargetNamespace();
if (ns != null && ns.length() > 0)
return Messages._UI_LABEL_TARGET_NAMESPACE + ns;
else
return Messages._UI_LABEL_NO_NAMESPACE;
}
return super.getToolTipText();
}
}
|