Example #1
0
  /**
   * 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();
  }
  public void start(BundleContext context) throws Exception {
    super.start(context);

    ComparePlugin.getDefault()
        .setCappingDisabled(
            getPreferenceStore().getBoolean(ComparePreferencePage.CAPPING_DISABLED));
  }
Example #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);
  }
 @Override
 public void start(BundleContext context) throws Exception {
   instance = this;
   super.start(context);
   URL url = getBundle().getEntry("/templates");
   templateRoot = FileLocator.toFileURL(url).getPath();
 }
Example #5
0
 /**
  * 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);
 }
Example #6
0
  @Override
  public void start(BundleContext context) throws Exception {
    super.start(context);
    fgModel = new Model();

    System.out.println("Starting the OSC core plugin");
  }
Example #7
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;

    Job job = new CSSMetadataLoader();
    job.schedule();
  }
Example #8
0
 @Override
 public void start(BundleContext context) throws Exception {
   super.start(context);
   IPrologProcessService prologProcessService =
       PDTConnectorPlugin.getDefault().getPrologProcessService();
   prologProcessService.registerPDTReloadExecutor(new ConsoleReloadExecutor());
 }
Example #9
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;
   GLLogger.infoUser(
       "starting the examples plugin which proposes the creation of examples of workflows",
       getClass());
 }
Example #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$
  }
 /*
  * (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);
 }
Example #12
0
  /*
   * (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();
  }
Example #13
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;
    // 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;
    //				}
    //			}
    //		}

  }
Example #14
0
 /*
  * (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();
 }
Example #15
0
  @Override
  public void start(BundleContext context) throws Exception {
    super.start(context);
    plugin = this;

    coreModel = CoreModel.getDefault();
    coreModel.startup();
  }
  /*
   * (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);
  }
Example #17
0
  /**
   * @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();
  } //
Example #18
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;

    proverProcessSupport = new ZEvesProcessSupport();
    editTracker = new ZEditorEditTracker();
    editTracker.init();
  }
Example #19
0
 public void start(final BundleContext context) throws Exception {
   super.start(context);
   traceVerbose = isOptionSet("/trace/verbose");
   setupSSH(context);
   setupProxy(context);
   setupRepoChangeScanner();
   setupRepoIndexRefresh();
 }
  /* (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();
  }
Example #21
0
 @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();
 }
Example #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"));
 }
Example #23
0
  @Override
  public void start(final BundleContext context) throws Exception {

    super.start(context);

    _instance = this;
    _bundleContext = context;
  }
Example #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);
 }
Example #25
0
  @Override
  public void start(BundleContext context) throws Exception {
    pluginInstance = this;
    super.start(context);

    doCustomStart_initialStage(context);
    doCustomStart_startTwinPlugins();
    doCustomStart_finalStage();
  }
Example #26
0
  /*
   * (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();
  }
  /*
   * (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;
  }
  /*
   * (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);
  }
Example #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();
 }
Example #30
0
  /** 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();
  }