org.tizen.web.inspector_2.0.0.201311011708

16:50:41.362 INFO  jd.cli.Main - Decompiling org.tizen.web.inspector_2.0.0.201311011708.jar
package org.tizen.web.actions;

import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.browser.WebBrowserEditorInput;
import org.tizen.common.util.log.Logger;
import org.tizen.web.inspector.Activator;

public class RemoteInspectorAction
  implements IWorkbenchWindowActionDelegate
{
  public void run(IAction action)
  {
    IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    IWorkbenchPage page = null;
    if (workbenchWindow != null) {
      page = workbenchWindow.getActivePage();
    }
    if ((workbenchWindow == null) || (page == null))
    {
      Logger.error("Could not open editor", new Object[0]);
      return;
    }
    try
    {
      IPreferenceStore store = Activator.getDefault().getPreferenceStore();
      String urlString = store.getString("url_field");
      if ("".equals(urlString))
      {
        store.setDefault("url_field", "http://192.168.129.3:9222");
        urlString = store.getString("url_field");
      }
      URL url = new URI(urlString).toURL();
      WebBrowserEditorInput input = new WebBrowserEditorInput(url, 64);
      
      input.setName("Remote Inspector");
      
      page.openEditor(input, "org.tizen.web.inspector.RemoteInspectorEditorView");
    }
    catch (URISyntaxException e1)
    {
      Logger.error("uri syntaxException : ", e1);
    }
    catch (Exception e)
    {
      Logger.error("Could not open editor", e);
    }
  }
  
  public void selectionChanged(IAction action, ISelection selection) {}
  
  public void dispose() {}
  
  public void init(IWorkbenchWindow window) {}
}

