diff options
Diffstat (limited to 'profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse')
6 files changed, 185 insertions, 0 deletions
diff --git a/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/TimeConstants.java b/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/TimeConstants.java new file mode 100644 index 0000000000..90551a2baf --- /dev/null +++ b/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/TimeConstants.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright (c) 2012 Red Hat, 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 + * + * Contributors: + * Red Hat initial API and implementation + *******************************************************************************/ +package org.eclipse.linuxtools.profiling.time; + +/** + * The activator class controls the plug-in life cycle + */ +public class TimeConstants { + + /** + * Plug-in name + */ + public static final String PLUGIN_NAME = "Time"; //$NON-NLS-1$ + + /** + * Plug-in id + */ + public static final String PLUGIN_ID = "org.eclipse.linuxtools.profiling.time"; //$NON-NLS-1$ + + /** + * Plug-in id of snapshot launch configuration type + */ + public static final String PLUGIN_CONFIG_ID = "org.eclipse.linuxtools.profiling.time.launchConfigurationType"; //$NON-NLS-1$ + + /** + * Type of profiling this plug-in supports + */ + public static final String PROFILING_TYPE = "time"; //$NON-NLS-1$ +} diff --git a/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/TimeLaunchConfigurationTabGroup.java b/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/TimeLaunchConfigurationTabGroup.java new file mode 100644 index 0000000000..1a312a723c --- /dev/null +++ b/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/TimeLaunchConfigurationTabGroup.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright (c) 2012 Red Hat, 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 + * + * Contributors: + * Red Hat initial API and implementation + *******************************************************************************/ +package org.eclipse.linuxtools.profiling.time; + +import java.util.ArrayList; + +import org.eclipse.debug.ui.AbstractLaunchConfigurationTab; +import org.eclipse.linuxtools.internal.profiling.provider.ProviderLaunchConfigurationTabGroup; + +/** + * The tab group for this plug-in's launch configuration dialog menu. + * + */ +public class TimeLaunchConfigurationTabGroup extends + ProviderLaunchConfigurationTabGroup { + + @Override + public AbstractLaunchConfigurationTab[] getProfileTabs() { + ArrayList<AbstractLaunchConfigurationTab> tabs = new ArrayList<AbstractLaunchConfigurationTab>(); + tabs.add(new TimeOptionsTab()); + + return tabs.toArray(new AbstractLaunchConfigurationTab [] {}); + } + +} diff --git a/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/TimeOptionsTab.java b/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/TimeOptionsTab.java new file mode 100644 index 0000000000..f18c07acfc --- /dev/null +++ b/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/TimeOptionsTab.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2012 Red Hat, 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 + * + * Contributors: + * Red Hat initial API and implementation + *******************************************************************************/ +package org.eclipse.linuxtools.profiling.time; + +import org.eclipse.linuxtools.internal.profiling.provider.ProviderOptionsTab; + +/** + * The options tab used for this plug-in's launch configuration tab group. + * + */ +public class TimeOptionsTab extends ProviderOptionsTab { + + public String getName() { + return TimeConstants.PLUGIN_NAME; + } + + @Override + protected String getProfilingType() { + return TimeConstants.PROFILING_TYPE; + } +} diff --git a/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/TimePreferencesPage.java b/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/TimePreferencesPage.java new file mode 100644 index 0000000000..68d8ea5e24 --- /dev/null +++ b/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/TimePreferencesPage.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 2012 Red Hat, 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 + * + * Contributors: + * Red Hat initial API and implementation + *******************************************************************************/ +package org.eclipse.linuxtools.profiling.time; + +import org.eclipse.linuxtools.internal.profiling.provider.AbstractProviderPreferencesPage; + +/** + * The preferences page for this plug-in, contributing to the global profiling + * preference page. + * + */ +public class TimePreferencesPage extends AbstractProviderPreferencesPage { + + @Override + protected String getProfilingType() { + return TimeConstants.PROFILING_TYPE; + } +} diff --git a/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/launch/TimeLaunchConfigurationDelegate.java b/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/launch/TimeLaunchConfigurationDelegate.java new file mode 100644 index 0000000000..07699c487d --- /dev/null +++ b/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/launch/TimeLaunchConfigurationDelegate.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright (c) 2012 Red Hat, 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 + * + * Contributors: + * Red Hat initial API and implementation + *******************************************************************************/ +package org.eclipse.linuxtools.profiling.time.launch; + +import org.eclipse.linuxtools.internal.profiling.provider.launch.ProviderLaunchConfigurationDelegate; +import org.eclipse.linuxtools.profiling.time.TimeConstants; + +/** + * The launch configuration delegate for time profiling plug-ins. + * + */ +public class TimeLaunchConfigurationDelegate extends + ProviderLaunchConfigurationDelegate { + + @Override + protected String getPluginID() { + return TimeConstants.PLUGIN_ID; + } + + @Override + public String getProfilingType() { + return TimeConstants.PROFILING_TYPE; + } + +} diff --git a/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/launch/TimeLaunchShortcut.java b/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/launch/TimeLaunchShortcut.java new file mode 100644 index 0000000000..47753c855d --- /dev/null +++ b/profiling/org.eclipse.linuxtools.profiling.time/src/org/eclipse/linuxtools/profiling/time/launch/TimeLaunchShortcut.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2012 Red Hat, 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 + * + * Contributors: + * Red Hat initial API and implementation + *******************************************************************************/ +package org.eclipse.linuxtools.profiling.time.launch; + +import org.eclipse.linuxtools.internal.profiling.provider.launch.ProviderLaunchShortcut; +import org.eclipse.linuxtools.profiling.time.TimeConstants; + +/** + * The launch shortcut for time profiling type plug-ins. + * + */ +public class TimeLaunchShortcut extends ProviderLaunchShortcut { + + @Override + protected String getLaunchConfigID() { + return TimeConstants.PLUGIN_CONFIG_ID; + } + +} |