Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-05-21 07:28:22 +0000
committerUwe Stieber2013-05-21 07:28:22 +0000
commit6a61bccef492e5d9513c5876db2ebc80e8b32bda (patch)
tree1a18f58e538066bfe643781b9ad31c58c3eef35e /target_explorer/plugins/org.eclipse.tcf.te.launch.ui
parenta208df59737db0fa329bc999094b621c3b30a4fb (diff)
downloadorg.eclipse.tcf-6a61bccef492e5d9513c5876db2ebc80e8b32bda.tar.gz
org.eclipse.tcf-6a61bccef492e5d9513c5876db2ebc80e8b32bda.tar.xz
org.eclipse.tcf-6a61bccef492e5d9513c5876db2ebc80e8b32bda.zip
Target Explorer: Fix copyright years in file headers
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.launch.ui')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/editor/AbstractLaunchTabContainerEditorPage.java400
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/EditorHandlerDelegate.java142
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/services/UIService.java76
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/launchcontext/AbstractContextSelectorControl.java2
4 files changed, 310 insertions, 310 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/editor/AbstractLaunchTabContainerEditorPage.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/editor/AbstractLaunchTabContainerEditorPage.java
index e8a6af559..af1f3c0bd 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/editor/AbstractLaunchTabContainerEditorPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/editor/AbstractLaunchTabContainerEditorPage.java
@@ -1,200 +1,200 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.launch.ui.editor;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.tcf.te.launch.ui.tabs.AbstractFormsLaunchConfigurationTab;
-import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
-import org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage;
-import org.eclipse.ui.forms.AbstractFormPart;
-
-/**
- * Abstract editor page implementation serving as container for a launch tab.
- */
-public abstract class AbstractLaunchTabContainerEditorPage extends AbstractCustomFormToolkitEditorPage {
- // Reference to the launch configuration tab
- private final AbstractLaunchConfigurationTab launchTab;
-
- boolean isDirty = false;
-
- /**
- * Constructor.
- */
- public AbstractLaunchTabContainerEditorPage() {
- super();
-
- // Create the launch configuration tab instance
- launchTab = createLaunchConfigurationTab();
- Assert.isNotNull(launchTab);
- }
-
- /**
- * Creates a new instance of the launch configuration tab to associate.
- *
- * @return The new launch configuration tab instance.
- */
- protected abstract AbstractLaunchConfigurationTab createLaunchConfigurationTab();
-
- /**
- * Returns the associated launch configuration tab.
- *
- * @return The launch configuration tab or <code>null</code>.
- */
- protected final AbstractLaunchConfigurationTab getLaunchConfigurationTab() {
- return launchTab;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#dispose()
- */
- @Override
- public void dispose() {
- launchTab.dispose();
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#hasApplyAction()
- */
- @Override
- protected boolean hasApplyAction() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#getContextHelpId()
- */
- @Override
- protected String getContextHelpId() {
- return launchTab.getHelpContextId();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#getFormTitle()
- */
- @Override
- protected String getFormTitle() {
- return launchTab.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#getFormImage()
- */
- @Override
- protected Image getFormImage() {
- return launchTab.getImage();
- }
-
- /**
- * Set the dirty state for this editor page.
- * @param dirty The dirty state.
- */
- public void setDirty(boolean dirty) {
- isDirty = dirty;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#doCreateFormContent(org.eclipse.swt.widgets.Composite, org.eclipse.tcf.te.ui.forms.CustomFormToolkit)
- */
- @Override
- protected void doCreateFormContent(Composite parent, CustomFormToolkit toolkit) {
- Assert.isNotNull(parent);
- Assert.isNotNull(toolkit);
-
- // Create the launch tab content
- if (launchTab instanceof AbstractFormsLaunchConfigurationTab) {
- ((AbstractFormsLaunchConfigurationTab)launchTab).createFormContent(getManagedForm());
- } else {
- launchTab.createControl(parent);
- }
-
- getManagedForm().addPart(new AbstractFormPart() {
- @Override
- public boolean isDirty() {
- return isDirty;
- }
-
- @Override
- public void commit(boolean onSave) {
- super.commit(onSave);
-
- if (onSave) {
- extractData();
- }
- }
- });
-
- // Fix the background color of the launch tab controls
- Color bg = parent.getBackground();
- Control[] children = parent.getChildren();
- if (bg != null && children != null && children.length > 0) {
- fixBackgrounds(children, bg);
- }
- }
-
- /**
- * Set the data to the page.
- * @param input The editor input.
- * @return <code>true</code> if data was set.
- */
- public abstract boolean setupData(Object input);
-
- /**
- * Extract the data from the page.
- * @return <code>true</code> if data was set.
- */
- public abstract boolean extractData();
-
- @Override
- public void setActive(boolean active) {
- super.setActive(active);
- if (active) setupData(getEditorInput());
- }
-
- /**
- * Set the background color of the given controls and their children
- * to the given color.
- *
- * @param controls The list of controls. Must not be <code>null</code>.
- * @param bg The background color. Must not be <code>null</code>.
- */
- protected final void fixBackgrounds(Control[] controls, Color bg) {
- Assert.isNotNull(controls);
- Assert.isNotNull(bg);
- for (Control c : controls) {
- if (!(c instanceof Composite) && !(c instanceof Label) && !(c instanceof Button)) {
- continue;
- }
- if (c instanceof Button) {
- int style = ((Button)c).getStyle();
- if ((style & SWT.RADIO) == 0 && (style & SWT.CHECK) == 0) {
- continue;
- }
- }
- if (!bg.equals(c.getBackground())) {
- c.setBackground(bg);
- }
- if (c instanceof Composite) {
- Control[] children = ((Composite)c).getChildren();
- if (children != null && children.length > 0) {
- fixBackgrounds(children, bg);
- }
- }
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.launch.ui.editor;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.tcf.te.launch.ui.tabs.AbstractFormsLaunchConfigurationTab;
+import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
+import org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage;
+import org.eclipse.ui.forms.AbstractFormPart;
+
+/**
+ * Abstract editor page implementation serving as container for a launch tab.
+ */
+public abstract class AbstractLaunchTabContainerEditorPage extends AbstractCustomFormToolkitEditorPage {
+ // Reference to the launch configuration tab
+ private final AbstractLaunchConfigurationTab launchTab;
+
+ boolean isDirty = false;
+
+ /**
+ * Constructor.
+ */
+ public AbstractLaunchTabContainerEditorPage() {
+ super();
+
+ // Create the launch configuration tab instance
+ launchTab = createLaunchConfigurationTab();
+ Assert.isNotNull(launchTab);
+ }
+
+ /**
+ * Creates a new instance of the launch configuration tab to associate.
+ *
+ * @return The new launch configuration tab instance.
+ */
+ protected abstract AbstractLaunchConfigurationTab createLaunchConfigurationTab();
+
+ /**
+ * Returns the associated launch configuration tab.
+ *
+ * @return The launch configuration tab or <code>null</code>.
+ */
+ protected final AbstractLaunchConfigurationTab getLaunchConfigurationTab() {
+ return launchTab;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#dispose()
+ */
+ @Override
+ public void dispose() {
+ launchTab.dispose();
+ super.dispose();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#hasApplyAction()
+ */
+ @Override
+ protected boolean hasApplyAction() {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#getContextHelpId()
+ */
+ @Override
+ protected String getContextHelpId() {
+ return launchTab.getHelpContextId();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#getFormTitle()
+ */
+ @Override
+ protected String getFormTitle() {
+ return launchTab.getName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#getFormImage()
+ */
+ @Override
+ protected Image getFormImage() {
+ return launchTab.getImage();
+ }
+
+ /**
+ * Set the dirty state for this editor page.
+ * @param dirty The dirty state.
+ */
+ public void setDirty(boolean dirty) {
+ isDirty = dirty;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#doCreateFormContent(org.eclipse.swt.widgets.Composite, org.eclipse.tcf.te.ui.forms.CustomFormToolkit)
+ */
+ @Override
+ protected void doCreateFormContent(Composite parent, CustomFormToolkit toolkit) {
+ Assert.isNotNull(parent);
+ Assert.isNotNull(toolkit);
+
+ // Create the launch tab content
+ if (launchTab instanceof AbstractFormsLaunchConfigurationTab) {
+ ((AbstractFormsLaunchConfigurationTab)launchTab).createFormContent(getManagedForm());
+ } else {
+ launchTab.createControl(parent);
+ }
+
+ getManagedForm().addPart(new AbstractFormPart() {
+ @Override
+ public boolean isDirty() {
+ return isDirty;
+ }
+
+ @Override
+ public void commit(boolean onSave) {
+ super.commit(onSave);
+
+ if (onSave) {
+ extractData();
+ }
+ }
+ });
+
+ // Fix the background color of the launch tab controls
+ Color bg = parent.getBackground();
+ Control[] children = parent.getChildren();
+ if (bg != null && children != null && children.length > 0) {
+ fixBackgrounds(children, bg);
+ }
+ }
+
+ /**
+ * Set the data to the page.
+ * @param input The editor input.
+ * @return <code>true</code> if data was set.
+ */
+ public abstract boolean setupData(Object input);
+
+ /**
+ * Extract the data from the page.
+ * @return <code>true</code> if data was set.
+ */
+ public abstract boolean extractData();
+
+ @Override
+ public void setActive(boolean active) {
+ super.setActive(active);
+ if (active) setupData(getEditorInput());
+ }
+
+ /**
+ * Set the background color of the given controls and their children
+ * to the given color.
+ *
+ * @param controls The list of controls. Must not be <code>null</code>.
+ * @param bg The background color. Must not be <code>null</code>.
+ */
+ protected final void fixBackgrounds(Control[] controls, Color bg) {
+ Assert.isNotNull(controls);
+ Assert.isNotNull(bg);
+ for (Control c : controls) {
+ if (!(c instanceof Composite) && !(c instanceof Label) && !(c instanceof Button)) {
+ continue;
+ }
+ if (c instanceof Button) {
+ int style = ((Button)c).getStyle();
+ if ((style & SWT.RADIO) == 0 && (style & SWT.CHECK) == 0) {
+ continue;
+ }
+ }
+ if (!bg.equals(c.getBackground())) {
+ c.setBackground(bg);
+ }
+ if (c instanceof Composite) {
+ Control[] children = ((Composite)c).getChildren();
+ if (children != null && children.length > 0) {
+ fixBackgrounds(children, bg);
+ }
+ }
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/EditorHandlerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/EditorHandlerDelegate.java
index 9ad0fe007..41e8953d3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/EditorHandlerDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/EditorHandlerDelegate.java
@@ -1,71 +1,71 @@
-/**
- * EditorHandlerDelegate.java
- * Created on Jan 25, 2012
- *
- * Copyright (c) 2012 Wind River Systems, Inc.
- *
- * The right to copy, distribute, modify, or otherwise make use
- * of this software may be licensed only pursuant to the terms
- * of an applicable Wind River license agreement.
- */
-package org.eclipse.tcf.te.launch.ui.handler;
-
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.tcf.te.launch.ui.internal.pages.LaunchExplorerEditorPage;
-import org.eclipse.tcf.te.launch.ui.model.LaunchModel;
-import org.eclipse.tcf.te.launch.ui.model.LaunchNode;
-import org.eclipse.tcf.te.ui.interfaces.handler.IEditorHandlerDelegate;
-import org.eclipse.tcf.te.ui.swt.DisplayUtil;
-import org.eclipse.tcf.te.ui.views.editor.Editor;
-import org.eclipse.tcf.te.ui.views.editor.EditorInput;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.forms.editor.FormEditor;
-import org.eclipse.ui.forms.editor.IFormPage;
-
-/**
- * Launch properties command handler implementation.
- */
-public class EditorHandlerDelegate implements IEditorHandlerDelegate {
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.interfaces.handler.IEditorHandlerDelegate#getEditorInput(java.lang.Object)
- */
- @Override
- public IEditorInput getEditorInput(Object element) {
- if (element instanceof LaunchModel) {
- return new EditorInput(((LaunchModel)element).getModelRoot());
- }
- if (element instanceof LaunchNode) {
- return new EditorInput(((LaunchNode)element).getModel().getModelRoot());
- }
- return new EditorInput(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.interfaces.handler.IEditorHandlerDelegate#postOpenProperties(org.eclipse.ui.IEditorPart, java.lang.Object)
- */
- @Override
- public void postOpenEditor(IEditorPart editor, final Object element) {
- if (editor instanceof FormEditor) {
- final FormEditor formEditor = (FormEditor)editor;
- DisplayUtil.safeAsyncExec(new Runnable() {
- @Override
- public void run() {
- IFormPage page = formEditor.setActivePage("org.eclipse.tcf.te.launch.ui.LaunchEditorPage"); //$NON-NLS-1$
- // If the element is a context node, select the node
- if (page != null && element instanceof LaunchModel || element instanceof LaunchNode) {
- Viewer viewer = ((LaunchExplorerEditorPage)page).getTreeControl().getViewer();
- if (viewer != null) {
- viewer.setSelection(new StructuredSelection(element), true);
- }
- }
- else if (formEditor instanceof Editor) {
- ((Editor)formEditor).setActivePage(0);
- }
- }
- });
- }
- }
-}
+/**
+ * EditorHandlerDelegate.java
+ * Created on Jan 25, 2012
+ *
+ * Copyright (c) 2012, 2013 Wind River Systems, Inc.
+ *
+ * The right to copy, distribute, modify, or otherwise make use
+ * of this software may be licensed only pursuant to the terms
+ * of an applicable Wind River license agreement.
+ */
+package org.eclipse.tcf.te.launch.ui.handler;
+
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.tcf.te.launch.ui.internal.pages.LaunchExplorerEditorPage;
+import org.eclipse.tcf.te.launch.ui.model.LaunchModel;
+import org.eclipse.tcf.te.launch.ui.model.LaunchNode;
+import org.eclipse.tcf.te.ui.interfaces.handler.IEditorHandlerDelegate;
+import org.eclipse.tcf.te.ui.swt.DisplayUtil;
+import org.eclipse.tcf.te.ui.views.editor.Editor;
+import org.eclipse.tcf.te.ui.views.editor.EditorInput;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.IFormPage;
+
+/**
+ * Launch properties command handler implementation.
+ */
+public class EditorHandlerDelegate implements IEditorHandlerDelegate {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.interfaces.handler.IEditorHandlerDelegate#getEditorInput(java.lang.Object)
+ */
+ @Override
+ public IEditorInput getEditorInput(Object element) {
+ if (element instanceof LaunchModel) {
+ return new EditorInput(((LaunchModel)element).getModelRoot());
+ }
+ if (element instanceof LaunchNode) {
+ return new EditorInput(((LaunchNode)element).getModel().getModelRoot());
+ }
+ return new EditorInput(element);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.interfaces.handler.IEditorHandlerDelegate#postOpenProperties(org.eclipse.ui.IEditorPart, java.lang.Object)
+ */
+ @Override
+ public void postOpenEditor(IEditorPart editor, final Object element) {
+ if (editor instanceof FormEditor) {
+ final FormEditor formEditor = (FormEditor)editor;
+ DisplayUtil.safeAsyncExec(new Runnable() {
+ @Override
+ public void run() {
+ IFormPage page = formEditor.setActivePage("org.eclipse.tcf.te.launch.ui.LaunchEditorPage"); //$NON-NLS-1$
+ // If the element is a context node, select the node
+ if (page != null && element instanceof LaunchModel || element instanceof LaunchNode) {
+ Viewer viewer = ((LaunchExplorerEditorPage)page).getTreeControl().getViewer();
+ if (viewer != null) {
+ viewer.setSelection(new StructuredSelection(element), true);
+ }
+ }
+ else if (formEditor instanceof Editor) {
+ ((Editor)formEditor).setActivePage(0);
+ }
+ }
+ });
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/services/UIService.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/services/UIService.java
index b34e33deb..e5a529d3f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/services/UIService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/services/UIService.java
@@ -1,38 +1,38 @@
-/**
- * UIService.java
- * Created on Nov 15, 2012
- *
- * Copyright (c) 2012 Wind River Systems, Inc.
- *
- * The right to copy, distribute, modify, or otherwise make use
- * of this software may be licensed only pursuant to the terms
- * of an applicable Wind River license agreement.
- */
-package org.eclipse.tcf.te.launch.ui.services;
-
-import org.eclipse.tcf.te.launch.ui.handler.EditorHandlerDelegate;
-import org.eclipse.tcf.te.runtime.services.AbstractService;
-import org.eclipse.tcf.te.runtime.services.interfaces.IUIService;
-import org.eclipse.tcf.te.ui.interfaces.handler.IEditorHandlerDelegate;
-
-/**
- * UI service implementation.
- */
-public class UIService extends AbstractService implements IUIService {
- private final IEditorHandlerDelegate editorHandlerDelegate = new EditorHandlerDelegate();
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.services.interfaces.IUIService#getDelegate(java.lang.Object, java.lang.Class)
- */
- @SuppressWarnings("unchecked")
- @Override
- public <V> V getDelegate(Object context, Class<? extends V> clazz) {
-
- if (IEditorHandlerDelegate.class.isAssignableFrom(clazz)) {
- return (V) editorHandlerDelegate;
- }
-
- return null;
- }
-
-}
+/**
+ * UIService.java
+ * Created on Nov 15, 2012
+ *
+ * Copyright (c) 2012, 2013 Wind River Systems, Inc.
+ *
+ * The right to copy, distribute, modify, or otherwise make use
+ * of this software may be licensed only pursuant to the terms
+ * of an applicable Wind River license agreement.
+ */
+package org.eclipse.tcf.te.launch.ui.services;
+
+import org.eclipse.tcf.te.launch.ui.handler.EditorHandlerDelegate;
+import org.eclipse.tcf.te.runtime.services.AbstractService;
+import org.eclipse.tcf.te.runtime.services.interfaces.IUIService;
+import org.eclipse.tcf.te.ui.interfaces.handler.IEditorHandlerDelegate;
+
+/**
+ * UI service implementation.
+ */
+public class UIService extends AbstractService implements IUIService {
+ private final IEditorHandlerDelegate editorHandlerDelegate = new EditorHandlerDelegate();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.services.interfaces.IUIService#getDelegate(java.lang.Object, java.lang.Class)
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public <V> V getDelegate(Object context, Class<? extends V> clazz) {
+
+ if (IEditorHandlerDelegate.class.isAssignableFrom(clazz)) {
+ return (V) editorHandlerDelegate;
+ }
+
+ return null;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/launchcontext/AbstractContextSelectorControl.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/launchcontext/AbstractContextSelectorControl.java
index 2dbedaef7..5ab4b01ab 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/launchcontext/AbstractContextSelectorControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/launchcontext/AbstractContextSelectorControl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html

Back to the top