コード例 #1
0
ファイル: ErlideUIPlugin.java プロジェクト: xingbei437/erlide
  /**
   * This method is called upon plug-in activation
   *
   * @param context The context
   * @throws Exception if a problem occurs
   */
  @Override
  public void start(final BundleContext context) throws Exception {
    ErlLogger.debug("Starting UI " + Thread.currentThread());
    super.start(context);

    if (SystemConfiguration.getInstance().isDeveloper()) {
      BackendManagerPopup.init();
    }

    loadDefaultEditorColors();

    ErlLogger.debug("Started UI");

    erlConsoleManager = new ErlConsoleManager();
    if (SystemConfiguration.getInstance().isDeveloper()) {
      try {
        final IBackend ideBackend = BackendCore.getBackendManager().getIdeBackend();
        if (!ideBackend.getData().hasConsole()) {
          erlConsoleManager.runtimeAdded(ideBackend);
        }
      } catch (final Exception e) {
        ErlLogger.warn(e);
      }
    }

    erlangDebuggerBackendListener = new ErlangDebuggerBackendListener();
    BackendCore.getBackendManager().addBackendListener(erlangDebuggerBackendListener);

    startPeriodicCacheCleaner();
  }
コード例 #2
0
  public void start(BundleContext context) throws Exception {
    super.start(context);

    ComparePlugin.getDefault()
        .setCappingDisabled(
            getPreferenceStore().getBoolean(ComparePreferencePage.CAPPING_DISABLED));
  }
コード例 #3
0
  /*
   * (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;

    // The EcorePlugin Activator tries to open the workspace, but the
    // workspace
    // is only set when the application inisitalized, if the plugin is
    // self-starting
    // this will thrown an exception that the data area is not set.

    //		System.getProperties()
    //				.setProperty(
    //						"org.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin",
    //						"false");

    // As we auto start this plugin, and EMF requires a workspace, in it'c
    // core
    // plugin.
    pu.readProperties(this.getBundle(), propertiesFile, getProperties());

    injector = Guice.createInjector(osgiModule(context), new ProductModule());

    // TODO, Export with Peaberry.

    final IWorkbenchService instance = injector.getInstance(IWorkbenchService.class);

    // Register our product workbench service to customize the application
    // at startup.
    workbenchService = context.registerService(IWorkbenchService.class, instance, null);
  }
コード例 #4
0
 @Override
 public void start(BundleContext context) throws Exception {
   instance = this;
   super.start(context);
   URL url = getBundle().getEntry("/templates");
   templateRoot = FileLocator.toFileURL(url).getPath();
 }
コード例 #5
0
ファイル: Activator.java プロジェクト: go2zo/flaming-bear
 /**
  * Start.
  *
  * @param context the context
  * @throws Exception the exception
  * @generated
  */
 @Override
 public void start(BundleContext context) throws Exception {
   super.start(context);
   PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
   plugin = this;
   log = new LogHelper(plugin);
 }
コード例 #6
0
  @Override
  public void start(BundleContext context) throws Exception {
    super.start(context);
    fgModel = new Model();

    System.out.println("Starting the OSC core plugin");
  }
