Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2012-04-19 05:55:10 +0000
committerUwe Stieber2012-04-19 05:55:10 +0000
commitcb5e6b752f693f394164a037052543bf8a6d435b (patch)
tree60859aedbcc489abf0527563a2813655ef9733b3 /target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui
parent1a9d44e7c35bf78e3723b5328584271beba6cd9d (diff)
downloadorg.eclipse.tcf-cb5e6b752f693f394164a037052543bf8a6d435b.tar.gz
org.eclipse.tcf-cb5e6b752f693f394164a037052543bf8a6d435b.tar.xz
org.eclipse.tcf-cb5e6b752f693f394164a037052543bf8a6d435b.zip
Target Explorer: CHANGE launch context selector
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.xml15
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTab.java22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationTabGroup.java14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/launchcontext/ContextSelectorControl.java86
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/launchcontext/ContextSelectorSection.java47
6 files changed, 174 insertions, 15 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF
index 38ac54165..61f362e17 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF
@@ -23,7 +23,10 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.tcf.te.ui.controls;bundle-version="1.0.0",
org.eclipse.tcf.te.runtime.model;bundle-version="1.0.0",
org.eclipse.tcf.te.tcf.filesystem.core;bundle-version="1.0.0",
- org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0"
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.ui;bundle-version="1.0.0",
+ org.eclipse.ui.navigator;bundle-version="3.5.101",
+ org.eclipse.tcf.te.ui.views;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.xml
index 1221db99a..47352186e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.xml
@@ -18,4 +18,19 @@
type="org.eclipse.tcf.te.tcf.launch.type.remote.app">
</launchConfigurationTabGroup>
</extension>
+
+<!-- Editor page binding contributions -->
+ <extension point="org.eclipse.tcf.te.ui.views.editorPageBindings">
+ <editorPageBinding
+ id="org.eclispe.tcf.te.tcf.launch.ui.editor.LaunchEditorPage"
+ pageId="org.eclispe.tcf.te.launch.ui.editor.LaunchEditorPage"
+ insertAfter="org.eclipse.tcf.te.tcf.ui.OverviewEditorPage">
+ <enablement>
+ <with variable="activeEditorInput">
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ </with>
+ </enablement>
+ </editorPageBinding>
+ </extension>
+
</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTab.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTab.java
index a4ae71454..09dfd282c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTab.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTab.java
@@ -13,21 +13,29 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tcf.te.launch.ui.tabs.launchcontext.LaunchContextSelectorTab;
+import org.eclipse.tcf.te.launch.ui.tabs.launchcontext.AbstractContextSelectorTab;
+import org.eclipse.tcf.te.tcf.launch.ui.remote.app.launchcontext.ContextSelectorSection;
import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
+import org.eclipse.ui.forms.IManagedForm;
/**
* Remote application main launch tab implementation.
*/
-public class LaunchConfigurationMainTab extends LaunchContextSelectorTab {
+public class LaunchConfigurationMainTab extends AbstractContextSelectorTab {
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.ui.tabs.launchcontext.LaunchContextSelectorTab#doCreateFormContent(org.eclipse.swt.widgets.Composite, org.eclipse.tcf.te.ui.forms.CustomFormToolkit)
+ * @see org.eclipse.tcf.te.launch.ui.tabs.launchcontext.AbstractContextSelectorTab#doCreateContextSelectorSection(org.eclipse.ui.forms.IManagedForm, org.eclipse.swt.widgets.Composite)
*/
@Override
- protected void doCreateFormContent(Composite parent, CustomFormToolkit toolkit) {
- super.doCreateFormContent(parent, toolkit);
+ protected ContextSelectorSection doCreateContextSelectorSection(IManagedForm form, Composite panel) {
+ return new ContextSelectorSection(form, panel);
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.launch.ui.tabs.launchcontext.AbstractContextSelectorTab#doCreateAdditionalFormContent(org.eclipse.ui.forms.IManagedForm, org.eclipse.swt.widgets.Composite, org.eclipse.tcf.te.ui.forms.CustomFormToolkit)
+ */
+ @Override
+ protected void doCreateAdditionalFormContent(IManagedForm form, Composite parent, CustomFormToolkit toolkit) {
// Setup the main panel (using the table wrap layout)
Composite panel = toolkit.getFormToolkit().createComposite(parent);
GridLayout layout = new GridLayout(1, false);
@@ -35,8 +43,8 @@ public class LaunchConfigurationMainTab extends LaunchContextSelectorTab {
panel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
panel.setBackground(parent.getBackground());
- LaunchConfigurationMainTabSection section = new LaunchConfigurationMainTabSection(getManagedForm(), panel);
+ LaunchConfigurationMainTabSection section = new LaunchConfigurationMainTabSection(form, panel);
section.getSection().setLayoutData(new GridData(GridData.FILL_BOTH));
- getManagedForm().addPart(section);
+ form.addPart(section);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationTabGroup.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationTabGroup.java
index f8e481c88..2c8907775 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationTabGroup.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationTabGroup.java
@@ -14,20 +14,17 @@ import java.util.List;
import org.eclipse.core.runtime.Assert;
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.tcf.te.launch.ui.tabs.AbstractLaunchConfigurationTabGroup;
import org.eclipse.tcf.te.launch.ui.tabs.projects.ReferencedProjetcsTab;
import org.eclipse.tcf.te.tcf.launch.ui.remote.app.filetransfer.FileTransferTab;
/**
* Remote application launch configuration tab group implementation.
*/
-public class LaunchConfigurationTabGroup extends org.eclipse.tcf.te.launch.ui.tabs.LaunchConfigurationTabGroup {
+public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
- /**
- * Create the context processImage tab.
- *
- * @param dialog The launch configuration dialog this tab group is contained in.
- * @param tabs The list of launch configuration tabs. Must not be <code>null</code>.
- * @param mode The mode the launch configuration dialog was opened in.
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.launch.ui.tabs.AbstractLaunchContextConfigurationTabGroup#createContextSelectorTab(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.util.List, java.lang.String)
*/
@Override
public void createContextSelectorTab(ILaunchConfigurationDialog dialog, List<ILaunchConfigurationTab> tabs, String mode) {
@@ -37,6 +34,9 @@ public class LaunchConfigurationTabGroup extends org.eclipse.tcf.te.launch.ui.ta
tabs.add(tab);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.launch.ui.tabs.AbstractLaunchContextConfigurationTabGroup#createAdditionalTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.util.List, java.lang.String)
+ */
@Override
public void createAdditionalTabs(ILaunchConfigurationDialog dialog, List<ILaunchConfigurationTab> tabs, String mode) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/launchcontext/ContextSelectorControl.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/launchcontext/ContextSelectorControl.java
new file mode 100644
index 000000000..74796aaa9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/launchcontext/ContextSelectorControl.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * 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.tcf.launch.ui.remote.app.launchcontext;
+
+import org.eclipse.jface.dialogs.IDialogPage;
+import org.eclipse.jface.viewers.DecoratingLabelProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.launch.ui.tabs.launchcontext.AbstractContextSelectorControl;
+import org.eclipse.tcf.te.tcf.ui.navigator.ContentProviderDelegate;
+import org.eclipse.tcf.te.tcf.ui.navigator.LabelProviderDelegate;
+import org.eclipse.tcf.te.ui.views.interfaces.ICategory;
+import org.eclipse.tcf.te.ui.views.interfaces.IRoot;
+import org.eclipse.tcf.te.ui.views.internal.ViewRoot;
+
+/**
+ * Locator model launch context selector control.
+ */
+@SuppressWarnings("restriction")
+public class ContextSelectorControl extends AbstractContextSelectorControl {
+
+ protected static class ContentProvider extends ContentProviderDelegate {
+ private ITreeContentProvider catContentProvider = new org.eclipse.tcf.te.ui.views.navigator.ContentProviderDelegate();
+ @Override
+ public Object[] getElements(Object inputElement) {
+ if (inputElement instanceof IRoot) {
+ return catContentProvider.getElements(inputElement);
+ }
+ return super.getElements(inputElement);
+ }
+ }
+
+ protected static class LabelProvider extends LabelProviderDelegate {
+ private ILabelProvider catLabelProvider = new org.eclipse.tcf.te.ui.views.navigator.LabelProviderDelegate();
+ @Override
+ public String getText(Object element) {
+ if (element instanceof ICategory) {
+ return catLabelProvider.getText(element);
+ }
+ return super.getText(element);
+ }
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof ICategory) {
+ return catLabelProvider.getImage(element);
+ }
+ return super.getImage(element);
+ }
+ }
+
+ /**
+ * Constructor.
+ * @param parentPage
+ */
+ public ContextSelectorControl(IDialogPage parentPage) {
+ super(parentPage);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.launch.ui.tabs.launchcontext.AbstractContextSelectorControl#getInitialViewerInput()
+ */
+ @Override
+ protected Object getInitialViewerInput() {
+ return ViewRoot.getInstance();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.launch.ui.tabs.launchcontext.AbstractContextSelectorControl#doConfigureTreeContentAndLabelProvider(org.eclipse.jface.viewers.TreeViewer)
+ */
+ @Override
+ protected void doConfigureTreeContentAndLabelProvider(TreeViewer viewer) {
+ viewer.setContentProvider(new ContentProvider());
+ LabelProvider labelProvider = new LabelProvider();
+ viewer.setLabelProvider(new DecoratingLabelProvider(labelProvider, labelProvider));
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/launchcontext/ContextSelectorSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/launchcontext/ContextSelectorSection.java
new file mode 100644
index 000000000..98d225feb
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/launchcontext/ContextSelectorSection.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * 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.tcf.launch.ui.remote.app.launchcontext;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tcf.te.launch.ui.tabs.launchcontext.AbstractContextSelectorControl;
+import org.eclipse.tcf.te.launch.ui.tabs.launchcontext.AbstractContextSelectorSection;
+import org.eclipse.ui.forms.IManagedForm;
+
+/**
+ * Locator model context selector section implementation.
+ */
+public class ContextSelectorSection extends AbstractContextSelectorSection {
+
+ /**
+ * Constructor.
+ * @param form The managed form.
+ * @param parent The parent composite.
+ */
+ public ContextSelectorSection(IManagedForm form, Composite parent) {
+ super(form, parent);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.launch.ui.tabs.launchcontext.AbstractContextSelectorSection#doCreateContextSelector()
+ */
+ @Override
+ protected AbstractContextSelectorControl doCreateContextSelector() {
+ return new ContextSelectorControl(null) {
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.launch.ui.tabs.launchcontext.AbstractContextSelectorControl#onCheckStateChanged(java.lang.Object, boolean)
+ */
+ @Override
+ protected void onCheckStateChanged(Object element, boolean checked) {
+ super.onCheckStateChanged(element, checked);
+ getManagedForm().dirtyStateChanged();
+ }
+ };
+ }
+}

Back to the top