From 291cbdbf76470e4b1fb01330da4d109463a2ba6c Mon Sep 17 00:00:00 2001 From: Bernd Hufmann Date: Tue, 10 Apr 2012 13:00:51 -0400 Subject: [PATCH] Add support for importing traces to tracing project --- .../META-INF/MANIFEST.MF | 1 + .../icons/elcl16/import_trace.gif | Bin 0 -> 327 bytes .../plugin.properties | 3 + org.eclipse.linuxtools.lttng2.ui/plugin.xml | 71 ++++ .../lttng2/ui/views/control/Messages.java | 20 + .../dialogs/IImportConfirmationDialog.java | 49 +++ .../views/control/dialogs/IImportDialog.java | 53 +++ .../dialogs/ImportConfirmationDialog.java | 228 ++++++++++ .../views/control/dialogs/ImportDialog.java | 398 ++++++++++++++++++ .../views/control/dialogs/ImportFileInfo.java | 83 ++++ .../dialogs/TraceControlDialogFactory.java | 55 ++- .../views/control/handlers/ImportHandler.java | 205 +++++++++ .../ui/views/control/messages.properties | 20 + 13 files changed, 1181 insertions(+), 5 deletions(-) create mode 100644 org.eclipse.linuxtools.lttng2.ui/icons/elcl16/import_trace.gif create mode 100644 org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/IImportConfirmationDialog.java create mode 100644 org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/IImportDialog.java create mode 100644 org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ImportConfirmationDialog.java create mode 100644 org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ImportDialog.java create mode 100644 org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ImportFileInfo.java create mode 100644 org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/handlers/ImportHandler.java diff --git a/org.eclipse.linuxtools.lttng2.ui/META-INF/MANIFEST.MF b/org.eclipse.linuxtools.lttng2.ui/META-INF/MANIFEST.MF index ef33b22fec..15feda3e9e 100644 --- a/org.eclipse.linuxtools.lttng2.ui/META-INF/MANIFEST.MF +++ b/org.eclipse.linuxtools.lttng2.ui/META-INF/MANIFEST.MF @@ -14,6 +14,7 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.7.0", org.eclipse.core.filesystem;bundle-version="1.3.100", org.eclipse.core.runtime;bundle-version="3.7.0", org.eclipse.linuxtools.lttng2.core;bundle-version="0.1.0", + org.eclipse.linuxtools.tmf.core;bundle-version="0.5.0", org.eclipse.linuxtools.tmf.ui;bundle-version="0.5.0", org.eclipse.rse.core;bundle-version="3.2.0", org.eclipse.rse.services;bundle-version="3.2.100", diff --git a/org.eclipse.linuxtools.lttng2.ui/icons/elcl16/import_trace.gif b/org.eclipse.linuxtools.lttng2.ui/icons/elcl16/import_trace.gif new file mode 100644 index 0000000000000000000000000000000000000000..d38085ad9c273000d1c7ef3ea0144de87b776e46 GIT binary patch literal 327 zcmZ?wbhEHb6krfwxXQp_Z$IBYetux?yuh5fA^8gfa_0sYEDX$@8&R?(qGWMI>Eg)J z#W5Aj<7-wY)UHmhUz<|DHmzxW>%y~b3(wBod@a6qb$sorkr;FE?8n*u-Kt|Id9CY|Ns9p&;Tg@WMO1rP-f5pnGNz216#_0i3J`yQvJsm zgg7JQrk+bO_7dTAKGtDoB+_bkXzjJf5992w1-8iStkCP%_Lx#5y6_`@wFT09~= wevLfb(wrPzoISn09c+@45|YAGBqXFHg(kDGv$8VHpTB^88S}Cb7e@wb0E(nwr~m)} literal 0 HcmV?d00001 diff --git a/org.eclipse.linuxtools.lttng2.ui/plugin.properties b/org.eclipse.linuxtools.lttng2.ui/plugin.properties index 231557ac67..c309391167 100644 --- a/org.eclipse.linuxtools.lttng2.ui/plugin.properties +++ b/org.eclipse.linuxtools.lttng2.ui/plugin.properties @@ -121,3 +121,6 @@ commands.control.disable.event.description=Disable Event commands.control.add.context=Add Context commands.control.add.context.description=Add Context to Channel(s) and/or Event(s) + +commands.control.import=Import +commands.control.import.description=Import Traces to LTTng Project diff --git a/org.eclipse.linuxtools.lttng2.ui/plugin.xml b/org.eclipse.linuxtools.lttng2.ui/plugin.xml index e332ce4a8a..772b20ebba 100644 --- a/org.eclipse.linuxtools.lttng2.ui/plugin.xml +++ b/org.eclipse.linuxtools.lttng2.ui/plugin.xml @@ -78,6 +78,12 @@ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.destroySession" name="%commands.control.destroy.session"> + + + + + + @@ -230,6 +244,16 @@ label="%commands.control.destroy.session" style="push"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/Messages.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/Messages.java index ea48be8efb..a89ed0cb7b 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/Messages.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/Messages.java @@ -47,6 +47,8 @@ final public class Messages extends NLS { public static String TraceControl_DestroySessionJob; public static String TraceControl_DestroyConfirmationTitle; public static String TraceControl_DestroyConfirmationMessage; + + public static String TraceControl_ImportJob; public static String TraceControl_StartSessionJob; public static String TraceControl_StopSessionJob; @@ -139,7 +141,25 @@ final public class Messages extends NLS { public static String TraceControl_AddContextAvailableContextsLabel; public static String TraceControl_AddContextAvailableContextsTooltip; public static String TraceControl_AddContextAllLabel; + + public static String TraceControl_ImportDialogTitle; + public static String TraceControl_ImportDialogTracesGroupName; + public static String TraceControl_ImportDialogTracesTooltip; + public static String TraceControl_ImportDialogProjectsGroupName; + public static String TraceControl_ImportDialogProjectsTooltip; + public static String TraceControl_ImportDialogOverwriteButtonText; + public static String TraceControl_ImportDialogCreationError; + public static String TraceControl_ImportDialogNoProjectSelectedError; + public static String TraceControl_ImportDialogInvalidTracingProject; + public static String TraceControl_ImportDialogNoTraceSelectedError; + public static String TraceControl_ImportDialogConfirmationTitle; + public static String TraceControl_ImportDialogConfirmationOverwriteLabel; + public static String TraceControl_ImportDialogConfirmationRenameLabel; + public static String TraceControl_ImportDialogConfirmationNewNameLabel; + public static String TraceControl_InvalidTraceNameError; + public static String TraceControl_ImportDialogTraceAlreadyExistError; + // Tree structure strings public static String TraceControl_KernelDomainDisplayName; public static String TraceControl_UstDisplayName; diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/IImportConfirmationDialog.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/IImportConfirmationDialog.java new file mode 100644 index 0000000000..08906fe921 --- /dev/null +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/IImportConfirmationDialog.java @@ -0,0 +1,49 @@ +/********************************************************************** + * Copyright (c) 2012 Ericsson + * + * 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: + * Bernd Hufmann - Initial API and implementation + **********************************************************************/ +package org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs; + + +/** + * IImportConfirmationDialog + *

+ * Interface for dialog box for updating file import information. + *

+ */ +public interface IImportConfirmationDialog { + + // ------------------------------------------------------------------------ + // Accessors + // ------------------------------------------------------------------------ + /** + * @param name old trace name. + */ + public void setTraceName(String name); + + /** + * @return the new trace name if not overwrite. + */ + public String getNewTraceName(); + + /** + * + * @return true to overwrite existing trace. + */ + public boolean isOverwrite(); + + // ------------------------------------------------------------------------ + // Operations + // ------------------------------------------------------------------------ + /** + * @return the open return value + */ + int open(); +} diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/IImportDialog.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/IImportDialog.java new file mode 100644 index 0000000000..66c7ea7602 --- /dev/null +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/IImportDialog.java @@ -0,0 +1,53 @@ +/********************************************************************** + * Copyright (c) 2012 Ericsson + * + * 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: + * Bernd Hufmann - Initial API and implementation + **********************************************************************/ +package org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs; + +import java.util.List; + +import org.eclipse.core.resources.IProject; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent; + +/** + * IImportDialog + *

+ * Interface for import traces dialog. + *

+ */ +public interface IImportDialog { + + // ------------------------------------------------------------------------ + // Accessors + // ------------------------------------------------------------------------ + /** + * @return a list of trace paths to import. + */ + public List getTracePathes(); + + /** + * @return the project to import the traces to + */ + public IProject getProject(); + + /** + * Sets the session containing the traces to import + * @param session + */ + public void setSession(TraceSessionComponent session); + + // ------------------------------------------------------------------------ + // Operations + // ------------------------------------------------------------------------ + /** + * @return the open return value + */ + int open(); +} diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ImportConfirmationDialog.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ImportConfirmationDialog.java new file mode 100644 index 0000000000..3d55c59d20 --- /dev/null +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ImportConfirmationDialog.java @@ -0,0 +1,228 @@ +/********************************************************************** + * Copyright (c) 2012 Ericsson + * + * 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: + * Bernd Hufmann - Initial API and implementation + **********************************************************************/ +package org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs; + +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.linuxtools.internal.lttng2.ui.Activator; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.Messages; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +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.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; + +/** + * CreateSessionDialog + *

+ * Dialog box for collecting session creation information. + *

+ */ +public class ImportConfirmationDialog extends Dialog implements IImportConfirmationDialog { + + // ------------------------------------------------------------------------ + // Constants + // ------------------------------------------------------------------------ + /** + * The icon file for this dialog box. + */ + public static final String IMPORT_ICON_FILE = "icons/elcl16/import_trace.gif"; //$NON-NLS-1$ + + // ------------------------------------------------------------------------ + // Attributes + // ------------------------------------------------------------------------ + /** + * The dialog composite. + */ + private Composite fDialogComposite = null; + /** + * The radio button for selecting the overwrite action + */ + private Button fOverwriteButton = null; + /** + * The radio button for selecting the renaming action + */ + private Button fRenameButton = null; + /** + * The text widget for the session name + */ + private Text fNewTraceNameText = null; + /** + * The trace name which already exists in the project + */ + private String fTraceName = null; + /** + * The session name string. + */ + private String fNewTraceName = null; + /** + * Flag whether default location (path) shall be used or not + */ + private boolean fIsOverride = true; + + // ------------------------------------------------------------------------ + // Constructors + // ------------------------------------------------------------------------ + /** + * Constructor + * @param shell - a shell for the display of the dialog + */ + public ImportConfirmationDialog(Shell shell) { + super(shell); + setShellStyle(SWT.RESIZE); + } + + // ------------------------------------------------------------------------ + // Accessors + // ------------------------------------------------------------------------ + /* + * (non-Javadoc) + * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IImportConfirmationDialog#setTraceName(java.lang.String) + */ + @Override + public void setTraceName(String name) { + fTraceName = name; + } + + /* + * (non-Javadoc) + * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IImportConfirmationDialog#getNewTraceName() + */ + @Override + public String getNewTraceName() { + return fNewTraceName; + } + + /* + * (non-Javadoc) + * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IImportConfirmationDialog#isOverwrite() + */ + @Override + public boolean isOverwrite() { + return fIsOverride; + } + + // ------------------------------------------------------------------------ + // Operations + // ------------------------------------------------------------------------ + /* + * (non-Javadoc) + * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell) + */ + @Override + protected void configureShell(Shell newShell) { + super.configureShell(newShell); + newShell.setText(Messages.TraceControl_ImportDialogConfirmationTitle); + newShell.setImage(Activator.getDefault().loadIcon(IMPORT_ICON_FILE)); + } + + /* + * (non-Javadoc) + * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite) + */ + @Override + protected Control createDialogArea(Composite parent) { + + // Main dialog panel + fDialogComposite = new Composite(parent, SWT.NONE); + GridLayout layout = new GridLayout(1, true); + fDialogComposite.setLayout(layout); + fDialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); + + Label sessionNameLabel = new Label(fDialogComposite, SWT.RIGHT); + sessionNameLabel.setText(Messages.TraceControl_ImportDialogTraceAlreadyExistError + ": " + fTraceName); //$NON-NLS-1$ + + fOverwriteButton = new Button(fDialogComposite, SWT.RADIO); + fOverwriteButton.setText(Messages.TraceControl_ImportDialogConfirmationOverwriteLabel); + + fOverwriteButton.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + fNewTraceNameText.setEnabled(false); + fNewTraceNameText.setText(fTraceName); + } + }); + + fRenameButton = new Button(fDialogComposite, SWT.RADIO); + fRenameButton.setText(Messages.TraceControl_ImportDialogConfirmationRenameLabel); + + fRenameButton.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + fNewTraceNameText.setEnabled(true); + } + }); + + fNewTraceNameText = new Text(fDialogComposite, SWT.NONE); + fNewTraceNameText.setToolTipText(Messages.TraceControl_ImportDialogConfirmationNewNameLabel); + fNewTraceNameText.setText(fTraceName); + + // Default + fOverwriteButton.setSelection(true); + fNewTraceNameText.setEnabled(false); + + + // layout widgets + GridData data = new GridData(GridData.FILL_HORIZONTAL); + + fNewTraceNameText.setLayoutData(data); + + getShell().setMinimumSize(new Point(300, 150)); + + return fDialogComposite; + } + + /* + * (non-Javadoc) + * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite) + */ + @Override + protected void createButtonsForButtonBar(Composite parent) { + createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$ + } + + /* + * (non-Javadoc) + * @see org.eclipse.jface.dialogs.Dialog#okPressed() + */ + @Override + protected void okPressed() { + + fIsOverride = fOverwriteButton.getSelection(); + + if (fIsOverride) { + // new name is old name + fNewTraceName = fTraceName; + } else { + fNewTraceName = fNewTraceNameText.getText(); + } + + // Check for invalid names + if (!fNewTraceName.matches("^[a-zA-Z0-9\\-\\_]{1,}$")) { //$NON-NLS-1$ + MessageDialog.openError(getShell(), + Messages.TraceControl_ImportDialogConfirmationTitle, + Messages.TraceControl_InvalidTraceNameError + " (" + fNewTraceName + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$ + return; + } + + // validation successful -> call super.okPressed() + super.okPressed(); + } +} diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ImportDialog.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ImportDialog.java new file mode 100644 index 0000000000..053e7915a2 --- /dev/null +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ImportDialog.java @@ -0,0 +1,398 @@ +/********************************************************************** + * Copyright (c) 2012 Ericsson + * + * 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: + * Bernd Hufmann - Initial API and implementation + **********************************************************************/ +package org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.CheckStateChangedEvent; +import org.eclipse.jface.viewers.CheckboxTreeViewer; +import org.eclipse.jface.viewers.ICheckStateListener; +import org.eclipse.jface.window.Window; +import org.eclipse.linuxtools.internal.lttng2.ui.Activator; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.Messages; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.remote.IRemoteSystemProxy; +import org.eclipse.linuxtools.tmf.core.TmfProjectNature; +import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceFolder; +import org.eclipse.rse.services.clientserver.messages.SystemMessageException; +import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem; +import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.CCombo; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; +import org.eclipse.swt.widgets.Tree; +import org.eclipse.ui.model.WorkbenchContentProvider; +import org.eclipse.ui.model.WorkbenchLabelProvider; + +/** + * ImportDialog + *

+ * Dialog box for collecting trace import information. + *

+ */ +public class ImportDialog extends Dialog implements IImportDialog { + + // ------------------------------------------------------------------------ + // Constants + // ------------------------------------------------------------------------ + /** + * The icon file for this dialog box. + */ + public static final String IMPORT_ICON_FILE = "icons/elcl16/import_trace.gif"; //$NON-NLS-1$ + + public static final String UST_PARENT_DIRECTORY = "ust"; //$NON-NLS-1$ + + // ------------------------------------------------------------------------ + // Attributes + // ------------------------------------------------------------------------ + /** + * The dialog composite. + */ + private Composite fDialogComposite = null; + /** + * The checkbox tree viewer for selecting available traces + */ + private CheckboxTreeViewer fFolderViewer; + /** + * The combo box for selecting a project. + */ + private CCombo fCombo; + /** + * The overwrite button + */ + private Button fOverwriteButton; + /** + * List of available LTTng 2.0 projects + */ + private List fProjects; + /** + * The parent where the new node should be added. + */ + private TraceSessionComponent fSession = null; + /** + * List of traces to import + */ + private List fTraces = new ArrayList(); + /** + * Selection index in project combo box. + */ + private int fProjectIndex; + /** + * Flag to indicate that something went wrong when creating the dialog box. + */ + private boolean fIsError = false; + + // ------------------------------------------------------------------------ + // Constructors + // ------------------------------------------------------------------------ + /** + * Constructor + * @param shell - a shell for the display of the dialog + */ + public ImportDialog(Shell shell) { + super(shell); + setShellStyle(SWT.RESIZE); + } + + // ------------------------------------------------------------------------ + // Accessors + // ------------------------------------------------------------------------ + /* + * (non-Javadoc) + * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IImportDialog#getTracePathes() + */ + @Override + public List getTracePathes() { + List retList = new ArrayList(); + retList.addAll(fTraces); + return retList; + } + + /* + * (non-Javadoc) + * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IImportDialog#getProject() + */ + @Override + public IProject getProject() { + return fProjects.get(fProjectIndex); + } + + /* + * (non-Javadoc) + * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IImportDialog#setSession(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent) + */ + @Override + public void setSession(TraceSessionComponent session) { + fSession = session; + } + + // ------------------------------------------------------------------------ + // Operations + // ------------------------------------------------------------------------ + /* + * (non-Javadoc) + * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell) + */ + @Override + protected void configureShell(Shell newShell) { + super.configureShell(newShell); + newShell.setText(Messages.TraceControl_ImportDialogTitle); + newShell.setImage(Activator.getDefault().loadIcon(IMPORT_ICON_FILE)); + } + + /* + * (non-Javadoc) + * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite) + */ + @Override + protected Control createDialogArea(Composite parent) { + + // Main dialog panel + fDialogComposite = new Composite(parent, SWT.NONE); + GridLayout layout = new GridLayout(1, true); + fDialogComposite.setLayout(layout); + fDialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); + + Group contextGroup = new Group(fDialogComposite, SWT.SHADOW_NONE); + contextGroup.setText(Messages.TraceControl_ImportDialogTracesGroupName); + layout = new GridLayout(1, true); + contextGroup.setLayout(layout); + contextGroup.setLayoutData(new GridData(GridData.FILL_BOTH)); + + IRemoteSystemProxy proxy = fSession.getTargetNode().getRemoteSystemProxy(); + + IFileServiceSubSystem fsss = proxy.getFileServiceSubSystem(); + + try { + IRemoteFile remoteFolder = fsss.getRemoteFileObject(fSession.getSessionPath(), new NullProgressMonitor()); + + fFolderViewer = new CheckboxTreeViewer(contextGroup, SWT.BORDER); + GridData data = new GridData(GridData.FILL_BOTH); + Tree tree = fFolderViewer.getTree(); + tree.setLayoutData(data); + tree.setFont(parent.getFont()); + tree.setToolTipText(Messages.TraceControl_ImportDialogTracesTooltip); + + fFolderViewer.setContentProvider(new FolderContentProvider()); + fFolderViewer.setLabelProvider(new WorkbenchLabelProvider()); + + fFolderViewer.addCheckStateListener(new ICheckStateListener() { + @Override + public void checkStateChanged(CheckStateChangedEvent event) { + Object elem = event.getElement(); + if (elem instanceof IRemoteFile) { + IRemoteFile element = (IRemoteFile) elem; + if (!element.isDirectory()) { + // A trick to keep selection of a file in sync with the directory + boolean p = fFolderViewer.getChecked((element.getParentRemoteFile())); + fFolderViewer.setChecked(element, p); + return; + } + fFolderViewer.setSubtreeChecked(event.getElement(), event.getChecked()); + if (!event.getChecked()) { + fFolderViewer.setChecked(element.getParentRemoteFile(), false); + } + } + } + }); + fFolderViewer.setInput(remoteFolder); + + Group projectGroup = new Group(fDialogComposite, SWT.SHADOW_NONE); + projectGroup.setText(Messages.TraceControl_ImportDialogProjectsGroupName); + layout = new GridLayout(1, true); + projectGroup.setLayout(layout); + projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + + fProjects = new ArrayList(); + List projectNames = new ArrayList(); + for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) { + try { + if (project.isOpen() && project.hasNature(TmfProjectNature.ID)) { + fProjects.add(project); + projectNames.add(project.getName()); + } + } catch (CoreException e) { + createErrorComposite(parent, e.fillInStackTrace()); + return fDialogComposite; + } + } + + fCombo = new CCombo(projectGroup, SWT.READ_ONLY); + fCombo.setToolTipText(Messages.TraceControl_ImportDialogProjectsTooltip); + fCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 1, 1)); + fCombo.setItems(projectNames.toArray(new String[projectNames.size()])); + + Group overrideGroup = new Group(fDialogComposite, SWT.SHADOW_NONE); + layout = new GridLayout(1, true); + overrideGroup.setLayout(layout); + overrideGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + + fOverwriteButton = new Button(overrideGroup, SWT.CHECK); + fOverwriteButton.setText(Messages.TraceControl_ImportDialogOverwriteButtonText); + + getShell().setMinimumSize(new Point(500, 400)); + + + } catch (SystemMessageException e) { + createErrorComposite(parent, e.fillInStackTrace()); + return fDialogComposite; + } + + return fDialogComposite; + } + + /* + * (non-Javadoc) + * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite) + */ + @Override + protected void createButtonsForButtonBar(Composite parent) { + createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$ + } + + /* + * (non-Javadoc) + * @see org.eclipse.jface.dialogs.Dialog#okPressed() + */ + @Override + protected void okPressed() { + if (!fIsError) { + // Validate input data + fTraces.clear(); + + fProjectIndex = fCombo.getSelectionIndex(); + + if (fProjectIndex < 0) { + MessageDialog.openError(getShell(), + Messages.TraceControl_ImportDialogTitle, + Messages.TraceControl_ImportDialogNoProjectSelectedError); + return; + } + + IProject project = fProjects.get(fProjectIndex); + IFolder traceFolder = project.getFolder(TmfTraceFolder.TRACE_FOLDER_NAME); + + if (!traceFolder.exists()) { + // Invalid LTTng 2.0 project + MessageDialog.openError(getShell(), + Messages.TraceControl_ImportDialogTitle, + Messages.TraceControl_ImportDialogInvalidTracingProject + " (" + TmfTraceFolder.TRACE_FOLDER_NAME + ")"); //$NON-NLS-1$//$NON-NLS-2$ + return; + } + + boolean overwriteAll = fOverwriteButton.getSelection(); + + Object[] checked = fFolderViewer.getCheckedElements(); + for (int i = 0; i < checked.length; i++) { + IRemoteFile file = (IRemoteFile) checked[i]; + + // Only add actual trace directories + if (file.isDirectory() && !UST_PARENT_DIRECTORY.equals(file.getName())) { + + ImportFileInfo info = new ImportFileInfo(file, file.getName(), overwriteAll); + String traceName = info.getLocalTraceName(); + IFolder folder = traceFolder.getFolder(traceName); + + // Verify if trace directory already exists (and not overwrite) + if (folder.exists() && !overwriteAll) { + + // Ask user for overwrite or new name + IImportConfirmationDialog conf = TraceControlDialogFactory.getInstance().getImportConfirmationDialog(); + conf.setTraceName(traceName); + + // Don't add trace to list if dialog was cancelled. + if (conf.open() == Window.OK) { + info.setOverwrite(conf.isOverwrite()); + if (!conf.isOverwrite()) { + info.setLocalTraceName(conf.getNewTraceName()); + } + fTraces.add(info); + } + } else { + fTraces.add(info); + } + } + } + + if (fTraces.isEmpty()) { + MessageDialog.openError(getShell(), + Messages.TraceControl_ImportDialogTitle, + Messages.TraceControl_ImportDialogNoTraceSelectedError); + return; + } + } + + // validation successful -> call super.okPressed() + super.okPressed(); + } + + // ------------------------------------------------------------------------ + // Helper methods and classes + // ------------------------------------------------------------------------ + public class FolderContentProvider extends WorkbenchContentProvider { + @Override + public Object[] getChildren(Object o) { + if (o instanceof IRemoteFile) { + IRemoteFile element = (IRemoteFile) o; + // For our purpose, we need folders + files + if (!element.isDirectory()) { + return new Object[0]; + } + } + return super.getChildren(o); + } + } + + /** + * Creates a dialog composite with an error message which can be used + * when an exception occurred during creation time of the dialog box. + * @param parent - a parent composite + * @param e - a error causing exception + */ + private void createErrorComposite(Composite parent, Throwable e) { + fIsError = true; + fDialogComposite.dispose(); + + fDialogComposite = new Composite(parent, SWT.NONE); + GridLayout layout = new GridLayout(1, true); + fDialogComposite.setLayout(layout); + fDialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); + + Text errorText = new Text(fDialogComposite, SWT.MULTI); + StringBuffer error = new StringBuffer(); + error.append(Messages.TraceControl_ImportDialogCreationError); + error.append(System.getProperty("line.separator")); //$NON-NLS-1$ + error.append(System.getProperty("line.separator")); //$NON-NLS-1$ + error.append(e.toString()); + errorText.setText(error.toString()); + errorText.setLayoutData(new GridData(GridData.FILL_BOTH)); + } + + + } diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ImportFileInfo.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ImportFileInfo.java new file mode 100644 index 0000000000..24bae8d489 --- /dev/null +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/ImportFileInfo.java @@ -0,0 +1,83 @@ +/********************************************************************** + * Copyright (c) 2012 Ericsson + * + * 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: + * Bernd Hufmann - Initial API and implementation + **********************************************************************/ +package org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs; + +import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; + +/** + * ImportFileInfo + *

+ * Helper class for storing information about a remote file to import. + *

+ */ +public class ImportFileInfo { + + // ------------------------------------------------------------------------ + // Attributes + // ------------------------------------------------------------------------ + private IRemoteFile fRemoteFile; + private String fLocalTraceName; + private boolean fIsOverwrite; + + // ------------------------------------------------------------------------ + // Constructors + // ------------------------------------------------------------------------ + public ImportFileInfo(IRemoteFile file, String traceName, boolean isOverwrite) { + fRemoteFile = file; + fLocalTraceName = traceName; + fIsOverwrite = isOverwrite; + } + + // ------------------------------------------------------------------------ + // Accessors + // ------------------------------------------------------------------------ + /** + * @return name of traces after importing + */ + public String getLocalTraceName() { + return fLocalTraceName; + } + /** + * Sets the local trace name + * @param importTraceName - local name of trace to set (name after importing) + */ + public void setLocalTraceName(String importTraceName) { + this.fLocalTraceName = importTraceName; + } + /** + * @return true if local trace should be overwritten if a trace with the same name already exists. + */ + public boolean isOverwrite() { + return fIsOverwrite; + } + /** + * Sets the overwrite flag. + * @param isOverwrite + */ + public void setOverwrite(boolean isOverwrite) { + this.fIsOverwrite = isOverwrite; + } + /** + * @return the remote file implementation. + */ + public IRemoteFile getImportFile() { + return fRemoteFile; + } + /** + * Sets the remote file implementation + * @param the remote file implementation. + */ + public void setRemoteFile(IRemoteFile remoteFile) { + fRemoteFile = remoteFile; + } +} + diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/TraceControlDialogFactory.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/TraceControlDialogFactory.java index 3af2ce8d6a..695a0f7ca8 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/TraceControlDialogFactory.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/TraceControlDialogFactory.java @@ -40,14 +40,24 @@ final public class TraceControlDialogFactory { private IGetEventInfoDialog fGetEventInfoDialog; /** - * The confirmation dialog implementation + * The confirmation dialog implementation. */ private IConfirmDialog fConfirmDialog; /** - * The add context dialog implementation + * The add context dialog implementation. */ private IAddContextDialog fAddContextDialog; + + /** + * The import dialog implementation. + */ + private IImportDialog fImportDialog; + + /** + * The import confirmation dialog. + */ + private IImportConfirmationDialog fImportConfirmationDialog; // ------------------------------------------------------------------------ // Constructors @@ -175,7 +185,7 @@ final public class TraceControlDialogFactory { /** * Sets the confirmation dialog implementation - * @param confirmDialog + * @param confirmDialog - a confirmation dialog implementation */ public void setConfirmDialog(IConfirmDialog confirmDialog) { fConfirmDialog = confirmDialog; @@ -193,11 +203,46 @@ final public class TraceControlDialogFactory { /** * Sets the add context dialog information - * @param addContextDialog + * @param addContextDialog - a add context dialog implementation */ public void setAddContextDialog(IAddContextDialog addContextDialog) { fAddContextDialog = addContextDialog; } + + /** + * @return the import dialog implementation + */ + public IImportDialog getImportDialog() { + if (fImportDialog == null) { + fImportDialog = new ImportDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()); + } + return fImportDialog; + } + + /** + * Sets the import dialog implementation. + * @param importDialog - a import dialog implementation + */ + public void setImportDialog(IImportDialog importDialog) { + fImportDialog = importDialog; + } + + /** + * @return the import confirmation dialog implementation. + */ + public IImportConfirmationDialog getImportConfirmationDialog() { + if (fImportConfirmationDialog == null) { + fImportConfirmationDialog = new ImportConfirmationDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()); + } + return fImportConfirmationDialog; + } + + /** + * Sets the import confirmation dialog implementation. + * @param confirmDialog - a import confirmation dialog implementation. + */ + public void setImportConfirmationDialog(IImportConfirmationDialog confirmDialog) { + fImportConfirmationDialog = confirmDialog; + } } - diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/handlers/ImportHandler.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/handlers/ImportHandler.java new file mode 100644 index 0000000000..81845b6af0 --- /dev/null +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/handlers/ImportHandler.java @@ -0,0 +1,205 @@ +/********************************************************************** + * Copyright (c) 2012 Ericsson + * + * 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: + * Bernd Hufmann - Initial API and implementation + **********************************************************************/ +package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers; + +import java.util.Iterator; +import java.util.List; + +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.window.Window; +import org.eclipse.linuxtools.internal.lttng2.ui.Activator; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.ControlView; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.Messages; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.ImportFileInfo; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IImportDialog; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.TraceControlDialogFactory; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.TraceSessionState; +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent; +import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceFolder; +import org.eclipse.rse.services.clientserver.messages.SystemMessageException; +import org.eclipse.rse.services.files.IFileService; +import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; +import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; + +/** + * ImportHandler + *

+ * Command handler implementation to import traces from a (remote) session to a tracing project. + *

+ */ +public class ImportHandler extends BaseControlViewHandler { + + // ------------------------------------------------------------------------ + // Attributes + // ------------------------------------------------------------------------ + protected CommandParameter fParam; + + // ------------------------------------------------------------------------ + // Accessors + // ------------------------------------------------------------------------ + + // ------------------------------------------------------------------------ + // Operations + // ------------------------------------------------------------------------ + + /* + * (non-Javadoc) + * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent) + */ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + + IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + + if (window == null) { + return false; + } + + fLock.lock(); + try { + final CommandParameter param = fParam.clone(); + + final IImportDialog dialog = TraceControlDialogFactory.getInstance().getImportDialog(); + dialog.setSession(param.getSession()); + + if (dialog.open() != Window.OK) { + return null; + } + + Job job = new Job(Messages.TraceControl_ImportJob) { + @Override + protected IStatus run(IProgressMonitor monitor) { + try { + List traces = dialog.getTracePathes(); + IProject project = dialog.getProject(); + + for (Iterator iterator = traces.iterator(); iterator.hasNext();) { + ImportFileInfo remoteFile = (ImportFileInfo) iterator.next(); + downloadTrace(remoteFile, project); + } + + } catch (ExecutionException e) { + return new Status(Status.ERROR, Activator.PLUGIN_ID, e.toString()); + } + return Status.OK_STATUS; + } + }; + job.setUser(true); + job.schedule(); + } finally { + fLock.unlock(); + } + return null; + } + + /* + * (non-Javadoc) + * @see org.eclipse.core.commands.AbstractHandler#isEnabled() + */ + @Override + public boolean isEnabled() { + // Get workbench page for the Control View + IWorkbenchPage page = getWorkbenchPage(); + if (page == null) { + return false; + } + + // Check if one or more session are selected + ISelection selection = page.getSelection(ControlView.ID); + TraceSessionComponent session = null; + if (selection instanceof StructuredSelection) { + StructuredSelection structered = ((StructuredSelection) selection); + for (Iterator iterator = structered.iterator(); iterator.hasNext();) { + Object element = (Object) iterator.next(); + if (element instanceof TraceSessionComponent) { + // Add only TraceSessionComponents that are inactive and not destroyed + TraceSessionComponent tmpSession = (TraceSessionComponent) element; + if ((tmpSession.getSessionState() == TraceSessionState.INACTIVE) && (!tmpSession.isDestroyed())) { + session = tmpSession; + } + } + } + } + boolean isEnabled = session != null; + + fLock.lock(); + try { + fParam = null; + if (isEnabled) { + fParam = new CommandParameter(session); + } + } finally { + fLock.unlock(); + } + return isEnabled; + } + + // ------------------------------------------------------------------------ + // Helper methods + // ------------------------------------------------------------------------ + /** + * Downloads a trace from the remote host to the given project. + * @param trace - trace information of trace to import + * @param project - project to import to + * @throws ExecutionException + */ + private void downloadTrace(ImportFileInfo trace, IProject project) throws ExecutionException { + try { + IRemoteFileSubSystem fsss = trace.getImportFile().getParentRemoteFileSubSystem(); + + IFolder traceFolder = project.getFolder(TmfTraceFolder.TRACE_FOLDER_NAME); + if (!traceFolder.exists()) { + throw new ExecutionException(Messages.TraceControl_ImportDialogInvalidTracingProject + " (" + TmfTraceFolder.TRACE_FOLDER_NAME + ")"); //$NON-NLS-1$//$NON-NLS-2$ + } + + String traceName = trace.getLocalTraceName(); + IFolder folder = traceFolder.getFolder(traceName); + if (folder.exists()) { + if(!trace.isOverwrite()) { + throw new ExecutionException(Messages.TraceControl_ImportDialogTraceAlreadyExistError + ": " + traceName); //$NON-NLS-1$ + } + } else { + folder.create(true, true, null); + } + + IRemoteFile[] sources = fsss.list(trace.getImportFile(), IFileService.FILE_TYPE_FILES, new NullProgressMonitor()); + + String[] destinations = new String[sources.length]; + String[] encodings = new String[sources.length]; + for (int i = 0; i < sources.length; i++) { + destinations[i] = folder.getLocation().addTrailingSeparator().append(sources[i].getName()).toString(); + encodings[i] = null; + } + + fsss.downloadMultiple(sources, destinations, encodings, new NullProgressMonitor()); + + } catch (SystemMessageException e) { + throw new ExecutionException(e.fillInStackTrace().toString()); + } catch (CoreException e) { + throw new ExecutionException(e.fillInStackTrace().toString()); + } + } +} diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/messages.properties b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/messages.properties index 3065622daa..22b1e8a2da 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/messages.properties +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/messages.properties @@ -21,6 +21,8 @@ TraceControl_DestroySessionJob=Destroying Session... TraceControl_DestroyConfirmationTitle=Destroy Confirmation TraceControl_DestroyConfirmationMessage=Do you want to delete all selected sessions? +TraceControl_ImportJob=Importing Traces... + TraceControl_StartSessionJob=Starting Session... TraceControl_StopSessionJob=Stopping Session... @@ -113,6 +115,24 @@ TraceControl_AddContextAvailableContextsLabel=Contexts TraceControl_AddContextAvailableContextsTooltip=Available Contexts TraceControl_AddContextAllLabel=All Contexts +TraceControl_ImportDialogTitle=Import Traces +TraceControl_ImportDialogTracesGroupName=Available Traces +TraceControl_ImportDialogTracesTooltip=The available traces of current session to import +TraceControl_ImportDialogProjectsGroupName=Available Projects +TraceControl_ImportDialogProjectsTooltip=The available projects to select from +TraceControl_ImportDialogOverwriteButtonText=Overwrite existing trace without warning +TraceControl_ImportDialogCreationError=Dialog box cannot be created +TraceControl_ImportDialogNoProjectSelectedError=No tracing project selected or available +TraceControl_ImportDialogInvalidTracingProject=Invalid tracing project. Missing directory +TraceControl_ImportDialogNoTraceSelectedError=No trace selected or available + +TraceControl_ImportDialogConfirmationTitle=Import Confirmation Dialog +TraceControl_ImportDialogConfirmationOverwriteLabel=Overwrite +TraceControl_ImportDialogConfirmationRenameLabel=Rename +TraceControl_ImportDialogConfirmationNewNameLabel=New Trace Name +TraceControl_InvalidTraceNameError=Invalid trace name +TraceControl_ImportDialogTraceAlreadyExistError=Trace already exists in project + # Tree structure strings TraceControl_KernelDomainDisplayName=Kernel TraceControl_UstGlobalDomainDisplayName=UST global -- 2.34.1