/* Location:
 * Qualified Name:     org.tizen.web.actions.RemoteInspectorAction
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.inspector;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

public class Activator
  extends AbstractUIPlugin
{
  public static final String PLUGIN_ID = "org.tizen.web.inspector";
  private static Activator plugin;
  
  public void start(BundleContext context)
    throws Exception
  {
    super.start(context);
    plugin = this;
  }
  
  public void stop(BundleContext context)
    throws Exception
  {
    plugin = null;
    super.stop(context);
  }
  
  public static Activator getDefault()
  {
    return plugin;
  }
  
  public static ImageDescriptor getImageDescriptor(String path)
  {
    return imageDescriptorFromPlugin("org.tizen.web.inspector", path);
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.inspector.Activator
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.inspector;

import org.eclipse.osgi.util.NLS;

public class Messages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.tizen.web.inspector.messages";
  public static String FAIL_TO_START_INSPECTOR_BROWSER;
  public static String FAIL_TO_START_INSPECTOR_BROWSER_WIN;
  
  static
  {
    NLS.initializeMessages("org.tizen.web.inspector.messages", Messages.class);
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.inspector.Messages
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.inspector;

import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.swt.browser.StatusTextEvent;
import org.eclipse.swt.browser.StatusTextListener;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.internal.browser.IBrowserViewerContainer;

class RemoteInspectorBrowserViewer$1
  implements StatusTextListener
{
  RemoteInspectorBrowserViewer$1(RemoteInspectorBrowserViewer paramRemoteInspectorBrowserViewer) {}
  
  public void changed(StatusTextEvent event)
  {
    if (RemoteInspectorBrowserViewer.access$0(this$0) != null)
    {
      IStatusLineManager status = RemoteInspectorBrowserViewer.access$0(this$0).getActionBars()
        .getStatusLineManager();
      status.setMessage(text);
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.inspector.RemoteInspectorBrowserViewer.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.inspector;

import org.eclipse.swt.browser.OpenWindowListener;
import org.eclipse.swt.browser.WindowEvent;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.internal.browser.Messages;

class RemoteInspectorBrowserViewer$2
  implements OpenWindowListener
{
  RemoteInspectorBrowserViewer$2(RemoteInspectorBrowserViewer paramRemoteInspectorBrowserViewer) {}
  
  public void open(WindowEvent event)
  {
    Shell shell2 = new Shell(this$0.getShell(), 1264);
    shell2.setLayout(new FillLayout());
    shell2.setText(Messages.viewWebBrowserTitle);
    shell2.setImage(this$0.getShell().getImage());
    if (location != null) {
      shell2.setLocation(location);
    }
    if (size != null) {
      shell2.setSize(size);
    }
    int style = 0;
    if (RemoteInspectorBrowserViewer.access$1(this$0)) {
      style += 2;
    }
    if (RemoteInspectorBrowserViewer.access$2(this$0)) {
      style += 4;
    }
    RemoteInspectorBrowserViewer browser2 = new RemoteInspectorBrowserViewer(shell2, style);
    RemoteInspectorBrowserViewer.access$3(browser2, true);
    browser = RemoteInspectorBrowserViewer.access$4(browser2);
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.inspector.RemoteInspectorBrowserViewer.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.inspector;

import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.browser.VisibilityWindowListener;
import org.eclipse.swt.browser.WindowEvent;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;

class RemoteInspectorBrowserViewer$3
  implements VisibilityWindowListener
{
  RemoteInspectorBrowserViewer$3(RemoteInspectorBrowserViewer paramRemoteInspectorBrowserViewer) {}
  
  public void hide(WindowEvent e) {}
  
  public void show(WindowEvent e)
  {
    Browser browser2 = (Browser)widget;
    if ((browser2.getParent().getParent() instanceof Shell))
    {
      Shell shell = (Shell)browser2.getParent().getParent();
      if (location != null) {
        shell.setLocation(location);
      }
      if (size != null) {
        shell.setSize(shell.computeSize(size.x, size.y));
      }
      shell.open();
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.inspector.RemoteInspectorBrowserViewer.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.inspector;

import org.eclipse.swt.browser.CloseWindowListener;
import org.eclipse.swt.browser.WindowEvent;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.internal.browser.IBrowserViewerContainer;

class RemoteInspectorBrowserViewer$4
  implements CloseWindowListener
{
  RemoteInspectorBrowserViewer$4(RemoteInspectorBrowserViewer paramRemoteInspectorBrowserViewer) {}
  
  public void close(WindowEvent event)
  {
    if (RemoteInspectorBrowserViewer.access$5(this$0)) {
      this$0.getShell().dispose();
    } else {
      RemoteInspectorBrowserViewer.access$0(this$0).close();
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.inspector.RemoteInspectorBrowserViewer.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.inspector;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.swt.browser.ProgressEvent;
import org.eclipse.swt.browser.ProgressListener;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.internal.browser.BusyIndicator;
import org.eclipse.ui.internal.browser.IBrowserViewerContainer;

class RemoteInspectorBrowserViewer$5
  implements ProgressListener
{
  RemoteInspectorBrowserViewer$5(RemoteInspectorBrowserViewer paramRemoteInspectorBrowserViewer) {}
  
  public void changed(ProgressEvent event)
  {
    if (total == 0) {
      return;
    }
    boolean done = current == total;
    
    int percentProgress = current * 100 / total;
    if (RemoteInspectorBrowserViewer.access$0(this$0) != null)
    {
      IProgressMonitor monitor = RemoteInspectorBrowserViewer.access$0(this$0).getActionBars()
        .getStatusLineManager().getProgressMonitor();
      if (done)
      {
        monitor.done();
        RemoteInspectorBrowserViewer.access$6(this$0, 0);
      }
      else if (RemoteInspectorBrowserViewer.access$7(this$0) == 0)
      {
        monitor.beginTask("", total);
        RemoteInspectorBrowserViewer.access$6(this$0, percentProgress);
      }
      else
      {
        monitor.worked(current - RemoteInspectorBrowserViewer.access$7(this$0));
        RemoteInspectorBrowserViewer.access$6(this$0, current);
      }
    }
    if (RemoteInspectorBrowserViewer.access$2(this$0))
    {
      if ((!RemoteInspectorBrowserViewer.access$8(this$0).isBusy()) && (!done)) {
        RemoteInspectorBrowserViewer.access$9(this$0, true);
      } else if ((RemoteInspectorBrowserViewer.access$8(this$0).isBusy()) && (done)) {
        RemoteInspectorBrowserViewer.access$9(this$0, false);
      }
      RemoteInspectorBrowserViewer.access$10(this$0);
      RemoteInspectorBrowserViewer.access$11(this$0);
    }
  }
  
  public void completed(ProgressEvent event)
  {
    if (RemoteInspectorBrowserViewer.access$0(this$0) != null)
    {
      IProgressMonitor monitor = RemoteInspectorBrowserViewer.access$0(this$0).getActionBars()
        .getStatusLineManager().getProgressMonitor();
      monitor.done();
    }
    if (RemoteInspectorBrowserViewer.access$2(this$0))
    {
      RemoteInspectorBrowserViewer.access$9(this$0, false);
      RemoteInspectorBrowserViewer.access$10(this$0);
      RemoteInspectorBrowserViewer.access$11(this$0);
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.inspector.RemoteInspectorBrowserViewer.5
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.inspector;

import org.eclipse.swt.browser.LocationEvent;
import org.eclipse.swt.browser.LocationListener;
import org.eclipse.swt.widgets.Combo;

class RemoteInspectorBrowserViewer$6
  implements LocationListener
{
  RemoteInspectorBrowserViewer$6(RemoteInspectorBrowserViewer paramRemoteInspectorBrowserViewer) {}
  
  public void changed(LocationEvent event)
  {
    if (!top) {
      return;
    }
    if ((this$0.combo != null) && 
      (!"about:blank".equals(location)))
    {
      this$0.combo.setText(location);
      RemoteInspectorBrowserViewer.access$12(this$0, location);
      RemoteInspectorBrowserViewer.access$11(this$0);
    }
  }
  
  public void changing(LocationEvent event) {}
}

/* Location:
 * Qualified Name:     org.tizen.web.inspector.RemoteInspectorBrowserViewer.6
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.inspector;

import org.eclipse.swt.browser.TitleEvent;
import org.eclipse.swt.browser.TitleListener;

class RemoteInspectorBrowserViewer$7
  implements TitleListener
{
  RemoteInspectorBrowserViewer$7(RemoteInspectorBrowserViewer paramRemoteInspectorBrowserViewer) {}
  
  public void changed(TitleEvent event)
  {
    String oldTitle = RemoteInspectorBrowserViewer.access$13(this$0);
    RemoteInspectorBrowserViewer.access$14(this$0, title);
    RemoteInspectorBrowserViewer.access$15(this$0, "title", oldTitle, RemoteInspectorBrowserViewer.access$13(this$0));
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.inspector.RemoteInspectorBrowserViewer.7
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.inspector;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.swt.SWTError;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.browser.CloseWindowListener;
import org.eclipse.swt.browser.LocationEvent;
import org.eclipse.swt.browser.LocationListener;
import org.eclipse.swt.browser.OpenWindowListener;
import org.eclipse.swt.browser.ProgressEvent;
import org.eclipse.swt.browser.ProgressListener;
import org.eclipse.swt.browser.StatusTextEvent;
import org.eclipse.swt.browser.StatusTextListener;
import org.eclipse.swt.browser.TitleEvent;
import org.eclipse.swt.browser.TitleListener;
import org.eclipse.swt.browser.VisibilityWindowListener;
import org.eclipse.swt.browser.WindowEvent;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.help.IWorkbenchHelpSystem;
import org.eclipse.ui.internal.browser.BrowserText;
import org.eclipse.ui.internal.browser.BrowserViewer;
import org.eclipse.ui.internal.browser.BusyIndicator;
import org.eclipse.ui.internal.browser.IBrowserViewerContainer;
import org.eclipse.ui.internal.browser.Messages;
import org.eclipse.ui.internal.browser.WebBrowserUtil;

public class RemoteInspectorBrowserViewer
  extends BrowserViewer
{
  protected static final String PROPERTY_TITLE = "title";
  
  public RemoteInspectorBrowserViewer(Composite parent, int style)
  {
    super(parent, style);
    try
    {
      browser = new Browser(this, 65536);
    }
    catch (SWTError e)
    {
      if (code != 2)
      {
        WebBrowserUtil.openError(Messages.errorCouldNotLaunchInternalWebBrowser);
        return;
      }
      text = new BrowserText(this, this, e);
    }
    if (showURLbar) {
      updateHistory();
    }
    if (showToolbar) {
      updateBackNextBusy();
    }
    if (browser != null)
    {
      browser.setLayoutData(new GridData(1808));
      PlatformUI.getWorkbench().getHelpSystem().setHelp(browser, 
        "org.eclipse.ui.browser.browser_context");
    }
    else
    {
      text.getControl().setLayoutData(new GridData(1808));
    }
    addBrowserListeners();
  }
  
  private void addBrowserListeners()
  {
    if (browser == null) {
      return;
    }
    browser.addStatusTextListener(new StatusTextListener()
    {
      public void changed(StatusTextEvent event)
      {
        if (container != null)
        {
          IStatusLineManager status = container.getActionBars()
            .getStatusLineManager();
          status.setMessage(text);
        }
      }
    });
    browser.addOpenWindowListener(new OpenWindowListener()
    {
      public void open(WindowEvent event)
      {
        Shell shell2 = new Shell(getShell(), 1264);
        shell2.setLayout(new FillLayout());
        shell2.setText(Messages.viewWebBrowserTitle);
        shell2.setImage(getShell().getImage());
        if (location != null) {
          shell2.setLocation(location);
        }
        if (size != null) {
          shell2.setSize(size);
        }
        int style = 0;
        if (showURLbar) {
          style += 2;
        }
        if (showToolbar) {
          style += 4;
        }
        RemoteInspectorBrowserViewer browser2 = new RemoteInspectorBrowserViewer(shell2, style);
        newWindow = true;
        browser = browser;
      }
    });
    browser.addVisibilityWindowListener(new VisibilityWindowListener()
    {
      public void hide(WindowEvent e) {}
      
      public void show(WindowEvent e)
      {
        Browser browser2 = (Browser)widget;
        if ((browser2.getParent().getParent() instanceof Shell))
        {
          Shell shell = (Shell)browser2.getParent().getParent();
          if (location != null) {
            shell.setLocation(location);
          }
          if (size != null) {
            shell.setSize(shell.computeSize(size.x, size.y));
          }
          shell.open();
        }
      }
    });
    browser.addCloseWindowListener(new CloseWindowListener()
    {
      public void close(WindowEvent event)
      {
        if (newWindow) {
          getShell().dispose();
        } else {
          container.close();
        }
      }
    });
    browser.addProgressListener(new ProgressListener()
    {
      public void changed(ProgressEvent event)
      {
        if (total == 0) {
          return;
        }
        boolean done = current == total;
        
        int percentProgress = current * 100 / total;
        if (container != null)
        {
          IProgressMonitor monitor = container.getActionBars()
            .getStatusLineManager().getProgressMonitor();
          if (done)
          {
            monitor.done();
            progressWorked = 0;
          }
          else if (progressWorked == 0)
          {
            monitor.beginTask("", total);
            progressWorked = percentProgress;
          }
          else
          {
            monitor.worked(current - progressWorked);
            progressWorked = current;
          }
        }
        if (showToolbar)
        {
          if ((!busy.isBusy()) && (!done)) {
            loading = true;
          } else if ((busy.isBusy()) && (done)) {
            loading = false;
          }
          updateBackNextBusy();
          updateHistory();
        }
      }
      
      public void completed(ProgressEvent event)
      {
        if (container != null)
        {
          IProgressMonitor monitor = container.getActionBars()
            .getStatusLineManager().getProgressMonitor();
          monitor.done();
        }
        if (showToolbar)
        {
          loading = false;
          updateBackNextBusy();
          updateHistory();
        }
      }
    });
    if (showURLbar) {
      browser.addLocationListener(new LocationListener()
      {
        public void changed(LocationEvent event)
        {
          if (!top) {
            return;
          }
          if ((combo != null) && 
            (!"about:blank".equals(location)))
          {
            combo.setText(location);
            addToHistory(location);
            updateHistory();
          }
        }
        
        public void changing(LocationEvent event) {}
      });
    }
    browser.addTitleListener(new TitleListener()
    {
      public void changed(TitleEvent event)
      {
        String oldTitle = title;
        title = title;
        firePropertyChangeEvent("title", oldTitle, title);
      }
    });
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.inspector.RemoteInspectorBrowserViewer
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.inspector;

import java.io.File;
import java.io.PrintStream;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWTError;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IPathEditorInput;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.internal.browser.ImageResource;
import org.eclipse.ui.internal.browser.Trace;
import org.eclipse.ui.internal.browser.WebBrowserEditorInput;
import org.eclipse.ui.part.EditorPart;
import org.tizen.common.util.DialogUtil;
import org.tizen.common.util.OSChecker;
import org.tizen.common.util.log.Logger;

public class RemoteInspectorEditorView
  extends EditorPart
{
  public static final String WEB_BROWSER_EDITOR_ID = "org.tizen.web.inspector.RemoteInspectorEditorView";
  protected String initialURL;
  protected Browser browser;
  protected Image image;
  
  public void createPartControl(Composite parent)
  {
    try
    {
      browser = new Browser(parent, 65536);
      browser.setUrl(initialURL);
    }
    catch (SWTError e)
    {
      System.out.println("Could not instantiate Browser: " + e.getMessage());
      String title = "Could not instantiate Browser";
      String message = "";
      if (OSChecker.isWindows()) {
        message = e.getMessage() + "\n\n" + Messages.FAIL_TO_START_INSPECTOR_BROWSER_WIN;
      } else if ((OSChecker.isLinux()) || (OSChecker.isUnix())) {
        message = e.getMessage() + "\n\n" + Messages.FAIL_TO_START_INSPECTOR_BROWSER;
      }
      DialogUtil.openErrorDialog(new Shell(), title, message);
      return;
    }
  }
  
  public void doSave(IProgressMonitor monitor) {}
  
  public void doSaveAs() {}
  
  public void init(IEditorSite site, IEditorInput input)
    throws PartInitException
  {
    if ((input instanceof IPathEditorInput))
    {
      IPathEditorInput pei = (IPathEditorInput)input;
      IPath path = pei.getPath();
      URL url = null;
      try
      {
        if (path != null) {
          url = path.toFile().toURI().toURL();
        }
        initialURL = url.toExternalForm();
      }
      catch (MalformedURLException e)
      {
        Logger.log(e);
        Trace.trace(Trace.SEVERE, "Error getting URL to file");
      }
      if (browser != null)
      {
        if (initialURL != null) {
          browser.setUrl(initialURL);
        }
        site.getWorkbenchWindow().getActivePage().activate(this);
      }
      setPartName(path.lastSegment());
      if (url != null) {
        setTitleToolTip(url.getFile());
      }
      Image oldImage = image;
      ImageDescriptor id = ImageResource.getImageDescriptor("internalBrowser");
      image = id.createImage();
      
      setTitleImage(image);
      if ((oldImage != null) && (!oldImage.isDisposed())) {
        oldImage.dispose();
      }
    }
    else if ((input instanceof WebBrowserEditorInput))
    {
      WebBrowserEditorInput wbei = (WebBrowserEditorInput)input;
      initialURL = null;
      if (wbei.getURL() != null) {
        initialURL = wbei.getURL().toExternalForm();
      }
      if (browser != null)
      {
        browser.setUrl(initialURL);
        site.getWorkbenchWindow().getActivePage().activate(this);
      }
      setPartName(wbei.getName());
      setTitleToolTip(wbei.getToolTipText());
      
      Image oldImage = image;
      
      image = Activator.getImageDescriptor("icons/remote_Inspector_02_toolbar.png").createImage();
      
      setTitleImage(image);
      if ((oldImage != null) && (!oldImage.isDisposed())) {
        oldImage.dispose();
      }
    }
    else
    {
      IPathEditorInput pinput = (IPathEditorInput)input.getAdapter(IPathEditorInput.class);
      if (pinput != null) {
        init(site, pinput);
      } else {
        throw new PartInitException(NLS.bind(org.eclipse.ui.internal.browser.Messages.errorInvalidEditorInput, input.getName()));
      }
    }
    setSite(site);
    setInput(input);
  }
  
  public boolean isDirty()
  {
    return false;
  }
  
  public boolean isSaveAsAllowed()
  {
    return false;
  }
  
  public void setFocus() {}
}

/* Location:
 * Qualified Name:     org.tizen.web.inspector.RemoteInspectorEditorView
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.inspector;

import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

public class RemoteInspectorPreference
  extends PreferencePage
  implements IWorkbenchPreferencePage
{
  public static final String URL_FIELD_NAME = "url_field";
  public static final String defaultURL = "http://192.168.129.3:9222";
  private IPreferenceStore store;
  private StringFieldEditor urlField;
  
  public RemoteInspectorPreference()
  {
    setPreferenceStore(Activator.getDefault().getPreferenceStore());
    store = getPreferenceStore();
  }
  
  public void init(IWorkbench workbench)
  {
    if ("".equals(store.getString("url_field"))) {
      store.setDefault("url_field", "http://192.168.129.3:9222");
    }
  }
  
  protected Control createContents(Composite parent)
  {
    Composite composite = new Composite(parent, 0);
    composite.setFont(parent.getFont());
    
    GridLayout layout = new GridLayout();
    numColumns = 2;
    composite.setLayout(layout);
    
    GridData gridData = new GridData();
    verticalAlignment = 4;
    horizontalAlignment = 4;
    composite.setLayoutData(gridData);
    
    Label label = new Label(composite, 16384);
    label.setText("Remote Inspector Option");
    gridData = new GridData();
    horizontalSpan = 2;
    label.setLayoutData(gridData);
    
    urlField = new StringFieldEditor("url_field", "URL:", composite);
    urlField.setPreferenceStore(store);
    urlField.fillIntoGrid(composite, 2);
    urlField.setStringValue(store.getString("url_field"));
    
    return null;
  }
  
  public void createControl(Composite parent)
  {
    super.createControl(parent);
  }
  
  protected void performDefaults()
  {
    super.performDefaults();
    urlField.loadDefault();
  }
  
  protected void performApply()
  {
    super.performApply();
    store.setValue("url_field", urlField.getStringValue());
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.inspector.RemoteInspectorPreference
 * 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