Permalink
Browse files

Create profiler plug-in skeleton.

  • Loading branch information...
1 parent 965ce1c commit e57789bb1abbc174402d2dd0c20bd13ee8c5f3a4 @serras serras committed Jul 20, 2011
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>net.sf.eclipsefp.haskell.profiler</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: net.sf.eclipsefp.haskell.profiler;singleton:=true
+Bundle-Version: 0.0.1
+Bundle-Activator: net.sf.eclipsefp.haskell.profiler.ProfilerPlugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.team.core
+Eclipse-LazyStart: true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %bundleVendor
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
@@ -0,0 +1,6 @@
+# bundle manifest
+bundleVendor = The EclipseFP Project
+bundleName = Haskell Plug-in Profiler support
+
+contenttype_profiler_name = GHC Profiling Output
+profilerViewer_name = Profiling Output Viewer
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.team.core.fileTypes">
+ <fileTypes
+ extension="hp"
+ type="text">
+ </fileTypes>
+ </extension>
+ <extension
+ point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ base-type="org.eclipse.core.runtime.text"
+ file-extensions="hp"
+ id="net.sf.eclipsefp.haskell.contenttypes.profiler"
+ name="%contenttype_profiler_name"
+ priority="normal">
+ </content-type>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="net.sf.eclipsefp.haskell.profiler.internal.editors.ProfilerViewer"
+ contributorClass="net.sf.eclipsefp.haskell.profiler.actions.ProfilerViewerActionContributor"
+ extensions="hp"
+ id="net.sf.eclipsefp.haskell.profiler.internal.editors.ProfilerViewer"
+ name="%profilerViewer_name">
+ <contentTypeBinding
+ contentTypeId="net.sf.eclipsefp.haskell.contenttypes.profiler">
+ </contentTypeBinding>
+ </editor>
+ </extension>
+
+</plugin>
@@ -0,0 +1,50 @@
+package net.sf.eclipsefp.haskell.profiler;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class ProfilerPlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "net.sf.eclipsefp.haskell.profiler"; //$NON-NLS-1$
+
+ // The shared instance
+ private static ProfilerPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public ProfilerPlugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static ProfilerPlugin getDefault() {
+ return plugin;
+ }
+
+}
@@ -0,0 +1,11 @@
+package net.sf.eclipsefp.haskell.profiler.actions;
+
+import org.eclipse.ui.part.EditorActionBarContributor;
+
+public class ProfilerViewerActionContributor extends EditorActionBarContributor {
+
+ public ProfilerViewerActionContributor() {
+ // Do nothing by now
+ }
+
+}
@@ -0,0 +1,58 @@
+package net.sf.eclipsefp.haskell.profiler.internal.editors;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.EditorPart;
+
+public class ProfilerViewer extends EditorPart {
+
+ public ProfilerViewer() {
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ public void doSave(IProgressMonitor monitor) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void doSaveAs() {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public boolean isDirty() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isSaveAsAllowed() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public void createPartControl(Composite parent) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void setFocus() {
+ // TODO Auto-generated method stub
+
+ }
+
+}

0 comments on commit e57789b

Please sign in to comment.