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


Java ReflectiveItemProviderAdapterFactory类代码示例

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


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

示例1: PreviewEditorImpl

import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; //导入依赖的package包/类
public PreviewEditorImpl ()
{
    this.adapterFactory = new ComposedAdapterFactory ( ComposedAdapterFactory.Descriptor.Registry.INSTANCE );
    this.adapterFactory.addAdapterFactory ( new ResourceItemProviderAdapterFactory () );
    this.adapterFactory.addAdapterFactory ( new ReflectiveItemProviderAdapterFactory () );

    final BasicCommandStack commandStack = new BasicCommandStack ();

    this.editingDomain = new AdapterFactoryEditingDomain ( this.adapterFactory, commandStack, new HashMap<Resource, Boolean> () );

    this.factoryContext = new FactoryContext () {

        @Override
        public void loadedResource ( final URI uri )
        {
            handleLoadedResource ( uri );
        }
    };

    ResourcesPlugin.getWorkspace ().addResourceChangeListener ( this.resourceChangeListener, IResourceChangeEvent.POST_CHANGE );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:22,代码来源:PreviewEditorImpl.java

示例2: createEditingDomain

import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; //导入依赖的package包/类
private void createEditingDomain() {
	// Create an adapter factory that yields item providers.
	//
	ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);

	adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new BibtexItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());

	// Create the command stack that will notify this editor as commands are
	// executed.
	//
	BasicCommandStack commandStack = new BasicCommandStack();

	// Create the editing domain with a special command stack.
	//
	sharedEditingDomain = new AdapterFactoryEditingDomain(adapterFactory,commandStack, new HashMap<Resource, Boolean>());
}
 
开发者ID:sebastiangoetz,项目名称:slr-toolkit,代码行数:19,代码来源:ModelRegistry.java

示例3: openFirstInstructionSelection

import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; //导入依赖的package包/类
/**
 * Opens the {@link EObject first instruction} selection dialog.
 * 
 * @param shell
 *            the {@link Shell} to use for display
 * @param resourceSet
 *            the {@link ResourceSet} to get the first instruction from
 * @return the selected first instruction {@link URI} if any selected, <code>null</code> otherwise
 */
public static EObject openFirstInstructionSelection(final Shell shell, ResourceSet resourceSet) {
	final EObject res;
	final ComposedAdapterFactory fatory = new ComposedAdapterFactory(
			ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
	fatory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	fatory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());

	ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(shell,
			new AdapterFactoryLabelProvider(fatory), new AdapterFactoryContentProvider(fatory));
	dialog.setTitle("Select first instruction");
	dialog.setMessage("Select the first instruction:");
	dialog.setInput(resourceSet);
	if (dialog.open() == Window.OK) {
		res = (EObject)dialog.getFirstResult();
	} else {
		res = null;
	}
	fatory.dispose();
	return res;
}
 
开发者ID:SiriusLab,项目名称:ModelDebugging,代码行数:30,代码来源:DSLLaunchConfigurationTab.java

示例4: createReferenceBinding

import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; //导入依赖的package包/类
private void createReferenceBinding(Composite parent, EObject target, IItemPropertyDescriptor pd, EReference reference) {
  // Check to see if the EClassifier would like to be displayed
  // in detail. May want to reserve this for EReference types in
  // the future, and should probably check if the object has its
  // own IItemPropertySource
  if (EMFUtils.testBooleanAnnotation(reference, EMFDetailUtils.ANNOTATION_SOURCE_DETAIL, ANNOTATION_DETAIL_INSPECT_REFERENCE)) {
  	if (EMFUtils.testBooleanAnnotation(reference, EMFDetailUtils.ANNOTATION_SOURCE_DETAIL, ANNOTATION_DETAIL_INSPECT_REFLECTIVELY)) {
 			ReflectiveItemProviderAdapterFactory ripaf = new ReflectiveItemProviderAdapterFactory();
 			EObject eObject = (EObject)target.eGet(reference);
 			IItemPropertySource source = (IItemPropertySource) ripaf.adapt(eObject, IItemPropertySource.class);
 			if (source != null) {
 				List<IItemPropertyDescriptor> pds = source.getPropertyDescriptors(eObject);
 				String displayName = pd.getDisplayName(eObject);
		buildPropertySection(parent, eObject, pds, displayName, null);
 			}
  		return;
  	}
inspectReferenceFeature(parent, target, reference);
  } else if (EMFUtils.testBooleanAnnotation(reference, EMFDetailUtils.ANNOTATION_SOURCE_DETAIL, ANNOTATION_DETAIL_TABLE)) {
  	DetailProviderParameter parameter = createDetailProviderParameter(parent, target, pd);
  	EMFDetailUtils.TABLE_BINDING_FACTORY.createBinding(parameter);
  } else {
  	createEditor(parent, target, pd);
  }
 }
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:26,代码来源:EMFDetailFormPart.java

