org.tizen.nativecpp.apichecker.ui.cxx_2.0.0.201311042022

16:50:15.196 INFO  jd.cli.Main - Decompiling org.tizen.nativecpp.apichecker.ui.cxx_2.0.0.201311042022.jar
package org.tizen.nativecpp.apichecker.internal.ui.cxx;

import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

public class Activator
  extends AbstractUIPlugin
{
  public static final String PLUGIN_ID = "org.tizen.nativecpp.apichecker.internal.ui.cxx";
  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;
  }
}

/* Location:
 * Qualified Name:     org.tizen.nativecpp.apichecker.internal.ui.cxx.Activator
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.nativecpp.apichecker.internal.ui.cxx;

import java.io.File;
import java.net.URI;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
import org.eclipse.cdt.internal.ui.editor.CEditor;
import org.eclipse.cdt.internal.ui.text.ICReconcilingListener;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.ui.texteditor.ITextEditor;
import org.tizen.nativecpp.apichecker.core.cxx.CxxReconciler;
import org.tizen.nativecpp.apichecker.core.xmlstore.CheckerPropertyStore;

public class CReconciler
  implements ICReconcilingListener
{
  private CxxReconciler reconsiler = new CxxReconciler();
  
  void install(ITextEditor editor)
  {
    if ((editor instanceof CEditor))
    {
      initialize();
      ((CEditor)editor).addReconcileListener(this);
    }
  }
  
  void uninstall(ITextEditor editor)
  {
    if ((editor instanceof CEditor))
    {
      initialize();
      ((CEditor)editor).removeReconcileListener(this);
    }
  }
  
  private void initialize() {}
  
  public void aboutToBeReconciled() {}
  
  public void reconciled(IASTTranslationUnit ast, boolean force, IProgressMonitor progressMonitor)
  {
    if (force) {
      return;
    }
    if (ast == null) {
      return;
    }
    String filePath = ast.getFilePath();
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IWorkspaceRoot root = workspace.getRoot();
    
    URI uri = new File(filePath).toURI();
    IFile[] resources = root.findFilesForLocationURI(uri);
    if ((resources != null) && (resources.length > 0))
    {
      IFile resource = resources[0];
      IProject project = resource.getProject();
      
      CheckerPropertyStore store = new CheckerPropertyStore(project);
      if (store.doesCheckerLaunchWhileEditing()) {
        reconsiler.reconciledAst(ast, resource, progressMonitor);
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.nativecpp.apichecker.internal.ui.cxx.CReconciler
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.nativecpp.apichecker.internal.ui.cxx;

import org.eclipse.ui.IPartListener2;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartReference;
import org.eclipse.ui.texteditor.ITextEditor;

class Startup$1$1
  implements IPartListener2
{
  CReconciler reconsiler = new CReconciler();
  
  Startup$1$1(Startup.1 param1) {}
  
  public void partActivated(IWorkbenchPartReference partRef) {}
  
  public void partDeactivated(IWorkbenchPartReference partRef) {}
  
  public void partOpened(IWorkbenchPartReference partRef)
  {
    IWorkbenchPart editor = partRef.getPart(false);
    if ((editor instanceof ITextEditor)) {
      reconsiler.install((ITextEditor)editor);
    }
  }
  
  public void partHidden(IWorkbenchPartReference partRef) {}
  
  public void partVisible(IWorkbenchPartReference partRef) {}
  
  public void partClosed(IWorkbenchPartReference partRef)
  {
    IWorkbenchPart part = partRef.getPart(false);
    if ((part instanceof ITextEditor)) {
      reconsiler.uninstall((ITextEditor)part);
    }
  }
  
  public void partBroughtToTop(IWorkbenchPartReference partRef) {}
  
  public void partInputChanged(IWorkbenchPartReference partRef) {}
}

/* Location:
 * Qualified Name:     org.tizen.nativecpp.apichecker.internal.ui.cxx.Startup.1.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.nativecpp.apichecker.internal.ui.cxx;

import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IPartListener2;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartReference;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.texteditor.ITextEditor;

class Startup$1
  implements Runnable
{
  Startup$1(Startup paramStartup, IWorkbench paramIWorkbench) {}
  
  public void run()
  {
    IWorkbenchWindow active = val$workbench.getActiveWorkbenchWindow();
    IWorkbenchPage page = active.getActivePage();
    IPartListener2 partListener = new IPartListener2()
    {
      CReconciler reconsiler = new CReconciler();
      
      public void partActivated(IWorkbenchPartReference partRef) {}
      
      public void partDeactivated(IWorkbenchPartReference partRef) {}
      
      public void partOpened(IWorkbenchPartReference partRef)
      {
        IWorkbenchPart editor = partRef.getPart(false);
        if ((editor instanceof ITextEditor)) {
          reconsiler.install((ITextEditor)editor);
        }
      }
      
      public void partHidden(IWorkbenchPartReference partRef) {}
      
      public void partVisible(IWorkbenchPartReference partRef) {}
      
      public void partClosed(IWorkbenchPartReference partRef)
      {
        IWorkbenchPart part = partRef.getPart(false);
        if ((part instanceof ITextEditor)) {
          reconsiler.uninstall((ITextEditor)part);
        }
      }
      
      public void partBroughtToTop(IWorkbenchPartReference partRef) {}
      
      public void partInputChanged(IWorkbenchPartReference partRef) {}
    };
    page.addPartListener(partListener);
    
    IEditorReference[] editorReferences = page
      .getEditorReferences();
    for (int i = 0; i < editorReferences.length; i++)
    {
      IEditorReference ref = editorReferences[i];
      partListener.partOpened(ref);
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.nativecpp.apichecker.internal.ui.cxx.Startup.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.nativecpp.apichecker.internal.ui.cxx;

import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IPartListener2;
import org.eclipse.ui.IStartup;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartReference;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.texteditor.ITextEditor;

public class Startup
  implements IStartup
{
  public void earlyStartup()
  {
    registerListeners();
  }
  
  private void registerListeners()
  {
    final IWorkbench workbench = PlatformUI.getWorkbench();
    workbench.getDisplay().asyncExec(new Runnable()
    {
      public void run()
      {
        IWorkbenchWindow active = workbench.getActiveWorkbenchWindow();
        IWorkbenchPage page = active.getActivePage();
        IPartListener2 partListener = new IPartListener2()
        {
          CReconciler reconsiler = new CReconciler();
          
          public void partActivated(IWorkbenchPartReference partRef) {}
          
          public void partDeactivated(IWorkbenchPartReference partRef) {}
          
          public void partOpened(IWorkbenchPartReference partRef)
          {
            IWorkbenchPart editor = partRef.getPart(false);
            if ((editor instanceof ITextEditor)) {
              reconsiler.install((ITextEditor)editor);
            }
          }
          
          public void partHidden(IWorkbenchPartReference partRef) {}
          
          public void partVisible(IWorkbenchPartReference partRef) {}
          
          public void partClosed(IWorkbenchPartReference partRef)
          {
            IWorkbenchPart part = partRef.getPart(false);
            if ((part instanceof ITextEditor)) {
              reconsiler.uninstall((ITextEditor)part);
            }
          }
          
          public void partBroughtToTop(IWorkbenchPartReference partRef) {}
          
          public void partInputChanged(IWorkbenchPartReference partRef) {}
        };
        page.addPartListener(partListener);
        
        IEditorReference[] editorReferences = page
          .getEditorReferences();
        for (int i = 0; i < editorReferences.length; i++)
        {
          IEditorReference ref = editorReferences[i];
          partListener.partOpened(ref);
        }
      }
    });
  }
}

/* Location:
 * Qualified Name:     org.tizen.nativecpp.apichecker.internal.ui.cxx.Startup
 * 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