Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 125745
Collapse All | Expand All

(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/PartSection.java (-24 / +26 lines)
Lines 24-31 Link Here
24
import org.eclipse.swt.widgets.Composite;
24
import org.eclipse.swt.widgets.Composite;
25
import org.eclipse.swt.widgets.Event;
25
import org.eclipse.swt.widgets.Event;
26
import org.eclipse.ui.IEditorPart;
26
import org.eclipse.ui.IEditorPart;
27
import org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertyConstants;
27
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
28
import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory;
28
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
29
import org.eclipse.wst.wsdl.Part;
29
import org.eclipse.wst.wsdl.Part;
30
import org.eclipse.wst.wsdl.ui.internal.WSDLEditor;
30
import org.eclipse.wst.wsdl.ui.internal.WSDLEditor;
31
import org.eclipse.wst.wsdl.ui.internal.WSDLEditorPlugin;
31
import org.eclipse.wst.wsdl.ui.internal.WSDLEditorPlugin;
Lines 77-117 Link Here
77
		data.top = new FormAttachment(referenceKindCombo, 0, SWT.CENTER);
77
		data.top = new FormAttachment(referenceKindCombo, 0, SWT.CENTER);
78
		valueLabel.setLayoutData(data);
78
		valueLabel.setLayoutData(data);
79
79
80
    componentNameCombo = getWidgetFactory().createCCombo(composite);
80
		componentNameCombo = getWidgetFactory().createCCombo(composite);
81
    componentNameCombo.setBackground(composite.getBackground());
81
		componentNameCombo.setBackground(composite.getBackground());
82
    componentNameCombo.addListener(SWT.Modify, this);
82
		componentNameCombo.addListener(SWT.Modify, this);
83
    componentNameCombo.addSelectionListener(this);
83
		componentNameCombo.addSelectionListener(this);
84
84
85
    componentNameLabel = getWidgetFactory().createCLabel(composite, WSDLEditorPlugin.getWSDLString("_UI_LABEL_ELEMENT") + ":"); //$NON-NLS-1$
85
		componentNameLabel = getWidgetFactory().createCLabel(composite, WSDLEditorPlugin.getWSDLString("_UI_LABEL_ELEMENT") + ":"); //$NON-NLS-1$
86
		data = new FormData();
86
		data = new FormData();
87
		data.left = new FormAttachment(0, 0);
87
		data.left = new FormAttachment(0, 0);
88
		data.right = new FormAttachment(componentNameCombo, -ITabbedPropertyConstants.HSPACE);
88
		data.right = new FormAttachment(componentNameCombo, -ITabbedPropertyConstants.HSPACE);
89
		data.top = new FormAttachment(componentNameCombo, 0, SWT.CENTER);
89
		data.top = new FormAttachment(componentNameCombo, 0, SWT.CENTER);
90
		componentNameLabel.setLayoutData(data);
90
		componentNameLabel.setLayoutData(data);
91
		
92
    button = getWidgetFactory().createButton(composite, "", SWT.PUSH); //$NON-NLS-1$
93
    button.setImage(WSDLEditorPlugin.getInstance().getImage("icons/browsebutton.gif")); //$NON-NLS-1$
94
91
95
    button.addSelectionListener(this);
92
		button = getWidgetFactory().createButton(composite, "", SWT.PUSH); //$NON-NLS-1$
93
		button.setImage(WSDLEditorPlugin.getInstance().getImage("icons/browsebutton.gif")); //$NON-NLS-1$
94
95
		button.addSelectionListener(this);
96
		data = new FormData();
96
		data = new FormData();
97
		data.left = new FormAttachment(100, -rightMarginSpace + 2);
97
		data.left = new FormAttachment(100, -rightMarginSpace + 2);
98
		data.right = new FormAttachment(100, 0);
98
		data.right = new FormAttachment(100, 0);
99
		data.top = new FormAttachment(componentNameCombo, 0, SWT.CENTER);
99
		data.top = new FormAttachment(componentNameCombo, 0, SWT.CENTER);
100
		button.setLayoutData(data);
100
		button.setLayoutData(data);
101
		
102
    data = new FormData();
103
    data.left = new FormAttachment(0, 100);
104
    data.right = new FormAttachment(100, -rightMarginSpace - ITabbedPropertyConstants.HSPACE);
105
    data.top = new FormAttachment(0, 0);
106
    referenceKindCombo.setLayoutData(data);
107
    
108
    data = new FormData();
109
    data.left = new FormAttachment(0, 100);
110
    data.right = new FormAttachment(button, 0);
111
    data.top = new FormAttachment(referenceKindCombo, +ITabbedPropertyConstants.VSPACE);
112
    componentNameCombo.setLayoutData(data);
113
101
114
    referenceKindCombo.addListener(SWT.Modify, this);
102
		data = new FormData();
103
		data.left = new FormAttachment(0, 100);
104
		data.right = new FormAttachment(100, -rightMarginSpace - ITabbedPropertyConstants.HSPACE);
105
		data.top = new FormAttachment(0, 0);
106
		referenceKindCombo.setLayoutData(data);
107
108
		data = new FormData();
109
		data.left = new FormAttachment(0, 100);
110
		data.right = new FormAttachment(button, 0);
111
		data.top = new FormAttachment(referenceKindCombo, +ITabbedPropertyConstants.VSPACE);
112
		componentNameCombo.setLayoutData(data);
113
114
		referenceKindCombo.addListener(SWT.Modify, this);
115
116
		this.editorPart = getActiveEditor();
115
	}
117
	}
116
118
117
	/*
119
	/*
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/WSDLTypeMapper.java (-3 / +3 lines)
Lines 10-16 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.wst.wsdl.ui.internal.properties.section;
11
package org.eclipse.wst.wsdl.ui.internal.properties.section;
12
12
13
import org.eclipse.wst.common.ui.properties.internal.provisional.ITypeMapper;
13
import org.eclipse.ui.views.properties.tabbed.ITypeMapper;
14
import org.eclipse.wst.wsdl.ui.internal.model.WSDLGroupObject;
14
import org.eclipse.wst.wsdl.ui.internal.model.WSDLGroupObject;
15
15
16
public class WSDLTypeMapper implements ITypeMapper
16
public class WSDLTypeMapper implements ITypeMapper
Lines 18-26 Link Here
18
  /* (non-Javadoc)
18
  /* (non-Javadoc)
19
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ITypeMapper#remapType(java.lang.Object, java.lang.Class)
19
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ITypeMapper#remapType(java.lang.Object, java.lang.Class)
20
   */
20
   */
21
  public Class remapType(Object object, Class effectiveType)
