Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui')
-rw-r--r--proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/DialogConnect.java183
-rw-r--r--proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/DialogLogin.java126
-rw-r--r--proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/IToolViewPart.java25
-rw-r--r--proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/Messages.java40
-rw-r--r--proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionConnect.java51
-rw-r--r--proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionDisconnect.java52
-rw-r--r--proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionPause.java54
-rw-r--r--proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionRefresh.java54
-rw-r--r--proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionRun.java54
-rw-r--r--proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/messages.properties31
10 files changed, 670 insertions, 0 deletions
diff --git a/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/DialogConnect.java b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/DialogConnect.java
new file mode 100644
index 0000000000..30879c8274
--- /dev/null
+++ b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/DialogConnect.java
@@ -0,0 +1,183 @@
+/********************************************************************************
+ * Copyright (c) 2008 Motorola Inc. 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
+ *
+ * Initial Contributor:
+ * Otavio Ferranti (Motorola)
+ *
+ * Contributors:
+ * Otavio Ferranti - Eldorado Research Institute - Bug 255255 [tml][proctools] Add extension points
+ ********************************************************************************/
+
+package org.eclipse.sequoyah.device.linuxtools.ui;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.sequoyah.device.linuxtools.tools.ITool;
+import org.eclipse.sequoyah.device.linuxtools.utilities.ProtocolDescriptor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+
+/**
+ * @author Otavio Ferranti
+ */
+public class DialogConnect extends TitleAreaDialog {
+
+ final private String WINDOW_TITLE = Messages.OpenConnectionDialog_Window_Title;
+ final private String WINDOW_MESSAGE = Messages.OpenConnectionDialog_Window_Message;
+ final private String LABEL_HOST = Messages.OpenConnectionDialog_Label_Host;
+ final private String LABEL_PORT = Messages.OpenConnectionDialog_Label_Port;
+ final private String LABEL_PROTOCOL = Messages.OpenConnectionDialog_Label_Protocol;
+
+ private Text hostText;
+ private Text portText;
+ private Combo protocolCombo;
+
+ private ITool tool = null;
+
+ private List <ProtocolDescriptor> pdList = null;
+
+ /**
+ * The constructor.
+ * @param parent
+ */
+ public DialogConnect(Shell parent, ITool tool) {
+ super(parent);
+ this.tool = tool;
+ this.pdList = tool.getProtocolsDescriptors();
+ }
+
+ /**
+ *
+ */
+ private int getProtocolDefaultPort(String name) {
+ int retVal = -1;
+ for (ProtocolDescriptor pd : this.pdList) {
+ if(pd.getName().equalsIgnoreCase(name)) {
+ retVal = pd.getDefaultPort();;
+ break;
+ };
+ }
+ return retVal;
+ }
+
+ /**
+ *
+ */
+ private ProtocolDescriptor getProcotolDescriptor(String name) {
+ ProtocolDescriptor retVal = null;
+ for (ProtocolDescriptor pd : this.pdList) {
+ if(pd.getName().equalsIgnoreCase(name)) {
+ retVal = pd;
+ break;
+ };
+ }
+ return retVal;
+ }
+
+ /**
+ *
+ */
+ private String[] getProcotolsNames() {
+ List<String> aux = new LinkedList<String>();
+ for (ProtocolDescriptor pd : this.pdList) {
+ aux.add(pd.getName());
+ }
+ String[] retVal = new String[1];
+ retVal = aux.toArray(retVal);
+ return retVal;
+ }
+
+ /**
+ *
+ */
+ private void updatePortToDefault() {
+ String selection = protocolCombo.getText();
+ int port = this.getProtocolDefaultPort(selection);
+ portText.setText(new Integer(port).toString());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.TitleAreaDialog#getInitialSize()
+ */
+ protected Point getInitialSize() {
+ return super.getInitialSize();
+ }
+
+ protected Control createDialogArea(Composite parent) {
+
+ setTitle(WINDOW_TITLE);
+ setMessage(WINDOW_MESSAGE);
+
+ Composite dialogArea = new Composite(parent, SWT.NONE);
+ GridLayout gridLayout = new GridLayout(2, false);
+
+ gridLayout.marginLeft = 7;
+ gridLayout.marginRight = 7;
+
+ dialogArea.setLayout(gridLayout);
+ dialogArea.setLayoutData(new GridData(GridData.FILL_BOTH));
+ dialogArea.setFont(parent.getFont());
+
+ GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
+
+ Label hostLabel = new Label(dialogArea, SWT.NULL);
+ hostLabel.setText(LABEL_HOST);
+ hostText = new Text(dialogArea, SWT.BORDER);
+ hostText.setLayoutData(gridData);
+
+ Label portLabel = new Label(dialogArea, SWT.NULL);
+ portLabel.setText(LABEL_PORT);
+ portText = new Text(dialogArea, SWT.BORDER);
+ portText.setLayoutData(gridData);
+
+ Label protocolLabel = new Label(dialogArea, SWT.NULL);
+ protocolLabel.setText(LABEL_PROTOCOL);
+
+ protocolCombo = new Combo(dialogArea, SWT.READ_ONLY);
+ protocolCombo.setItems(this.getProcotolsNames());
+ protocolCombo.select(0);
+ updatePortToDefault();
+
+ protocolCombo.addListener(SWT.Selection, new Listener () {
+ public void handleEvent(Event e) {
+ updatePortToDefault();
+ }
+ });
+
+ return dialogArea;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ protected void okPressed() {
+ tool.disconnect();
+ tool.connect(hostText.getText(),
+ new Integer(portText.getText()),
+ this.getProcotolDescriptor(protocolCombo.getText()));
+ super.okPressed();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#cancelPressed()
+ */
+ protected void cancelPressed() {
+ super.cancelPressed();
+ }
+}
diff --git a/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/DialogLogin.java b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/DialogLogin.java
new file mode 100644
index 0000000000..c91a4b59f0
--- /dev/null
+++ b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/DialogLogin.java
@@ -0,0 +1,126 @@
+/********************************************************************************
+ * Copyright (c) 2008 Motorola Inc. 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
+ *
+ * Initial Contributor:
+ * Otavio Ferranti (Motorola)
+ *
+ * Contributors:
+ * {Name} (company) - description of contribution.
+ ********************************************************************************/
+
+package org.eclipse.sequoyah.device.linuxtools.ui;
+
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.sequoyah.device.linuxtools.tools.ITool;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @author Otavio Ferranti
+ */
+public class DialogLogin extends TitleAreaDialog {
+
+ final private String WINDOW_TITLE = Messages.LoginDialog_Window_Title;
+ final private String WINDOW_MESSAGE = Messages.LoginDialog_Window_Message;
+ final private String WINDOW_MESSAGE_LOGIN_INVALID =
+ Messages.LoginDialog_Msg_Login_Invalid;
+ final private String LABEL_USER = Messages.LoginDialog_Label_User;
+ final private String LABEL_PASSWORD = Messages.LoginDialog_Label_Password;
+
+ private Text userText;
+ private Text passwordText;
+
+ private ITool tool;
+ private boolean login_retry = false;
+
+ /**
+ * The constructor.
+ * @param parentShell
+ * @param tool
+ */
+ public DialogLogin(Shell parentShell, ITool tool) {
+ this(parentShell, tool, false);
+ }
+
+ /**
+ * The other constructor.
+ * @param parentShell
+ * @param tool
+ * @param login_retry
+ */
+ public DialogLogin(Shell parentShell, ITool tool, boolean login_retry) {
+ super(parentShell);
+ this.login_retry = login_retry;
+ this.tool = tool;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.TitleAreaDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createDialogArea(Composite parent) {
+ setTitle(WINDOW_TITLE);
+
+ if (login_retry) {
+ setErrorMessage(WINDOW_MESSAGE_LOGIN_INVALID);
+ } else {
+ setMessage(WINDOW_MESSAGE);
+ }
+
+ Composite dialogArea = new Composite(parent, SWT.NONE);
+ GridLayout gridLayout = new GridLayout(2, false);
+
+ gridLayout.marginLeft = 7;
+ gridLayout.marginRight = 7;
+
+ dialogArea.setLayout(gridLayout);
+ dialogArea.setLayoutData(new GridData(GridData.FILL_BOTH));
+ dialogArea.setFont(parent.getFont());
+
+ GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
+
+ Label hostLabel = new Label(dialogArea, SWT.NULL);
+ hostLabel.setText(LABEL_USER);
+ userText = new Text(dialogArea, SWT.BORDER);
+ userText.setLayoutData(gridData);
+
+ Label portLabel = new Label(dialogArea, SWT.NULL);
+ portLabel.setText(LABEL_PASSWORD);
+ passwordText = new Text(dialogArea, SWT.BORDER | SWT.PASSWORD);
+ passwordText.setLayoutData(gridData);
+
+ return dialogArea;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.TitleAreaDialog#getInitialSize()
+ */
+ protected Point getInitialSize() {
+ return super.getInitialSize();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ protected void okPressed() {
+ tool.login(userText.getText(), passwordText.getText());
+ super.okPressed();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#cancelPressed()
+ */
+ protected void cancelPressed() {
+ tool.disconnect();
+ super.cancelPressed();
+ }
+}
diff --git a/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/IToolViewPart.java b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/IToolViewPart.java
new file mode 100644
index 0000000000..bc1acb97ce
--- /dev/null
+++ b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/IToolViewPart.java
@@ -0,0 +1,25 @@
+/********************************************************************************
+ * Copyright (c) 2008 Motorola Inc. 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
+ *
+ * Initial Contributor:
+ * Otavio Ferranti (Motorola)
+ *
+ * Contributors:
+ * {Name} (company) - description of contribution.
+ ********************************************************************************/
+
+package org.eclipse.sequoyah.device.linuxtools.ui;
+
+import org.eclipse.sequoyah.device.linuxtools.tools.ITool;
+import org.eclipse.ui.IViewPart;
+
+/**
+ * @author Otavio Ferranti
+ */
+public interface IToolViewPart extends IViewPart{
+
+ public ITool getTool();
+}
diff --git a/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/Messages.java b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/Messages.java
new file mode 100644
index 0000000000..725c6683d3
--- /dev/null
+++ b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/Messages.java
@@ -0,0 +1,40 @@
+/********************************************************************************
+ * Copyright (c) 2008 Motorola Inc. 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
+ *
+ * Initial Contributor:
+ * Otavio Ferranti (Motorola)
+ *
+ * Contributors:
+ * {Name} (company) - description of contribution.
+ ********************************************************************************/
+
+package org.eclipse.sequoyah.device.linuxtools.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Otavio Ferranti
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.sequoyah.device.linuxtools.ui.messages"; //$NON-NLS-1$
+ public static String LoginDialog_Label_Password;
+ public static String LoginDialog_Label_User;
+ public static String LoginDialog_Msg_Login_Invalid;
+ public static String LoginDialog_Window_Message;
+ public static String LoginDialog_Window_Title;
+ public static String OpenConnectionDialog_Label_Host;
+ public static String OpenConnectionDialog_Label_Port;
+ public static String OpenConnectionDialog_Label_Protocol;
+ public static String OpenConnectionDialog_Window_Message;
+ public static String OpenConnectionDialog_Window_Title;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionConnect.java b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionConnect.java
new file mode 100644
index 0000000000..963cc74d1e
--- /dev/null
+++ b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionConnect.java
@@ -0,0 +1,51 @@
+/********************************************************************************
+ * Copyright (c) 2008 Motorola Inc. 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
+ *
+ * Initial Contributor:
+ * Otavio Ferranti (Motorola)
+ *
+ * Contributors:
+ * {Name} (company) - description of contribution.
+ ********************************************************************************/
+
+package org.eclipse.sequoyah.device.linuxtools.ui;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @author Otavio Ferranti
+ */
+public class ViewActionConnect implements IViewActionDelegate {
+
+ private IViewPart targetPart;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
+ */
+ public void init(IViewPart view) {
+ this.targetPart = view;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ final DialogConnect dialog = new DialogConnect(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ ((IToolViewPart) this.targetPart).getTool());
+ dialog.open();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+}
diff --git a/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionDisconnect.java b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionDisconnect.java
new file mode 100644
index 0000000000..308ff5dc92
--- /dev/null
+++ b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionDisconnect.java
@@ -0,0 +1,52 @@
+/********************************************************************************
+ * Copyright (c) 2008 Motorola Inc. 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
+ *
+ * Initial Contributor:
+ * Otavio Ferranti (Motorola)
+ *
+ * Contributors:
+ * {Name} (company) - description of contribution.
+ ********************************************************************************/
+
+package org.eclipse.sequoyah.device.linuxtools.ui;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.sequoyah.device.linuxtools.tools.ITool;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+
+/**
+ * @author Otavio Ferranti
+ */
+public class ViewActionDisconnect implements IViewActionDelegate {
+
+ private IViewPart targetPart;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
+ */
+ public void init(IViewPart view) {
+ this.targetPart = view;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ IToolViewPart toolView = ((IToolViewPart) this.targetPart);
+ ITool tool =((ITool) toolView.getTool());
+ if (null != tool) {
+ tool.disconnect();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+}
diff --git a/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionPause.java b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionPause.java
new file mode 100644
index 0000000000..3e2a031e8a
--- /dev/null
+++ b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionPause.java
@@ -0,0 +1,54 @@
+/********************************************************************************
+ * Copyright (c) 2008 Motorola Inc. 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
+ *
+ * Initial Contributor:
+ * Otavio Ferranti (Motorola)
+ *
+ * Contributors:
+ * {Name} (company) - description of contribution.
+ ********************************************************************************/
+
+package org.eclipse.sequoyah.device.linuxtools.ui;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.sequoyah.device.linuxtools.tools.ITool;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+
+/**
+ * @author Otavio Ferranti
+ */
+public class ViewActionPause implements IViewActionDelegate {
+
+ private IViewPart targetPart;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
+ */
+ public void init(IViewPart view) {
+ this.targetPart = view;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ IToolViewPart toolView = ((IToolViewPart) this.targetPart);
+ ITool tool = toolView.getTool();
+
+ if (null != tool) {
+ tool.stop();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ // TODO Auto-generated method stub
+ }
+} \ No newline at end of file
diff --git a/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionRefresh.java b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionRefresh.java
new file mode 100644
index 0000000000..15d7822ffa
--- /dev/null
+++ b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionRefresh.java
@@ -0,0 +1,54 @@
+/********************************************************************************
+ * Copyright (c) 2008 Motorola Inc. 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
+ *
+ * Initial Contributor:
+ * Otavio Ferranti (Motorola)
+ *
+ * Contributors:
+ * {Name} (company) - description of contribution.
+ ********************************************************************************/
+
+package org.eclipse.sequoyah.device.linuxtools.ui;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.sequoyah.device.linuxtools.tools.ITool;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+
+/**
+ * @author Otavio Ferranti
+ */
+public class ViewActionRefresh implements IViewActionDelegate {
+
+ private IViewPart targetPart;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
+ */
+ public void init(IViewPart view) {
+ this.targetPart = view;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ IToolViewPart toolView = ((IToolViewPart) this.targetPart);
+ ITool tool = toolView.getTool();
+
+ if (null != tool) {
+ tool.refresh();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ // TODO Auto-generated method stub
+ }
+}
diff --git a/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionRun.java b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionRun.java
new file mode 100644
index 0000000000..28a3e604ef
--- /dev/null
+++ b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/ViewActionRun.java
@@ -0,0 +1,54 @@
+/********************************************************************************
+ * Copyright (c) 2008 Motorola Inc. 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
+ *
+ * Initial Contributor:
+ * Otavio Ferranti (Motorola)
+ *
+ * Contributors:
+ * {Name} (company) - description of contribution.
+ ********************************************************************************/
+
+package org.eclipse.sequoyah.device.linuxtools.ui;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.sequoyah.device.linuxtools.tools.ITool;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+
+/**
+ * @author Otavio Ferranti
+ */
+public class ViewActionRun implements IViewActionDelegate {
+
+ private IViewPart targetPart;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
+ */
+ public void init(IViewPart view) {
+ this.targetPart = view;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ IToolViewPart toolView = ((IToolViewPart) this.targetPart);
+ ITool tool = toolView.getTool();
+
+ if (null != tool) {
+ tool.start();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ // TODO Auto-generated method stub
+ }
+} \ No newline at end of file
diff --git a/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/messages.properties b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/messages.properties
new file mode 100644
index 0000000000..494d38abcb
--- /dev/null
+++ b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/device/linuxtools/ui/messages.properties
@@ -0,0 +1,31 @@
+################################################################################
+# Copyright (c) 2008 Motorola Inc.
+# 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
+#
+# Initial Contributors:
+# Otávio Ferranti (Motorola)
+#
+# Contributors:
+# {Name} (company) - description of contribution.
+################################################################################
+
+# NLS_MESSAGEFORMAT_VAR
+# NLS_ENCODING=UTF-8
+
+OpenConnectionDialog_Window_Title=New connection
+OpenConnectionDialog_Window_Message=Enter values for the connection parameters
+
+OpenConnectionDialog_Label_Host=Host:
+OpenConnectionDialog_Label_Port=Port:
+OpenConnectionDialog_Label_Protocol=Protocol:
+
+LoginDialog_Window_Title=Login
+LoginDialog_Window_Message=Please, enter a valid user and password
+
+LoginDialog_Msg_Login_Invalid=Login failed. Please, enter a valid user and password
+
+LoginDialog_Label_User=User:
+LoginDialog_Label_Password=Password:

Back to the top