コード例 #7
0
ファイル: CSSPlugin.java プロジェクト: arcaneadam/studio3
  /*
   * (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;

    Job job = new CSSMetadataLoader();
    job.schedule();
  }
コード例 #8
0
ファイル: PrologConsolePlugin.java プロジェクト: zahn/public
 @Override
 public void start(BundleContext context) throws Exception {
   super.start(context);
   IPrologProcessService prologProcessService =
       PDTConnectorPlugin.getDefault().getPrologProcessService();
   prologProcessService.registerPDTReloadExecutor(new ConsoleReloadExecutor());
 }
コード例 #9
0
ファイル: Activator.java プロジェクト: samthiriot/genlab
 /*
  * (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;
   GLLogger.infoUser(
       "starting the examples plugin which proposes the creation of examples of workflows",
       getClass());
 }
コード例 #10
0
  /*
   * (non-Javadoc)
   * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
   */
  @Override
  public void start(BundleContext context) throws Exception {
    fgBundleContext = context;
    super.start(context);
    DEBUG =
        "true"
            .equals(
                Platform.getDebugOption(
                    "org.eclipse.cdt.dsf.ui/debug")); //$NON-NLS-1$//$NON-NLS-2$

    fSourceDocumentProvider = new SourceDocumentProvider();

    EvaluationContextManager.startup();

    // Register the DSF backend for our disassembly view (the CDT debug UI
    // plugin registers the CDI one)
    Platform.getAdapterManager()
        .registerAdapters(new DisassemblyBackendDsfFactory(), IDMVMContext.class);
    // Register the factory that provides descriptions of stack frames
    // to the CSourceNotFoundEditor.
    Platform.getAdapterManager()
        .registerAdapters(new CSourceNotFoundDescriptionFactory(), IFrameDMContext.class);

    DsfDebugUITools.enableActivity("org.eclipse.cdt.debug.ui.cdtActivity", true); // $NON-NLS-1$
  }
コード例 #11
0
 /*
  * (non-Javadoc)
  * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
  */
 public void start(BundleContext context) throws Exception {
   super.start(context);
   getPreferenceStore().setDefault(USERNAME, DEFAULT_USERNAME);
   getPreferenceStore().setDefault(PASSWORD, DEFAULT_PASSWORD);
   getPreferenceStore().setDefault(TAG_FILTER, DEFAULT_TAG_FILTER);
   getPreferenceStore().setDefault(URL_FILTER, DEFAULT_URL_FILTER);
 }
コード例 #12
0
ファイル: Q7UIPlugin.java プロジェクト: xored/rcptt
  /*
   * (non-Javadoc)
   *
   * @see
   * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
   * )
   */
  @Override
  public void start(BundleContext context) throws Exception {
    super.start(context);
    plugin = this;

    tags = TagsFactory.eINSTANCE.createTagsRegistry();
  }
コード例 #13
0
ファイル: Activator.java プロジェクト: wowi/jLEIBnix
  /*
   * (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;
    // create a new RobotDeviceListener
    Bundle[] bundles = context.getBundles();
    // ("org.eclipse.equinox.event");
    Bundle r_osgi = null;
    for (int i = 0; i < bundles.length; i++) {
      Bundle bundle = bundles[i];
      System.out.println("Bundle.getSymbolicName(): " + bundle.getSymbolicName());
      if ("org.eclipse.equinox.event".equals(bundle.getSymbolicName())) {
        bundle.start();
      } else if ("org.eclipse.equinox.log".equals(bundle.getSymbolicName())) {
        bundle.start();
      } else if ("ch.ethz.iks.r_osgi.remote".equals(bundle.getSymbolicName())) {
        r_osgi = bundle;
      } else if ("org.leibnix.device.clocktimer.interfaces".equals(bundle.getSymbolicName())) {
        bundle.start();
      }
    }
    if (r_osgi != null) {
      r_osgi.start();
    }
    // ServiceReference ref = context
    // .getServiceReference(RemoteOSGiService.class.getName());
    // if (ref != null) {
    // remote = (RemoteOSGiService) context.getService(ref);
    //
    // DeviceListener listener = new DeviceListener(context, remote);
    //
    // // register for discovery
    // context.registerService(DiscoveryListener.class.getName(),
    // listener, null);
    // }

    //		ServiceReference ref = context
    //				.getServiceReference(RemoteOSGiService.class.getName());
    //		if (ref != null) {
    //			RemoteOSGiService rs = (RemoteOSGiService) context.getService(ref);
    //			ServiceURL[] serviceURLs = rs.connect(InetAddress.getLocalHost(),
    //					9278, null); // FIXME use remote host from preferences
    //
    //			for (ServiceURL service : serviceURLs) {
    //				ServiceType serviceType = service.getServiceType();
    //
    //				System.out.println(serviceType.getConcreteTypeName());
    //				if (serviceType.getConcreteTypeName().endsWith("ClockTimer")) {
    //					rs.fetchService(service);
    //					Object remoteService = rs.getFetchedService(service);
    //					// if (remoteService instanceof IClockTimer) {
    //						IClockTimer clock = (IClockTimer) remoteService;
    //						clock.addTimer("1");
    //					// }
    //					break;
    //				}
    //			}
    //		}

  }
コード例 #14
0
ファイル: Activator.java プロジェクト: nbguzman/linuxtools
 /*
  * (non-Javadoc)
  * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
  */
 @Override
 public void start(BundleContext context) throws Exception {
   super.start(context);
   RpmPackageBuildProposalsJob.setPropertyChangeListener(true);
   RpmPackageBuildProposalsJob.update();
   // Do some sanity checks.
   UiUtils.pluginSanityCheck();
 }
