org.eclipse.linuxtools.profiling.ui_1.3.18.201310312000

16:46:09.459 INFO  jd.cli.Main - Decompiling org.eclipse.linuxtools.profiling.ui_1.3.18.201310312000.jar
package org.eclipse.linuxtools.profiling.ui;

import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

public class ProfileUIPlugin
  extends AbstractUIPlugin
{
  public static final String PLUGIN_ID = "org.eclipse.linuxtools.profiling.ui";
  private static ProfileUIPlugin plugin;
  
  public void start(BundleContext paramBundleContext)
    throws Exception
  {
    super.start(paramBundleContext);
    plugin = this;
  }
  
  public void stop(BundleContext paramBundleContext)
    throws Exception
  {
    plugin = null;
    super.stop(paramBundleContext);
  }
  
  public static ProfileUIPlugin getDefault()
  {
    return plugin;
  }
  
  public static Shell getActiveWorkbenchShell()
  {
    IWorkbenchWindow localIWorkbenchWindow = getDefault().getWorkbench().getActiveWorkbenchWindow();
    if (localIWorkbenchWindow != null) {
      return localIWorkbenchWindow.getShell();
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.linuxtools.profiling.ui.ProfileUIPlugin
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.linuxtools.profiling.ui;

import java.io.File;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.filesystem.IFileSystem;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.ITextEditor;

public class ProfileUIUtils
{
  public static void openEditorAndSelect(String paramString, int paramInt)
    throws PartInitException, BadLocationException
  {
    Path localPath = new Path(paramString);
    if (localPath.toFile().exists())
    {
      IWorkbenchPage localIWorkbenchPage = ProfileUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
      IFileStore localIFileStore = EFS.getLocalFileSystem().getStore(localPath);
      IEditorPart localIEditorPart = IDE.openEditorOnFileStore(localIWorkbenchPage, localIFileStore);
      if ((localIEditorPart instanceof ITextEditor))
      {
        ITextEditor localITextEditor = (ITextEditor)localIEditorPart;
        if (paramInt > 0)
        {
          IDocumentProvider localIDocumentProvider = localITextEditor.getDocumentProvider();
          IDocument localIDocument = localIDocumentProvider.getDocument(localITextEditor.getEditorInput());
          int i = localIDocument.getLineOffset(paramInt - 1);
          localITextEditor.selectAndReveal(i, 0);
        }
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.linuxtools.profiling.ui.ProfileUIUtils
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
1

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd