public IProduct getProduct() { if (product != null) return product; EclipseAppContainer container = Activator.getContainer(); IBranding branding = container == null ? null : container.getBranding(); if (branding == null) return null; Object brandingProduct = branding.getProduct(); if (!(brandingProduct instanceof IProduct)) brandingProduct = new Product(branding); product = (IProduct) brandingProduct; return product; }
private void loadProperties(IConfigurationElement element) { IConfigurationElement[] children = element.getChildren(); properties = new HashMap(children.length); for (int i = 0; i < children.length; i++) { IConfigurationElement child = children[i]; String key = child.getAttribute(ATTR_NAME); String value = child.getAttribute(ATTR_VALUE); if (key != null && value != null) properties.put(key, value); } definingBundle = Activator.getBundle(element.getContributor()); }
@Override public Object addingService(ServiceReference reference) { return Activator.getContext().getService(reference); }
public void run() { try { // pasing null will cause EclipseAppHandle to get the correct arguments appHandle.run(null); } catch (Throwable e) { Activator.log(new FrameworkLogEntry(Activator.PI_APP, FrameworkLogEntry.ERROR, 0, e.getMessage(), 0, e, null)); } }
@Override public void start(BundleContext bc) { _context = bc; // doing simple get service here because we expect the PackageAdmin service to always be available ServiceReference ref = bc.getServiceReference(PackageAdmin.class.getName()); if (ref != null) _packageAdmin = (PackageAdmin) bc.getService(ref); _frameworkLogTracker = new ServiceTracker(bc, FrameworkLog.class.getName(), null); _frameworkLogTracker.open(); getDebugOptions(bc); processCommandLineArgs(bc); // set the app manager context before starting the container AppPersistence.start(bc); // we must have an extension registry started before we can start the container registryTracker = new ServiceTracker(bc, IExtensionRegistry.class.getName(), this); registryTracker.open(); // start the app commands for the console try { AppCommands.create(bc); } catch (NoClassDefFoundError e) { // catch incase CommandProvider is not available } }
private void processCommandLineArgs(BundleContext bc) { EnvironmentInfo envInfo = Activator.getEnvironmentInfo(); if (envInfo != null) CommandLineArgs.processCommandLine(envInfo); }
private String getLocation() { if (contributor == null) return ""; //$NON-NLS-1$ return Activator.getLocation(contributor); }
EclipseScheduledApplication(BundleContext context, String id, String appPid, Map args, String topic, String eventFilter, boolean recurring) throws InvalidSyntaxException { this.id = id; this.appPid = appPid; this.args = args; this.topic = topic == null || topic.trim().equals("") || topic.trim().equals("*") ? null : topic; //$NON-NLS-1$ //$NON-NLS-2$ this.eventFilter = eventFilter; this.recurring = recurring; appTracker = new ServiceTracker(context, context.createFilter(FILTER_PREFIX + appPid + FILTER_POSTFIX), null); Activator.openTracker(appTracker, false); }
@Override public synchronized ApplicationDescriptor getApplicationDescriptor() { if (removed) throw new IllegalStateException(Messages.scheduled_app_removed); return (ApplicationDescriptor) Activator.getService(appTracker); }
@Override public void run() { try { // pasing null will cause EclipseAppHandle to get the correct arguments appHandle.run(null); } catch (Throwable e) { Activator.log(new FrameworkLogEntry(Activator.PI_APP, FrameworkLogEntry.ERROR, 0, e.getMessage(), 0, e, null)); } }
public void start(BundleContext bc) { _context = bc; // doing simple get service here because we expect the PackageAdmin service to always be available ServiceReference ref = bc.getServiceReference(PackageAdmin.class.getName()); if (ref != null) _packageAdmin = (PackageAdmin) bc.getService(ref); _frameworkLogTracker = new ServiceTracker(bc, FrameworkLog.class.getName(), null); _frameworkLogTracker.open(); getDebugOptions(bc); processCommandLineArgs(bc); // set the app manager context before starting the container AppPersistence.start(bc); // we must have an extension registry started before we can start the container registryTracker = new ServiceTracker(bc, IExtensionRegistry.class.getName(), this); registryTracker.open(); // start the app commands for the console try { AppCommands.create(bc); } catch (NoClassDefFoundError e) { // catch incase CommandProvider is not available } }
private void processCommandLineArgs(BundleContext bc) { EnvironmentInfo envInfo = Activator.getEnvironmentInfo(); if (envInfo != null) CommandLineArgs.processCommandLine(envInfo); }
private String getLocation() { if (contributor == null) return ""; //$NON-NLS-1$ return Activator.getLocation(contributor); }
EclipseScheduledApplication(BundleContext context, String id, String appPid, Map args, String topic, String eventFilter, boolean recurring) throws InvalidSyntaxException { this.id = id; this.appPid = appPid; this.args = args; this.topic = topic == null || topic.trim().equals("") || topic.trim().equals("*") ? null : topic; //$NON-NLS-1$ //$NON-NLS-2$ this.eventFilter = eventFilter; this.recurring = recurring; appTracker = new ServiceTracker(context, context.createFilter(FILTER_PREFIX + appPid + FILTER_POSTFIX), null); Activator.openTracker(appTracker, false); }
public synchronized ApplicationDescriptor getApplicationDescriptor() { if (removed) throw new IllegalStateException(Messages.scheduled_app_removed); return (ApplicationDescriptor) Activator.getService(appTracker); }
public void run() { try { // pasing null will cause EclipseAppHandle to get the correct arguments appHandle.run(null); } catch (Throwable e) { Activator.log(new FrameworkLogEntry(Activator.PI_APP, FrameworkLogEntry.ERROR, 0, e.getMessage(), 0, e, null)); } }
public Object addingService(ServiceReference reference) { return Activator.getContext().getService(reference); }
public void start(BundleContext bc) { _context = bc; // doing simple get service here because we expect the PackageAdmin service to always be available ServiceReference ref = bc.getServiceReference(PackageAdmin.class.getName()); if (ref != null) _packageAdmin = (PackageAdmin) bc.getService(ref); _frameworkLogTracker = new ServiceTracker(bc, FrameworkLog.class.getName(), null); _frameworkLogTracker.open(); getDebugOptions(bc); processCommandLineArgs(bc); // set the app manager context before starting the container AppPersistence.start(bc); // we must have an extension registry started before we can start the container registryTracker = new ServiceTracker(bc, IExtensionRegistry.class.getName(), this); registryTracker.open(); // start the app commands for the console try { AppCommands.create(bc); } catch (NoClassDefFoundError e) { // catch incase CommandProvider is not available } }
public IProduct getProduct() { if (product != null) return product; EclipseAppContainer container = Activator.getContainer(); IBranding branding = container == null ? null : container.getBranding(); if (branding == null) return null; Object brandingProduct = branding.getProduct(); if (!(brandingProduct instanceof IProduct)) brandingProduct = new Product(branding); product = (IProduct) brandingProduct; return product; }
private void processCommandLineArgs(BundleContext bc) { EnvironmentInfo envInfo = Activator.getEnvironmentInfo(); if (envInfo != null) CommandLineArgs.processCommandLine(envInfo); }