Search in sources :

Example 11 with XSDInclude

use of org.eclipse.xsd.XSDInclude in project webtools.sourceediting by eclipse.

the class SchemaLocationSection method refresh.

/*
		 * @see org.eclipse.wst.common.ui.properties.internal.provisional.view.ITabbedPropertySection#refresh()
		 */
public void refresh() {
    setListenerEnabled(false);
    Element element = null;
    if (input instanceof XSDInclude) {
        element = ((XSDIncludeImpl) input).getElement();
    } else if (input instanceof XSDRedefine) {
        element = ((XSDRedefineImpl) input).getElement();
    }
    if (element != null) {
        // $NON-NLS-1$
        String location = "";
        // $NON-NLS-1$
        location = element.getAttribute("schemaLocation");
        if (location == null) {
            // $NON-NLS-1$
            location = "";
        }
        schemaLocationText.setText(location);
    }
    setListenerEnabled(true);
}
Also used : XSDRedefine(org.eclipse.xsd.XSDRedefine) XSDRedefineImpl(org.eclipse.xsd.impl.XSDRedefineImpl) Element(org.w3c.dom.Element) XSDInclude(org.eclipse.xsd.XSDInclude)

Aggregations

XSDInclude (org.eclipse.xsd.XSDInclude)11 XSDSchema (org.eclipse.xsd.XSDSchema)7 XSDImport (org.eclipse.xsd.XSDImport)6 XSDRedefine (org.eclipse.xsd.XSDRedefine)6 ArrayList (java.util.ArrayList)3 Iterator (java.util.Iterator)3 EObject (org.eclipse.emf.ecore.EObject)3 XSDSchemaContent (org.eclipse.xsd.XSDSchemaContent)3 HashMap (java.util.HashMap)2 List (java.util.List)2 IFile (org.eclipse.core.resources.IFile)2 URI (org.eclipse.emf.common.util.URI)2 IEditorInput (org.eclipse.ui.IEditorInput)2 IFileEditorInput (org.eclipse.ui.IFileEditorInput)2 XSDAttributeDeclaration (org.eclipse.xsd.XSDAttributeDeclaration)2 XSDElementDeclaration (org.eclipse.xsd.XSDElementDeclaration)2 XSDSchemaDirective (org.eclipse.xsd.XSDSchemaDirective)2 XSDImportImpl (org.eclipse.xsd.impl.XSDImportImpl)2 TreeObject (com.amalto.workbench.models.TreeObject)1 WSDataModel (com.amalto.workbench.webservices.WSDataModel)1