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 256603 | Differences between
and this patch

Collapse All | Expand All

(-)META-INF/MANIFEST.MF (-6 / +6 lines)
Lines 2-16 Link Here
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: %pluginName
3
Bundle-Name: %pluginName
4
Bundle-SymbolicName: org.eclipse.ecf.discovery.edit;singleton:=true
4
Bundle-SymbolicName: org.eclipse.ecf.discovery.edit;singleton:=true
5
Bundle-Version: 2.0.0.qualifier
5
Bundle-Version: 3.0.0.qualifier
6
Bundle-ClassPath: .
6
Bundle-ClassPath: .
7
Bundle-Activator: org.eclipse.ecf.discovery.edit.provider.DiscoveryEditPlugin$Implementation
7
Bundle-Activator: org.eclipse.ecf.discovery.edit.provider.DiscoveryEditPlugin$Implementation
8
Bundle-Vendor: %providerName
8
Bundle-Vendor: %providerName
9
Bundle-Localization: plugin
9
Bundle-Localization: plugin
10
Bundle-RequiredExecutionEnvironment: J2SE-1.5
10
Bundle-RequiredExecutionEnvironment: J2SE-1.5
11
Export-Package: org.eclipse.ecf.discovery.edit,
11
Export-Package: org.eclipse.ecf.discovery.edit;x-internal:=true,
12
 org.eclipse.ecf.discovery.edit.provider
12
 org.eclipse.ecf.discovery.edit.provider;x-internal:=true
13
Require-Bundle: org.eclipse.core.runtime,
13
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
14
 org.eclipse.ecf.discovery.model;visibility:=reexport,
14
 org.eclipse.ecf.discovery.model;bundle-version="3.0.0",
15
 org.eclipse.emf.edit;visibility:=reexport
15
 org.eclipse.emf.edit;bundle-version="[2.4.0,3.0.0)"
16
Eclipse-LazyStart: true
16
Eclipse-LazyStart: true
(-)plugin.xml (-1 / +25 lines)
Lines 6-15 Link Here
6
     <view
6
     <view
7
           allowMultiple="true"
7
           allowMultiple="true"
8
           category="org.eclipse.ui"
8
           category="org.eclipse.ui"
9
           class="org.eclipse.ecf.discovery.ui.views.DiscoveryView"
9
           class="org.eclipse.ecf.internal.discovery.ui.views.DiscoveryView"
10
           icon="icons/full/obj16/dbbrowser_view.gif"
10
           icon="icons/full/obj16/dbbrowser_view.gif"
11
           id="org.eclipse.ecf.discovery.ui.DiscoveryView"
11
           id="org.eclipse.ecf.discovery.ui.DiscoveryView"
12
           name="%discovery.view">
12
           name="%discovery.view">
13
     </view>
13
     </view>
14
  </extension>
14
  </extension>
15
	
16
	 <extension
17
         point="org.eclipse.core.expressions.propertyTesters">
18
      <propertyTester
19
            class="org.eclipse.ecf.internal.discovery.ui.property.ServiceTypeTester"
20
            id="org.eclipse.ecf.discovery.ServiceTypePropertyTester"
21
            namespace="org.eclipse.ecf.discovery"
22
            properties="isServiceType"
23
            type="org.eclipse.ecf.discovery.model.IServiceInfo">
24
      </propertyTester>
25
   </extension>
26
27
28
  <!-- map from EMF models to platform's property sources -->
29
  <extension
30
        point="org.eclipse.core.runtime.adapters">
31
     <factory
32
           adaptableType="org.eclipse.emf.ecore.EObject"
33
           class="org.eclipse.ecf.internal.discovery.ui.EObjectPropertySourceFactory">
34
        <adapter
35
              type="org.eclipse.ui.views.properties.IPropertySource">
36
        </adapter>
37
     </factory>
38
  </extension>    
15
</plugin>
39
</plugin>
(-)META-INF/MANIFEST.MF (-7 / +11 lines)
Lines 2-15 Link Here
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: %pluginName
3
Bundle-Name: %pluginName
4
Bundle-SymbolicName: org.eclipse.ecf.discovery.ui;singleton:=true
4
Bundle-SymbolicName: org.eclipse.ecf.discovery.ui;singleton:=true
5
Bundle-Version: 2.0.0.qualifier
5
Bundle-Version: 3.0.0.qualifier
6
Bundle-ClassPath: .
6
Bundle-ClassPath: .
7
Bundle-Activator: org.eclipse.ecf.discovery.ui.DiscoveryUIPlugin$Implementation
7
Bundle-Activator: org.eclipse.ecf.internal.discovery.ui.DiscoveryUIPlugin$Implementation
8
Bundle-Vendor: %providerName
8
Bundle-Vendor: %providerName
9
Bundle-Localization: plugin
9
Bundle-Localization: plugin
10
Bundle-RequiredExecutionEnvironment: J2SE-1.5
10
Bundle-RequiredExecutionEnvironment: J2SE-1.5
11
Require-Bundle: org.eclipse.core.runtime,
11
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
12
 org.eclipse.ecf.discovery.edit;visibility:=reexport,
12
 org.eclipse.ecf.discovery.edit;bundle-version="3.0.0",
13
 org.eclipse.emf.edit.ui,
13
 org.eclipse.emf.edit.ui;bundle-version="[2.4.0,3.0.0)",
14
 org.eclipse.ui
14
 org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
15
Eclipse-LazyStart: true
15
 org.eclipse.ecf.discovery.model;bundle-version="3.0.0",
16
 org.eclipse.core.expressions;bundle-version="3.4.0",
17
 org.eclipse.ecf.discovery;bundle-version="2.1.0"
18
Bundle-ActivationPolicy: lazy
19
Export-Package: org.eclipse.ecf.discovery.ui;version="3.0.0"
(-)src/org/eclipse/ecf/discovery/ui/views/DiscoveryView.java (-150 lines)
Removed Link Here
1
/****************************************************************************
2
 * Copyright (c) 2008 Versant Corp. 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
 *    Versant Corp. - initial API and implementation
10
 *****************************************************************************/