示例5: createViewer

import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; //导入依赖的package包/类
protected TreeViewer createViewer(Composite composite) {
	TreeViewer treeViewer = new TreeViewer(composite);
	treeViewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	
	ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory();
	adapterFactory.addAdapterFactory(new DecoratorEXTLibraryItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new EXTLibraryItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new TreeItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	
	treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
	treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
	
	return treeViewer;
}
 
开发者ID:mbarbero,项目名称:econ-na-2014-emf-edit,代码行数:18,代码来源:NotYourFathersSWT.java

示例6: createEditingDomain

import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; //导入依赖的package包/类
private EditingDomain createEditingDomain(ResourceSet resourceSet) {
	final ESEditingDomainProvider domainProvider = getDomainProvider();
	if (domainProvider != null) {
		return domainProvider.getEditingDomain(resourceSet);
	}

	AdapterFactory adapterFactory = new ComposedAdapterFactory(
		ComposedAdapterFactory.Descriptor.Registry.INSTANCE);

	adapterFactory = new ComposedAdapterFactory(new AdapterFactory[] { adapterFactory,
		new ReflectiveItemProviderAdapterFactory() });

	final AdapterFactoryEditingDomain domain = new AdapterFactoryEditingDomain(adapterFactory,
		new EMFStoreBasicCommandStack(), resourceSet);
	resourceSet.eAdapters().add(new AdapterFactoryEditingDomain.EditingDomainProvider(domain));
	return domain;
}
 
开发者ID:edgarmueller,项目名称:emfstore-rest,代码行数:18,代码来源:ESWorkspaceProviderImpl.java

示例7: createControl

import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; //导入依赖的package包/类
@Override
public void createControl(Composite parent) {

  Composite container = new Composite(parent, SWT.NULL);
  setControl(container);

  checkboxTreeViewer = new CheckboxTreeViewer(container, SWT.BORDER);
  Tree tree = checkboxTreeViewer.getTree();
  tree.setBounds(0, 0, 574, 282);

  AttributeSelectionContentProvider adapterContentProvider =
      new AttributeSelectionContentProvider();
  checkboxTreeViewer.setContentProvider(adapterContentProvider);
  checkboxTreeViewer
      .setLabelProvider(new AdapterFactoryLabelProvider(new ReflectiveItemProviderAdapterFactory()));

}
 
开发者ID:atlanmod,项目名称:emfviews,代码行数:18,代码来源:AttributesSelectionPage.java

示例8: createDialogArea

import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; //导入依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
  this.parent = parent;
  Composite area = (Composite) super.createDialogArea(parent);
  Composite container = new Composite(area, SWT.NONE);
  container.setLayoutData(new GridData(GridData.FILL_BOTH));
  GridLayout layout = new GridLayout(1, false);
  container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
  container.setLayout(layout);

  treeViewer = new CheckboxTreeViewer(area, SWT.BORDER);

  Tree tree = treeViewer.getTree();
  tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

  treeViewer
      .setLabelProvider(new AdapterFactoryLabelProvider(new ReflectiveItemProviderAdapterFactory()));

  treeViewer
      .setContentProvider(new AdapterFactoryContentProvider(new ReflectiveItemProviderAdapterFactory()));

  treeViewer.setInput(modelRoot);
  return area;
}
 
