[no bug] clean up warnings
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/properties/sections/XSDComplexTypeSection.java b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/properties/sections/XSDComplexTypeSection.java
index 326419d..677759d 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/properties/sections/XSDComplexTypeSection.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/properties/sections/XSDComplexTypeSection.java
@@ -11,7 +11,6 @@
package org.eclipse.wst.xsd.ui.common.properties.sections;
import org.apache.xerces.util.XMLChar;
-import org.eclipse.core.resources.IFile;
import org.eclipse.gef.commands.Command;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
@@ -24,19 +23,15 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IFileEditorInput;
import org.eclipse.wst.xsd.editor.Messages;
import org.eclipse.wst.xsd.editor.XSDEditorPlugin;
import org.eclipse.wst.xsd.ui.common.commands.UpdateNameCommand;
import org.eclipse.xsd.XSDComplexTypeDefinition;
import org.eclipse.xsd.XSDDerivationMethod;
import org.eclipse.xsd.XSDNamedComponent;
-import org.eclipse.xsd.XSDSchema;
import org.eclipse.xsd.XSDTypeDefinition;
import org.eclipse.xsd.util.XSDConstants;
-import org.w3c.dom.Element;
public class XSDComplexTypeSection extends AbstractSection implements SelectionListener
{
@@ -217,16 +212,16 @@
*/
public void widgetSelected(SelectionEvent e)
{
- XSDComplexTypeDefinition xsdComplexType = (XSDComplexTypeDefinition) input;
- Element ctElement = xsdComplexType.getElement();
+// XSDComplexTypeDefinition xsdComplexType = (XSDComplexTypeDefinition) input;
+// Element ctElement = xsdComplexType.getElement();
if (e.widget == button)
{
- Shell shell = Display.getCurrent().getActiveShell();
- Element element = null;
- if (xsdComplexType.getContent() != null)
- {
- element = xsdComplexType.getContent().getElement();
- }
+// Shell shell = Display.getCurrent().getActiveShell();
+// Element element = null;
+// if (xsdComplexType.getContent() != null)
+// {
+// element = xsdComplexType.getContent().getElement();
+// }
// SimpleContentBaseTypeOptionsDialog dialog = new
// SimpleContentBaseTypeOptionsDialog(shell, element, BASE_TYPE_ID,
@@ -235,9 +230,9 @@
// dialog.create();
// int result = dialog.open();
- IFile currentIFile = ((IFileEditorInput) getActiveEditor().getEditorInput()).getFile();
+// IFile currentIFile = ((IFileEditorInput) getActiveEditor().getEditorInput()).getFile();
- XSDSchema schema = xsdComplexType.getSchema();
+// XSDSchema schema = xsdComplexType.getSchema();
// issuec (cs) need to move the common.ui's selection dialog
/*
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/properties/sections/XSDElementDeclarationSection.java b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/properties/sections/XSDElementDeclarationSection.java
index 17bc839..e92363c 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/properties/sections/XSDElementDeclarationSection.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/properties/sections/XSDElementDeclarationSection.java
@@ -283,21 +283,15 @@
XSDElementDeclaration xsdElementDeclaration = ((XSDElementDeclaration) input).getResolvedElementDeclaration();
- // refresh name
- nameText.setText("");
- typeCombo.setText(""); //$NON-NLS-1$
- typesBrowseButton.setEnabled(true);
-//
-// if (input instanceof XSDNamedComponent)
-// {
-// XSDNamedComponent namedComponent = (XSDNamedComponent) input;
-//
- String name = xsdElementDeclaration.getName();
- if (name != null)
- {
- nameText.setText(name);
- }
-// }
+ // refresh name
+ nameText.setText("");
+ typeCombo.setText(""); //$NON-NLS-1$
+ typesBrowseButton.setEnabled(true);
+ String name = xsdElementDeclaration.getName();
+ if (name != null)
+ {
+ nameText.setText(name);
+ }
if (isElementReference)
{
@@ -307,22 +301,11 @@
// refresh type
if (input != null)
{
- Element element = null;
if (input instanceof XSDElementDeclaration)
{
- element = xsdElementDeclaration.getElement();
boolean isAnonymous = xsdElementDeclaration.getAnonymousTypeDefinition() != null;
//XSDTypeDefinition typeDef = XSDUtils.getResolvedType(xsdElementDeclaration);
XSDTypeDefinition typeDef = xsdElementDeclaration.getResolvedElementDeclaration().getTypeDefinition();
- XSDTypeDefinition typeValue = xsdElementDeclaration.getType();
- boolean isPrimitive = false;
- if (typeValue != null)
- {
- if (typeValue.getTargetNamespace() != null)
- {
- isPrimitive = typeValue.getTargetNamespace().equals(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001);
- }
- }
String typeName = ""; //$NON-NLS-1$
if (typeDef != null)
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/properties/sections/XSDSimpleTypeSection.java b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/properties/sections/XSDSimpleTypeSection.java
index 2f95ce6..7660d5a 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/properties/sections/XSDSimpleTypeSection.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/properties/sections/XSDSimpleTypeSection.java
@@ -14,11 +14,10 @@
import java.util.Iterator;
import java.util.List;
import java.util.StringTokenizer;
+
import org.apache.xerces.util.XMLChar;
-import org.eclipse.core.resources.IFile;
import org.eclipse.gef.commands.Command;
import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
@@ -29,11 +28,8 @@
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
import org.eclipse.wst.xsd.editor.XSDEditorPlugin;
@@ -41,7 +37,6 @@
import org.eclipse.wst.xsd.ui.internal.actions.CreateElementAction;
import org.eclipse.wst.xsd.ui.internal.actions.DOMAttribute;
import org.eclipse.wst.xsd.ui.internal.util.XSDDOMHelper;
-import org.eclipse.xsd.XSDConcreteComponent;
import org.eclipse.xsd.XSDNamedComponent;
import org.eclipse.xsd.XSDSimpleTypeDefinition;
import org.eclipse.xsd.XSDVariety;
@@ -210,8 +205,6 @@
nameText.setText("**anonymous**");
}
- Element simpleTypeElement = st.getElement();
- Element element = null;
String variety = st.getVariety().getName();
int intVariety = st.getVariety().getValue();
@@ -302,13 +295,13 @@
}
else if (e.widget == button)
{
- Shell shell = Display.getCurrent().getActiveShell();
- Element element = ((XSDConcreteComponent) input).getElement();
- Dialog dialog = null;
- String property = "";
- Element secondaryElement = null;
+// Shell shell = Display.getCurrent().getActiveShell();
+// Element element = ((XSDConcreteComponent) input).getElement();
+// Dialog dialog = null;
+// String property = "";
+// Element secondaryElement = null;
- IFile currentIFile = ((IFileEditorInput) getActiveEditor().getEditorInput()).getFile();
+// IFile currentIFile = ((IFileEditorInput) getActiveEditor().getEditorInput()).getFile();
// issue (cs) need to move to common.ui's selection dialog
/*
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/properties/sections/appinfo/AddApplicationInfoDialog.java b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/properties/sections/appinfo/AddApplicationInfoDialog.java
index 1596ee7..e28b582 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/properties/sections/appinfo/AddApplicationInfoDialog.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/properties/sections/appinfo/AddApplicationInfoDialog.java
@@ -76,8 +76,6 @@
this.registry = registry;
}
- private IStructuredContentProvider categoryContentProvider, elementContentProvider;
- private ILabelProvider categoryLabelProvider, elementLabelProvider;
private List fInput;
private TableViewer categoryTableViewer, elementTableViewer;
@@ -358,7 +356,7 @@
return xsdSchema;
}
- static class CategoryContentProvider implements IStructuredContentProvider
+ class CategoryContentProvider implements IStructuredContentProvider
{
/*
* (non-Javadoc)
@@ -404,7 +402,7 @@
}
}
- static class CategoryLabelProvider extends LabelProvider
+ class CategoryLabelProvider extends LabelProvider
{
/*
* (non-Javadoc)
@@ -430,7 +428,7 @@
}
}
- static class ElementContentProvider implements IStructuredContentProvider
+ class ElementContentProvider implements IStructuredContentProvider
{
/*
* (non-Javadoc)
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/util/XSDCommonUIUtils.java b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/util/XSDCommonUIUtils.java
index 088923d..0d7d869 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/util/XSDCommonUIUtils.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/common/util/XSDCommonUIUtils.java
@@ -461,7 +461,7 @@
}
else if (next instanceof XSDAttributeGroupDefinition)
{
- XSDAttributeGroupDefinition attrGroup = (XSDAttributeGroupDefinition) next;
+ //XSDAttributeGroupDefinition attrGroup = (XSDAttributeGroupDefinition) next;
}
}
return attrs;