11
package org.eclipse.ecf.discovery.ui.views;
12
13
import org.eclipse.ecf.discovery.edit.provider.DiscoveryEditingDomainProvider;
14
import org.eclipse.ecf.discovery.ui.statusline.AdapterFactoryStatuslineProvider;
15
import org.eclipse.emf.common.util.EList;
16
import org.eclipse.emf.ecore.resource.Resource;
17
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
18
import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
19
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
20
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
21
import org.eclipse.jface.action.IMenuListener;
22
import org.eclipse.jface.action.IMenuManager;
23
import org.eclipse.jface.action.IToolBarManager;
24
import org.eclipse.jface.action.MenuManager;
25
import org.eclipse.jface.action.Separator;
26
import org.eclipse.jface.viewers.StructuredSelection;
27
import org.eclipse.jface.viewers.StructuredViewer;
28
import org.eclipse.jface.viewers.TreeViewer;
29
import org.eclipse.jface.viewers.ViewerComparator;
30
import org.eclipse.jface.viewers.ViewerFilter;
31
import org.eclipse.swt.SWT;
32
import org.eclipse.swt.widgets.Composite;
33
import org.eclipse.swt.widgets.Menu;
34
import org.eclipse.ui.IActionBars;
35
import org.eclipse.ui.IWorkbenchActionConstants;
36
import org.eclipse.ui.part.DrillDownAdapter;
37
import org.eclipse.ui.part.ViewPart;
38
39
40
public class DiscoveryView extends ViewPart {
41
42
	public static final String ID = "org.eclipse.ecf.discovery.ui.DiscoveryView";
43
44
	private DrillDownAdapter drillDownAdapter;
45
46
	private TreeViewer selectionViewer;
47
48
	private void contributeToActionBars() {
49
		IActionBars bars = getViewSite().getActionBars();
50
		fillLocalPullDown(bars.getMenuManager());
51
		fillLocalToolBar(bars.getToolBarManager());
52
	}
53
54
	/**
55
	 * This creates a context menu for the viewer and adds a listener as well registering the menu for extension. <!--
56
	 * begin-user-doc --> <!-- end-user-doc -->
57
	 */
58
	protected void createContextMenuFor(StructuredViewer viewer) {
59
		MenuManager contextMenu = new MenuManager("#PopUp"); //$NON-NLS-1$
60
		contextMenu.add(new Separator("additions")); //$NON-NLS-1$
61
		contextMenu.setRemoveAllWhenShown(true);
62
		Menu menu = contextMenu.createContextMenu(viewer.getControl());
63
		viewer.getControl().setMenu(menu);
64
		getSite().registerContextMenu(contextMenu, viewer);
65
    }
66
67
	/* (non-Javadoc)
68
	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
69
	 */
70
	public void createPartControl(Composite parent) {
71
		ComposedAdapterFactory adapterFactory = DiscoveryEditingDomainProvider.eINSTANCE.getAdapterFactory();
72
		
73
		// create the viewer
74
		selectionViewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
75
		selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
76
		selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
77
		selectionViewer.setComparator(new ViewerComparator());
78
		selectionViewer.setFilters(getViewerFilters());
79
		getSite().setSelectionProvider(selectionViewer);
80
81
		// populate the viewer with the model if available
82
		EList<Resource> resources = DiscoveryEditingDomainProvider.eINSTANCE.getEditingDomain().getResourceSet()
83
				.getResources();
84
		if (resources != null) {
85
			selectionViewer.setInput(resources.get(0));
86
			selectionViewer.setSelection(new StructuredSelection(resources.get(0)), true);
87
		}
88
89
		new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
90
		selectionViewer.addPostSelectionChangedListener(new AdapterFactoryStatuslineProvider(adapterFactory,
91
				getViewSite().getActionBars().getStatusLineManager()));
92
		
93
		drillDownAdapter = new DrillDownAdapter(selectionViewer);
94
		createContextMenuFor(selectionViewer);
95
		hookContextMenu();
96
		contributeToActionBars();
97
	}
98
99
	/**
100
	 * @return
101
	 */
102
	private ViewerFilter[] getViewerFilters() {
103
		//TODO lookup view filters via EP
104
		return new ViewerFilter[0];
105
	}
106
107
	private void fillContextMenu(IMenuManager manager) {
108
		manager.add(new Separator());
109
		drillDownAdapter.addNavigationActions(manager);
110
		// Other plug-ins can contribute their actions here
111
		manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
112
	}
113
114
	private void fillLocalPullDown(IMenuManager manager) {
115
		manager.add(new Separator());
116
	}
117
118
	private void fillLocalToolBar(IToolBarManager manager) {
119
		drillDownAdapter.addNavigationActions(manager);
120
	}
121
122
	private void hookContextMenu() {
123
		MenuManager menuMgr = new MenuManager("#PopupMenu");
124
		menuMgr.setRemoveAllWhenShown(true);
125
		menuMgr.addMenuListener(new IMenuListener() {
126
			/* (non-Javadoc)
127
			 * @see org.eclipse.jface.action.IMenuListener#menuAboutToShow(org.eclipse.jface.action.IMenuManager)
128
			 */
129
			public void menuAboutToShow(IMenuManager manager) {
130
				//TODO https://bugs.eclipse.org/bugs/show_bug.cgi?id=151604
131
				// add a menu listener 
132
		        // that will fire a selection changed event, in order
133
		        // to update the selection in contributed actions
134
				selectionViewer.setSelection(selectionViewer.getSelection());
135
				
136
				DiscoveryView.this.fillContextMenu(manager);
137
			}
138
		});
139
		Menu menu = menuMgr.createContextMenu(selectionViewer.getControl());
140
		selectionViewer.getControl().setMenu(menu);
141
		getSite().registerContextMenu(menuMgr, selectionViewer);
142
	}
143
144
	/* (non-Javadoc)
145
	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
146
	 */
147
	public void setFocus() {
148
		selectionViewer.getControl().setFocus();
149
	}
150
}
(-)src/org/eclipse/ecf/discovery/ui/statusline/AdapterFactoryStatuslineProvider.java (-64 lines)
Removed Link Here
1
/****************************************************************************
2
 * Copyright (c) 2008 Versant Corp. 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
 *    Versant Corp. - initial API and implementation
10
 *****************************************************************************/
11
package org.eclipse.ecf.discovery.ui.statusline;
12
13
import org.eclipse.ecf.discovery.edit.IItemStatusLineProvider;
14
import org.eclipse.emf.ecore.EObject;
15
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
16
import org.eclipse.emf.edit.provider.IItemLabelProvider;
17
import org.eclipse.jface.action.IStatusLineManager;
18
import org.eclipse.jface.viewers.ISelection;
19
import org.eclipse.jface.viewers.ISelectionChangedListener;
20
import org.eclipse.jface.viewers.IStructuredSelection;
21
import org.eclipse.jface.viewers.SelectionChangedEvent;
22
23
24
public class AdapterFactoryStatuslineProvider implements ISelectionChangedListener {
25
	private ComposedAdapterFactory adapterFactory;
26
	private IStatusLineManager statusline;
27
28
	/**
29
	 * @param aStatusline
30
	 * @param adapterFactory
31
	 */
32
	public AdapterFactoryStatuslineProvider(ComposedAdapterFactory anAdapterFactory, IStatusLineManager aStatusline) {
33
		adapterFactory = anAdapterFactory;
34
		statusline = aStatusline;
35
	}
36
37
	/*
38
	 * (non-Javadoc)
39
	 * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
40
	 */
41
	public void selectionChanged(SelectionChangedEvent event) {
42
		ISelection selection = event.getSelection();
43
		if (selection instanceof IStructuredSelection) {
44
			IStructuredSelection ss = (IStructuredSelection) selection;
45
			EObject object = (EObject) ss.getFirstElement();
46
			if (object != null) { // do we really have a selection?
47
				IItemStatusLineProvider itemStatusLineProvider = (IItemStatusLineProvider) adapterFactory
48
						.adapt(object, IItemStatusLineProvider.class);
49
				if (itemStatusLineProvider != null) {
50
					statusline.setMessage(itemStatusLineProvider.getStatusLineText(object));
51
				} else {
52
					// fallback to IItemLabelProvider.getText(..)
53
					IItemLabelProvider itemLabelProvider = (IItemLabelProvider) adapterFactory.adapt(object, IItemLabelProvider.class);
54
					if (itemLabelProvider != null) {
55
						statusline.setMessage(itemLabelProvider.getText(object));
56
					}
57
				}
58
59
			}
60
		} else {
61
			statusline.setMessage("");
62
		}
63
	}
64
}
(-)src/org/eclipse/ecf/discovery/ui/DiscoveryUIPlugin.java (-104 lines)
Removed Link Here
1
/****************************************************************************
2
 * Copyright (c) 2008 Versant Corp. 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
 *    Versant Corp. - initial API and implementation
10
 *****************************************************************************/
11
package org.eclipse.ecf.discovery.ui;
12
13
import org.eclipse.emf.common.EMFPlugin;
14
import org.eclipse.emf.common.ui.EclipseUIPlugin;
15
import org.eclipse.emf.common.util.ResourceLocator;
16
17
/**
18
 * This is the central singleton for the Discovery plugin.
19
 * <!-- begin-user-doc -->
20
 * <!-- end-user-doc -->
21
 * @generated
22
 */