开发者ID:atlanmod,项目名称:emfviews,代码行数:25,代码来源:ModelSelectionDialog.java

示例9: CustomThreadItemProvider

import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; //导入依赖的package包/类
/**
 * Constructor.
 * 
 * @param adapterFactory
 *            the {@link AdapterFactory}.
 */
public CustomThreadItemProvider(AdapterFactory adapterFactory) {
	super(adapterFactory);

	efactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
	efactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	CustomDebugItemProviderAdapterFactory debugFactory = new CustomDebugItemProviderAdapterFactory();
	efactory.addAdapterFactory(debugFactory);
	efactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:16,代码来源:CustomThreadItemProvider.java

示例10: CustomStackFrameItemProvider

import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; //导入依赖的package包/类
/**
 * Constructor.
 * 
 * @param adapterFactory
 *            the {@link AdapterFactory}.
 */
public CustomStackFrameItemProvider(AdapterFactory adapterFactory) {
	super(adapterFactory);

	efactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
	efactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	CustomDebugItemProviderAdapterFactory debugFactory = new CustomDebugItemProviderAdapterFactory();
	efactory.addAdapterFactory(debugFactory);
	efactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:16,代码来源:CustomStackFrameItemProvider.java

示例11: CustomDebugTargetItemProvider

import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; //导入依赖的package包/类
/**
 * Constructor.
 * 
 * @param adapterFactory
 *            the {@link AdapterFactory}.
 */
public CustomDebugTargetItemProvider(AdapterFactory adapterFactory) {
	super(adapterFactory);

	efactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
	efactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	CustomDebugItemProviderAdapterFactory debugFactory = new CustomDebugItemProviderAdapterFactory();
	efactory.addAdapterFactory(debugFactory);
	efactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:16,代码来源:CustomDebugTargetItemProvider.java

示例12: initLabelProvider

import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; //导入依赖的package包/类
/**
 * Initializes the {@link ComposedAdapterFactory} used for markers.
 * 
 * @return the {@link ComposedAdapterFactory} used for markers
 */
private static ComposedAdapterFactory initLabelProvider() {
	final ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(
			ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
	adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	CustomDebugItemProviderAdapterFactory debugFactory = new CustomDebugItemProviderAdapterFactory();
	adapterFactory.addAdapterFactory(debugFactory);
	adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
	return adapterFactory;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:15,代码来源:DSLBreakpoint.java

示例13: DSLDebugModelPresentation

import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; //导入依赖的package包/类
/**
 * Constructor.
 */
public DSLDebugModelPresentation() {
	super();
	final ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(
			ComposedAdapterFactory.Descriptor.Registry.INSTANCE);

	adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	CustomDebugItemProviderAdapterFactory debugFactory = new CustomDebugItemProviderAdapterFactory();
	adapterFactory.addAdapterFactory(debugFactory);
	adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
	eLabelProvider = new AdapterFactoryLabelProvider(adapterFactory);
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:15,代码来源:DSLDebugModelPresentation.java

示例14: SelectDiagramDefinitionPage

import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; //导入依赖的package包/类
public SelectDiagramDefinitionPage(
		NewGemocDebugRepresentationWizard newGemocDebugRepresentationWizard) {
	super("Select diagram definition");
	this.newGemocDebugRepresentationWizard = newGemocDebugRepresentationWizard;

	adapterFactory = new ComposedAdapterFactory(
			ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
	adapterFactory
			.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	adapterFactory
			.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:13,代码来源:SelectDiagramDefinitionPage.java

示例15: getAdapterFactory

import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; //导入依赖的package包/类
public AdapterFactory getAdapterFactory() {
	ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
	adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
	adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
	return adapterFactory;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:8,代码来源:DwprofileAdapterFactoryProvider.java


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