コード例 #15
0
ファイル: MaruCorePlugin.java プロジェクト: vobject/maru
  @Override
  public void start(BundleContext context) throws Exception {
    super.start(context);
    plugin = this;

    coreModel = CoreModel.getDefault();
    coreModel.startup();
  }
コード例 #16
0
  /*
   * (non-Javadoc)
   *
   * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
   */
  public void start(BundleContext bundleContext) throws Exception {
    super.start(bundleContext);

    plugin = this;
    ProvUIActivator.context = bundleContext;
    packageAdminRef = bundleContext.getServiceReference(PackageAdmin.class.getName());
    packageAdmin = (PackageAdmin) bundleContext.getService(packageAdminRef);
  }
コード例 #17
0
ファイル: Activator.java プロジェクト: teropa/stem
  /**
   * @param context
   * @throws Exception
   */
  public void start(BundleContext context) throws Exception {
    super.start(context);
    // We create these instances so that their constructors run and they
    // then add themselves to a collection of factories maintained by the
    // factory interfaces they implement respectively.

    new MultipopulationPopulationEnumeratorAdapterFactory();
  } //
コード例 #18
0
ファイル: ZEvesUIPlugin.java プロジェクト: pollow/czt
  /*
   * (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;

    proverProcessSupport = new ZEvesProcessSupport();
    editTracker = new ZEditorEditTracker();
    editTracker.init();
  }
コード例 #19
0
ファイル: Activator.java プロジェクト: sonatype/JGit
 public void start(final BundleContext context) throws Exception {
   super.start(context);
   traceVerbose = isOptionSet("/trace/verbose");
   setupSSH(context);
   setupProxy(context);
   setupRepoChangeScanner();
   setupRepoIndexRefresh();
 }
コード例 #20
0
  /* (non-Javadoc)
   * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
   */
  @Override
  public void start(BundleContext context) throws Exception {
    super.start(context);
    fLogFileProvider = new PDELogFileProvider();
    LogFilesManager.addLogFileProvider(fLogFileProvider);

    TargetStatus.initializeTargetStatus();
  }
コード例 #21
0
ファイル: TasksPlugin.java プロジェクト: brl/netifera
 @Override
 public void start(BundleContext context) throws Exception {
   super.start(context);
   plugin = this;
   imageCache = new ImageCache(PLUGIN_ID);
   probeManagerTracker = new ServiceTracker(context, IProbeManagerService.class.getName(), null);
   probeManagerTracker.open();
 }
コード例 #22
0
 /*
  * (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;
   viewpoints = new HashSet<Viewpoint>();
   viewpoints.addAll(
       ViewpointRegistry.getInstance()
           .registerFromPlugin(PLUGIN_ID + "/description/PropertiesTests.odesign"));
 }
コード例 #23
0
ファイル: TourbookPlugin.java プロジェクト: martoe/mytourbook
  @Override
  public void start(final BundleContext context) throws Exception {

    super.start(context);

    _instance = this;
    _bundleContext = context;
  }
コード例 #24
0
 /**
  * Start method of RCP application.
  *
  * @param context context.
  * @throws Exception exception.
  */
 @Override
 public final void start(final BundleContext context) throws Exception {
   super.start(context);
   plugin = this;
   //			IStatus status = new Status(IStatus.ERROR,Activator.PLUGIN_ID, "AE_HOME: " + AE_HOME);
   //			ILog iLogger = org.bbaw.pdr.ae.view.Activator.getILogger();
   //			iLogger.log(status);
 }