23
public final class DiscoveryUIPlugin extends EMFPlugin {
24
	/**
25
	 * <!-- begin-user-doc -->
26
	 * <!-- end-user-doc -->
27
	 * @generated
28
	 */
29
	public static final String copyright = "";
30
	
31
	/**
32
	 * Keep track of the singleton.
33
	 * <!-- begin-user-doc -->
34
	 * <!-- end-user-doc -->
35
	 * @generated
36
	 */
37
	public static final DiscoveryUIPlugin INSTANCE = new DiscoveryUIPlugin();
38
	
39
	/**
40
	 * Keep track of the singleton.
41
	 * <!-- begin-user-doc -->
42
	 * <!-- end-user-doc -->
43
	 * @generated
44
	 */
45
	private static Implementation plugin;
46
47
	/**
48
	 * Create the instance.
49
	 * <!-- begin-user-doc -->
50
	 * <!-- end-user-doc -->
51
	 * @generated
52
	 */
53
	public DiscoveryUIPlugin() {
54
		super
55
			(new ResourceLocator [] {
56
			});
57
	}
58
59
	/**
60
	 * Returns the singleton instance of the Eclipse plugin.
61
	 * <!-- begin-user-doc -->
62
	 * <!-- end-user-doc -->
63
	 * @return the singleton instance.
64
	 * @generated
65
	 */
66
	@Override
67
	public ResourceLocator getPluginResourceLocator() {
68
		return plugin;
69
	}
70
	
71
	/**
72
	 * Returns the singleton instance of the Eclipse plugin.
73
	 * <!-- begin-user-doc -->
74
	 * <!-- end-user-doc -->
75
	 * @return the singleton instance.
76
	 * @generated
77
	 */
78
	public static Implementation getPlugin() {
79
		return plugin;
80
	}
81
	
82
	/**
83
	 * The actual implementation of the Eclipse <b>Plugin</b>.
84
	 * <!-- begin-user-doc -->
85
	 * <!-- end-user-doc -->
86
	 * @generated
87
	 */
88
	public static class Implementation extends EclipseUIPlugin {
89
		/**
90
		 * Creates an instance.
91
		 * <!-- begin-user-doc -->
92
		 * <!-- end-user-doc -->
93
		 * @generated
94
		 */
95
		public Implementation() {
96
			super();
97
	
98
			// Remember the static instance.
99
			//
100
			plugin = this;
101
		}
102
	}
103
104
}
(-)src/org/eclipse/ecf/discovery/ui/DiscoveryHandlerUtil.java (+46 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2008 Versant Corp.
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
 *     Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
10
 ******************************************************************************/
11
12
package org.eclipse.ecf.discovery.ui;
13
14
import org.eclipse.core.commands.ExecutionEvent;
15
import org.eclipse.core.commands.ExecutionException;
16
import org.eclipse.ecf.discovery.IServiceInfo;
17
import org.eclipse.jface.viewers.ISelection;
18
import org.eclipse.jface.viewers.IStructuredSelection;
19
import org.eclipse.ui.handlers.HandlerUtil;
20
21
public class DiscoveryHandlerUtil {
22
	public static IServiceInfo getActiveIServiceInfoChecked(ExecutionEvent event) throws ExecutionException {
23
		ISelection selection = HandlerUtil.getCurrentSelectionChecked(event);
24
		org.eclipse.ecf.discovery.model.IServiceInfo serviceInfo = toIServiceInfo(selection);
25
		if(serviceInfo == null) {
26
			return null;
27
		} else {
28
			return serviceInfo.getEcfServiceInfo();
29
		}
30
	}
31
	public static IServiceInfo getActiveIServiceInfo(ExecutionEvent event) {
32
		ISelection selection = HandlerUtil.getCurrentSelection(event);
33
		org.eclipse.ecf.discovery.model.IServiceInfo serviceInfo = toIServiceInfo(selection);
34
		if(serviceInfo == null) {
35
			return null;
36
		} else {
37
			return serviceInfo.getEcfServiceInfo();
38
		}
39
	}
40
	private static org.eclipse.ecf.discovery.model.IServiceInfo toIServiceInfo(ISelection selection) {
41
		if(selection instanceof IStructuredSelection) {
42
			return (org.eclipse.ecf.discovery.model.IServiceInfo) ((IStructuredSelection) selection).getFirstElement();
43
		}
44
		return null;
45
	}
46
}
(-)src/org/eclipse/ecf/internal/discovery/ui/statusline/AdapterFactoryStatuslineProvider.java (+64 lines)
Added Link Here
1
/****************************************************************************
2
 * Copyright (c) 2008 Versant Corp. 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
 *    Versant Corp. - initial API and implementation
10
 *****************************************************************************/
11
package org.eclipse.ecf.internal.discovery.ui.statusline;
12
13
import org.eclipse.ecf.discovery.edit.IItemStatusLineProvider;
14
import org.eclipse.emf.ecore.EObject;
15
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
16
import org.eclipse.emf.edit.provider.IItemLabelProvider;
17
import org.eclipse.jface.action.IStatusLineManager;
18
import org.eclipse.jface.viewers.ISelection;
19
import org.eclipse.jface.viewers.ISelectionChangedListener;
20
import org.eclipse.jface.viewers.IStructuredSelection;
21
import org.eclipse.jface.viewers.SelectionChangedEvent;
22
23
24
public class AdapterFactoryStatuslineProvider implements ISelectionChangedListener {
25
	private ComposedAdapterFactory adapterFactory;
26
	private IStatusLineManager statusline;
27
28
	/**
29
	 * @param aStatusline
30
	 * @param adapterFactory
31
	 */
32
	public AdapterFactoryStatuslineProvider(ComposedAdapterFactory anAdapterFactory, IStatusLineManager aStatusline) {
33
		adapterFactory = anAdapterFactory;
34
		statusline = aStatusline;
35
	}
36
37
	/*
38
	 * (non-Javadoc)
39
	 * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
40
	 */
41
	public void selectionChanged(SelectionChangedEvent event) {
42
		ISelection selection = event.getSelection();
43
		if (selection instanceof IStructuredSelection) {
44
			IStructuredSelection ss = (IStructuredSelection) selection;
45
			EObject object = (EObject) ss.getFirstElement();
46
			if (object != null) { // do we really have a selection?
47
				IItemStatusLineProvider itemStatusLineProvider = (IItemStatusLineProvider) adapterFactory
48
						.adapt(object, IItemStatusLineProvider.class);
49
				if (itemStatusLineProvider != null) {
50
					statusline.setMessage(itemStatusLineProvider.getStatusLineText(object));
51
				} else {
52
					// fallback to IItemLabelProvider.getText(..)
53
					IItemLabelProvider itemLabelProvider = (IItemLabelProvider) adapterFactory.adapt(object, IItemLabelProvider.class);
54
					if (itemLabelProvider != null) {
55
						statusline.setMessage(itemLabelProvider.getText(object));
56
					}
57
				}
58
59
			}
60
		} else {
61
			statusline.setMessage("");
62
		}
63
	}
64
}
(-)src/org/eclipse/ecf/internal/discovery/ui/EObjectPropertySourceFactory.java (+46 lines)
Added Link Here
1
/****************************************************************************
2
 * Copyright (c) 2008 Versant Corp. 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
 *    Versant Corp. - initial API and implementation
10
 *****************************************************************************/
11
package org.eclipse.ecf.internal.discovery.ui;
12
13
import org.eclipse.core.runtime.IAdapterFactory;
14
import org.eclipse.emf.common.notify.Adapter;
15
import org.eclipse.emf.common.util.EList;
16
import org.eclipse.emf.ecore.EObject;
17
import org.eclipse.emf.edit.provider.IItemPropertySource;
18
import org.eclipse.emf.edit.ui.provider.PropertySource;
19
import org.eclipse.ui.views.properties.IPropertySource;
20
21
public class EObjectPropertySourceFactory implements IAdapterFactory {
22
23
	/* (non-Javadoc)
24
	 * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
25
	 */
26
	public Object getAdapter(Object adaptableObject, Class adapterType) {
27
		if (adapterType.equals(IPropertySource.class) && adaptableObject instanceof EObject) {
28
			EObject eObj = (EObject) adaptableObject;
29
			EList<Adapter> adapters = eObj.eAdapters();
30
			for (Adapter adapter : adapters) {
31
				if (adapter instanceof IItemPropertySource) {
32
					//TODO handle the case with multiple IItemPropertySource adapters for this EObject
33
					return new PropertySource(adaptableObject, (IItemPropertySource) adapter);
34
				}
35
			}
36
		}
37
		return null;
38
	}
39
40
	/* (non-Javadoc)
41
	 * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
42
	 */
43
	public Class[] getAdapterList() {
44
		return new Class[] { IPropertySource.class };
45
	}
46
}
(-)src/org/eclipse/ecf/internal/discovery/ui/DiscoveryUIPlugin.java (+104 lines)
Added Link Here
1
/****************************************************************************
2
 * Copyright (c) 2008 Versant Corp. 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
 *    Versant Corp. - initial API and implementation
10
 *****************************************************************************/
11
package org.eclipse.ecf.internal.discovery.ui;
12
13
import org.eclipse.emf.common.EMFPlugin;
14
import org.eclipse.emf.common.ui.EclipseUIPlugin;
15
import org.eclipse.emf.common.util.ResourceLocator;
16
17
/**
18
 * This is the central singleton for the Discovery plugin.
19
 * <!-- begin-user-doc -->
20
 * <!-- end-user-doc -->
21
 * @generated
22
 */
23
public final class DiscoveryUIPlugin extends EMFPlugin {
24
	/**
25
	 * <!-- begin-user-doc -->
26
	 * <!-- end-user-doc -->
27
	 * @generated
28
	 */
29
	public static final String copyright = "";
30
	
31
	/**
32
	 * Keep track of the singleton.
33
	 * <!-- begin-user-doc -->
34
	 * <!-- end-user-doc -->
35
	 * @generated
36
	 */
37
	public static final DiscoveryUIPlugin INSTANCE = new DiscoveryUIPlugin();
38
	
39
	/**
40
	 * Keep track of the singleton.
41
	 * <!-- begin-user-doc -->
42
	 * <!-- end-user-doc -->
43
	 * @generated
44
	 */
45
	private static Implementation plugin;
46
47
	/**
48
	 * Create the instance.
49
	 * <!-- begin-user-doc -->
50
	 * <!-- end-user-doc -->
51
	 * @generated
52
	 */
53
	public DiscoveryUIPlugin() {
54
		super
55
			(new ResourceLocator [] {
56
			});
57
	}
58
59
	/**
60
	 * Returns the singleton instance of the Eclipse plugin.
61
	 * <!-- begin-user-doc -->
62
	 * <!-- end-user-doc -->
63
	 * @return the singleton instance.
64
	 * @generated
65
	 */
66
	@Override
67
	public ResourceLocator getPluginResourceLocator() {
68
		return plugin;
69
	}
70
	
71
	/**
72
	 * Returns the singleton instance of the Eclipse plugin.
73
	 * <!-- begin-user-doc -->
74
	 * <!-- end-user-doc -->
75
	 * @return the singleton instance.
76
	 * @generated
77
	 */
78
	public static Implementation getPlugin() {
79
		return plugin;
80
	}
81
	
82
	/**
83
	 * The actual implementation of the Eclipse <b>Plugin</b>.
84
	 * <!-- begin-user-doc -->
85
	 * <!-- end-user-doc -->
86
	 * @generated
87
	 */
88
	public static class Implementation extends EclipseUIPlugin {
89
		/**
90
		 * Creates an instance.
91
		 * <!-- begin-user-doc -->
92
		 * <!-- end-user-doc -->
93
		 * @generated
94
		 */
95
		public Implementation() {
96
			super();
97
	
98
			// Remember the static instance.
99
			//
100
			plugin = this;
101
		}
102
	}
103
104
}
(-)src/org/eclipse/ecf/internal/discovery/ui/property/ServiceTypeTester.java (+48 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2008 Versant Corp.
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
 *     Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
10
 ******************************************************************************/
11
12
package org.eclipse.ecf.internal.discovery.ui.property;
13
14
import java.util.Arrays;
15
import java.util.List;
16
17
import org.eclipse.core.expressions.PropertyTester;
18
import org.eclipse.ecf.discovery.model.IServiceInfo;
19
import org.eclipse.ecf.discovery.model.IServiceTypeID;
20
21
public class ServiceTypeTester extends PropertyTester {
22
23
	/* (non-Javadoc)
24
	 * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
25
	 */
26
	public boolean test(Object receiver, String property, Object[] args,
27
			Object expectedValue) {
28
		if(args == null || !(expectedValue instanceof Boolean)) {
29
			return false;
30
		}
31
		boolean expected = ((Boolean)expectedValue).booleanValue();
32
		
33
		// convert the args to a list we can use for comparison
34
		List<Object> asList = Arrays.asList(args);
35
		
36
		// extract the sublist from the service types
37
		IServiceInfo serviceInfo = (IServiceInfo) receiver;
38
		IServiceTypeID serviceTypeId = serviceInfo.getServiceID().getServiceTypeID();
39
		List<String> services = serviceTypeId.getEcfServices();
40
		if(services.size() < args.length) {
41
			return false;
42
		} else {
43
			List<String> ecfServices = services.subList(0, args.length);
44
			boolean equals = asList.equals(ecfServices);
45
			return equals == expected ? true : false;
46
		}
47
	}
48
}
(-)src/org/eclipse/ecf/internal/discovery/ui/views/DiscoveryView.java (+186 lines)
Added Link Here
1
/****************************************************************************
2
 * Copyright (c) 2008 Versant Corp. 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
 *    Versant Corp. - initial API and implementation
10
 *****************************************************************************/
11
package org.eclipse.ecf.internal.discovery.ui.views;
12
13
import org.eclipse.ecf.discovery.edit.provider.DiscoveryEditingDomainProvider;
14
import org.eclipse.ecf.internal.discovery.ui.statusline.AdapterFactoryStatuslineProvider;
15
import org.eclipse.emf.common.util.EList;
16
import org.eclipse.emf.ecore.resource.Resource;
17
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
18
import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
19
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
20
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
21
import org.eclipse.jface.action.IMenuListener;
22
import org.eclipse.jface.action.IMenuManager;
23
import org.eclipse.jface.action.IToolBarManager;
24
import org.eclipse.jface.action.MenuManager;
25
import org.eclipse.jface.action.Separator;
26
import org.eclipse.jface.util.LocalSelectionTransfer;
27
import org.eclipse.jface.viewers.StructuredSelection;
28
import org.eclipse.jface.viewers.StructuredViewer;
29
import org.eclipse.jface.viewers.TreeViewer;
30
import org.eclipse.jface.viewers.ViewerComparator;
31
import org.eclipse.jface.viewers.ViewerFilter;
32
import org.eclipse.swt.SWT;
33
import org.eclipse.swt.dnd.DND;
34
import org.eclipse.swt.dnd.DragSourceAdapter;
35
import org.eclipse.swt.dnd.DragSourceEvent;
36
import org.eclipse.swt.dnd.Transfer;
37
import org.eclipse.swt.widgets.Composite;
38
import org.eclipse.swt.widgets.Menu;
39
import org.eclipse.ui.IActionBars;
40
import org.eclipse.ui.IWorkbenchActionConstants;
41
import org.eclipse.ui.PlatformUI;
42
import org.eclipse.ui.handlers.CollapseAllHandler;
43
import org.eclipse.ui.handlers.IHandlerService;
44
import org.eclipse.ui.part.DrillDownAdapter;
45
import org.eclipse.ui.part.ViewPart;
46
47
48
public class DiscoveryView extends ViewPart {
49
50
	public static final String ID = "org.eclipse.ecf.discovery.ui.DiscoveryView";
51
52
	private DrillDownAdapter drillDownAdapter;
53
54
	private TreeViewer selectionViewer;
55
56
	private CollapseAllHandler collapseHandler;
57
58
59
	private void contributeToActionBars() {
60
		IActionBars bars = getViewSite().getActionBars();
61
		fillLocalPullDown(bars.getMenuManager());
62
		fillLocalToolBar(bars.getToolBarManager());
63
	}
64
65
	/**
66
	 * This creates a context menu for the viewer and adds a listener as well registering the menu for extension. <!--
67
	 * begin-user-doc --> <!-- end-user-doc -->
68
	 */
69
	protected void createContextMenuFor(StructuredViewer viewer) {
70
		MenuManager contextMenu = new MenuManager("#PopUp"); //$NON-NLS-1$
71
		contextMenu.add(new Separator("additions")); //$NON-NLS-1$
72
		contextMenu.setRemoveAllWhenShown(true);
73
		Menu menu = contextMenu.createContextMenu(viewer.getControl());
74
		viewer.getControl().setMenu(menu);
75
		getSite().registerContextMenu(contextMenu, viewer);
76
    }
77
78
	/* (non-Javadoc)
79
	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
80
	 */
81
	public void createPartControl(Composite parent) {
82
		ComposedAdapterFactory adapterFactory = DiscoveryEditingDomainProvider.eINSTANCE.getAdapterFactory();
83
		
84
		// create the viewer
85
		selectionViewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
86
		selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
87
		selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
88
		selectionViewer.setComparator(new ViewerComparator());
89
		selectionViewer.setFilters(getViewerFilters());
90
		getSite().setSelectionProvider(selectionViewer);
91
92
		// populate the viewer with the model if available
93
		EList<Resource> resources = DiscoveryEditingDomainProvider.eINSTANCE.getEditingDomain().getResourceSet()
94
				.getResources();
95
		if (resources != null) {
96
			selectionViewer.setInput(resources.get(0));
97
			selectionViewer.setSelection(new StructuredSelection(resources.get(0)), true);
98
		}
99
100
		new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
101
		selectionViewer.addPostSelectionChangedListener(new AdapterFactoryStatuslineProvider(adapterFactory,
102
				getViewSite().getActionBars().getStatusLineManager()));
103
		
104
		drillDownAdapter = new DrillDownAdapter(selectionViewer);
105
		createContextMenuFor(selectionViewer);
106
		hookContextMenu();
107
		contributeToActionBars();
108
		
109
		// add collapse handler
110
		IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
111
		collapseHandler = new CollapseAllHandler(selectionViewer);
112
		handlerService.activateHandler(CollapseAllHandler.COMMAND_ID, collapseHandler);
113
		
114
		// add DND support
115
		Transfer[] supportedTransfers = { LocalSelectionTransfer.getTransfer() };
116
		selectionViewer.addDragSupport(DND.DROP_DEFAULT | DND.DROP_COPY | DND.DROP_MOVE, supportedTransfers, new DragSourceAdapter() {
117
			@Override
118
			public void dragSetData(DragSourceEvent event) {
119
				LocalSelectionTransfer.getTransfer().setSelection(selectionViewer.getSelection());
120
			}
121
		});
122
		
123
		PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, "org.eclipse.ecf.discovery.ui.ServiceView");
124
	}
125
126
	/**
127
	 * @return
128
	 */
129
	private ViewerFilter[] getViewerFilters() {
130
		//TODO lookup view filters via EP
131
		return new ViewerFilter[0];
132
	}
133
134
	private void fillContextMenu(IMenuManager manager) {
135
		manager.add(new Separator());
136
		drillDownAdapter.addNavigationActions(manager);
137
138
		// Other plug-ins can contribute their actions here
139
		manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
140
	}
141
142
	private void fillLocalPullDown(IMenuManager manager) {
143
		manager.add(new Separator());
144
	}
145
146
	private void fillLocalToolBar(IToolBarManager manager) {
147
		drillDownAdapter.addNavigationActions(manager);
148
	}
149
150
	private void hookContextMenu() {
151
		MenuManager menuMgr = new MenuManager("#PopupMenu");
152
		menuMgr.setRemoveAllWhenShown(true);
153
		menuMgr.addMenuListener(new IMenuListener() {
154
			/* (non-Javadoc)
155
			 * @see org.eclipse.jface.action.IMenuListener#menuAboutToShow(org.eclipse.jface.action.IMenuManager)
156
			 */
157
			public void menuAboutToShow(IMenuManager manager) {
158
				//TODO https://bugs.eclipse.org/bugs/show_bug.cgi?id=151604
159
				// add a menu listener 
160
		        // that will fire a selection changed event, in order
161
		        // to update the selection in contributed actions
162
				selectionViewer.setSelection(selectionViewer.getSelection());
163
				
164
				DiscoveryView.this.fillContextMenu(manager);
165
			}
166
		});
167
		Menu menu = menuMgr.createContextMenu(selectionViewer.getControl());
168
		selectionViewer.getControl().setMenu(menu);
169
		getSite().registerContextMenu(menuMgr, selectionViewer);
170
	}
171
172
	/* (non-Javadoc)
173
	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
174
	 */
175
	public void setFocus() {
176
		selectionViewer.getControl().setFocus();
177
	}
178
179
	/* (non-Javadoc)
180
	 * @see org.eclipse.ui.part.WorkbenchPart#dispose()
181
	 */
182
	public void dispose() {
183
		super.dispose();
184
		collapseHandler.dispose();
185
	}
186
}
(-)src/org/eclipse/ecf/discovery/ui/DiscoveryPropertyTesterUtil.java (+26 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2008 Versant Corp.
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
 *     Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
10
 ******************************************************************************/
11
12
package org.eclipse.ecf.discovery.ui;
13
14
import org.eclipse.ecf.discovery.IServiceInfo;
15
16
public class DiscoveryPropertyTesterUtil {
17
18
	public static IServiceInfo getIServiceInfoReceiver(Object receiver) {
19
		if(receiver instanceof org.eclipse.ecf.discovery.model.IServiceInfo) {
20
			org.eclipse.ecf.discovery.model.IServiceInfo isi = (org.eclipse.ecf.discovery.model.IServiceInfo) receiver;
21
			return isi.getEcfServiceInfo();
22
		}
23
		return null;
24
	}
25
26
}
(-).classpath (-1 / +1 lines)
Lines 1-7 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<classpath>
2
<classpath>
3
	<classpathentry kind="src" path="src"/>
4
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
3
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
5
	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
4
	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
5
	<classpathentry kind="src" path="src"/>
6
	<classpathentry kind="output" path="bin"/>
6
	<classpathentry kind="output" path="bin"/>
7
</classpath>
7
</classpath>
(-)build.properties (-1 / +2 lines)
Lines 3-9 Link Here
3
bin.includes = META-INF/,\
3
bin.includes = META-INF/,\
4
               .,\
4
               .,\
5
               about.html,\
5
               about.html,\
6
               plugin.properties
6
               plugin.properties,\
7
               plugin.xml
7
src.includes = about.html,\
8
src.includes = about.html,\
8
               META-INF/,\
9
               META-INF/,\
9
               plugin.properties
10
               plugin.properties
(-)src/org/eclipse/ecf/internal/remoteservices/ui/Messages.java (+7 lines)
Lines 32-37 Link Here
32
	public static String MethodInvocationDialog_InvocationTypeRemoteServiceProxy;
32
	public static String MethodInvocationDialog_InvocationTypeRemoteServiceProxy;
33
	public static String MethodInvocationDialog_InvocationTypeSynchronous;
33
	public static String MethodInvocationDialog_InvocationTypeSynchronous;
34
34
35
	public static String AbstractRemoteServiceAccessHandler_DISCONNECT_MENU_TEXT;
36
	public static String AbstractRemoteServiceAccessHandler_MSG_BOX_RECEIVED_EXCEPTION_TEXT;
37
	public static String AbstractRemoteServiceAccessHandler_MSG_BOX_RECEIVED_EXCEPTION_TITLE;
38
	public static String AbstractRemoteServiceAccessHandler_MSG_BOX_RECEIVED_RESP_TEXT;
39
	public static String AbstractRemoteServiceAccessHandler_MSG_BOX_RECEIVED_RESP_TITLE;
40
	public static String AbstractRemoteServiceAccessHandler_NOT_AVAILABLE_MENU_TEXT;
41
35
	static {
42
	static {
36
		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
43
		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
37
	}
44
	}
(-)META-INF/MANIFEST.MF (-4 / +9 lines)
Lines 2-13 Link Here
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: %plugin.name
3
Bundle-Name: %plugin.name
4
Bundle-SymbolicName: org.eclipse.ecf.remoteservice.ui;singleton:=true
4
Bundle-SymbolicName: org.eclipse.ecf.remoteservice.ui;singleton:=true
5
Bundle-Version: 2.0.0.qualifier
5
Bundle-Version: 3.0.0.qualifier
6
Bundle-RequiredExecutionEnvironment: J2SE-1.4
6
Bundle-RequiredExecutionEnvironment: J2SE-1.4
7
Require-Bundle: org.eclipse.core.runtime,
7
Require-Bundle: org.eclipse.core.runtime,
8
 org.eclipse.ui
8
 org.eclipse.ui,
9
Export-Package: org.eclipse.ecf.internal.remoteservices.ui;x-internal:=true,
9
 org.eclipse.core.expressions;bundle-version="3.4.0",
10
 org.eclipse.ecf.remoteservices.ui
10
 org.eclipse.ecf;bundle-version="2.0.1",
11
 org.eclipse.ecf.remoteservice;bundle-version="2.0.0",
12
 org.eclipse.ecf.discovery;bundle-version="2.1.0",
13
 org.eclipse.ecf.discovery.ui;bundle-version="3.0.0"
14
Export-Package: org.eclipse.ecf.remoteservices.ui;version="3.0.0"
11
Bundle-ActivationPolicy: lazy
15
Bundle-ActivationPolicy: lazy
12
Bundle-Vendor: %plugin.provider
16
Bundle-Vendor: %plugin.provider
13
Bundle-Localization: plugin
17
Bundle-Localization: plugin
18
Bundle-Activator: org.eclipse.ecf.internal.remoteservices.ui.Activator
(-)src/org/eclipse/ecf/internal/remoteservices/ui/handlers/ConnectRemoteServicehandler.java (+64 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2008 Versant Corp.
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
 *     Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
10
 ******************************************************************************/
11
package org.eclipse.ecf.internal.remoteservices.ui.handlers;
12
13
import org.eclipse.core.commands.AbstractHandler;
14
import org.eclipse.core.commands.ExecutionEvent;
15
import org.eclipse.core.commands.ExecutionException;
16
import org.eclipse.core.runtime.IProgressMonitor;
17
import org.eclipse.core.runtime.IStatus;
18
import org.eclipse.core.runtime.Status;
19
import org.eclipse.core.runtime.jobs.Job;
20
import org.eclipse.ecf.core.ContainerConnectException;
21
import org.eclipse.ecf.core.IContainer;
22
import org.eclipse.ecf.core.identity.ID;
23
import org.eclipse.ecf.internal.remoteservices.ui.RemoteServiceHandlerUtil;
24
import org.eclipse.jface.dialogs.MessageDialog;
25
import org.eclipse.osgi.util.NLS;
26
import org.eclipse.swt.widgets.Display;
27
28
public class ConnectRemoteServicehandler extends AbstractHandler {
29
30
	public Object execute(final ExecutionEvent event) throws ExecutionException {
31
		final ID createConnectId = RemoteServiceHandlerUtil.getActiveConnectIDChecked(event);
32
		// decouple the long running connect call from the ui thread
33
		Job job = new Job(NLS.bind("Connecting {0}", createConnectId.getName())) {
34
			protected IStatus run(IProgressMonitor monitor) {
35
				try {
36
					final IContainer container = RemoteServiceHandlerUtil.getActiveIRemoteServiceContainerChecked(event);
37
					container.connect(createConnectId, null);
38
				} catch (ContainerConnectException e) {
39
					showException(e);
40
					return Status.CANCEL_STATUS;
41
				} catch (ExecutionException e) {
42
					showException(e);
43
					return Status.CANCEL_STATUS;
44
				}
45
				return Status.OK_STATUS;
46
			}
47
		};
48
		job.setUser(true);
49
		job.schedule();
50
		return null;
51
	}
52
53
	private void showException(final Throwable t) {
54
		Display.getDefault().asyncExec(new Runnable() {
55
			public void run() {
56
				String msg = t.toString();
57
				if (t.getCause() != null) {
58
					msg += t.getCause().toString();
59
				}
60
				MessageDialog.openError(null, t.getLocalizedMessage(), NLS.bind("Exception: {0}", msg));
61
			}
62
		});
63
	}
64
}
(-)src/org/eclipse/ecf/internal/remoteservices/ui/property/ConnectedTester.java (+70 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2008 Versant Corp.
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
 *     Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
10
 ******************************************************************************/
11
package org.eclipse.ecf.internal.remoteservices.ui.property;
12
13
14
import org.eclipse.core.expressions.PropertyTester;
15
import org.eclipse.ecf.core.IContainer;
16
import org.eclipse.ecf.core.IContainerManager;
17
import org.eclipse.ecf.core.identity.ID;
18
import org.eclipse.ecf.core.identity.IDCreateException;
19
import org.eclipse.ecf.core.identity.IDFactory;
20
import org.eclipse.ecf.discovery.IServiceInfo;
21
import org.eclipse.ecf.discovery.ui.DiscoveryPropertyTesterUtil;
22
import org.eclipse.ecf.internal.remoteservices.ui.Activator;
23
import org.eclipse.ecf.remoteservice.Constants;
24
25
public class ConnectedTester extends PropertyTester {
26
	
27
	private IContainerManager containerManager;
28
29
	public ConnectedTester() {
30
		containerManager = Activator.getDefault().getContainerManager();
31
	}
32
	
33
	/* (non-Javadoc)
34
	 * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
35
	 */
36
	public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
37
		// consumers expect connected or disconnected
38
		if(!(expectedValue instanceof Boolean)) {
39
			return false;
40
		}
41
		boolean expected = ((Boolean) expectedValue).booleanValue();
42
43
		// get the container instance
44
		IServiceInfo serviceInfo = DiscoveryPropertyTesterUtil.getIServiceInfoReceiver(receiver);
45
		final String connectNamespace = getConnectNamespace(serviceInfo);
46
		final String connectId = getConnectID(serviceInfo);
47
		try {
48
			ID createConnectId = IDFactory.getDefault().createID(connectNamespace, connectId);
49
			IContainer container = containerManager.getContainer(createConnectId);
50
			if(container == null) {
51
				//Trace.trace(...);
52
				return expected == false;
53
			}
54
			ID connectedId = container.getConnectedID();
55
			boolean isConnected = connectedId == null ? false : true;
56
			return expected == isConnected;
57
		} catch (IDCreateException e) {
58
			//Trace.trace(...);
59
			return expected == false;
60
		}
61
	}
62
63
	private String getConnectNamespace(IServiceInfo serviceInfo) {
64
		return serviceInfo.getServiceProperties().getPropertyString(Constants.DISCOVERY_CONNECT_ID_NAMESPACE_PROPERTY);
65
	}
66
67
	private String getConnectID(IServiceInfo serviceInfo) {
68
		return serviceInfo.getServiceProperties().getPropertyString(Constants.DISCOVERY_CONNECT_ID_PROPERTY);
69
	}
70
}
(-)src/org/eclipse/ecf/internal/remoteservices/ui/handlers/ReflectiveRemoteServiceHandler.java (+189 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2008 Versant Corp.
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
 *     Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
10
 ******************************************************************************/
11
package org.eclipse.ecf.internal.remoteservices.ui.handlers;
12
13
import java.lang.reflect.InvocationTargetException;
14
import java.util.Arrays;
15
16
import org.eclipse.core.commands.AbstractHandler;
17
import org.eclipse.core.commands.ExecutionEvent;
18
import org.eclipse.core.commands.ExecutionException;
19
import org.eclipse.core.commands.IHandler;
20
import org.eclipse.ecf.core.IContainer;
21
import org.eclipse.ecf.core.identity.ID;
22
import org.eclipse.ecf.core.util.IAsyncResult;
23
import org.eclipse.ecf.internal.remoteservices.ui.RemoteServiceHandlerUtil;
24
import org.eclipse.ecf.remoteservice.IRemoteCall;
25
import org.eclipse.ecf.remoteservice.IRemoteCallListener;
26
import org.eclipse.ecf.remoteservice.IRemoteService;
27
import org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter;
28
import org.eclipse.ecf.remoteservice.IRemoteServiceReference;
29
import org.eclipse.ecf.remoteservice.events.IRemoteCallCompleteEvent;
30
import org.eclipse.ecf.remoteservice.events.IRemoteCallEvent;
31
import org.eclipse.ecf.remoteservices.ui.MethodInvocationDialog;
32
import org.eclipse.jface.dialogs.MessageDialog;
33
import org.eclipse.jface.window.Window;
34
import org.eclipse.osgi.util.NLS;
35
import org.eclipse.swt.widgets.Display;
36
import org.eclipse.swt.widgets.Shell;
37
38
public class ReflectiveRemoteServiceHandler extends AbstractHandler implements
39
		IHandler {
40
41
	/*
42
	 * (non-Javadoc)
43
	 * @see
44
	 * org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands
45
	 * .ExecutionEvent)
46
	 */
47
	public Object execute(ExecutionEvent event) throws ExecutionException {
48
		final String clazz = event.getParameter("org.eclipse.ecf.remoteservices.ui.commands.reflectiveMethodDialogParameter");
49
		final IRemoteServiceContainerAdapter adapter = RemoteServiceHandlerUtil.getActiveIRemoteServiceContainerAdapterChecked(event);
50
		final IRemoteServiceReference[] references = RemoteServiceHandlerUtil.getActiveIRemoteServiceReferencesChecked(event);
51
		final IRemoteService remoteService = adapter.getRemoteService(references[0]);
52
		try {
53
			executeMethodInvocationDialog(Class.forName(clazz), remoteService);
54
		} catch (ClassNotFoundException e) {
55
			throw new ExecutionException(e.getMessage(), e);
56
		}
57
		return null;
58
	}
59
60
	private void executeMethodInvocationDialog(final Class cls, final IRemoteService remoteService) {
61
		final MethodInvocationDialog mid = new MethodInvocationDialog(
62
				(Shell) null, cls);
63
		if (mid.open() == Window.OK) {
64
			final int timeout = (mid.getTimeout() > 0) ? mid.getTimeout()
65
					: 30000;
66
			final String methodName = mid.getMethod().getName();
67
			final Object[] methodArgs = mid.getMethodArguments();
68
			final IRemoteCall remoteCall = new IRemoteCall() {
69
				public String getMethod() {
70
					return methodName;
71
				}
72
73
				public Object[] getParameters() {
74
					return methodArgs;
75
				}
76
77
				public long getTimeout() {
78
					return timeout;
79
				}
80
			};
81
			final int invokeType = mid.getInvocationType();
82
			try {
83
				switch (invokeType) {
84
				case MethodInvocationDialog.ASYNC_FIRE_AND_GO:
85
					remoteService.callAsynch(remoteCall);
86
					break;
87
				case MethodInvocationDialog.ASYNC_FUTURE_RESULT:
88
					invokeFuture(cls, remoteService, remoteCall);
89
					break;
90
				case MethodInvocationDialog.ASYNC_LISTENER:
91
					invokeAsyncListener(cls, remoteService, remoteCall);
92
					break;
93
				case MethodInvocationDialog.OSGI_SERVICE_PROXY:
94
					throw new UnsupportedOperationException();
95
					// invokeOSGiProxy(interfaceClass, remoteCall);
96
					// break;
97
				case MethodInvocationDialog.REMOTE_SERVICE_PROXY:
98
					throw new UnsupportedOperationException();
99
					// invokeProxy(interfaceClass, remoteService, remoteCall);
100
					// break;
101
				case MethodInvocationDialog.SYNCHRONOUS:
102
					throw new UnsupportedOperationException();
103
					// invokeSync(cls, remoteService, remoteCall);
104
					// break;
105
				default:
106
					break;
107
				}
108
			} catch (final Exception e) {
109
				showException(e);
110
			}
111
		}
112
	}
113
114
	protected void showException(final Throwable t, final IContainer container,
115
			ID targetID) {
116
		Display.getDefault().asyncExec(new Runnable() {
117
			public void run() {
118
				String msg = t.toString();
119
				if (t.getCause() != null) {
120
					msg += t.getCause().toString();
121
				}
122
				MessageDialog.openInformation(null, "Received Exception", NLS
123
						.bind("Exception: {0}", msg));
124
				container.disconnect();
125
			}
126
		});
127
	}
128
129
	protected void invokeFuture(Class cls, IRemoteService remoteService,
130
			IRemoteCall remoteCall) throws InterruptedException,
131
			InvocationTargetException {
132
		// Make async call with future result
133
		final IAsyncResult asyncResult = remoteService.callAsynch(remoteCall);
134
		// Call blocking get and show result
135
		showResult(cls.getName(), remoteCall, asyncResult.get());
136
	}
137
138
	private void invokeAsyncListener(final Class interfaceClass,
139
			final IRemoteService remoteService, final IRemoteCall remoteCall) {
140
		// Make async call
141
		remoteService.callAsynch(remoteCall, new IRemoteCallListener() {
142
			public void handleEvent(IRemoteCallEvent event) {
143
				if (event instanceof IRemoteCallCompleteEvent) {
144
					final IRemoteCallCompleteEvent complete = (IRemoteCallCompleteEvent) event;
145
					if (complete.hadException()) {
146
						showException(complete.getException());
147
					} else
148
						showResult(interfaceClass.getName(), remoteCall,
149
								complete.getResponse());
150
				}
151
			}
152
		});
153
	}
154
155
	protected void showException(final Throwable t) {
156
		Display.getDefault().asyncExec(new Runnable() {
157
			public void run() {
158
				String msg = t.toString();
159
				if (t.getCause() != null) {
160
					msg += t.getCause().toString();
161
				}
162
				MessageDialog.openInformation(null, "Received Exception", NLS
163
						.bind("Exception: {0}", msg));
164
			}
165
		});
166
	}
167
168
	protected void showResult(final String serviceInterface,
169
			final IRemoteCall remoteCall, final Object result) {
170
		final Object display = (result != null && result.getClass().isArray()) ? Arrays
171
				.asList((Object[]) result)
172
				: result;
173
		final Object[] bindings = new Object[] { serviceInterface,
174
				remoteCall.getMethod(),
175
				Arrays.asList(remoteCall.getParameters()), display };
176
		Display.getDefault().asyncExec(new Runnable() {
177
			public void run() {
178
				MessageDialog
179
						.openInformation(
180
								null,
181
								"Received Response",
182
								NLS
183
										.bind(
184
												"Service Interface:\n{0}\n\nMethod: {1}\nParameters: {2}\n\nResult:  {3}",
185
												bindings));
186
			}
187
		});
188
	}
189
}
(-)src/org/eclipse/ecf/internal/remoteservices/ui/Activator.java (+61 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2008 Versant Corp.
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
 *     Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
10
 ******************************************************************************/
11
12
package org.eclipse.ecf.internal.remoteservices.ui;
13
14
import org.eclipse.ecf.core.IContainerManager;
15
import org.eclipse.ui.plugin.AbstractUIPlugin;
16
import org.osgi.framework.BundleContext;
17
import org.osgi.util.tracker.ServiceTracker;
18
19
public class Activator extends AbstractUIPlugin {
20
21
	private volatile ServiceTracker containerManagerTracker;
22
	// The shared instance
23
	private volatile static Activator plugin;
24
	
25
	/**
26
	 * The constructor
27
	 */
28
	public Activator() {
29
		plugin = this;
30
	}
31
32
	/* (non-Javadoc)
33
	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
34
	 */
35
	public void stop(BundleContext context) throws Exception {
36
		plugin = null;
37
		if(containerManagerTracker != null) {
38
			containerManagerTracker.close();
39
			containerManagerTracker = null;
40
		}
41
		super.stop(context);
42
	}
43
	
44
	/**
45
	 * Returns the shared instance
46
	 *
47
	 * @return the shared instance
48
	 */
49
	public static Activator getDefault() {
50
		return plugin;
51
	}
52
53
	public IContainerManager getContainerManager() {
54
		BundleContext context = getBundle().getBundleContext();
55
		if (containerManagerTracker == null) {
56
			containerManagerTracker = new ServiceTracker(context, IContainerManager.class.getName(), null);
57
			containerManagerTracker.open();
58
		}
59
		return (IContainerManager) containerManagerTracker.getService();
60
	}
61
}
(-)src/org/eclipse/ecf/internal/remoteservices/ui/RemoteServiceHandlerUtil.java (+107 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2008 Versant Corp.
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
 *     Markus Kuppe (mkuppe <at> versant <dot> com) - initial API and implementation
10
 ******************************************************************************/
11
12
package org.eclipse.ecf.internal.remoteservices.ui;
13
14
import org.eclipse.core.commands.ExecutionEvent;
15
import org.eclipse.core.commands.ExecutionException;
16
import org.eclipse.ecf.core.ContainerCreateException;
17
import org.eclipse.ecf.core.ContainerFactory;
18
import org.eclipse.ecf.core.IContainer;
19
import org.eclipse.ecf.core.IContainerManager;
20
import org.eclipse.ecf.core.identity.ID;
21
import org.eclipse.ecf.core.identity.IDCreateException;
22
import org.eclipse.ecf.core.identity.IDFactory;
23
import org.eclipse.ecf.discovery.IServiceInfo;
24
import org.eclipse.ecf.discovery.ui.DiscoveryHandlerUtil;
25
import org.eclipse.ecf.remoteservice.Constants;
26
import org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter;
27
import org.eclipse.ecf.remoteservice.IRemoteServiceReference;
28
import org.osgi.framework.InvalidSyntaxException;
29
30
public class RemoteServiceHandlerUtil {
31
32
	public static IRemoteServiceContainerAdapter getActiveIRemoteServiceContainerAdapterChecked(ExecutionEvent event) throws ExecutionException {
33
		final ID activeConnectId = getActiveConnectIDChecked(event);
34
		final IContainerManager containerManager = Activator.getDefault().getContainerManager();
35
		final IContainer container = containerManager.getContainer(activeConnectId);
36
		final IRemoteServiceContainerAdapter adapter = (IRemoteServiceContainerAdapter) container.getAdapter(IRemoteServiceContainerAdapter.class);
37
		return adapter;
38
	}
39
40
	public static IRemoteServiceReference[] getActiveIRemoteServiceReferencesChecked(ExecutionEvent event) throws ExecutionException {
41
		IServiceInfo serviceInfo = DiscoveryHandlerUtil.getActiveIServiceInfoChecked(event);
42
		IRemoteServiceContainerAdapter adapter = getActiveIRemoteServiceContainerAdapterChecked(event);
43
		try {
44
			return getRemoteServiceReferencesForRemoteServiceAdapter(adapter, serviceInfo);
45
		} catch (IDCreateException e) {
46
			throw new ExecutionException(e.getMessage(), e);
47
		} catch (InvalidSyntaxException e) {
48
			throw new ExecutionException(e.getMessage(), e);
49
		}
50
	}
51
52
	public static ID getActiveConnectIDChecked(ExecutionEvent event) throws ExecutionException {
53
		IServiceInfo serviceInfo = DiscoveryHandlerUtil.getActiveIServiceInfoChecked(event);
54
		final String connectNamespace = getConnectNamespace(serviceInfo);
55
		final String connectId = getConnectID(serviceInfo);
56
		try {
57
			return IDFactory.getDefault().createID(connectNamespace, connectId);
58
		} catch (IDCreateException e) {
59
			throw new ExecutionException(e.getMessage(), e);
60
		}
61
	}
62
63
	public static IContainer getActiveIRemoteServiceContainerChecked(ExecutionEvent event) throws ExecutionException {
64
		final IServiceInfo serviceInfo = DiscoveryHandlerUtil.getActiveIServiceInfoChecked(event);
65
		final ID createConnectId = getActiveConnectIDChecked(event);
66
		//TODO remove parameters once https://bugs.eclipse.org/bugs/show_bug.cgi?id=256586 is fixed
67
		final Object[] parameters = new Object[]{createConnectId};
68
		try {
69
			return ContainerFactory.getDefault().createContainer(getContainerFactory(serviceInfo), parameters);
70
		} catch (ContainerCreateException e) {
71
			throw new ExecutionException(e.getMessage(), e);
72
		}
73
	}
74
75
	private static IRemoteServiceReference[] getRemoteServiceReferencesForRemoteServiceAdapter(IRemoteServiceContainerAdapter adapter, IServiceInfo serviceInfo) throws InvalidSyntaxException, IDCreateException {
76
		ID serviceID = null;
77
		String serviceNamespace = getServiceNamespace(serviceInfo);
78
		String serviceid = getServiceID(serviceInfo);
79
		if (serviceNamespace != null && serviceid != null) {
80
			serviceID = IDFactory.getDefault().createID(serviceNamespace, serviceid);
81
		}
82
		ID[] targets = (serviceID == null) ? null : new ID[] {serviceID};
83
		return adapter.getRemoteServiceReferences(targets, getRemoteServiceClass(serviceInfo), getFilter(serviceInfo));
84
	}
85
	
86
	private static String getServiceNamespace(IServiceInfo serviceInfo) {
87
		return serviceInfo.getServiceProperties().getPropertyString(Constants.DISCOVERY_SERVICE_ID_NAMESPACE_PROPERTY);
88
	}
89
	private static String getServiceID(IServiceInfo serviceInfo) {
90
		return serviceInfo.getServiceProperties().getPropertyString(Constants.DISCOVERY_SERVICE_ID_PROPERTY);
91
	}
92
	private static String getRemoteServiceClass(IServiceInfo serviceInfo) {
93
		return serviceInfo.getServiceProperties().getPropertyString(Constants.DISCOVERY_OBJECTCLASS_PROPERTY);
94
	}
95
	private static String getFilter(IServiceInfo serviceInfo) {
96
		return serviceInfo.getServiceProperties().getPropertyString(Constants.DISCOVERY_FILTER_PROPERTY);
97
	}
98
	private static String getConnectNamespace(IServiceInfo serviceInfo) {
99
		return serviceInfo.getServiceProperties().getPropertyString(Constants.DISCOVERY_CONNECT_ID_NAMESPACE_PROPERTY);
100
	}
101
	private static String getConnectID(IServiceInfo serviceInfo) {
102
		return serviceInfo.getServiceProperties().getPropertyString(Constants.DISCOVERY_CONNECT_ID_PROPERTY);
103
	}
104
	private static String getContainerFactory(IServiceInfo serviceInfo) {
105
		return serviceInfo.getServiceProperties().getPropertyString(Constants.DISCOVERY_CONTAINER_FACTORY_PROPERTY);
106
	}
107
}
(-)plugin.xml (+63 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?eclipse version="3.2"?>
3
<plugin>
4
   <extension
5
         point="org.eclipse.ui.commands">
6
      <command
7
            defaultHandler="org.eclipse.ecf.internal.remoteservices.ui.handlers.ConnectRemoteServicehandler"
8
            id="org.eclipse.ecf.remoteservices.ui.commands.connectCommand"
9
            name="Connect Command">
10
      </command>
11
      <command
12
            defaultHandler="org.eclipse.ecf.internal.remoteservices.ui.handlers.ReflectiveRemoteServiceHandler"
13
            id="org.eclipse.ecf.remoteservices.ui.commands.reflectiveMethodDialogHandler"
14
            name="Reflective Method Invocation Command">
15
         <commandParameter
16
               id="org.eclipse.ecf.remoteservices.ui.commands.reflectiveMethodDialogParameter"
17
               name="name"
18
               optional="true">
19
         </commandParameter>
20
      </command>
21
   </extension>
22
   <extension
23
         point="org.eclipse.ui.menus">
24
      <menuContribution
25
            locationURI="popup:org.eclipse.ecf.discovery.ui.DiscoveryView?after=additions">
26
         <command
27
               commandId="org.eclipse.ecf.remoteservices.ui.commands.connectCommand"
28
               id="org.eclipse.ecf.remoteservices.ui.menus.connectCommand"
29
               mnemonic="S">
30
            <visibleWhen>
31
               <with
32
                     variable="activeMenuSelection">
33
                  <iterate
34
                        ifEmpty="false"
35
                        operator="and">
36
                     <test
37
                           args="remotesvcs"
38
                           property="org.eclipse.ecf.discovery.isServiceType"
39
                           value="true">
40
                     </test>
41
                     <test
42
                           property="org.eclipse.ecf.remoteservices.isConnected"
43
                           value="false">
44
                     </test>
45
                  </iterate>
46
               </with>
47
            </visibleWhen>
48
         </command>
49
      </menuContribution>
50
   </extension>
51
52
	 <extension
53
         point="org.eclipse.core.expressions.propertyTesters">
54
      <propertyTester
55
            class="org.eclipse.ecf.internal.remoteservices.ui.property.ConnectedTester"
56
            id="org.eclipse.ecf.remoteservices.ui.property.ConnectedPropertyTester"
57
            namespace="org.eclipse.ecf.remoteservices"
58
            properties="isConnected"
59
            type="org.eclipse.ecf.discovery.model.IServiceInfo">
60
      </propertyTester>
61
   </extension>
62
63
</plugin>
(-)META-INF/MANIFEST.MF (-5 / +5 lines)
Lines 2-16 Link Here
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: %pluginName
3
Bundle-Name: %pluginName
4
Bundle-SymbolicName: org.eclipse.ecf.discovery.model;singleton:=true
4
Bundle-SymbolicName: org.eclipse.ecf.discovery.model;singleton:=true
5
Bundle-Version: 2.0.0.qualifier
5
Bundle-Version: 3.0.0.qualifier
6
Bundle-ClassPath: .
6
Bundle-ClassPath: .
7
Bundle-Vendor: %providerName
7
Bundle-Vendor: %providerName
8
Bundle-Localization: plugin
8
Bundle-Localization: plugin
9
Bundle-RequiredExecutionEnvironment: J2SE-1.5
9
Bundle-RequiredExecutionEnvironment: J2SE-1.5
10
Require-Bundle: org.eclipse.core.runtime,
10
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
11
 org.eclipse.emf.ecore;visibility:=reexport,
11
 org.eclipse.emf.ecore;bundle-version="[2.4.0,3.0.0)",
12
 org.eclipse.ecf.discovery,
12
 org.eclipse.ecf.discovery;bundle-version="2.0.0",
13
 org.eclipse.ecf
13
 org.eclipse.ecf;bundle-version="2.0.0"
14
Eclipse-LazyStart: true
14
Eclipse-LazyStart: true
15
Export-Package: org.eclipse.ecf.discovery.model,
15
Export-Package: org.eclipse.ecf.discovery.model,
16
 org.eclipse.ecf.discovery.model.impl,
16
 org.eclipse.ecf.discovery.model.impl,

Return to bug 256603