当前位置: 首页>>代码示例>>Java>>正文


Java DebugOptions类代码示例

本文整理汇总了Java中org.eclipse.osgi.service.debug.DebugOptions的典型用法代码示例。如果您正苦于以下问题:Java DebugOptions类的具体用法?Java DebugOptions怎么用?Java DebugOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DebugOptions类属于org.eclipse.osgi.service.debug包,在下文中一共展示了DebugOptions类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: start

import org.eclipse.osgi.service.debug.DebugOptions; //导入依赖的package包/类
@Override
public void start(final BundleContext context) throws Exception {
	super.start(context);
	plugin = this;

	// need to do this later if all debug options are initialized properly
	Job job = new Job("Registering trace listener") { //$NON-NLS-1$
		@Override
		protected IStatus run(IProgressMonitor monitor) {
			Dictionary<String, String> props = new Hashtable<String, String>(1, 1);
			props.put(DebugOptions.LISTENER_SYMBOLICNAME, PLUGIN_ID);
			context.registerService(DebugOptionsListener.class.getName(), Activator.this, props);
			return Status.OK_STATUS;
		}
	};
	job.setSystem(true);
	job.schedule();

	getPreferenceStore().addPropertyChangeListener(plugin);

	if (isEnabled()) {
		ICommandService cmdService = (ICommandService) getWorkbench().getService(ICommandService.class);
		cmdService.addExecutionListener(plugin);
	}
}
 
开发者ID:chgeo,项目名称:show-shortcuts,代码行数:26,代码来源:Activator.java

示例2: MassifTracerManager

import org.eclipse.osgi.service.debug.DebugOptions; //导入依赖的package包/类
public MassifTracerManager(BundleContext context) {
    tracers = Maps.newHashMap();
    final Hashtable<String, String> properties = new Hashtable<String, String>(4);
    properties.put(DebugOptions.LISTENER_SYMBOLICNAME, MassifCommonPlugin.PLUGIN_ID);
    DebugOptionsListener debugOptionsListener = new DebugOptionsListener() {

        @Override
        public void optionsChanged(DebugOptions options) {
            boolean globalOption = options.getBooleanOption(MassifTracerOptions.GLOBAL.getFullTraceOption(),
                false);
            for (MassifTracerOptions existingTracerOption : tracers.keySet()) {
                boolean debugOption = globalOption
                        && options.getBooleanOption(existingTracerOption.getFullTraceOption(), false);
                tracers.get(existingTracerOption).setTracingEnabled(debugOption);
            }
        }

    };
    listenerService = context.registerService(DebugOptionsListener.class.getName(), debugOptionsListener,
        properties);
}
 
开发者ID:viatra,项目名称:massif,代码行数:22,代码来源:MassifTracerManager.java

示例3: isManaged