コード例 #25
0
ファイル: LangUIPlugin.java プロジェクト: peteyan/goclipse
  @Override
  public void start(BundleContext context) throws Exception {
    pluginInstance = this;
    super.start(context);

    doCustomStart_initialStage(context);
    doCustomStart_startTwinPlugins();
    doCustomStart_finalStage();
  }
コード例 #26
0
ファイル: WakaTime.java プロジェクト: isopropylcyanide/prog
  /*
   * (non-Javadoc)
   * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
   */
  public void start(BundleContext context) throws Exception {
    logInstance = getLog();
    WakaTime.log("Initializing WakaTime plugin (https://wakatime.com) v" + VERSION);

    super.start(context);
    plugin = this;

    editorListener = new CustomEditorListener();
  }
コード例 #27
0
  /*
   * (non-Javadoc)
   * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
   */
  public void start(final BundleContext context) throws Exception {
    super.start(context);

    for (final Map.Entry<Class<?>, IAdapterFactory> entry : this.adaperFactories.entrySet()) {
      Platform.getAdapterManager().registerAdapters(entry.getValue(), entry.getKey());
    }

    plugin = this;
  }
コード例 #28
0
  /*
   * (non-Javadoc)
   * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
   */
  public void start(BundleContext context) throws Exception {
    System.out.println("start plugin " + PLUGIN_ID);
    super.start(context);
    plugin = this;
    Bundle bundle = Platform.getBundle(Platform.PI_RUNTIME);
    log = Platform.getLog(bundle);

    registerEventHandler(context);
  }
コード例 #29
0
 /** @generated */
 @Override
 public void start(BundleContext context) throws Exception {
   super.start(context);
   instance = this;
   PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
   adapterFactory = createAdapterFactory();
   DiagramPreferenceInitializer diagramPreferenceInitializer = new DiagramPreferenceInitializer();
   diagramPreferenceInitializer.initializeDefaultPreferences();
 }
コード例 #30
0
ファイル: DLTKUIPlugin.java プロジェクト: earlyster/dltk.core
  /** This method is called upon plug-in activation */
  public void start(BundleContext context) throws Exception {
    super.start(context);

    WorkingCopyOwner.setPrimaryBufferProvider(
        new WorkingCopyOwner() {
          public IBuffer createBuffer(ISourceModule workingCopy) {
            ISourceModule original = workingCopy.getPrimary();
            IResource resource = original.getResource();
            if (resource != null) {
              if (resource instanceof IFile) {
                return new DocumentAdapter(workingCopy, (IFile) resource);
              }
            } else if (original instanceof IExternalSourceModule) {
              IProjectFragment fragment =
                  (IProjectFragment) original.getAncestor(IModelElement.PROJECT_FRAGMENT);
              if (!fragment.isArchive()) {
                // IPath path = original.getPath();
                // return new DocumentAdapter(workingCopy, path);
                return BufferManager.createBuffer(original);
              }
              return BufferManager.createBuffer(original);
            }

            if (original instanceof DBGPSourceModule) {
              return BufferManager.createBuffer(original);
            }

            if (original instanceof BuiltinSourceModule) {
              // IPath path = original.getPath();
              // return new DocumentAdapter(workingCopy, path);
              return BufferManager.createBuffer(original);
            }
            return DocumentAdapter.NULL;
          }
        });

    // must add here to guarantee that it is the first in the listener list

    IPreferenceStore store = getPreferenceStore();
    fMembersOrderPreferenceCache = new MembersOrderPreferenceCache();
    fMembersOrderPreferenceCache.install(store);

    // to initialize launching
    DLTKLaunchingPlugin.getDefault();

    // Close all open editors which has remote environment files open
    try {
      PlatformUI.getWorkbench().addWorkbenchListener(new ShutdownCloseRemoteEditorsListener());
      ContextActivator.getInstance().install();
    } catch (IllegalStateException e) {
      // IGNORE: workbench has not been created yet.
    }

    ExecutionContexts.setManager(new UIExecutionContextManager());
    new InitializeJob().schedule();
  }