com.android.ide.eclipse.ddms_22.6.2.v201403212031-1085508

tion)) {
        t = ((InvocationTargetException)e).getTargetException();
      }
      Status s = new Status(4, "com.android.ide.eclipse.ddms", 
        "Error obtaining UI hierarchy", t);
      ErrorDialog.openError(shell, "UI Automator", 
        "Unexpected error while obtaining UI hierarchy", s);
    }
  }
  
  private void launchSystrace(final IDevice device, Shell parentShell)
  {
    final File systraceAssets = new File(DdmsPlugin.getPlatformToolsFolder(), "systrace");
    if (!systraceAssets.isDirectory())
    {
      MessageDialog.openError(parentShell, "Systrace", 
        "Updated version of platform-tools (18.0.1 or greater) is required.\nPlease update your platform-tools using SDK Manager.");
      
      return;
    }
    SystraceVersionDetector detector = new SystraceVersionDetector(device);
    try
    {
      new ProgressMonitorDialog(parentShell).run(true, false, detector);
    }
    catch (InvocationTargetException e)
    {
      MessageDialog.openError(parentShell, 
        "Systrace", 
        "Unexpected error while detecting atrace version: " + e); return;
    }
    catch (InterruptedException localInterruptedException1)
    {
      return;
    }
    ISystraceOptionsDialog dlg;
    final ISystraceOptionsDialog dlg;
    if (detector.getVersion() == 1)
    {
      dlg = new SystraceOptionsDialogV1(parentShell);
    }
    else
    {
      Client[] clients = device.getClients();
      List<String> apps = new ArrayList(clients.length);
      for (int i = 0; i < clients.length; i++)
      {
        String name = clients[i].getClientData().getClientDescription();
        if ((name != null) && (!name.isEmpty())) {
          apps.add(name);
        }
      }
      dlg = new SystraceOptionsDialogV2(parentShell, detector.getTags(), apps);
    }
    if (dlg.open() != 0) {
      return;
    }
    final ISystraceOptions options = dlg.getSystraceOptions();
    
    String tag = options.getTags();
    if (tag != null)
    {
      CountDownLatch setTagLatch = new CountDownLatch(1);
      CollectingOutputReceiver receiver = new CollectingOutputReceiver(setTagLatch);
      try
      {
        String cmd = "setprop debug.atrace.tags.enableflags " + tag;
        device.executeShellCommand(cmd, receiver);
        setTagLatch.await(5L, TimeUnit.SECONDS);
      }
      catch (Exception e)
      {
        MessageDialog.openError(parentShell, 
          "Systrace", 
          "Unexpected error while setting trace tags: " + e);
        return;
      }
      String shellOutput = receiver.getOutput();
      if (shellOutput.contains("Error type")) {
        throw new RuntimeException(receiver.getOutput());
      }
    }
    ProgressMonitorDialog d = new ProgressMonitorDialog(parentShell);
    try
    {
      d.run(true, true, new IRunnableWithProgress()
      {
        public void run(IProgressMonitor monitor)
          throws InvocationTargetException, InterruptedException
        {
          boolean COMPRESS_DATA = true;
          
          monitor.setTaskName("Collecting Trace Information");
          String atraceOptions = options.getOptions() + (
            COMPRESS_DATA ? " -z" : "");
          SystraceTask task = new SystraceTask(device, atraceOptions);
          Thread t = new Thread(task, "Systrace Output Receiver");
          t.start();
          do
          {
            t.join(1000L);
            if (!t.isAlive()) {
              break;
            }
          } while (!monitor.isCanceled());
          task.cancel();
          return;
          if (task.getError() != null) {
            throw new RuntimeException(task.getError());
          }
          monitor.setTaskName("Saving trace information");
          SystraceOutputParser parser = new SystraceOutputParser(
            COMPRESS_DATA, 
            SystraceOutputParser.getJs(systraceAssets), 
            SystraceOutputParser.getCss(systraceAssets), 
            SystraceOutputParser.getHtmlPrefix(systraceAssets), 
            SystraceOutputParser.getHtmlSuffix(systraceAssets));
          
          parser.parse(task.getAtraceOutput());
          
          String html = parser.getSystraceHtml();
          try
          {
            Files.write(html.getBytes(), new File(dlg.getTraceFilePath()));
          }
          catch (IOException e)
          {
            throw new InvocationTargetException(e);
          }
        }
      });
    }
    catch (InvocationTargetException e)
    {
      ErrorDialog.openError(parentShell, "Systrace", 
        "Unable to collect system trace.", 
        new Status(4, 
        "com.android.ide.eclipse.ddms", 
        "Unexpected error while collecting system trace.", 
        e.getCause()));
    }
    catch (InterruptedException localInterruptedException2) {}
  }
  
  public void setFocus()
  {
    mDeviceList.setFocus();
  }
  
  public void selectionChanged(IDevice selectedDevice, Client selectedClient)
  {
    doSelectionChanged(selectedClient);
    doSelectionChanged(selectedDevice);
  }
  
  private void doSelectionChanged(Client selectedClient)
  {
    if (selectedClient != null)
    {
      selectedClient.setAsSelectedClient();
      
      mDebugAction.setEnabled(DdmsPlugin.getDefault().hasDebuggerConnectors());
      mKillAppAction.setEnabled(true);
      mGcAction.setEnabled(true);
      
      mUpdateHeapAction.setEnabled(true);
      mUpdateHeapAction.setChecked(selectedClient.isHeapUpdateEnabled());
      
      mUpdateThreadAction.setEnabled(true);
      mUpdateThreadAction.setChecked(selectedClient.isThreadUpdateEnabled());
      
      ClientData data = selectedClient.getClientData();
      if (data.hasFeature("hprof-heap-dump"))
      {
        mHprofAction.setEnabled(!data.hasPendingHprofDump());
        mHprofAction.setToolTipText(Messages.DeviceView_Dump_HPROF_File);
      }
      else
      {
        mHprofAction.setEnabled(false);
        mHprofAction
          .setToolTipText(Messages.DeviceView_Dump_HPROF_File_Not_Supported_By_VM);
      }
      if (data.hasFeature("method-trace-profiling"))
      {
        mTracingAction.setEnabled(true);
        if ((data.getMethodProfilingStatus() == ClientData.MethodProfilingStatus.TRACER_ON) || 
          (data.getMethodProfilingStatus() == ClientData.MethodProfilingStatus.SAMPLER_ON))
        {
          mTracingAction.setToolTipText(Messages.DeviceView_Stop_Method_Profiling_Tooltip);
          mTracingAction.setText(Messages.DeviceView_Stop_Method_Profiling);
          mTracingAction.setImageDescriptor(mTracingStopImage);
        }
        else
        {
          mTracingAction.setToolTipText(Messages.DeviceView_Start_Method_Profiling_Tooltip);
          mTracingAction.setImageDescriptor(mTracingStartImage);
          mTracingAction.setText(Messages.DeviceView_Start_Method_Profiling);
        }
      }
      else
      {
        mTracingAction.setEnabled(false);
        mTracingAction.setImageDescriptor(mTracingStartImage);
        mTracingAction
          .setToolTipText(Messages.DeviceView_Start_Method_Profiling_Not_Suported_By_Vm);
        mTracingAction.setText(Messages.DeviceView_Start_Method_Profiling);
      }
    }
    else
    {
      AndroidDebugBridge bridge = AndroidDebugBridge.getBridge();
      if (bridge != null) {
        bridge.setSelectedClient(null);
      }
      mDebugAction.setEnabled(false);
      mKillAppAction.setEnabled(false);
      mGcAction.setEnabled(false);
      mUpdateHeapAction.setChecked(false);
      mUpdateHeapAction.setEnabled(false);
      mUpdateThreadAction.setEnabled(false);
      mUpdateThreadAction.setChecked(false);
      mHprofAction.setEnabled(false);
      
      mHprofAction.setEnabled(false);
      mHprofAction.setToolTipText(Messages.DeviceView_Dump_HPROF_File);
      
      mTracingAction.setEnabled(false);
      mTracingAction.setImageDescriptor(mTracingStartImage);
      mTracingAction.setToolTipText(Messages.DeviceView_Start_Method_Profiling_Tooltip);
      mTracingAction.setText(Messages.DeviceView_Start_Method_Profiling);
    }
    for (IClientAction a : DdmsPlugin.getDefault().getClientSpecificActions()) {
      a.selectedClientChanged(selectedClient);
    }
  }
  
  private void doSelectionChanged(IDevice selectedDevice)
  {
    boolean validDevice = selectedDevice != null;
    
    mCaptureAction.setEnabled(validDevice);
    mViewUiAutomatorHierarchyAction.setEnabled(validDevice);
    mSystraceAction.setEnabled(validDevice);
  }
  
  private final void placeActions()
  {
    IActionBars actionBars = getViewSite().getActionBars();
    
    IMenuManager menuManager = actionBars.getMenuManager();
    menuManager.removeAll();
    menuManager.add(mDebugAction);
    menuManager.add(new Separator());
    menuManager.add(mUpdateHeapAction);
    menuManager.add(mHprofAction);
    menuManager.add(mGcAction);
    menuManager.add(new Separator());
    menuManager.add(mUpdateThreadAction);
    menuManager.add(mTracingAction);
    menuManager.add(new Separator());
    menuManager.add(mKillAppAction);
    menuManager.add(new Separator());
    menuManager.add(mCaptureAction);
    menuManager.add(new Separator());
    menuManager.add(mViewUiAutomatorHierarchyAction);
    menuManager.add(new Separator());
    menuManager.add(mSystraceAction);
    menuManager.add(new Separator());
    menuManager.add(mResetAdbAction);
    for (IClientAction a : DdmsPlugin.getDefault().getClientSpecificActions()) {
      menuManager.add(a.getAction());
    }
    IToolBarManager toolBarManager = actionBars.getToolBarManager();
    toolBarManager.removeAll();
    toolBarManager.add(mDebugAction);
    toolBarManager.add(new Separator());
    toolBarManager.add(mUpdateHeapAction);
    toolBarManager.add(mHprofAction);
    toolBarManager.add(mGcAction);
    toolBarManager.add(new Separator());
    toolBarManager.add(mUpdateThreadAction);
    toolBarManager.add(mTracingAction);
    toolBarManager.add(new Separator());
    toolBarManager.add(mKillAppAction);
    toolBarManager.add(new Separator());
    toolBarManager.add(mCaptureAction);
    toolBarManager.add(new Separator());
    toolBarManager.add(mViewUiAutomatorHierarchyAction);
    toolBarManager.add(new Separator());
    toolBarManager.add(mSystraceAction);
    for (IClientAction a : DdmsPlugin.getDefault().getClientSpecificActions()) {
      toolBarManager.add(a.getAction());
    }
  }
  
  public void clientChanged(final Client client, int changeMask)
  {
    if (((changeMask & 0x800) == 2048) && 
      (mDeviceList.getSelectedClient() == client)) {
      mParentShell.getDisplay().asyncExec(new Runnable()
      {
        public void run()
        {
          DeviceView.this.doSelectionChanged(client);
        }
      });
    }
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.DeviceView
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.EmulatorControlPanel;
import org.eclipse.swt.widgets.Composite;

public class EmulatorControlView
  extends SelectionDependentViewPart
{
  public static final String ID = "com.android.ide.eclipse.ddms.views.EmulatorControlView";
  private EmulatorControlPanel mPanel;
  
  public void createPartControl(Composite parent)
  {
    mPanel = new EmulatorControlPanel();
    mPanel.createPanel(parent);
    setSelectionDependentPanel(mPanel);
  }
  
  public void setFocus()
  {
    mPanel.setFocus();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.EmulatorControlView
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.ImageLoader;
import com.android.ddmuilib.log.event.EventLogPanel;
import com.android.ide.eclipse.ddms.CommonAction;
import com.android.ide.eclipse.ddms.i18n.Messages;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IViewSite;

public class EventLogView
  extends SelectionDependentViewPart
{
  private EventLogPanel mLogPanel;
  
  public void createPartControl(Composite parent)
  {
    ImageLoader loader = ImageLoader.getDdmUiLibLoader();
    
    CommonAction optionsAction = new CommonAction(Messages.EventLogView_Options);
    optionsAction.setToolTipText(Messages.EventLogView_Opens_Options_Panel);
    optionsAction.setImageDescriptor(loader.loadDescriptor("edit.png"));
    
    CommonAction clearLogAction = new CommonAction(Messages.EventLogView_Clear_Log);
    clearLogAction.setToolTipText(Messages.EventLogView_Clears_Event_Log);
    clearLogAction.setImageDescriptor(loader.loadDescriptor("clear.png"));
    
    CommonAction saveAction = new CommonAction(Messages.EventLogView_Save_Log);
    saveAction.setToolTipText(Messages.EventLogView_Saves_Event_Log);
    saveAction.setImageDescriptor(loader.loadDescriptor("save.png"));
    
    CommonAction loadAction = new CommonAction(Messages.EventLogView_Load_Log);
    loadAction.setToolTipText(Messages.EventLogView_Loads_Event_Log);
    loadAction.setImageDescriptor(loader.loadDescriptor("load.png"));
    
    CommonAction importBugAction = new CommonAction(Messages.EventLogView_Import_Bug_Report_Log);
    importBugAction.setToolTipText(Messages.EventLogView_Imports_Bug_Report);
    importBugAction.setImageDescriptor(loader.loadDescriptor("importBug.png"));
    
    placeActions(optionsAction, clearLogAction, saveAction, loadAction, importBugAction);
    
    mLogPanel = new EventLogPanel();
    mLogPanel
      .setActions(optionsAction, clearLogAction, saveAction, loadAction, importBugAction);
    mLogPanel.createPanel(parent);
    setSelectionDependentPanel(mLogPanel);
  }
  
  public void setFocus()
  {
    mLogPanel.setFocus();
  }
  
  public void dispose()
  {
    if (mLogPanel != null) {
      mLogPanel.stopEventLog(true);
    }
  }
  
  private void placeActions(IAction optionAction, IAction clearAction, IAction saveAction, IAction loadAction, CommonAction importBugAction)
  {
    IActionBars actionBars = getViewSite().getActionBars();
    
    IMenuManager menuManager = actionBars.getMenuManager();
    menuManager.add(clearAction);
    menuManager.add(new Separator());
    menuManager.add(saveAction);
    menuManager.add(loadAction);
    menuManager.add(importBugAction);
    menuManager.add(new Separator());
    menuManager.add(optionAction);
    
    IToolBarManager toolBarManager = actionBars.getToolBarManager();
    toolBarManager.add(clearAction);
    toolBarManager.add(new Separator());
    toolBarManager.add(saveAction);
    toolBarManager.add(loadAction);
    toolBarManager.add(importBugAction);
    toolBarManager.add(new Separator());
    toolBarManager.add(optionAction);
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.EventLogView
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.explorer.DeviceExplorer;
import com.android.ide.eclipse.ddms.CommonAction;

class FileExplorerView$1
  extends CommonAction
{
  FileExplorerView$1(FileExplorerView paramFileExplorerView, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public void run()
  {
    FileExplorerView.access$0(this$0).pushIntoSelection();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.FileExplorerView.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.explorer.DeviceExplorer;
import com.android.ide.eclipse.ddms.CommonAction;

class FileExplorerView$2
  extends CommonAction
{
  FileExplorerView$2(FileExplorerView paramFileExplorerView, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public void run()
  {
    FileExplorerView.access$0(this$0).pullSelection();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.FileExplorerView.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.explorer.DeviceExplorer;
import com.android.ide.eclipse.ddms.CommonAction;

class FileExplorerView$3
  extends CommonAction
{
  FileExplorerView$3(FileExplorerView paramFileExplorerView, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public void run()
  {
    FileExplorerView.access$0(this$0).deleteSelection();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.FileExplorerView.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.explorer.DeviceExplorer;
import com.android.ide.eclipse.ddms.CommonAction;

class FileExplorerView$4
  extends CommonAction
{
  FileExplorerView$4(FileExplorerView paramFileExplorerView, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public void run()
  {
    FileExplorerView.access$0(this$0).createNewFolderInSelection();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.FileExplorerView.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmlib.Client;
import com.android.ddmlib.IDevice;
import com.android.ddmuilib.ImageLoader;
import com.android.ddmuilib.explorer.DeviceExplorer;
import com.android.ide.eclipse.ddms.CommonAction;
import com.android.ide.eclipse.ddms.DdmsPlugin;
import com.android.ide.eclipse.ddms.DdmsPlugin.ISelectionListener;
import com.android.ide.eclipse.ddms.i18n.Messages;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.ViewPart;

public class FileExplorerView
  extends ViewPart
  implements DdmsPlugin.ISelectionListener
{
  public static final String ID = "com.android.ide.eclipse.ddms.views.FileExplorerView";
  private static final String COLUMN_NAME = "com.android.ide.eclipse.ddms.explorer.name";
  private static final String COLUMN_SIZE = "com.android.ide.eclipse.ddms.explorer.size";
  private static final String COLUMN_DATE = "com.android.ide.eclipse.ddms.explorer.data";
  private static final String COLUMN_TIME = "com.android.ide.eclipse.ddms.explorer.time";
  private static final String COLUMN_PERMISSIONS = "com.android.ide.eclipse.ddms.explorer.permissions";
  private static final String COLUMN_INFO = "com.android.ide.eclipse.ddms.explorer.info";
  private DeviceExplorer mExplorer;
  
  public void createPartControl(Composite parent)
  {
    ImageLoader loader = ImageLoader.getDdmUiLibLoader();
    
    DeviceExplorer.COLUMN_NAME = "com.android.ide.eclipse.ddms.explorer.name";
    DeviceExplorer.COLUMN_SIZE = "com.android.ide.eclipse.ddms.explorer.size";
    DeviceExplorer.COLUMN_DATE = "com.android.ide.eclipse.ddms.explorer.data";
    DeviceExplorer.COLUMN_TIME = "com.android.ide.eclipse.ddms.explorer.time";
    DeviceExplorer.COLUMN_PERMISSIONS = "com.android.ide.eclipse.ddms.explorer.permissions";
    DeviceExplorer.COLUMN_INFO = "com.android.ide.eclipse.ddms.explorer.info";
    
    mExplorer = new DeviceExplorer();
    
    mExplorer.setCustomImages(
      PlatformUI.getWorkbench().getSharedImages().getImage("IMG_OBJ_FILE"), 
      PlatformUI.getWorkbench().getSharedImages().getImage("IMG_OBJ_FOLDER"), 
      null, 
      PlatformUI.getWorkbench().getSharedImages().getImage("IMG_OBJ_ELEMENTS"));
    
    CommonAction pushAction = new CommonAction(Messages.FileExplorerView_Push_File)
    {
      public void run()
      {
        mExplorer.pushIntoSelection();
      }
    };
    pushAction.setToolTipText(Messages.FileExplorerView_Push_File_Onto_Device);
    pushAction.setImageDescriptor(loader.loadDescriptor("push.png"));
    pushAction.setEnabled(false);
    
    CommonAction pullAction = new CommonAction(Messages.FileExplorerView_Pull_File)
    {
      public void run()
      {
        mExplorer.pullSelection();
      }
    };
    pullAction.setToolTipText(Messages.FileExplorerView_Pull_File_From_File);
    pullAction.setImageDescriptor(loader.loadDescriptor("pull.png"));
    pullAction.setEnabled(false);
    
    CommonAction deleteAction = new CommonAction(Messages.FileExplorerView_Delete)
    {
      public void run()
      {
        mExplorer.deleteSelection();
      }
    };
    deleteAction.setToolTipText(Messages.FileExplorerView_Delete_The_Selection);
    deleteAction.setImageDescriptor(loader.loadDescriptor("delete.png"));
    deleteAction.setEnabled(false);
    
    CommonAction createNewFolderAction = new CommonAction("New Folder")
    {
      public void run()
      {
        mExplorer.createNewFolderInSelection();
      }
    };
    createNewFolderAction.setToolTipText("New Folder");
    createNewFolderAction.setImageDescriptor(loader.loadDescriptor("add.png"));
    createNewFolderAction.setEnabled(false);
    
    mExplorer.setActions(pushAction, pullAction, deleteAction, createNewFolderAction);
    
    IActionBars actionBars = getViewSite().getActionBars();
    IMenuManager menuManager = actionBars.getMenuManager();
    IToolBarManager toolBarManager = actionBars.getToolBarManager();
    
    menuManager.add(pullAction);
    menuManager.add(pushAction);
    menuManager.add(new Separator());
    menuManager.add(deleteAction);
    menuManager.add(new Separator());
    menuManager.add(createNewFolderAction);
    
    toolBarManager.add(pullAction);
    toolBarManager.add(pushAction);
    toolBarManager.add(new Separator());
    toolBarManager.add(deleteAction);
    toolBarManager.add(new Separator());
    toolBarManager.add(createNewFolderAction);
    
    mExplorer.createPanel(parent);
    
    DdmsPlugin.getDefault().addSelectionListener(this);
  }
  
  public void setFocus()
  {
    mExplorer.setFocus();
  }
  
  public void selectionChanged(Client selectedClient) {}
  
  public void selectionChanged(IDevice selectedDevice)
  {
    mExplorer.switchDevice(selectedDevice);
  }
  
  public void selectionRemoved() {}
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.FileExplorerView
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.HeapPanel;
import org.eclipse.swt.widgets.Composite;

public class HeapView
  extends TableView
{
  public static final String ID = "com.android.ide.eclipse.ddms.views.HeapView";
  private HeapPanel mPanel;
  
  public void createPartControl(Composite parent)
  {
    mPanel = new HeapPanel();
    mPanel.createPanel(parent);
    
    setSelectionDependentPanel(mPanel);
    
    setupTableFocusListener(mPanel, parent);
  }
  
  public void setFocus()
  {
    mPanel.setFocus();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.HeapView
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmlib.logcat.LogCatMessage;
import com.android.ddmuilib.logcat.ILogCatMessageSelectionListener;

class LogCatView$1
  implements ILogCatMessageSelectionListener
{
  LogCatView$1(LogCatView paramLogCatView) {}
  
  public void messageDoubleClicked(LogCatMessage m)
  {
    LogCatView.access$0(this$0, m);
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.LogCatView.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.logcat.LogCatPanel;
import org.eclipse.jface.action.Action;

class LogCatView$2
  extends Action
{
  LogCatView$2(LogCatView paramLogCatView, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public void run()
  {
    LogCatView.access$1(this$0).copySelectionToClipboard(LogCatView.access$2(this$0));
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.LogCatView.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.logcat.LogCatPanel;
import org.eclipse.jface.action.Action;

class LogCatView$3
  extends Action
{
  LogCatView$3(LogCatView paramLogCatView, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public void run()
  {
    LogCatView.access$1(this$0).selectAll();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.LogCatView.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.logcat.LogCatPanel;
import org.eclipse.jface.action.Action;

class LogCatView$4
  extends Action
{
  LogCatView$4(LogCatView paramLogCatView, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public void run()
  {
    LogCatView.access$1(this$0).showFindDialog();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.LogCatView.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmlib.logcat.LogCatMessage;
import com.android.ddmuilib.logcat.ILogCatMessageSelectionListener;
import com.android.ddmuilib.logcat.LogCatPanel;
import com.android.ddmuilib.logcat.LogCatStackTraceParser;
import com.android.ide.eclipse.ddms.DdmsPlugin;
import com.android.ide.eclipse.ddms.JavaSourceRevealer;
import com.android.ide.eclipse.ddms.i18n.Messages;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.actions.ActionFactory;

public class LogCatView
  extends SelectionDependentViewPart
{
  public static final String ID = "com.android.ide.eclipse.ddms.views.LogCatView";
  public static final boolean DEFAULT_SWITCH_PERSPECTIVE = true;
  public static final String DEFAULT_PERSPECTIVE_ID = "org.eclipse.jdt.ui.JavaPerspective";
  private LogCatPanel mLogCatPanel;
  private LogCatStackTraceParser mStackTraceParser = new LogCatStackTraceParser();
  private Clipboard mClipboard;
  
  public void createPartControl(Composite parent)
  {
    parent.setLayout(new FillLayout());
    
    IPreferenceStore prefStore = DdmsPlugin.getDefault().getPreferenceStore();
    mLogCatPanel = new LogCatPanel(prefStore);
    mLogCatPanel.createPanel(parent);
    setSelectionDependentPanel(mLogCatPanel);
    
    mLogCatPanel.addLogCatMessageSelectionListener(new ILogCatMessageSelectionListener()
    {
      public void messageDoubleClicked(LogCatMessage m)
      {
        LogCatView.this.onDoubleClick(m);
      }
    });
    mClipboard = new Clipboard(parent.getDisplay());
    IActionBars actionBars = getViewSite().getActionBars();
    actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), 
      new Action(Messages.LogCatView_Copy)
      {
        public void run()
        {
          mLogCatPanel.copySelectionToClipboard(mClipboard);
        }
      });
    actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), 
      new Action(Messages.LogCatView_Select_All)
      {
        public void run()
        {
          mLogCatPanel.selectAll();
        }
      });
    actionBars.setGlobalActionHandler(ActionFactory.FIND.getId(), 
      new Action("Find")
      {
        public void run()
        {
          mLogCatPanel.showFindDialog();
        }
      });
  }
  
  public void setFocus() {}
  
  private void onDoubleClick(LogCatMessage m)
  {
    String msg = m.getMessage();
    if (!mStackTraceParser.isValidExceptionTrace(msg)) {
      return;
    }
    IPreferenceStore store = DdmsPlugin.getDefault().getPreferenceStore();
    String perspectiveId = null;
    if (store.getBoolean("com.android.ide.eclipse.ddms.switchPerspective")) {
      perspectiveId = store.getString("com.android.ide.eclipse.ddms.perspectiveId");
    }
    String fileName = mStackTraceParser.getFileName(msg);
    int lineNumber = mStackTraceParser.getLineNumber(msg);
    String methodName = mStackTraceParser.getMethodName(msg);
    JavaSourceRevealer.revealMethod(methodName, fileName, lineNumber, perspectiveId);
  }
  
  public void selectTransientAppFilter(String appName)
  {
    mLogCatPanel.selectTransientAppFilter(appName);
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.LogCatView
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.NativeHeapPanel;
import org.eclipse.swt.widgets.Composite;

public class NativeHeapView
  extends TableView
{
  public static final String ID = "com.android.ide.eclipse.ddms.views.NativeHeapView";
  private NativeHeapPanel mPanel;
  
  public void createPartControl(Composite parent)
  {
    mPanel = new NativeHeapPanel();
    mPanel.createPanel(parent);
    
    setSelectionDependentPanel(mPanel);
    
    setupTableFocusListener(mPanel, parent);
  }
  
  public void setFocus()
  {
    mPanel.setFocus();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.NativeHeapView
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.net.NetworkPanel;
import org.eclipse.swt.widgets.Composite;

public class NetworkStatisticsView
  extends TableView
{
  public static final String ID = "com.android.ide.eclipse.ddms.views.NetworkStatsView";
  private NetworkPanel mPanel;
  
  public void createPartControl(Composite parent)
  {
    mPanel = new NetworkPanel();
    mPanel.createPanel(parent);
    
    setSelectionDependentPanel(mPanel);
    
    setupTableFocusListener(mPanel, parent);
  }
  
  public void setFocus()
  {
    mPanel.setFocus();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.NetworkStatisticsView
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.logcat.LogPanel;
import com.android.ide.eclipse.ddms.CommonAction;

class OldLogCatView$1
  extends CommonAction
{
  OldLogCatView$1(OldLogCatView paramOldLogCatView, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public void run()
  {
    OldLogCatView.access$0(this$0).addFilter();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.OldLogCatView.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.logcat.LogPanel;
import com.android.ide.eclipse.ddms.CommonAction;

class OldLogCatView$2
  extends CommonAction
{
  OldLogCatView$2(OldLogCatView paramOldLogCatView, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public void run()
  {
    OldLogCatView.access$0(this$0).editFilter();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.OldLogCatView.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.logcat.LogPanel;
import com.android.ide.eclipse.ddms.CommonAction;

class OldLogCatView$3
  extends CommonAction
{
  OldLogCatView$3(OldLogCatView paramOldLogCatView, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public void run()
  {
    OldLogCatView.access$0(this$0).deleteFilter();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.OldLogCatView.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.logcat.LogPanel;
import com.android.ide.eclipse.ddms.CommonAction;

class OldLogCatView$4
  extends CommonAction
{
  OldLogCatView$4(OldLogCatView paramOldLogCatView, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public void run()
  {
    OldLogCatView.access$0(this$0).save();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.OldLogCatView.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.logcat.LogPanel;
import com.android.ide.eclipse.ddms.CommonAction;
import org.eclipse.jface.action.Action;

class OldLogCatView$5
  extends CommonAction
{
  OldLogCatView$5(OldLogCatView paramOldLogCatView, String $anonymous0, int $anonymous1)
  {
    super($anonymous0, $anonymous1);
  }
  
  public void run()
  {
    for (int j = 0; j < OldLogCatView.access$1(this$0).length; j++)
    {
      Action a = OldLogCatView.access$1(this$0)[j];
      if (a == this)
      {
        a.setChecked(true);
        
        OldLogCatView.access$0(this$0).setCurrentFilterLogLevel(j + 2);
      }
      else
      {
        a.setChecked(false);
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.OldLogCatView.5
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.logcat.LogPanel;
import org.eclipse.jface.action.Action;

class OldLogCatView$6
  extends Action
{
  OldLogCatView$6(OldLogCatView paramOldLogCatView, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public void run()
  {
    OldLogCatView.access$0(this$0).clear();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.OldLogCatView.6
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.logcat.LogPanel;
import org.eclipse.jface.action.Action;

class OldLogCatView$7
  extends Action
{
  OldLogCatView$7(OldLogCatView paramOldLogCatView, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public void run()
  {
    OldLogCatView.access$0(this$0).copy(OldLogCatView.access$2(this$0));
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.OldLogCatView.7
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.logcat.LogPanel;
import org.eclipse.jface.action.Action;

class OldLogCatView$8
  extends Action
{
  OldLogCatView$8(OldLogCatView paramOldLogCatView, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public void run()
  {
    OldLogCatView.access$0(this$0).selectAll();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.OldLogCatView.8
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmuilib.logcat.LogFilter;
import com.android.ddmuilib.logcat.LogPanel.ILogFilterStorageManager;
import com.android.ide.eclipse.ddms.DdmsPlugin;
import java.util.ArrayList;
import org.eclipse.jface.preference.IPreferenceStore;

final class OldLogCatView$FilterStorage
  implements LogPanel.ILogFilterStorageManager
{
  private OldLogCatView$FilterStorage(OldLogCatView paramOldLogCatView) {}
  
  public LogFilter[] getFilterFromStore()
  {
    String filterPrefs = DdmsPlugin.getDefault().getPreferenceStore().getString(
      "com.android.ide.eclipse.ddms.logcat.filters");
    
    String[] filters = filterPrefs.split("\\|");
    
    ArrayList<LogFilter> list = 
      new ArrayList(filters.length);
    String[] arrayOfString1;
    int j = (arrayOfString1 = filters).length;
    for (int i = 0; i < j; i++)
    {
      String f = arrayOfString1[i];
      if (f.length() > 0)
      {
        LogFilter logFilter = new LogFilter();
        if (logFilter.loadFromString(f)) {
          list.add(logFilter);
        }
      }
    }
    return (LogFilter[])list.toArray(new LogFilter[list.size()]);
  }
  
  public void saveFilters(LogFilter[] filters)
  {
    StringBuilder sb = new StringBuilder();
    LogFilter[] arrayOfLogFilter;
    int j = (arrayOfLogFilter = filters).length;
    for (int i = 0; i < j; i++)
    {
      LogFilter f = arrayOfLogFilter[i];
      String filterString = f.toString();
      sb.append(filterString);
      sb.append('|');
    }
    DdmsPlugin.getDefault().getPreferenceStore().setValue("com.android.ide.eclipse.ddms.logcat.filters", sb.toString());
  }
  
  public boolean requiresDefaultFilter()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     com.android.ide.eclipse.ddms.views.OldLogCatView.FilterStorage
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.eclipse.ddms.views;

import com.android.ddmlib.Log.LogLevel;
import com.android.ddmuilib.ImageLoader;
import com.android.ddmuilib.logcat.LogColors;
import com.android.ddmuilib.logcat.LogFilter;
import com.android.ddmuilib.logcat.LogPanel;
import com.android.ddmuilib.logcat.LogPanel.ILogFilterStorageManager;
import com.android.ddmuilib.logcat.LogPanel.LogCatViewInterface;
import com.android.ide.eclipse.ddms.CommonAction;
import com.android.ide.eclipse.ddms.DdmsPlugin;
import com.android.ide.eclipse.ddms.i18n.Messages;
import java.util.ArrayList;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IPerspectiveRegistry;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.WorkbenchException;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.ide.IDE;

public final class OldLogCatView
  extends SelectionDependentViewPart
  implements LogPanel.LogCatViewInterface
{
  public static final String ID = "com.android.ide.eclipse.ddms.views.OldLogCatView";
  private static final String PREFS_COL_TIME = "com.android.ide.eclipse.ddms.logcat.time";
  private static final String PREFS_COL_LEVEL = "com.android.ide.eclipse.ddms.logcat.level";
  private static final String PREFS_COL_PID = "com.android.ide.eclipse.ddms.logcat.pid";
  private static final String PREFS_COL_TAG = "com.android.ide.eclipse.ddms.logcat.tag";
  private static final String PREFS_COL_MESSAGE = "com.android.ide.eclipse.ddms.logcat.message";
  private static final String PREFS_FILTERS = "com.android.ide.eclipse.ddms.logcat.filters";
  public static final String CHOICE_METHOD_DECLARATION = "com.android.ide.eclipse.ddms.logcat.MethodDeclaration";
  public static final String CHOICE_ERROR_LINE = "com.android.ide.eclipse.ddms.logcat.ErrorLine";
  public static final boolean DEFAULT_SWITCH_PERSPECTIVE = true;
  public static final String DEFAULT_PERSPECTIVE_ID = "org.eclipse.jdt.ui.JavaPerspective";
  private static OldLogCatView sThis;
  private LogPanel mLogPanel;
  private CommonAction mCreateFilterAction;
  private CommonAction mDeleteFilterAction;
  private CommonAction mEditFilterAction;
  private CommonAction mExportAction;
  private CommonAction[] mLogLevelActions;
  private String[] mLogLevelIcons = {
    "v.png", 
    "d.png", 
    "i.png", 
    "w.png", 
    "e.png" };
  private Action mClearAction;
  private Clipboard mClipboard;
  
  private final class FilterStorage
    implements LogPan
1 2 3 4 5 6 7 8

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-2019. Infinite Loop Ltd