import org.eclipse.osgi.service.debug.DebugOptions; //导入依赖的package包/类
public static boolean isManaged() {
  BundleContext context = FrameworkUtil.getBundle(CloudSdkManager.class).getBundleContext();
  DebugOptions debugOptions = context.getService(context.getServiceReference(DebugOptions.class));
  if (debugOptions != null) {
    return debugOptions.getBooleanOption(OPTION_MANAGED_CLOUD_SDK, false);
  }
  return false;
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:9,代码来源:CloudSdkManager.java

示例4: optionsChanged

import org.eclipse.osgi.service.debug.DebugOptions; //导入依赖的package包/类
public void optionsChanged(DebugOptions options) {

		Logger.ERROR = options.getBooleanOption(CloudFoundryServerUiPlugin.PLUGIN_ID + Logger.ERROR_LEVEL, false);
		Logger.WARNING = options.getBooleanOption(CloudFoundryServerUiPlugin.PLUGIN_ID + Logger.WARNING_LEVEL, false);
		Logger.INFO = options.getBooleanOption(CloudFoundryServerUiPlugin.PLUGIN_ID + Logger.INFO_LEVEL, false);
		Logger.DETAILS = options.getBooleanOption(CloudFoundryServerUiPlugin.PLUGIN_ID + Logger.DETAILS_LEVEL, false);
	}
 
开发者ID:eclipse,项目名称:cft,代码行数:8,代码来源:Logger.java

示例5: optionsChanged

import org.eclipse.osgi.service.debug.DebugOptions; //导入依赖的package包/类
public void optionsChanged(DebugOptions options) {

		Logger.ERROR = options.getBooleanOption(CloudFoundryPlugin.PLUGIN_ID + Logger.ERROR_LEVEL, false);
		Logger.WARNING = options.getBooleanOption(CloudFoundryPlugin.PLUGIN_ID + Logger.WARNING_LEVEL, false);
		Logger.INFO = options.getBooleanOption(CloudFoundryPlugin.PLUGIN_ID + Logger.INFO_LEVEL, false);
		Logger.DETAILS = options.getBooleanOption(CloudFoundryPlugin.PLUGIN_ID + Logger.DETAILS_LEVEL, false);
	}
 
开发者ID:eclipse,项目名称:cft,代码行数:8,代码来源:Logger.java

示例6: optionsChanged

import org.eclipse.osgi.service.debug.DebugOptions; //导入依赖的package包/类
public void optionsChanged(DebugOptions options) {

		Logger.ERROR = options.getBooleanOption(DockerFoundryServerUiPlugin.PLUGIN_ID + Logger.ERROR_LEVEL, false);
		Logger.WARNING = options.getBooleanOption(DockerFoundryServerUiPlugin.PLUGIN_ID + Logger.WARNING_LEVEL, false);
		Logger.INFO = options.getBooleanOption(DockerFoundryServerUiPlugin.PLUGIN_ID + Logger.INFO_LEVEL, false);
		Logger.DETAILS = options.getBooleanOption(DockerFoundryServerUiPlugin.PLUGIN_ID + Logger.DETAILS_LEVEL, false);
	}
 
开发者ID:osswangxining,项目名称:dockerfoundry,代码行数:8,代码来源:Logger.java

示例7: setBundleDebugOptions

import org.eclipse.osgi.service.debug.DebugOptions; //导入依赖的package包/类
/**
 * Set debugging for the specified bundle
 * 
 * @param currentOptions
 * @param debugEnabled
 */
@SuppressWarnings({ "rawtypes", "unchecked" })
public static void setBundleDebugOptions(String[] currentOptions, boolean debugEnabled)
{
	Map<String, BundleContext> bundles = getCurrentBundleContexts();
	for (String key : currentOptions)
	{
		String symbolicName = key.substring(0, key.indexOf('/'));
		BundleContext bundleContext = bundles.get(symbolicName);
		if (bundleContext == null)
		{
			continue;
		}
		// don't add <?> as it's for Eclipse 3.7's getServiceReference() only
		ServiceReference sRef = bundleContext.getServiceReference(DebugOptions.class.getName());
		DebugOptions options = (DebugOptions) bundleContext.getService(sRef);

		// have to set debug enabled first if re-enabling, or else the internal property list will be null
		// and the set won't happen
		if (debugEnabled)
		{
			options.setDebugEnabled(debugEnabled);
			options.setOption(key, Boolean.toString(debugEnabled));
		}
		else
		{
			options.setOption(key, Boolean.toString(debugEnabled));
			options.setDebugEnabled(debugEnabled);
		}
	}
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:37,代码来源:EclipseUtil.java

示例8: start

import org.eclipse.osgi.service.debug.DebugOptions; //导入依赖的package包/类
public void start(BundleContext context) throws Exception {
	AndroidCore.context = context;
	logger = Platform.getLog(getContext().getBundle());
	Hashtable<String,Object> props = new Hashtable<String, Object>();
	props.put(org.eclipse.osgi.service.debug.DebugOptions.LISTENER_SYMBOLICNAME, PLUGIN_ID);
	context.registerService(DebugOptionsListener.class.getName(), this, props);


}
 
开发者ID:eclipse,项目名称:thym,代码行数:10,代码来源:AndroidCore.java

示例9: optionsChanged

import org.eclipse.osgi.service.debug.DebugOptions; //导入依赖的package包/类
@Override
public void optionsChanged(DebugOptions options) {
	if(TRACE==null)
		TRACE = options.newDebugTrace(PLUGIN_ID);
	DEBUG = options.getBooleanOption(PLUGIN_ID+"/debug", true);	

}
 
开发者ID:eclipse,项目名称:thym,代码行数:8,代码来源:AndroidCore.java

示例10: start

import org.eclipse.osgi.service.debug.DebugOptions; //导入依赖的package包/类
public void start(BundleContext bundleContext) throws Exception {
	IOSCore.context = bundleContext;
	logger = Platform.getLog(getContext().getBundle());
	Hashtable<String,Object> props = new Hashtable<String, Object>();
	props.put(org.eclipse.osgi.service.debug.DebugOptions.LISTENER_SYMBOLICNAME, PLUGIN_ID);
	context.registerService(DebugOptionsListener.class.getName(), this, props);

}
 
开发者ID:eclipse,项目名称:thym,代码行数:9,代码来源:IOSCore.java

示例11: start

import org.eclipse.osgi.service.debug.DebugOptions; //导入依赖的package包/类
public void start(BundleContext bundleContext) throws Exception {
	HybridCore.context = bundleContext;
	logger = Platform.getLog(getContext().getBundle());
	Hashtable<String,Object> props = new Hashtable<String, Object>();
	props.put(org.eclipse.osgi.service.debug.DebugOptions.LISTENER_SYMBOLICNAME, PLUGIN_ID);
	context.registerService(DebugOptionsListener.class.getName(), this, props);
	ResourcesPlugin.getWorkspace().addResourceChangeListener(derivedFoldersChangeListener, IResourceChangeEvent.POST_CHANGE);
}
 
开发者ID:eclipse,项目名称:thym,代码行数:9,代码来源:HybridCore.java

示例12: optionsChanged

import org.eclipse.osgi.service.debug.DebugOptions; //导入依赖的package包/类
@Override
public void optionsChanged(DebugOptions options) {
	synchronized (this.getClass()) {
		if(TRACE==null)
			TRACE = options.newDebugTrace(PLUGIN_ID);
		DEBUG = options.getBooleanOption(PLUGIN_ID+"/debug", true);	
		
	}
}
 
开发者ID:eclipse,项目名称:thym,代码行数:10,代码来源:HybridCore.java

示例13: MassifOSGITracerManager

import org.eclipse.osgi.service.debug.DebugOptions; //导入依赖的package包/类
public MassifOSGITracerManager(BundleContext context) {
    super(context);
    ServiceTracker<Void, DebugOptions> debugTracker = new ServiceTracker<Void, DebugOptions>(context,
            DebugOptions.class.getName(), null);
    debugTracker.open();
    DebugOptions debugOptions = debugTracker.getService();
    trace = debugOptions.newDebugTrace(MassifCommonPlugin.PLUGIN_ID);
}
 
开发者ID:viatra,项目名称:massif,代码行数:9,代码来源:MassifOSGITracerManager.java

示例14: trace

import org.eclipse.osgi.service.debug.DebugOptions; //导入依赖的package包/类
/**
 * @param option
 * @param msg
 * @param error
 */
public static void trace(String option, String msg, Throwable error)
{
	final DebugOptions debugOptions = apiToolsActivator.getDebugOptions();
	if (debugOptions.isDebugEnabled() && debugOptions.getBooleanOption(PLUGIN_ID + option, false))
	{
		System.out.println(msg);
		if (error != null)
		{
			error.printStackTrace(System.out);
		}
	}
	apiToolsActivator.getTrace().trace(option, msg, error);
}
 
开发者ID:jd-carroll,项目名称:target-baselines,代码行数:19,代码来源:ApiToolsActivator.java

示例15: getDebugOptions

import org.eclipse.osgi.service.debug.DebugOptions; //导入依赖的package包/类
/**
 * @return the debug options
 */
public DebugOptions getDebugOptions()
{
	if (debugTracker == null)
	{
		if (context == null)
		{
			return null;
		}
		debugTracker = new ServiceTracker<DebugOptions, DebugOptions>(context, DebugOptions.class.getName(), null);
		debugTracker.open();
	}
	return debugTracker.getService();
}
 
开发者ID:jd-carroll,项目名称:target-baselines,代码行数:17,代码来源:ApiToolsActivator.java


注:本文中的org.eclipse.osgi.service.debug.DebugOptions类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。