21
  public Class mapType(Object object)
22
  {
22
  {
23
		Class type = effectiveType;
23
		Class type = object.getClass();
24
		
24
		
25
		if (object instanceof WSDLGroupObject) {
25
		if (object instanceof WSDLGroupObject) {
26
			type = ((WSDLGroupObject) object).getDefinition().getClass();
26
			type = ((WSDLGroupObject) object).getDefinition().getClass();
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/AbstractSectionDescriptor.java (-108 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2004 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.wst.wsdl.ui.internal.properties.section;
12
13
import java.util.ArrayList;
14
import java.util.List;
15
16
import org.eclipse.jface.viewers.ISelection;
17
import org.eclipse.jface.viewers.StructuredSelection;
18
import org.eclipse.ui.IWorkbenchPart;
19
import org.eclipse.wst.common.ui.properties.internal.provisional.ISection;
20
import org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor;
21
import org.eclipse.wst.common.ui.properties.internal.provisional.ITypeMapper;
22
import org.eclipse.wst.wsdl.WSDLElement;
23
import org.eclipse.wst.wsdl.ui.internal.model.WSDLGroupObject;
24
25
public class AbstractSectionDescriptor implements ISectionDescriptor
26
{
27
  /**
28
   * 
29
   */
30
  public AbstractSectionDescriptor()
31
  {
32
    super();
33
  }
34
35
  /* (non-Javadoc)
36
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getId()
37
   */
38
  public String getId()
39
  {
40
    return "";
41
  }
42
43
  /* (non-Javadoc)
44
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getFilter()
45
   */
46
  public ITypeMapper getFilter()
47
  {
48
    return null;
49
  }
50
51
  /* (non-Javadoc)
52
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getInputTypes()
53
   */
54
  public List getInputTypes()
55
  {
56
    List list = new ArrayList();
57
    list.add(WSDLElement.class);
58
    return list;
59
 }
60
61
  /* (non-Javadoc)
62
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getSectionClass()
63
   */
64
  public ISection getSectionClass()
65
  {
66
    return null;
67
  }
68
69
  /* (non-Javadoc)
70
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getTargetTab()
71
   */
72
  public String getTargetTab()
73
  {
74
    // TODO Auto-generated method stub
75
    return null;
76
  }
77
78
  /* (non-Javadoc)
79
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#appliesTo(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
80
   */
81
  public boolean appliesTo(IWorkbenchPart part, ISelection selection)
82
  {
83
    Object object = null;
84
    if (selection instanceof StructuredSelection)
85
    {
86
      StructuredSelection structuredSelection = (StructuredSelection)selection;
87
      object = structuredSelection.getFirstElement();
88
      if (object instanceof WSDLElement || object instanceof WSDLGroupObject)
89
      {
90
        return true;
91
      }
92
    }
93
    return false;
94
  }
95
96
  /* (non-Javadoc)
97
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getAfterSection()
98
   */
99
  public String getAfterSection()
100
  {
101
    return "";
102
  }
103
  
104
  public int getEnablesFor()
105
  {
106
	return ENABLES_FOR_ANY;
107
  }
108
}
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/WSDLTabbedPropertySheetPage.java (-2 / +2 lines)
Lines 17-24 Link Here
17
import org.eclipse.jface.viewers.StructuredSelection;
17
import org.eclipse.jface.viewers.StructuredSelection;
18
import org.eclipse.swt.widgets.Composite;
18
import org.eclipse.swt.widgets.Composite;
19
import org.eclipse.ui.IWorkbenchPart;
19
import org.eclipse.ui.IWorkbenchPart;
20
import org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertySheetPageContributor;
20
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
21
import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetPage;
21
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
22
import org.eclipse.wst.sse.ui.internal.view.events.INodeSelectionListener;
22
import org.eclipse.wst.sse.ui.internal.view.events.INodeSelectionListener;
23
import org.eclipse.wst.sse.ui.internal.view.events.NodeSelectionChangedEvent;
23
import org.eclipse.wst.sse.ui.internal.view.events.NodeSelectionChangedEvent;
24
import org.eclipse.wst.wsdl.XSDSchemaExtensibilityElement;
24
import org.eclipse.wst.wsdl.XSDSchemaExtensibilityElement;
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/ReferenceSection.java (-2 / +4 lines)
Lines 23-30 Link Here
23
import org.eclipse.swt.widgets.Composite;
23
import org.eclipse.swt.widgets.Composite;
24
import org.eclipse.swt.widgets.Event;
24
import org.eclipse.swt.widgets.Event;
25
import org.eclipse.ui.IEditorPart;
25
import org.eclipse.ui.IEditorPart;
26
import org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertyConstants;
26
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
27
import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory;
27
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
28
import org.eclipse.wst.wsdl.Binding;
28
import org.eclipse.wst.wsdl.Binding;
29
import org.eclipse.wst.wsdl.MessageReference;
29
import org.eclipse.wst.wsdl.MessageReference;
30
import org.eclipse.wst.wsdl.Port;
30
import org.eclipse.wst.wsdl.Port;
Lines 77-82 Link Here
77
    componentNameCombo.setLayoutData(data);
77
    componentNameCombo.setLayoutData(data);
78
    
78
    
79
    componentNameCombo.addListener(SWT.Modify, this);
79
    componentNameCombo.addListener(SWT.Modify, this);
80
    
81
    this.editorPart = getActiveEditor();
80
	}
82
	}
81
83
82
	/*
84
	/*
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/AbstractSection.java (-3 / +3 lines)
Lines 30-38 Link Here
30
import org.eclipse.ui.IWorkbenchPart;
30
import org.eclipse.ui.IWorkbenchPart;
31
import org.eclipse.ui.IWorkbenchWindow;
31
import org.eclipse.ui.IWorkbenchWindow;
32
import org.eclipse.ui.part.EditorActionBarContributor;
32
import org.eclipse.ui.part.EditorActionBarContributor;
33
import org.eclipse.wst.common.ui.properties.internal.provisional.ISection;
33
import org.eclipse.ui.views.properties.tabbed.ISection;
34
import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetPage;
34
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
35
import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory;
35
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
36
import org.eclipse.wst.wsdl.WSDLElement;
36
import org.eclipse.wst.wsdl.WSDLElement;
37
import org.eclipse.wst.wsdl.ui.internal.WSDLEditorPlugin;
37
import org.eclipse.wst.wsdl.ui.internal.WSDLEditorPlugin;
38
import org.eclipse.wst.wsdl.ui.internal.graph.model.WSDLGraphModelAdapterFactory;
38
import org.eclipse.wst.wsdl.ui.internal.graph.model.WSDLGraphModelAdapterFactory;
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/ReferenceSectionDescriptor.java (-104 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2004 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.wst.wsdl.ui.internal.properties.section;
12
13
import java.util.ArrayList;
14
import java.util.List;
15
16
import org.eclipse.jface.viewers.ISelection;
17
import org.eclipse.jface.viewers.StructuredSelection;
18
import org.eclipse.ui.IWorkbenchPart;
19
import org.eclipse.wst.common.ui.properties.internal.provisional.ISection;
20
import org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor;
21
import org.eclipse.wst.wsdl.Binding;
22
import org.eclipse.wst.wsdl.MessageReference;
23
import org.eclipse.wst.wsdl.Port;
24
25
26
public class ReferenceSectionDescriptor extends AbstractSectionDescriptor implements ISectionDescriptor
27
{
28
  ReferenceSection referenceSection;
29
  
30
  /**
31
   * 
32
   */
33
  public ReferenceSectionDescriptor()
34
  {
35
    super();
36
    this.referenceSection = new ReferenceSection(); 
37
  }
38
39
40
  /**
41
   * 
42
   */
43
44
  /* (non-Javadoc)
45
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getId()
46
   */
47
  public String getId()
48
  {
49
    return "org.eclipse.wst.wsdl.ui.internal.section.reference";
50
  }
51
52
  /* (non-Javadoc)
53
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getInputTypes()
54
   */
55
  public List getInputTypes()
56
  {
57
    List list = new ArrayList();
58
    list.add(MessageReference.class);
59
    list.add(Binding.class);
60
    list.add(Port.class);
61
    return list;
62
  }
63
64
  /* (non-Javadoc)
65
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getSectionClass()
66
   */
67
  public ISection getSectionClass()
68
  {
69
    return referenceSection;
70
  }
71
72
  /* (non-Javadoc)
73
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getTargetTab()
74
   */
75
  public String getTargetTab()
76
  {
77
    return "org.eclipse.wst.xmlwebservices.general";
78
  }
79
80
  /* (non-Javadoc)
81
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#appliesTo(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
82
   */
83
  public boolean appliesTo(IWorkbenchPart part, ISelection selection)
84
  {
85
    referenceSection.setEditorPart(part.getSite().getWorkbenchWindow().getActivePage().getActiveEditor());
86
    Object object = null;
87
    if (selection instanceof StructuredSelection)
88
    {
89
      StructuredSelection structuredSelection = (StructuredSelection)selection;
90
      object = structuredSelection.getFirstElement();
91
      if (object instanceof MessageReference || object instanceof Binding || object instanceof Port)
92
      {
93
        return true;
94
      }
95
    }
96
    return false;
97
  }
98
99
  public String getAfterSection()
100
  {
101
    return "org.eclipse.wst.wsdl.ui.internal.section.name";
102
  }
103
104
}
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/PartSectionDescriptor.java (-94 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2004 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.wst.wsdl.ui.internal.properties.section;
12
13
import java.util.ArrayList;
14
import java.util.List;
15
16
import org.eclipse.jface.viewers.ISelection;
17
import org.eclipse.jface.viewers.StructuredSelection;
18
import org.eclipse.ui.IWorkbenchPart;
19
import org.eclipse.wst.common.ui.properties.internal.provisional.ISection;
20
import org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor;
21
import org.eclipse.wst.wsdl.Part;
22
23
24
public class PartSectionDescriptor extends AbstractSectionDescriptor implements ISectionDescriptor
25
{
26
  PartSection partSection;
27
  /**
28
   * 
29
   */
30
  public PartSectionDescriptor()
31
  {
32
    super();
33
    partSection = new PartSection();
34
  }
35
36
  /* (non-Javadoc)
37
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getId()
38
   */
39
  public String getId()
40
  {
41
    return "org.eclipse.wst.wsdl.ui.internal.section.part";
42
  }
43
44
  /* (non-Javadoc)
45
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getInputTypes()
46
   */
47
  public List getInputTypes()
48
  {
49
    List list = new ArrayList();
50
    list.add(Part.class);
51
    return list;
52
  }
53
54
  /* (non-Javadoc)
55
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getSectionClass()
56
   */
57
  public ISection getSectionClass()
58
  {
59
    return partSection;
60
  }
61
62
  /* (non-Javadoc)
63
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getTargetTab()
64
   */
65
  public String getTargetTab()
66
  {
67
    return "org.eclipse.wst.xmlwebservices.general";
68
  }
69
70
  /* (non-Javadoc)
71
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#appliesTo(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
72
   */
73
  public boolean appliesTo(IWorkbenchPart part, ISelection selection)
74
  {
75
    partSection.setEditorPart(part.getSite().getWorkbenchWindow().getActivePage().getActiveEditor());
76
    Object object = null;
77
    if (selection instanceof StructuredSelection)
78
    {
79
      StructuredSelection structuredSelection = (StructuredSelection)selection;
80
      object = structuredSelection.getFirstElement();
81
      if (object instanceof Part)
82
      {
83
        return true;
84
      }
85
    }
86
    return false;
87
  }
88
  
89
  public String getAfterSection()
90
  {
91
    return "org.eclipse.wst.wsdl.ui.internal.section.name";
92
  }
93
94
}
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/NamespaceSection.java (-2 / +2 lines)
Lines 24-31 Link Here
24
import org.eclipse.swt.widgets.Composite;
24
import org.eclipse.swt.widgets.Composite;
25
import org.eclipse.swt.widgets.Event;
25
import org.eclipse.swt.widgets.Event;
26
import org.eclipse.swt.widgets.Text;
26
import org.eclipse.swt.widgets.Text;
27
import org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertyConstants;
27
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
28
import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory;
28
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
29
import org.eclipse.wst.wsdl.Definition;
29
import org.eclipse.wst.wsdl.Definition;
30
import org.eclipse.wst.wsdl.ui.internal.WSDLEditorPlugin;
30
import org.eclipse.wst.wsdl.ui.internal.WSDLEditorPlugin;
31
import org.eclipse.wst.wsdl.ui.internal.actions.EditNamespacesAction;
31
import org.eclipse.wst.wsdl.ui.internal.actions.EditNamespacesAction;
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/NameSectionDescriptor.java (-108 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2004 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.wst.wsdl.ui.internal.properties.section;
12
13
import java.util.ArrayList;
14
import java.util.List;
15
16
import org.eclipse.jface.viewers.ISelection;
17
import org.eclipse.jface.viewers.StructuredSelection;
18
import org.eclipse.ui.IWorkbenchPart;
19
import org.eclipse.wst.common.ui.properties.internal.provisional.ISection;
20
import org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor;
21
import org.eclipse.wst.wsdl.Definition;
22
import org.eclipse.wst.wsdl.ExtensibilityElement;
23
import org.eclipse.wst.wsdl.Import;
24
import org.eclipse.wst.wsdl.WSDLElement;
25
26
27
public class NameSectionDescriptor extends AbstractSectionDescriptor implements ISectionDescriptor
28
{
29
  /**
30
   * 
31
   */
32
  public NameSectionDescriptor()
33
  {
34
    super();
35
  }
36
37
  /* (non-Javadoc)
38
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getId()
39
   */
40
  public String getId()
41
  {
42
    return "org.eclipse.wst.wsdl.ui.internal.section.name";
43
  }
44
45
  /* (non-Javadoc)
46
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getInputTypes()
47
   */
48
  public List getInputTypes()
49
  {
50
    List list = new ArrayList();
51
    list.add(WSDLElement.class);
52
    return list;
53
  }
54
55
  /* (non-Javadoc)
56
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getSectionClass()
57
   */
58
  public ISection getSectionClass()
59
  {
60
    return new NameSection();
61
  }
62
63
  /* (non-Javadoc)
64
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getTargetTab()
65
   */
66
  public String getTargetTab()
67
  {
68
    return "org.eclipse.wst.xmlwebservices.general";
69
  }
70
71
  /* (non-Javadoc)
72
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#appliesTo(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
73
   */
74
  public boolean appliesTo(IWorkbenchPart part, ISelection selection)
75
  {
76
    Object object = null;
77
    if (selection instanceof StructuredSelection)
78
    {
79
      StructuredSelection structuredSelection = (StructuredSelection)selection;
80
      object = structuredSelection.getFirstElement();
81
      if (object instanceof WSDLElement && 
82
          !(object instanceof ExtensibilityElement) &&
83
          !(object instanceof Import))
84
      {
85
      	if (object instanceof WSDLElement) {
86
      		Definition definition = ((WSDLElement) object).getEnclosingDefinition();
87
      		if (definition.getElement() != null && !(object instanceof Definition)) {
88
      			return true;
89
      		}
90
      		
91
      		return false;
92
      	}
93
      	/*
94
      	else if (object instanceof WSDLGroupObject) {
95
      		Definition definition = ((WSDLGroupObject) object).getDefinition();
96
      		if (definition.getElement() != null) {
97
      			return true;
98
      		}
99
      		
100
      		return false;
101
      	}
102
      	*/
103
      }
104
    }
105
    return false;
106
  }
107
108
}
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/ExtensibilityElementSectionDescriptor.java (-82 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2004 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.wst.wsdl.ui.internal.properties.section;
12
13
import org.eclipse.jface.viewers.ISelection;
14
import org.eclipse.jface.viewers.StructuredSelection;
15
import org.eclipse.ui.IWorkbenchPart;
16
import org.eclipse.wst.common.ui.properties.internal.provisional.ISection;
17
import org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor;
18
import org.eclipse.wst.wsdl.ExtensibilityElement;
19
20
public class ExtensibilityElementSectionDescriptor extends AbstractSectionDescriptor implements ISectionDescriptor
21
{
22
  /**
23
   * 
24
   */
25
  public ExtensibilityElementSectionDescriptor()
26
  {
27
    super();
28
  }
29
  
30
  /* (non-Javadoc)
31
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getId()
32
   */
33
  public String getId()
34
  {
35
    return "org.eclipse.wst.wsdl.ui.internal.section.extensibilityelement";
36
  }
37
38
  /* (non-Javadoc)
39
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getSectionClass()
40
   */
41
  public ISection getSectionClass()
42
  {
43
    // TODO Auto-generated method stub
44
    return new ExtensiblityElementSection();
45
  }
46
47
  /* (non-Javadoc)
48
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getTargetTab()
49
   */
50
  public String getTargetTab()
51
  {
52
    // TODO Auto-generated method stub
53
    return "org.eclipse.wst.xmlwebservices.general";
54
  }
55
56
  /* (non-Javadoc)
57
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#appliesTo(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
58
   */
59
  public boolean appliesTo(IWorkbenchPart part, ISelection selection)
60
  {
61
    Object object = null;
62
    if (selection instanceof StructuredSelection)
63
    {
64
      StructuredSelection structuredSelection = (StructuredSelection)selection;
65
      object = structuredSelection.getFirstElement();
66
      if (object instanceof ExtensibilityElement)
67
      {
68
        return true;
69
      }
70
    }
71
    return false;
72
  }
73
74
  /* (non-Javadoc)
75
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getAfterSection()
76
   */
77
  public String getAfterSection()
78
  {
79
    return "";
80
  }
81
82
}
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/NameSection.java (-2 / +2 lines)
Lines 19-26 Link Here
19
import org.eclipse.swt.widgets.Composite;
19
import org.eclipse.swt.widgets.Composite;
20
import org.eclipse.swt.widgets.Event;
20
import org.eclipse.swt.widgets.Event;
21
import org.eclipse.swt.widgets.Text;
21
import org.eclipse.swt.widgets.Text;
22
import org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertyConstants;
22
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
23
import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory;
23
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
24
import org.eclipse.wst.wsdl.Binding;
24
import org.eclipse.wst.wsdl.Binding;
25
import org.eclipse.wst.wsdl.BindingFault;
25
import org.eclipse.wst.wsdl.BindingFault;
26
import org.eclipse.wst.wsdl.BindingInput;
26
import org.eclipse.wst.wsdl.BindingInput;
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/WSDLSectionDescriptorProvider.java (-82 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2004 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.wst.wsdl.ui.internal.properties.section;
12
13
import java.util.ArrayList;
14
import java.util.List;
15
16
import org.eclipse.ui.IEditorPart;
17
import org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor;
18
import org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptorProvider;
19
import org.eclipse.wst.wsdl.ui.internal.WSDLEditor;
20
import org.eclipse.wst.wsdl.ui.internal.WSDLEditorPlugin;
21
import org.eclipse.wst.wsdl.ui.internal.extension.WSDLEditorExtension;
22
import org.eclipse.wst.wsdl.ui.internal.extension.WSDLEditorExtensionRegistry;
23
24
public class WSDLSectionDescriptorProvider implements ISectionDescriptorProvider
25
{
26
  protected WSDLEditorExtension[] propertySectionDescriptorProviderExtensions;
27
  protected ISectionDescriptorProvider[] propertySectionDescriptorProviders;
28
29
  protected WSDLEditorExtension[] labelProviderExtensions;
30
31
  protected final static Object[] EMPTY_ARRAY = {};
32
  
33
  IEditorPart editorPart;
34
35
  /**
36
   * 
37
   */
38
  public WSDLSectionDescriptorProvider()
39
  {
40
    super();
41
    // TODO Check this
42
    this.editorPart = WSDLEditorPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
43
  }
44
45
  /* (non-Javadoc)
46
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptorProvider#getSectionDescriptors()
47
   */
48
  public ISectionDescriptor[] getSectionDescriptors()
49
  {
50
    List list = new ArrayList();
51
    
52
    
53
    WSDLEditorExtensionRegistry registry = WSDLEditorPlugin.getInstance().getWSDLEditorExtensionRegistry(); 
54
55
    propertySectionDescriptorProviderExtensions = registry.getRegisteredExtensions(WSDLEditorExtension.PROPERTY_SECTION_DESCRIPTOR_PROVIDER); 
56
    propertySectionDescriptorProviders = new ISectionDescriptorProvider[propertySectionDescriptorProviderExtensions.length]; 
57
    for (int i = 0; i < propertySectionDescriptorProviderExtensions.length; i++)
58
    {
59
      propertySectionDescriptorProviders[i] = (ISectionDescriptorProvider)propertySectionDescriptorProviderExtensions[i].createExtensionObject(WSDLEditorExtension.PROPERTY_SECTION_DESCRIPTOR_PROVIDER, (WSDLEditor)editorPart);
60
      
61
      ISectionDescriptor [] extensionSectionDescriptors = propertySectionDescriptorProviders[i].getSectionDescriptors();
62
      for (int j = 0; j < extensionSectionDescriptors.length; j++)
63
      {
64
        list.add(extensionSectionDescriptors[j]);
65
      }
66
    }
67
68
    
69
    list.add(new NameSectionDescriptor());
70
    list.add(new PartSectionDescriptor());
71
    list.add(new DocumentationSectionDescriptor());
72
    list.add(new ReferenceSectionDescriptor());
73
    list.add(new NamespaceSectionDescriptor());
74
    list.add(new ExtensibilityElementSectionDescriptor());
75
    list.add(new ImportSectionDescriptor());
76
    
77
		ISectionDescriptor[] descriptors = new ISectionDescriptor[list.size()];
78
	  list.toArray(descriptors);
79
80
    return descriptors;
81
  }
82
}
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/DocumentationSection.java (-1 / +1 lines)
Lines 16-22 Link Here
16
import org.eclipse.swt.widgets.Composite;
16
import org.eclipse.swt.widgets.Composite;
17
import org.eclipse.swt.widgets.Event;
17
import org.eclipse.swt.widgets.Event;
18
import org.eclipse.swt.widgets.Text;
18
import org.eclipse.swt.widgets.Text;
19
import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory;
19
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
20
import org.eclipse.wst.wsdl.ui.internal.actions.AddElementAction;
20
import org.eclipse.wst.wsdl.ui.internal.actions.AddElementAction;
21
import org.w3c.dom.Document;
21
import org.w3c.dom.Document;
22
import org.w3c.dom.Element;
22
import org.w3c.dom.Element;
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/NamespaceSectionDescriptor.java (-106 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2004 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.wst.wsdl.ui.internal.properties.section;
12
13
import java.util.ArrayList;
14
import java.util.List;
15
16
import org.eclipse.jface.viewers.ISelection;
17
import org.eclipse.jface.viewers.StructuredSelection;
18
import org.eclipse.ui.IWorkbenchPart;
19
import org.eclipse.wst.common.ui.properties.internal.provisional.ISection;
20
import org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor;
21
import org.eclipse.wst.wsdl.Definition;
22
import org.eclipse.wst.wsdl.ui.internal.model.WSDLGroupObject;
23
24
public class NamespaceSectionDescriptor extends AbstractSectionDescriptor implements ISectionDescriptor
25
{
26
  /**
27
   * 
28
   */
29
  public NamespaceSectionDescriptor()
30
  {
31
    super();
32
  }
33
34
  /* (non-Javadoc)
35
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getId()
36
   */
37
  public String getId()
38
  {
39
    return "org.eclipse.wst.wsdl.ui.internal.section.namespace";
40
  }
41
42
  /* (non-Javadoc)
43
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getInputTypes()
44
   */
45
  public List getInputTypes()
46
  {
47
    List list = new ArrayList();
48
    list.add(WSDLGroupObject.class);
49
    return list;
50
  }
51
52
  /* (non-Javadoc)
53
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getSectionClass()
54
   */
55
  public ISection getSectionClass()
56
  {
57
    return new NamespaceSection();
58
  }
59
60
  /* (non-Javadoc)
61
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getTargetTab()
62
   */
63
  public String getTargetTab()
64
  {
65
    return "org.eclipse.wst.xmlwebservices.general";
66
  }
67
68
  /* (non-Javadoc)
69
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#appliesTo(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
70
   */
71
  public boolean appliesTo(IWorkbenchPart part, ISelection selection)
72
  {
73
    Object object = null;
74
    if (selection instanceof StructuredSelection)
75
    {
76
      StructuredSelection structuredSelection = (StructuredSelection)selection;
77
      object = structuredSelection.getFirstElement();
78
      if (object instanceof WSDLGroupObject)
79
      {
80
      	Definition definition = ((WSDLGroupObject) object).getDefinition();
81
      	if (definition.getElement() != null) {
82
      		return true;
83
      	}
84
      	
85
      	return false;
86
      }
87
      else if (object instanceof org.eclipse.wst.wsdl.Definition) {
88
      	Definition definition = (Definition) object;
89
      	if (definition.getElement() != null) {
90
      		return true;
91
      	}
92
      	
93
      	return false;
94
      }
95
    }
96
    return false;
97
  }
98
99
  /* (non-Javadoc)
100
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getAfterSection()
101
   */
102
  public String getAfterSection()
103
  {
104
    return "";
105
  }
106
}
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/ImportSection.java (-10 / +12 lines)
Lines 26-34 Link Here
26
import org.eclipse.swt.widgets.Text;
26
import org.eclipse.swt.widgets.Text;
27
import org.eclipse.ui.IEditorPart;
27
import org.eclipse.ui.IEditorPart;
28
import org.eclipse.ui.IFileEditorInput;
28
import org.eclipse.ui.IFileEditorInput;
29
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
30
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
29
import org.eclipse.wst.common.ui.internal.dialogs.SelectSingleFileDialog;
31
import org.eclipse.wst.common.ui.internal.dialogs.SelectSingleFileDialog;
30
import org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertyConstants;
31
import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory;
32
import org.eclipse.wst.wsdl.Definition;
32
import org.eclipse.wst.wsdl.Definition;
33
import org.eclipse.wst.wsdl.Import;
33
import org.eclipse.wst.wsdl.Import;
34
import org.eclipse.wst.wsdl.internal.impl.ImportImpl;
34
import org.eclipse.wst.wsdl.internal.impl.ImportImpl;
Lines 98-118 Link Here
98
		data.top = new FormAttachment(locationText, 0, SWT.CENTER);
98
		data.top = new FormAttachment(locationText, 0, SWT.CENTER);
99
		locationLabel.setLayoutData(data);
99
		locationLabel.setLayoutData(data);
100
100
101
    button = getWidgetFactory().createButton(composite, "", SWT.PUSH); //$NON-NLS-1$
101
		button = getWidgetFactory().createButton(composite, "", SWT.PUSH); //$NON-NLS-1$
102
    button.setImage(WSDLEditorPlugin.getInstance().getImage("icons/browsebutton.gif")); //$NON-NLS-1$
102
		button.setImage(WSDLEditorPlugin.getInstance().getImage("icons/browsebutton.gif")); //$NON-NLS-1$
103
103
104
    button.addSelectionListener(this);
104
		button.addSelectionListener(this);
105
		data = new FormData();
105
		data = new FormData();
106
		data.left = new FormAttachment(100, -rightMarginSpace + 2);
106
		data.left = new FormAttachment(100, -rightMarginSpace + 2);
107
		data.right = new FormAttachment(100,0);
107
		data.right = new FormAttachment(100,0);
108
		data.top = new FormAttachment(locationText, 0, SWT.CENTER);
108
		data.top = new FormAttachment(locationText, 0, SWT.CENTER);
109
		button.setLayoutData(data);
109
		button.setLayoutData(data);
110
111
		data = new FormData();
112
		data.left = new FormAttachment(0, 100);
113
		data.right = new FormAttachment(button, 0);
114
		data.top = new FormAttachment(prefixText, +ITabbedPropertyConstants.VSPACE);
115
		locationText.setLayoutData(data);
110
    
116
    
111
    data = new FormData();
117
		this.editorPart = getActiveEditor();
112
    data.left = new FormAttachment(0, 100);
113
    data.right = new FormAttachment(button, 0);
114
    data.top = new FormAttachment(prefixText, +ITabbedPropertyConstants.VSPACE);
115
    locationText.setLayoutData(data);
116
	}
118
	}
117
119
118
	/*
120
	/*
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/ExtensiblityElementSection.java (-1 / +1 lines)
Lines 14-20 Link Here
14
import org.eclipse.swt.layout.FormData;
14
import org.eclipse.swt.layout.FormData;
15
import org.eclipse.swt.widgets.Composite;
15
import org.eclipse.swt.widgets.Composite;
16
import org.eclipse.swt.widgets.Display;
16
import org.eclipse.swt.widgets.Display;
17
import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory;
17
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
18
import org.eclipse.wst.wsdl.ui.internal.model.ModelAdapterListener;
18
import org.eclipse.wst.wsdl.ui.internal.model.ModelAdapterListener;
19
import org.eclipse.wst.wsdl.ui.internal.viewers.ExtensibilityElementViewer;
19
import org.eclipse.wst.wsdl.ui.internal.viewers.ExtensibilityElementViewer;
20
import org.eclipse.wst.wsdl.ui.internal.viewers.widgets.AttributesTable;
20
import org.eclipse.wst.wsdl.ui.internal.viewers.widgets.AttributesTable;
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/ImportSectionDescriptor.java (-93 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2004 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.wst.wsdl.ui.internal.properties.section;
12
13
import java.util.ArrayList;
14
import java.util.List;
15
16
import org.eclipse.jface.viewers.ISelection;
17
import org.eclipse.jface.viewers.StructuredSelection;
18
import org.eclipse.ui.IWorkbenchPart;
19
import org.eclipse.wst.common.ui.properties.internal.provisional.ISection;
20
import org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor;
21
import org.eclipse.wst.wsdl.Import;
22
23
public class ImportSectionDescriptor extends AbstractSectionDescriptor implements ISectionDescriptor
24
{
25
  ImportSection importSection;
26
  /**
27
   * 
28
   */
29
  public ImportSectionDescriptor()
30
  {
31
    super();
32
    importSection = new ImportSection();
33
  }
34
35
  /* (non-Javadoc)
36
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getId()
37
   */
38
  public String getId()
39
  {
40
    return "org.eclipse.wst.wsdl.ui.internal.section.import";
41
  }
42
43
  /* (non-Javadoc)
44
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getInputTypes()
45
   */
46
  public List getInputTypes()
47
  {
48
    List list = new ArrayList();
49
    list.add(Import.class);
50
    return list;
51
  }
52
53
  /* (non-Javadoc)
54
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getSectionClass()
55
   */
56
  public ISection getSectionClass()
57
  {
58
    return importSection;
59
  }
60
61
  /* (non-Javadoc)
62
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getTargetTab()
63
   */
64
  public String getTargetTab()
65
  {
66
    return "org.eclipse.wst.xmlwebservices.general";
67
  }
68
69
  /* (non-Javadoc)
70
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#appliesTo(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
71
   */
72
  public boolean appliesTo(IWorkbenchPart part, ISelection selection)
73
  {
74
    importSection.setEditorPart(part.getSite().getWorkbenchWindow().getActivePage().getActiveEditor());
75
    Object object = null;
76
    if (selection instanceof StructuredSelection)
77
    {
78
      StructuredSelection structuredSelection = (StructuredSelection)selection;
79
      object = structuredSelection.getFirstElement();
80
      if (object instanceof Import)
81
      {
82
        return true;
83
      }
84
    }
85
    return false;
86
  }
87
  
88
  public String getAfterSection()
89
  {
90
    return "org.eclipse.wst.wsdl.ui.internal.section.name";
91
  }
92
93
}
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/DocumentationSectionDescriptor.java (-82 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2004 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.wst.wsdl.ui.internal.properties.section;
12
13
import org.eclipse.jface.viewers.ISelection;
14
import org.eclipse.jface.viewers.StructuredSelection;
15
import org.eclipse.ui.IWorkbenchPart;
16
import org.eclipse.wst.common.ui.properties.internal.provisional.ISection;
17
import org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor;
18
import org.eclipse.wst.wsdl.WSDLElement;
19
20
21
public class DocumentationSectionDescriptor extends AbstractSectionDescriptor implements ISectionDescriptor
22
{
23
  /**
24
   * 
25
   */
26
  public DocumentationSectionDescriptor()
27
  {
28
    super();
29
  }
30
31
  /* (non-Javadoc)
32
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getId()
33
   */
34
  public String getId()
35
  {
36
    return "org.eclipse.wst.wsdl.ui.internal.section.documentation";
37
  }
38
39
  /* (non-Javadoc)
40
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getSectionClass()
41
   */
42
  public ISection getSectionClass()
43
  {
44
    // TODO Auto-generated method stub
45
    return new DocumentationSection();
46
  }
47
48
  /* (non-Javadoc)
49
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getTargetTab()
50
   */
51
  public String getTargetTab()
52
  {
53
    // TODO Auto-generated method stub
54
    return "org.eclipse.wst.xmlwebservices.documentation";
55
  }
56
57
  /* (non-Javadoc)
58
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#appliesTo(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
59
   */
60
  public boolean appliesTo(IWorkbenchPart part, ISelection selection)
61
  {
62
    Object object = null;
63
    if (selection instanceof StructuredSelection)
64
    {
65
      StructuredSelection structuredSelection = (StructuredSelection)selection;
66
      object = structuredSelection.getFirstElement();
67
      if (object instanceof WSDLElement)
68
      {
69
        return true;
70
      }
71
    }
72
    return false;
73
  }
74
75
  /* (non-Javadoc)
76
   * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor#getAfterSection()
77
   */
78
  public String getAfterSection()
79
  {
80
    return "org.eclipse.wst.xmlwebservices.general";
81
  }
82
}
(-)plugin.xml (-3 / +65 lines)
Lines 185-195 Link Here
185
	</extension>
185
	</extension>
186
186
187
	<extension
187
	<extension
188
		point="org.eclipse.wst.common.ui.properties.propertyContributor">
188
		point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
189
		<propertyContributor
189
		<propertyContributor
190
			typeMapper="org.eclipse.wst.wsdl.ui.internal.properties.section.WSDLTypeMapper"
190
			typeMapper="org.eclipse.wst.wsdl.ui.internal.properties.section.WSDLTypeMapper"
191
			contributorId="org.eclipse.wst.wsdl.ui.internal.WSDLEditor"
191
			contributorId="org.eclipse.wst.wsdl.ui.internal.WSDLEditor"
192
			sectionDescriptorProvider="org.eclipse.wst.wsdl.ui.internal.properties.section.WSDLSectionDescriptorProvider"
193
			labelProvider="org.eclipse.wst.wsdl.ui.internal.properties.section.WSDLLabelProvider">
192
			labelProvider="org.eclipse.wst.wsdl.ui.internal.properties.section.WSDLLabelProvider">
194
			<propertyCategory category="general"></propertyCategory>
193
			<propertyCategory category="general"></propertyCategory>
195
			<propertyCategory category="namespace"></propertyCategory>
194
			<propertyCategory category="namespace"></propertyCategory>
Lines 203-209 Link Here
203
		</propertyContributor>
202
		</propertyContributor>
204
	</extension>
203
	</extension>
205
	<extension
204
	<extension
206
		point="org.eclipse.wst.common.ui.properties.propertyTabs">
205
		point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
207
		<propertyTabs
206
		<propertyTabs
208
			contributorId="org.eclipse.wst.wsdl.ui.internal.WSDLEditor">
207
			contributorId="org.eclipse.wst.wsdl.ui.internal.WSDLEditor">
209
			<propertyTab
208
			<propertyTab
Lines 244-249 Link Here
244
			</propertyTab>
243
			</propertyTab>
245
		</propertyTabs>
244
		</propertyTabs>
246
	</extension>
245
	</extension>
246
	
247
	<extension point="org.eclipse.ui.views.properties.tabbed.propertySections">
248
   <propertySections contributorId="org.eclipse.wst.wsdl.ui.internal.WSDLEditor">
249
	 <propertySection tab="org.eclipse.wst.xmlwebservices.general" 
250
        class="org.eclipse.wst.wsdl.ui.internal.properties.section.NamespaceSection"
251
        filter="org.eclipse.wst.wsdl.ui.internal.properties.section.filter.NamespaceSectionFilter"
252
	 	id="org.eclipse.wst.wsdl.ui.internal.section.namespace">
253
	    <input type="org.eclipse.wst.wsdl.Definition">
254
	    </input>
255
	 </propertySection>
256
	 <propertySection tab="org.eclipse.wst.xmlwebservices.general" 
257
        class="org.eclipse.wst.wsdl.ui.internal.properties.section.NamespaceSection"
258
        filter="org.eclipse.wst.wsdl.ui.internal.properties.section.filter.NamespaceSectionFilter"
259
	 	id="org.eclipse.wst.wsdl.ui.internal.section.namespace">
260
	    <input type="org.eclipse.wst.wsdl.ui.internal.model.WSDLGroupObject">
261
	    </input>
262
	 </propertySection>
263
	 
264
	 <propertySection tab="org.eclipse.wst.xmlwebservices.general" 
265
        class="org.eclipse.wst.wsdl.ui.internal.properties.section.PartSection"
266
	 	id="org.eclipse.wst.wsdl.ui.internal.section.part">
267
	    <input type="org.eclipse.wst.wsdl.Part">
268
	    </input>
269
	 </propertySection>
270
271
	 <propertySection tab="org.eclipse.wst.xmlwebservices.general" 
272
        class="org.eclipse.wst.wsdl.ui.internal.properties.section.ReferenceSection"
273
        filter="org.eclipse.wst.wsdl.ui.internal.properties.section.filter.ReferenceSectionFilter"
274
	 	id="org.eclipse.wst.wsdl.ui.internal.section.reference">
275
	    <input type="org.eclipse.wst.wsdl.WSDLElement">
276
	    </input>
277
	 </propertySection>
278
	 <propertySection tab="org.eclipse.wst.xmlwebservices.general" 
279
        class="org.eclipse.wst.wsdl.ui.internal.properties.section.NameSection"
280
        filter="org.eclipse.wst.wsdl.ui.internal.properties.section.filter.NameSectionFilter"
281
	 	id="org.eclipse.wst.wsdl.ui.internal.section.name">
282
	    <input type="org.eclipse.wst.wsdl.WSDLElement">
283
	    </input>
284
	 </propertySection>	 
285
	 	 
286
	 <propertySection tab="org.eclipse.wst.xmlwebservices.general" 
287
        class="org.eclipse.wst.wsdl.ui.internal.properties.section.ExtensiblityElementSection"
288
	 	id="org.eclipse.wst.wsdl.ui.internal.section.extensibilityelement">
289
	    <input type="org.eclipse.wst.wsdl.ExtensibilityElement">
290
	    </input>
291
	 </propertySection>
292
	 	 
293
	 <propertySection tab="org.eclipse.wst.xmlwebservices.general" 
294
        class="org.eclipse.wst.wsdl.ui.internal.properties.section.ImportSection"
295
	 	id="org.eclipse.wst.wsdl.ui.internal.section.import">
296
	    <input type="org.eclipse.wst.wsdl.Import">
297
	    </input>
298
	 </propertySection>
299
	 
300
	 <propertySection tab="org.eclipse.wst.xmlwebservices.documentation" 
301
        class="org.eclipse.wst.wsdl.ui.internal.properties.section.DocumentationSection"
302
	 	id="org.eclipse.wst.wsdl.ui.internal.section.documentation">
303
	    <input type="org.eclipse.wst.wsdl.WSDLElement">
304
	    </input>
305
	 </propertySection>
306
	 
307
  </propertySections>
308
</extension>
247
309
248
	<extension
310
	<extension
249
		point="org.eclipse.wst.wsdl.ui.internalEditorExtensions">
311
		point="org.eclipse.wst.wsdl.ui.internalEditorExtensions">
(-)src/org/eclipse/wst/wsdl/ui/internal/WSDLEditor.java (-1 / +1 lines)
Lines 48-54 Link Here
48
import org.eclipse.ui.texteditor.TextSelectionNavigationLocation;
48
import org.eclipse.ui.texteditor.TextSelectionNavigationLocation;
49
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
49
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
50
import org.eclipse.ui.views.properties.IPropertySheetPage;
50
import org.eclipse.ui.views.properties.IPropertySheetPage;
51
import org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertySheetPageContributor;
51
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
52
import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
52
import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
53
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
53
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
54
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
54
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
(-)src/org/eclipse/wst/wsdl/ui/internal/xsd/XSDSectionDescriptorProvider.java (-2 / +2 lines)
Lines 10-17 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.wst.wsdl.ui.internal.xsd;
11
package org.eclipse.wst.wsdl.ui.internal.xsd;
12
12
13
import org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptor;
13
import org.eclipse.ui.views.properties.tabbed.ISectionDescriptor;
14
import org.eclipse.wst.common.ui.properties.internal.provisional.ISectionDescriptorProvider;
14
import org.eclipse.ui.views.properties.tabbed.ISectionDescriptorProvider;
15
15
16
public class XSDSectionDescriptorProvider implements ISectionDescriptorProvider
16
public class XSDSectionDescriptorProvider implements ISectionDescriptorProvider
17
{
17
{
(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 65-76 Link Here
65
 org.eclipse.wst.xml.ui,
65
 org.eclipse.wst.xml.ui,
66
 org.eclipse.xsd,
66
 org.eclipse.xsd,
67
 org.eclipse.wst.wsdl,
67
 org.eclipse.wst.wsdl,
68
 org.eclipse.wst.common.ui.properties,
69
 org.eclipse.wst.common.core,
68
 org.eclipse.wst.common.core,
70
 org.eclipse.wst.xsd.ui,
69
 org.eclipse.wst.xsd.ui,
71
 org.eclipse.emf.edit,
70
 org.eclipse.emf.edit,
72
 org.eclipse.emf.edit.ui,
71
 org.eclipse.emf.edit.ui,
73
 org.eclipse.wst.validation,
72
 org.eclipse.wst.validation,
73
 org.eclipse.ui.views.properties.tabbed,
74
 org.wsdl4j,
74
 org.wsdl4j,
75
 org.eclipse.wst.wsdl.validation,
75
 org.eclipse.wst.wsdl.validation,
76
 org.eclipse.ltk.core.refactoring,
76
 org.eclipse.ltk.core.refactoring,
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/filter/ReferenceSectionFilter.java (+17 lines)
Added Link Here
1
package org.eclipse.wst.wsdl.ui.internal.properties.section.filter;
2
3
import org.eclipse.jface.viewers.IFilter;
4
import org.eclipse.wst.wsdl.Binding;
5
import org.eclipse.wst.wsdl.MessageReference;
6
import org.eclipse.wst.wsdl.Port;
7
8
public class ReferenceSectionFilter implements IFilter {
9
10
	public boolean select(Object toTest) {
11
		if (toTest instanceof MessageReference || toTest instanceof Binding || toTest instanceof Port) {
12
			return true;
13
		}		
14
		
15
		return false;
16
	}
17
}
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/filter/NameSectionFilter.java (+28 lines)
Added Link Here
1
package org.eclipse.wst.wsdl.ui.internal.properties.section.filter;
2
3
import org.eclipse.jface.viewers.IFilter;
4
import org.eclipse.wst.wsdl.Definition;
5
import org.eclipse.wst.wsdl.ExtensibilityElement;
6
import org.eclipse.wst.wsdl.Import;
7
import org.eclipse.wst.wsdl.WSDLElement;
8
9
public class NameSectionFilter implements IFilter {
10
	
11
	public boolean select(Object object) {
12
		if (object instanceof WSDLElement && 
13
				!(object instanceof ExtensibilityElement) &&
14
				!(object instanceof Import))
15
		{
16
			if (object instanceof WSDLElement) {
17
				Definition definition = ((WSDLElement) object).getEnclosingDefinition();
18
				if (definition.getElement() != null && !(object instanceof Definition)) {
19
					return true;
20
				}
21
22
				return false;
23
			}
24
		}
25
26
		return false;
27
	}
28
}
(-)src/org/eclipse/wst/wsdl/ui/internal/properties/section/filter/NamespaceSectionFilter.java (+29 lines)
Added Link Here
1
package org.eclipse.wst.wsdl.ui.internal.properties.section.filter;
2
3
import org.eclipse.jface.viewers.IFilter;
4
import org.eclipse.wst.wsdl.Definition;
5
import org.eclipse.wst.wsdl.ui.internal.model.WSDLGroupObject;
6
7
public class NamespaceSectionFilter implements IFilter {
8
9
	public boolean select(Object object) {
10
		if (object instanceof WSDLGroupObject)
11
		{
12
			Definition definition = ((WSDLGroupObject) object).getDefinition();
13
			if (definition.getElement() != null) {
14
				return true;
15
			}
16
17
			return false;
18
		}
19
		else if (object instanceof org.eclipse.wst.wsdl.Definition) {
20
			Definition definition = (Definition) object;
21
			if (definition.getElement() != null) {
22
				return true;
23
			}
24
		}
25
26
		return false;
27
	}
28
29
}

Return to bug 125745